/* Hallmark · shape: notebook (newest essay, six more, the three subjects as doors, the person) · genre: editorial · theme: custom (client system "Huyền Trần · Workaholic") · job: listen (a publication: read the newest essay) · idea: "Sổ tay của một CEO: bài mới nhất mở trang, mỗi bài là một cột chữ yên tĩnh" · vibe: "candid, hard-working, plainspoken, quietly premium"
 * paper: #FFFFFF surface-0 · well: #F4F6F8 mist-50 · accent: #EE6A1F orange-500, signal only · display: Be Vietnam Pro 700 · body: Be Vietnam Pro 400 · hero: the newest essay, its own photograph beside the title · nav: signature left, subjects and Hợp tác right · footer: navy band, the invitation over the logo and links · imagery: the posts' own photographs · signature: a post's photograph carried from its tile into the article, and Thầy Giản Tư Trung's line lighting up word by word
 * axes: light/grotesk-heavy/cool · posture: Restrained · contrast: pass · fold: pass · motion: design-taste-frontend layer (entrance, hover, press, one scroll moment) · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, a blog home argues quietly; Huyền's own words carry it instead of invented claims or counts */
/* Hallmark · waive 7b · surface-0 #FFFFFF and on-navy #FFFFFF are named in tokens.json · the client asked for a white page instead of the cream, and white text on navy is the designer's own */
/* Hallmark · waive 59 · space-7 is 96px in tokens.json · the section gap is the designer's largest spacing step, kept as given */
/* Hallmark · waive 78 · h2 is 28px in tokens.json · section heads follow the designer's type scale */
/* Hallmark · waive 49b · titles come from the 138 published posts · post titles are Huyền's own words; long ones wrap rather than being cut */

/* Base ------------------------------------------------------------------ */

*, *::before, *::after { box-sizing: border-box; }
html, body { overflow-x: clip; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: calc(var(--header-height) + var(--space-4)); scrollbar-color: var(--color-link-rest) var(--color-paper); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0;
  background: var(--color-paper);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  line-height: var(--text-body-line);
  font-synthesis: style; /* the brand ships no italic; let the browser slant for <em> */
  -webkit-font-smoothing: antialiased;
}
::selection { background: var(--color-well-cool); color: var(--color-heading); }
:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
a { color: inherit; }
a, button, summary, [role="button"] { touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
h1, h2, h3, h4, h5, h6 { margin: 0; font-family: var(--font-display); overflow-wrap: break-word; min-width: 0; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
img, video { max-width: 100%; height: auto; display: block; }
figure { margin: 0; }
button, input, select, textarea { font: inherit; }
.num { font-family: var(--font-mono); font-size: 0.95em; font-variant-numeric: tabular-nums; }
.icon { flex-shrink: 0; width: 1.125em; height: 1.125em; }
.visually-hidden, .screen-reader-text {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.container {
  width: 100%;
  max-width: calc(var(--container) + 2 * var(--gutter));
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--text { max-width: calc(var(--measure) + 2 * var(--gutter)); }
.container--wide { max-width: calc(960px + 2 * var(--gutter)); }

.skip-link {
  position: absolute;
  left: var(--space-3);
  top: var(--space-3);
  z-index: 600;
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
  font-weight: 600;
  transform: translateY(-200%);
}
.skip-link:focus { transform: none; }
.site-main:focus { outline: none; }

/* A link that covers its whole card or row; other links inside sit above it. */
.stretched::after { content: ""; position: absolute; inset: 0; z-index: 1; }

/* Links: one style. A line draws in from the left on hover and leaves to the right. ---- */

.link,
.section__more > span,
.lead__title a,
.tile__title a,
.row__title a,
.door__more > span,
.more-item__title,
.post-nav__title,
.breadcrumbs a,
.footer-nav__list a,
.social a,
.to-top > span,
.prose a:not([class]) {
  --ul: 1px;
  color: inherit;
  text-decoration: none;
  background-image: linear-gradient(currentColor, currentColor);
  background-repeat: no-repeat;
  background-position: 100% 100%;
  background-size: 0 var(--ul);
  transition: background-size var(--m-out) var(--ease), color var(--m-out) var(--ease);
}
.lead__title a, .tile__title a, .row__title a { --ul: 2px; }
.link:hover,
.section__more:hover > span,
.lead__title a:hover,
.tile:hover .tile__title a,
.row:hover .row__title a,
.door:hover .door__more > span,
.more-item__link:hover .more-item__title,
.post-nav__link:hover .post-nav__title,
.breadcrumbs a:hover,
.footer-nav__list a:hover,
.social a:hover,
.to-top:hover > span,
.prose a:not([class]):hover {
  background-position: 0 100%;
  background-size: 100% var(--ul);
  transition-duration: var(--m-in);
}
.link { color: var(--color-link); font-weight: 600; }
.link:hover { color: var(--color-heading); }

/* Running text: links are orange on a 2px orange line; on hover the line fills navy. */
.prose a:not([class]) {
  --ul: 2px;
  color: var(--color-accent-ink);
  font-weight: 600;
  background-image: linear-gradient(var(--color-heading), var(--color-heading)), linear-gradient(var(--color-accent), var(--color-accent));
  background-position: 100% 100%, 0 100%;
  background-size: 0 2px, 100% 2px;
}
.prose a:not([class]):hover { color: var(--color-heading); background-position: 0 100%, 0 100%; background-size: 100% 2px, 100% 2px; }

/* Labels and meta ------------------------------------------------------- */

.eyebrow {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
  font-weight: 600;
  color: var(--color-accent-ink);
  text-decoration: none;
  transition: color var(--m-out) var(--ease);
}
a.eyebrow:hover { color: var(--color-heading); transition-duration: var(--m-in); }
.lead__kicker .eyebrow::before,
.post-header__kicker .eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  margin-right: var(--space-2);
  border-radius: 2px;
  background: var(--color-accent);
  transform-origin: 0 50%;
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-1) var(--space-3);
  font-family: var(--font-mono);
  font-size: var(--text-mono-size);
  line-height: 1.6;
  letter-spacing: -0.01em;
  color: var(--color-muted);
}

/* Buttons: step up 1px on hover, sink and give a little on press. ------------------ */

.btn,
.wpcf7-submit,
.comment-form .submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  min-height: 48px;
  padding-inline: var(--space-4);
  border: 1px solid transparent;
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: var(--text-body-size);
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  cursor: pointer;
  appearance: none;
  transition: background-color var(--m-out) var(--ease), color var(--m-out) var(--ease), border-color var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.btn .icon { width: 18px; height: 18px; transition: transform var(--m-out) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .btn:hover, .wpcf7-submit:hover, .comment-form .submit:hover { transform: translateY(-1px); transition-duration: var(--m-in); }
  .btn:hover .icon--arrow-right { transform: translateX(3px); transition-duration: var(--m-in); }
}
.btn:active, .wpcf7-submit:active, .comment-form .submit:active { transform: translateY(1px) scale(0.985); transition-duration: var(--m-press); }
.btn:disabled, .btn[aria-disabled="true"], .wpcf7-submit:disabled { opacity: 0.55; cursor: not-allowed; transform: none; }
.btn-sm { min-height: 40px; padding-inline: var(--space-3); }
@media (pointer: coarse) { .btn-sm { min-height: 44px; } }

.btn-primary, .wpcf7-submit, .comment-form .submit { background: var(--color-primary); color: var(--color-on-primary); }
.btn-primary:hover, .wpcf7-submit:hover, .comment-form .submit:hover { background: var(--color-primary-hover); box-shadow: 0 10px 24px -14px var(--color-shadow-deep); }
.btn-outline { background: transparent; border-color: var(--color-primary); color: var(--color-primary); }
.btn-outline:hover { background: var(--color-well-cool); }
.btn-light { background: var(--color-surface); color: var(--color-primary); }
.btn-light:hover { background: var(--color-well-cool); box-shadow: 0 10px 24px -14px var(--color-shadow-deep); }

/* Round icon buttons (share, lightbox) */
.icon-btn {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-heading);
  cursor: pointer;
  transition: border-color var(--m-out) var(--ease), background-color var(--m-out) var(--ease), color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.icon-btn .icon { width: 18px; height: 18px; transition: opacity 160ms var(--ease), transform 160ms var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .icon-btn:hover { border-color: var(--color-heading); background: var(--color-well); transform: translateY(-1px); transition-duration: var(--m-in); }
}
.icon-btn:active { transform: translateY(1px) scale(0.96); transition-duration: var(--m-press); }
.icon-btn--swap .icon-swap__b { position: absolute; color: var(--color-accent-ink); }
.js .icon-btn--swap .icon-swap__b { opacity: 0; transform: scale(0.6); }
.no-js [data-copy-link], .no-js [data-native-share] { display: none; }
.icon-btn--swap.is-done { border-color: var(--color-accent); }
.icon-btn--swap.is-done .icon-swap__a { opacity: 0; transform: scale(0.6); }
.js .icon-btn--swap.is-done .icon-swap__b { opacity: 1; transform: none; }

/* Header ---------------------------------------------------------------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 300;
  background: var(--color-paper);
  border-bottom: 1px solid transparent;
  transition: border-color var(--m-panel) var(--ease), box-shadow var(--m-panel) var(--ease);
  view-transition-name: site-header;
}
.site-header.is-scrolled { border-bottom-color: var(--color-rule); box-shadow: 0 6px 24px -20px var(--color-shadow-deep); }
@media (min-width: 783px) { .admin-bar .site-header { top: 32px; } }

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  min-height: var(--header-height);
}
.brand { display: block; flex-shrink: 0; transition: opacity var(--m-out) var(--ease); }
.brand:hover { opacity: 0.8; }
.brand img { width: auto; height: 46px; }

.site-nav { display: flex; align-items: center; gap: var(--space-5); }
.site-nav__list { display: flex; gap: var(--space-4); margin: 0; padding: 0; list-style: none; }
.site-nav__list a {
  position: relative;
  display: block;
  padding-block: var(--space-2);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--m-out) var(--ease);
}
.site-nav__list a::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 2px;
  height: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform var(--m-out) var(--ease);
}
.site-nav__list a:hover { color: var(--color-heading); transition-duration: var(--m-in); }
.site-nav__list a:hover::after { transform: scaleX(1); transform-origin: 0 50%; transition-duration: var(--m-slide); }
.site-nav__list .current-menu-item > a,
.site-nav__list .current-menu-ancestor > a,
.site-nav__list .current-post-ancestor > a { color: var(--color-heading); }
.site-nav__list .current-menu-item > a::after,
.site-nav__list .current-menu-ancestor > a::after,
.site-nav__list .current-post-ancestor > a::after { transform: scaleX(1); }

.site-nav__actions { display: flex; align-items: center; gap: var(--space-4); }
.site-nav__search {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--color-muted);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--m-out) var(--ease);
}
.site-nav__search .icon { transition: transform var(--m-out) var(--ease); }
.site-nav__search:hover { color: var(--color-heading); }
.site-nav__search:hover .icon { transform: scale(1.12); }

.read-progress { position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; pointer-events: none; }
.read-progress span { display: block; height: 100%; background: var(--color-accent); transform: scaleX(var(--progress, 0)); transform-origin: 0 50%; }

.nav-toggle { display: none; }

@media (max-width: 60rem) {
  .brand img { height: 40px; }
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    min-height: 44px;
    padding-inline: var(--space-3);
    border: 1px solid var(--color-primary);
    border-radius: var(--radius-md);
    background: transparent;
    color: var(--color-primary);
    font-weight: 600;
    cursor: pointer;
    transition: background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
  }
  .nav-toggle:active { transform: scale(0.97); }
  .nav-toggle[aria-expanded="true"] { background: var(--color-well-cool); }
  .nav-toggle__bars { position: relative; width: 18px; height: 12px; }
  .nav-toggle__bars span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    border-radius: 2px;
    background: currentColor;
    transition: transform var(--m-slide) var(--ease);
  }
  .nav-toggle__bars span:first-child { top: 1px; }
  .nav-toggle__bars span:last-child { bottom: 1px; }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-toggle[aria-expanded="true"] .nav-toggle__bars span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .no-js .nav-toggle { display: none; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: var(--space-4);
    padding: var(--space-2) var(--gutter) var(--space-5);
    background: var(--color-paper);
    border-bottom: 1px solid var(--color-rule);
    box-shadow: 0 24px 40px -32px var(--color-shadow-deep);
  }
  .js .site-nav {
    visibility: hidden;
    opacity: 0;
    transform: translateY(-6px);
    transition: opacity var(--m-out) var(--ease), transform var(--m-out) var(--ease), visibility 0s linear var(--m-out);
  }
  .js .site-header.is-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity var(--m-panel) var(--ease), transform var(--m-panel) var(--ease), visibility 0s;
  }
  .js .site-header.is-open .site-nav__list li { animation: hl-fade-up 320ms var(--ease-enter) both; }
  .js .site-header.is-open .site-nav__list li:nth-child(2) { animation-delay: 40ms; }
  .js .site-header.is-open .site-nav__list li:nth-child(3) { animation-delay: 80ms; }
  .js .site-header.is-open .site-nav__list li:nth-child(4) { animation-delay: 120ms; }
  .js .site-header.is-open .site-nav__list li:nth-child(n+5) { animation-delay: 160ms; }
  .no-js .site-header__inner { flex-wrap: wrap; }
  .no-js .site-nav { position: static; width: 100%; padding-inline: 0; border-bottom: 0; box-shadow: none; }

  .site-nav__list { flex-direction: column; gap: 0; }
  .site-nav__list a { padding-block: var(--space-3); border-bottom: 1px solid var(--color-rule); font-size: var(--text-body-article-size); }
  .site-nav__list a::after { bottom: -1px; }
  .site-nav__actions { justify-content: space-between; }
}

/* Sections -------------------------------------------------------------- */

.site-main { display: block; }
.section { margin-top: var(--section-gap); }
/* Bands: full-width grounds that alternate down the page (white, mist, sky), touching when adjacent. */
.band { margin-top: var(--section-gap); padding-block: var(--section-gap); background: var(--color-well); }
.band--sky { background: var(--color-well-cool); }
.band--paper { background: var(--color-paper); }
.band + .band { margin-top: 0; }
.band + .section { margin-top: var(--section-gap); }
.band--head { margin-top: 0; padding-block: var(--space-5) var(--space-6); }
.band--head .archive-header { padding-block: 0; } /* the band carries the vertical space; the container keeps its gutters */
.band--head + .container { margin-top: var(--space-5); }
.band .section__head { margin-bottom: var(--space-5); }
.section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  margin-bottom: var(--space-5);
}
.section__title {
  max-width: 30ch;
  font-size: var(--text-h2-size);
  line-height: var(--text-h2-line);
  font-weight: 700;
  color: var(--color-heading);
}
.section__title::after {
  content: "";
  display: block;
  width: 40px;
  height: 4px;
  margin-top: var(--space-2);
  border-radius: var(--radius-full);
  background: var(--color-accent);
}
.section__more {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  color: var(--color-link);
  font-weight: 600;
  text-decoration: none;
  transition: color var(--m-out) var(--ease);
}
.section__more .icon { width: 18px; height: 18px; transition: transform var(--m-out) var(--ease); }
.section__more:hover { color: var(--color-heading); }
.section__more:hover .icon { transform: translateX(3px); transition-duration: var(--m-in); }

/* Picture frames: the photograph grows a touch inside its frame, never the frame itself. */

.frame { display: block; overflow: hidden; border-radius: var(--radius-md); background: var(--color-well); }
.frame img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--m-image-out) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  a.frame:hover img,
  .tile:hover .frame img,
  .row:hover .frame img,
  .door:hover .frame img { transform: scale(1.03); transition-duration: var(--m-image); }
}

