/* ═══════════════════════════════════════════════════════════════════════════
   ROADMAP — editor and viewer (roadmap.html)
   Visual language inspired by PrimeNG's Aura theme: zinc surfaces, emerald primary,
   6px controls, 12px panels, tinted severity tags, soft focus rings.

   Theme rule: dark/light only swaps COLOUR tokens. Sizes, spacing, radii and shadow
   geometry are defined once, in :root.
   ═══════════════════════════════════════════════════════════════════════════ */

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

  --r-sm: 6px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-xl: 16px;
  --ring: 3px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --fast: 140ms;
  --norm: 220ms;
  --wrap: 1180px;

  /* elevation geometry (colour comes from --shadow-c) */
  --sh-sm: 0 1px 2px var(--shadow-c);
  --sh-md: 0 4px 6px -1px var(--shadow-c), 0 2px 4px -2px var(--shadow-c);
  --sh-lg: 0 20px 25px -5px var(--shadow-c), 0 8px 10px -6px var(--shadow-c);
}

[data-theme="light"] {
  color-scheme: light;
  --bg: #fafafa;
  --surface: #ffffff;
  --surface-2: #f4f4f5;
  --surface-3: #e4e4e7;
  --border: #e4e4e7;
  --border-strong: #d4d4d8;
  --text: #18181b;
  --muted: #52525b;
  --subtle: #71717a;
  --primary: #10b981;
  --primary-h: #059669;
  --primary-ink: #ffffff;
  --primary-soft: rgba(16, 185, 129, .14);
  --glow: rgba(16, 185, 129, .10);
  --shadow-c: rgba(24, 24, 27, .10);
  --overlay: rgba(24, 24, 27, .45);
  --success: #059669; --info: #0284c7; --warn: #d97706; --danger: #dc2626; --secondary: #475569; --contrast: #18181b;
  --now: #10b981; --next: #0ea5e9; --later: #8b5cf6;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: #09090b;
  --surface: #18181b;
  --surface-2: #1f1f23;
  --surface-3: #27272a;
  --border: #27272a;
  --border-strong: #3f3f46;
  --text: #fafafa;
  --muted: #a1a1aa;
  --subtle: #71717a;
  --primary: #34d399;
  --primary-h: #6ee7b7;
  --primary-ink: #052e22;
  --primary-soft: rgba(52, 211, 153, .16);
  --glow: rgba(52, 211, 153, .12);
  --shadow-c: rgba(0, 0, 0, .55);
  --overlay: rgba(0, 0, 0, .6);
  --success: #34d399; --info: #38bdf8; --warn: #fbbf24; --danger: #f87171; --secondary: #94a3b8; --contrast: #fafafa;
  --now: #34d399; --next: #38bdf8; --later: #a78bfa;
}

* { box-sizing: border-box; margin: 0; }
[hidden] { display: none !important; }

html { font-size: 16px; -webkit-text-size-adjust: 100%; }

body {
  min-height: 100vh;
  font-family: var(--font);
  font-size: .9375rem;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image: radial-gradient(60% 420px at 50% -80px, var(--glow), transparent);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
:focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }

.ico { width: 1.1em; height: 1.1em; flex-shrink: 0; }

/* ── Top bar ─────────────────────────────────────────────────────────────── */
.topbar {
  position: sticky; top: 0; z-index: 30;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--border);
}
.topbar__in { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; padding-top: 10px; padding-bottom: 10px; }

.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; text-decoration: none; color: var(--text); }
.brand__mark {
  width: 32px; height: 32px; border-radius: var(--r-md);
  display: grid; place-items: center;
  background: var(--primary); color: var(--primary-ink);
  box-shadow: var(--sh-sm);
}
.brand__mark .ico { width: 18px; height: 18px; }

.grow { flex: 1 1 auto; }
.actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }

