/* AiFi Notebook v1: shared visual tokens. Loaded first in the site stylesheet. */
:root {
  --paper: #f5f5ee;
  --paper-hover: #eeede6;
  --ink: #16140f;
  --muted: #5c5a54;
  --line: #d8d7cf;
  --line-strong: #aaa79c;
  --orange: #a24432;
  --control: #24231f;
  --serif: "Source Serif 4", Georgia, serif;
  --sans: "Outfit", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 24px;
}
body {
  margin: 0;
  background-color: var(--paper);
  background-image: none;
  color: var(--ink);
  font: 15px/1.6 var(--sans);
}
button,
input,
select {
  font: inherit;
}
button,
a {
  touch-action: manipulation;
}
button {
  cursor: pointer;
  color: inherit;
  border: 0;
  background: none;
}
a {
  color: inherit;
  text-decoration: none;
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
svg {
  display: block;
  width: 100%;
  height: 100%;
}
img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.wrap {
  max-width: 1320px;
  margin: auto;
  padding: 0 48px;
}
.switch {
  display: flex;
  gap: 3px;
}
.switch button {
  font-size: 11px;
  line-height: 1.5;
  padding: 3px 11px;
  border: 1px solid transparent;
  letter-spacing: 0;
}
.switch button[aria-pressed="true"] {
  border-color: var(--line);
  color: var(--ink);
  background: var(--paper);
}
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
  gap: 24px;
}
.identity {
  display: flex;
  align-items: center;
  gap: 28px;
}
.logo {
  font:
    600 47px/0.95 "Caveat",
    cursive;
  letter-spacing: -1.8px;
  white-space: nowrap;
}
nav {
  display: flex;
  gap: 24px;
  align-items: center;
  font-size: 12px;
}
nav a:hover {
  color: var(--orange);
}
.saved-link {
  font-size: 12px;
  padding: 7px 0 7px 17px;
  border-left: 1px solid var(--line);
}
#saved-count {
  color: var(--orange);
  margin-left: 4px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
}
.editorial {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
  gap: 32px;
  margin-top: 30px;
}
.column-heading {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 18px;
}
.column-heading h2 {
  margin: 0;
  font: 500 11px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  display: flex;
  align-items: center;
  gap: 15px;
  flex: 1;
  white-space: nowrap;
}
.column-heading h2:after {
  content: "";
  height: 1px;
  background: var(--line);
  flex: 1;
}
.column-heading a {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--orange);
  white-space: nowrap;
}
.featured-story {
  display: grid;
  grid-template-columns: 1.08fr 1fr;
  gap: 25px;
  align-items: center;
}
.cover {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  background: #e5e4d8;
}
.feature-art {
  height: 270px;
}
.feature-copy {
  padding: 4px 0;
}
.meta {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
  line-height: 1.5;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  color: var(--muted);
}
.feature-copy .meta {
  flex-wrap: wrap;
  font-size: 11px;
}
.feature-copy h2 {
  font: 600 34px/1.02 var(--serif);
  letter-spacing: -0.65px;
  margin: 15px 0 12px;
}
.feature-copy p {
  font-size: 12px;
  line-height: 1.75;
  color: var(--muted);
  margin: 0 0 18px;
}
.text-link {
  padding: 0 0 3px;
  font-size: 11px;
  font-weight: 500;
  color: var(--orange);
  border-bottom: 1px solid #ad6a555f;
  display: inline-block;
}
.text-link:hover {
  color: var(--control);
  border-color: currentColor;
}
.text-link span {
  margin-left: 12px;
}
.library {
  padding: 46px 0 0;
}
.section-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 20px;
  gap: 15px;
}
.section-heading h2 {
  font: 600 36px/1.2 var(--serif);
  margin: 0;
  letter-spacing: -0.5px;
}
.section-heading span {
  color: var(--muted);
  font-size: 11px;
}
.controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
}
.filters {
  display: flex;
  gap: 5px;
}
.filters button {
  padding: 6px 12px;
  font-size: 11px;
  white-space: nowrap;
  border: 1px solid transparent;
}
.filters button[aria-pressed="true"] {
  border-color: var(--control);
  color: var(--paper);
  background: var(--control);
}
.search-group {
  display: flex;
  align-items: center;
  gap: 20px;
}
.search {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  border-bottom: 1px solid #bdbbb2;
}
.search input {
  width: 176px;
  background: none;
  border: 0;
  padding: 6px 0;
  font-size: 11px;
  outline-offset: 1px;
  color: var(--ink);
}
select {
  background: none;
  border: 0;
  color: var(--muted);
  font-size: 11px;
  max-width: 135px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 48px;
  row-gap: 0;
  padding-top: 25px;
}
.card {
  min-width: 0;
  display: grid;
  grid-template-rows: subgrid;
  grid-row: span 5;
  row-gap: 0;
  position: relative;
  padding-bottom: 28px;
}
.card:not(:nth-child(3n)):after {
  content: "";
  width: 1px;
  background: var(--line);
  position: absolute;
  right: -24px;
  top: 0;
  bottom: 28px;
}
.card-art {
  grid-row: 4;
  height: 200px;
  padding: 0;
  width: 100%;
  text-align: left;
  display: block;
}
.card-art img {
  transition: transform 0.25s;
}
.card-art:hover img {
  transform: scale(1.035);
}
.card .meta {
  grid-row: 1;
  margin: 0 0 12px;
  align-self: start;
  font-size: 11px;
}
.card h3 {
  grid-row: 2;
  font: 600 29px/1.05 var(--serif);
  letter-spacing: -0.35px;
  margin: 0;
}
.card h3 a {
  text-align: left;
  padding: 0;
  font: inherit;
}
.card h3 a:hover {
  color: var(--orange);
}
.card p {
  grid-row: 3;
  font-size: 12px;
  line-height: 1.6;
  color: var(--muted);
  margin: 9px 0 15px;
}
.card-bottom {
  grid-row: 5;
  min-height: 41px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  color: var(--muted);
}
.bookmark {
  font-size: 20px;
  line-height: 1;
  padding: 8px;
}
.bookmark[aria-pressed="true"] {
  color: var(--orange);
}
.empty {
  padding: 50px 20px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  grid-column: 1/-1;
}
.empty h3 {
  font: 28px var(--serif);
  margin: 0;
}
.empty p {
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 0 32px;
  color: var(--muted);
  font-size: 11px;
}
footer .logo {
  font-size: 36px;
  color: var(--ink);
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: var(--paper);
  padding: 10px 20px;
  font-size: 12px;
  z-index: 10;
  pointer-events: none;
}
#toast:empty {
  display: none;
}
[hidden] {
  display: none !important;
}
body[data-view="library"] .editorial {
  display: none;
}
body[data-view="library"] .library {
  padding-top: 26px;
}
body[data-view="library"] .grid {
  display: block;
  padding-top: 0;
}
body[data-view="library"] .card {
  display: grid;
  grid-row: auto;
  grid-template-columns: 140px 1fr 130px;
  grid-template-rows: auto auto auto;
  column-gap: 24px;
  border-bottom: 1px solid var(--line);
  padding: 20px 0;
}
body[data-view="library"] .card:after {
  display: none;
}
body[data-view="library"] .card-art {
  height: 105px;
  grid-row: 1/4;
  grid-column: 1;
}
body[data-view="library"] .card .meta {
  margin: 0 0 8px;
  grid-column: 2;
  grid-row: 1;
}
body[data-view="library"] .card h3 {
  grid-column: 2;
  grid-row: 2;
  font-size: 27px;
}
body[data-view="library"] .card p {
  grid-column: 2;
  grid-row: 3;
  margin: 7px 0 0;
}
body[data-view="library"] .card-bottom {
  grid-column: 3;
  grid-row: 1/4;
  align-self: center;
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  * {
    transition: none !important;
  }
}
@media (max-width: 1050px) {
  .wrap {
    padding: 0 30px;
  }
  .editorial {
    grid-template-columns: minmax(0, 1.8fr) minmax(0, 1fr);
    gap: 22px;
  }
  .featured-story {
    grid-template-columns: 1fr 1fr;
    gap: 20px;
  }
  .feature-copy h2 {
    font-size: 28px;
  }
  .feature-art {
    height: 260px;
  }
  .grid {
    column-gap: 32px;
  }
  .card:not(:nth-child(3n)):after {
    right: -16px;
  }
  .card h3 {
    font-size: 27px;
  }
  .card-art {
    height: 180px;
  }
}
@media (max-width: 800px) {
  .editorial {
    grid-template-columns: 1fr;
  }
  .featured-story {
    grid-template-columns: 1.1fr 1fr;
  }
  .feature-copy h2 {
    font-size: 37px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .search-group {
    flex: 1;
    justify-content: flex-end;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 0;
  }
  .card:not(:nth-child(3n)):after {
    display: none;
  }
  .card:nth-child(odd):after {
    display: block;
    right: -14px;
  }
  .card-art {
    height: 190px;
  }
}
@media (max-width: 560px) {
  .wrap {
    padding: 0 22px;
  }
  .switch button {
    font-size: 11px;
    padding: 3px 8px;
  }
  .editorial {
    margin-top: 26px;
    gap: 23px;
  }
  .featured-story {
    grid-template-columns: 1fr;
    gap: 19px;
  }
  .feature-art {
    height: 235px;
  }
  .feature-copy {
    padding: 0;
  }
  .feature-copy h2 {
    font-size: 37px;
    margin-top: 12px;
  }
  .feature-copy p {
    font-size: 13px;
    max-width: 330px;
    margin-bottom: 14px;
  }
  .feature-copy .meta {
    font-size: 11px;
  }
  .column-heading h2,
  .column-heading a {
    font-size: 11px;
  }
  .library {
    padding-top: 31px;
  }
  .section-heading h2 {
    font-size: 33px;
  }
  .section-heading {
    margin-bottom: 17px;
  }
  .controls {
    display: block;
    padding: 10px 0 13px;
  }
  .filters {
    justify-content: space-between;
    gap: 3px;
  }
  .filters button {
    padding: 6px 11px;
  }
  .search-group {
    justify-content: space-between;
    margin-top: 13px;
    gap: 10px;
  }
  .search input {
    width: 154px;
    font-size: 11px;
  }
  select {
    max-width: 126px;
    font-size: 11px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 29px;
    padding-top: 23px;
  }
  .card {
    grid-row: auto;
    grid-template-rows: auto auto auto 215px 39px;
    border-bottom: 1px solid var(--line);
    padding-bottom: 10px;
  }
  .card:nth-child(odd):after {
    display: none;
  }
  .card .meta {
    margin-bottom: 10px;
  }
  .card h3 {
    font-size: 31px;
    line-height: 1.06;
  }
  .card p {
    font-size: 13px;
    margin: 11px 0 17px;
  }
  .card-art {
    height: 215px;
  }
  footer {
    align-items: flex-start;
    gap: 20px;
  }
  footer .logo {
    font-size: 31px;
  }
  footer > span {
    max-width: 177px;
    text-align: right;
    font-size: 11px;
  }
  body[data-view="library"] .card {
    grid-template-columns: 80px 1fr;
    gap: 4px 15px;
  }
  body[data-view="library"] .card-art {
    height: 80px;
    grid-row: 1/4;
  }
  body[data-view="library"] .card h3 {
    font-size: 24px;
  }
  body[data-view="library"] .card p {
    display: none;
  }
  body[data-view="library"] .card-bottom {
    grid-column: 2;
    grid-row: 3;
  }
}

.skip-link {
  position: fixed;
  left: 16px;
  top: 12px;
  z-index: 30;
  padding: 10px 16px;
  background: var(--control);
  color: var(--paper);
  transform: translateY(-180%);
}
.skip-link:focus {
  transform: translateY(0);
}
.language-switch {
  display: flex;
  align-items: center;
  gap: 2px;
  border: 1px solid var(--line);
  padding: 3px;
  margin-left: auto;
  flex-shrink: 0;
}
.language-switch button {
  font-size: 12px;
  padding: 6px 9px;
  min-height: 34px;
  white-space: nowrap;
}
.language-switch button[aria-pressed="true"] {
  background: var(--control);
  color: var(--paper);
}
.social-links {
  display: flex;
  gap: 10px 18px;
  flex-wrap: wrap;
}
.social-link {
  display: inline-flex;
  flex-direction: column;
  gap: 2px;
  padding: 4px 0;
  border-bottom: 1px solid transparent;
}
.social-link:hover {
  color: var(--orange);
  border-color: var(--orange);
}
footer {
  flex-wrap: wrap;
  gap: 24px;
}
.footer-nav {
  display: flex;
  gap: 12px 20px;
  flex-wrap: wrap;
  align-items: center;
}
.footer-bottom {
  width: 100%;
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.back-top {
  font-size: 12px;
  white-space: nowrap;
}
footer .social-links {
  gap: 10px 18px;
}
footer .social-link {
  font-size: 12px;
}
html[lang="zh-Hant"] {
  --serif: "Songti TC", "Noto Serif TC", "PMingLiU", serif;
  --sans: "PingFang TC", "Noto Sans TC", Arial, sans-serif;
}
html[lang="zh-Hant"] .feature-copy h2 {
  font-size: 29px;
  line-height: 1.4;
  letter-spacing: 0;
}
html[lang="zh-Hant"] .card h3 {
  font-size: 25px;
  line-height: 1.45;
  letter-spacing: 0;
}
html[lang="zh-Hant"] .meta {
  letter-spacing: 0.03em;
  flex-wrap: wrap;
}
html[lang="zh-Hant"] .eyebrow {
  letter-spacing: 0.07em;
}
@media (max-width: 560px) {
  .social-links {
    gap: 12px 20px;
  }
  .social-link {
    min-height: 44px;
    justify-content: center;
  }
  .footer-nav {
    width: 100%;
  }
  .footer-bottom {
    flex-wrap: wrap;
  }
  footer > span {
    max-width: none;
    text-align: left;
  }
  html[lang="zh-Hant"] .feature-copy h2 {
    font-size: 28px;
  }
  html[lang="zh-Hant"] .card h3 {
    font-size: 26px;
  }
}

/* Utility controls use icons; native-language names remain explicit. */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.ui-icon {
  display: inline-block;
  width: 20px;
  height: 20px;
  flex: none;
  background: currentColor;
  mask: var(--icon) center/contain no-repeat;
}
.brand-icon {
  display: block;
  width: 21px;
  height: 21px;
  background: currentColor;
  mask: var(--brand-icon) center/contain no-repeat;
}
.social-links {
  gap: 8px;
}
.social-link {
  width: 44px;
  height: 44px;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 50%;
  color: var(--ink);
}
.social-link:hover,
.social-link:focus-visible {
  background: #24231f0d;
  border-color: var(--line);
  color: var(--orange);
}
.saved-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 44px;
  min-height: 44px;
}
.saved-link #saved-count {
  font-size: 10px;
}
.bookmark {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
}
.bookmark[aria-pressed="true"] .icon-bookmark {
  background: var(--orange);
}
.bookmark[aria-pressed="true"] {
  background: #a2443210;
  border-radius: 50%;
}
.language-switch {
  gap: 3px;
  border: 0;
}
.language-switch > .ui-icon {
  margin: 0 5px;
}
.language-switch button {
  min-height: 40px;
  border-radius: 3px;
}
.language-switch button[aria-pressed="true"] {
  background: #24231f0e;
  color: var(--ink);
  font-weight: 600;
}
.search .ui-icon {
  width: 16px;
  height: 16px;
}
@media (max-width: 560px) {
  .footer-nav {
    width: auto;
  }
}

