/* Hallmark · shape: Map / Diagram (swapped from Stat-Led: no figures given) · genre: modern-minimal · theme: Cobalt (deal 1/3, seed self-hosted-email-alias-forwarding-e292·e0066679·2026-10-26·r0) · job: sign up · draw: 5ad8d6
 * hero: Banner · nav: edge-aligned · footer: mast · imagery: none, the map and the header mapping are the real system · signature: the header rewrite, before and after
 * axes: light/grotesk-sans/cool · posture: restrained · contrast: pass · fold: pass · v2.0.0 */
/* Hallmark · pre-emit critique: P4 H4 E4 S5 R4 V4 · weakest: P, an alias service rarely argues; led with what the sender's server is told (550 at RCPT) instead of a promise */
/* Hallmark · finish-review: subagent, fix, 8 findings, 7 resolved, 1 owed by the owner (the contact slot) */
/* Hallmark · dismissed 25 · the map nodes hold one short caption each under a seven-column diagram, not running prose */
@import url("./tokens.css");
@import url("./base.css");

:root { --nav-h: 72px; --code-size: 0.875rem; }

:lang(zh) h1, :lang(zh) h2 { letter-spacing: -0.01em; line-height: 1.16; }
:lang(zh) h3 { letter-spacing: 0; }
code, pre { font-family: var(--font-outlier); }

.skip { position: absolute; left: var(--space-md); top: calc(-1 * var(--space-3xl)); z-index: var(--z-toast); padding: var(--space-xs) var(--space-md); background: var(--color-ink); color: var(--color-paper); }
.skip:focus-visible { top: var(--space-md); }

/* Keys */
.key { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 0 var(--space-lg); border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--radius-input); background: var(--color-key-face); color: var(--color-ink); font: 500 var(--text-md)/1 var(--font-display); white-space: nowrap; text-decoration: none; cursor: pointer; box-shadow: var(--shadow-key); transition: transform var(--dur-micro) var(--ease-out), box-shadow var(--dur-micro) var(--ease-out), background-color var(--dur-short) var(--ease-out); }
.key:hover { transform: translateY(-1px); }
.key:active { transform: translateY(3px); box-shadow: var(--shadow-key-press); }
.key:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.key:disabled, .key[aria-disabled="true"] { opacity: 0.55; cursor: not-allowed; transform: none; }
.key--primary { background: var(--color-accent); border-color: var(--color-accent-edge); color: var(--color-accent-ink); box-shadow: var(--shadow-key-accent); }
.key--primary:hover { background: var(--color-accent-deep); }
.key--small { min-height: 44px; padding: 0 var(--space-md); font-size: var(--text-sm); }

/* Nav: edge-aligned */
.nav { position: relative; z-index: var(--z-raised); border-bottom: var(--rule-hair) solid var(--color-rule); background: var(--color-paper); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; min-height: var(--nav-h); }
.wordmark { font: 600 var(--text-lg)/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); text-decoration: none; }
.nav__links { display: flex; align-items: center; gap: var(--space-lg); }
.nav__links a:not(.key), .footer__links a { color: var(--color-ink-2); font-size: var(--text-sm); text-decoration: underline; text-decoration-color: transparent; transition: text-decoration-color var(--dur-short) var(--ease-out), color var(--dur-short) var(--ease-out); }
.nav__links a:not(.key):hover, .footer__links a:hover { color: var(--color-ink); text-decoration-color: var(--color-accent); }
.nav__links a:focus-visible, .footer__links a:focus-visible, .api__link:focus-visible, .wordmark:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 4px; }