/* ── Buttons (Aura-like) ─────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 14px;
  border: 1px solid transparent; border-radius: var(--r-sm);
  background: transparent; color: var(--text);
  font-size: .875rem; font-weight: 500; line-height: 1; white-space: nowrap;
  transition: background var(--fast), border-color var(--fast), color var(--fast), box-shadow var(--fast);
}
.btn:focus-visible { box-shadow: 0 0 0 var(--ring) var(--primary-soft); outline-color: var(--primary); }
.btn--primary { background: var(--primary); color: var(--primary-ink); }
.btn--primary:hover { background: var(--primary-h); }
.btn--outline { border-color: var(--border-strong); background: var(--surface); }
.btn--outline:hover { background: var(--surface-2); }
.btn--text:hover { background: var(--surface-2); }
.btn--danger { background: var(--danger); color: #fff; }
.btn--danger:hover { filter: brightness(1.08); }
.btn--icon { width: 36px; padding: 0; }
.btn--sm { height: 30px; padding: 0 10px; font-size: .8125rem; }
.btn--sm.btn--icon { width: 30px; padding: 0; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

/* ── Segmented product switcher (SelectButton) ───────────────────────────── */
.seg {
  display: inline-flex; gap: 2px; padding: 4px;
  background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px;
  max-width: 100%; overflow-x: auto; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg__btn {
  height: 30px; padding: 0 14px; border: 0; border-radius: var(--r-sm);
  background: transparent; color: var(--muted);
  font-size: .875rem; font-weight: 500; white-space: nowrap;
  transition: background var(--fast), color var(--fast), box-shadow var(--fast);
}
.seg__btn:hover { color: var(--text); }
.seg__btn[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--sh-sm); }
.seg__add { width: 30px; padding: 0; display: grid; place-items: center; }

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero { padding: 44px 0 28px; }
.hero__row { display: flex; align-items: flex-start; gap: 16px; justify-content: space-between; flex-wrap: wrap; }
.hero h1 { font-size: clamp(1.75rem, 3.2vw, 2.4rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; }
.hero__tag { margin-top: 8px; max-width: 60ch; color: var(--muted); font-size: 1.0625rem; }
.hero__meta { margin-top: 14px; display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--subtle); font-size: .8125rem; }
.hero__meta a { color: var(--primary-h); text-decoration: none; font-weight: 500; }
[data-theme="dark"] .hero__meta a { color: var(--primary); }
.hero__meta a:hover { text-decoration: underline; }

.chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 3px 10px; border-radius: 999px;
  font-size: .75rem; font-weight: 600;
  background: color-mix(in srgb, var(--warn) 16%, transparent); color: var(--warn);
}
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip--ok { background: color-mix(in srgb, var(--success) 16%, transparent); color: var(--success); }

/* ── Columns ─────────────────────────────────────────────────────────────── */
.cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-bottom: 56px; align-items: start; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } }

.col {
  --col: var(--now);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: 14px;
  transition: border-color var(--fast), background var(--fast), box-shadow var(--fast);
}
.col[data-col="next"]  { --col: var(--next); }
.col[data-col="later"] { --col: var(--later); }
.col.over { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 7%, var(--surface-2)); box-shadow: 0 0 0 var(--ring) var(--primary-soft); }

.col__head { display: flex; align-items: center; gap: 10px; padding: 4px 4px 14px; }
.col__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--col); box-shadow: 0 0 0 4px color-mix(in srgb, var(--col) 22%, transparent); flex-shrink: 0; }
.col[data-col="now"] .col__dot { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { box-shadow: 0 0 0 3px color-mix(in srgb, var(--col) 22%, transparent); } 50% { box-shadow: 0 0 0 7px color-mix(in srgb, var(--col) 8%, transparent); } }
.col__title { font-size: .8125rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.col__sub { color: var(--subtle); font-size: .8125rem; }
.col__count {
  min-width: 22px; height: 22px; padding: 0 7px; margin-left: auto;
  display: inline-grid; place-items: center;
  background: var(--surface-3); color: var(--muted);
  border-radius: 999px; font-size: .75rem; font-weight: 600;
}
.col__add { margin-left: 4px; }

.col__list { display: flex; flex-direction: column; gap: 10px; min-height: 64px; }

/* ── Cards ───────────────────────────────────────────────────────────────── */
.card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 14px 16px;
  box-shadow: var(--sh-sm);
  transition: border-color var(--fast), box-shadow var(--fast), transform var(--fast), opacity var(--fast);
}
.card:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); }
body:not(.readonly) .card { cursor: grab; }
.card.dragging { opacity: .4; }
.card__title { font-size: .9375rem; font-weight: 600; letter-spacing: -.005em; line-height: 1.35; }
.card__desc { margin-top: 4px; color: var(--muted); font-size: .8125rem; line-height: 1.5; }
.card__foot { margin-top: 12px; display: flex; align-items: center; justify-content: space-between; gap: 8px; min-height: 26px; }
.card__actions { display: flex; align-items: center; gap: 2px; margin-left: auto; opacity: 0; transition: opacity var(--fast); }
.card:hover .card__actions, .card:focus-within .card__actions { opacity: 1; }
@media (hover: none) { .card__actions { opacity: 1; } }
.card__actions .btn { color: var(--muted); }
.card__actions .btn:hover { color: var(--text); }
.card__actions .btn--del:hover { color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, transparent); }