.icon-bookmark {
  --icon: url(/assets/icons/bookmark.svg);
}
.icon-search {
  --icon: url(/assets/icons/search.svg);
}
.icon-connect {
  --icon: url(/assets/icons/connect.svg);
}
.icon-up {
  --icon: url(/assets/icons/up.svg);
}
.article-page {
  max-width: 760px;
  margin: 60px auto 100px;
  font-size: 19px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.article-page h1 {
  font-family: var(--serif);
  font-size: clamp(34px, 5vw, 56px);
  line-height: 1.12;
  margin: 30px 0;
}
.article-page h2 {
  font-family: var(--serif);
  font-size: 32px;
  line-height: 1.25;
  margin-top: 50px;
}
.article-page h3 {
  margin-top: 32px;
}
.article-page p {
  margin: 24px 0;
}
.article-page img {
  width: 100%;
  height: auto;
}
.article-page pre {
  white-space: pre-wrap;
  padding: 22px;
  background: var(--paper-hover);
  font-size: 15px;
}
.article-page code {
  overflow-wrap: anywhere;
}
.article-page a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 4px;
}
.article-page footer {
  display: block;
  margin-top: 60px;
  font-size: 15px;
}
@media (max-width: 560px) {
  .article-page {
    margin: 32px 22px 60px;
    font-size: 17px;
  }
  .wrap .article-page {
    margin-left: 0;
    margin-right: 0;
  }
}