/* Hero: Banner over the field */
.hero { position: relative; isolation: isolate; min-height: 56svh; display: grid; align-items: center; padding-block: var(--space-3xl); border-bottom: var(--rule-hair) solid var(--color-rule); }
.hero__field { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; }
html:not(.js) .hero__field { background-image: radial-gradient(circle at 1px 1px, var(--color-glyph-2) 1px, transparent 1.5px); background-size: var(--cell-w) var(--cell-h); background-position: 60% 0; mask-image: linear-gradient(90deg, transparent 40%, var(--color-ink) 70%); }
.hero__inner { display: grid; gap: var(--space-lg); justify-items: start; }
.hero h1 { max-width: 10em; font-size: clamp(2.25rem, 4vw + 0.75rem, 4.25rem); }
.hero .lead { color: var(--color-ink-2); max-width: 30ch; }
.hero__actions { display: flex; flex-wrap: wrap; gap: var(--space-sm); margin-top: var(--space-xs); }
.hero__pause { position: absolute; right: var(--gutter); bottom: var(--space-md); min-height: 44px; padding: 0 var(--space-sm); border: 0; background: var(--color-paper); color: var(--color-muted); font-size: var(--text-sm); cursor: pointer; transition: color var(--dur-short) var(--ease-out); }
.hero__pause:hover { color: var(--color-ink); }
.hero__pause:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.hero__pause:active { color: var(--color-accent); }
html:not(.js) .hero__pause { display: none; }
@media (prefers-reduced-motion: reduce) { .hero__pause { display: none; } }

/* Section heads */
.head { display: grid; gap: var(--space-md); margin-bottom: var(--space-2xl); }
.head .lead { color: var(--color-ink-2); }
.head--split { grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: end; }
.head--split h2 { grid-column: 1 / span 6; }
.head--split .lead { grid-column: 8 / span 5; }

/* The mapping: before and after, on graphite */
.rewrite { padding-block: var(--section-gap-s) var(--section-gap); }
.mapping { margin: 0; }
.mapping__grid { background: var(--color-graphite); color: var(--color-graphite-ink); border-radius: var(--radius-card); overflow: hidden; }
@supports (corner-shape: bevel) { .mapping__grid, .code { border-radius: var(--cut-l) 4px var(--cut-l) 4px; corner-shape: bevel round bevel round; } }
.mapping__row { display: grid; grid-template-columns: minmax(0, 5fr) minmax(var(--space-2xl), 1fr) minmax(0, 6fr); align-items: center; min-height: 52px; border-top: var(--rule-hair) solid var(--color-graphite-2); }
.mapping__row > code { padding: var(--space-sm) var(--space-lg); font-size: var(--code-size); line-height: 1.5; overflow-wrap: anywhere; min-width: 0; }
.mapping__row b { font-weight: 500; color: var(--color-graphite-muted); }
.mapping__row--head { border-top: 0; background: var(--color-graphite-2); min-height: 48px; }
.mapping__row--head > span[role="columnheader"] { padding: 0 var(--space-lg); font-size: var(--text-sm); color: var(--color-graphite-muted); }
.mapping__link { position: relative; align-self: stretch; }
.mapping__row:not(.mapping__row--head) .mapping__link::before { content: ""; position: absolute; left: 0; right: 0; top: 50%; border-top: var(--rule-hair) solid var(--color-graphite-glyph-2); }
.mapping__row.is-changed .mapping__link::before, .mapping__row.is-added .mapping__link::before { border-top-color: var(--color-accent-2); }
.mapping__row.is-added .mapping__link::before { left: 50%; }
.mapping__row.is-added .mapping__link::after { content: ""; position: absolute; left: 50%; top: 0; height: 50%; border-left: var(--rule-hair) solid var(--color-accent-2); }
.mapping__row.is-changed > code:last-child, .mapping__row.is-added > code:last-child { color: var(--color-graphite-ink); background: var(--color-graphite-2); }
.mapping__row.is-changed > code:first-child { color: var(--color-graphite-muted); }
.mapping figcaption { margin-top: var(--space-md); font-size: var(--text-sm); color: var(--color-ink-2); max-width: 60ch; }