/* Lead: the newest essay ------------------------------------------------ */

.lead {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-6);
  align-items: center;
  padding-top: var(--space-6);
}
.lead__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.lead__title {
  max-width: 18ch;
  font-size: var(--text-display-size);
  line-height: var(--text-display-line);
  letter-spacing: var(--text-display-tracking);
  font-weight: 700;
  color: var(--color-heading);
}
.lead__title--long {
  max-width: 22ch;
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  letter-spacing: var(--text-h1-tracking);
}
.lead__excerpt {
  max-width: 46ch;
  font-size: var(--text-body-article-size);
  line-height: var(--text-body-article-line);
}
.lead .btn { margin-top: var(--space-2); }
.lead__media { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }

@media (max-width: 60rem) {
  .lead { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); padding-top: var(--space-4); }
  .lead__media { order: -1; aspect-ratio: 3 / 2; }
}

/* Tiles ----------------------------------------------------------------- */

.tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-6) var(--space-5); }
.tile { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.tile__media { width: 100%; aspect-ratio: 16 / 9; }
.tile > .marks { align-self: stretch; margin-bottom: var(--space-2); }
.tile__placeholder { display: grid; place-items: center; width: 100%; height: 100%; }
.tile__placeholder img { width: 64px; height: 64px; }
.tile__title { font-size: var(--text-h3-size); line-height: var(--text-h3-line); font-weight: 600; color: var(--color-heading); }
/* The label and the data line sit above the tile's stretched link, so their text is painted on top; clicks still fall through to the link. */
.tile .eyebrow, .tile .meta, .index__body .index__excerpt, .index__body .meta { position: relative; z-index: 1; pointer-events: none; }
/* Two lines at most; a longer title ends in an ellipsis (the whole tile still links to it). */
.tile__title { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; text-wrap: pretty; }

@media (max-width: 60rem) { .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 40rem) { .tiles { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); } }

/* Doors: the three subjects --------------------------------------------- */

.doors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--space-4); }
.door {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  transition: transform var(--m-out) var(--ease), border-color var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.door__media { aspect-ratio: 16 / 10; border-radius: 0; }
.door__body { display: flex; flex: 1; flex-direction: column; align-items: flex-start; gap: var(--space-2); padding: var(--space-4); }
.door__name { font-size: var(--text-h2-size); line-height: var(--text-h2-line); font-weight: 700; color: var(--color-heading); }
.door__name a { color: inherit; text-decoration: none; }
.door__desc { color: var(--color-muted); }
.door__more { display: inline-flex; align-items: center; gap: var(--space-2); margin-top: auto; padding-top: var(--space-2); color: var(--color-link); font-weight: 600; }
.door__more .icon { width: 18px; height: 18px; transition: transform var(--m-out) var(--ease); }
@media (hover: hover) and (pointer: fine) {
  .door:hover { transform: translateY(-2px); border-color: var(--color-link-rest); box-shadow: 0 24px 48px -32px var(--color-shadow-deep); transition-duration: 180ms; }
  .door:hover .door__more .icon { transform: translateX(3px); transition-duration: var(--m-in); }
}
.door:has(:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.door :focus-visible { outline: none; }

@media (max-width: 60rem) { .doors { grid-template-columns: minmax(0, 1fr); } .door { flex-direction: row; } .door__media { flex: 0 0 38%; aspect-ratio: auto; } }
@media (max-width: 40rem) { .door { flex-direction: column; } .door__media { flex: none; aspect-ratio: 16 / 9; } }

/* The person behind ----------------------------------------------------- */

.person {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: var(--space-6);
  align-items: center;
}
.person__media { display: grid; place-items: center; aspect-ratio: 4 / 5; border-radius: var(--radius-lg); }
.person__photo { width: 100%; height: 100%; object-fit: cover; }
.person__media--mark { justify-self: center; width: min(100%, 300px); aspect-ratio: 1; background: transparent; }
.person__monogram { width: 100%; height: 100%; border-radius: var(--radius-lg); }
.person__media--mark img { object-fit: cover; }
.person__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.person__bio { max-width: 56ch; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); }
.person__quote blockquote { margin: 0; }
.person__quote blockquote::before {
  content: "“";
  display: block;
  height: 0.55em;
  font-size: 4rem;
  line-height: 1;
  font-weight: 700;
  color: var(--color-accent);
}
.person__quote p { max-width: 36ch; font-size: var(--text-h2-size); line-height: var(--text-h2-line); font-weight: 600; color: var(--color-heading); }
.person__quote figcaption { margin-top: var(--space-3); font-size: var(--text-small-size); color: var(--color-muted); }
/* The quotation as SVG text: each line's outline is traced, then the letters fill in. */
.person__quote { align-self: stretch; }
.quote-svg { display: block; width: 100%; height: auto; overflow: visible; font-family: var(--font-display); font-weight: 700; letter-spacing: -0.01em; }
.quote-svg__line { fill: var(--color-heading); stroke: var(--color-heading); stroke-width: 1; stroke-linejoin: round; paint-order: stroke fill; }
.js [data-svg-quote] .quote-svg__line { fill-opacity: 0; stroke-dasharray: 340; stroke-dashoffset: 340; }
.js [data-svg-quote].is-drawn .quote-svg__line {
  animation: hl-quote-draw 1.6s var(--ease-io) both, hl-quote-fill 600ms var(--ease) both;
  animation-delay: calc(var(--i, 0) * 240ms), calc(var(--i, 0) * 240ms + 1s);
}
@keyframes hl-quote-draw { to { stroke-dashoffset: 0; } }
@keyframes hl-quote-fill { to { fill-opacity: 1; } }
/* The scroll moment: words light up as the line passes through the screen (site.js arms it). */
.hl-armed .hw { color: var(--color-dim); transition: color 260ms var(--ease); }
.hl-armed .hw.is-lit { color: var(--color-heading); }

@media (max-width: 60rem) {
  .person { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); }
  .person__media { width: min(100%, 280px); }
}

/* Lists of posts -------------------------------------------------------- */

.archive-header {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: var(--space-3);
  padding-top: var(--space-6);
  padding-bottom: var(--space-5);
}
.eyebrow--static { margin: 0; }
.band--sky .eyebrow { color: var(--color-link); } /* muted ink reads 4.4:1 on sky; navy-600 clears 4.5 */
.archive-title {
  max-width: 20ch;
  font-size: var(--text-display-size);
  line-height: var(--text-display-line);
  letter-spacing: var(--text-display-tracking);
  font-weight: 700;
  color: var(--color-heading);
}
.archive-count, .archive-desc { max-width: 60ch; color: var(--color-muted); }
.archive-search { width: 100%; max-width: 32rem; }

.rows { border-top: 1px solid var(--color-rule); }
.row {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: var(--space-5);
  align-items: start;
  padding-block: var(--space-5);
  border-bottom: 1px solid var(--color-rule);
}
.row__media { aspect-ratio: 16 / 9; }
.row__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); max-width: 62ch; }
.category .row .eyebrow { display: none; }
.row__title { font-size: var(--text-h2-size); line-height: var(--text-h2-line); font-weight: 700; color: var(--color-heading); }

