@font-face {
  font-family: "DM Sans";
  font-style: normal;
  font-weight: 100 1000;
  font-display: swap;
  src: url("fonts/dmsans-latin.woff2") format("woff2");
}

@font-face {
  font-family: Fraunces;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("fonts/fraunces-latin.woff2") format("woff2");
}

:root {
  color-scheme: light;
  --paper: #f6f1e8;
  --ink: #183e36;
  --soft: #526155;
  --accent: #b84226;
  --accent-hover: #8b2e19;
  --line: #d8cbb7;
  --wash: #ece6da;
  --code: #18352f;
  --reading-width: min(68ch, 720px);
  --font-body: "DM Sans", sans-serif;
  --font-display: Fraunces, Georgia, serif;
  --ease: cubic-bezier(.16, 1, .3, 1);
  font-synthesis: none;
  scrollbar-color: var(--soft) var(--paper);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 32px; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 18px/1.7 var(--font-body); }
::selection { background: #e5c9b6; color: var(--ink); }
a { color: var(--accent); text-underline-offset: .22em; text-decoration-thickness: 1px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 5px; }
button { font: inherit; cursor: pointer; }
button, a { -webkit-tap-highlight-color: #e5c9b6; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { text-wrap: balance; }
.rail { width: min(1248px, calc(100% - 96px)); margin-inline: auto; }
.icon { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; vertical-align: -.2em; flex-shrink: 0; }
.skip-link { position: absolute; top: 12px; left: 12px; padding: 10px 18px; background: var(--ink); color: var(--paper); z-index: 10; transform: translateY(-180%); }
.skip-link:hover, .skip-link:focus { color: var(--paper); }
.skip-link:focus { transform: none; }
.site-header { min-height: 110px; display: flex; align-items: center; justify-content: space-between; gap: 32px; border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; font: 500 36px/1.2 var(--font-display); letter-spacing: -.03em; text-decoration: none; color: var(--ink); }
.brand:hover { color: var(--accent); }
.brand-mark { fill: none; stroke: currentColor; stroke-linecap: round; stroke-width: 2; }
.site-header nav { display: flex; gap: 36px; font-size: 16px; }
.site-header nav a { display: inline-block; color: var(--ink); padding-block: 12px; text-decoration: none; }
.site-header nav a:hover, .site-header nav [aria-current] { color: var(--accent); text-decoration: underline; text-underline-offset: 7px; }
.introduction { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 44px; padding-block: 70px 62px; }
.introduction h1 { max-width: 950px; font: 400 clamp(48px, 6vw, 86px)/1.08 var(--font-display); letter-spacing: -.035em; }
.introduction h1 span { color: var(--accent); }
.introduction p { margin-top: 26px; color: var(--soft); font-size: 22px; line-height: 1.65; max-width: 56ch; }
.voice-mark { width: clamp(72px, 10vw, 126px); height: auto; margin-right: 18px; transform: rotate(-8deg); stroke: var(--accent); stroke-width: 5; fill: none; stroke-linecap: round; flex-shrink: 0; }
.section-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 24px; border-top: 1px solid var(--line); padding-top: 26px; }
.section-heading h2 { font-size: 23px; font-weight: 500; }
.section-heading > a { font-size: 15px; }
.post-entry { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 60px; padding-block: 34px 48px; }
.post-meta { color: var(--soft); font-size: 15px; display: flex; flex-direction: column; gap: 8px; }
.post-summary h3 { max-width: 27ch; font: 500 clamp(32px, 3vw, 42px)/1.2 var(--font-display); letter-spacing: -.025em; }
.post-summary h3 a { color: var(--ink); text-decoration: none; }
.post-summary h3 a:hover { color: var(--accent); text-decoration: underline; }
.post-summary > p { max-width: 66ch; margin-top: 20px; font-size: 19px; color: var(--soft); }
.article-link { display: inline-flex; gap: 12px; align-items: center; margin-top: 23px; font-size: 17px; }
.start-note { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; border-top: 1px solid var(--line); padding-block: 28px 48px; font-size: 17px; }
.start-note p { color: var(--soft); }
.site-footer { border-top: 1px solid var(--line); padding-block: 32px 40px; display: flex; justify-content: space-between; gap: 32px; font-size: 14px; }
.footer-brand { font: 500 26px/1.3 var(--font-display); color: var(--ink); text-decoration: none; }
.site-footer p { margin-top: 7px; color: var(--soft); }
.site-footer nav { display: flex; gap: 24px; flex-wrap: wrap; align-items: start; }
.site-footer nav a { color: var(--soft); padding-block: 8px; }
.back-link { display: inline-flex; align-items: center; gap: 10px; font-size: 15px; }
.article-header { margin-left: 280px; max-width: var(--reading-width); padding-block: 48px 44px; }
.article-header h1 { margin-top: 28px; font: 400 clamp(40px, 4.4vw, 62px)/1.12 var(--font-display); letter-spacing: -.03em; }
.article-deck { margin-top: 24px; font-size: 21px; line-height: 1.6; color: var(--soft); }
.article-author { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 24px; margin-top: 24px; font-size: 14px; }
.article-author > span { white-space: nowrap; }
.author-profiles { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.author-profiles a { display: inline-flex; align-items: center; gap: 7px; min-height: 32px; padding-block: 4px; }
.profile-icon { flex-shrink: 0; fill: currentColor; }
.article-byline { display: flex; flex-wrap: wrap; gap: 8px 24px; margin-top: 10px; font-size: 14px; color: var(--soft); }
.article-grid { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 60px; align-items: start; }
.contents { position: sticky; top: 32px; padding-top: 8px; font-size: 14px; }
.contents details { border-top: 1px solid var(--line); padding-top: 15px; }
.contents summary { cursor: pointer; font-weight: 600; padding-block: 6px; }
.contents ol { list-style: none; margin: 12px 0 0; padding: 0; }
.contents li + li { margin-top: 9px; }
.contents a { display: block; color: var(--soft); text-decoration: none; padding-block: 4px; }
.contents a:hover { color: var(--accent); text-decoration: underline; }
.prose { width: 100%; max-width: var(--reading-width); min-width: 0; font-size: 19px; line-height: 1.8; }
.prose > p + p { margin-top: 23px; }
.prose h2 { margin-top: 54px; margin-bottom: 20px; font: 500 32px/1.25 var(--font-display); letter-spacing: -.02em; scroll-margin-top: 30px; }
.prose strong { font-weight: 650; }
.prose code { font-family: ui-monospace, SFMono-Regular, Consolas, monospace; font-size: .86em; }
.prose :not(pre) > code { background: var(--wash); border-radius: 3px; padding: .13em .25em; overflow-wrap: anywhere; }
.prose pre { position: relative; margin-block: 24px; padding: 28px; background: var(--code); color: var(--paper); border-radius: 12px; overflow-x: auto; scrollbar-color: var(--line) var(--code); }
.prose pre.has-copy { padding-top: 56px; }
.prose pre .token.comment { color: #a3b3aa; }
.prose pre .token.atom, .prose pre .token.symbol, .prose pre .token.attr-name { color: #e9b4a4; }
.prose pre .token.string, .prose pre .token.regex { color: #dfd69b; }
.prose pre .token.keyword, .prose pre .token.boolean, .prose pre .token.class-name { color: #b5d5cf; }
.prose pre .token.function, .prose pre .token.builtin, .prose pre .token.number { color: #ecc18c; }
.prose pre .token.variable, .prose pre .token.operator { color: #d2c4e1; }
.prose pre .token.punctuation { color: #c7d2c8; }
.copy-code { position: absolute; top: 10px; right: 12px; color: var(--paper); border: 1px solid #809c8e; border-radius: 5px; padding: 4px 14px; background: transparent; font-size: 14px; min-height: 36px; }
.copy-code:hover { background: #31554a; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.article-next { margin: 64px 0 64px 280px; max-width: var(--reading-width); padding-top: 32px; border-top: 1px solid var(--line); }
.article-next h2 { font: 400 38px/1.2 var(--font-display); letter-spacing: -.025em; }
.article-next p { margin-top: 16px; max-width: 55ch; color: var(--soft); }
.article-next > a { display: inline-block; margin-top: 18px; }
.simple-main { width: min(68ch, calc(100% - 96px)); margin: 54px auto 80px; }
.simple-main h1 { margin-block: 28px; font: 400 clamp(40px, 5vw, 60px)/1.15 var(--font-display); letter-spacing: -.03em; }
.not-found { min-height: 50vh; }
.not-found > p { max-width: 50ch; margin-block: 24px; color: var(--soft); }
.session-figure { margin: 40px 0; padding: 28px; background: var(--wash); border-radius: 12px; }
.session-figure h3 { font: 500 25px/1.3 var(--font-display); letter-spacing: -.015em; }
.flow-stage { padding-top: 32px; }
.flow-row { display: grid; grid-template-columns: 1fr 26px 1fr 26px 1fr; align-items: stretch; }
.flow-node { padding: 12px 6px; text-align: center; border-block: 1px solid #b0b5a5; transition: background-color 300ms var(--ease), color 300ms var(--ease); }
.flow-node span { display: block; font-size: 16px; font-weight: 650; }
.flow-node small { display: block; font-size: 12px; line-height: 1.6; margin-top: 7px; }
.flow-node.coordinator { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.flow-route { position: relative; align-self: center; height: 10px; display: grid; gap: 5px; }
.flow-route::before, .flow-route::after { content: ""; display: block; width: 100%; height: 1px; background: #738577; }
.flow-route i { position: absolute; width: 6px; height: 6px; background: var(--accent); border-radius: 50%; opacity: 0; top: -2px; }
.flow-route i + i { top: 7px; right: 0; }
.backend-route { width: 1px; height: 28px; margin-inline: auto; background: #738577; position: relative; }
.backend-route i { position: absolute; width: 6px; height: 6px; left: -2px; border-radius: 50%; background: var(--accent); opacity: 0; }
.flow-node.backend { width: calc((100% - 52px) / 3); margin-inline: auto; }
.flow-stage[data-step="listen"] .channel,
.flow-stage[data-step="speak"] .provider,
.flow-stage[data-step="work"] .backend,
.flow-stage[data-step="result"] .backend { background: #d6dfcc; }
.flow-stage[data-step="delegate"] .backend { background: #e9d1bd; }
.flow-stage.is-playing .flow-route i { opacity: 1; animation: signal 1500ms var(--ease) infinite; }
.flow-stage.is-playing .flow-route i + i { animation-name: signal-back; }
.flow-stage.is-playing[data-step="delegate"] .backend-route i,
.flow-stage.is-playing[data-step="result"] .backend-route i { opacity: 1; animation: backend-signal 1500ms var(--ease) infinite; }
.flow-stage.is-playing[data-step="result"] .backend-route i { animation-direction: reverse; }
@keyframes signal { from { transform: translateX(0); } to { transform: translateX(22px); } }
@keyframes signal-back { from { transform: translateX(0); } to { transform: translateX(-22px); } }
@keyframes backend-signal { from { transform: translateY(0); } to { transform: translateY(22px); } }
.flow-caption { font-size: 16px; line-height: 1.65; min-height: 5em; margin-top: 25px; }
.flow-controls { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 18px; }
[hidden] { display: none !important; }
.flow-controls button { min-height: 44px; border: 1px solid var(--ink); background: transparent; color: var(--ink); border-radius: 5px; padding: 8px 14px; font-size: 14px; }
.flow-controls .flow-play { background: var(--ink); color: var(--paper); }
.flow-controls button:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }
.flow-step { font-size: 13px; color: var(--soft); margin-left: auto; font-variant-numeric: tabular-nums; }
.session-figure figcaption { font-size: 13px; line-height: 1.7; color: var(--soft); margin-top: 18px; }

@media (max-width: 1100px) {
  .article-grid, .post-entry { grid-template-columns: 190px minmax(0, 1fr); gap: 36px; }
  .article-header, .article-next { margin-left: 226px; }
  .voice-mark { margin-right: 0; }
  .site-footer { gap: 22px; }
  .site-footer nav { gap: 18px; }
}

@media (max-width: 800px) {
  .rail { width: calc(100% - 48px); }
  .site-header { min-height: 96px; }
  .site-header nav { gap: 24px; }
  .introduction { padding-block: 52px 48px; gap: 20px; }
  .introduction h1 { font-size: clamp(42px, 7.2vw, 58px); }
  .introduction p { font-size: 19px; }
  .voice-mark { width: 76px; }
  .desktop-break { display: none; }
  .post-entry { grid-template-columns: 1fr; gap: 18px; }
  .post-meta { flex-direction: row; flex-wrap: wrap; gap: 8px 24px; font-size: 13px; }
  .post-summary h3 { max-width: 30ch; font-size: 36px; }
  .post-summary > p { font-size: 18px; }
  .article-header, .article-next { margin-left: 0; }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 32px; }
  .article-header { padding-block: 32px; }
  .article-header h1 { max-width: 24ch; }
  .contents { position: static; }
  .contents details { padding-bottom: 14px; border-bottom: 1px solid var(--line); }
  .contents ol { columns: 2; column-gap: 28px; }
  .contents li { break-inside: avoid; }
  .contents li + li { margin-top: 0; }
  .site-footer { flex-direction: column; gap: 18px; }
  .start-note { flex-direction: column; gap: 9px; }
  .simple-main { width: calc(100% - 48px); }
}

@media (max-width: 480px) {
  html { scroll-padding-top: 20px; }
  .rail, .simple-main { width: calc(100% - 40px); }
  .site-header { flex-wrap: wrap; gap: 6px; padding-block: 21px 12px; }
  .brand { font-size: 32px; }
  .brand-mark { width: 27px; height: 27px; }
  .site-header nav { width: 100%; justify-content: space-between; gap: 18px; font-size: 14px; }
  .introduction { padding-block: 38px; }
  .introduction h1 { font-size: clamp(33px, 9vw, 43px); }
  .introduction p { font-size: 17px; margin-top: 22px; }
  .voice-mark { display: none; }
  .section-heading { gap: 18px; padding-top: 20px; }
  .section-heading h2 { font-size: 20px; }
  .section-heading > a { font-size: 13px; white-space: nowrap; }
  .section-heading .icon { display: none; }
  .post-entry { padding-block: 24px 34px; }
  .post-summary h3 { font-size: 32px; }
  .post-summary > p { font-size: 17px; margin-top: 16px; }
  .article-header h1 { font-size: 40px; margin-top: 24px; }
  .article-deck { font-size: 19px; }
  .article-byline { font-size: 13px; gap: 8px 16px; }
  .contents ol { columns: 1; }
  .prose { font-size: 18px; line-height: 1.8; }
  .prose h2 { font-size: 29px; margin-top: 44px; }
  .prose pre { padding: 24px 16px; }
  .article-next h2 { font-size: 34px; }
  .site-footer nav { column-gap: 20px; row-gap: 6px; font-size: 13px; }
  .session-figure { padding: 20px 16px; }
  .session-figure h3 { font-size: 24px; }
  .flow-row { grid-template-columns: 1fr 14px 1fr 14px 1fr; }
  .flow-node { padding: 10px 4px; }
  .flow-node span { font-size: 14px; }
  .flow-node small { font-size: 12px; margin-top: 6px; }
  .flow-route i { display: none; }
  .flow-node.backend { width: calc((100% - 28px) / 3); }
  .backend-route { height: 20px; }
  .flow-caption { min-height: 8em; }
  .flow-step { width: 100%; margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
