/* WS Terminal — wsterminal.org
   Palette mirrors the desktop app: dark ground, one green accent (#3ddc97) for
   buttons, links, focus and markers; red only for losses. No amber anywhere. */

:root {
  --ground: #0b0d10;
  --ground-2: #0d1014;
  --card: #111418;
  --card-2: #15191e;
  --border: #1f242b;
  --border-2: #2a3139;
  --text: #e6e8eb;
  --text-strong: #f4f6f8;
  --muted: #8b949e;
  --muted-2: #6b7580;
  --accent: #3ddc97;
  --accent-hover: #6ee7b3;
  --on-accent: #0b0d10;
  --live-bg: #0f2a1f;
  --live-border: #1d4a37;
  --live-text: #3ddc97;
  --live-dot: #3ddc97;
  --ok: #3ddc97;
  --loss: #ff8a8a;
  --sans: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", Consolas, ui-monospace, monospace;
  --wrap: 1040px;
  --gutter: 16px;
  --radius: 12px;
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

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

h1, h2, h3, h4 { color: var(--text-strong); line-height: 1.2; margin: 0 0 12px; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 6vw, 3.25rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 600; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-hover); text-decoration: underline; }

:focus { outline: none; }
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

code, kbd, .mono {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
}
code {
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  font-size: 0.9em;
  color: var(--text-strong);
  overflow-wrap: anywhere;
}
kbd {
  background: var(--card-2);
  border: 1px solid var(--border-2);
  border-bottom-width: 2px;
  border-radius: 6px;
  padding: 0.05em 0.45em;
  font-size: 0.85em;
  color: var(--text-strong);
}
pre {
  margin: 0;
  background: var(--ground-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  overflow-x: auto;
  font-family: var(--mono);
  font-size: 0.85rem;
  line-height: 1.55;
  color: var(--text-strong);
}
pre code { background: none; border: 0; padding: 0; font-size: inherit; }

img, svg { max-width: 100%; height: auto; display: block; }
ul, ol { margin: 0 0 1em; padding-left: 1.25em; }
li { margin: 0.3em 0; }

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 600;
  z-index: 100;
}
.skip:focus { top: 12px; text-decoration: none; }

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(11, 13, 16, 0.92);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
/* Row 1: brand + Download button. Row 2 (below 720px): the nav, wrapping freely.
   From 720px up all three sit on one row: brand · nav · Download. */
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0 16px;
  min-height: 60px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.site-header .brand { order: 1; margin-right: auto; }
.site-header .nav-download { order: 2; }
.site-header .site-nav { order: 3; flex: 1 1 100%; margin-top: 6px; margin-left: -8px; }
@media (min-width: 720px) {
  .site-header .wrap { flex-wrap: nowrap; padding-top: 0; padding-bottom: 0; }
  .site-header .brand { margin-right: 0; }
  .site-header .site-nav { order: 2; flex: 1 1 auto; justify-content: center; margin: 0; }
  .site-header .nav-download { order: 3; }
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text-strong);
  font-weight: 700;
  font-size: 15px;
  white-space: nowrap;
}
.brand:hover { color: var(--text-strong); text-decoration: none; }
/* Brand mark: the tile logo (assets/brand/mark.svg — dark #111418 tile, "WS",
   prompt chevron, green cursor block), the same mark the desktop rail paints.
   32 px is the smallest size that still carries the "WS" letters (size policy
   in docs/design/logo/final/rationale.md); the SVG has its own rounded corners. */
.brand .mark {
  display: block;
  width: 32px;
  height: 32px;
  flex-shrink: 0;
}
.site-nav { display: flex; flex-wrap: wrap; gap: 2px 0; }
.site-nav a {
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 8px;
  border-radius: 8px;
  white-space: nowrap;
  position: relative;
}
.site-nav a:hover { color: var(--text-strong); background: var(--card-2); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text-strong); background: var(--card-2); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 8px; right: 8px; bottom: 2px;
  height: 2px;
  border-radius: 1px;
  background: var(--accent);
}
@media (min-width: 720px) {
  .site-nav { gap: 4px; }
  .site-nav a { padding: 8px 12px; }
}

