/* Launchwright UI system: shared by the landing page and the dashboard.
   Gray canvas, white page card, soft rounded cards, pill buttons,
   bold tight sans headlines. */

:root {
  --canvas: #e3e3e0;
  --surface: #ffffff;
  --surface-2: #f7f7f5;
  --surface-3: #eeede6;
  --ink: #0b0b0b;
  --on-ink: #ffffff;
  --muted: #6a6a66;
  --line: #e6e5e0;
  --ok: #16794a;
  --ok-bg: #e5f4ec;
  --warn: #b4410e;
  --warn-bg: #fdeae1;

  --blue: #2a17ff;
  --lime: #d6ff3d;
  --orange: #ff4f1a;

  --font-sans: "Inter Tight", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;

  --r-page: 28px;
  --r-card: 20px;
  --r-tile: 16px;
  --pad: 32px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --canvas: #050505;
    --surface: #111111;
    --surface-2: #181818;
    --surface-3: #22211d;
    --ink: #f3f3f0;
    --on-ink: #0b0b0b;
    --muted: #a3a39d;
    --line: #2a2a27;
    --ok: #5fd39a;
    --ok-bg: #12291d;
    --warn: #ff8a5c;
    --warn-bg: #2e1810;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --canvas: #050505;
  --surface: #111111;
  --surface-2: #181818;
  --surface-3: #22211d;
  --ink: #f3f3f0;
  --on-ink: #0b0b0b;
  --muted: #a3a39d;
  --line: #2a2a27;
  --ok: #5fd39a;
  --ok-bg: #12291d;
  --warn: #ff8a5c;
  --warn-bg: #2e1810;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }

/* ---- Page: full width ---- */
body { background: var(--surface); }
.wrap {
  width: 100%;
  padding: 0 16px 24px;
  background: var(--surface);
}
@media (min-width: 760px) {
  .wrap { padding: 0 clamp(32px, 4vw, 72px) 40px; }
}

/* ---- Logo: the word "launchwright", all lowercase. Same everywhere. ---- */
.logo {
  font-family: var(--font-sans);
  font-weight: 700;
  font-size: 26px;
  text-transform: lowercase;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--ink);
  text-decoration: none;
  white-space: nowrap;
}
.logo.lg { font-size: 32px; }
@media (max-width: 479px) {
  .logo { font-size: 22px; }
  .site-header .btn { padding: 0 18px; }
  .header-actions { gap: 8px; }
}

/* ---- Header ---- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 88px;
}
.site-header nav { display: none; gap: 32px; font-size: 17px; font-weight: 500; }
.site-header nav a { text-decoration: none; color: var(--muted); }
.site-header nav a:hover { color: var(--ink); }
@media (min-width: 900px) { .site-header nav { display: flex; } }

/* ---- Type ---- */
.eyebrow { font-size: 1.125rem; font-weight: 500; color: var(--muted); margin: 0; }
.h1 {
  font-weight: 700;
  font-size: clamp(3.25rem, 8.2vw, 7.25rem);
  line-height: 0.98;
  letter-spacing: -0.045em;
  margin: 0;
}
.h2 {
  font-weight: 700;
  font-size: clamp(2.5rem, 5.2vw, 4.5rem);
  line-height: 1.02;
  letter-spacing: -0.038em;
  margin: 0;
}
.h3 { font-weight: 600; font-size: 1.5rem; line-height: 1.25; letter-spacing: -0.015em; margin: 0; }
.lede { font-size: 1.3125rem; line-height: 1.55; color: var(--muted); margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 1rem; }
.mono { font-family: var(--font-mono); font-size: 0.9375rem; }
.label { font-size: 1rem; font-weight: 500; color: var(--muted); margin: 0; }