.drop-slot { height: 3px; border-radius: 2px; background: var(--primary); margin: -2px 0; box-shadow: 0 0 0 3px var(--primary-soft); }

/* ── Tags (severity) ─────────────────────────────────────────────────────── */
.tag {
  --tone: var(--secondary);
  display: inline-flex; align-items: center;
  padding: 2px 8px; border-radius: var(--r-sm);
  background: color-mix(in srgb, var(--tone) 16%, transparent);
  color: var(--tone);
  font-size: .75rem; font-weight: 700; line-height: 1.5; white-space: nowrap;
}
.tag[data-tone="success"]   { --tone: var(--success); }
.tag[data-tone="info"]      { --tone: var(--info); }
.tag[data-tone="warn"]      { --tone: var(--warn); }
.tag[data-tone="danger"]    { --tone: var(--danger); }
.tag[data-tone="secondary"] { --tone: var(--secondary); }
.tag[data-tone="contrast"]  { --tone: var(--contrast); }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.empty {
  display: flex; flex-direction: column; align-items: center; gap: 10px;
  padding: 22px 16px;
  border: 1px dashed var(--border-strong); border-radius: var(--r-lg);
  color: var(--subtle); font-size: .8125rem; text-align: center;
}

/* ── Read-only mode ──────────────────────────────────────────────────────── */
body.readonly .only-edit { display: none !important; }

/* ── Dialog ──────────────────────────────────────────────────────────────── */
.overlay {
  position: fixed; inset: 0; z-index: 100;
  display: grid; place-items: center; padding: 16px;
  background: var(--overlay);
  backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px);
  animation: fade var(--fast) var(--ease);
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.dialog {
  width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-lg);
  animation: pop var(--norm) var(--ease);
}
@keyframes pop { from { opacity: 0; transform: translateY(8px) scale(.98); } to { opacity: 1; transform: none; } }
.dialog__head { display: flex; align-items: center; justify-content: space-between; padding: 20px 24px 0; }
.dialog__title { font-size: 1.125rem; font-weight: 600; letter-spacing: -.01em; }
.dialog__body { padding: 16px 24px 4px; display: flex; flex-direction: column; gap: 16px; }
.dialog__msg { color: var(--muted); font-size: .9375rem; }
.dialog__foot { display: flex; justify-content: flex-end; gap: 8px; padding: 20px 24px 24px; }
.dialog__foot .btn--del-left { margin-right: auto; }

.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .field > .lbl { font-size: .875rem; font-weight: 500; }
.field__hint { color: var(--subtle); font-size: .75rem; }
.input, .textarea, .select {
  width: 100%; min-height: 40px; padding: 8px 12px;
  background: var(--surface); color: var(--text);
  border: 1px solid var(--border-strong); border-radius: var(--r-sm);
  transition: border-color var(--fast), box-shadow var(--fast);
}
.textarea { min-height: 84px; resize: vertical; line-height: 1.5; }
.input::placeholder, .textarea::placeholder { color: var(--subtle); }
.input:hover, .textarea:hover, .select:hover { border-color: var(--subtle); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 var(--ring) var(--primary-soft); }
.input[aria-invalid="true"] { border-color: var(--danger); box-shadow: 0 0 0 var(--ring) color-mix(in srgb, var(--danger) 18%, transparent); }
.row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .row2 { grid-template-columns: 1fr; } }

.tones { display: flex; flex-wrap: wrap; gap: 8px; }
.tone-opt { border: 2px solid transparent; border-radius: calc(var(--r-sm) + 2px); background: none; padding: 1px; }
.tone-opt[aria-pressed="true"] { border-color: var(--primary); }

