/* showhow — tokens lifted from scripts/build_viewer.py so the site and the product match. */
:root {
  --bg: #101317;
  --panel: #171B20;
  --line: #262C33;
  --fg: #E8EAEC;
  --dim: #98A0A8;
  --faint: #6E767E;
  --accent: #E0A24E;
  --accent-dim: #8A6427;

  --sans: "IBM Plex Sans", ui-sans-serif, system-ui, -apple-system, sans-serif;
  --cond: "IBM Plex Sans Condensed", "IBM Plex Sans", ui-sans-serif, system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --pad: clamp(20px, 5vw, 56px);
  --gap: clamp(20px, 3vw, 28px);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }
.mono { font-family: var(--mono); }
.tiny { font-size: 12px; color: var(--faint); }

/* ---- bars ---- */
.bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 16px var(--pad); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: rgba(16,19,23,.92);
  backdrop-filter: blur(8px); z-index: 20;
}
.brand {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--cond); font-weight: 700; font-size: 19px;
  color: var(--fg); text-decoration: none; letter-spacing: -.01em;
}
.brand svg { color: var(--accent); }
.bar nav { display: flex; align-items: center; gap: clamp(12px, 3vw, 28px); }
.bar nav a { color: var(--dim); text-decoration: none; font-size: 15px; }
.bar nav a:hover { color: var(--fg); }
.bar nav .pill {
  border: 1px solid var(--accent); color: var(--accent);
  border-radius: 999px; padding: 8px 18px; font-weight: 500;
}
.bar nav .pill:hover { background: rgba(224,162,78,.1); color: var(--accent); }
@media (max-width: 620px) { .bar nav a:not(.pill) { display: none; } }

.foot {
  position: static; border-bottom: 0; border-top: 1px solid var(--line);
  color: var(--faint); font-size: 14px; flex-wrap: wrap;
}

/* ---- shared ---- */
h1 {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(34px, 6.2vw, 60px); line-height: 1.02;
  letter-spacing: -.02em; margin: 0; text-wrap: balance;
}
h2 {
  font-family: var(--cond); font-weight: 700;
  font-size: clamp(26px, 4.4vw, 40px); line-height: 1.05;
  letter-spacing: -.015em; margin: 0 0 14px; text-wrap: balance;
}
h3 { font-family: var(--cond); font-weight: 600; font-size: 18px; margin: 0; }
p { margin: 0; }
.lede { color: var(--dim); font-size: clamp(16px, 2vw, 19px); max-width: 46ch; }
.lede.narrow { max-width: 52ch; }
.eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .12em;
  text-transform: uppercase; color: var(--accent-dim); margin: 0 0 12px;
}
.eyebrow .rule { width: 26px; height: 1px; background: currentColor; flex: none; }
.center { text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; }
.center .eyebrow { justify-content: center; }

