@font-face {
  font-family: Inter;
  src: url("./inter-variable.woff2") format("woff2");
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --paper: #fbfcf9;
  --white: #fff;
  --ink: #142720;
  --body: #30483e;
  --muted: #50665b;
  --line: #d5e2d8;
  --wash: #edf4ed;
  --forest: #123c30;
  --accent: #245b43;
  --lime: #dbef9a;
  --mono: ui-monospace, "SFMono-Regular", Consolas, monospace;
  --duration: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 1rem/1.65 Inter, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4, p, dl, dd { margin: 0; }
h1, h2, h3, h4 { line-height: 1.13; }
h1 { font-size: clamp(2.55rem, 5.5vw, 4.8rem); font-weight: 680; letter-spacing: -.07em; }
h2 { font-size: clamp(1.75rem, 3vw, 2.65rem); font-weight: 660; letter-spacing: -.055em; }
h3 { font-size: 1.22rem; font-weight: 660; letter-spacing: -.03em; }
html[lang="zh-Hans"] body { font-family: Inter, "PingFang SC", "Microsoft YaHei", system-ui, sans-serif; }
html[lang="zh-Hans"] :is(h1, h2, h3, h4) { letter-spacing: -.02em; line-height: 1.22; }
a { color: inherit; text-underline-offset: .2em; }
button, input, select { font: inherit; }
button:not(:disabled) { cursor: pointer; }
img { display: block; max-width: 100%; }
:focus-visible { outline: 3px solid #3b8f67; outline-offset: 3px; }
section[id] { scroll-margin-top: 1.5rem; }

.wrap { width: min(1160px, calc(100% - 5rem)); margin-inline: auto; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  clip-path: inset(50%);
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 1rem;
  left: 1rem;
  transform: translateY(-180%);
  padding: .65rem 1rem;
  background: var(--white);
  opacity: 0;
  pointer-events: none;
}
.skip-link:focus { transform: none; opacity: 1; pointer-events: auto; }
.muted { color: var(--muted); }
.text-link, .text-button { color: var(--accent); font-weight: 650; text-underline-offset: .28em; }
.text-link:hover, .text-button:hover { color: #102e1f; }
.text-button { border: 0; padding: .15rem 0; background: transparent; text-decoration: underline; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  align-self: start;
  min-height: 44px;
  padding: .58rem .92rem;
  gap: .4rem;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--ink);
  font-size: .93rem;
  font-weight: 650;
  line-height: 1.3;
  text-decoration: none;
  transition: background var(--duration), border-color var(--duration), transform var(--duration);
}
.button:hover:not(:disabled) { transform: translateY(-2px); }
.button:active:not(:disabled) { transform: translateY(0); }
.button:disabled { opacity: .52; cursor: default; }
.primary { background: var(--forest); color: #f5fbf5; }
.primary:hover:not(:disabled) { background: #215541; }
.secondary { background: var(--white); border-color: #b8cdbf; }
.secondary:hover:not(:disabled) { border-color: #759a86; background: #f1f7f0; }
.button.small { min-height: 36px; padding: .42rem .68rem; font-size: .87rem; }

.site-header {
  position: relative;
  z-index: 3;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; min-height: 72px; }
.header-actions { display: flex; align-items: center; gap: clamp(.65rem, 2vw, 1.6rem); }
.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
  gap: .66rem;
  width: fit-content;
  color: inherit;
  text-decoration: none;
  font-size: 1.14rem;
  font-weight: 740;
  letter-spacing: -.045em;
}
.main-nav { display: flex; align-items: center; gap: clamp(.8rem, 2.1vw, 2rem); }
.main-nav a {
  display: block;
  padding: .55rem 0;
  color: var(--body);
  font-size: .92rem;
  font-weight: 560;
  white-space: nowrap;
  text-decoration: none;
}
.main-nav a:hover, .main-nav a[aria-current] { color: var(--forest); text-decoration: underline; text-underline-offset: .36em; }
.main-nav .nav-lab { padding: .49rem .72rem; border: 1px solid #b8cdbf; border-radius: 6px; }
.main-nav .nav-lab:hover { background: var(--wash); }
.language-switch {
  padding: .37rem .62rem;
  border: 1px solid #b8cdbf;
  border-radius: 5px;
  color: var(--forest);
  font-size: .87rem;
  font-weight: 660;
  text-decoration: none;
  white-space: nowrap;
}
.language-switch:hover { background: var(--wash); }
.menu-toggle { display: none; }

.home-hero {
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    radial-gradient(ellipse at 79% 50%, #e1efde 0%, #eff5ed 40%, transparent 72%),
    #f7faf6;
}
.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr);
  align-items: center;
  gap: clamp(2rem, 5vw, 5rem);
  padding-block: clamp(3.4rem, 7vw, 6.7rem);
}
.hero-copy { min-width: 0; animation: enter .55s ease both; }
.page-kicker {
  margin-bottom: .8rem;
  color: var(--accent);
  font-size: .88rem;
  font-weight: 720;
  letter-spacing: .06em;
  text-transform: uppercase;
}
.hero-copy h1 { max-width: 650px; letter-spacing: -.07em; }
html[lang="zh-Hans"] .hero-copy h1 { letter-spacing: -.02em; }
.lead {
  max-width: 44rem;
  margin-top: 1.16rem;
  color: var(--muted);
  font-size: clamp(1.05rem, 1.8vw, 1.24rem);
}
.actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1.6rem; }
.hero-note {
  display: flex;
  gap: .48rem;
  align-items: center;
  margin-top: 1.35rem;
  color: var(--body);
  font-size: .88rem;
}
.data-indicator { width: .5rem; height: .5rem; border-radius: 50%; background: #5c966e; flex: none; }
.live-pulse {
  overflow: hidden;
  min-width: 0;
  border: 1px solid #b7cdbd;
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 22px 48px #1b40201d;
  animation: enter .65s .06s ease both;
}
.pulse-header, .pulse-footer { display: flex; justify-content: space-between; align-items: center; gap: .6rem; padding: 1rem 1.2rem; }
.pulse-header h2 { font-size: 1.55rem; }
.utility-label { color: var(--muted); font-size: .79rem; font-weight: 670; }
.pulse-header select { width: auto; font-size: .9rem; }
.pulse-table tbody td { font-size: .9rem; }
.pulse-table th, .pulse-table td { padding-inline: 1.2rem; }
.pulse-table .loading-cell { height: 2.6rem; text-align: left; vertical-align: middle; }
.loading-bar { display: block; width: 58%; height: .55rem; border-radius: 1rem; background: #e0ece3; animation: loading 1.1s ease-in-out infinite alternate; }
.pulse-status { padding: .62rem 1.2rem 0; font-size: .81rem; min-height: 2.2rem; }
.pulse-footer { padding-top: .6rem; color: var(--accent); font-size: .9rem; font-weight: 635; }
.network-line { border-bottom: 1px solid var(--line); background: #fff; }
.network-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.15rem; min-height: 68px; padding-block: .85rem; }
.network-inner p { color: var(--muted); font-size: .87rem; }
.network-names { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem 1.6rem; }
.network-names span { display: flex; align-items: center; gap: .42rem; color: var(--body); font-weight: 650; font-size: .87rem; }
.network-dot { display: inline-block; width: 11px; height: 11px; border-radius: 50%; background: #3f6de1; }
.network-dot.eth { background: #7d6ba9; }
.network-dot.base { background: #3257cf; }
.network-dot.arb { background: #2180a8; }

.section { padding-block: clamp(3.2rem, 6vw, 6rem); }
.section-block { padding-bottom: clamp(3.2rem, 6vw, 5rem); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 1rem; margin-bottom: 1.7rem; }
.section-heading p, .section-intro { margin-top: .65rem; color: var(--muted); max-width: 44rem; }
.section-heading > .text-link { flex-shrink: 0; }
.entry-list { border-top: 1px solid var(--line); }
.entry-list article {
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-bottom: 1px solid var(--line);
  transition: background var(--duration);
}
.entry-list article:hover { background: #eff5ee; }
.entry-list p, .scenarios p { color: var(--muted); margin-top: .36rem; }
.entry-icon {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 1px solid #c9dfcf;
  border-radius: 7px;
  background: #ecf5ec;
  color: var(--accent);
  transition: transform var(--duration);
}
.entry-list article:hover .entry-icon { transform: translateY(-3px); }
.entry-icon span { position: relative; display: block; }
.shape-search { width: 14px; height: 14px; border: 2px solid currentColor; border-radius: 50%; }
.shape-search::after { content: ""; position: absolute; width: 8px; height: 2px; top: 10px; left: 9px; transform: rotate(45deg); background: currentColor; }
.shape-doc { width: 14px; height: 18px; border: 2px solid currentColor; border-radius: 2px; }
.shape-doc::after { content: ""; display: block; margin: 5px 2px; height: 2px; background: currentColor; box-shadow: 0 4px currentColor; }
.shape-lab { width: 15px; height: 15px; border: 2px solid currentColor; border-radius: 4px; transform: rotate(45deg); }
.band { background: var(--wash); border-block: 1px solid var(--line); }
.scenario-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: clamp(1.4rem, 6vw, 5rem); }
.scenarios { border-top: 1px solid #c0d3c5; }
.scenarios article { border-bottom: 1px solid #c0d3c5; padding: 1.12rem 0; }

.page-intro { padding-block: clamp(2.9rem, 6vw, 5rem) 2.4rem; animation: enter .5s ease both; }
.page-intro h1 { max-width: 820px; }
.workspace { padding-bottom: clamp(3.2rem, 6vw, 6rem); }
.tabs { display: flex; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid var(--line); }
.tabs button {
  position: relative;
  padding: .72rem .93rem;
  border: 0;
  border-bottom: 3px solid transparent;
  margin-bottom: -1px;
  background: transparent;
  color: var(--muted);
  font-weight: 625;
  transition: color var(--duration), background var(--duration), border-color var(--duration);
}
.tabs button[aria-selected="true"] { color: var(--forest); border-bottom-color: #42865c; background: var(--wash); }
.tabs button:hover { color: var(--forest); }
.tool-panel {
  padding: clamp(1rem, 3.2vw, 2rem);
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 8px 8px;
  background: var(--white);
  animation: panel-in .24s ease both;
}
.tool-head { display: flex; justify-content: space-between; align-items: start; gap: .8rem 1.25rem; flex-wrap: wrap; margin-bottom: 1.22rem; }
.tool-head h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
.tool-head p { margin-top: .4rem; color: var(--muted); }
.form-line { display: flex; align-items: end; gap: .78rem; flex-wrap: wrap; margin-bottom: 1rem; }
.form-line .button { align-self: end; }
.form-line label { min-width: 9rem; }
.form-line .growing { flex: 1; min-width: min(14rem, 100%); }
label { display: grid; gap: .32rem; font-size: .89rem; font-weight: 650; color: var(--body); }
input, select {
  width: 100%;
  min-height: 44px;
  padding: .52rem .68rem;
  border: 1px solid #b4c8bb;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  font-weight: 480;
}
select {
  appearance: none;
  padding-right: 2.15rem;
  background-image: linear-gradient(45deg, transparent 50%, #3d624f 50%), linear-gradient(135deg, #3d624f 50%, transparent 50%);
  background-position: right 1.08rem center, right .8rem center;
  background-repeat: no-repeat;
  background-size: .3rem .3rem;
}
input:hover, select:hover { border-color: #739783; }
.tool-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.25fr); align-items: start; gap: clamp(.9rem, 3vw, 2rem); }
.stack-form { display: grid; gap: .72rem; }
.stack-form > button { justify-self: start; margin-top: .35rem; }
.field-pair { display: grid; grid-template-columns: 1fr 1fr; gap: .72rem; }
.signature-form { margin-top: 1.45rem; border-top: 1px solid var(--line); padding-top: 1.4rem; }
.lookup-result, .planning-result { margin-top: 1rem; border: 1px solid var(--line); border-radius: 7px; padding: 1rem; background: #f6faf6; }
.planning-result { margin: 0; }
.result-head { display: flex; justify-content: space-between; align-items: start; gap: .55rem; margin-bottom: .65rem; }
.result-head h3 { overflow-wrap: anywhere; }
.metric-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .72rem; margin: .8rem 0; }
.metric-list div { min-width: 0; padding: .6rem .72rem; background: #fff; border: 1px solid var(--line); border-radius: 5px; }
.metric-list dt { color: var(--muted); font-size: .85rem; }
.metric-list dd { overflow-wrap: anywhere; line-height: 1.45; color: var(--ink); font-weight: 640; font-variant-numeric: tabular-nums; }
.flash { animation: emphasis .43s ease both; }
#download-replay { margin-top: .8rem; }

.table-wrap { overflow: auto; }
.table-wrap.bordered { border: 1px solid var(--line); border-radius: 6px; }
table { border-collapse: collapse; width: 100%; background: #fff; }
th, td { padding: .66rem .85rem; border-bottom: 1px solid #e2ece3; vertical-align: top; text-align: left; }
th { color: #3b5648; background: #f0f5ef; font-weight: 680; font-size: .84rem; white-space: nowrap; }
td { font-size: .93rem; }
tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #f8fbf8; }
td code { white-space: nowrap; }
.pulse-table tbody td:first-child { font-family: var(--mono); font-weight: 650; }
.pulse-table tbody tr { animation: panel-in .27s ease both; }
.table-footer { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: .8rem; }
.pager { display: flex; gap: .45rem; }
.status-badge { display: inline-block; padding: .16rem .5rem; border-radius: 4px; background: #e5f4ea; color: #1b5d3b; font-size: .82rem; font-weight: 670; white-space: nowrap; }
.status-badge.pending { background: #fff1d4; color: #72500e; }
.status-badge.reverted { background: #f9e5e2; color: #8b2f2b; }

.code-block, .code-details { overflow: hidden; border: 1px solid #335247; border-radius: 7px; background: #152923; color: #e6f4ea; }
.code-toolbar, .code-footer { display: flex; align-items: center; justify-content: space-between; gap: .55rem; padding: .63rem .9rem; border-bottom: 1px solid #3a554a; color: #deede3; font-size: .86rem; }
.code-footer { border-bottom: 0; border-top: 1px solid #3a554a; }
.code-footer .text-button { color: #d3e8aa; }
.code-toolbar .secondary, dialog .code-toolbar .secondary { color: #e6f4ea; background: #203c31; border-color: #547668; }
.code-toolbar .secondary:hover:not(:disabled) { background: #2d4b3e; }
.code-details summary { padding: .65rem .84rem; cursor: pointer; color: #e1f0e7; }
.code-details pre { border-top: 1px solid #3a554a; }
pre {
  overflow: auto;
  max-height: 28rem;
  margin: 0;
  padding: .9rem;
  background: #152923;
  color: #e6f4ea;
  font: .87rem/1.7 var(--mono);
  tab-size: 2;
}
code { font-family: var(--mono); font-size: .94em; }
.inline-switch { display: flex; gap: .22rem; }
.inline-switch button { padding: .35rem .5rem; border: 1px solid transparent; border-radius: 4px; background: transparent; color: #d6e6db; font-size: .86rem; }
.inline-switch button[aria-pressed="true"] { background: #345547; border-color: #5a7f6d; color: #fff; }
dialog { width: min(650px, calc(100% - 2rem)); padding: 1.18rem; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); }
dialog[open] { animation: enter .28s ease; }
dialog::backdrop { background: #091d16a1; }
dialog .code-toolbar { border-radius: 5px 5px 0 0; background: #152923; }
dialog pre { border-radius: 0 0 5px 5px; }

.lifecycle { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .8rem; }
.lifecycle article {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  transition: transform var(--duration), border-color var(--duration), background var(--duration);
}
.lifecycle article:hover, .lifecycle article:focus-within { transform: translateY(-3px); border-color: #79a387; background: #f6faf5; }
.stage-tag { display: inline-block; margin-bottom: .54rem; padding: .09rem .45rem; color: #24563d; background: #e6f2e5; border-radius: 4px; font-size: .81rem; font-weight: 670; }
.lifecycle p, .platform-details p, .faq p { margin-top: .54rem; color: var(--body); }
.lifecycle .text-button { margin-top: .63rem; }
.lifecycle article:has([aria-pressed="true"]) { border-color: #57916e; background: #eef7ed; }
.stage-detail {
  margin-top: .8rem;
  padding: .85rem 1rem;
  border-inline-start: 3px solid #57916e;
  border-radius: 3px;
  background: var(--wash);
}
.stage-detail p { margin: .42rem 0; color: var(--body); }
.platform-details { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.65rem; }
.platform-details h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.platform-details ul { padding-left: 1.2rem; }
.platform-details li + li { margin-top: .25rem; }
.platform-details article { min-width: 0; }

.docs-layout { display: grid; grid-template-columns: 10.5rem minmax(0, 1fr); gap: 2rem; padding-bottom: 4.25rem; }
.docs-nav { position: sticky; top: 1.25rem; display: grid; align-content: start; padding: .85rem 0; color: var(--body); font-size: .9rem; }
.docs-nav strong { margin-bottom: .35rem; color: var(--ink); }
.docs-nav a { padding: .28rem .38rem; margin-left: -.38rem; border-radius: 4px; text-decoration: none; }
.docs-nav a:hover, .docs-nav a[aria-current] { background: var(--wash); color: var(--forest); }
.docs-content { min-width: 0; max-width: 54rem; }
.docs-content section { padding: 1.2rem 0 1.52rem; border-top: 1px solid var(--line); }
.docs-content h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); }
.docs-content p, .docs-content ol, .docs-content ul { margin: .72rem 0; color: var(--body); }
.docs-content .code-block, .docs-content .table-wrap { margin: .7rem 0; }
.docs-errors dt { margin-top: .65rem; font-weight: 690; }
.docs-errors dd { color: var(--body); }
.faq { border-top: 1px solid #becec2; }
.faq details { border-bottom: 1px solid #becec2; padding: .84rem 0; }
.faq summary { cursor: pointer; font-weight: 660; }
.faq details[open] p { animation: panel-in .25s ease; }
.faq p { padding-left: 1.1rem; }

.site-footer { margin-top: 0; background: #142923; color: #e8f4ec; }
.footer-main { display: grid; grid-template-columns: 1.35fr 1fr 1fr; gap: 1.7rem; padding-block: 2rem; }
.footer-main nav { display: grid; align-content: start; gap: .2rem; font-size: .92rem; }
.footer-main nav strong { margin-bottom: .1rem; color: #fff; }
.footer-main nav a { width: fit-content; color: #d6e7dc; text-decoration: none; }
.footer-main nav a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: .5rem; border-top: 1px solid #3b5449; padding-block: .95rem 1.35rem; color: #c3d8ca; font-size: .86rem; }

@keyframes enter { from { opacity: 0; transform: translateY(13px); } to { opacity: 1; transform: translateY(0); } }
@keyframes panel-in { from { opacity: .25; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }
@keyframes emphasis { from { background: #e2f0c5; } to { background: inherit; } }
@keyframes loading { from { opacity: .48; } to { opacity: 1; } }
.revealed { animation: enter .44s ease both; }

@media (max-width: 820px) {
  .wrap { width: calc(100% - 3rem); }
  .hero-grid { gap: 1.5rem; }
  .main-nav { gap: .75rem; }
  .main-nav a { font-size: .86rem; }
  .lifecycle { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .platform-details { gap: .9rem; }
}

@media (max-width: 720px) {
  .wrap { width: calc(100% - 2.3rem); }
  .header-inner { min-height: 63px; gap: .65rem; }
  .header-actions { gap: .45rem; }
  .menu-toggle { display: flex; align-items: center; gap: .42rem; padding: .33rem .6rem; min-height: 40px; border: 1px solid #b8cdbf; border-radius: 5px; background: transparent; color: var(--ink); font-size: .9rem; font-weight: 650; }
  .menu-icon { width: 12px; height: 9px; border-block: 1.5px solid currentColor; }
  .main-nav { display: none; position: absolute; inset: 100% 1.15rem auto auto; min-width: 175px; padding: .52rem; border: 1px solid var(--line); border-radius: 6px; background: #fff; box-shadow: 0 12px 28px #12251b20; }
  .main-nav.is-open { display: grid; gap: 0; animation: panel-in .18s ease; }
  .main-nav a { padding: .45rem .55rem; }
  .main-nav .nav-lab { margin-block: .2rem; }
  .hero-grid, .scenario-grid, .platform-details, .tool-grid, .docs-layout { grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
  .hero-grid { padding-block: 2.75rem; }
  .page-intro { padding-block: 2.7rem 1.9rem; }
  .section-heading, .network-inner { align-items: start; flex-direction: column; gap: .5rem; }
  .entry-list article { grid-template-columns: 40px minmax(0, 1fr); gap: .7rem; }
  .entry-list article > a { grid-column: 2; }
  .entry-icon { width: 37px; height: 37px; }
  .example-tabs { overflow: auto; }
  .docs-nav { position: static; display: flex; flex-wrap: wrap; gap: .2rem .65rem; border-block: 1px solid var(--line); }
  .docs-nav strong { width: 100%; }
  .docs-nav a { margin-left: 0; }
  .footer-main { grid-template-columns: 1fr 1fr; gap: .65rem 1.05rem; }
  .footer-main > div { grid-column: span 2; margin-bottom: .33rem; }
}

@media (max-width: 440px) {
  .wrap { width: calc(100% - 1.65rem); }
  .pulse-header, .pulse-footer { padding-inline: .72rem; }
  .pulse-table th, .pulse-table td, .pulse-status { padding-inline: .72rem; }
  .form-line > label, .form-line > .growing { flex: 1 0 100%; }
  .lifecycle, .metric-list { grid-template-columns: minmax(0, 1fr); }
  .field-pair { grid-template-columns: minmax(0, 1fr); gap: .64rem; }
  .tabs button { padding-inline: .58rem; font-size: .9rem; }
}

@media (max-width: 360px) {
  .header-inner { gap: .4rem; }
  .header-inner .brand { gap: .38rem; font-size: 1rem; }
  .header-inner .brand img { width: 30px; height: 30px; }
  .header-actions { gap: .35rem; }
  .language-switch, .menu-toggle { padding-inline: .42rem; }
}

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

.reading-progress {
  position: fixed;
  z-index: 9;
  inset: 0 0 auto;
  height: 3px;
  pointer-events: none;
  transform: scaleX(var(--reading, 0));
  transform-origin: left;
  background: linear-gradient(90deg, #367851, #9cbf59);
}

.pulse-chart {
  margin: 0 1.2rem .65rem;
  padding: .72rem .72rem .55rem;
  border: 1px solid #d7e5da;
  border-radius: 7px;
  background: #f2f8f1;
  animation: chart-in .33s ease both;
}
.chart-heading, .chart-caption {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .35rem .65rem;
}
.chart-heading h3 { font-size: .95rem; }
.segmented {
  display: flex;
  gap: .18rem;
  padding: .16rem;
  border: 1px solid #d1dfd2;
  border-radius: 6px;
  background: #e8f1e8;
}
.segmented button {
  padding: .21rem .36rem;
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: var(--body);
  font-size: .76rem;
  line-height: 1.25;
  transition: color var(--duration), background var(--duration), border-color var(--duration);
}
.segmented button[aria-pressed="true"] { background: #fff; border-color: #b8cfbd; color: var(--forest); }
.chart-bars { display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: .38rem; margin-block: .54rem; }
.chart-bars button {
  min-width: 0;
  display: grid;
  grid-template-rows: 61px auto;
  gap: .24rem;
  padding: .26rem .27rem;
  border: 1px solid transparent;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  transition: background var(--duration), border-color var(--duration), color var(--duration);
}
.chart-bars button:hover { background: #e5f1e6; }
.chart-bars button[aria-pressed="true"] { border-color: #84ad8f; background: #e5f1e5; color: #154834; }
.bar-track {
  display: flex;
  align-items: end;
  min-width: 0;
  border-bottom: 1px solid #a6bca9;
  background: repeating-linear-gradient(to top, transparent 0 14px, #dde9de 14px 15px);
}
.bar-fill {
  width: 100%;
  margin-inline: .16rem;
  border-radius: 3px 3px 0 0;
  background: linear-gradient(180deg, #9dc48b, #629674);
  transform-origin: bottom;
  animation: grow-bar .48s cubic-bezier(.22,.72,.36,1) both;
}
.chart-bars button[aria-pressed="true"] .bar-fill { background: linear-gradient(180deg, #80af72, #24583d); }
.bar-label { font: .73rem/1.2 var(--mono); overflow: hidden; text-overflow: ellipsis; }
.chart-caption { align-items: baseline; color: var(--body); font-size: .79rem; }
.chart-caption p { font-variant-numeric: tabular-nums; }

.lookup-share {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .55rem 1rem;
  margin-top: .72rem;
}
.share-address { color: var(--muted); font: .79rem/1.5 var(--mono); overflow-wrap: anywhere; }
.lookup-recent { padding-top: 1rem; margin-top: 1rem; border-top: 1px solid var(--line); }
.lookup-recent ul { display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 0; list-style: none; }
.lookup-recent li a {
  display: block;
  padding: .36rem .56rem;
  border: 1px solid var(--line);
  border-radius: 5px;
  color: var(--accent);
  background: #f7faf7;
  font-size: .85rem;
  text-decoration: none;
  transition: background var(--duration), border-color var(--duration);
}
.lookup-recent li a:hover { background: var(--wash); border-color: #98b59f; }
.sort-button {
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  font: inherit;
  text-decoration: underline dotted;
  text-underline-offset: .22em;
}
th[aria-sort] .sort-button { text-decoration-style: solid; color: var(--forest); }
th[aria-sort]::after {
  display: inline-block;
  content: "";
  width: 0;
  height: 0;
  border: 4px solid transparent;
  margin-left: .3rem;
}
th[aria-sort="ascending"]::after { border-bottom-color: var(--accent); transform: translateY(-2px); }
th[aria-sort="descending"]::after { border-top-color: var(--accent); transform: translateY(2px); }

.flow-console { margin-top: .8rem; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; background: #fff; }
.flow-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem 1rem;
  padding: .65rem .95rem;
  border-bottom: 1px solid var(--line);
  color: var(--body);
  font-size: .88rem;
}
.flow-controls { display: flex; gap: .36rem; flex-wrap: wrap; }
.flow-meter { margin-top: .28rem; width: 86px; height: 4px; border-radius: 8px; background: #dce8df; }
.flow-meter span {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  background: #51906a;
  transform: scaleX(var(--stage, 0));
  transform-origin: left;
  transition: transform .35s ease;
}
.flow-console .stage-detail { margin-top: 0; border-radius: 0; background: #f4f8f3; }

.speed-comparison { margin-top: 1.45rem; padding-top: 1rem; border-top: 1px solid var(--line); }
.speed-comparison p { color: var(--muted); margin-top: .35rem; }
.speed-options { display: grid; gap: .4rem; margin-top: .65rem; }
.speed-option {
  display: grid;
  grid-template-columns: minmax(126px, 1fr) minmax(34px, 2fr) max-content;
  align-items: center;
  gap: .6rem;
  text-align: left;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  padding: .56rem .62rem;
}
.speed-option:hover { border-color: #8cb698; }
.speed-option[aria-pressed="true"] { border-color: #78a887; background: #f0f7ef; }
.speed-label { display: grid; font-size: .86rem; }
.speed-label > span, .speed-duration { color: var(--muted); font-size: .81rem; }
.speed-track { background: #edf3ee; min-width: 0; height: 7px; border-radius: 7px; }
.speed-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: #78a584;
  transform-origin: left;
  animation: grow-meter .38s ease-out both;
}
.speed-option[aria-pressed="true"] .speed-fill { background: #397d51; }
.speed-duration { font-variant-numeric: tabular-nums; }
.delivery-timeline { padding: 0; margin: .75rem 0 0; list-style: none; }
.delivery-step {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .68rem;
  padding: .72rem .55rem;
  border-bottom: 1px solid var(--line);
  animation: panel-in .26s ease both;
}
.delivery-step p { font-size: .88rem; margin-top: .22rem; }
.delivery-number {
  display: grid;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  color: #286243;
  font-size: .88rem;
  font-weight: 700;
  border: 1px solid #b9d6be;
  background: #eff6ed;
  border-radius: 50%;
}

.help-layout { display: grid; grid-template-columns: minmax(0, .85fr) minmax(0, 2.15fr); gap: clamp(1.25rem, 4vw, 3rem); }
.help-shortcuts { border-top: 1px solid var(--line); padding-top: .8rem; align-self: start; }
.help-shortcuts h2 { font-size: 1.25rem; margin-bottom: .42rem; }
.help-shortcuts a { display: block; width: fit-content; padding: .32rem 0; color: var(--accent); }
.faq-toolbar { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: .55rem; margin-bottom: .52rem; }
.faq-toolbar .button { align-self: end; }
#faq-count:not(:empty) { margin-block: .4rem; font-size: .86rem; }

@keyframes grow-bar { from { opacity: .5; transform: scaleY(.12); } to { opacity: 1; transform: scaleY(1); } }
@keyframes grow-meter { from { opacity: .5; transform: scaleX(.1); } to { opacity: 1; transform: scaleX(1); } }
@keyframes chart-in { from { opacity: .5; transform: translateY(5px); } to { opacity: 1; transform: translateY(0); } }

@media (max-width: 720px) {
  .help-layout { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .help-shortcuts { grid-row: 2; }
}

@media (max-width: 440px) {
  .pulse-chart { margin-inline: .72rem; }
  .speed-option { grid-template-columns: minmax(0, 1fr) max-content; gap: .32rem; }
  .speed-track { grid-column: 1; grid-row: 2; }
  .speed-duration { grid-column: 2; grid-row: 2; }
  .delivery-step { grid-template-columns: auto minmax(0, 1fr); }
  .delivery-step .status-badge { grid-column: 2; justify-self: start; }
}
