.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr);
  grid-template-areas: "device copy" "ribbon ribbon";
  column-gap: 76px;
  row-gap: 58px;
  padding-top: 94px;
  padding-bottom: 54px;
  align-items: center;
  overflow-x: clip;
}
.copy { grid-area: copy; position: relative; z-index: 1; }
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  margin: 0 0 19px;
  font-size: var(--micro);
  font-weight: var(--medium);
  letter-spacing: var(--tracking-label);
  color: var(--muted);
}
.eyebrow::before { content: ""; width: 24px; height: 1px; background: var(--muted); flex-shrink: 0; }
h1 .brand-line { display: block; margin-bottom: 6px; }
h1 .title-line { display: block; }
.description { max-width: 465px; font-size: var(--body-size); line-height: var(--leading-wide); color: var(--muted); margin: 25px 0 0; }
.description strong { color: var(--text); }
.trust { display: flex; align-items: center; gap: 17px; list-style: none; padding: 0; margin: 22px 0 0; color: var(--muted); font-size: var(--micro); }
.trust li { display: flex; align-items: center; gap: 6px; margin: 0; white-space: nowrap; }
.trust svg { width: 14px; height: 14px; color: var(--success); }
.boundary { font-size: var(--micro); color: var(--quiet); margin: 15px 0 0; }
.device {
  grid-area: device;
  position: relative;
  margin: 0;
  min-width: 0;
  background: linear-gradient(155deg, var(--panel-high), var(--panel) 65%);
  border-radius: var(--radius);
  box-shadow: var(--panel-shadow);
  border: 1px solid var(--line);
  overflow: hidden;
}
.device::before {
  content: "";
  position: absolute;
  inset: 0;
  background: repeating-linear-gradient(90deg, var(--clear) 0, var(--clear) 5px, var(--etch) 6px, var(--clear) 7px);
  opacity: .23;
  pointer-events: none;
}
.device-heading { position: relative; display: flex; align-items: center; justify-content: space-between; padding: 25px 28px 0; }
.device-heading strong { font-size: var(--small); font-weight: var(--medium); }
.device-heading span { border: 1px solid var(--line); border-radius: var(--pill); padding: 3px 10px; color: var(--muted); font-size: var(--tiny); }
.machine { display: block; width: 100%; height: auto; position: relative; }
.device-caption { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 15px; margin: 0 28px; padding: 18px 0 22px; border-top: 1px solid var(--line); font-size: var(--micro); color: var(--quiet); }
.device-caption a { display: inline-flex; align-items: center; min-height: 24px; color: var(--muted); white-space: nowrap; }
.device-caption a span { margin-left: 7px; }
.ruler-line { stroke: var(--shine); stroke-width: 1; }
.route-line { fill: none; stroke: var(--border); stroke-width: 1.2; }
.route-selected { fill: none; stroke: var(--tint-line); stroke-width: 1.5; }
.route-dashed { stroke-dasharray: 3 6; }
.svg-muted { fill: var(--muted); }
.svg-quiet { fill: var(--quiet); }
.svg-text { fill: var(--text); }
.svg-body { font-family: var(--body); font-size: var(--small); font-weight: var(--medium); }
.svg-mono { font-family: var(--mono); font-size: var(--tiny); letter-spacing: var(--tracking-label); }
.svg-small { font-family: var(--body); font-size: var(--tiny); }
.node { fill: var(--panel-high); stroke: var(--quiet); stroke-width: 1.3; }
.node-core { fill: var(--muted); }
.ridge-top { stop-color: var(--border); }
.ridge-bottom { stop-color: var(--panel); }
.glass-top { stop-color: var(--glass-light); }
.glass-middle { stop-color: var(--glass); }
.glass-end { stop-color: var(--tint); }
.floor-shadow { fill: var(--deep-shadow); }
.track-body { fill: url(#rail-material); stroke: var(--border); stroke-width: 1; }
.track-rim { fill: none; stroke: var(--shine); stroke-width: 1; }
.track-bed { fill: var(--bg); stroke: var(--border); stroke-width: 1; }
.cursor-shadow { fill: var(--shadow); }
.cursor { fill: url(#cursor-material); stroke: var(--shine); stroke-width: 1; }
.cursor-inset { fill: none; stroke: var(--glass-light); stroke-width: 1; }
.ribbon { grid-area: ribbon; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); column-gap: 76px; border-top: 1px solid var(--line); padding-top: 27px; }
.ribbon-label { display: flex; align-items: center; gap: 14px; margin-bottom: 15px; font-size: var(--micro); color: var(--quiet); }
.ribbon-label strong { color: var(--muted); font-family: var(--mono); font-weight: var(--regular); letter-spacing: var(--tracking-brand); }
.platforms, .flags { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0; padding: 0; list-style: none; }
.platforms li, .flags li { display: flex; align-items: center; gap: 8px; margin: 0; white-space: nowrap; color: var(--muted); font-size: var(--micro); }
.platforms svg { width: 22px; height: 22px; }
.flags svg { width: 23px; height: 16px; border-radius: var(--flag-radius); overflow: hidden; box-shadow: 0 0 0 1px var(--line); }
.f-white { fill: var(--flag-white); }
.f-red { fill: var(--flag-red); }
.f-hk { fill: var(--flag-hk); }
.f-jp { fill: var(--flag-jp); }
.f-us { fill: var(--flag-us); }
.f-navy { fill: var(--flag-navy); }
.f-blue { fill: var(--flag-blue); }
.f-green { fill: var(--flag-green); }
.next-edge { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 24px 28px; border-radius: var(--radius) var(--radius) 0 0; background: var(--panel); border-top: 1px solid var(--line); color: var(--muted); font-size: var(--small); }
.next-edge p { margin: 0; }
.next-edge a { font-size: var(--micro); color: var(--quiet); min-height: 24px; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

.fact-tag, .badge, .tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  max-width: 100%;
  padding: 5px 12px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--glass);
  color: var(--muted);
  font-size: var(--micro);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.badge { color: var(--text); border-color: var(--tint-line); background: var(--tint); }
.badge-success { color: var(--success); }
.badge-warn { color: var(--warn); }
.badge-error { color: var(--error); }
.badge-dot::before { content: ""; width: 6px; height: 6px; border-radius: var(--pill); background: currentColor; flex-shrink: 0; }
.fact-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.decision-list { margin: 0; }
.decision-row {
  display: grid;
  grid-template-columns: minmax(0, .7fr) minmax(0, 1.6fr);
  gap: 64px;
  padding-top: 34px;
  padding-bottom: 34px;
  border-top: 1px solid var(--line);
  box-shadow: var(--groove-shadow);
}
.decision-row > * { min-width: 0; }
.decision-row dt { font-size: var(--large); font-weight: var(--bold); color: var(--text); }
.decision-row dd { margin: 0; color: var(--muted); }
.decision-row dd p:last-child { margin-bottom: 0; }

.tabs { min-width: 0; }
[role="tablist"] {
  display: flex;
  gap: 6px;
  width: fit-content;
  max-width: 100%;
  overflow-x: auto;
  padding: 6px;
  border: 1px solid var(--border);
  border-radius: var(--pill);
  background: var(--bg);
  box-shadow: inset 0 2px 6px var(--shadow);
  -webkit-overflow-scrolling: touch;
}
[role="tab"] {
  flex-shrink: 0;
  min-height: 44px;
  padding: 10px 24px;
  border: 1px solid var(--clear);
  border-radius: var(--pill);
  font-weight: var(--semibold);
  font-size: var(--small);
  color: var(--muted);
}
[role="tab"]:hover { color: var(--text); background: var(--panel); }
[role="tab"][aria-selected="true"] { color: var(--text); background: var(--panel-high); border-color: var(--shine); box-shadow: inset 0 1px 0 var(--etch); }
[role="tabpanel"] { margin-top: 28px; min-width: 0; }
.toc-tabs {
  display: flex;
  gap: 8px;
  position: sticky;
  top: var(--toc-offset);
  z-index: 20;
  overflow-x: auto;
  max-width: 100%;
  padding: 10px;
  margin-block: 28px;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--pill);
  box-shadow: var(--panel-shadow);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.toc-tabs a { display: inline-flex; align-items: center; justify-content: center; flex-shrink: 0; min-height: 44px; padding: 8px 18px; border-radius: var(--pill); color: var(--muted); font-size: var(--small); }
.toc-tabs a:hover { background: var(--panel-high); color: var(--text); }
.toc-tabs a.is-reading { background: var(--panel-high); color: var(--text); box-shadow: inset 0 -2px 0 var(--accent); }
.toc-tabs.toc-static { position: static; }
body:has(.toc-tabs) section[id],
body:has(.toc-tabs) h2[id],
body:has(.toc-tabs) h3[id] { scroll-margin-top: var(--toc-clearance); }

.faq-list { border-top: 1px solid var(--line); }
.faq-item { border-bottom: 1px solid var(--line); box-shadow: var(--groove-shadow); }
.faq-item summary { cursor: pointer; position: relative; padding: 24px 40px 24px 0; font-size: var(--large); font-weight: var(--semibold); list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; position: absolute; right: 8px; top: 24px; color: var(--muted); }
.faq-item[open] summary::after { content: "−"; }
.faq-answer { padding-bottom: 24px; max-width: 900px; color: var(--muted); }
.faq-answer > :last-child { margin-bottom: 0; }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.plan-card {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  position: relative;
  padding: 30px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(150deg, var(--panel-high), var(--panel) 65%);
  box-shadow: var(--panel-shadow);
}
.plan-card.is-current { border-color: var(--accent); box-shadow: var(--panel-shadow), 0 0 0 1px var(--tint-line); }
.plan-kicker { color: var(--muted); font-size: var(--small); margin-bottom: 14px; }
.plan-card h3 { margin-bottom: 16px; }
.plan-price { font-family: var(--mono); font-size: var(--h2); font-weight: var(--bold); color: var(--text); font-variant-numeric: tabular-nums; margin: 12px 0; }
.plan-price small { font-family: var(--body); font-size: var(--small); font-weight: var(--regular); color: var(--muted); }
.plan-card ul { padding-inline-start: 1.2em; color: var(--muted); margin-bottom: 26px; }
.plan-card .button { margin-top: auto; width: 100%; }
.plan-badge { margin-bottom: 16px; }
.plan-note { color: var(--muted); font-size: var(--small); margin-top: 20px; }

.table-scroll {
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--inner-radius);
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
}
.data-table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: var(--small); }
.data-table caption { text-align: left; padding: 20px; font-weight: var(--semibold); color: var(--text); background: var(--panel-high); }
.data-table th, .data-table td { text-align: left; padding: 18px 20px; border-bottom: 1px solid var(--border); vertical-align: top; }
.data-table th { font-weight: var(--semibold); color: var(--text); background: var(--panel-high); }
.data-table td { color: var(--muted); }
.data-table td:first-child { color: var(--text); font-weight: var(--medium); }
.data-table tr:last-child > * { border-bottom: 0; }
.data-table .region-row th { color: var(--text); background: var(--bg); font-size: var(--micro); letter-spacing: var(--tracking-brand); }
.prose > .data-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; min-width: 0; }
.flag-inline { display: inline-flex; align-items: center; gap: 8px; }
.flag-inline svg { width: 23px; height: 16px; border-radius: var(--flag-radius); overflow: hidden; }