.btn {
  display: inline-block; border: 1px solid var(--line); border-radius: 9px;
  padding: 14px 26px; font-size: 15px; font-weight: 500;
  color: var(--fg); text-decoration: none; background: var(--panel);
  cursor: pointer; font-family: inherit;
}
.btn:hover { border-color: #39424C; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #101317; font-weight: 600; }
.btn.primary:hover { background: #EDB362; }
.btn.wide { width: 100%; }
.btn:disabled { opacity: .5; cursor: default; }
.btn:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible,
button:focus-visible, label.drop:focus-within {
  outline: 2px solid var(--accent); outline-offset: 2px;
}

.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip {
  border: 1px solid var(--line); color: var(--dim);
  border-radius: 999px; padding: 3px 11px; font-size: 13px;
}
.chip.on { border-color: var(--accent); color: var(--accent); }

.ref {
  display: inline-flex; align-items: center; justify-content: center;
  width: 26px; height: 26px; border: 1.2px solid #4A5057; border-radius: 999px;
  font-family: var(--mono); font-size: 12px; color: var(--dim); flex: none;
}
.ref.on { border-color: var(--accent-dim); color: var(--accent); }

/* ---- hero ---- */
.hero {
  display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 56px);
  align-items: center; padding: clamp(36px, 6vw, 68px) var(--pad) clamp(32px, 5vw, 60px);
}
@media (min-width: 900px) { .hero { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.hero-copy { display: flex; flex-direction: column; gap: 22px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.fineprint { font-family: var(--mono); font-size: 12.5px; color: var(--faint); }

.hero-demo { position: relative; }
.frame { border: 1px solid var(--line); border-radius: 12px; background: var(--panel); overflow: hidden; }
.frame-bar { display: flex; align-items: center; gap: 7px; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.frame-bar .dot { width: 9px; height: 9px; border-radius: 999px; background: #2E353D; }
.frame-bar .spacer { flex-grow: 1; }
.frame img { width: 100%; height: clamp(220px, 30vw, 320px); object-fit: cover; }
.frame-body { padding: 16px 18px; display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.callout-tag {
  position: absolute; right: -8px; bottom: -16px;
  display: flex; align-items: center; gap: 10px;
  border: 1.5px dashed var(--accent-dim); border-radius: 4px;
  background: rgba(16,19,23,.92); padding: 10px 14px;
  color: var(--accent); font-size: 12px;
}
@media (max-width: 520px) { .callout-tag { right: 8px; bottom: -12px; } }

/* ---- stats ---- */
.stats {
  display: grid; grid-template-columns: 1fr; gap: 1px;
  background: var(--line); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
@media (min-width: 720px) { .stats { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.stats > div { background: var(--bg); padding: 24px var(--pad); }
.stats strong {
  display: block; font-family: var(--cond); font-weight: 700;
  font-size: 30px; color: var(--accent); line-height: 1.1;
}
.stats span { font-size: 14.5px; color: var(--dim); }

/* ---- bands ---- */
.band { padding: clamp(40px, 6vw, 64px) var(--pad); }
.band.split { display: grid; grid-template-columns: 1fr; gap: clamp(32px, 5vw, 60px); align-items: start; }
@media (min-width: 900px) { .band.split { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.cards { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 26px; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.card {
  display: flex; flex-direction: column; gap: 11px;
  border: 1px solid var(--line); border-radius: 10px; padding: 22px; background: var(--panel);
}
.card .num {
  display: flex; align-items: center; justify-content: center;
  width: 30px; height: 30px; border: 1.2px solid var(--accent-dim);
  border-radius: 999px; font-family: var(--mono); font-size: 13px; color: var(--accent);
}
.card p { font-size: 15px; color: var(--dim); }

/* ---- demos ---- */
.demo-grid { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 28px; }
@media (min-width: 760px) { .demo-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.demo {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  overflow: hidden; display: flex; flex-direction: column;
  color: var(--fg); text-decoration: none;
}
.demo:hover { border-color: var(--accent-dim); }
.demo img { width: 100%; height: 168px; object-fit: cover; }
.demo-body { padding: 15px 17px; display: flex; flex-direction: column; gap: 7px; }
.demo-body p:last-child { font-size: 14.5px; color: var(--dim); }

.demo-row { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: var(--gap); }
@media (min-width: 720px) { .demo-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.demo-small {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 17px 19px; display: flex; align-items: center; justify-content: space-between;
  gap: 16px; color: var(--fg); text-decoration: none;
}
.demo-small:hover { border-color: var(--accent-dim); }
.demo-small > span:first-child { display: flex; flex-direction: column; gap: 3px; }
.demo-small .go { color: var(--accent); }

/* ---- before / after ---- */
.compare { display: grid; grid-template-columns: 1fr; gap: var(--gap); margin-top: 26px; }
@media (min-width: 860px) { .compare { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.compare figure { margin: 0; display: flex; flex-direction: column; gap: 12px; }
.compare figcaption {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--cond); font-weight: 600; font-size: 18px;
}
.shot { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; position: relative; background: var(--panel); }
.shot.paper { background: #F7F7F5; }
.shot img { width: 100%; height: clamp(260px, 34vw, 420px); object-fit: cover; object-position: top; }
.inset-tag {
  position: absolute; left: 14px; bottom: 14px;
  border: 1.5px dashed var(--accent-dim); border-radius: 4px;
  background: rgba(16,19,23,.9); padding: 8px 12px; font-size: 11.5px; color: var(--accent);
}
.compare figure > p { font-size: 15px; color: var(--dim); }

/* ---- forms ---- */
.ticks { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.ticks li { position: relative; padding-left: 29px; font-size: 15.5px; color: #C3C9CE; }
.ticks li::before {
  content: ""; position: absolute; left: 0; top: 7px; width: 17px; height: 10px;
  border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent);
  transform: rotate(-45deg);
}

.panel {
  border: 1px solid var(--line); border-radius: 12px; background: var(--panel);
  padding: clamp(20px, 3vw, 30px); display: flex; flex-direction: column; gap: 8px;
}
.panel label, .send-row label {
  font-family: var(--mono); font-size: 11px; letter-spacing: .09em;
  text-transform: uppercase; color: var(--dim); margin-top: 10px;
}
input, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 9px; background: var(--bg);
  padding: 13px 15px; font-size: 15px; color: var(--fg); font-family: inherit;
}
input::placeholder, textarea::placeholder { color: #5C646C; }
textarea { resize: vertical; min-height: 76px; }
.panel .btn { margin-top: 16px; }
.formnote { font-size: 13px; color: var(--faint); text-align: center; margin-top: 10px; }
.formnote.ok { color: var(--accent); }
.formnote.bad { color: #E08972; }

.upload-wrap {
  max-width: 780px; margin: 26px auto 0;
  display: flex; flex-direction: column; gap: 20px;
}
.drop {
  border: 1.5px dashed #3A424B; border-radius: 12px; background: var(--panel);
  padding: clamp(30px, 5vw, 46px) 30px; display: flex; flex-direction: column;
  align-items: center; gap: 12px; text-align: center; cursor: pointer; color: var(--accent);
}
.drop:hover, .drop.over { border-color: var(--accent); background: rgba(224,162,78,.05); }
.drop strong { font-family: var(--cond); font-size: 20px; color: var(--fg); }
.drop span { font-size: 15px; color: var(--dim); }
.drop em { font-style: normal; color: var(--accent); }

.filecard {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 15px 18px; display: flex; align-items: center; gap: 15px; color: var(--dim);
}
.filemeta { display: flex; flex-direction: column; gap: 2px; flex-grow: 1; min-width: 0; }
.filemeta strong { color: var(--fg); font-weight: 450; font-size: 15px; overflow-wrap: anywhere; }
.linkish {
  background: none; border: 0; color: var(--accent); cursor: pointer;
  font-family: inherit; font-size: 14px; padding: 4px;
}

.notice {
  border: 1.5px dashed var(--accent-dim); border-radius: 8px;
  background: rgba(224,162,78,.05); padding: 17px 20px;
  display: flex; gap: 14px; align-items: flex-start; color: var(--accent);
}
.notice strong { font-family: var(--cond); font-size: 16px; }
.notice p { font-size: 14.5px; color: #C3C9CE; margin-top: 4px; }
.notice svg { flex: none; margin-top: 2px; }

.send-row { display: flex; flex-wrap: wrap; gap: 13px; align-items: center; }
.send-row input { flex: 1 1 260px; }

@media (prefers-reduced-motion: reduce) { * { animation: none !important; transition: none !important; } }

/* ---- job progress ---- */
.progress {
  border: 1px solid var(--line); border-radius: 10px; background: var(--panel);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 12px;
}
.progress-head { display: flex; align-items: baseline; justify-content: space-between; gap: 14px; }
.progress-head strong { font-family: var(--cond); font-size: 16px; }
.track { height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.track .bar {
  height: 100%; width: 0; background: var(--accent);
  transition: width .35s ease;
}
.progress .btn { margin-top: 4px; }
.joblog {
  margin: 0; max-height: 190px; overflow: auto;
  background: var(--bg); border: 1px solid var(--line); border-radius: 8px;
  padding: 12px 14px; font-family: var(--mono); font-size: 11.5px;
  color: var(--dim); white-space: pre-wrap; overflow-wrap: anywhere;
}

/* The hidden attribute must beat our own display rules.
   .filecard and .progress set display:flex, and author CSS outranks the UA's
   [hidden]{display:none} — so `el.hidden = true` silently did nothing and stale
   panels stayed on screen. */
[hidden] { display: none !important; }