/* Buttons */
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 10px;
  font: 600 15px var(--sans);
  cursor: pointer;
  text-decoration: none;
  border: 1px solid transparent;
  white-space: nowrap;
}
.button:hover { text-decoration: none; }
.button.primary { background: var(--accent); color: var(--on-accent); font-weight: 700; }
.button.primary:hover { background: var(--accent-hover); color: var(--on-accent); }
.button.secondary { background: var(--card-2); color: var(--text); border-color: var(--border-2); }
.button.secondary:hover { background: var(--border); color: var(--text-strong); }
.button.small { min-height: 36px; padding: 0 14px; font-size: 14px; }
.button svg { width: 18px; height: 18px; flex-shrink: 0; }

/* Hero */
.hero { padding: 56px 0 40px; }
.hero .eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 18px;
}
.hero .eyebrow::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--accent);
}
.hero h1 { margin-bottom: 14px; }
.hero .lede {
  font-size: clamp(1.1rem, 2.6vw, 1.35rem);
  color: var(--text);
  max-width: 34em;
  margin-bottom: 26px;
}
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.hero-actions .button { flex: 1 1 100%; }
@media (min-width: 520px) { .hero-actions .button { flex: 0 0 auto; } }
.hero-meta {
  font-family: var(--mono);
  font-size: 13px;
  color: var(--muted);
}
.hero-meta a { color: var(--muted); text-decoration: underline; }
.hero-meta a:hover { color: var(--accent); }
.hero-meta .sep { margin: 0 8px; color: var(--muted-2); }

@media (min-width: 880px) {
  .hero { padding: 88px 0 56px; }
}

/* Sections */
.section { padding: 48px 0; border-top: 1px solid var(--border); }
.section-head { margin-bottom: 24px; }
.section-head p { color: var(--muted); max-width: 44em; }
.lbl {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
  display: block;
  margin-bottom: 8px;
}
@media (min-width: 880px) { .section { padding: 72px 0; } }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 8px; }
.card p { color: var(--muted); font-size: 15px; }
.card p strong, .card li strong { color: var(--text); }

.grid { display: grid; gap: 14px; }
.grid > *, .two-col > * { min-width: 0; }
@media (min-width: 720px) { .grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 720px) { .grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* How it works */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; }
.steps .card { position: relative; padding-top: 22px; }
.step-no {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px; height: 32px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--border-2);
  color: var(--accent);
  font: 600 13px var(--mono);
  margin-bottom: 14px;
}
.ui {
  display: inline-block;
  font: 500 12px var(--sans);
  color: var(--text-strong);
  background: var(--card-2);
  border: 1px solid var(--border-2);
  border-radius: 6px;
  padding: 1px 8px;
  white-space: nowrap;
}

/* Screens page: one section per app view, stacked and separated, never side by side */
.view-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 22px;
}
.view-tabs a {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--border-2);
  color: var(--text);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
}
.view-tabs a:hover { text-decoration: none; color: var(--text-strong); border-color: var(--accent); }
.shot { scroll-margin-top: 72px; }
.shot h2 { margin-bottom: 8px; }
.shot .shot-lede { color: var(--muted); max-width: 44em; margin-bottom: 18px; }
.shot figure { margin: 0; }
.shot .frame {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}
.shot img { width: 100%; height: auto; display: block; }
.shot figcaption {
  margin-top: 12px;
  font-size: 14px;
  color: var(--muted);
  max-width: 60em;
}

/* Guide videos (screens.html#videos): three silent 16:9 clips with captions, posters until played */
.videos { display: grid; gap: 22px; }
@media (min-width: 880px) { .videos { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; } }
.videos figure { margin: 0; }
.videos video { width: 100%; height: auto; aspect-ratio: 16 / 9; display: block; background: var(--card); }
.videos figcaption strong { color: var(--text); font-weight: 600; }

/* Keys stay on your PC */
.two-col { display: grid; gap: 14px; }
@media (min-width: 720px) { .two-col { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li {
  position: relative;
  padding-left: 28px;
  margin: 10px 0;
  color: var(--text);
  font-size: 15px;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: 0.35em;
  width: 16px; height: 16px;
  border-radius: 50%;
  background-repeat: no-repeat;
  background-position: center;
  background-size: 10px 10px;
}
.checklist.yes li::before {
  background-color: rgba(61, 220, 151, 0.14);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%233ddc97' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12l5 5L20 6'/%3E%3C/svg%3E");
}
.checklist.no li::before {
  background-color: rgba(139, 148, 158, 0.16);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238b949e' stroke-width='3.5' stroke-linecap='round'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E");
}
.checklist code { font-size: 0.85em; }

/* Live strip: echoes the in-app Live banner (green, blinking dot) */
.live-strip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  background: var(--live-bg);
  border: 1px solid var(--live-border);
  color: var(--live-text);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  margin-top: 18px;
}
.live-strip::before {
  content: "";
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--live-dot);
  flex-shrink: 0;
  animation: live-blink 1.2s steps(1, end) infinite;
}
@keyframes live-blink { 50% { opacity: 0.25; } }