/* Published notebook: quiet controls and readable article art. */
.editorial {
  grid-template-columns: minmax(0, 3fr) minmax(190px, 1fr);
  gap: 38px;
  margin-top: 38px;
}
.featured-story {
  grid-template-columns: 1fr;
  gap: 22px;
}
.feature-art {
  display: block;
  height: auto;
  aspect-ratio: 16/9;
}
.feature-art img,
.card-art img {
  object-fit: contain;
  background: var(--paper-hover);
}
.feature-copy h2 {
  font-size: 39px;
  line-height: 1.12;
  max-width: 760px;
}
.feature-copy h2 a:hover {
  color: var(--orange);
}
.feature-copy p {
  font-size: 14px;
  line-height: 1.7;
  max-width: 680px;
}
.feature-copy .meta {
  gap: 14px;
}
.text-link {
  font-size: 13px;
  min-height: 30px;
}
.text-link span:first-child {
  margin-left: 0;
}
.library {
  padding-top: 56px;
}
.section-heading .eyebrow {
  margin-bottom: 8px;
}
.controls {
  gap: 14px;
}
.switch button,
.filters button {
  min-height: 44px;
  font-size: 12px;
}
.switch {
  margin-left: auto;
}
.switch button[aria-pressed="true"] {
  border-color: var(--line);
  background: transparent;
}
.search input {
  min-height: 44px;
  font-size: 12px;
}
.search-group {
  gap: 16px;
}
select {
  min-height: 44px;
}
.grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 38px;
}
.card:not(:nth-child(3n)):after {
  display: none;
}
.card:nth-child(odd):after {
  display: block;
  right: -19px;
}
.card-art {
  height: auto;
  aspect-ratio: 16/9;
  align-self: start;
  margin-bottom: 10px;
}
.card h3 {
  font-size: 31px;
  line-height: 1.15;
}
.card p {
  font-size: 14px;
  line-height: 1.7;
}
.card-bottom {
  min-height: 44px;
}
.card h3 a {
  display: block;
}
.card h3 a:hover {
  color: var(--orange);
}
body[data-view="library"] .editorial {
  display: grid;
}
body[data-view="library"] .card-art {
  aspect-ratio: auto;
  margin: 0;
}
body[data-view="library"] .library {
  padding-top: 56px;
}
html[lang="zh-Hant"] [lang="en"] {
  font-family: "Source Serif 4", Georgia, serif;
}
html[lang="zh-Hant"] p[lang="en"] {
  font-family: "Outfit", Arial, sans-serif;
}
html[lang="zh-Hant"] .feature-copy h2 {
  line-height: 1.3;
}
.article-author {
  display: flex;
  align-items: center;
  gap: 14px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 18px 0;
  margin: 28px 0;
  font-size: 14px;
}
.article-author img {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  object-fit: cover;
  object-position: 50% 30%;
}
.article-author p {
  margin: 0;
}
.article-related {
  border-top: 1px solid var(--line);
  margin-top: 48px;
  padding-top: 24px;
}
.article-related h2 {
  margin-top: 0;
}
.article-related a {
  display: block;
  padding: 14px 0;
}
@media (max-width: 1050px) {
  .editorial {
    gap: 24px;
  }
  .controls {
    flex-wrap: wrap;
  }
  .search-group {
    flex: 1;
  }
}
@media (max-width: 800px) {
  .editorial {
    grid-template-columns: 1fr;
  }
  .grid {
    column-gap: 28px;
  }
  .card:nth-child(odd):after {
    right: -14px;
  }
  .feature-copy h2 {
    font-size: 36px;
  }
}
@media (max-width: 560px) {
  .feature-copy h2 {
    font-size: 33px;
  }
  .editorial {
    margin-top: 28px;
  }
  .feature-art {
    height: auto;
  }
  .library,
  body[data-view="library"] .library {
    padding-top: 38px;
  }
  .section-heading h2 {
    font-size: 31px;
  }
  .controls {
    display: flex;
    gap: 8px;
  }
  .filters {
    justify-content: flex-start;
  }
  .switch {
    margin-left: auto;
  }
  .switch button,
  .filters button {
    padding: 6px 9px;
  }
  .search-group {
    flex-basis: 100%;
    margin: 0;
    gap: 14px;
  }
  .search {
    flex: 1;
  }
  .search input {
    width: 100%;
    min-width: 0;
  }
  .search-group select {
    max-width: 115px;
  }
  .grid {
    grid-template-columns: 1fr;
    gap: 22px;
  }
  .card {
    grid-template-rows: auto auto auto auto auto;
  }
  .card:nth-child(odd):after {
    display: none;
  }
  .card-art {
    height: auto;
  }
  .card h3 {
    font-size: 29px;
  }
  body[data-view="library"] .card-art {
    height: 80px;
  }
  body[data-view="library"] .card h3 {
    font-size: 23px;
    line-height: 1.2;
  }
}