/* The map: one spine, exits dropping below */
.path { padding-block: var(--section-gap) var(--section-gap-s); background: var(--color-paper-2); border-block: var(--rule-hair) solid var(--color-rule); }
.map { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); counter-reset: node; }
.map { --exit-h: 72px; }
.map__node { position: relative; display: grid; grid-template-rows: auto auto 1fr; gap: var(--space-xs); padding: var(--space-2xl) var(--space-md) 0 0; counter-increment: node; }
.map__node::before { content: counter(node); position: absolute; top: 0; left: 0; display: grid; place-items: center; width: 32px; height: 32px; border: var(--rule-hair) solid var(--color-rule-2); border-radius: var(--cut); background: var(--color-paper); font: 600 var(--text-sm)/1 var(--font-display); font-variant-numeric: tabular-nums; color: var(--color-ink); z-index: 1; }
.map__node::after { content: ""; position: absolute; top: 16px; left: 32px; right: 0; border-top: var(--rule-hair) solid var(--color-rule-2); }
.map__node--end::before { background: var(--color-accent); border-color: var(--color-accent-edge); color: var(--color-accent-ink); }
.map__node--end::after { display: none; }
.map__node h3 { font-size: var(--text-title); }
.map__node h3, .map__node p { padding-left: var(--space-xl); }
.map__node p { font-size: var(--text-sm); color: var(--color-ink-2); max-width: 16ch; min-height: 3lh; }
.map__exit { align-self: end; display: grid; align-content: start; gap: var(--space-2xs); height: var(--exit-h); margin: var(--space-xl) 0 0 var(--space-md); padding: var(--space-sm) 0 0 var(--space-lg); border-top: var(--rule-hair) solid var(--color-error); font-size: var(--text-sm); color: var(--color-error); }
.map__exit b { font: 600 var(--text-xl)/1 var(--font-display); letter-spacing: var(--tracking-display); }
.map__node--exit .map__exit::before { content: ""; position: absolute; left: 16px; top: 32px; bottom: var(--exit-h); border-left: var(--rule-hair) solid var(--color-error); }

/* The replies */
.codes { padding-block: var(--section-gap); }
.codes__table { width: 100%; border-collapse: collapse; font-size: var(--text-md); }
.codes__table thead th { padding: 0 var(--space-lg) var(--space-sm) 0; text-align: left; font: 500 var(--text-sm)/1.4 var(--font-display); color: var(--color-muted); white-space: nowrap; border-bottom: var(--rule-hair) solid var(--color-rule-2); }
.codes__table tbody th, .codes__table td { padding: var(--space-md) var(--space-lg) var(--space-md) 0; border-bottom: var(--rule-hair) solid var(--color-rule); text-align: left; vertical-align: middle; }
.codes__table tbody th { width: 22%; font: 600 var(--text-3xl)/1 var(--font-display); letter-spacing: var(--tracking-display); color: var(--color-ink); }
.codes__table td:last-child { width: 26%; color: var(--color-ink-2); }
.codes__table tr.is-ok { background: var(--color-accent-wash); }
.codes__table tr.is-ok th { color: var(--color-accent-deep); }
.codes__table tr > :first-child { padding-left: var(--space-md); }

/* What a recipient sees: rows beside the head */
.recipient { padding-block: var(--section-gap-s) var(--section-gap-l); }
.recipient__inner { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap-columns); align-items: start; }
.recipient h2 { grid-column: 1 / span 4; position: sticky; top: var(--space-2xl); }
.rows { grid-column: 5 / span 8; margin: 0; }
.rows__item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 3fr); column-gap: var(--gap-columns); padding-block: var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.rows__item:last-child { border-bottom: var(--rule-hair) solid var(--color-rule); }
.rows dt { font: 500 var(--text-title)/1.2 var(--font-display); color: var(--color-ink); }
.rows dd { margin: 0; color: var(--color-ink-2); max-width: 52ch; }
.rows code { font-size: var(--code-size); color: var(--color-accent-deep); }

/* API: split, code on graphite */
.api { padding-block: var(--section-gap) var(--section-gap); background: var(--color-paper-2); border-top: var(--rule-hair) solid var(--color-rule); }
.api__inner { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: var(--space-3xl); align-items: center; }
.api__text { display: grid; gap: var(--space-md); justify-items: start; }
.api__text .lead { color: var(--color-ink-2); }
.api__link { font: 500 var(--text-md)/1.4 var(--font-display); color: var(--color-ink); text-decoration: underline; text-decoration-color: var(--color-accent); text-decoration-thickness: 2px; text-underline-offset: 0.3em; transition: color var(--dur-short) var(--ease-out); }
.api__link:hover { color: var(--color-accent-deep); }
.code { margin: 0; background: var(--color-graphite); color: var(--color-graphite-ink); border-radius: var(--radius-card); overflow: hidden; }
.code__strip { display: flex; justify-content: space-between; padding: var(--space-sm) var(--space-lg); background: var(--color-graphite-2); font-size: var(--text-sm); color: var(--color-graphite-muted); }
.code pre { margin: 0; padding: var(--space-lg); font-size: var(--code-size); line-height: 1.7; overflow-x: auto; }
.code pre:focus-visible { outline: 2px solid var(--color-accent-2); outline-offset: -2px; }
.code .tok { color: var(--color-accent-2); }

