/* playmeasures.com. Matches Measures' default theme, Blackface '65: colours from
   apps/desktop/src-tauri/src/themes.rs; header, buttons and headings from apps/desktop/src/styles.css
   and hub/hub.css. Dark is the default; light follows the system, and the header toggle
   (site.js, data-theme on <html>) overrides either way. System fonts only. */
:root {
  --bg: #181c1e; --bar: #111516; --bar-line: #394143; --panel: #212225; --panel-2: #1c2022;
  --ink: #e5e9e8; --muted: #a6b2b4; --eyebrow: #9bbabd; --border: #34373a;
  --accent: #72c7cd; --current: #203034; --current-ink: #e8f5f5; --nav-ink: #a6afb1;
  --primary: #70c3c9; --primary-hover: #91d5da; --primary-ink: #132327; --primary-line: #8bd3d7;
  --button-line: #436268; --button-hover: #343b3e;
  --tip-bg: #17292b; --tip-line: #2f5a5e; --warn-bg: #2b2418; --warn-line: #6b5326; --warn-ink: #f0c987;
  --coming-bg: #241f33; --coming-line: #4d4370; --coming-ink: #c9b8ff;
  --kbd-bg: #2a2e31; --kbd-line: #4a5054;
  --shadow: 0 18px 50px rgba(0, 0, 0, .45);
  --glow: radial-gradient(1200px 520px at 75% -10%, rgba(114, 199, 205, .16), transparent 70%);
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f5f7f7; --bar: #ffffff; --bar-line: #d5dcdd; --panel: #ffffff; --panel-2: #eef2f2;
    --ink: #172022; --muted: #4c5a5d; --eyebrow: #2d6a70; --border: #d3dbdc;
    --accent: #0b6e75; --current: #e2f1f2; --current-ink: #0d3a3e; --nav-ink: #45575a;
    --primary: #0e7880; --primary-hover: #0b636a; --primary-ink: #ffffff; --primary-line: #0b636a;
    --button-line: #9fb8bb; --button-hover: #e6eeee;
    --tip-bg: #e7f4f3; --tip-line: #b4dcd8; --warn-bg: #fdf3e3; --warn-line: #efd2a3; --warn-ink: #8a4a06;
    --coming-bg: #f1ebfd; --coming-line: #d8c8f7; --coming-ink: #5b21b6;
    --kbd-bg: #f6f7f9; --kbd-line: #b8bec9;
    --shadow: 0 18px 50px rgba(20, 40, 45, .16);
    --glow: radial-gradient(1200px 520px at 75% -10%, rgba(14, 120, 128, .10), transparent 70%);
    color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f5f7f7; --bar: #ffffff; --bar-line: #d5dcdd; --panel: #ffffff; --panel-2: #eef2f2;
  --ink: #172022; --muted: #4c5a5d; --eyebrow: #2d6a70; --border: #d3dbdc;
  --accent: #0b6e75; --current: #e2f1f2; --current-ink: #0d3a3e; --nav-ink: #45575a;
  --primary: #0e7880; --primary-hover: #0b636a; --primary-ink: #ffffff; --primary-line: #0b636a;
  --button-line: #9fb8bb; --button-hover: #e6eeee;
  --tip-bg: #e7f4f3; --tip-line: #b4dcd8; --warn-bg: #fdf3e3; --warn-line: #efd2a3; --warn-ink: #8a4a06;
  --coming-bg: #f1ebfd; --coming-line: #d8c8f7; --coming-ink: #5b21b6;
  --kbd-bg: #f6f7f9; --kbd-line: #b8bec9;
  --shadow: 0 18px 50px rgba(20, 40, 45, .16);
  --glow: radial-gradient(1200px 520px at 75% -10%, rgba(14, 120, 128, .10), transparent 70%);
  color-scheme: light;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 17px/1.6 "Segoe UI", system-ui, -apple-system, "Helvetica Neue", Arial, sans-serif; overflow-wrap: break-word; }
body.home { background: var(--glow), var(--bg); background-repeat: no-repeat; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px; }
code { font: 13px/1.5 "Cascadia Mono", Consolas, monospace; overflow-wrap: anywhere; word-break: break-all; background: var(--panel-2); padding: 1px 5px; border-radius: 4px; }
kbd { font: 600 13px "Cascadia Mono", Consolas, monospace; border: 1px solid var(--kbd-line); border-bottom-width: 2px; border-radius: 4px; padding: 0 5px; background: var(--kbd-bg); white-space: nowrap; color: var(--ink); }
[hidden] { display: none !important; }