/* ── Toast ───────────────────────────────────────────────────────────────── */
.toasts { position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-radius: var(--r-md);
  background: var(--surface); border: 1px solid var(--border-strong); box-shadow: var(--sh-lg);
  font-size: .875rem; animation: pop var(--norm) var(--ease);
}
.toast .ico { color: var(--success); }
.toast--warn .ico { color: var(--warn); }

/* ── Footer note ─────────────────────────────────────────────────────────── */
.note { padding: 0 0 40px; color: var(--subtle); font-size: .8125rem; }
.note code { font-family: var(--mono); font-size: .75rem; background: var(--surface-2); border: 1px solid var(--border); border-radius: 4px; padding: 1px 5px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   Additions for the hosted app (login, save status, history, product directory)
   ═══════════════════════════════════════════════════════════════════════════ */

/* sign-in card */
.login { min-height: calc(100vh - 140px); display: grid; place-items: center; padding: 24px; }
.login__card {
  width: min(400px, 100%);
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl);
  box-shadow: var(--sh-md); padding: 28px; display: flex; flex-direction: column; gap: 16px;
}
.login__card h1 { font-size: 1.375rem; font-weight: 700; letter-spacing: -.02em; }
.login__card p { color: var(--muted); font-size: .9375rem; }
.login__err { color: var(--danger); font-size: .875rem; min-height: 1.25em; }

/* save status chip (reuses .chip) */
.chip--info { background: color-mix(in srgb, var(--info) 16%, transparent); color: var(--info); }
.chip--danger { background: color-mix(in srgb, var(--danger) 16%, transparent); color: var(--danger); }
.chip--muted { background: var(--surface-3); color: var(--muted); }

/* revisions list */
.revs { display: flex; flex-direction: column; gap: 6px; max-height: 52vh; overflow: auto; margin: 0 -8px; padding: 0 8px; }
.rev {
  display: flex; align-items: center; gap: 12px; padding: 10px 12px;
  border: 1px solid var(--border); border-radius: var(--r-md); background: var(--surface);
}
.rev__main { flex: 1; min-width: 0; }
.rev__title { font-weight: 600; font-size: .875rem; }
.rev__meta { color: var(--subtle); font-size: .75rem; }

/* product directory (home page) */
.dir { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; padding-bottom: 56px; }
.dcard {
  display: flex; flex-direction: column; gap: 8px; padding: 18px 20px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  box-shadow: var(--sh-sm); color: inherit; text-decoration: none;
  transition: border-color var(--fast), box-shadow var(--fast);
}
.dcard:hover { border-color: var(--border-strong); box-shadow: var(--sh-md); }
.dcard h2 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
.dcard p { color: var(--muted); font-size: .875rem; }
.dcard__counts { display: flex; gap: 6px; margin-top: auto; padding-top: 6px; }

.hero__meta .btn { height: 26px; }
.field select.select { appearance: auto; }
.btn--danger-text { color: var(--danger); }
.btn--danger-text:hover { background: color-mix(in srgb, var(--danger) 12%, transparent); }

a.btn { text-decoration: none; }
.rm-page { padding: 40px 0 56px; }

/* ═══════════════════════════════════════════════════════════════════════════
   v2 — signed-in app shell, sharing, product page
   ═══════════════════════════════════════════════════════════════════════════ */
.mono { font-family: var(--mono); font-size: .8125rem; }
.dim { color: var(--subtle) !important; }
.offscreen { position: fixed; left: -9999px; top: 0; opacity: 0; }
.btn--lg { height: 44px; padding: 0 20px; font-size: .9375rem; font-weight: 600; }

/* sign-in card */
.login__mark { width: 44px; height: 44px; border-radius: var(--r-lg); display: grid; place-items: center; background: var(--primary); color: var(--primary-ink); box-shadow: var(--sh-sm); }
.login__mark .ico { width: 22px; height: 22px; }
.login__card .btn--lg { align-self: stretch; }
.login__card .btn--lg .ico { width: 18px; height: 18px; }