@media (max-width: 40rem) {
  .row { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
}

.pagination { margin-top: var(--space-5); }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
a.page-numbers:hover { border-color: var(--color-primary); transform: translateY(-1px); transition-duration: var(--m-in); }
a.page-numbers:active { transform: translateY(1px) scale(0.985); }
.page-numbers.current { background: var(--color-primary); border-color: var(--color-primary); color: var(--color-on-primary); }
.page-numbers.dots { border-color: transparent; background: none; }

.empty { max-width: 60ch; padding-block: var(--space-5); }

/* Forms ----------------------------------------------------------------- */

.search-form { display: flex; gap: var(--space-2); width: 100%; max-width: 32rem; margin-top: var(--space-3); }

:where(.search-form, .wpcf7, .comment-form) :is(input[type="text"], input[type="email"], input[type="url"], input[type="tel"], input[type="search"], textarea, select) {
  width: 100%;
  min-width: 0;
  min-height: 48px;
  padding: calc(var(--space-2) + var(--space-1)) var(--space-3);
  border: 1px solid var(--color-field-edge);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-body-size);
  font-weight: 400;
  line-height: 1.5;
  transition: border-color 140ms var(--ease), box-shadow 140ms var(--ease);
}
:where(.search-form, .wpcf7, .comment-form) :is(input, textarea, select):focus { box-shadow: 0 0 0 4px var(--color-well-cool); }
:where(.search-form, .wpcf7, .comment-form) :is(input, textarea, select):focus-visible { outline: 2px solid var(--color-focus); outline-offset: -2px; }
:where(.wpcf7, .comment-form) textarea { min-height: 168px; resize: vertical; }
:where(.wpcf7, .comment-form) ::placeholder { color: var(--color-muted); opacity: 1; }

.prose--form .wpcf7 {
  margin-top: var(--space-5);
  padding: var(--space-5);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
}
.wpcf7 form > p { margin: 0 0 var(--space-4); }
.wpcf7 label, .comment-form label {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  font-size: var(--text-body-size);
  font-weight: 600;
  color: var(--color-heading);
}
.wpcf7 label { display: block; }
.wpcf7-form-control-wrap { display: block; margin-top: var(--space-2); }
.wpcf7-list-item .wpcf7-form-control-wrap { margin: 0; }
.wpcf7-not-valid { border-color: var(--color-accent-ink) !important; }
.wpcf7-not-valid-tip { display: block; margin-top: var(--space-1); color: var(--color-accent-ink); font-size: var(--text-small-size); font-weight: 600; }
.js .wpcf7 form:not(.invalid) .wpcf7-form-control-wrap:not(.is-touched) .wpcf7-not-valid-tip { display: none; }
.js .wpcf7 form:not(.invalid) .wpcf7-form-control-wrap:not(.is-touched) .wpcf7-not-valid { border-color: var(--color-field-edge) !important; }
.wpcf7 form .wpcf7-response-output {
  margin: var(--space-4) 0 0;
  padding: var(--space-3);
  border: 1px solid var(--color-field-edge);
  border-radius: var(--radius-sm);
  font-size: var(--text-small-size);
  animation: hl-fade-up 320ms var(--ease-enter) both;
}
.wpcf7 form.invalid .wpcf7-response-output,
.wpcf7 form.unaccepted .wpcf7-response-output,
.wpcf7 form.failed .wpcf7-response-output,
.wpcf7 form.spam .wpcf7-response-output { border-color: var(--color-accent-ink); color: var(--color-accent-ink); }
.wpcf7 form.sent .wpcf7-response-output { border-color: var(--color-primary); background: var(--color-well-cool); color: var(--color-primary); }

/* Article: header, picture, the column, its margins ------------------------------- */

.article-header, .post-header { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); padding-top: var(--space-5); }
.article-header { padding-top: var(--space-6); }
.article-title {
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  letter-spacing: var(--text-h1-tracking);
  font-weight: 700;
  color: var(--color-heading);
}
.post-header .article-title { font-size: clamp(2.125rem, 1.5rem + 2.2vw, 3rem); line-height: 1.12; letter-spacing: var(--text-display-tracking); }

.breadcrumbs { font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--color-muted); }
.breadcrumbs ol { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-1) var(--space-2); margin: 0; padding: 0; list-style: none; }
.breadcrumbs li { display: inline-flex; align-items: center; gap: var(--space-2); min-width: 0; }
.breadcrumbs li + li::before { content: "/"; color: var(--color-link-rest); }
.breadcrumbs a { transition: color var(--m-out) var(--ease), background-size var(--m-out) var(--ease); }
.breadcrumbs a:hover { color: var(--color-heading); }
.breadcrumbs [aria-current] { max-width: 28ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--color-ink); }
@media (max-width: 40rem) { .breadcrumbs li:last-child { display: none; } }

.article-figure, .post-figure { margin-top: var(--space-5); }
.article-figure img { width: 100%; border-radius: var(--radius-lg); }
.post-figure__frame { border-radius: var(--radius-lg); }
.post-figure__frame img { height: auto; max-height: 72vh; }
.article-figure figcaption, .post-figure figcaption { margin-top: var(--space-2); font-size: var(--text-small-size); color: var(--color-muted); }

/* The reading layout: one column of text; on wide screens a rail on the left and an aside on the right.
   Below 75rem the aside's blocks join the single column (display: contents): contents first, text, then more. */
.post-body { display: grid; grid-template-columns: minmax(0, 1fr); margin-top: var(--space-6); }
.post-main { grid-row: 2; width: 100%; max-width: var(--measure); min-width: 0; margin-inline: auto; }
.post-rail { display: none; }
.post-aside { display: contents; }

.post-toc {
  grid-row: 1;
  width: 100%;
  max-width: var(--measure);
  margin: 0 auto var(--space-5);
  padding: var(--space-3) var(--space-4);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-md);
}
.post-more { grid-row: 3; width: 100%; max-width: var(--measure); margin: var(--space-6) auto 0; }
.aside-title { margin-bottom: var(--space-2); font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 600; color: var(--color-heading); }
.aside-more { display: inline-block; margin-top: var(--space-3); font-size: var(--text-small-size); }
.toc { display: flex; flex-direction: column; margin: 0; padding: 0; list-style: none; }
.toc a {
  position: relative;
  display: block;
  padding-block: var(--space-1);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
  color: var(--color-muted);
  text-decoration: none;
  transition: color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.toc__item--h3 a { padding-left: var(--space-3); }
.toc a::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-3) - 1px);
  top: var(--space-1);
  bottom: var(--space-1);
  width: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform var(--m-slide) var(--ease);
}
.toc a:hover { color: var(--color-heading); transform: translateX(2px); transition-duration: var(--m-in); }
.toc a[aria-current="true"] { color: var(--color-heading); font-weight: 600; }
.toc a[aria-current="true"]::before { transform: scaleY(1); }

@media (min-width: 75rem) {
  /* A wider stage for reading: the share rail stands clear at the far left, the text keeps its
     720px measure, and the aside on the right gets the rest. */
  .post-body {
    max-width: calc(1320px + 2 * var(--gutter));
    grid-template-columns: minmax(96px, 0.6fr) minmax(0, var(--measure)) minmax(0, 1fr);
    column-gap: var(--space-6);
    align-items: start;
  }
  .post-main { grid-column: 2; grid-row: 1; max-width: none; margin: 0; }
  .post-rail { display: block; grid-column: 1; grid-row: 1; justify-self: end; position: sticky; top: calc(var(--header-height) + var(--space-5)); }
  .post-aside {
    display: flex;
    flex-direction: column;
    gap: var(--space-5);
    grid-column: 3;
    grid-row: 1;
    position: sticky;
    top: calc(var(--header-height) + var(--space-5));
    max-width: 320px;
    max-height: calc(100vh - var(--header-height) - var(--space-6));
    padding-left: var(--space-4);
    overflow-y: auto;
    border-left: 1px solid var(--color-rule);
    scrollbar-width: thin;
  }
  .post-toc, .post-more { grid-row: auto; max-width: none; margin: 0; padding: 0; border: 0; border-radius: 0; }
  .toc a, .more-item__title { font-size: var(--text-body-size); line-height: var(--text-body-line); }
  /* Centred pictures step out of the text column by 96px on each side. */
  .post-body .prose > :is(figure, .wp-caption).aligncenter,
  .post-body .prose > figure:not([class*="align"]),
  .post-body .prose > p:has(> img.aligncenter:only-child),
  .post-body .prose > p:has(> img.alignnone:only-child) { width: calc(100% + 2 * var(--space-7)); max-width: none !important; margin-left: calc(-1 * var(--space-7)); }
  .post-body .prose > p:has(> img:only-child) > img { width: 100%; }
}

/* Share tools */
.share-tools { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2); }
.share-tools--rail { flex-direction: column; }
.share-status { font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--color-accent-ink); font-weight: 600; }
.share-status:empty { display: none; }
.share-tools--rail .share-status {
  position: absolute;
  left: calc(100% + var(--space-2));
  top: 50%;
  padding: var(--space-1) var(--space-2);
  border-radius: var(--radius-sm);
  background: var(--color-primary);
  color: var(--color-on-primary);
  white-space: nowrap;
  transform: translateY(-50%);
  animation: hl-fade-up 200ms var(--ease-enter) both;
}

/* The text itself: set a step larger than the body, with bold, links and quotes that stand out. */
.prose {
  font-size: clamp(1.125rem, 1.05rem + 0.3vw, 1.1875rem);
  line-height: 1.7;
  color: var(--color-ink);
}
.article .prose { margin-top: var(--space-5); }
.prose::after { content: ""; display: table; clear: both; }
.prose > * + * { margin-top: var(--space-4); }
.prose > :first-child { margin-top: 0; }
.prose p { max-width: none; }
.post-body .prose > p:first-child { font-size: 1.3125rem; line-height: 1.6; color: var(--color-heading); }
.prose h2 { margin-top: var(--space-7); padding-top: var(--space-5); border-top: 1px solid var(--color-rule); font-size: clamp(1.875rem, 1.55rem + 1.1vw, 2.25rem); line-height: 1.2; letter-spacing: -0.01em; color: var(--color-heading); }
.prose h2::before { content: ""; display: block; width: 40px; height: 4px; margin-bottom: var(--space-3); border-radius: 2px; background: var(--color-accent); transform-origin: 0 50%; }
.prose h2:target::before { animation: hl-line 700ms var(--ease-enter) both; }
.prose h3 { display: flex; align-items: baseline; gap: var(--space-2); margin-top: var(--space-6); font-size: 1.5rem; line-height: 1.3; color: var(--color-heading); }
.prose h3::before { content: ""; flex-shrink: 0; align-self: center; width: 16px; height: 3px; border-radius: 2px; background: var(--color-accent); }
.prose h4, .prose h5, .prose h6 { margin-top: var(--space-5); font-size: 1.1875rem; font-weight: 700; color: var(--color-heading); }
.prose strong, .prose b {
  font-weight: 700;
  color: var(--color-heading);
  background-image: linear-gradient(var(--color-mark), var(--color-mark));
  background-repeat: no-repeat;
  background-size: 100% 0.45em;
  background-position: 0 88%;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}