.article-page .article-author img {
  width: 80px;
  height: 80px;
  flex: none;
  object-position: center 60%;
}
.article-page .article-author h2 {
  font-size: 22px;
  margin: 0 0 5px;
}
.article-page .article-author p {
  font-size: 14px;
  margin: 0;
}
.article-page .article-related {
  display: block;
}
.article-related ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
.article-related li {
  border-bottom: 1px solid var(--line);
}
.article-related a {
  font-size: 17px;
  line-height: 1.5;
}
.article-page .article-author a {
  font-size: 14px;
}

.feature-art {
  aspect-ratio: auto;
}
.feature-art img {
  height: auto;
  object-fit: contain;
}

.article-page .article-related {
  border-top: 0;
  padding-top: 0;
  margin-top: 36px;
}

/* Homepage introduction: one set of rules for every width, view and language. */
.intro {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr);
  gap: 64px;
  align-items: end;
  padding: 72px 0 64px;
  border-bottom: 1px solid var(--line);
}
.intro h1 {
  font: 400 clamp(42px, 4.4vw, 64px) / 1.15 var(--serif);
  letter-spacing: -1.5px;
  margin: 18px 0 0;
}
.intro-note {
  padding-bottom: 5px;
}
.intro-note p {
  font: 20px/1.7 var(--sans);
  max-width: 410px;
  margin: 0 0 24px;
  color: var(--ink);
  text-wrap: pretty;
}
.intro-links {
  display: flex;
  gap: 25px;
  flex-wrap: wrap;
}
.intro .text-link {
  font-size: 15px;
}
.intro .intro-links .text-link {
  min-height: 35px;
}
html[lang="zh-Hant"] .intro h1 {
  font-size: clamp(38px, 4.2vw, 60px);
  line-height: 1.3;
  letter-spacing: -1px;
}
html[lang="zh-Hant"] .intro-note p {
  font-size: 18px;
  line-height: 1.9;
}
@media (max-width: 800px) {
  .intro {
    grid-template-columns: 1.3fr 1fr;
    gap: 32px;
    padding: 48px 0;
  }
  .intro .eyebrow {
    font-size: 11px;
    letter-spacing: 0.08em;
  }
  .intro-links {
    gap: 16px;
  }
}
/* Phones get straight to the articles: the headline alone, flowing as one sentence in English. */
@media (max-width: 560px) {
  .intro {
    display: block;
    padding: 20px 0 22px;
  }
  .intro .eyebrow,
  .intro-note,
  .intro .wide-break {
    display: none;
  }
  .intro h1 {
    font-size: 28px;
    line-height: 1.25;
    letter-spacing: -0.5px;
    margin: 0;
    text-wrap: balance;
  }
  html[lang="zh-Hant"] .intro h1 {
    font-size: 28px;
    line-height: 1.45;
    letter-spacing: 0;
  }
}
.feature-art,
.card-art,
body[data-view="library"] .card-art {
  aspect-ratio: 16/9;
  height: auto;
}
.feature-art img,
.card-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
body[data-view="library"] .card-art {
  align-self: center;
}
footer {
  margin-top: 48px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .card-art,
  body[data-view="library"] .card-art {
    height: auto;
    aspect-ratio: 16/9;
  }
  footer {
    margin-top: 32px;
  }
}

/* A single editorial feature gives the essay and its cover equal weight. */
.editorial {
  display: block;
}
.featured-story {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 36px;
  align-items: center;
}
.feature-art,
.card-art,
.feature-art img,
.card-art img {
  background: #fff;
}
.feature-copy h2 {
  font-size: clamp(28px, 3.2vw, 40px);
}
.feature-copy p {
  margin-bottom: 12px;
}
.article-author {
  border-bottom: 0;
}
.about-page {
  max-width: 720px;
}
.about-page h1 {
  margin-bottom: 36px;
}
/* The About page is wider than the article reading column: up to 120px more on each side when there is room,
   so the intro and the roadmap share one centered width. The heading spans it; below, the copy and a margin
   sketch sit side by side, with the motto under the sketch centered in its column. */