.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--primary); color: var(--primary-ink); padding: 8px 14px; border-radius: 5px; font-weight: 600; }
.skip:focus { top: 10px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--bar); border-bottom: 1px solid var(--bar-line); }
.bar { max-width: 1180px; height: 56px; margin: 0 auto; padding: 0 16px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 12px; font: italic 24px Georgia, serif; color: var(--accent); text-decoration: none; flex: none; }
.brand span { font: 600 12px "Segoe UI", system-ui, -apple-system, sans-serif; letter-spacing: 3px; color: var(--ink); font-style: normal; }
#site-nav { margin-left: auto; align-self: stretch; display: flex; }
#site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
#site-nav li { margin: 0; display: flex; }
#site-nav a { display: flex; align-items: center; padding: 3px 11px 0; font-size: 14px; color: var(--nav-ink); text-decoration: none; border-bottom: 3px solid transparent; white-space: nowrap; }
#site-nav a:hover { color: var(--ink); }
#site-nav a[aria-current] { color: var(--current-ink); background: var(--current); border-bottom-color: var(--accent); }
.theme-btn, .menu-btn { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 36px; min-width: 36px; padding: 0 8px; border: 1px solid var(--button-line); border-radius: 5px; background: transparent; color: var(--ink); font: 600 14px "Segoe UI", system-ui, sans-serif; cursor: pointer; }
.theme-btn:hover, .menu-btn:hover { background: var(--button-hover); }
.theme-btn span { width: 16px; height: 16px; border-radius: 50%; box-shadow: inset -5px -3px 0 1px var(--ink); }
.theme-btn.is-light span { box-shadow: none; background: var(--ink); width: 10px; height: 10px; outline: 2px dotted var(--ink); outline-offset: 3px; }
.menu-icon, .menu-icon::before, .menu-icon::after { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 1px; position: relative; }
.menu-icon::before, .menu-icon::after { content: ""; position: absolute; left: 0; }
.menu-icon::before { top: -6px; } .menu-icon::after { top: 6px; }

@media (max-width: 900px) {
  .bar { flex-wrap: wrap; height: auto; min-height: 56px; }
  .js .menu-btn { margin-left: auto; }
  .js #site-nav { display: none; order: 5; flex-basis: 100%; margin: 0 -16px; }
  .js #site-nav.open { display: block; border-top: 1px solid var(--bar-line); }
  .js #site-nav ul { flex-direction: column; padding: 6px 0 10px; }
  .js #site-nav a { padding: 12px 16px; border-bottom: 0; border-left: 3px solid transparent; font-size: 16px; width: 100%; }
  .js #site-nav a[aria-current] { border-left-color: var(--accent); }
  /* Without JS the nav wraps under the brand and scrolls sideways inside itself. */
  html:not(.js) #site-nav { flex-basis: 100%; overflow-x: auto; margin: 0 -16px; padding: 0 8px; }
  html:not(.js) #site-nav a { padding: 10px 10px; }
}
@media (min-width: 901px) { .menu-btn { display: none !important; } }

/* Layout */
main { max-width: 792px; margin: 0 auto; padding: 32px 16px 72px; }
main.wide { max-width: 1180px; }
h1 { font-size: clamp(32px, 6vw, 52px); font-weight: 600; letter-spacing: -1.4px; line-height: 1.1; margin: 8px 0 18px; text-wrap: balance; }
h2 { font-size: clamp(24px, 3.4vw, 32px); font-weight: 600; letter-spacing: -.6px; line-height: 1.2; margin: 52px 0 14px; text-wrap: balance; }
h3 { font-size: 19px; font-weight: 600; margin: 28px 0 8px; }
.eyebrow, .part-num { font-size: 12px; font-weight: 600; line-height: 1.3; text-transform: uppercase; letter-spacing: 2px; color: var(--eyebrow); margin: 0 0 6px; }
p { margin: 0 0 14px; }
.lede { font-size: 19px; color: var(--ink); max-width: 70ch; }
.narrow { max-width: 62ch; }
.small { font-size: 14px; color: var(--muted); }
ol, ul { padding-left: 22px; }
li { margin: 6px 0; }

.buttons { display: flex; flex-wrap: wrap; gap: 12px; margin: 26px 0 14px; }
.btn { display: inline-block; font: 600 16px/1.25 "Segoe UI", system-ui, sans-serif; padding: 13px 20px; border-radius: 5px; text-decoration: none; border: 1px solid var(--button-line); color: var(--ink); background: transparent; cursor: pointer; text-align: center; }
.btn:hover { background: var(--button-hover); }
.btn.primary { background: var(--primary); border-color: var(--primary-line); color: var(--primary-ink); }
.btn.primary:hover { background: var(--primary-hover); }
.btn[disabled] { opacity: .6; cursor: progress; }