.prose em { color: var(--color-heading); }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: var(--space-2); }
.prose li::marker { color: var(--color-accent-ink); font-weight: 700; }
.prose ol > li::marker { font-family: var(--font-mono); font-size: 0.9em; }
.prose blockquote {
  position: relative;
  margin-inline: 0;
  padding: var(--space-5) var(--space-5) var(--space-5) var(--space-6);
  border-left: 4px solid var(--color-accent);
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  background: var(--color-well-cool);
  color: var(--color-heading);
  font-size: 1.3125rem;
  line-height: 1.5;
  font-weight: 600;
}
.prose blockquote::before {
  content: "“";
  position: absolute;
  left: var(--space-3);
  top: var(--space-2);
  font-size: 3.5rem;
  line-height: 1;
  font-weight: 700;
  color: var(--color-accent);
}
.prose blockquote > * + * { margin-top: var(--space-3); }
.prose blockquote cite, .prose blockquote footer { display: block; font-size: var(--text-small-size); font-weight: 400; font-style: normal; color: var(--color-muted); }
.prose blockquote strong { background: none; }
.prose img { border-radius: var(--radius-md); }
.prose mark { background: var(--color-mark); color: inherit; border-radius: 2px; }
.prose img.is-zoomable { cursor: zoom-in; }
.prose .alignleft { float: left; max-width: 50%; margin: var(--space-2) var(--space-4) var(--space-3) 0; }
.prose .alignright { float: right; max-width: 50%; margin: var(--space-2) 0 var(--space-3) var(--space-4); }
.prose .aligncenter { display: block; margin-inline: auto; }
.prose .wp-caption { max-width: 100% !important; }
.prose .wp-caption.alignleft, .prose .wp-caption.alignright { max-width: 50% !important; }
.prose .wp-caption-text, .prose figcaption { margin-top: var(--space-2); padding-left: var(--space-3); border-left: 2px solid var(--color-accent); font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--color-muted); }
.prose iframe, .prose video, .prose embed { max-width: 100%; }
.prose iframe { width: 100%; height: auto; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius-sm); }
.prose .jeg_video_container, .prose .jeg_video_content { position: static !important; height: auto !important; padding: 0 !important; }
.prose .jeg_video_container iframe { position: static !important; }
.prose hr { width: 64px; margin: var(--space-6) auto; border: 0; border-top: 3px solid var(--color-accent); border-radius: 2px; }
.prose table { width: 100%; border-collapse: collapse; font-size: var(--text-body-size); font-variant-numeric: tabular-nums; }
.prose th, .prose td { padding: var(--space-2) var(--space-3); border-bottom: 1px solid var(--color-rule); text-align: left; vertical-align: top; }
.prose th { font-weight: 600; color: var(--color-heading); border-bottom: 2px solid var(--color-heading); }
.prose tbody tr:nth-child(even) { background: var(--color-well); }
.prose td.is-num { text-align: right; font-family: var(--font-mono); font-size: var(--text-mono-size); white-space: nowrap; }
.prose pre { overflow-x: auto; padding: var(--space-3); border-radius: var(--radius-sm); background: var(--color-well); font-family: var(--font-mono); font-size: var(--text-mono-size); line-height: 1.7; }
.prose code { padding: 0.1em 0.35em; border-radius: 4px; background: var(--color-well); font-family: var(--font-mono); font-size: 0.88em; }
.prose pre code { padding: 0; background: none; font-size: inherit; }
.prose .pullquote, .prose .wp-block-pullquote {
  padding-block: var(--space-4);
  border-block: 1px solid var(--color-rule);
  font-size: var(--text-h3-size);
  line-height: var(--text-h3-line);
  font-weight: 600;
  color: var(--color-heading);
}
.prose .gallery { display: grid; grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr)); gap: var(--space-2); }
.prose .gallery-columns-2 { --cols: 2; }
.prose .gallery-columns-4 { --cols: 4; }
.prose .gallery br { display: none; }
.prose .gallery-item { margin: 0; }
.prose .gallery img { width: 100%; aspect-ratio: 1; object-fit: cover; }

@media (max-width: 40rem) {
  .prose .alignleft, .prose .alignright, .prose .wp-caption.alignleft, .prose .wp-caption.alignright { float: none; max-width: 100% !important; margin-inline: 0; }
}

.page-links { display: flex; flex-wrap: wrap; gap: var(--space-2); }

/* End of the article ---------------------------------------------------- */

.post-end { display: flex; flex-direction: column; gap: var(--space-5); margin-top: var(--space-6); }
.tags { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.tags a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-ink);
  font-size: var(--text-small-size);
  text-decoration: none;
  transition: border-color var(--m-out) var(--ease), color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.tags a:hover { border-color: var(--color-heading); color: var(--color-heading); transform: translateY(-1px); transition-duration: var(--m-in); }
@media (pointer: coarse) { .tags a { min-height: 44px; } }

.share {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-4);
  padding-block: var(--space-3);
  border-block: 1px solid var(--color-rule);
}
.share__label, .page-social__label { font-weight: 600; color: var(--color-heading); }
.share__list { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin: 0; padding: 0; list-style: none; }
.share__list a { display: inline-flex; align-items: center; min-height: 44px; color: var(--color-link); font-weight: 600; }

.page-social { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-4); margin-top: var(--space-5); }

.more-list { margin: 0; padding: 0; list-style: none; }
.more-item + .more-item { border-top: 1px solid var(--color-rule); }
.more-item__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  padding: var(--space-2) 0 var(--space-2) var(--space-3);
  color: var(--color-heading);
  text-decoration: none;
}
.more-item__link::before {
  content: "";
  position: absolute;
  left: 0;
  top: var(--space-2);
  bottom: var(--space-2);
  width: 2px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform var(--m-out) var(--ease);
}
.more-item__link:hover::before { transform: none; transition-duration: var(--m-slide); }
.more-item__title { font-size: var(--text-small-size); line-height: var(--text-small-line); font-weight: 600; }
.more-item__date { color: var(--color-muted); }

.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-4); margin-top: var(--space-6); }
.post-nav__link {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-rule);
  color: var(--color-heading);
  text-decoration: none;
}
.post-nav__link::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -1px;
  height: 2px;
  background: var(--color-accent);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform var(--m-out) var(--ease);
}
.post-nav__link--next::before { transform-origin: 100% 50%; }
.post-nav__link:hover::before { transform: scaleX(1); transition-duration: var(--m-slide); }
.post-nav__label { display: inline-flex; align-items: center; gap: var(--space-2); font-size: var(--text-small-size); color: var(--color-muted); }
.post-nav__label .icon { width: 16px; height: 16px; transition: transform var(--m-out) var(--ease); }
.post-nav__link--prev:hover .icon { transform: translateX(-3px); transition-duration: var(--m-in); }
.post-nav__link--next:hover .icon { transform: translateX(3px); transition-duration: var(--m-in); }
.post-nav__title { font-weight: 600; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); }
.post-nav__link--next { grid-column: 2; align-items: flex-end; text-align: right; }

@media (max-width: 40rem) {
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__link--next { grid-column: auto; align-items: flex-start; text-align: left; }
}

/* Comments: a short band, the invitation on the left (3), the conversation on the right (7) ------ */

.comments.band { padding-block: var(--space-6); }
.comments__grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 7fr); gap: var(--space-5) var(--space-6); align-items: start; }
.comments__intro { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.comments__note { max-width: 34ch; color: var(--color-muted); }
.comment-card { padding: var(--space-4); border: 1px solid var(--color-rule); border-radius: var(--radius-lg); background: var(--color-surface); }
.comment-list + .comment-card, .comment-navigation + .comment-card { margin-top: var(--space-5); }
.comment-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); margin-top: var(--space-3); }
.comment-form > * { grid-column: 1 / -1; margin: 0; }
.comment-form .comment-form-author, .comment-form .comment-form-email { grid-column: auto; }
.comment-form textarea { min-height: 120px; }
.comment-form .form-submit { margin-top: var(--space-1); }
@media (max-width: 60rem) { .comments__grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); } }
@media (max-width: 40rem) { .comment-form .comment-form-author, .comment-form .comment-form-email { grid-column: 1 / -1; } }
.comment-list { margin: 0; padding: 0; list-style: none; }
.comment-list .children { margin: 0; padding-left: var(--space-5); list-style: none; }
.comment-body { padding-block: var(--space-4); border-bottom: 1px solid var(--color-rule); }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); font-size: var(--text-small-size); color: var(--color-muted); }
.comment-author { display: flex; align-items: center; gap: var(--space-2); color: var(--color-heading); font-weight: 600; }
.comment-author img { border-radius: var(--radius-full); }
.comment-content { margin-top: var(--space-2); }
.comment-reply-title { font-size: var(--text-h3-size); line-height: var(--text-h3-line); color: var(--color-heading); }
.comment-notes, .comments-closed { margin-top: var(--space-1); color: var(--color-muted); font-size: var(--text-small-size); }
.comment-form-cookies-consent label { flex-direction: row; align-items: center; font-weight: 400; color: var(--color-ink); font-size: var(--text-small-size); }

/* Lightbox: the article's own photographs, bigger --------------------------------- */

.lightbox {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-on-primary);
  overflow: hidden;
  overscroll-behavior: contain;
}
.lightbox::backdrop { background: transparent; }
.lightbox__scrim { position: absolute; inset: 0; background: var(--color-scrim); opacity: 0; transition: opacity 260ms var(--ease); }
.lightbox.is-open .lightbox__scrim { opacity: 1; }
.lightbox__stage { position: absolute; inset: 72px 88px 104px; display: grid; place-items: center; touch-action: pan-y; }
.lightbox__img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-sm);
  box-shadow: 0 40px 80px -40px var(--color-shadow-deep);
  transform-origin: 0 0;
  user-select: none;
}
.lightbox__btn {
  position: absolute;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid var(--color-glass-edge);
  border-radius: var(--radius-full);
  background: var(--color-glass);
  color: var(--color-on-primary);
  cursor: pointer;
  opacity: 0;
  transition: opacity 200ms var(--ease), background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.lightbox__btn .icon { width: 22px; height: 22px; }
.lightbox.is-open .lightbox__btn { opacity: 1; transition-delay: 120ms, 0s, 0s; }
.lightbox__btn:hover { background: var(--color-glass-hover); }
.lightbox__btn:active { transform: scale(0.94); }
.lightbox__btn:focus-visible { outline-color: var(--color-focus-on-dark); }
.lightbox__btn[hidden] { display: none; }
.lightbox__close { top: var(--space-3); right: var(--space-3); }
.lightbox__prev { left: var(--space-3); top: calc(50% - 24px); }
.lightbox__next { right: var(--space-3); top: calc(50% - 24px); }
.lightbox__prev:hover { transform: translateX(-2px); }
.lightbox__next:hover { transform: translateX(2px); }
.lightbox__bar {
  position: absolute;
  left: 88px;
  right: 88px;
  bottom: var(--space-4);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  font-size: var(--text-small-size);
  line-height: var(--text-small-line);
  color: var(--color-well-cool);
  opacity: 0;
  transition: opacity 200ms var(--ease) 120ms;
}
.lightbox.is-open .lightbox__bar { opacity: 1; }
.lightbox__caption { max-width: 60ch; }
@media (max-width: 40rem) {
  .lightbox__stage { inset: 64px var(--space-3) 120px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 56px; }
  .lightbox__bar { left: var(--space-3); right: var(--space-3); bottom: var(--space-3); flex-direction: column; gap: var(--space-1); }
}

/* Footer ---------------------------------------------------------------- */

.site-footer {
  margin-top: var(--section-gap);
  padding-block: var(--space-5) var(--space-4);
  background: var(--color-primary);
  color: var(--color-on-primary);
}
.site-main:has(> .band:last-child) + .site-footer, .site-main:has(> :last-child > .band:last-child) + .site-footer { margin-top: 0; } /* a page that ends on a band meets the footer directly, even when the band sits inside the article */
.site-footer a:not(.btn) { color: var(--color-on-primary); }
.site-footer :focus-visible { outline-color: var(--color-focus-on-dark); }

.invite {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-3) var(--space-6);
  align-items: center;
  padding-bottom: var(--space-6);
  border-bottom: 1px solid var(--color-primary-hover);
}
.invite__title {
  grid-column: 1;
  max-width: 20ch;
  font-size: var(--text-h1-size);
  line-height: var(--text-h1-line);
  letter-spacing: var(--text-h1-tracking);
  font-weight: 700;
  color: var(--color-on-primary);
}
.invite__text { grid-column: 1; max-width: 48ch; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); color: var(--color-well-cool); }
.invite .btn { grid-column: 2; grid-row: 1 / span 2; justify-self: end; }