.article-page.about-page {
  --wrap-pad: 48px;
  --about-wide: min(120px, max(0px, (min(100vw, 1320px) - 2 * var(--wrap-pad) - 760px) / 2));
  max-width: calc(760px + 2 * var(--about-wide));
}
.about-intro {
  --portrait: 240px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) calc(var(--portrait) + 72px);
  align-items: start;
}
.about-copy {
  padding-right: 48px;
  border-right: 1px solid var(--line);
}
.about-copy > .about-socials {
  margin-bottom: 0;
}
.about-portrait {
  width: var(--portrait);
  margin: 0;
  justify-self: center;
}
.about-portrait img {
  display: block;
  width: 100%;
  height: auto;
  mix-blend-mode: multiply;
  -webkit-mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
  mask-image: linear-gradient(to bottom, #000 82%, transparent 100%);
}
.about-motto {
  position: relative;
  margin: 16px 0 0;
  padding-left: 24px;
  font-family: var(--serif);
  font-style: italic;
  font-size: 19px;
  line-height: 1.4;
  color: var(--ink);
}
.about-motto::before {
  content: "";
  position: absolute;
  left: 0;
  top: 13px;
  width: 14px;
  border-top: 1px solid var(--orange);
}
@media (min-width: 1100px) {
  .about-intro {
    --portrait: 280px;
  }
}
@media (max-width: 1050px) {
  .article-page.about-page {
    --wrap-pad: 30px;
  }
}
@media (max-width: 720px) {
  .about-intro {
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
  }
  .article-page.about-page {
    --about-wide: 0px;
  }
  .about-copy {
    padding-right: 0;
    border-right: 0;
  }
  .about-portrait {
    order: -1;
    width: auto;
    justify-self: stretch;
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    gap: 16px;
    align-items: end;
  }
  .about-motto {
    margin: 0 0 12px;
    font-size: 17px;
  }
}

.about-journey {
  --date-col: 84px;
  --rail-gap: 30px;
  margin-top: 56px;
}
.journey-group {
  border-bottom: 1px solid var(--line);
}
.journey-group:first-of-type {
  margin-top: 32px;
  border-top: 1px solid var(--line);
}
.journey-group summary {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  cursor: pointer;
  list-style: none;
}
.journey-group summary::-webkit-details-marker {
  display: none;
}
.journey-group summary::after {
  content: "+";
  font-size: 26px;
  font-weight: 400;
}
.journey-group[open] summary::after {
  content: "−";
}
.journey-group summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
.journey-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.journey-group[open] .journey {
  margin-bottom: 20px;
}
.article-page .journey-year {
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 600;
  line-height: 1.2;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
}
.journey-year span {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
/* One vertical rail runs through each year; every row carries a dot on it. */
.journey {
  position: relative;
  list-style: none;
  margin: 0;
  padding: 6px 0;
}
.journey::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(var(--date-col) + var(--rail-gap) / 2);
  width: 1px;
  background: var(--line-strong);
}
.journey-item {
  display: grid;
  grid-template-columns: var(--date-col) minmax(0, 1fr);
  gap: var(--rail-gap);
  padding: 16px 0;
}
/* Rows with an event photo gain a third column; on phones the photo drops under the text. */
.journey-item.has-photo {
  grid-template-columns: var(--date-col) minmax(0, 1fr) 240px;
}
.journey-photo {
  margin: 4px 0 0;
}
.journey-item.is-featured.has-photo {
  padding-right: 16px;
}
.journey-photo img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 4px;
}
@media (max-width: 720px) {
  .journey-item.has-photo {
    grid-template-columns: var(--date-col) minmax(0, 1fr);
  }
  .journey-photo {
    grid-column: 2;
    margin-top: 8px;
  }
}
.journey-body {
  position: relative;
}
.journey-body::before {
  content: "";
  position: absolute;
  left: calc(var(--rail-gap) / -2 - 5px);
  top: 7px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--paper);
  border: 1px solid var(--muted);
}
.has-award .journey-body::before {
  background: var(--ink);
  border-color: var(--ink);
}
.is-featured .journey-body::before {
  left: calc(var(--rail-gap) / -2 - 8px);
  top: 6px;
  width: 15px;
  height: 15px;
  background: var(--orange);
  border-color: var(--orange);
  box-shadow: 0 0 0 4px var(--paper);
}
.is-upcoming .journey-body::before {
  border-style: dashed;
}
.article-page .journey-item p {
  margin: 0;
}
.article-page .journey-date {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  text-align: right;
  color: var(--muted);
  padding-top: 3px;
}
.article-page .journey-item h4 {
  font-size: 17px;
  line-height: 1.4;
  margin: 0;
}
.article-page .journey-item .journey-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 8px 0 6px;
}
.article-page .journey-body > p:last-child {
  font-size: 15px;
  line-height: 1.55;
  color: var(--muted);
}
.journey-item .text-link {
  margin-left: 4px;
  white-space: nowrap;
}
.journey-tag {
  font-family: var(--sans);
  font-size: 10px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  border: 1px solid currentColor;
  border-radius: 999px;
  padding: 4px 8px;
}
.tag-hackathon {
  color: var(--ink);
}
.tag-conference {
  color: var(--orange);
}
.tag-organizer {
  color: var(--muted);
  border-style: dashed;
}
.tag-award {
  color: var(--paper);
  background: var(--ink);
  border-color: var(--ink);
}
.tag-next {
  color: var(--muted);
  border-style: dashed;
}
/* The featured conference: tinted panel and a serif title. */
.journey-item.is-featured {
  background: var(--paper-hover);
  margin: 8px 0;
  padding: 20px 0;
}
.article-page .journey-item.is-featured h4 {
  font-family: var(--serif);
  font-size: 22px;
}
.article-page .is-featured .journey-date,
.is-featured .tag-award {
  color: var(--paper);
}
.article-page .is-featured .journey-date {
  color: var(--orange);
}
.is-featured .tag-award {
  background: var(--orange);
  border-color: var(--orange);
}
.article-page .is-featured .journey-body > p:last-child {
  color: var(--ink);
}
.article-page .is-upcoming h4 {
  color: var(--muted);
}
.article-page .journey-note {
  font-size: 13px;
  color: var(--muted);
  margin: 16px 0 0;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}
@media (max-width: 560px) {
  .about-journey {
    --date-col: 52px;
    --rail-gap: 24px;
  }
  .article-page .journey-date {
    font-size: 11px;
    letter-spacing: 0.03em;
  }
}
.about-projects {
  margin-top: 48px;
  font-size: 14px;
  letter-spacing: 0.03em;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}
@media (min-width: 1100px) {
  .grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
  }
  .card:nth-child(odd):after {
    display: none;
  }
  .card:not(:nth-child(3n)):after {
    display: block;
    right: -14px;
  }
  .card h3 {
    font-size: 27px;
  }
}
@media (max-width: 800px) {
  .featured-story {
    grid-template-columns: 1fr;
    gap: 22px;
  }
}

.editorial-page header nav {
  flex: 0 0 auto;
  width: auto;
  margin-left: auto;
}
.article-page a.text-link {
  text-decoration: none;
}

/* Article contents: a quiet margin rail with a full reading outline. */
.article-body h2 {
  scroll-margin-top: 32px;
}
.contents-trigger {
  position: fixed;
  z-index: 10;
  left: 24px;
  top: 50%;
  transform: translateY(-50%);
  width: 56px;
  min-height: 64px;
  padding: 16px 10px;
  border: 0;
  border-radius: 4px;
  background: transparent;
  color: var(--ink);
}
.contents-rail {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-height: 40vh;
  overflow: hidden;
}
.contents-rail span {
  display: block;
  width: 24px;
  height: 2px;
  flex-shrink: 0;
  background: var(--line);
  transition:
    width 160ms ease,
    background-color 160ms ease;
}
.contents-rail .is-current {
  width: 34px;
  background: var(--ink);
}
.contents-trigger:hover .contents-rail span:not(.is-current) {
  background: var(--muted);
}
@media (prefers-reduced-motion: reduce) {
  .contents-rail span {
    transition: none;
  }
}
.contents-panel {
  position: fixed;
  inset: 50% auto auto 92px;
  transform: translateY(-50%);
  margin: 0;
  width: min(390px, calc(100vw - 108px));
  max-height: min(760px, calc(100dvh - 48px));
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 8px 28px #16140f14;
}
.contents-panel:popover-open {
  display: block;
}
.contents-heading {
  padding: 0 12px 16px;
  font: 600 12px var(--sans);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--muted);
}
.contents-panel a {
  display: flex;
  align-items: center;
  min-height: 48px;
  margin: 4px 0;
  padding: 12px;
  border-radius: 8px;
  font: 16px/1.45 var(--sans);
  text-decoration: none;
  color: var(--muted);
}
.contents-panel a:hover {
  background: #16140f08;
  color: var(--ink);
}
.contents-panel a[aria-current] {
  background: #16140f0d;
  color: var(--ink);
  font-weight: 600;
}
.contents-trigger:focus-visible,
.contents-panel a:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
@media (max-width: 1050px) {
  .contents-trigger {
    top: auto;
    left: auto;
    right: 18px;
    bottom: max(18px, env(safe-area-inset-bottom));
    transform: none;
    width: 48px;
    height: 48px;
    min-height: 48px;
    padding: 12px 8px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--paper);
  }
  .contents-rail {
    gap: 0;
    height: 24px;
    max-height: none;
    justify-content: space-between;
  }
  .contents-rail .is-current {
    width: 30px;
  }
  .contents-panel {
    inset: auto 18px max(78px, calc(env(safe-area-inset-bottom) + 60px)) auto;
    transform: none;
    width: min(390px, calc(100vw - 36px));
    max-height: calc(100dvh - 110px);
    padding: 18px;
  }
}
.article-language {
  display: flex;
  gap: 6px;
  align-items: center;
}
.article-language a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 10px;
}
.article-language a[aria-current] {
  background: #16140f0d;
  border-radius: 6px;
}
html[lang="zh-Hant"] .article-page h1 {
  font-size: clamp(32px, 4vw, 46px);
  line-height: 1.45;
}
html[lang="zh-Hant"] .article-page h2 {
  font-size: 28px;
  line-height: 1.5;
}
@media (max-width: 560px) {
  .article-language a {
    padding: 0 8px;
  }
}
.contents-panel:not(:popover-open) {
  display: none;
}