/* user menu */
.user { position: relative; }
.user__btn { display: flex; align-items: center; gap: 8px; height: 36px; padding: 0 10px 0 4px; border: 1px solid var(--border); border-radius: 999px; background: var(--surface); }
.user__btn:hover { background: var(--surface-2); }
.user__avatar { width: 28px; height: 28px; border-radius: 50%; object-fit: cover; background: var(--surface-3); }
.user__name { font-size: .875rem; font-weight: 500; max-width: 110px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user__menu { position: absolute; right: 0; top: calc(100% + 8px); min-width: 230px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); padding: 6px; z-index: 50; }
.user__email { padding: 8px 10px; color: var(--subtle); font-size: .8125rem; overflow: hidden; text-overflow: ellipsis; }
.user__item { display: block; width: 100%; text-align: left; padding: 8px 10px; border: 0; border-radius: var(--r-sm); background: none; font-size: .875rem; }
.user__item:hover { background: var(--surface-2); }
.user__sep { height: 1px; background: var(--border); margin: 6px 4px; }

/* roadmap tabs — the Taskboards colour system: each tab has its own colour (automatic, or picked with a right-click) */
.rtabs { display: flex; align-items: center; gap: 6px; max-width: 100%; overflow-x: auto; scrollbar-width: none; padding: 2px; }
.rtabs::-webkit-scrollbar { display: none; }
.rtab {
  --tab-color: var(--primary);
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px;
  border: 1px solid var(--border); border-radius: var(--r-md);
  background: var(--surface-2); color: var(--muted);
  font-size: .8125rem; font-weight: 500; white-space: nowrap; user-select: none; touch-action: none;
  transition: background var(--fast), color var(--fast), border-color var(--fast), box-shadow var(--fast);
}
.rtab:hover { color: var(--text); background: var(--surface-3); }
.rtab__vis { display: inline-flex; color: var(--tab-color); }
.rtab__vis .ico { width: 14px; height: 14px; }
.rtab[aria-pressed="true"] {
  background: color-mix(in srgb, var(--tab-color) 12%, var(--surface));
  border-color: var(--tab-color); color: var(--tab-color); font-weight: 600; box-shadow: var(--sh-sm);
}
.rtab--add { width: 32px; padding: 0; justify-content: center; border-style: dashed; background: transparent; }
.rtab.dragging-source { opacity: .35; }
.rtab-ghost { position: fixed; z-index: 9999; pointer-events: none; opacity: .92; box-shadow: var(--sh-lg); transform: rotate(-1.5deg); }
.rtab-marker { position: fixed; z-index: 9998; width: 3px; border-radius: 2px; background: var(--primary); box-shadow: 0 0 6px var(--primary); pointer-events: none; display: none; }
body.tab-dragging, body.tab-dragging * { cursor: grabbing !important; }

/* colour menu (right-click a tab) */
.color-menu { position: fixed; z-index: 9999; width: 220px; padding: 12px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-lg); animation: fade var(--fast) var(--ease); }
.color-menu__title { margin-bottom: 8px; font-size: .6875rem; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--subtle); }
.color-menu__grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; }
.color-menu__sw { width: 26px; height: 26px; padding: 0; border-radius: 50%; border: 2px solid transparent; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .25); }
.color-menu__sw:hover { transform: scale(1.12); }
.color-menu__sw.active { border-color: var(--text); }
.color-menu__row { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 12px; }
.color-menu__custom { display: flex; align-items: center; gap: 8px; font-size: .8125rem; color: var(--muted); }
.color-menu__custom input { width: 32px; height: 26px; padding: 0; border: 1px solid var(--border-strong); border-radius: 4px; background: none; cursor: pointer; }

/* labels already used in a roadmap (feature dialog) */
.tagpick { display: flex; flex-wrap: wrap; gap: 6px; }
.tag--btn { border: 0; cursor: pointer; font-family: inherit; transition: filter var(--fast), box-shadow var(--fast); }
.tag--btn:hover { filter: brightness(1.15); }
.tag--btn[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--tone); }

/* cards: no empty footer on a title-only card; the edit buttons float over the corner instead.
   (On touch screens there is no hover, so the buttons stay in the footer row.) */
@media (hover: hover) {
  .card__foot { margin-top: 0; min-height: 0; }
  .card__foot:has(.tag) { margin-top: 12px; min-height: 26px; }
  .card__actions { position: absolute; top: 8px; right: 8px; margin: 0; padding: 2px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-md); box-shadow: var(--sh-sm); }
}

/* chips that open the share dialog */
.chip--btn { border: 0; cursor: pointer; }
.chip--btn .ico { width: 13px; height: 13px; }
.chip--btn::before { display: none; }