/* Footer: mast */
.footer { padding-block: var(--space-3xl) var(--space-xl); border-top: var(--rule-hair) solid var(--color-rule); }
.footer__mark { margin: 0; font: 600 clamp(4rem, 12vw, 10rem)/0.9 var(--font-display); letter-spacing: -0.04em; color: var(--color-ink); }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: var(--space-lg); margin-top: var(--space-xl); padding-top: var(--space-lg); border-top: var(--rule-hair) solid var(--color-rule); }
.footer__ask { color: var(--color-ink-2); }
.footer__links { display: flex; gap: var(--space-lg); }
.footer__links a { font-size: var(--text-md); }
.fill { padding: 0 0.25em; border: 1px dashed color-mix(in oklch, var(--color-muted) 70%, transparent); border-radius: 3px; color: var(--color-muted); -webkit-box-decoration-break: clone; box-decoration-break: clone; }

@media (max-width: 60rem) {
  .head--split { grid-template-columns: minmax(0, 1fr); }
  .head--split h2, .head--split .lead { grid-column: 1 / -1; }
  .map { grid-template-columns: minmax(0, 1fr); }
  .map__node { grid-template-rows: none; padding: 0 0 var(--space-xl) var(--space-2xl); }
  .map__node::after { top: 32px; bottom: 0; left: 16px; right: auto; border-top: 0; border-left: var(--rule-hair) solid var(--color-rule-2); }
  .map__node p, .map__exit { max-width: none; }
  .map__exit { height: auto; margin: var(--space-xs) 0 0; padding-left: 0; }
  .map__node--exit .map__exit::before { display: none; }
  .map__node p { min-height: 0; }
  .map__node h3, .map__node p { padding-left: 0; }
  .recipient__inner, .api__inner { grid-template-columns: minmax(0, 1fr); gap: var(--space-xl); }
  .recipient h2, .rows { grid-column: 1 / -1; position: static; }
  .mapping__row { grid-template-columns: minmax(0, 1fr); align-items: stretch; }
  .mapping__row--head, .mapping__link, .mapping__row > code.is-empty, .mapping__row:not(.is-changed):not(.is-added) > code:first-child { display: none; }
  .mapping__row--head + .mapping__row { border-top: 0; }
  .mapping__row > code { display: grid; gap: var(--space-3xs); }
  .mapping__row > code::before { font: 500 var(--text-xs)/1.4 var(--font-body); color: var(--color-graphite-muted); }
  .mapping__row.is-changed > code:first-child::before { content: "原信"; }
  .mapping__row > code:last-child::before { content: "转发后"; }
  .mapping__row:not(.is-changed):not(.is-added) > code:last-child::before { content: "不变"; }
  .codes__table tbody th { font-size: var(--text-2xl); }
  .codes__table thead th:last-child, .codes__table td:last-child { display: none; }
}
@media (max-width: 40rem) {
  .nav__links a:not(.key) { display: none; }
  .hero__pause { display: none; }
  .hero__field { background-image: radial-gradient(circle at 1px 1px, var(--color-glyph-2) 1px, transparent 1.5px); background-size: var(--cell-w) var(--cell-h); mask-image: linear-gradient(90deg, transparent 55%, var(--color-ink) 100%); }
  .hero { min-height: 0; padding-block: var(--space-2xl); }
  .rows__item { grid-template-columns: minmax(0, 1fr); row-gap: var(--space-xs); }
  .hero__pause { right: var(--space-xs); }
}
@media (prefers-reduced-motion: reduce) {
  .key, .nav__links a, .footer__links a, .api__link, .hero__pause { transition: none; }
  .key:hover, .key:active { transform: none; }
}