.footer-main {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 4fr) minmax(0, 3fr);
  gap: var(--space-5);
  align-items: start;
  padding-top: var(--space-6);
}
.footer-brand { transition: opacity var(--m-out) var(--ease); }
.footer-brand:hover { opacity: 0.85; }
.footer-brand img { width: 270px; height: auto; }
.footer-nav__list, .social { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-6);
  padding-top: var(--space-4);
  border-top: 1px solid var(--color-primary-hover);
  font-size: var(--text-small-size);
  color: var(--color-well-cool);
}
.to-top { display: inline-flex; align-items: center; gap: var(--space-2); min-height: 44px; font-weight: 600; text-decoration: none; }
.to-top .icon { width: 16px; height: 16px; transition: transform var(--m-out) var(--ease); }
.to-top:hover .icon { transform: translateY(-3px); transition-duration: var(--m-in); }

@media (max-width: 60rem) {
  .invite { grid-template-columns: minmax(0, 1fr); }
  .invite .btn { grid-column: 1; grid-row: auto; justify-self: start; margin-top: var(--space-2); }
  .footer-main { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .footer-brand { grid-column: 1 / -1; }
  .footer-brand img { width: 240px; }
}

/* Entrance: once on load the headline rises line by line, then what follows it --------- */

@keyframes hl-rise { from { transform: translateY(108%); } to { transform: none; } }
@keyframes hl-fade-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes hl-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes hl-settle { from { transform: scale(1.05); } to { transform: none; } }
@keyframes hl-line { from { transform: scaleX(0); } to { transform: none; } }

html.js.m-enter:not(.m-enter-done) [data-enter] :is(.enter-title, [data-enter-item]) { opacity: 0; }
html.m-enter-done [data-enter]:not(.is-entering):not(.is-entered) :is(.enter-title, [data-enter-item]) { animation: hl-fade 400ms var(--ease) both; }
.enter-title .w { display: inline-block; overflow: clip; vertical-align: top; padding-block: 0.16em; margin-block: -0.16em; }
.enter-title .w > span { display: inline-block; }
[data-enter].is-entering .enter-title .w > span { animation: hl-rise 700ms var(--ease-enter) both; animation-delay: calc(var(--line, 0) * 80ms); }
[data-enter].is-entering [data-enter-item] { animation: hl-fade-up 520ms var(--ease-enter) both; animation-delay: var(--d, 0ms); }
[data-enter].is-entering :is(.lead__kicker, .post-header__kicker) .eyebrow::before { animation: hl-line 600ms var(--ease-enter) both; animation-delay: 120ms; }
@media (prefers-reduced-motion: no-preference) {
  [data-enter-media] img { animation: hl-settle 1.1s var(--ease-enter) both; }
}

/* Between pages: a quiet cross-fade; a post's photograph travels from its tile into the article. */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}
::view-transition-old(root) { animation: 160ms var(--ease) both hl-vt-out; }
::view-transition-new(root) { animation: 320ms var(--ease-enter) both hl-vt-in; }
::view-transition-group(*) { animation-duration: 480ms; animation-timing-function: var(--ease-enter); }
@keyframes hl-vt-out { to { opacity: 0; } }
@keyframes hl-vt-in { from { opacity: 0; } }

/* The ledger: numbers, dates, code and keys in the mono face ------------------------ */

.more-item__date, .lightbox__count, .toc__n, .palette__date, .read-ring__left, .code__lang {
  font-family: var(--font-mono);
  font-size: var(--text-mono-size);
  letter-spacing: -0.01em;
}
.kbd {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 24px;
  height: 24px;
  padding-inline: var(--space-1);
  border: 1px solid var(--color-rule);
  border-bottom-width: 2px;
  border-radius: var(--radius-sm);
  background: var(--color-surface);
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.6875rem;
  font-weight: 500;
  line-height: 1;
}
.site-nav__search .kbd { margin-left: var(--space-1); transition: border-color var(--m-out) var(--ease), color var(--m-out) var(--ease); }
.site-nav__search:hover .kbd { border-color: var(--color-heading); color: var(--color-heading); }
.no-js .kbd, .no-js .palette, .no-js .read-ring { display: none; }
@media (max-width: 60rem) { .site-nav__search .kbd { display: none; } }

/* Graph paper: a faint dot grid behind the lead, hairlines in the footer ---------------- */

.lead { position: relative; isolation: isolate; }
.lead::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-5)) -8% calc(-1 * var(--space-5)) -8%;
  z-index: -1;
  background-image: radial-gradient(var(--color-grid) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 72% 85% at 36% 50%, var(--ink) 15%, transparent 68%);
  mask-image: radial-gradient(ellipse 72% 85% at 36% 50%, var(--ink) 15%, transparent 68%);
  pointer-events: none;
}
.site-footer {
  background-image: linear-gradient(var(--color-grid-dark) 1px, transparent 1px), linear-gradient(90deg, var(--color-grid-dark) 1px, transparent 1px);
  background-size: 48px 48px;
  background-position: center top;
}

/* Blueprint ticks on the lead and article photographs ------------------------------- */

.marks { position: relative; }
.marks::before, .marks::after {
  content: "";
  position: absolute;
  width: 14px;
  height: 14px;
  border: 0 solid var(--color-accent);
  opacity: 0.55;
  pointer-events: none;
  transition: opacity var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.marks::before { top: calc(-1 * var(--space-2)); left: calc(-1 * var(--space-2)); border-top-width: 2px; border-left-width: 2px; }
.marks::after { right: calc(-1 * var(--space-2)); bottom: calc(-1 * var(--space-2)); border-right-width: 2px; border-bottom-width: 2px; }
.marks:hover::before { opacity: 1; transform: translate(-2px, -2px); transition-duration: var(--m-in); }
.marks:hover::after { opacity: 1; transform: translate(2px, 2px); transition-duration: var(--m-in); }
@media (max-width: 60rem) { .marks::before, .marks::after { display: none; } }

/* The signature writes itself on the first visit of a session ------------------------- */

@keyframes hl-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 -4% 0 0); } }
@keyframes hl-draw { from { stroke-dashoffset: 100; } to { stroke-dashoffset: 0; } }
@keyframes hl-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: 1; transform: none; } }
.m-first .brand img { animation: hl-wipe 1s var(--ease-io) both 120ms; }

/* Subject glyphs: one stroke each, drawn when the card is hovered or the page opens -------- */

.glyph { display: block; width: 28px; height: 28px; color: var(--color-accent-ink); }
.glyph :is(path, circle) { stroke-dasharray: 100; stroke-dashoffset: 0; }
.door__head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-3); align-self: stretch; }
.door__glyph { flex-shrink: 0; margin-top: var(--space-1); }
.door:hover .glyph :is(path, circle) { animation: hl-draw 900ms var(--ease-enter) both; }
.door:hover .glyph :is(path, circle):nth-child(2) { animation-delay: 240ms; }
.archive-glyph { width: 40px; height: 40px; }
[data-enter].is-entering .archive-glyph :is(path, circle) { animation: hl-draw 1s var(--ease-enter) both 160ms; }
[data-enter].is-entering .archive-glyph :is(path, circle):nth-child(2) { animation-delay: 420ms; }

/* Section heads: the orange rule draws when the heading comes into view ---------------- */

.js .section__title::after { transform: scaleX(0); transform-origin: 0 50%; transition: transform 700ms var(--ease-enter); }
.js .section__title.is-seen::after { transform: none; }

/* Reading ring in the article's left margin ------------------------------------------ */

.read-ring {
  position: relative;
  display: none;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: var(--space-3);
  color: var(--color-heading);
}
@media (min-width: 75rem) { .js .read-ring { display: grid; } }
.read-ring svg { position: absolute; inset: 0; transform: rotate(-90deg); }
.read-ring circle { fill: none; stroke-width: 2.5; }
.read-ring__track { stroke: var(--color-rule); }
.read-ring__bar {
  stroke: var(--color-accent);
  stroke-linecap: round;
  stroke-dasharray: 100;
  stroke-dashoffset: calc(100 - var(--progress, 0) * 100);
  transition: stroke-dashoffset 120ms linear;
}
.read-ring__left { position: relative; font-weight: 500; }
.read-ring.is-done { color: var(--color-accent-ink); }
.read-ring.is-done .read-ring__left { animation: hl-pop 400ms var(--ease-enter) both; }

/* Numbered sections, when the article has a contents list ---------------------------- */

/* Headings inside a quotation keep the quotation's voice: no dash, stacked lines. */
.prose blockquote :is(h1, h2, h3, h4, h5, h6) { display: block; margin: 0; padding: 0; border: 0; font-size: inherit; line-height: inherit; font-weight: inherit; }
.prose blockquote :is(h2, h3, h4, h5, h6)::before { display: none; }

/* Code blocks: a label and a copy button ---------------------------------------------- */

.code { overflow: hidden; border: 1px solid var(--color-rule); border-radius: var(--radius-md); background: var(--color-well); }
.code__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2);
  padding: var(--space-1) var(--space-1) var(--space-1) var(--space-3);
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-muted);
}
.code pre { margin: 0; border-radius: 0; background: none; }
.icon-btn--sm { width: 36px; height: 36px; border-color: transparent; background: transparent; }
.icon-btn--sm .icon { width: 16px; height: 16px; }

/* Quick find: Ctrl K ------------------------------------------------------------------ */

.palette {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--color-ink);
  overflow: hidden;
  overscroll-behavior: contain;
}
.palette::backdrop { background: transparent; }
.palette__scrim {
  position: absolute;
  inset: 0;
  background: var(--color-scrim-light);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 180ms var(--ease);
}
.palette__card {
  position: absolute;
  left: 50%;
  top: 12vh;
  display: flex;
  flex-direction: column;
  width: min(640px, calc(100% - 2 * var(--gutter)));
  max-height: 72vh;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 40px 80px -32px var(--color-shadow-deep);
  transform: translate(-50%, 0);
  transition: opacity 160ms var(--ease), transform 160ms var(--ease);
}
.js .palette:not(.is-open) .palette__card { opacity: 0; transform: translate(-50%, -8px) scale(0.98); }
.palette.is-open .palette__scrim { opacity: 1; }
.palette.is-open .palette__card { transition: opacity 240ms var(--ease-enter), transform 240ms var(--ease-enter); }
.palette__form {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-rule);
  color: var(--color-muted);
  transition: border-color var(--m-out) var(--ease);
}
.palette__form:focus-within { border-bottom-color: var(--color-heading); color: var(--color-heading); }
.palette__form .icon { flex-shrink: 0; width: 20px; height: 20px; }
.palette__input {
  flex: 1;
  min-width: 0;
  padding: var(--space-2) 0;
  border: 0;
  background: none;
  color: var(--color-ink);
  font-size: var(--text-body-article-size);
}
.palette__input:focus-visible { outline: none; }
.palette__input::-webkit-search-cancel-button { display: none; }
.palette__esc { padding: 0; border: 0; background: none; cursor: pointer; }
.palette__esc:hover .kbd { border-color: var(--color-heading); color: var(--color-heading); }
.palette__results { margin: 0; padding: var(--space-2); list-style: none; overflow-y: auto; scrollbar-width: thin; }
.palette__results:empty { display: none; }
.palette__item { animation: hl-fade-up 200ms var(--ease-enter) both; animation-delay: calc(var(--i, 0) * 24ms); }
.palette__item a {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-3);
  border-radius: var(--radius-sm);
  color: var(--color-heading);
  text-decoration: none;
}
.palette__item[aria-selected="true"] a { background: var(--color-well); }
.palette__item[aria-selected="true"] .palette__date { color: var(--color-heading); }
.palette__name { font-weight: 600; }
.palette__name mark { border-radius: 2px; background: var(--color-mark); color: inherit; }
.palette__date { color: var(--color-muted); white-space: nowrap; }
.palette__status { padding: var(--space-3) var(--space-4); color: var(--color-muted); font-size: var(--text-small-size); }
.palette__status:empty { display: none; }
.palette__foot {
  display: flex;
  gap: var(--space-4);
  padding: var(--space-2) var(--space-4);
  border-top: 1px solid var(--color-rule);
  color: var(--color-muted);
  font-size: var(--text-small-size);
}
.palette__foot span { display: inline-flex; align-items: center; gap: var(--space-1); }
@media (max-width: 40rem) {
  .palette__card { top: var(--space-3); max-height: calc(100vh - 2 * var(--space-3)); }
  .palette__foot { display: none; }
}