.card { background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 20px 22px; margin: 14px 0; }

/* Home */
.hero { display: grid; grid-template-columns: minmax(0, 1fr); gap: 34px; padding-top: 8px; }
.hero > * { min-width: 0; }
.hero h1 { font-size: clamp(36px, 6.4vw, 60px); max-width: 16ch; }
.hero-text { max-width: 760px; }
.hero h1 + .lead-line { font-size: clamp(20px, 2.6vw, 26px); font-weight: 600; line-height: 1.3; color: var(--ink); margin: -6px 0 16px; }
.hero-shot img { border-radius: 10px; }
.points ul { list-style: none; padding: 0; margin: 48px 0 8px; display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.points li { margin: 0; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; padding: 16px 18px; }
.points b { display: block; font-size: 17px; margin-bottom: 4px; }
.points span { color: var(--muted); font-size: 15px; }

.feature { display: grid; gap: 22px 48px; align-items: center; margin: 76px 0; scroll-margin-top: 72px; }
.feature > * { min-width: 0; }
.feature h2 { margin-top: 0; }
.feature-text p + h2 { margin-top: 32px; }
.hero h1.long { max-width: 24ch; }
.feature-plain { margin: 64px 0; scroll-margin-top: 72px; }
.shot { margin: 0; }
.shot a.zoom { display: block; border-radius: 8px; cursor: zoom-in; }
.shot img { border-radius: 8px; border: 1px solid var(--border); box-shadow: var(--shadow); background: var(--panel); }
.shot figcaption { font-size: 14px; color: var(--muted); margin-top: 10px; }
@media (min-width: 980px) {
  .feature { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .feature.flip { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .feature.flip .feature-text { order: 2; }
}
.ticks { list-style: none; padding: 0; }
.ticks li { position: relative; padding-left: 26px; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: .55em; width: 11px; height: 6px; border-left: 2px solid var(--accent); border-bottom: 2px solid var(--accent); transform: rotate(-45deg); }
.cols { display: grid; gap: 0 40px; }
@media (min-width: 760px) { .cols { grid-template-columns: 1fr 1fr; } }

.gallery { display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); margin-top: 18px; }
.gallery .shot img { box-shadow: none; }
.gallery figcaption { font-size: 13px; }

.toc ul { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
.toc li { margin: 0; }
.toc a { display: inline-block; padding: 6px 12px; border: 1px solid var(--border); border-radius: 999px; text-decoration: none; font-size: 14px; color: var(--ink); background: var(--panel); }
.toc a:hover { border-color: var(--accent); }

.cta { margin: 80px 0 0; padding: 34px 28px; border-radius: 12px; background: var(--panel); border: 1px solid var(--border); text-align: center; }
.cta-title { margin-top: 0; }
.cta p { max-width: 60ch; margin-left: auto; margin-right: auto; }
.cta .buttons { justify-content: center; }

/* Steps, callouts, tables */
ol.steps { list-style: none; counter-reset: step; padding: 0; margin: 14px 0 18px; }
ol.steps > li { counter-increment: step; position: relative; padding: 12px 16px 12px 56px; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; margin: 0 0 10px; }
ol.steps > li::before { content: counter(step); position: absolute; left: 14px; top: 12px; width: 28px; height: 28px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: 14px; display: grid; place-items: center; }
.see, .tabit, .check { display: block; margin-top: 8px; font-size: 15px; }
.see { padding: 6px 10px; background: var(--tip-bg); border-left: 3px solid var(--accent); border-radius: 0 6px 6px 0; }
.see::before { content: "You should see: "; font-weight: 700; color: var(--accent); }
.tabit { color: var(--warn-ink); }
.tabit::before { content: "Like TabIt: "; font-weight: 700; }
.check { color: var(--coming-ink); }
.check::before { content: "Please check: "; font-weight: 700; }
.why { color: var(--muted); font-style: italic; }
.callout { border-radius: 8px; padding: 14px 18px; margin: 18px 0; border: 1px solid; }
.callout.tip { background: var(--tip-bg); border-color: var(--tip-line); }
.callout.warn { background: var(--warn-bg); border-color: var(--warn-line); }
.callout.coming { background: var(--coming-bg); border-color: var(--coming-line); }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; margin: 12px 0 20px; font-size: 15px; }
th { text-align: left; background: var(--panel-2); font-weight: 600; padding: 9px 12px; border-bottom: 2px solid var(--border); vertical-align: top; }
td { padding: 9px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
table.specs th { width: 32%; background: transparent; border-bottom: 1px solid var(--border); }
table.plan td:first-child { width: 3.5em; font-weight: 700; }
table.plan td:last-child { width: 5.5em; color: var(--muted); white-space: nowrap; }
table.map td:first-child { width: 32%; font-weight: 600; }
.part { margin-top: 64px; padding-top: 8px; border-top: 3px solid var(--accent); }
.part h2 { margin-top: 4px; }

/* Known issues */
.issues { margin: 0; }
.issues dt { font-weight: 600; font-size: 18px; margin-top: 22px; }
.issues dd { margin: 4px 0 0; color: var(--ink); }
.issues dd b { color: var(--accent); }

/* FAQ */
.faq details { border-bottom: 1px solid var(--border); }
.faq summary { cursor: pointer; list-style: none; padding: 18px 36px 18px 0; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 26px; color: var(--accent); line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq summary h2, .faq summary h3 { display: inline; font-size: 19px; letter-spacing: 0; margin: 0; }
.faq details p { margin: 0 0 18px; color: var(--ink); }
.faq + p { margin-top: 28px; }

/* Feedback form */
.fb-form { background: var(--panel); border: 1px solid var(--border); border-radius: 10px; padding: 22px; margin-top: 16px; position: relative; }
.field { margin: 0 0 16px; }
.field label { display: block; font-weight: 600; margin-bottom: 6px; }
.field .req, .field .opt { font-weight: 400; color: var(--muted); font-size: 14px; }
.field input[type="text"], .field select, .field textarea { width: 100%; font: 16px/1.4 "Segoe UI", system-ui, sans-serif; color: var(--ink); background: var(--bg); border: 1px solid var(--button-line); border-radius: 5px; padding: 10px 12px; }
.field textarea { resize: vertical; }
.field.agree { display: flex; gap: 10px; align-items: flex-start; }
.field.agree input { margin-top: 5px; width: 18px; height: 18px; flex: none; accent-color: var(--primary); }
.field.agree label { font-weight: 400; margin: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.fb-result { margin-top: 14px; padding: 12px 16px; border-radius: 8px; border: 1px solid var(--tip-line); background: var(--tip-bg); }
.fb-result.error { border-color: var(--warn-line); background: var(--warn-bg); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 96vh; color: #e5e9e8; overflow: visible; }
.lightbox::backdrop { background: rgba(5, 8, 9, .88); }
.lightbox img { max-width: 94vw; max-height: 84vh; width: auto; height: auto; border-radius: 6px; margin: 0 auto; }
.lightbox p { text-align: center; margin: 10px 0 0; font-size: 15px; }
.lightbox .lb-close { position: fixed; top: 14px; right: 14px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid #5a6467; background: #111516; color: #e5e9e8; font-size: 24px; line-height: 1; cursor: pointer; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); background: var(--bar); }
.foot { max-width: 1180px; margin: 0 auto; padding: 32px 16px 8px; display: grid; gap: 22px; }
.foot-brand p { color: var(--muted); font-size: 14px; max-width: 46ch; margin-top: 10px; }
.site-footer nav ul { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 4px 18px; }
.site-footer nav a { font-size: 14px; color: var(--ink); text-decoration: none; }
.site-footer nav a:hover { color: var(--accent); text-decoration: underline; }
.fine { max-width: 1180px; margin: 0 auto; padding: 12px 16px 28px; font-size: 13px; color: var(--muted); }
.foot-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 2px; color: var(--eyebrow); margin: 0 0 8px; }
.site-footer nav.foot-guides ul { grid-template-columns: 1fr; }
@media (min-width: 760px) { .foot { grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) minmax(0, 3fr); } }

@media (max-width: 600px) {
  body { font-size: 16px; }
  .lede { font-size: 17px; }
  .buttons .btn { width: 100%; }
  ol.steps > li { padding-left: 50px; }
  .feature { margin: 56px 0; }
  th, td { padding: 8px; }
  .fb-form { padding: 16px; }
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
  .btn, .toc a, #site-nav a { transition: background-color .15s, border-color .15s, color .15s; }
}
@media print {
  .site-header, .site-footer, .cta, .buttons { display: none; }
  body { background: #fff; color: #000; }
}