/* ---- Layout ---- */
.section { padding-block: clamp(64px, 9vw, 120px); }
.section-tight { padding-block: clamp(40px, 6vw, 72px); }
.stack > * + * { margin-top: 12px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.between { justify-content: space-between; }
.center { text-align: center; }

.grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.grid > * { grid-column: span 12; min-width: 0; }
@media (min-width: 640px) { .t-6 { grid-column: span 6; } }
@media (min-width: 960px) {
  .s-3 { grid-column: span 3; }
  .s-4 { grid-column: span 4; }
  .s-5 { grid-column: span 5; }
  .s-6 { grid-column: span 6; }
  .s-7 { grid-column: span 7; }
  .s-8 { grid-column: span 8; }
}

/* ---- Cards & tiles ---- */
.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--r-card);
  padding: var(--pad);
}
.card.feature { background: var(--surface-3); border-color: transparent; }
.card.plain { background: var(--surface); }
.card.flush { padding: 0; overflow: hidden; }
.card.ink { background: var(--ink); color: var(--on-ink); border-color: transparent; }

.tile {
  border-radius: var(--r-tile);
  padding: 22px;
  min-height: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tile.blue { background: var(--blue); color: #fff; }
.tile.lime { background: var(--lime); color: #0b0b0b; }
.tile.gray { background: var(--surface-3); color: var(--ink); }
.tile.orange { background: var(--orange); color: #0b0b0b; }
.tile.ink { background: #0b0b0b; color: #fff; }

/* ---- Buttons ---- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--on-ink);
  font: 600 1.0625rem/1 var(--font-sans);
  letter-spacing: -0.005em;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: opacity 0.15s ease, transform 0.15s ease;
}
.btn:hover { opacity: 0.86; }
.btn:active { transform: translateY(1px); }
.btn.outline {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.btn.block { width: 100%; min-height: 56px; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.45; cursor: not-allowed; }
.link { font-weight: 600; font-size: 1.0625rem; text-underline-offset: 4px; }

/* ---- Check list ---- */
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checks li { display: flex; gap: 12px; align-items: flex-start; }
.checks li::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 4px;
  background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3 3 7-7' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ---- Tags ---- */
.tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--surface-3);
  color: var(--ink);
  font-size: 0.9375rem;
  font-weight: 500;
  line-height: 1.3;
  white-space: nowrap;
}
.tag.ok { background: var(--ok-bg); color: var(--ok); }
.tag.warn { background: var(--warn-bg); color: var(--warn); }
.tag.line { background: transparent; border: 1px solid var(--line); color: var(--muted); }

/* ---- Rows inside flush cards ---- */
.rows { list-style: none; margin: 0; padding: 0; }
.rows li { display: flex; justify-content: space-between; align-items: center; gap: 12px; font-size: 1.0625rem; padding: 18px var(--pad); border-top: 1px solid var(--line); }
.rows li:first-child { border-top: 0; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px var(--pad); border-bottom: 1px solid var(--line); }

/* ---- Forms ---- */
.field { display: block; }
.field > span { display: block; font-size: 1rem; font-weight: 500; margin-bottom: 8px; }
.input {
  width: 100%;
  min-height: 54px;
  padding: 14px 18px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font: 400 1.0625rem/1.4 var(--font-sans);
}
.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:focus { outline: 2px solid var(--blue); outline-offset: 0; border-color: transparent; }

/* ---- Terminal text ---- */
.term { font-family: var(--font-mono); font-size: 0.9375rem; line-height: 1.75; white-space: pre-wrap; word-break: break-word; margin: 0; }
.term .dim { opacity: 0.6; }

code { font-family: var(--font-mono); font-size: 0.85em; padding: 2px 6px; border-radius: 6px; background: var(--surface-3); }

.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* ---- Theme switch ---- */
.theme-toggle {
  display: inline-grid;
  place-items: center;
  width: 50px;
  height: 50px;
  flex: none;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.06);
}
.theme-toggle:hover { background: var(--surface-2); }
.theme-toggle svg { width: 20px; height: 20px; }
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}
.header-actions { display: flex; align-items: center; gap: 10px; }