/* 404: a route that goes somewhere else ----------------------------------------------- */

.lost { display: block; max-width: 100%; height: auto; margin-bottom: var(--space-2); overflow: visible; color: var(--color-link-rest); }
.lost__path { fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-dasharray: 100; }
.lost__dot { fill: var(--color-heading); }
.lost__end { fill: var(--color-accent); transform-box: fill-box; transform-origin: center; }
[data-enter].is-entering .lost__path { animation: hl-draw 1.4s var(--ease-io) both 200ms; }
[data-enter].is-entering .lost__end { animation: hl-pop 500ms var(--ease-enter) both 1.5s; }

/* Single post: the title beside a modest photograph, ledger lines between numbered sections ------ */

.post-hero {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-5) var(--space-6);
  align-items: end;
  padding-top: var(--space-5);
}
.post-hero--text { grid-template-columns: minmax(0, var(--measure)); justify-content: center; }
.post-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.post-hero__title { font-size: clamp(2rem, 1.3rem + 2.2vw, 2.875rem); line-height: 1.12; letter-spacing: var(--text-display-tracking); }
.post-hero__media { margin: 0; }
.post-hero__frame { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.post-hero__media figcaption { margin-top: var(--space-2); font-size: var(--text-small-size); color: var(--color-muted); }
@media (max-width: 60rem) {
  .post-hero { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-4); }
  .post-hero__frame { aspect-ratio: 16 / 10; }
}
.prose :is(h1, h2, h3, h4, h5, h6) strong { background: none; color: inherit; }
.prose img { box-shadow: 0 24px 48px -36px var(--color-shadow-deep); }
.prose .gallery img, .prose .alignleft, .prose .alignright { box-shadow: none; }
.post-end::before {
  content: "— hết —";
  display: block;
  margin-bottom: var(--space-5);
  font-family: var(--font-mono);
  font-size: var(--text-mono-size);
  text-align: center;
  color: var(--color-muted);
}
.comment-form label { display: block; margin-bottom: var(--space-2); }
.comment-form .required { color: var(--color-accent-ink); }
.comment-form-cookies-consent { display: flex; align-items: flex-start; gap: var(--space-2); }
.comment-form-cookies-consent label { display: inline; margin: 0; font-weight: 400; color: var(--color-ink); font-size: var(--text-small-size); }
.comment-form-cookies-consent input { margin: 5px 0 0; accent-color: var(--color-primary); }

/* Category index: numbered titles on the left, the hovered essay's photograph on the right ------- */

.index { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); align-items: start; }
.index__list { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-rule); }
.index__item {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--space-4);
  padding-block: var(--space-4);
  border-bottom: 1px solid var(--color-rule);
}
.index__item::before {
  content: "";
  position: absolute;
  left: calc(-1 * var(--space-4));
  top: var(--space-4);
  bottom: var(--space-4);
  width: 3px;
  border-radius: 2px;
  background: var(--color-accent);
  transform: scaleY(0);
  transition: transform var(--m-out) var(--ease);
}
.index__item.is-active::before, .index__item:hover::before { transform: none; transition-duration: var(--m-slide); }
.index__n { padding-top: 0.45em; color: var(--color-accent-ink); font-weight: 500; }
.index__body { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-2); min-width: 0; }
.index__title { font-size: 1.4375rem; line-height: 1.3; font-weight: 700; color: var(--color-heading); }
.index__title a { --ul: 2px; color: inherit; text-decoration: none; background-image: linear-gradient(currentColor, currentColor); background-repeat: no-repeat; background-position: 100% 100%; background-size: 0 var(--ul); transition: background-size var(--m-out) var(--ease); }
.index__item:hover .index__title a, .index__item.is-active .index__title a { background-position: 0 100%; background-size: 100% var(--ul); transition-duration: var(--m-in); }
.index__excerpt { max-width: 60ch; }
.index__thumb { display: none; }
.index__preview { position: sticky; top: calc(var(--header-height) + var(--space-5)); }
.index__frame { aspect-ratio: 16 / 9; border-radius: var(--radius-lg); }
.index__frame.is-empty img { padding: 28%; object-fit: contain; }
.index__img { transition: opacity 140ms var(--ease), transform var(--m-image) var(--ease-enter); }
.index__img.is-swapping { opacity: 0; transform: scale(1.04); transition-duration: 140ms, 0ms; }
.index__caption { margin-top: var(--space-2); color: var(--color-muted); font-size: var(--text-mono-size); }
@media (max-width: 60rem) {
  .index { grid-template-columns: minmax(0, 1fr); }
  .index__preview { display: none; }
  .index__item { grid-template-columns: minmax(0, 1fr) 128px; }
  .index__thumb { display: block; aspect-ratio: 16 / 9; border-radius: var(--radius-md); }
  .index__item::before { left: calc(-1 * var(--space-3)); }
}
@media (max-width: 40rem) {
  .index__item { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); }
  .index__thumb { display: none; }
  .index__title { font-size: var(--text-h3-size); }
}

/* Chips: small rounded links with a glyph or an arrow -------------------------------------- */

.chips { display: flex; flex-wrap: wrap; gap: var(--space-2); margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  min-height: 40px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-heading);
  font-size: var(--text-small-size);
  font-weight: 600;
  text-decoration: none;
  transition: border-color var(--m-out) var(--ease), background-color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.chip .icon { width: 16px; height: 16px; color: var(--color-muted); transition: transform var(--m-out) var(--ease), color var(--m-out) var(--ease); }
.chip .chip__glyph { width: 18px; height: 18px; color: var(--color-accent-ink); }
.chip:hover { border-color: var(--color-heading); transform: translateY(-1px); transition-duration: var(--m-in); }
.chip:hover .icon--arrow-up-right { color: var(--color-accent-ink); transform: translate(2px, -2px); }
.chip--quiet { background: transparent; font-weight: 500; }
@media (pointer: coarse) { .chip { min-height: 44px; } }

/* Về Huyền ---------------------------------------------------------------------------------- */

.about-hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 5fr);
  gap: var(--space-6);
  align-items: center;
  padding-top: var(--space-6);
}
.about-hero::before {
  content: "";
  position: absolute;
  inset: calc(-1 * var(--space-5)) -8%;
  z-index: -1;
  background-image: radial-gradient(var(--color-grid) 1.1px, transparent 1.4px);
  background-size: 22px 22px;
  -webkit-mask-image: radial-gradient(ellipse 72% 85% at 36% 50%, var(--ink) 15%, transparent 68%);
  mask-image: radial-gradient(ellipse 72% 85% at 36% 50%, var(--ink) 15%, transparent 68%);
  pointer-events: none;
}
.about-hero__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-4); }
.about-hero__title { font-size: var(--text-display-size); line-height: var(--text-display-line); letter-spacing: var(--text-display-tracking); font-weight: 700; color: var(--color-heading); }
.about-hero__lead { max-width: 44ch; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); }
.about-hero__media { justify-self: end; width: min(100%, 420px); }
.about-hero__media .person__media { aspect-ratio: 4 / 5; }
.about-hero__media .person__media--mark { width: 100%; aspect-ratio: 1; }
.about-body { margin-top: var(--space-6); }
.prose--about > :first-child { margin-top: 0; }
.prose--about table, .prose--about tbody, .prose--about tr, .prose--about td { display: block; width: auto !important; padding: 0; border: 0; text-align: left !important; vertical-align: top !important; background: none; }
.prose--about td + td { margin-top: var(--space-4); }
.prose--about td img { width: 100%; height: auto; border-radius: var(--radius-lg); }
.prose--about td > :first-child { margin-top: 0; }
.prose--about blockquote :is(h1, h2, h3, h4, h5, h6) { margin: 0; font-size: inherit; line-height: inherit; font-weight: inherit; text-align: left !important; }
.prose--about blockquote [style*="color"] { color: inherit !important; }
.prose--about blockquote :is(h1, h2, h3, h4, h5, h6) + :is(h1, h2, h3, h4, h5, h6) { margin-top: var(--space-3); font-size: var(--text-small-size); font-weight: 400; color: var(--color-muted); }
.prose--about ol > li > :is(h4, h5, h6) { margin: 0; font-size: 1.1875rem; font-weight: 600; }
/* Intro: the page's own first picture beside its opening lines; chapters: title left, text right. */
.about-intro-band { margin-top: var(--space-6); }
.about-intro { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-6); align-items: center; }
.about-intro--text { grid-template-columns: minmax(0, var(--measure)); justify-content: center; }
.about-intro__media { aspect-ratio: 4 / 3; border-radius: var(--radius-lg); }
.about-intro__media :is(p, figure) { margin: 0; height: 100%; }
.about-intro__media img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; box-shadow: none; }
.about-intro__text { font-size: 1.3125rem; line-height: 1.6; color: var(--color-heading); }
.about-intro__text > * + * { margin-top: var(--space-4); }
.about-chapters { margin-top: var(--space-5); }
.chapter { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: var(--space-5) var(--space-6); padding-block: var(--space-6); border-top: 1px solid var(--color-rule); }
.chapter:first-child { border-top: 0; }
.chapter__head { position: sticky; top: calc(var(--header-height) + var(--space-5)); align-self: start; }
.chapter__title { font-size: var(--text-h1-size); line-height: var(--text-h1-line); letter-spacing: var(--text-h1-tracking); font-weight: 700; color: var(--color-heading); }
.chapter__title::after { content: ""; display: block; width: 40px; height: 4px; margin-top: var(--space-3); border-radius: 2px; background: var(--color-accent); }
.chapter__body > :first-child { margin-top: 0; }
.chapter__body h2 { margin-top: var(--space-5); padding-top: 0; border-top: 0; }
.chapter__body ol > li { padding-left: var(--space-1); }
.chapter__body ol > li + li { margin-top: var(--space-3); }
.chapter__body img { border-radius: var(--radius-lg); }
@media (max-width: 60rem) {
  .about-intro { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .about-intro__text { font-size: var(--text-body-article-size); }
  .chapter { grid-template-columns: minmax(0, 1fr); gap: var(--space-3); padding-block: var(--space-5); }
  .chapter__head { position: static; }
}

/* End of the About page: the invitation in one line with its button, then the four ways to work together as columns of a ledger. */
.about-offer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: var(--space-3) var(--space-5); }
.about-offer__text { max-width: 52ch; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); color: var(--color-heading); }
.offers { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: var(--space-5) 0 0; padding: 0; list-style: none; border-top: 1px solid var(--color-link-rest); }
.offer { border-left: 1px solid var(--color-link-rest); }
.offer:first-child { border-left: 0; }
.offer__link { display: flex; flex-direction: column; gap: var(--space-1); height: 100%; padding: var(--space-3) var(--space-4) 0; color: inherit; text-decoration: none; }
.offer:first-child .offer__link { padding-left: 0; }
.offer__name { display: inline-flex; align-items: center; gap: var(--space-1); font-weight: 700; color: var(--color-heading); transition: color var(--m-out) var(--ease); }
.offer__name .icon { width: 16px; height: 16px; color: var(--color-link-rest); transition: color var(--m-out) var(--ease), transform var(--m-out) var(--ease); }
.offer__link:hover .offer__name, .offer__link:focus-visible .offer__name { color: var(--color-accent-ink); transition-duration: var(--m-in); }
.offer__link:hover .offer__name .icon, .offer__link:focus-visible .offer__name .icon { color: var(--color-accent-ink); transform: translateX(3px); transition-duration: var(--m-in); }
.offer__desc { font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--color-muted); }
@media (max-width: 60rem) {
  .offers { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: var(--space-4); }
  .offer:nth-child(odd) { border-left: 0; }
  .offer:nth-child(odd) .offer__link { padding-left: 0; }
}
@media (max-width: 40rem) {
  .offers { grid-template-columns: minmax(0, 1fr); row-gap: 0; border-top: 0; }
  .offer { border-left: 0; border-top: 1px solid var(--color-link-rest); }
  .offer__link { padding: var(--space-3) 0; }
}
@media (max-width: 60rem) {
  .about-hero { grid-template-columns: minmax(0, 1fr); gap: var(--space-5); padding-top: var(--space-4); }
  .about-hero__media { order: -1; justify-self: start; width: min(100%, 300px); }
}