.language-switch,
.article-language {
  display: inline-flex;
  gap: 0;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.language-switch button,
.article-language a {
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding: 0 8px;
  font: 500 13px var(--sans);
  border-radius: 5px;
}

/* Reading rhythm: neutral paper, generous leading, and clear section breaks. */
body {
  font-size: 16px;
  line-height: 1.7;
}
header nav,
.saved-link {
  font-size: 15px;
}
.eyebrow,
.meta,
.column-heading h2,
.column-heading a,
.feature-copy .meta,
.card .meta,
.card-bottom,
.section-heading span {
  font-size: 13px;
}
.text-link,
.switch button,
.filters button,
.search input,
select {
  font-size: 15px;
}
.filters button {
  border-radius: 999px;
  padding-inline: 16px;
}
.editorial {
  margin-top: 48px;
}
.featured-story {
  gap: 44px;
}
.feature-copy h2 {
  font-size: clamp(28px, 2.8vw, 36px);
  font-weight: 500;
  line-height: 1.25;
  letter-spacing: -0.5px;
  margin: 16px 0;
}
.feature-copy p,
.card p {
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
}
.card h3 {
  font-size: 27px;
  line-height: 1.3;
  font-weight: 500;
  letter-spacing: -0.3px;
}
.card p {
  margin: 16px 0 24px;
}
.grid {
  padding-top: 32px;
  row-gap: 32px;
}
.library,
body[data-view="library"] .library {
  padding-top: 72px;
}
.section-heading {
  margin-bottom: 28px;
}
.section-heading h2 {
  font-size: 34px;
  font-weight: 500;
}
body[data-view="library"] .card {
  padding: 28px 0;
}
body[data-view="library"] .card h3 {
  font-size: 26px;
  line-height: 1.35;
}
.article-page {
  max-width: 760px;
  font-size: 18px;
  line-height: 1.75;
  margin-top: 72px;
}
.article-page h1 {
  font-size: clamp(36px, 4.2vw, 56px);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -1px;
  margin: 28px 0 40px;
}
.article-page h2 {
  font-family: var(--sans);
  font-size: 25px;
  font-weight: 600;
  line-height: 1.4;
  margin: 64px 0 20px;
}
.article-page h3 {
  font-size: 21px;
  line-height: 1.5;
  margin: 40px 0 16px;
}
.article-page p {
  margin: 0 0 28px;
}
.article-page li {
  margin-block: 10px;
}
.article-page pre {
  line-height: 1.7;
  margin: 28px 0;
}
.article-page a {
  color: var(--ink);
  text-decoration-color: #8d8a80;
}
.article-page a:hover {
  text-decoration-color: var(--ink);
}
.article-page .article-author p {
  margin: 0;
}
html[lang="zh-Hant"] .article-page {
  line-height: 1.9;
}
html[lang="zh-Hant"] .article-page h2 {
  font-size: 25px;
  line-height: 1.5;
}
html[lang="zh-Hant"] .feature-copy h2,
html[lang="zh-Hant"] .card h3 {
  line-height: 1.5;
}
@media (max-width: 800px) {
  .featured-story {
    gap: 28px;
  }
}
@media (max-width: 560px) {
  .feature-copy h2 {
    font-size: 29px;
  }
  .feature-copy p,
  .card p {
    font-size: 17px;
  }
  .card h3 {
    font-size: 27px;
  }
  .library,
  body[data-view="library"] .library {
    padding-top: 48px;
  }
  .filters button,
  .switch button {
    font-size: 14px;
    padding-inline: 10px;
  }
  .search-group {
    min-width: 0;
  }
  .search-group select {
    max-width: 120px;
  }
  .article-page {
    margin-top: 40px;
    font-size: 18px;
  }
  .article-page h1 {
    font-size: 34px;
    letter-spacing: -0.5px;
  }
  .article-page h2,
  html[lang="zh-Hant"] .article-page h2 {
    font-size: 24px;
    margin-top: 48px;
  }
  html[lang="zh-Hant"] .article-page h1 {
    font-size: 32px;
  }
  body[data-view="library"] .card h3 {
    font-size: 22px;
  }
}

/* Loose Markdown lists keep each marker beside its text. */
.article-body ul,
.article-body ol {
  padding-left: 1.5em;
  margin: 24px 0 28px;
}
.article-body li > p {
  margin: 0;
}

/* Keep reading navigation available and separate article sections quietly. */
.wrap > header {
  position: sticky;
  top: 0;
  z-index: 25;
  background: var(--paper);
}
.article-body h2 {
  border-top: 1px solid var(--line);
  padding-top: 32px;
  scroll-margin-top: 120px;
}
html {
  scroll-padding-top: 120px;
}
@media (max-width: 560px) {
  .article-body h2 {
    padding-top: 24px;
    scroll-margin-top: 100px;
  }
}
html:has(.editorial-page) {
  scroll-padding-top: 0;
}

/* A compact reading outline keeps long RFS titles usable on phones. */
.article-outline {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin: 24px 0 40px;
  font-size: 16px;
}
.article-outline th,
.article-outline td {
  border-bottom: 1px solid var(--line);
  padding: 8px 12px;
  text-align: left;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.article-outline th:first-child,
.article-outline td:first-child {
  width: 52px;
  padding-top: 18px;
  color: var(--muted);
}
.article-outline a {
  display: flex;
  align-items: center;
  min-height: 44px;
  color: var(--ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.article-outline-disclosure {
  margin: 48px 0;
  border-block: 1px solid var(--line);
}
.article-outline-disclosure summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  min-height: 64px;
  cursor: pointer;
  list-style: none;
}
.article-outline-disclosure summary::-webkit-details-marker {
  display: none;
}
.article-outline-disclosure summary::after {
  content: "+";
  font-size: 26px;
  font-weight: 400;
}
.article-outline-disclosure[open] summary::after {
  content: "−";
}
.article-body .article-outline-disclosure summary h2 {
  margin: 0;
  padding: 18px 0;
  border: 0;
  font-size: 24px;
}
.article-outline-disclosure summary:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 4px;
}
.article-outline-disclosure .article-outline {
  margin: 0 0 24px;
}

/* The AiFi Talk mark is the one logo in site chrome; the af butterfly is reserved for the favicon. */
.logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  line-height: 1;
}
footer .aifi-talk-wordmark {
  width: 104px;
}

/* One article surface, with the save control above the stretched title link. */
.card,
body[data-view="library"] .card {
  padding: 22px;
  border: 1px solid var(--line);
  background: var(--paper);
  isolation: isolate;
  transition:
    background-color 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
}
.grid .card::after {
  display: none;
}
.card-link::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
}
.card .bookmark {
  position: relative;
  z-index: 2;
  min-width: 44px;
  min-height: 44px;
}
.card:has(.card-link:focus-visible) {
  outline: 3px solid var(--orange);
  outline-offset: 4px;
}
.card .card-link:focus-visible {
  outline: none;
}
.card-art:hover img {
  transform: none;
}
body[data-view="library"] .card {
  margin-top: 16px;
}
@media (hover: hover) and (pointer: fine) {
  .card:hover {
    background: var(--paper-hover);
    border-color: var(--line-strong);
    transform: translateY(-3px);
  }
  .card:hover .card-link {
    color: var(--orange);
  }
}
@media (prefers-reduced-motion: reduce) {
  .card:hover {
    transform: none;
  }
}
@media (max-width: 560px) {
  .card,
  body[data-view="library"] .card {
    padding: 16px;
  }
}

