:root {
  color-scheme: light;
  --paper: #f5efe2;
  --surface: #fffdf8;
  --ink: #17140d;
  --muted: #514639;
  --teal: #12b3a4;
  --coral: #ff5b57;
  --sun: #ffc531;
  --violet: #6b5be6;
  --sky: #3aa0ff;
  --accent: var(--sun);
  --signal: #493b9b;
  --line: 2px solid var(--ink);
  --line-heavy: 3px solid var(--ink);
  --divider: #aa9c87;
  --shadow-tight: 3px 3px 0 var(--ink);
  --shadow: 5px 5px 0 var(--ink);
  --shadow-large: 9px 9px 0 var(--ink);
  --corner: 14px;
  font: 16px/1.65 system-ui, "Microsoft YaHei", sans-serif;
  color: var(--ink);
  background: var(--paper);
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--signal); outline-offset: 4px; }
img { max-width: 100%; }
h1, h2, h3, p { margin: 0; }
h1, h2, h3 { line-height: 1.22; }
h1 { font-size: clamp(2rem, 6vw, 4.8rem); font-weight: 850; }
h2 { font-size: clamp(1.35rem, 3vw, 2rem); }

.skip-link { position: absolute; z-index: 8; top: .5rem; left: .5rem; padding: .5rem 1rem; border: var(--line); background: var(--surface); transform: translateY(-150%); }
.skip-link:focus { transform: none; }
.site-header { background: var(--paper); }
.header-inner, .site-main { width: min(74rem, 100% - 2rem); margin-inline: auto; }
.header-inner { display: grid; grid-template-columns: minmax(0, 1fr) max-content minmax(0, 1fr); align-items: center; column-gap: 1.5rem; padding-block: .9rem 1.05rem; }
.brand { display: inline-flex; align-items: center; gap: .75rem; justify-self: start; text-decoration: none; white-space: nowrap; }
.brand img { object-fit: contain; image-rendering: pixelated; border: var(--line); border-radius: 10px; background: var(--sun); box-shadow: var(--shadow-tight); }
.brand-wordmark { font-size: clamp(1rem, 3vw, 1.24rem); font-weight: 880; }
.brand-ai { padding-inline: .1em; text-decoration: underline solid var(--teal) .17em; text-underline-offset: .12em; }
.preview-label { font-size: .8rem; color: var(--muted); white-space: nowrap; }
.site-nav { display: grid; grid-column: 2 / -1; grid-template-columns: subgrid; align-items: center; }
.site-nav-links, .site-nav-tools { display: flex; align-items: center; }
.site-nav-links { justify-content: center; gap: clamp(1.5rem, 4vw, 2.375rem); }
.site-nav-tools { justify-content: flex-end; gap: .65rem; }
.site-nav a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: .25rem; font-size: .95rem; font-weight: 560; text-decoration: none; text-underline-offset: .26em; white-space: nowrap; transition: color .18s ease; }
.site-nav a:is(:hover, :active) { color: #9f3027; }
.site-nav a[aria-current="page"] { font-weight: 760; text-decoration: underline; }
.site-nav a:focus-visible { outline-offset: 2px; }

.site-main { padding-block: clamp(2rem, 5vw, 3.5rem) 5.5rem; }
.reading-list { margin-top: clamp(1.75rem, 4vw, 3.25rem); }
.article-search { margin-top: clamp(1.35rem, 3vw, 2.4rem); display: grid; gap: .35rem; }
.article-search label { font-weight: 700; }
.article-search input { width: min(34rem, 100%); min-height: 2.75rem; box-shadow: 3px 3px 0 var(--ink); border-radius: 10px; }
.article-search + .reading-list { margin-top: 1.6rem; }
.support-product-choices { display: flex; flex-wrap: wrap; gap: .45rem; margin-top: .55rem; }
.section-heading { display: flex; flex-wrap: wrap; align-items: baseline; gap: .5rem 1rem; margin-bottom: 1rem; }
.quiet-label { color: var(--muted); font-size: .875rem; font-weight: 600; }
.page-intro { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem; margin-bottom: 1.5rem; }
.page-intro h1 { text-decoration: underline solid var(--teal) .15em; text-underline-offset: .08em; text-decoration-skip-ink: none; }
.section-heading h2 { border-inline-start: 8px solid var(--coral); padding-inline-start: .45rem; }
.article-categories { display: flex; flex-wrap: wrap; gap: .45rem; margin-inline-start: auto; }
.article-categories a, .filters a { display: inline-flex; align-items: center; min-height: 44px; padding: .25rem .85rem; border: var(--line); border-radius: 999px; background: var(--surface); text-decoration: none; font-weight: 710; }
.article-categories a[aria-current="page"], .filters a[aria-current] { background: var(--sun); }
.course-return { display: inline-block; margin-inline-end: .5rem; text-decoration: none; }
.course-return:hover { text-decoration: underline; }
.course-neighbors { display: flex; flex-wrap: wrap; gap: .65rem; }
.panel { padding: clamp(1rem, 3vw, 2rem); border: var(--line); border-radius: var(--corner); background: var(--surface); box-shadow: var(--shadow); }
.projects-list { display: grid; gap: clamp(1.25rem, 3vw, 2rem); }
.project-card { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(1rem, 4vw, 3rem); }
.project-details { display: flex; flex-direction: column; align-items: flex-start; gap: 1rem; }
.project-card-heading { display: flex; align-items: center; gap: .9rem; }
.project-logo { display: grid; flex: none; place-items: center; width: 4.25rem; aspect-ratio: 1; border: var(--line); border-radius: 12px; background: var(--sun); box-shadow: var(--shadow-tight); }
.project-logo img { object-fit: contain; }
.project-card:nth-child(2) .project-logo { background: var(--teal); }
.project-card p { color: var(--muted); }
.project-card .button { display: inline-flex; align-items: center; gap: .45rem; min-height: 44px; }
.project-visual { display: grid; place-items: center; aspect-ratio: 8 / 5; min-width: 0; margin: 0; overflow: hidden; border: var(--line); border-radius: 12px; box-shadow: var(--shadow-tight); }
.project-visual img { display: block; width: 100%; height: 100%; object-fit: contain; }
.project-visual--cook { background: #f4f4f5; }
.project-visual--daily { background: color-mix(in srgb, var(--teal) 20%, var(--surface)); }
.project-visual--daily img { min-height: 0; padding: .65rem; }
.empty-state { color: var(--muted); }
.tag { width: fit-content; background: var(--accent); padding: .15rem .6rem; border: var(--line); border-radius: 999px; font-size: .85rem; font-weight: 700; }
.article-list { display: grid; gap: 1rem; }
.home-articles { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.home-article { padding: 0; overflow: hidden; }
.article-cover, .product-cover { position: relative; isolation: isolate; display: flex; align-items: center; gap: .75rem; min-height: 5.5rem; padding: .9rem 1.35rem; color: var(--ink); background: var(--sun); border-bottom: var(--line); }
.article-cover::after { position: absolute; z-index: -1; right: 9%; bottom: -.95rem; width: 4.3rem; aspect-ratio: 1; border: .65rem double var(--ink); border-radius: 50%; content: ""; }
.article-cover-fallback, .product-cover img { padding: .45rem; width: 2.9rem; height: 2.9rem; background: var(--surface); border: var(--line); border-radius: 8px; box-shadow: var(--shadow-tight); }
.article-cover:has(.article-cover-image[src]) { aspect-ratio: 16 / 9; overflow: hidden; }
.article-cover-image { position: absolute; inset: 0; display: block; width: 100%; height: 100%; object-fit: cover; }
.article-cover--detail { margin-top: 1.15rem; border: var(--line); border-radius: var(--corner); box-shadow: var(--shadow); }
.article-cover--detail .article-cover-image { object-fit: contain; background-color: var(--surface); }
.home-article:nth-child(3n+2) .article-cover { background: var(--teal); }
.home-article:nth-child(3n+3) .article-cover { background: var(--coral); }
.home-article:nth-child(3n+2) .article-cover::after { border-radius: 0 100% 0 0; right: 12%; }
.home-article:nth-child(3n+3) .article-cover::after { border-radius: 4px; transform: rotate(31deg); width: 3.7rem; right: 12%; }
.article-card-body, .product-card-body { display: grid; gap: .5rem; padding: 1.25rem 1.5rem; }
.article-meta { display: flex; align-items: center; gap: .4rem .75rem; flex-wrap: wrap; font-size: .82rem; }
.article-topic { color: var(--signal); font-weight: 700; }
.article-card h3 { font-size: clamp(1.2rem, 2.7vw, 1.55rem); }
.article-card a, .product-card h2 a { text-decoration: none; }
.article-card a:hover, .product-card h2 a:hover { color: var(--signal); text-decoration: underline; text-underline-offset: .22em; }
.article-card time, .article-heading time { font-variant-numeric: tabular-nums; color: var(--muted); }
.article-card p, .product-card p { color: var(--muted); }
.article-detail { max-width: 48rem; margin-inline: auto; }
.article-detail:not(.article-detail--regular) { overflow-wrap: anywhere; }
.article-heading { margin-bottom: 1.5rem; }
.article-heading h1 { margin-block: .6rem; font-size: clamp(2rem, 6vw, 3.8rem); text-wrap: balance; }
.article-detail--regular .article-heading h1, .article-toc a { overflow-wrap: break-word; }
.article-heading::after { display: block; width: 4.25rem; height: .5rem; margin-top: .9rem; background: var(--teal); border: 1px solid var(--ink); content: ""; transform: rotate(-2deg); }
.article-body { line-height: 1.85; }
.article-body h2 { border-inline-start: 6px solid var(--sun); padding-inline-start: .45rem; }
.article-body :where(h1, h2, h3, h4, h5, h6, p, pre, ul, ol, figure, blockquote) + * { margin-top: 1em; }
.article-body :where(pre, table) { display: block; overflow-x: auto; }
.article-body img { height: auto; }
.article-body .article-inline-image { display: block; max-width: 100%; margin-inline: auto; border-radius: 8px; }
.article-detail--reading { max-width: 48rem; }
.article-detail--reading > * { min-width: 0; }
.article-toc { border: 1px solid var(--divider); border-radius: 10px; background: var(--surface); color: var(--ink); }
.article-toc ol { display: grid; grid-template-columns: minmax(0, 1fr); gap: .45rem; margin: .6rem 0 0; padding: 0; list-style: none; }
.article-toc a { display: block; color: var(--muted); text-decoration: none; }
.article-toc a:hover, .article-toc a:focus-visible { color: var(--signal); text-decoration: underline; }
.article-toc li:not(.article-toc-level-2) { padding-inline-start: .8rem; font-size: .9em; }
.article-toc li:is(.article-toc-level-4, .article-toc-level-5, .article-toc-level-6) { padding-inline-start: 1.55rem; }
.article-toc--wide { display: none; }
.article-toc--small { margin-bottom: 1rem; padding: .55rem .85rem; }
.article-toc--small summary, .article-toc--wide > p { font-weight: 750; }
.article-toc--small summary { cursor: pointer; }
.article-detail--regular .article-body { line-height: 1.9; line-break: strict; }
.article-detail--regular :is(.article-body, .article-opening) > :where(p, blockquote, ul, ol) { margin-block: 0 1.05em; }
.article-detail--regular .article-body :where(h2, h3, h4, h5, h6, .article-opening)[id] { scroll-margin-top: 1.25rem; }
.article-detail--regular .article-body > :is(h2, h3, h4) { margin-block: 1.75em .65em; }
.article-detail--regular .article-body > :first-child { margin-top: 0; }
.article-detail--regular .article-body > h3 { font-size: clamp(1.15rem, 2.3vw, 1.45rem); }
.article-detail--regular .article-body > h4 { font-size: 1.07rem; }
.article-detail--regular .article-body :where(p, li, td, th, blockquote) a { color: var(--signal); text-decoration-thickness: .075em; text-underline-offset: .18em; overflow-wrap: anywhere; }
.article-detail--regular .article-body :where(p, li, td, th, blockquote, h3, h4) strong { font-weight: 780; }
.article-detail--regular .article-body blockquote { padding: .5rem .85rem; border-inline-start: 4px solid var(--teal); background: #f2f8ee; }
.article-body .article-editorial-list { padding-inline-start: .9rem; list-style: none; border-inline-start: 2px solid #e0d3b6; }
.article-editorial-list li + li { margin-top: .65em; }
.article-detail--regular .article-body :not(pre) > code { padding: .08em .3em; border: 1px solid #c7b8eb; border-radius: 4px; color: #39276d; background: #f2ebff; font-size: .9em; box-decoration-break: clone; overflow-wrap: anywhere; }
.article-table-scroll, .article-code-block { max-width: 100%; margin-block: 1.1rem 1.6rem; border: 1px solid var(--divider); border-radius: 8px; }
.article-table-scroll { overflow-x: auto; }
.article-table-scroll table { display: table; width: 100%; min-width: 28rem; border-collapse: collapse; font-size: .94em; }
.article-table-scroll :is(th, td) { padding: .55rem .7rem; border-bottom: 1px solid #e2d7c2; text-align: start; }
.article-table-scroll th { background: #f7ebcb; }
.article-table-scroll tr:last-child td { border-bottom: 0; }
.article-code-block { background: #f7f1e4; }
.article-code-tools { display: flex; align-items: center; flex-wrap: wrap; gap: .45rem .8rem; padding: .45rem .7rem; border-bottom: 1px solid var(--divider); }
.article-code-tools button { padding: .3rem .65rem; font-size: .88rem; }
.article-code-tools [role="status"] { color: var(--muted); font-size: .88rem; }
.article-code-block pre { margin: 0; padding: .8rem; white-space: pre; overflow-wrap: normal; }
.article-attribution { margin-top: 2rem; padding-top: .9rem; border-top: 1px solid var(--divider); color: var(--muted); }
.article-detail--regular .article-body [id]:target { scroll-margin-top: 1.25rem; }
.article-attribution h2 { font-size: 1.15rem; }
.article-sponsor { width: min(100%, 10rem); margin: 1.5rem auto 0; }
.article-sponsor > p { margin-bottom: .45rem; color: var(--muted); font-size: .86rem; font-weight: 750; }
.article-sponsor a { display: block; border-radius: 6px; }
.article-sponsor img { display: block; width: 100%; height: auto; border-radius: inherit; }
@media (min-width: 70rem) {
  .article-detail--reading { display: grid; grid-template-columns: 14rem minmax(0, 48rem); justify-content: center; column-gap: clamp(1.5rem, 3vw, 3rem); max-width: 100%; }
  .article-detail--reading > :is(.article-heading, .article-body, .article-next) { grid-column: 2; }
  .article-toc--wide { display: block; position: sticky; top: 1rem; grid-column: 1; grid-row: 1 / span 2; align-self: start; max-height: calc(100dvh - 2rem); overflow: auto; padding: .85rem; }
  .article-toc--small { display: none; }
}
@media (min-width: 76rem) {
  .site-main:has(> .article-detail--sponsored) { width: min(84rem, 100% - 2rem); }
  .article-detail--sponsored {
    display: grid; grid-template-columns: minmax(0, 14rem) 48rem 10rem;
    justify-content: center; column-gap: clamp(1rem, 2.3vw, 2.25rem); max-width: 100%;
  }
  .article-detail--sponsored > :is(.article-heading, .article-body, .article-next) { grid-column: 2; }
  .article-detail--sponsored > .article-body { align-self: start; }
  .article-detail--sponsored > .article-sponsor { grid-area: 2 / 3; align-self: start; margin: 0; }
}
.article-next { margin-top: 1.5rem; }
.article-next a span { margin-left: .45rem; }
.article-demo { margin: 1.5rem 0; padding: .8rem; border: var(--line); border-radius: var(--corner); background: var(--surface); overflow: hidden; }
.article-demo iframe { display: block; width: 100%; height: 16rem; border: 0; }
.article-demo--lesson iframe { height: 48rem; }
.article-demo--lesson iframe[src$="/demos/model-answer"] { height: 29rem; }
.article-demo--lesson iframe[src$="/demos/weight-budget"] { height: 54rem; }
.article-detail:has(#model-overview) .article-heading h1 { font-size: clamp(1.85rem, 5vw, 3rem); text-wrap: balance; }
.article-detail:has(#model-overview) .article-heading { margin-bottom: 1rem; }
.article-detail:has(#model-overview) .article-heading > p.tag { display: inline-block; }
.article-detail:has(#model-overview) .article-heading > p:last-child { text-wrap: pretty; }
.article-demo--lesson figcaption { margin-top: .7rem; }
.article-body details { margin-block: .75rem 1rem; border: 1px solid var(--ink); border-radius: 8px; padding: .6rem .85rem; background: var(--paper); }
.article-body details summary { cursor: pointer; font-weight: 700; }
.article-demo figcaption { border-top: 1px solid var(--ink); padding-top: .6rem; font-size: .95rem; }
.filters { display: flex; flex-wrap: wrap; gap: .55rem; }
.sync-time { margin-block: 1rem; color: var(--muted); }
.news-group { margin-top: 1.5rem; overflow-wrap: anywhere; }
.news-group h2 { width: fit-content; margin-bottom: .9rem; padding: .12rem .65rem; background: var(--teal); border: var(--line); box-shadow: var(--shadow-tight); font-size: clamp(1rem, 3.1vw, 1.45rem); }
.news-list { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
.news-card { --news-padding: clamp(1rem, 3vw, 1.5rem); display: grid; grid-template-rows: auto 1fr auto; padding: 0; overflow: hidden; scroll-margin-top: 1rem; }
.news-media { position: relative; aspect-ratio: 16 / 9; background: #f4f4f3; border-bottom: var(--line); }
.news-thumbnail, .news-placeholder { position: absolute; inset: 0; width: 100%; height: 100%; }
.news-thumbnail { display: block; object-fit: cover; }
.news-placeholder { display: grid; place-items: center; background-image: linear-gradient(#e6e7e8 1px, transparent 1px), linear-gradient(90deg, #e6e7e8 1px, transparent 1px); background-size: 8px 8px; }
.news-placeholder-icon { position: relative; width: 30px; height: 24px; border: 3px solid #757b83; background: #f4f4f3; clip-path: polygon(0 3px, 3px 3px, 3px 0, 27px 0, 27px 3px, 30px 3px, 100% 100%, 0 100%); }
.news-placeholder-icon::before { content: ''; position: absolute; inset: 0; background: #757b83; clip-path: polygon(20% 62%, 31% 62%, 31% 50%, 43% 50%, 43% 38%, 56% 38%, 56% 51%, 69% 51%, 69% 62%, 81% 62%, 81% 81%, 20% 81%); }
.news-placeholder-icon::after { content: ''; position: absolute; left: 11px; top: -4px; width: 3px; height: 28px; background: #757b83; box-shadow: 3px 0 #f4f4f3; transform: rotate(42deg); }
.news-media [hidden] { display: none; }
.news-card-body { display: grid; align-content: start; gap: .55rem; padding: var(--news-padding) var(--news-padding) .75rem; }
.news-card-footer { display: flex; align-items: baseline; flex-wrap: wrap; gap: .25rem .8rem; padding: 0 var(--news-padding) var(--news-padding); color: var(--muted); font-size: .82rem; }
.news-card-footer a { color: var(--signal); font-weight: 740; text-underline-offset: .18em; }
.product-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(16rem, 100%), 1fr)); gap: 1rem; }
.product-card { display: grid; grid-template-rows: auto 1fr; padding: 0; overflow: hidden; }
.product-card-body { grid-template-rows: auto 1fr auto; }
.product-card[data-product-type="account"] .product-cover { background: var(--teal); }
.product-card[data-product-type="text"] .product-cover { background: var(--sky); }
.product-cover span { font-weight: 750; }
.product-card h2 { font-size: clamp(1.2rem, 3vw, 1.55rem); }
.product-card-footer { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: .4rem; padding-top: .75rem; border-top: 1px solid var(--divider); }
.product-card-footer strong { font-size: 1.2rem; }
.product-card-footer span { font-size: .85rem; color: var(--muted); }
.store-footer, .breadcrumb { margin-block: 1rem; }
.purchase-panel { max-width: 46rem; }
.facts { margin-block: 0 1rem; display: grid; gap: .5rem; }
.facts div { display: grid; grid-template-columns: minmax(5rem, 1fr) minmax(0, 3fr); gap: .65rem; }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; overflow-wrap: anywhere; }
.purchase-panel > p + .facts { margin-top: .8rem; }
.form-inline, .form-stack { display: flex; align-items: end; gap: .8rem; flex-wrap: wrap; }
.form-stack { flex-direction: column; align-items: start; max-width: 38rem; }
.form-stack label, .form-inline label { display: grid; max-width: 100%; gap: .3rem; font-weight: 650; }
button, input, select, textarea { font: inherit; color: inherit; max-width: 100%; }
input, select, textarea { padding: .35rem .55rem; border: var(--line); border-radius: 8px; background: var(--surface); }
button, .button { display: inline-block; padding: .35rem .75rem; border: var(--line); border-radius: 10px; background: var(--accent); font-weight: 750; text-decoration: none; cursor: pointer; }
button:disabled { opacity: .65; cursor: wait; }

:where(button, .button, .support-launcher, .article-categories a, .filters a) {
  --control-shadow-rest: 3px;
  --control-shadow-depth: var(--control-shadow-rest);
  --control-shadow-pressed: max(1px, calc(var(--control-shadow-rest) - 3px));
  --control-pressed-position: 2px 2px;
  box-shadow: var(--control-shadow-depth) var(--control-shadow-depth) 0 var(--ink);
  transition: translate .16s ease, box-shadow .16s ease;

  &:not(:disabled, [aria-disabled="true"]):is(:active, [data-touch-pressed]) {
    --control-shadow-depth: var(--control-shadow-pressed);
    translate: var(--control-pressed-position);
  }
  @media (hover: hover) {
    &:not(:disabled, [aria-disabled="true"]):hover {
      --control-shadow-depth: var(--control-shadow-pressed);
      translate: var(--control-pressed-position);
    }
  }
  @media (prefers-reduced-motion: reduce) {
    --control-pressed-position: none;
    transition: none;
  }
  &:is(:disabled, [aria-disabled="true"]) { transition: none; }
}
.delivery { margin-top: 1rem; }
.delivery > p { margin-block: .55rem; }
.delivery-unit { padding-top: .85rem; margin-top: .85rem; border-top: 1px solid var(--ink); }
.delivery-field code { display: inline-block; padding: .1rem .4rem; border: 1px solid var(--ink); overflow-wrap: anywhere; }
.copy-button { margin: .25rem; padding: .13rem .4rem; font-size: .85rem; }
.assistant-form textarea { width: 100%; resize: vertical; }
.assistant-answer { margin-top: 1rem; max-width: 38rem; overflow-wrap: anywhere; }
.assistant-answer > p { margin-top: .65rem; white-space: pre-line; }
.assistant-answer li + li { margin-top: .45rem; }
.assistant-context summary { font-weight: 700; cursor: pointer; }
.assistant-context label { margin-block: .55rem; }
.evidence-form { margin-top: 1rem; }
.evidence-form input[type="file"] { width: 100%; min-width: 0; }
[hidden] { display: none !important; }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
.support-launcher { --control-shadow-rest: 5px; position: fixed; z-index: 5; right: 1.5rem; bottom: max(1.5rem, env(safe-area-inset-bottom)); display: grid; place-items: center; width: 3.5rem; height: 3.5rem; padding: 0; border: var(--line-heavy); border-radius: 1rem; background: var(--teal); }
.support-dialog { position: fixed; inset: auto 1.5rem max(1.5rem, env(safe-area-inset-bottom)) auto; width: min(25rem, calc(100% - 2rem)); max-width: none; max-height: calc(100dvh - 3rem); padding: 0; margin: 0; overflow: hidden; border: var(--line); border-radius: 16px; background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.support-dialog::backdrop { background: #17140d38; }
.support-shell { display: grid; grid-template-rows: auto minmax(0, 1fr) auto; height: min(34rem, calc(100dvh - 3.25rem)); }
.support-header { display: flex; align-items: center; gap: .6rem; padding: .75rem 1rem; background: var(--sun); border-bottom: var(--line); }
.support-header h2 { margin-right: auto; font-size: 1rem; }
.support-close { display: grid; place-items: center; width: 2.75rem; height: 2.75rem; line-height: 1; padding: 0; font-size: 1.4rem; border: var(--line); background: var(--surface); }
.support-messages { display: flex; flex-direction: column; align-items: flex-start; gap: .75rem; overflow-y: auto; overscroll-behavior: contain; padding: 1rem; background: var(--paper); }
.support-message { max-width: 92%; padding: .65rem .8rem; border: 1px solid var(--ink); border-radius: 12px 12px 12px 4px; background: var(--surface); font-size: .925rem; overflow-wrap: anywhere; white-space: pre-line; }
.support-message--visitor { align-self: flex-end; border-radius: 12px 12px 4px 12px; background: var(--sun); }
.support-message a { display: block; color: var(--signal); font-weight: 650; margin-top: .4rem; }
.support-reason, .support-contact { margin-top: .3rem; color: var(--muted); font-size: .85rem; }
.support-compose { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .7rem; padding: .85rem 1rem; border-top: 1px solid var(--divider); }
.support-compose textarea { min-width: 0; resize: vertical; }
.support-evidence { display: grid; gap: .5rem; margin-top: .75rem; }
.support-evidence label { display: grid; gap: .25rem; min-width: 0; }
.support-evidence button { justify-self: start; }
.support-evidence-status { color: var(--muted); }

.site-main--intro { padding-block: 0; }
.blog-intro { position: relative; isolation: isolate; display: grid; grid-template-columns: minmax(0, 1.04fr) minmax(0, .96fr); align-items: center; gap: clamp(2.25rem, 6vw, 6rem); padding: clamp(5rem, 10vw, 9rem) clamp(.7rem, 4vw, 3rem) clamp(5.5rem, 11vw, 10rem); }
.intro-copy { min-width: 0; }
.blog-intro-avatar { display: block; width: clamp(3.25rem, 7vw, 5.5rem); height: auto; object-fit: contain; image-rendering: pixelated; border: var(--line-heavy); border-radius: 17px; background: var(--violet); box-shadow: var(--shadow); rotate: -7deg; }
.blog-intro h1 { margin-block: .24em .22em; font-size: clamp(3.25rem, 6.6vw, 6.75rem); font-weight: 930; line-height: 1.12; letter-spacing: -.055em; }
.intro-name { white-space: nowrap; }
.intro-marker { position: relative; isolation: isolate; white-space: nowrap; }
.intro-marker::before { position: absolute; z-index: -1; inset: auto -.04em .07em; height: .27em; background: var(--marker); content: ""; rotate: -4deg; }
.intro-marker--sun { --marker: var(--sun); }
.intro-marker--teal { --marker: var(--teal); }
.intro-marker--teal::before { rotate: 2deg; }
.intro-copy > p { max-width: 26em; color: var(--muted); font-size: clamp(1rem, 2vw, 1.22rem); }
.intro-actions { display: flex; flex-wrap: wrap; gap: .85rem; margin-top: 1.4rem; }
.intro-actions .button { --control-shadow-rest: 8px; display: inline-flex; align-items: center; justify-content: center; gap: .6rem; min-height: 48px; padding-inline: 1rem; border: var(--line-heavy); border-radius: 999px; background: var(--action-fill); }
.intro-primary { --action-fill: var(--coral); }
.intro-secondary { --action-fill: var(--surface); }
.intro-primary span, .intro-secondary span { font-size: 1.05em; line-height: 1; }
.intro-decor { position: absolute; z-index: -1; inset: 0; overflow: hidden; pointer-events: none; }
.intro-shape { position: absolute; display: block; border: var(--line-heavy); }
.intro-shape--ring { top: 13%; right: 8%; width: 3.3rem; aspect-ratio: 1; border: .65rem double var(--ink); border-radius: 50%; background: var(--sun); animation: intro-bob 10s ease-in-out -2s infinite; }
.intro-shape--corner { top: 48%; left: 51%; width: 3.65rem; aspect-ratio: 1; border-radius: 0 100% 0 0; background: var(--violet); rotate: -20deg; animation: intro-spin 26s linear -6s infinite; }
.intro-shape--diamond { top: 13%; left: 37%; width: 2.2rem; aspect-ratio: 1; background: var(--coral); rotate: 29deg; animation: intro-drift 11s ease-in-out infinite; }
.intro-shape--dash { bottom: 10%; left: 10%; width: 3.1rem; height: .85rem; background: var(--teal); rotate: -19deg; transform-origin: top center; animation: intro-sway 9s ease-in-out -1s infinite; }
.intro-shape--steps { bottom: 15%; right: 16%; width: 3.45rem; height: 1.65rem; border-width: 0 0 .42rem .42rem; background: transparent; color: var(--sky); box-shadow: -.32rem .32rem 0 currentColor; rotate: -15deg; animation: intro-drift 13s ease-in-out -3s infinite; }
@keyframes intro-drift {
  0%, 100% { transform: translate(0, 0) rotate(0); }
  50% { transform: translate(10px, -18px) rotate(8deg); }
}
@keyframes intro-spin { from { transform: rotate(0); } to { transform: rotate(360deg); } }
@keyframes intro-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}
@keyframes intro-sway {
  0%, 100% { transform: rotate(-4deg); }
  50% { transform: rotate(4deg); }
}
.intro-chat { position: relative; min-width: 0; margin-right: .4rem; border: var(--line-heavy); border-radius: 19px; background: var(--surface); box-shadow: var(--shadow-large); transform: rotate(-1.75deg); scroll-margin-top: .75rem; }
.intro-chat-header { display: grid; grid-template-columns: minmax(60px, 1fr) auto minmax(60px, 1fr); align-items: center; padding: .75rem .95rem; background: var(--teal); border-bottom: var(--line-heavy); border-radius: 15px 15px 0 0; }
.intro-chat-header h2 { font-size: 1.1rem; font-weight: 880; letter-spacing: -.02em; }
.intro-window-dots { display: flex; gap: .32rem; }
.intro-window-dots i { width: .78rem; aspect-ratio: 1; border: var(--line); border-radius: 50%; background: var(--coral); }
.intro-window-dots i:nth-child(2) { background: var(--sun); }
.intro-window-dots i:nth-child(3) { background: var(--sky); }
.intro-chat-body { padding: clamp(1rem, 3vw, 1.55rem); }
.intro-chat-prompt { display: flex; align-items: center; gap: .75rem; }
.intro-chat-prompt img { width: 2.55rem; height: 2.55rem; flex: none; padding: .4rem; border: var(--line); border-radius: 8px; background: var(--sun); box-shadow: var(--shadow-tight); }
.intro-chat-prompt strong { display: block; font-size: clamp(1.03rem, 2.2vw, 1.4rem); line-height: 1.3; }
.intro-chat-prompt p, .intro-example, .intro-chat-noscript { color: var(--muted); font-size: .88rem; }
.intro-chat-compose { align-items: center; border: 0; padding: 1.05rem 0 .58rem; }
.intro-chat-compose textarea { width: 100%; min-height: 3.5rem; }
.intro-chat-compose button { min-height: 44px; border-radius: 999px; white-space: nowrap; }
.intro-chat .blog-messages { background: var(--paper); min-height: 0; max-height: 17rem; margin-top: .9rem; padding: .65rem; border: 1px solid var(--ink); border-radius: 9px; }
.blog-messages[hidden] { display: none; }
.blog-references { margin: .55rem 0 0; padding-inline-start: 1.15rem; }
.blog-references li + li { margin-top: .45rem; }
.blog-references small { display: block; margin-top: .15rem; color: var(--muted); }
.blog-references a[data-original] { margin: .05rem 0 0; }

@media (min-width: 42.01rem) {
  html { scrollbar-gutter: stable both-edges; }
}

@media (max-width: 42rem) {
  .site-header { container-type: inline-size; }
  .header-inner { grid-template-columns: minmax(0, 1fr) auto; grid-template-rows: auto auto; gap: .3rem .5rem; }
  .brand { grid-column: 1; grid-row: 1; z-index: 1; }
  .site-nav { grid-column: 1 / -1; grid-row: 1 / 3; grid-template-columns: subgrid; grid-template-rows: subgrid; }
  /* Center in the full viewport when the scrollbar takes up layout space. */
  .site-nav-links { grid-column: 1 / -1; grid-row: 2; position: relative; left: calc((100vw - 100cqw) / 2); }
  .site-nav-tools { grid-column: 2; grid-row: 1; }
  .home-articles, .news-list, .project-card { grid-template-columns: minmax(0, 1fr); }
  .project-visual--daily { aspect-ratio: 4 / 5; }
  .article-categories { margin-inline-start: 0; }
  .article-demo--lesson { padding: .4rem; }
  .article-demo--lesson iframe { height: 57rem; }
  .article-demo--lesson iframe[src$="/demos/weight-budget"] { height: 71rem; }
  .article-card-body, .product-card-body { padding-inline: 1.125rem; }
  .article-cover, .product-cover { min-height: 5.5rem; }
  .support-launcher { right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
  .support-dialog { right: 1rem; bottom: max(1rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 50rem) {
  .blog-intro { grid-template-columns: minmax(0, 1fr); gap: 1.85rem; padding: 1.85rem .15rem 3.5rem; }
  .blog-intro h1 { font-size: clamp(2.56rem, 10.6vw, 4.55rem); }
  .intro-chat { width: min(100%, 32rem); transform: none; box-shadow: var(--shadow); }
  .intro-actions { margin-top: .85rem; }
  .intro-copy > p { max-width: 28em; }
  .intro-shape--ring { top: 7%; right: 8%; width: 2rem; border-width: .42rem; }
  .intro-shape--diamond { top: 1.3rem; left: auto; right: 32%; width: 1.2rem; }
  .intro-shape--corner, .intro-shape--dash, .intro-shape--steps { display: none; }
}

@media (max-width: 39rem) {
  .article-demo--lesson iframe[src$="/demos/model-answer"] { height: 44rem; }
}

@media (max-width: 22rem) {
  .article-demo--lesson iframe { height: 64rem; }
  .article-demo--lesson iframe[src$="/demos/model-answer"] { height: 46rem; }
  .article-demo--lesson iframe[src$="/demos/weight-budget"] { height: 75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .intro-shape { animation: none; }
  .site-nav a { transition: none; }
}