/* Liên hệ: the invitation on the left, the form as a card on the right ----------------------- */

.contact__grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  column-gap: var(--space-6);
  row-gap: 0;
  align-items: start;
  padding-top: var(--space-6);
}
.contact__grid > *, .contact__grid .prose > * { grid-column: 1; }
.contact__grid .prose { display: contents; }
.contact__title { margin-bottom: var(--space-4); font-size: var(--text-display-size); line-height: var(--text-display-line); letter-spacing: var(--text-display-tracking); }
.contact__grid .prose > p { max-width: 40ch; font-size: var(--text-body-article-size); line-height: var(--text-body-article-line); }
.contact__grid .prose > * + * { margin-top: var(--space-4); }
.contact__grid .wpcf7 {
  grid-column: 2;
  grid-row: 1 / span 40;
  margin: 0;
  padding: var(--space-5);
  border: 1px solid var(--color-rule);
  border-radius: var(--radius-lg);
  background: var(--color-surface);
  box-shadow: 0 32px 64px -48px var(--color-shadow-deep);
}
.contact__social { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); margin-top: var(--space-6); }
@media (max-width: 60rem) {
  .contact__grid { grid-template-columns: minmax(0, 1fr); padding-top: var(--space-4); }
  .contact__grid .wpcf7 { grid-column: 1; grid-row: auto; margin-top: var(--space-5); padding: var(--space-4); }
}

/* The form itself */
.wpcf7 form > :is(p, .f-grid, .f-choice, .f-send) { margin: 0 0 var(--space-4); }
.wpcf7 form > :last-child { margin-bottom: 0; }
.f-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--space-3); }
.f-grid > p { margin: 0; }
.req { margin-left: 2px; color: var(--color-accent-ink); }
.opt { margin-left: var(--space-1); font-size: var(--text-small-size); font-weight: 400; color: var(--color-muted); }
.f-choice { min-width: 0; margin: 0; padding: 0; border: 0; }
.f-choice legend { margin-bottom: var(--space-2); padding: 0; font-weight: 600; color: var(--color-heading); }
.wpcf7-checkbox { display: flex; flex-wrap: wrap; gap: var(--space-2); }
.wpcf7-list-item { margin: 0; }
.wpcf7-list-item label {
  position: relative;
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-2);
  min-height: 44px;
  padding-inline: var(--space-3);
  border: 1px solid var(--color-field-edge);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  color: var(--color-ink);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--m-out) var(--ease), background-color var(--m-out) var(--ease), color var(--m-out) var(--ease), transform var(--m-out) var(--ease);
}
.wpcf7-list-item label::before {
  content: "";
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-field-edge);
  border-radius: var(--radius-full);
  background: var(--color-surface);
  transition: border-color var(--m-out) var(--ease), background-color var(--m-out) var(--ease), box-shadow var(--m-out) var(--ease);
}
.wpcf7-list-item input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.wpcf7-list-item label:hover { border-color: var(--color-heading); transform: translateY(-1px); transition-duration: var(--m-in); }
.wpcf7-list-item label:is(.is-checked, :has(input:checked)) { border-color: var(--color-primary); background: var(--color-well-cool); color: var(--color-heading); font-weight: 600; }
.wpcf7-list-item label:is(.is-checked, :has(input:checked))::before { border-color: var(--color-primary); background: var(--color-primary); box-shadow: inset 0 0 0 3px var(--color-surface); }
.wpcf7-list-item label:has(input:focus-visible) { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.f-send { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-3) var(--space-4); }
.f-note { max-width: 36ch; font-size: var(--text-small-size); line-height: var(--text-small-line); color: var(--color-muted); }
.wpcf7-spinner { margin: 0; }
@media (max-width: 40rem) { .f-grid { grid-template-columns: minmax(0, 1fr); } }

/* Footer, kept short: a one-line invitation, the logo and sparkline beside three ledger rows,
   a readout line and the colophon ----------------------------------------------------------- */

.invite--slim {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-5);
  padding-bottom: var(--space-5);
}
.invite__copy { display: flex; flex-direction: column; gap: var(--space-1); min-width: 0; }
.invite--slim .invite__title { max-width: none; font-size: var(--text-h2-size); line-height: var(--text-h2-line); letter-spacing: 0; }
.invite--slim .invite__text { max-width: 60ch; font-size: var(--text-body-size); line-height: var(--text-body-line); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: var(--space-5);
  align-items: end;
  padding-top: var(--space-5);
}
.footer-readout.footer-readout--stack { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); margin: 0; padding: 0; border: 0; }
.footer-brand-col { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.footer-brand img { width: 210px; }
/* The sparkline: one point per year, drawn when the footer comes into view. */
.spark { margin: 0; }
.spark svg { display: block; overflow: visible; }
.spark__line { fill: none; stroke: var(--color-accent); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 100; }
.js .spark__line { stroke-dashoffset: 100; transition: stroke-dashoffset 1.6s var(--ease-io); }
.js .spark.is-seen .spark__line { stroke-dashoffset: 0; }
.spark__dot { fill: var(--color-accent); }
.js .spark__dot { opacity: 0; transition: opacity 300ms var(--ease) 1.4s; }
.js .spark.is-seen .spark__dot { opacity: 1; }
.spark__label { margin-top: var(--space-1); font-family: var(--font-mono); font-size: var(--text-mono-size); color: var(--color-link-rest); }

.footer-readout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-3) var(--space-5);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-primary-hover);
}
.readout { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-1) var(--space-2); min-width: 0; font-size: var(--text-small-size); line-height: var(--text-small-line); }
.readout__k { font-family: var(--font-mono); font-size: var(--text-mono-size); color: var(--color-link-rest); }
.readout__v { color: var(--color-on-primary); font-weight: 600; }
.readout__d { color: var(--color-well-cool); }
.readout--kbd { display: none; }
@media (min-width: 60rem) and (hover: hover) { .readout--kbd { display: flex; } }
.readout .kbd { vertical-align: middle; }
.kbd--dark { border-color: var(--color-primary-hover); background: var(--color-glass); color: var(--color-on-primary); }
/* The newest title is typed in once the readout is on screen; a steady caret while it types. */
.js [data-type].is-typing::after { content: ""; display: inline-block; width: 2px; height: 1em; margin-left: 2px; vertical-align: -0.15em; background: var(--color-accent); }
.clock__ss { display: inline-block; }
.colophon { margin-top: var(--space-5); padding-top: var(--space-3); }
@media (max-width: 60rem) {
  .footer-grid { grid-template-columns: minmax(0, 1fr); gap: var(--space-4); }
  .footer-readout { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 40rem) {
  .colophon { flex-direction: column; align-items: flex-start; }
}

/* The ledger vibe, everywhere: spec-sheet section heads, mono labels and data lines, hairline
   separators, corner ticks on hover, dark terminal code, sharper tables and small headings ------- */

.section__head { display: flex; flex-wrap: wrap; align-items: baseline; gap: var(--space-2) var(--space-4); width: 100%; margin-bottom: var(--space-5); }
.section__lead { display: flex; align-items: baseline; gap: var(--space-3); min-width: 0; }
.section__index { color: var(--color-accent-ink); font-size: var(--text-mono-size); font-weight: 500; }
.section__title::after { display: none; }
.section__rule { flex: 1 1 48px; align-self: center; height: 1px; background: var(--color-link-rest); transform-origin: 0 50%; }
.js .section__rule { transform: scaleX(0); transition: transform 900ms var(--ease-enter); }
.js .section__head.is-seen .section__rule { transform: none; }
.section__meta { font-size: var(--text-mono-size); color: var(--color-muted); white-space: nowrap; }
.section__more { min-height: 0; }
.comments__intro .section__head { margin-bottom: 0; }
@media (max-width: 40rem) { .section__rule { display: none; } }

.meta > * + * { padding-left: var(--space-2); border-left: 1px solid var(--color-link-rest); }
.meta__date { color: var(--color-accent-ink); font-weight: 500; }
.lead__kicker { display: flex; align-items: baseline; gap: var(--space-3); }
.eyebrow { font-family: var(--font-mono); font-size: var(--text-mono-size); font-weight: 500; letter-spacing: 0; }
.breadcrumbs { font-family: var(--font-mono); font-size: var(--text-mono-size); }

.marks--hover::before, .marks--hover::after { opacity: 0; }
.tile:hover .marks--hover::before { opacity: 1; transform: translate(-2px, -2px); transition-duration: var(--m-in); }
.tile:hover .marks--hover::after { opacity: 1; transform: translate(2px, 2px); transition-duration: var(--m-in); }

/* Code reads like a terminal. */
.code, .prose pre { background: var(--color-primary); color: var(--color-on-primary); }
.code { border-color: var(--color-primary-hover); }
.code__bar { border-bottom-color: var(--color-primary-hover); color: var(--color-link-rest); }
.code .icon-btn--sm { color: var(--color-on-primary); }
.code .icon-btn--sm:hover { background: var(--color-glass-hover); border-color: transparent; }
.code .icon-swap__b { color: var(--color-accent); }
.prose pre code { color: inherit; }
.prose pre::selection, .prose pre *::selection { background: var(--color-primary-hover); color: var(--color-on-primary); }

/* Tables and the small headings carry the same weight as the rest of the text. */
.prose table { font-size: 1.0625rem; line-height: 1.6; }
.prose th, .prose td { padding: var(--space-3); vertical-align: top; }
.prose th, .prose tbody tr:first-child:has(strong) td { color: var(--color-heading); font-weight: 700; border-bottom: 2px solid var(--color-heading); background: none; }
.prose td strong { background: none; }
.prose td:first-child strong, .prose td:first-child b { color: var(--color-heading); }
.prose tbody tr:nth-child(even) { background: var(--color-well); }
.prose h4, .prose h5, .prose h6 { display: flex; align-items: baseline; gap: var(--space-2); margin-top: var(--space-5); color: var(--color-heading); font-weight: 700; }
.prose h4 { font-size: 1.375rem; line-height: 1.3; }
.prose h5 { font-size: 1.25rem; line-height: 1.35; }
.prose h6 { font-size: 1.125rem; line-height: 1.4; }
.prose :is(h4, h5, h6)::before { content: ""; flex-shrink: 0; width: 12px; height: 3px; border-radius: 2px; background: var(--color-accent); align-self: center; }

/* The sparkline's axis and labels. */
.spark__axis { fill: none; stroke: var(--color-primary-hover); stroke-width: 1; }
.spark__label { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); width: 200px; }