.platform-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.platform-card { min-width: 0; padding: 25px 18px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: inset 0 1px 0 var(--etch); }
.platform-card > svg { width: 32px; height: 32px; color: var(--muted); margin-bottom: 20px; }
.platform-card h3 { font-size: var(--large); margin-bottom: 20px; }
.platform-card .button { width: 100%; padding-inline: 12px; font-size: var(--micro); }

.article-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--gap); }
.article-card { min-width: 0; padding: 28px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line); box-shadow: inset 0 1px 0 var(--etch); }
.article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; margin-bottom: 22px; font-size: var(--micro); color: var(--muted); }
.article-card h3 { font-size: var(--large); margin-bottom: 16px; }
.article-card p { color: var(--muted); font-size: var(--small); }
.article-card a:hover { text-decoration: underline; text-underline-offset: 5px; }
.article-stamp {
  position: relative;
  overflow-x: clip;
  padding: 40px;
  border-radius: var(--radius);
  color: var(--bg);
  background: var(--text);
}
.article-stamp h1, .article-stamp h2 { color: var(--bg); max-width: 85%; }
.article-stamp .article-meta { color: var(--border); }
.article-stamp::after {
  content: "↗";
  position: absolute;
  top: 24px;
  right: 24px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border: 3px double var(--border);
  border-radius: var(--small-radius);
  transform: rotate(-10deg);
  color: var(--border);
  font-size: var(--h3);
}
.callout, blockquote {
  margin: 24px 0;
  padding: 24px 28px;
  border-inline-start: 3px solid var(--accent);
  border-radius: 0 var(--inner-radius) var(--inner-radius) 0;
  background: var(--tint);
  color: var(--text);
}
.callout p:last-child, blockquote p:last-child { margin-bottom: 0; }
.article-promo {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 32px;
  padding: 32px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: linear-gradient(135deg, var(--panel-high), var(--panel));
  box-shadow: var(--panel-shadow);
}
.article-promo > div { min-width: 0; }
.article-promo h2, .article-promo h3 { font-size: var(--h3); }
.article-promo p { color: var(--muted); margin: 12px 0 0; }
.article-promo .button { flex-shrink: 0; }
.preview-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.preview-swatches { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.swatch { min-width: 0; padding: 12px; border: 1px solid var(--border); border-radius: var(--inner-radius); background: var(--panel); font-family: var(--mono); font-size: var(--micro); overflow-wrap: anywhere; }
.swatch-sample { height: 60px; margin-bottom: 12px; border-radius: var(--small-radius); border: 1px solid var(--line); }
.sw-bg { background: var(--bg); }
.sw-panel { background: var(--panel); }
.sw-panel-high { background: var(--panel-high); }
.sw-border { background: var(--border); }
.sw-accent { background: var(--accent); }
.sw-accent-dark { background: var(--accent-dark); }
.sw-text { background: var(--text); }
.sw-muted { background: var(--muted); }
.sw-success { background: var(--success); }
.sw-warn { background: var(--warn); }
.sw-error { background: var(--error); }
.sw-quiet { background: var(--quiet); }
.sw-line { background: var(--line); }
.sw-etch { background: var(--etch); }
.sw-shine { background: var(--shine); }
.sw-glass { background: var(--glass); }
.sw-glass-light { background: var(--glass-light); }
.sw-tint { background: var(--tint); }
.sw-tint-line { background: var(--tint-line); }
.sw-shadow { background: var(--shadow); }
.sw-deep-shadow { background: var(--deep-shadow); }
.sw-button-glow { background: var(--button-glow); }
.sw-clear { background: var(--clear); }
.sw-flag-white { background: var(--flag-white); }
.sw-flag-red { background: var(--flag-red); }
.sw-flag-hk { background: var(--flag-hk); }
.sw-flag-jp { background: var(--flag-jp); }
.sw-flag-us { background: var(--flag-us); }
.sw-flag-navy { background: var(--flag-navy); }
.sw-flag-blue { background: var(--flag-blue); }
.sw-flag-green { background: var(--flag-green); }
.type-sample { padding-top: 22px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.type-sample p { margin: 12px 0 0; color: var(--muted); }
.button-samples { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; }

@media (min-width: 1500px) {
  .hero { padding-top: 110px; }
}
@media (max-width: 1250px) {
  .hero, .ribbon { column-gap: 42px; }
  .trust { gap: 10px; }
  .platforms, .flags { gap: 10px; }
  .platforms li, .flags li { gap: 5px; }
  .platform-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1050px) {
  .hero { padding-top: 60px; column-gap: 30px; row-gap: 38px; }
  .trust { flex-wrap: wrap; gap: 8px 14px; }
  .ribbon { column-gap: 30px; }
  .platforms, .flags { flex-wrap: wrap; justify-content: flex-start; gap: 12px 18px; }
  .device-heading { padding: 20px 20px 0; }
  .device-caption { margin-inline: 20px; font-size: var(--tiny); }
  .plan-card { padding: 24px; }
  .article-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 768px) {
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-areas: "copy" "ribbon" "device"; padding-top: 38px; padding-bottom: 26px; row-gap: 28px; }
  .eyebrow { margin-bottom: 15px; }
  h1 .brand-line { display: inline; margin-right: 10px; }
  h1 .title-line { display: inline; }
  .description { margin-top: 21px; font-size: var(--small); max-width: none; }
  .trust { font-size: var(--micro); margin-top: 17px; gap: 8px 14px; }
  .boundary { font-size: var(--tiny); margin-top: 12px; }
  .ribbon { grid-template-columns: minmax(0, 1fr); gap: 23px; padding-top: 21px; }
  .ribbon-label { margin-bottom: 10px; }
  .platforms, .flags { gap: 12px; justify-content: space-between; }
  .platforms li, .flags li { font-size: var(--tiny); gap: 5px; }
  .platforms svg { width: 19px; height: 19px; }
  .flags svg { width: 20px; height: 14px; }
  .device-heading { padding: 18px 20px 0; }
  .device-caption { padding: 12px 0 15px; }
  .next-edge { margin-top: 0; padding: 20px; font-size: var(--micro); }
  .next-edge a { font-size: var(--tiny); }
  .decision-row { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .plan-grid, .article-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-grid { grid-template-columns: minmax(0, 1fr); }
  .preview-swatches { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .article-promo { align-items: flex-start; flex-direction: column; padding: 24px; }
  .article-stamp { padding: 28px; }
  .article-stamp::after { display: none; }
  .article-stamp h1, .article-stamp h2 { max-width: none; }
  .faq-item summary { font-size: var(--body-size); }
}
@media (max-width: 640px) {
  .platform-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .toc-tabs { border-radius: var(--inner-radius); }
  .callout, blockquote { padding: 20px; }
}