/* Topo Vector Guide. Layout: full-height tree on the left (collapses to an icon rail), one
   reading column on the right. Dark only: the face's own palette on its terrain navy. */
@font-face { font-family: "Rajdhani"; src: url("Rajdhani-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Saira SemiCondensed"; src: url("SairaSemiCondensed-SemiBold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #0b141b;          /* terrain navy */
  --panel: #0f1a22;
  --panel-2: #142330;
  --line: #22323d;
  --fg: #e6edf1;
  --muted: #93a4af;
  --detail: #8ca9bc;      /* the face's Detail color */
  --orange: #ff641f;      /* default Accent and Data Color */
  --ivory: #f1ede1;
  --red: #f35b4f;
  --green: #9dbb98;
  --display: "Rajdhani", "Saira SemiCondensed", "Arial Narrow", system-ui, sans-serif;
  --label: "Saira SemiCondensed", "Rajdhani", "Arial Narrow", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --tree: 264px;
  --rail: 56px;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--fg); font: 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
a { color: var(--fg); text-decoration-color: rgba(255, 100, 31, .55); text-underline-offset: 3px; }
a:hover { color: var(--orange); }
:focus-visible { outline: 2px solid var(--orange); outline-offset: 2px; border-radius: 4px; }
img { max-width: 100%; height: auto; }
[hidden] { display: none !important; }

.layout { display: flex; min-height: 100%; }

/* Tree */
.tree { width: var(--tree); flex: none; position: sticky; top: 0; height: 100vh; overflow-y: auto;
  background: var(--panel); border-right: 1px solid var(--line); padding: 14px 10px 24px;
  padding-left: max(10px, env(safe-area-inset-left, 0px)); transition: width .18s ease; }
.brand { display: flex; align-items: center; justify-content: space-between; margin: 0 4px 14px; }
.brand a { display: flex; align-items: center; gap: 8px; text-decoration: none; font: 700 17px var(--display); letter-spacing: .08em; text-transform: uppercase; }
.brand img { border-radius: 5px; }
.toggle { background: none; border: 1px solid var(--line); color: var(--muted); border-radius: 6px; width: 28px; height: 28px; cursor: pointer; font-size: 16px; line-height: 1; }
.toggle:hover { color: var(--fg); border-color: var(--muted); }
.group { font: 600 11px var(--label); letter-spacing: .14em; text-transform: uppercase; color: #60717e; margin: 16px 8px 6px; }
.tree ul { list-style: none; margin: 0; padding: 0; }
.tree li a { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 6px; color: #b8c6cf; text-decoration: none; font-size: 14.5px; border-left: 2px solid transparent; }
.tree li a:hover { background: var(--panel-2); color: var(--fg); }
.tree li a[aria-current="page"] { background: var(--panel-2); color: #fff; border-left-color: var(--orange); }
.tree li li a { padding-left: 34px; font-size: 14px; color: var(--muted); }
.tree svg { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.6; }
.tree li li svg { display: none; }

.layout.rail .tree { width: var(--rail); padding-left: 8px; padding-right: 8px; }
.layout.rail .tree .label, .layout.rail .group, .layout.rail .brand span, .layout.rail .tree li li { display: none; }
.layout.rail .brand { justify-content: center; flex-direction: column; gap: 10px; }
.layout.rail .tree li a { justify-content: center; padding: 8px 0; }
.layout.rail .toggle { transform: rotate(180deg); }

/* Content */
.content { --gutter: 40px; flex: 1; min-width: 0; padding: 36px var(--gutter) 40px; container-type: inline-size; }
.page { max-width: 980px; margin: 0 auto; }
.kicker { font: 600 12px var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--orange); margin: 0 0 6px; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; letter-spacing: .01em; text-wrap: balance; line-height: 1.15; }
h1 { font-size: clamp(32px, 4.4vw, 48px); margin: 0 0 14px; }
h2 { font-size: 28px; margin: 44px 0 12px; }
h3 { font-size: 21px; margin: 28px 0 8px; }
p, li { max-width: 68ch; color: #c6d2d9; }
.lead { font-size: 18.5px; color: var(--fg); }
.muted { color: var(--muted); }
code, .chip { font: 600 14px var(--label); letter-spacing: .03em; }
code { background: var(--panel-2); border: 1px solid var(--line); padding: 1px 6px; border-radius: 5px; color: var(--ivory); }

/* Full-width hero: it spans the content area edge to edge (container units), its inner grid
   is wider than the page column. */
.hero-pair { width: calc(100cqw + 2 * var(--gutter)); margin: -36px 0 28px calc((100% - 100cqw) / 2 - var(--gutter)); overflow: clip; background: radial-gradient(ellipse 55% 75% at 72% 50%, #15283a 0%, rgba(11, 20, 27, 0) 70%), linear-gradient(180deg, #0e1a23 0%, var(--bg) 100%); border-bottom: 1px solid var(--line); }
.hero-inner { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); align-items: center; gap: 24px; max-width: 1240px; min-height: 600px; margin: 0 auto; padding: 0 var(--gutter); }
.hero-pair .tagline { font: 600 26px/1.2 var(--display); color: var(--fg); margin: 0 0 12px; }
.hero-watches { position: relative; height: 600px; }
.hero-watches img { position: absolute; max-width: none; filter: drop-shadow(0 30px 50px rgba(0, 0, 0, .55)); }
.hero-watches img:first-child { width: 76%; right: -18%; top: 16%; transform: rotate(9deg); opacity: .92; }
.hero-watches img:last-child { width: 96%; left: -8%; top: 0; transform: rotate(-7deg); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 20px 0 4px; }
.button.ghost { background: none; border: 1px solid var(--line); color: var(--fg); }
.page-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; overflow-x: clip; }
.glow-stage { position: relative; }
.glow-stage::before { content: ''; position: absolute; inset: 8%; border-radius: 50%; background: radial-gradient(circle, rgba(255, 100, 31, .55), rgba(255, 100, 31, 0) 68%); filter: blur(36px); }
.glow-stage img { position: relative; display: block; width: 100%; }
.float-right { float: right; width: 240px; margin: 0 0 12px 24px; }
.float-right img { width: 100%; }
.float-pair { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 760px; margin: 12px auto; text-align: center; }
.float-pair figure { margin: 0; }
.float-pair img { width: 100%; }
.hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(220px, 380px); gap: 32px; align-items: center; margin-bottom: 18px; }
.story { display: grid; grid-template-columns: minmax(180px, 300px) minmax(0, 1fr); gap: 32px; align-items: center; padding: 34px 0; border-top: 1px solid var(--line); }
.story.flip { grid-template-columns: minmax(0, 1fr) minmax(180px, 300px); }
.story.flip > .media { order: 2; }
.story.wide { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.story.wide.flip > .duo { order: 2; }
.duo { position: relative; height: 560px; }
.duo img { position: absolute; max-width: none; filter: drop-shadow(0 26px 44px rgba(0, 0, 0, .55)); }
.duo img:first-child { width: 70%; right: -6%; top: 10%; transform: rotate(8deg); opacity: .94; }
.duo img:last-child { width: 80%; left: 0; top: 0; transform: rotate(-6deg); }
.media { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
.media img { display: block; }
.face { filter: drop-shadow(0 18px 40px rgba(0, 0, 0, .55)); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.chip { display: inline-block; border: 1px solid #2a3b47; border-radius: 999px; padding: 3px 11px; color: #c6d2d9; font-size: 13px; }

.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; margin: 18px 0; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.card h3 { margin-top: 0; }

.table-wrap { overflow-x: auto; margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 10px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font: 600 12px var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); background: var(--panel); }
tr:last-child td { border-bottom: 0; }
td img { display: block; max-width: 140px; }
/* Wide Figma sheets: scroll inside the figure on narrow screens, never the page */
.sheet { margin: 18px 0 24px; overflow-x: auto; }
.sheet img { display: block; min-width: 640px; border: 1px solid var(--line); border-radius: 10px; }
figcaption { font-size: 14px; color: var(--muted); margin-top: 8px; }
.steps-list li { margin: 6px 0; }
.button { display: inline-block; background: var(--orange); color: #0b141b; font: 700 15px var(--label); letter-spacing: .04em; text-decoration: none; padding: 10px 18px; border-radius: 8px; }
.button:hover { filter: brightness(1.08); }
.swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; vertical-align: -2px; margin-right: 6px; border: 1px solid rgba(255, 255, 255, .18); }

/* Face builder: an orange-lit bench that invites a click */
.builder { background: var(--panel); border: 1px solid var(--orange); box-shadow: 0 0 0 1px rgba(255, 100, 31, .25), 0 0 48px rgba(255, 100, 31, .16); border-radius: 16px; padding: 22px; margin: 18px 0 26px; }
.builder h3 { margin: 0 0 12px; }
.builder .styles { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.builder button { min-height: 36px; background: var(--panel-2); border: 1px solid var(--line); color: var(--fg); border-radius: 8px; padding: 6px 12px; cursor: pointer; font: 600 14px var(--label); text-align: left; }
.builder button[aria-pressed="true"] { border-color: var(--orange); color: #fff; background: #1a1410; }
.builder .bench { display: grid; grid-template-columns: minmax(150px, 190px) minmax(0, 1fr) minmax(150px, 200px); gap: 18px; align-items: start; }
.builder .zones, .builder .options { display: flex; flex-direction: column; gap: 6px; }
.builder small { display: block; color: var(--muted); font-weight: 500; font-size: 12px; }
.builder small.older { color: var(--orange); }
.builder .stage { position: relative; max-width: 460px; width: 100%; margin: 0 auto; }
.builder .hardware { display: block; width: 100%; -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%); mask-image: linear-gradient(to bottom, transparent 0, #000 10%, #000 90%, transparent 100%); }
.builder .screen { position: absolute; border-radius: 50%; overflow: hidden; }
.builder .screen img { position: absolute; display: block; max-width: none; }
.builder .screen canvas { display: block; width: 100%; height: 100%; }
.builder .hot { position: absolute; min-height: 0; padding: 0; background: none; border: 2px dashed transparent; border-radius: 10px; }
.builder .hot:hover { border-color: rgba(255, 100, 31, .6); }
.builder .hot[aria-pressed="true"] { border-color: var(--orange); background: none; }
.builder .info { margin: 20px 0 4px; padding-top: 16px; border-top: 1px solid var(--line); }
.builder .info h3 { font-size: 26px; margin: 2px 0 6px; }
.builder .info p { margin: 0 0 8px; }
.builder .info .links { display: flex; flex-wrap: wrap; gap: 6px 18px; }

/* Field pages: large state dials, state rows with a dial thumbnail */
.dials { display: flex; flex-wrap: wrap; gap: 18px; margin: 20px 0 6px; }
.dials figure { margin: 0; width: 176px; text-align: center; }
.dials img { width: 176px; }
.states td:first-child { width: 104px; }
.states td:first-child img { width: 96px; }
details.more { margin: 14px 0 22px; border: 1px solid var(--line); border-radius: 10px; padding: 12px 16px; background: var(--panel); }
details.more summary { cursor: pointer; font: 600 15px var(--label); color: var(--fg); }
details.more .table-wrap { margin-bottom: 4px; }
.works { margin-top: 14px; color: var(--muted); font-size: 15px; }
.works a { color: var(--fg); }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 16px; margin: 18px 0; }
.gallery figure { margin: 0; text-align: center; }
.gallery img { width: 100%; }
.mockup { border-radius: 14px; }

.foot { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: 56px; padding-top: 16px; border-top: 1px solid var(--line); color: #60717e; font-size: 13px; }

@media (max-width: 760px) {
  .layout:not(.open) .tree { width: var(--rail); padding-left: 8px; padding-right: 8px; }
  .layout:not(.open) .tree .label, .layout:not(.open) .group, .layout:not(.open) .brand span, .layout:not(.open) .tree li li { display: none; }
  .layout:not(.open) .brand { justify-content: center; flex-direction: column; gap: 10px; }
  .layout:not(.open) .tree li a { justify-content: center; padding: 8px 0; }
  .layout.open .tree { position: fixed; z-index: 5; width: min(86vw, var(--tree)); box-shadow: 0 0 40px rgba(0, 0, 0, .6); }
  .content { --gutter: 16px; padding: 24px var(--gutter) 32px; }
  .hero, .story, .story.flip, .story.wide, .hero-inner, .page-hero { grid-template-columns: minmax(0, 1fr); }
  .story.wide.flip > .duo { order: 0; }
  .duo { height: 420px; }
  .hero-pair { margin-top: -24px; }
  .hero-inner { min-height: 0; padding-bottom: 24px; }
  .hero-watches { order: -1; height: 300px; }
  .float-right { float: none; width: 70%; margin: 0 auto 12px; }
  .builder { padding: 16px; }
  .builder .bench { grid-template-columns: minmax(0, 1fr); }
  .builder .zones, .builder .options { flex-direction: row; flex-wrap: wrap; }
  .builder .stage { order: -1; max-width: 300px; }
  .builder .zones small { display: none; }
  .builder .zones button, .builder .options button { padding: 6px 10px; font-size: 13px; }
  .story.flip > .media { order: 0; }
  .dials figure { width: calc(50% - 9px); }
  .dials img { width: 100%; }
  .states thead { display: none; }
  .states table, .states tbody, .states td { display: block; }
  .states tr { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 2px 12px; padding: 12px; border-bottom: 1px solid var(--line); }
  .states td { border: 0; padding: 0; width: auto; }
  .states td:first-child { grid-row: span 3; width: auto; }
  .states td:first-child img { width: 84px; }
  .states td:nth-child(2) { color: var(--fg); font-weight: 600; }
  .states td:nth-child(4) { color: var(--muted); font-size: 14px; }
}
@media (prefers-reduced-motion: reduce) { .tree { transition: none; } }