/* Keep the original mark and complete the publication name with live text. */
.logo {
  gap: 3px;
  align-items: flex-start;
}
.card .card-art {
  grid-row: 1;
  margin-bottom: 20px;
}
.card h3 {
  grid-row: 2;
}
.card .meta {
  grid-row: 3;
  margin: 14px 0 0;
}
.card p {
  grid-row: 4;
  margin: 12px 0 20px;
}
.feature-copy .meta {
  margin-bottom: 14px;
}
body[data-view="library"] .card h3 {
  grid-row: 1;
}
body[data-view="library"] .card .meta {
  grid-row: 2;
  margin: 10px 0;
}
body[data-view="library"] .card p {
  grid-row: 3;
}
body[data-view="library"] .card-art {
  grid-row: 1 / 4;
  margin-bottom: 0;
}
@media (max-width: 560px) {
  .logo {
    gap: 3px;
  }
  body[data-view="library"] .card {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(5, auto);
  }
  body[data-view="library"] .card .card-art,
  body[data-view="library"] .card h3,
  body[data-view="library"] .card .meta,
  body[data-view="library"] .card p,
  body[data-view="library"] .card .card-bottom {
    grid-column: 1;
  }
  body[data-view="library"] .card-art {
    grid-row: 1;
    margin-bottom: 20px;
  }
  body[data-view="library"] .card h3 {
    grid-row: 2;
  }
  body[data-view="library"] .card .meta {
    grid-row: 3;
  }
  body[data-view="library"] .card p {
    grid-row: 4;
    display: block;
  }
  body[data-view="library"] .card-bottom {
    grid-row: 5;
  }
}

/* One header on every page: the AiFi Talk mark at 128px in a 96px bar. */
.aifi-talk-wordmark {
  display: block;
  width: 128px;
  height: auto;
}

/* Header: one row at every width. Wordmark left; navigation, Saved and language right.
   Every header holds three controls or fewer, so there is no menu toggle. */
.wrap > header {
  flex-wrap: nowrap;
  gap: 16px;
  transition: transform 180ms ease;
}
.identity {
  flex: 0 1 auto;
  min-width: 0;
}
header nav {
  flex: 0 0 auto;
  margin-left: auto;
  gap: 16px;
}
header nav > a,
header .saved-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  white-space: nowrap;
}
header > .language-switch {
  margin-left: 0;
}
/* Phone language control: one tap target; the current language reads darker. */
.language-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 2px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 4px;
  flex: none;
  font: 500 14px var(--sans);
  color: var(--muted);
  white-space: nowrap;
}
html[lang="en"] .language-toggle [lang="en"],
html[lang="zh-Hant"] .language-toggle [lang="zh-Hant"] {
  color: var(--ink);
  font-weight: 700;
}
.language-toggle:hover {
  color: var(--orange);
}
.language-switch button {
  min-width: 44px;
  min-height: 44px;
}
html {
  scroll-padding-top: 112px;
}
@media (max-width: 560px) {
  html {
    scroll-padding-top: 88px;
  }
  .wrap > header {
    gap: 8px;
    padding: 10px 0;
    min-height: 64px;
  }
  header .aifi-talk-wordmark {
    width: 88px;
  }
  header nav {
    gap: 4px;
    font-size: 14px;
  }
  header .saved-link {
    padding-left: 8px;
  }
  .wrap > header.header-hidden {
    transform: translateY(calc(-100% - 1px));
  }
  header .language-switch,
  header .article-language {
    display: none;
  }
  header .language-toggle {
    display: inline-flex;
  }
}
@media (max-width: 360px) {
  header .aifi-talk-wordmark {
    width: 76px;
  }
  header .logo {
    min-height: 44px;
    align-items: center;
  }
}