/* The hero photograph decodes: a navy frame types the picture's line and fills a bar, then the
   picture scans in from top to bottom in ten bands. Once per page, under 1.3s, none with reduced motion. */
.decode { position: relative; background: var(--color-primary); }
.decode__veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--space-3);
  background-color: var(--color-primary);
  background-image: linear-gradient(var(--color-grid-dark) 1px, transparent 1px), linear-gradient(90deg, var(--color-grid-dark) 1px, transparent 1px);
  background-size: 24px 24px;
  color: var(--color-well-cool);
  opacity: 0;
  pointer-events: none;
}
.decode__line { display: inline-flex; align-items: center; min-height: 1.4em; font-size: var(--text-mono-size); white-space: pre; }
.decode__bar { position: relative; display: block; height: 2px; overflow: hidden; background: var(--color-glass-edge); }
.decode__bar::after { content: ""; position: absolute; inset: 0; background: var(--color-accent); transform: scaleX(0); transform-origin: 0 50%; }
@keyframes hl-scan { from { clip-path: inset(0 0 100% 0); } to { clip-path: inset(0 0 0 0); } }
@media (prefers-reduced-motion: no-preference) {
  html.js.m-enter:not(.m-enter-done) .decode img { clip-path: inset(0 0 100% 0); }
  html.js.m-enter:not(.m-enter-done) .decode__veil { opacity: 1; }
  .js .decode.is-decoding img { clip-path: inset(0 0 100% 0); }
  .js .decode.is-decoding .decode__veil { opacity: 1; }
  .js .decode.is-decoding .decode__line::after { content: ""; display: inline-block; width: 7px; height: 1em; margin-left: var(--space-1); background: var(--color-accent); }
  .js .decode.is-decoding .decode__bar::after { animation: hl-line 800ms var(--ease-io) both 150ms; }
  .js .decode.is-decoded img { animation: hl-scan 560ms steps(10, end) both; }
  .js .decode.is-decoded .decode__veil { opacity: 0; transition: opacity 240ms var(--ease) 320ms; }
}

/* Heading anchors: a # that appears beside a section heading and copies its link ----------------- */

.post-body .prose :is(h2, h3)[id] { position: relative; }
.h-anchor {
  position: absolute;
  left: -1.4em;
  bottom: 0.1em;
  padding-inline: 0.2em;
  color: var(--color-muted);
  font-family: var(--font-mono);
  font-size: 0.7em;
  font-weight: 500;
  text-decoration: none;
  opacity: 0;
  transition: opacity var(--m-out) var(--ease), color var(--m-out) var(--ease);
}
.post-body .prose :is(h2, h3):hover .h-anchor, .h-anchor:focus-visible { opacity: 1; }
.h-anchor:hover { color: var(--color-accent-ink); }
.h-anchor.is-done { color: var(--color-accent-ink); opacity: 1; }
@media (hover: none), (max-width: 75rem) { .h-anchor { display: none; } }

/* Marked phrases in the quotation: orange, with a rule that draws under them once the letters fill -- */

.quote-hi { background: linear-gradient(var(--color-accent), var(--color-accent)) no-repeat 0 100% / 100% 3px; color: var(--color-accent-ink); }
.quote-svg__hi { fill: var(--color-accent-ink); stroke: var(--color-accent-ink); }
.quote-svg__rule { fill: var(--color-accent); transform-box: fill-box; transform-origin: 0 50%; }
.js [data-svg-quote] .quote-svg__rule { transform: scaleX(0); }
.js [data-svg-quote].is-drawn .quote-svg__rule { animation: hl-quote-rule 600ms var(--ease-enter) both; animation-delay: calc(var(--i, 0) * 240ms + 1.5s); }
@keyframes hl-quote-rule { to { transform: none; } }

/* Tag box on a category: the tags used in this subject, a bar for how often, no counts ----------- */

.archive-header__text { display: flex; flex-direction: column; align-items: flex-start; gap: var(--space-3); }
.tagbox { width: 100%; padding: var(--space-4); border: 1px solid var(--color-link-rest); border-radius: var(--radius-md); background: var(--color-paper); }
.tagbox__title { margin-bottom: var(--space-3); font-family: var(--font-mono); font-size: var(--text-mono-size); color: var(--color-muted); }
.tagbox__list { display: grid; gap: var(--space-1); margin: 0; padding: 0; list-style: none; }
.tagbox__link {
  display: grid;
  grid-template-columns: minmax(0, 12rem) minmax(0, 1fr);
  gap: var(--space-3);
  align-items: center;
  min-height: 32px;
  color: var(--color-heading);
  font-size: var(--text-small-size);
  font-weight: 600;
  text-decoration: none;
}
.tagbox__name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; transition: color var(--m-out) var(--ease); }
.tagbox__bar { position: relative; height: 6px; overflow: hidden; border-radius: 3px; background: var(--color-well); }
.tagbox__bar::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 0;
  width: calc(max(var(--w, 0), 0.06) * 100%);
  border-radius: inherit;
  background: var(--color-link);
  transform-origin: 0 50%;
  transition: background-color var(--m-out) var(--ease);
}
.js [data-draw] .tagbox__bar::after { transform: scaleX(0); }
.js [data-draw].is-seen .tagbox__bar::after { transform: none; transition: transform 700ms var(--ease-enter) calc(var(--i, 0) * 70ms + 240ms), background-color var(--m-out) var(--ease); }
.tagbox__link:hover .tagbox__name, .tagbox__link:focus-visible .tagbox__name { color: var(--color-accent-ink); transition-duration: var(--m-in); }
.tagbox__link:hover .tagbox__bar::after, .tagbox__link:focus-visible .tagbox__bar::after { background: var(--color-accent); transition-duration: var(--m-in); }
.index .index__item { transition: opacity var(--m-out) var(--ease); }
.index.is-filtering .index__item:not(.is-hit) { opacity: 0.3; }
.index.is-filtering .index__item.is-hit::before { transform: none; }
.index.is-filtering .index__item.is-hit .index__title a { background-position: 0 100%; background-size: 100% var(--ul); }
.index__caption { display: flex; gap: var(--space-3); }
@media (min-width: 60.0625rem) {
  .band--head { min-height: 26rem; } /* one height for every archive head, whatever it holds, so the title sits at the same place on each page */
  .archive-header--split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: var(--space-6); align-items: start; }
}
@media (max-width: 60rem) {
  .tagbox { margin-top: var(--space-2); }
}
@media (pointer: coarse) { .tagbox__link { min-height: 40px; } }

/* Most read: a ranked list whose rows carry a bar for their share of the top count --------------- */

.rank { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--color-rule); }
.rank__item { position: relative; border-bottom: 1px solid var(--color-rule); }
.rank__item::before {
  content: "";
  position: absolute;
  inset: var(--space-1) auto var(--space-1) 0;
  width: calc(max(var(--w, 0), 0.04) * 100%);
  background: var(--color-well-cool);
  transform-origin: 0 50%;
  transition: background-color var(--m-out) var(--ease);
}
.js [data-draw] .rank__item::before { transform: scaleX(0); }
.js [data-draw].is-seen .rank__item::before { transform: none; transition: transform 900ms var(--ease-enter) calc(var(--i, 0) * 90ms), background-color var(--m-out) var(--ease); }
.rank__item:hover::before { background: var(--color-mark); transition-duration: var(--m-in); }
.rank__link {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto minmax(13ch, auto);
  gap: var(--space-4);
  align-items: baseline;
  padding: var(--space-3);
  color: var(--color-heading);
  text-decoration: none;
}
.rank__title { font-weight: 600; transition: color var(--m-out) var(--ease); }
.rank__item:hover .rank__title { color: var(--color-link); transition-duration: var(--m-in); }
.rank__cat { font-size: var(--text-small-size); color: var(--color-muted); }
.rank__date { font-size: var(--text-mono-size); font-weight: 500; color: var(--color-accent-ink); }
.rank__views { font-size: var(--text-mono-size); color: var(--color-muted); text-align: right; }
@media (max-width: 40rem) {
  .rank__link { grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-1) var(--space-3); }
  .rank__title { grid-column: 1 / -1; }
  .rank__cat { display: none; }
  .rank__views { text-align: left; }
}

/* The citation at the end of an article: one ledger row, label / reference / copy ---------------- */

.cite { display: grid; grid-template-columns: minmax(0, 10rem) minmax(0, 1fr) auto; gap: var(--space-2) var(--space-4); align-items: start; padding-block: var(--space-3); border-bottom: 1px solid var(--color-rule); }
.cite__label { font-weight: 600; color: var(--color-heading); }
.cite__text { color: var(--color-muted); font-size: var(--text-small-size); line-height: var(--text-small-line); }
.cite__title { font-style: normal; font-weight: 600; color: var(--color-heading); }
.cite__url { display: inline-block; margin-top: var(--space-1); color: var(--color-link); text-decoration: none; overflow-wrap: anywhere; transition: color var(--m-out) var(--ease); }
.cite__url:hover { color: var(--color-heading); text-decoration: underline; text-underline-offset: 0.2em; }
.cite__tools { position: relative; display: flex; justify-content: flex-end; }
.cite__status { position: absolute; bottom: 100%; right: 0; margin-bottom: var(--space-1); font-family: var(--font-mono); font-size: var(--text-mono-size); color: var(--color-accent-ink); white-space: nowrap; } /* sits in the gap above the button, over no text */
@media (max-width: 40rem) {
  .cite { grid-template-columns: minmax(0, 1fr) auto; align-items: center; }
  .cite__tools { grid-area: 1 / 2; }
  .cite__text { grid-area: 2 / 1 / 3 / 3; }
}

/* Tag pages: the categories the tag lives in, as chips under the title ----------------------------- */

.archive-cats { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); margin-top: var(--space-2); }
.archive-cats__label { font-family: var(--font-mono); font-size: var(--text-mono-size); color: var(--color-muted); }

/* The tag box shows five tags; the rest unfold on "Xem thêm" ------------------------------------- */

.tagbox__more { display: inline-flex; align-items: center; gap: var(--space-1); min-height: 36px; margin-top: var(--space-2); padding: 0; border: 0; background: none; color: var(--color-link); font-size: var(--text-small-size); font-weight: 600; cursor: pointer; transition: color var(--m-out) var(--ease); }
.tagbox__more .icon { width: 16px; height: 16px; transition: transform var(--m-out) var(--ease); }
.tagbox__more[aria-expanded="true"] .icon { transform: rotate(90deg); }
.tagbox__more:hover { color: var(--color-heading); transition-duration: var(--m-in); }
.tagbox__item.is-revealed { animation: hl-fade-up 400ms var(--ease-enter) both; animation-delay: calc(var(--k, 0) * 50ms); }
.js [data-draw].is-seen .tagbox__item.is-revealed .tagbox__bar::after { animation: hl-bar-grow 600ms var(--ease-enter) both; animation-delay: calc(var(--k, 0) * 50ms + 120ms); }
@keyframes hl-bar-grow { from { transform: scaleX(0); } }
.no-js .tagbox__item[hidden] { display: block; }
.no-js .tagbox__more { display: none; }

/* Motion preferences ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .hl-armed .hw { color: var(--color-heading); }
  .palette__scrim { -webkit-backdrop-filter: none; backdrop-filter: none; }
  .js .spark__line { stroke-dashoffset: 0; }
  .js .spark__dot { opacity: 1; }
  .js [data-draw] .tagbox__bar::after, .js [data-draw] .rank__item::before, .js [data-svg-quote] .quote-svg__rule { transform: none; }
}