/* welcome (no roadmap yet) */
.welcome { max-width: 520px; margin: 72px auto; padding: 32px; text-align: center; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-xl); box-shadow: var(--sh-md); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.welcome h2 { font-size: 1.375rem; letter-spacing: -.02em; }
.welcome p { color: var(--muted); }

/* share dialog */
.dialog--wide { width: min(600px, 100%); }
.dialog__title { display: flex; align-items: center; gap: 8px; }
.dialog__title .ico { width: 20px; height: 20px; color: var(--primary); }
.copyrow { display: flex; gap: 8px; align-items: stretch; margin-top: -8px; }
.copyrow .input, .copyrow .textarea { flex: 1; min-width: 0; }
.field .code { white-space: pre; overflow-x: auto; min-height: 76px; }
.share__error { color: var(--danger); font-size: .875rem; }
.share__note { color: var(--warn); font-size: .875rem; }

/* ── product page (landing) ─────────────────────────────────────────────── */
.nav { display: flex; gap: 4px; margin-left: 8px; }
.nav a { padding: 6px 10px; border-radius: var(--r-sm); color: var(--muted); text-decoration: none; font-size: .875rem; font-weight: 500; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
@media (max-width: 820px) { .nav { display: none; } }

.lp-hero { padding: 80px 24px 40px; text-align: center; }
.lp-hero .eyebrow { margin-bottom: 18px; }
.lp-hero h1 { font-size: clamp(2.2rem, 5.2vw, 3.6rem); line-height: 1.08; letter-spacing: -.035em; font-weight: 700; max-width: 18ch; margin: 0 auto; text-wrap: balance; }
.lp-hero h1 em { font-style: normal; color: var(--primary-h); }
[data-theme="dark"] .lp-hero h1 em { color: var(--primary); }
.lp-hero p { margin: 18px auto 0; max-width: 56ch; color: var(--muted); font-size: 1.125rem; }
.lp-cta { margin-top: 30px; display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.lp-hero .lp-note { margin: 14px auto 0; color: var(--subtle); font-size: .8125rem; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-family: var(--mono); font-size: .75rem; font-weight: 500; letter-spacing: .12em; text-transform: uppercase; color: var(--primary-h); }
[data-theme="dark"] .eyebrow { color: var(--primary); }
.eyebrow::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* the demo board under the hero */
.lp-demo { max-width: 1000px; margin: 40px auto 0; padding: 0 24px 24px; }
.lp-demo .cols { padding-bottom: 0; }

.lp-sec { padding: 72px 0; }
.lp-sec + .lp-sec { border-top: 1px solid var(--border); }
.lp-head { max-width: 62ch; margin-bottom: 36px; }
.lp-head h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); letter-spacing: -.025em; line-height: 1.15; margin-top: 12px; text-wrap: balance; }
.lp-head p { margin-top: 12px; color: var(--muted); font-size: 1.0625rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .grid3, .grid2 { grid-template-columns: 1fr; } }
.fcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--sh-sm); }
.fcard__ico { width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; background: var(--primary-soft); color: var(--primary-h); margin-bottom: 14px; }
[data-theme="dark"] .fcard__ico { color: var(--primary); }
.fcard__ico .ico { width: 20px; height: 20px; }
.fcard h3 { font-size: 1.0625rem; font-weight: 600; letter-spacing: -.01em; }
.fcard p { margin-top: 6px; color: var(--muted); font-size: .9375rem; }
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 960px) { .steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }
.step { counter-increment: step; position: relative; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 20px; }
.step::before { content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--primary); color: var(--primary-ink); font-weight: 700; font-size: .8125rem; margin-bottom: 12px; }
.step h3 { font-size: 1rem; font-weight: 600; }
.step p { margin-top: 4px; color: var(--muted); font-size: .875rem; }
.snippet { background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 18px 20px; overflow-x: auto; }
.snippet pre { margin: 0; font-family: var(--mono); font-size: .8125rem; line-height: 1.7; color: var(--text); }
.lp-foot { border-top: 1px solid var(--border); padding: 28px 0 40px; color: var(--subtle); font-size: .875rem; }
.lp-foot .wrap { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.lp-foot a { color: var(--muted); text-decoration: none; }
.lp-foot a:hover { color: var(--text); }

.lp-center { text-align: center; }
.lp-head--center { margin: 0 auto 24px; }