/* Landing page extras */
.more { margin-top: 18px; font-weight: 500; }
.why-strip {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 14px;
}
@media (min-width: 720px) { .why-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.why-strip li {
  margin: 0;
  padding: 18px 0 0;
  border-top: 2px solid var(--accent);
  display: grid;
  gap: 6px;
}
.why-strip strong { color: var(--text-strong); font-size: 1.05rem; }
.why-strip span { color: var(--muted); font-size: 15px; }
.cta-box {
  display: grid;
  gap: 20px;
  padding: 28px 22px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.cta-box h2 { margin-bottom: 6px; }
.cta-box p { color: var(--muted); }
.cta-box .hero-actions { margin: 0; }
@media (min-width: 880px) {
  .cta-box { grid-template-columns: 1fr auto; align-items: center; padding: 32px 28px; }
}

/* Next-page cards at the bottom of content pages */
.page-next { display: grid; gap: 14px; }
@media (min-width: 720px) { .page-next { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.page-next a {
  display: grid;
  gap: 4px;
  padding: 18px 20px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
}
.page-next a:hover { text-decoration: none; border-color: var(--border-2); background: var(--card-2); }
.page-next a .lbl { margin-bottom: 2px; }
.page-next a strong { color: var(--text-strong); font-size: 1.05rem; }
.page-next a strong::after { content: " →"; color: var(--accent); }
.page-next a span:not(.lbl) { color: var(--muted); font-size: 14px; }

/* Install / hash block */
.install-steps { padding-left: 1.4em; }
.install-steps li { margin: 0.6em 0; }
.release-facts {
  display: grid;
  gap: 10px;
  margin: 0;
}
.release-facts > div {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  background: var(--ground-2);
  border: 1px solid var(--border);
  border-radius: 10px;
}
.release-facts dt {
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  font-weight: 600;
}
.release-facts dd {
  margin: 0;
  font-family: var(--mono);
  font-size: 13px;
  color: var(--text-strong);
  overflow-wrap: anywhere;
  user-select: all;
}
@media (min-width: 720px) {
  .release-facts { grid-template-columns: 1fr 1fr; }
  .release-facts .wide { grid-column: 1 / -1; }
}
.note {
  border-left: 3px solid var(--accent);
  padding: 2px 0 2px 14px;
  color: var(--muted);
  font-size: 15px;
}

/* FAQ */
.faq details {
  border-top: 1px solid var(--border);
}
.faq details:last-child { border-bottom: 1px solid var(--border); }
.faq summary {
  cursor: pointer;
  list-style: none;
  padding: 16px 40px 16px 0;
  font-weight: 600;
  color: var(--text-strong);
  position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  position: absolute;
  right: 4px; top: 50%;
  transform: translateY(-50%);
  font-family: var(--mono);
  font-size: 20px;
  color: var(--accent);
}
.faq details[open] summary::after { content: "–"; }
.faq summary:focus-visible { outline-offset: -2px; }
.faq details > p, .faq details > ul {
  color: var(--muted);
  padding-bottom: 16px;
  margin: 0;
  max-width: 60em;
}
.faq details > p strong { color: var(--text); }

/* Footer */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0 40px;
  color: var(--muted);
  font-size: 14px;
}
.site-footer .wrap {
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.site-footer .row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
}
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--accent); }
.site-footer .email {
  font-family: var(--mono);
  color: var(--text);
  user-select: all;
}
.site-footer .fine { color: var(--muted-2); font-size: 13px; }

/* Simple content pages */
.page { padding: 48px 0 24px; }
.page h1 { margin-bottom: 10px; }
.page .lede { color: var(--muted); font-size: 1.1rem; max-width: 40em; }
.page .section { border-top: 0; padding-top: 24px; }
.page .section + .section { border-top: 1px solid var(--border); padding-top: 40px; }
.page .section h2 { margin-bottom: 16px; }
.page .ui { vertical-align: 0.1em; }
.page.faq .section > .wrap > details:first-of-type { border-top: 0; }