/* Public brand library shares the website's tokens and approved source artwork. */
.assets-footer-link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--muted);
}
.brand-assets {
  padding: 64px 0;
}
.brand-assets > h1 {
  font: 500 clamp(36px, 5vw, 64px) / 1.1 var(--serif);
  margin: 20px 0;
}
.brand-assets > p {
  max-width: 760px;
  line-height: 1.75;
}
.brand-downloads {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin: 48px 0;
}
.brand-download {
  border: 1px solid var(--line);
  padding: 24px;
  min-width: 0;
}
.brand-preview {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.brand-preview img {
  max-width: 100%;
  max-height: 150px;
  object-fit: contain;
}
.brand-download h2 {
  font: 500 26px var(--serif);
}
.brand-download p {
  color: var(--muted);
  line-height: 1.6;
}
.brand-download a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--orange);
}
.brand-palette {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 16px;
  margin: 24px 0 64px;
}
.brand-swatch {
  display: block;
  height: 72px;
  border: 1px solid var(--line);
  margin-bottom: 12px;
}
.brand-standard {
  max-width: 850px;
  line-height: 1.8;
  overflow-wrap: anywhere;
}
.brand-standard h2 {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font: 500 28px var(--serif);
}
.brand-standard li {
  margin-bottom: 12px;
}
.brand-standard ul {
  padding-left: 24px;
}
.brand-standard table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}
.brand-standard th,
.brand-standard td {
  padding: 10px 6px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
@media (max-width: 800px) {
  .brand-downloads {
    grid-template-columns: 1fr;
  }
  .brand-palette {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .brand-assets {
    padding: 36px 0;
  }
}
.brand-preview img {
  mix-blend-mode: multiply;
}
.brand-download:last-child .brand-preview img {
  width: 32px;
  height: 32px;
}

/* Notebook filters: one row of chips (All, each audience with posts, Saved) and a search field. */
.filters button {
  border: 1px solid var(--line);
}
.filters button[aria-pressed="true"] {
  border-color: var(--control);
}
.filters .saved-filter {
  display: inline-grid;
  place-items: center;
  min-width: 44px;
  padding-inline: 0;
}
.section-tools {
  display: flex;
  align-items: center;
  gap: 12px;
}
.search-toggle {
  display: none;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
}
.search-toggle[aria-expanded="true"] {
  border-color: var(--control);
}
.card-format {
  display: none;
}

/* Phone notebook: compact heading, chips on one row, search behind an icon, and articles as rows. */
@media (max-width: 560px) {
  .editorial {
    margin-top: 24px;
  }
  .featured-story {
    gap: 14px;
  }
  .feature-copy .meta {
    margin-bottom: 0;
  }
  .feature-copy h2,
  html[lang="zh-Hant"] .feature-copy h2 {
    font-size: 24px;
    line-height: 1.3;
    margin: 6px 0 8px;
  }
  html[lang="zh-Hant"] .feature-copy h2 {
    font-size: 22px;
    line-height: 1.5;
  }
  #featured-summary {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    overflow: hidden;
    margin: 0;
    font-size: 16px;
    line-height: 1.6;
  }
  #featured-link {
    display: none;
  }
  .library,
  body[data-view="library"] .library {
    padding-top: 36px;
  }
  .section-heading {
    align-items: center;
    margin-bottom: 12px;
  }
  .section-heading .eyebrow {
    display: none;
  }
  .section-heading h2 {
    font-size: 26px;
  }
  /* The chips already show what is listed; the count stays available to screen readers. */
  #result-count {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
  }
  .search-toggle {
    display: inline-grid;
  }
  .controls {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    padding: 10px 0;
  }
  .controls .switch {
    display: none;
  }
  .filters {
    flex-wrap: nowrap;
    gap: 6px;
    max-width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }
  .filters button {
    flex: none;
    padding-inline: 13px;
    font-size: 14px;
  }
  .filters .saved-filter {
    padding-inline: 0;
  }
  .search-group {
    display: none;
  }
  #library.search-open .search-group {
    display: flex;
    flex-basis: 100%;
  }
  #cards {
    display: block;
    padding-top: 0;
  }
  #cards .card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 104px;
    grid-template-rows: auto auto;
    column-gap: 14px;
    row-gap: 2px;
    margin: 0;
    padding: 16px 0 4px;
    border: 0;
    border-bottom: 1px solid var(--line);
    background: none;
  }
  #cards .card-art {
    grid-column: 2;
    grid-row: 1;
    width: 104px;
    margin: 4px 0 0;
    align-self: start;
  }
  #cards .card h3 {
    grid-column: 1;
    grid-row: 1;
    font-size: 19px;
    line-height: 1.32;
    letter-spacing: 0;
  }
  html[lang="zh-Hant"] #cards .card h3 {
    font-size: 18px;
    line-height: 1.55;
  }
  #cards .card .meta,
  #cards .card p {
    display: none;
  }
  #cards .card-bottom {
    grid-column: 1 / -1;
    grid-row: 2;
    min-height: 44px;
    margin-right: -10px;
  }
  .card-format {
    display: inline;
    color: var(--ink);
  }
}

/* Article reading aids: a progress line, the outline in the header on smaller screens, a series box, and a next-article card. */
.reading-progress {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: 3px;
  background: var(--orange);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
  pointer-events: none;
}
.article-page .article-series {
  display: block;
  margin: 48px 0 0;
  padding: 24px;
  border: 1px solid var(--line);
  font-size: 16px;
  line-height: 1.5;
}
.article-page .article-series .eyebrow {
  margin: 0 0 6px;
}
.article-page .article-series h2 {
  margin: 0 0 16px;
  padding: 0;
  border: 0;
  font-size: 22px;
}
.article-series ol {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}
.article-page .article-series li {
  margin: 0;
  border-bottom: 1px solid var(--line);
}
.article-page .article-series li > a,
.article-series li > [aria-current] {
  display: flex;
  gap: 14px;
  min-height: 44px;
  padding: 12px 0;
  color: var(--ink);
  text-decoration: none;
}
.article-page .article-series li > a:hover {
  color: var(--orange);
}
.article-series li > [aria-current] {
  color: var(--orange);
  font-weight: 500;
}
.series-part {
  flex: 0 0 24px;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.article-series-steps {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: 12px;
}
.article-page .article-series-steps a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  color: var(--orange);
  text-decoration: none;
}
.article-page .article-related .next-card {
  display: grid;
  gap: 12px;
  margin: 0 0 8px;
  padding: 20px;
  border: 1px solid var(--line);
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.2s ease, border-color 0.2s ease;
}
.next-label {
  font-size: 13px;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--muted);
}
.next-card img {
  aspect-ratio: 16 / 9;
  object-fit: contain;
  background: #fff;
}
.next-card strong {
  font: 500 24px/1.3 var(--serif);
}
.next-go {
  font-size: 15px;
  color: var(--orange);
}
@media (hover: hover) and (pointer: fine) {
  .article-page .article-related .next-card:hover {
    background: var(--paper-hover);
    border-color: var(--line-strong);
  }
}
@media (max-width: 560px) {
  .article-page .article-series,
  .article-page .article-related .next-card {
    padding: 16px;
  }
  .next-card strong {
    font-size: 21px;
  }
}

.article-body .newsletter {
  margin: 48px 0;
  padding: 28px 0;
  border-block: 1px solid var(--line);
  font-family: var(--sans);
}
.article-body .newsletter h3 {
  margin: 0 0 12px;
  font: 600 25px/1.3 var(--serif);
}
.article-body .newsletter p {
  margin: 0 0 18px;
  font-size: 16px;
  line-height: 1.6;
}
.newsletter-form label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
}
.newsletter-fields {
  display: flex;
  gap: 10px;
}
.newsletter-fields input {
  flex: 1;
  min-width: 0;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  padding: 12px;
  font: 16px var(--sans);
  border-radius: 0;
}
.newsletter-fields button {
  min-height: 48px;
  padding: 12px 22px;
  border: 1px solid var(--control);
  background: var(--control);
  color: var(--paper);
  font: 500 16px var(--sans);
  cursor: pointer;
}
.newsletter-fields :focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}
.newsletter-fields button:disabled {
  opacity: 0.65;
  cursor: wait;
}
.article-body .newsletter-status {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 14px;
  min-height: 23px;
}
.newsletter-trap {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
}
html[lang="zh-Hant"] .newsletter h3 {
  font-family: var(--sans);
}
@media (max-width: 560px) {
  .newsletter-fields {
    flex-direction: column;
  }
  .article-body .newsletter {
    margin: 36px 0;
  }
}
