/* The shared kit for the public landing, setup and every platform module.
   Load after /dialogue.css, which holds the fonts, base resets and the page tokens for every theme.
   Modules use these classes and tokens; they never redefine them. */
/* Kit tokens per theme (the page tokens live in /dialogue.css). --ink-* is the contrasting panel (.k-ink);
   --blue/--blue-ink/--blue-wash is the highlight the workspace modules use; the washes carry the honest Example label
   (its text colour, --doing-text, and --button-weight/--button-tracking are page tokens in /dialogue.css, so the
   company page and the guides, which do not load this kit, get them too). Constants (type scale, spacing, widths)
   are the same in every theme. */
:root{
  --k-max:1280px;--k-gutter:24px;--k-radius:var(--radius);--k-radius-lg:var(--radius-lg);
  --text-xs:.75rem;--text-sm:.875rem;--text-base:1rem;--text-lg:1.125rem;--text-xl:1.25rem;--text-2xl:1.5rem;--text-3xl:1.875rem;--text-4xl:2.25rem;--text-5xl:3rem;--text-6xl:3.75rem;
  --space-1:4px;--space-2:8px;--space-3:12px;--space-4:16px;--space-5:20px;--space-6:24px;--space-8:32px;--space-10:40px;--space-12:48px;--space-16:64px;--space-20:80px;--space-24:96px;
  /* Navigation identities stay separate from status colours; custom styles use their validated palette. */
  --base-warroom:var(--danger);--base-warroom-icon:var(--danger);--base-warroom-ink:var(--danger-ink);
  --base-company:var(--ok);--base-company-icon:var(--ok-text);--base-company-ink:var(--ok-ink);
  --base-tint:10%;--base-hover-tint:18%;--base-sheen:none;
  /* The Get hacked aim: one deep crimson in every theme (5.9:1 on white, used as a mark rather than small text on dark). */
  --aim:#c8102e;--aim-glow:rgba(200,16,46,.26);--aim-wash:rgba(200,16,46,.08);
}
:root,html[data-theme=gethacked],html[data-theme=custom]{
  --ink-bg:#0a0b0f;--ink-fg:#ffffff;--ink-fg-2:#cccccc;--ink-muted:#8f8f8f;--ink-line:rgba(255,255,255,.1);--ink-fill:#121318;--ink-fill-2:#1a1b21;--ink-faint:#555555;
  --ink-ok:#3ccf82;--ink-danger:#ff6b5e;--ink-doing:#ff7a33;--ink-accent:#1e5eff;--ink-accent-ink:#ffffff;--ink-accent-hover:#2f68ff;--ink-focus:#1e5eff;
  --wash-danger:#2a1210;--wash-doing:#2a1608;
  --blue:#1e5eff;--blue-ink:#ffffff;--blue-wash:rgba(30,94,255,.1);
  --ok-ink:#0c0c0d;--danger-ink:#0c0c0d;
}
html[data-theme=light]{
  --ink-bg:#0c0d0f;--ink-fg:#f3f4f5;--ink-fg-2:#d4d7db;--ink-muted:#a3aab3;--ink-line:#262a30;--ink-fill:#16181c;--ink-fill-2:#24272d;--ink-faint:#4a5059;
  --ink-ok:#3ccf82;--ink-danger:#ff8a7a;--ink-doing:#ff7a33;--ink-accent:var(--ink-fg);--ink-accent-ink:var(--ink-bg);--ink-accent-hover:var(--ink-fg-2);--ink-focus:#8eaaff;
  --wash-danger:#fdf0ee;--wash-doing:#fff6f1;
  --blue:#245aee;--blue-ink:#ffffff;--blue-wash:#eef2fe;
  --ok-ink:#0c0c0d;--danger-ink:#ffffff;
}
html[data-theme=dark],html[data-theme=retro]{
  --ink-bg:#16181c;--ink-fg:#f3f4f5;--ink-fg-2:#d4d7db;--ink-muted:#a3aab3;--ink-line:#30353c;--ink-fill:#1f2227;--ink-fill-2:#24272d;--ink-faint:#4a5059;
  --ink-ok:#3ccf82;--ink-danger:#ff8a7a;--ink-doing:#ff7a33;--ink-accent:var(--ink-fg);--ink-accent-ink:var(--ink-bg);--ink-accent-hover:var(--ink-fg-2);--ink-focus:#8eaaff;
  --wash-danger:#2a1614;--wash-doing:#2a1a10;
  --blue:#8eaaff;--blue-ink:#0c0d0f;--blue-wash:#141b2e;
  --ok-ink:#0c0c0d;--danger-ink:#0c0c0d;
}
html[data-theme=terminal]{
  --ink-bg:#0b140d;--ink-fg:#7dff9a;--ink-fg-2:#5ee07a;--ink-muted:#4fbf68;--ink-line:rgba(125,255,154,.22);--ink-fill:#102014;--ink-fill-2:#16291a;--ink-faint:#1f3a24;
  --ink-ok:#33ff66;--ink-danger:#ff5f56;--ink-doing:#ffb000;--ink-accent:#33ff66;--ink-accent-ink:#021405;--ink-accent-hover:#7dff9a;--ink-focus:#ffb000;
  --wash-danger:#2a0d0b;--wash-doing:#241a00;
  --blue:#33ff66;--blue-ink:#021405;--blue-wash:rgba(51,255,102,.1);
  --ok-ink:#021405;--danger-ink:#021405;
}
html[data-theme=cyberpunk]{
  --ink-bg:#140a24;--ink-fg:#f4f1ff;--ink-fg-2:#d9d0f5;--ink-muted:#a99bd3;--ink-line:rgba(200,160,255,.18);--ink-fill:#1c1030;--ink-fill-2:#24163c;--ink-faint:#4b3d6e;
  --ink-ok:#00f5a0;--ink-danger:#ff4d6d;--ink-doing:#ffb02e;--ink-accent:#ff2bd6;--ink-accent-ink:#14001a;--ink-accent-hover:#ff5ce1;--ink-focus:#00f0ff;
  --wash-danger:#2a0a1a;--wash-doing:#2a1a08;
  --blue:#00f0ff;--blue-ink:#04131a;--blue-wash:rgba(0,240,255,.1);
  --ok-ink:#0b0614;--danger-ink:#0b0614;
}
html[data-theme=pink]{
  --ink-bg:#3b1230;--ink-fg:#fbf0f2;--ink-fg-2:#ecd3dd;--ink-muted:#d7b3c6;--ink-line:#5a2a4c;--ink-fill:#4a1a3d;--ink-fill-2:#57224a;--ink-faint:#7a4a6a;
  --ink-ok:#7be0a8;--ink-danger:#ff9a8f;--ink-doing:#ffb27a;--ink-accent:#ffb3cf;--ink-accent-ink:#3b1230;--ink-accent-hover:#ffc9dc;--ink-focus:#ffb3cf;
  --wash-danger:#fbe3e3;--wash-doing:#fdeee4;
  --blue:#c2185b;--blue-ink:#ffffff;--blue-wash:#f9dce6;
  --ok-ink:#ffffff;--danger-ink:#ffffff;
}
/* Satin burgundy and forest green sit quietly beside the deep blue canvas. */
:root:not([data-theme]),html[data-theme=gethacked],html[data-theme=dark],html[data-theme=retro]{
  --base-warroom:#693440;--base-warroom-icon:#cfa5ae;--base-warroom-ink:#f1dfe3;
  --base-company:#264e43;--base-company-icon:#a3c5b6;--base-company-ink:#e0eee7;
  --base-tint:38%;--base-hover-tint:55%;
  --base-sheen:linear-gradient(145deg,rgba(255,255,255,.07),transparent 65%);
}
html[data-theme=light],html[data-theme=pink]{
  --base-warroom:#693440;--base-warroom-icon:#693440;--base-warroom-ink:#f1dfe3;
  --base-company:#264e43;--base-company-icon:#264e43;--base-company-ink:#e0eee7;
}
@media (max-width:640px){:root{--k-gutter:16px}}

/* Layout */
.k-wrap{max-width:var(--k-max);margin:0 auto;padding-inline:var(--k-gutter);box-sizing:border-box}
.k-section{padding-block:clamp(64px,10vw,112px)}
.k-split{display:flex;flex-wrap:wrap;gap:clamp(32px,5vw,56px);align-items:center}
.k-split>.k-main{flex:999 1 520px;min-width:0}
.k-split>.k-side{flex:1 1 380px;min-width:0}
.k-row{display:flex;flex-wrap:wrap;gap:16px}
.k-row>*{flex:1 1 260px;min-width:0}

/* Ink panels re-point the tokens, so anything inside adapts. */
.k-ink{background:var(--ink-bg);color:var(--ink-fg);--ink:var(--ink-fg);--ink-2:var(--ink-fg-2);--bg:var(--ink-bg);--bg-raised:var(--ink-fill);--surface:var(--ink-bg);--muted:var(--ink-muted);--ghost:var(--ink-line);--fill:var(--ink-fill);--fill-2:var(--ink-fill-2);--faint:var(--ink-faint);--ok:var(--ink-ok);--ok-text:var(--ink-ok);--danger:var(--ink-danger);--doing:var(--ink-doing);--doing-text:var(--ink-doing);--accent:var(--ink-accent);--accent-ink:var(--ink-accent-ink);--accent-hover:var(--ink-accent-hover);--accent-wash:color-mix(in srgb,var(--ink-accent) 14%,transparent);--accent-line:color-mix(in srgb,var(--ink-accent) 40%,transparent);--accent-text:var(--ink-accent);--focus:var(--ink-focus);--link:var(--ink-fg);--ok-ink:var(--ink-bg);--danger-ink:var(--ink-bg)}
.k-tint{background:var(--fill)}

/* Type */
.k-kicker{margin:0;font:500 13px/1.3 var(--label);letter-spacing:.08em;text-transform:uppercase;color:var(--muted)}
.k-display{margin:0;font:var(--display-weight) clamp(46px,6.4vw,88px)/.98 var(--display);letter-spacing:var(--display-tracking,-.04em);text-wrap:balance}
.k-h2{margin:14px 0 0;font:var(--display-weight) clamp(34px,4.4vw,56px)/1.02 var(--display);letter-spacing:var(--display-tracking,-.03em);text-wrap:balance}
.k-h3{margin:0;font:var(--display-weight) clamp(22px,2vw,28px)/1.1 var(--display);letter-spacing:var(--display-tracking,-.02em)}
.k-lede{margin:20px 0 0;max-width:62ch;font:var(--body-weight) clamp(17px,1.5vw,20px)/1.5 var(--body);color:var(--ink-2)}
.k-body{margin:10px 0 0;font:var(--body-weight) 17px/1.5 var(--body);color:var(--ink-2)}
.k-fine{margin:16px 0 0;max-width:72ch;font:var(--body-weight) 14px/1.5 var(--body);color:var(--muted)}
.k-mono{font-family:var(--mono)}

/* Buttons and links that look like buttons (DESIGN.md: 14px, tight padding, the theme's radius).
   Primary is the accent with the theme's glow; soft is the ghost button: a hairline in --control-line, text in --ink-2.
   Weights one step under --button-weight are written calc(var(--button-weight) - 100). */
.k-btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:44px;padding:12px 24px;border-radius:var(--radius);border:0;font:var(--button-weight) var(--text-sm)/1 var(--body);letter-spacing:var(--button-tracking);text-decoration:none;cursor:pointer;transition:background .2s,color .2s,transform .2s,box-shadow .2s;box-sizing:border-box;white-space:nowrap}
.k-btn.is-lg{min-height:48px;padding:14px 28px;font-size:15px}
.k-btn.is-sm{min-height:44px;padding:10px 18px;font-size:var(--text-sm)}
.k-btn.is-primary{background:var(--accent);color:var(--accent-ink);box-shadow:var(--button-shadow)}
.k-btn.is-primary:hover:not(:disabled){background:var(--accent-hover);box-shadow:var(--button-glow);transform:var(--hover-lift)}
.k-btn.is-primary:active:not(:disabled){transform:none;box-shadow:var(--button-glow-active)}
.k-btn.is-soft{background:var(--fill);color:var(--ink-2);box-shadow:inset 0 0 0 1px var(--control-line);font-weight:calc(var(--button-weight) - 100)}
.k-btn.is-soft:hover{background:var(--fill-2);color:var(--ink);box-shadow:inset 0 0 0 1px var(--border-hover)}
.k-btn.is-outline{background:transparent;color:var(--ink);box-shadow:inset 0 0 0 1px var(--border-hover)}
.k-btn.is-quiet{background:transparent;color:var(--muted);padding-inline:12px}
.k-btn.is-quiet:hover{color:var(--ink)}
.k-btn.is-ok{background:var(--ok);color:var(--ok-ink)}
.k-btn:disabled{opacity:.45;cursor:default}
.k-link{font-weight:var(--button-weight);color:var(--ink);text-decoration-color:var(--link-underline);text-underline-offset:5px}

/* Pill groups: Manual / Schedule / Autopilot, filters, frequencies */
.k-pills{display:inline-flex;flex-wrap:wrap;gap:4px;padding:4px;border-radius:var(--radius);background:var(--fill);box-shadow:inset 0 0 0 1px var(--control-line)}
.k-pill{min-height:40px;padding:8px 16px;border-radius:var(--radius-field);font:var(--button-weight) 14px/1 var(--body);letter-spacing:var(--button-tracking);color:var(--ink-2);background:transparent;transition:background .2s,color .2s}
.k-pill:hover{color:var(--ink)}
.k-pill[aria-pressed=true],.k-pill[aria-checked=true],.k-pill[aria-current=page]{background:var(--accent);color:var(--accent-ink)}
.k-pills.is-loose{background:none;padding:0;gap:8px;box-shadow:none}
.k-pills.is-loose .k-pill{background:var(--fill);box-shadow:inset 0 0 0 1px var(--control-line)}
.k-pills.is-loose .k-pill[aria-pressed=true]{background:var(--accent);color:var(--accent-ink)}

/* Cards: --surface lets the page effects through; a fill card inside a tint is opaque. */
.k-card{border:1px solid var(--ghost);border-radius:var(--k-radius-lg);padding:clamp(20px,2.4vw,30px);box-sizing:border-box;background:var(--surface)}
.k-card.is-fill{border-color:transparent;background:var(--fill)}
.k-tint .k-card.is-fill{background:var(--bg-raised)}
.k-card.is-dashed{border:1.5px dashed var(--faint);background:transparent;color:var(--muted)}
a.k-card{display:flex;flex-direction:column;gap:10px;color:inherit;text-decoration:none;transition:border-color .2s,transform .2s}
a.k-card:hover{border-color:var(--border-hover)}

/* Status words and dots */
.k-status{font:13px/1.3 var(--label);font-weight:calc(var(--button-weight) - 100);color:var(--muted)}
.k-status.is-ok{color:var(--ok-text)}
.k-status.is-doing{color:var(--doing-text)}
.k-status.is-danger{color:var(--danger)}
.k-dot{display:inline-block;flex:none;width:18px;height:18px;border-radius:50%;box-sizing:border-box;border:2px solid var(--faint)}
.k-dot.is-ok{border:0;background:var(--ok)}
.k-dot.is-doing{border:3px solid var(--doing)}
.k-tag{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:var(--radius-sm);font:12px/1.2 var(--label);font-weight:calc(var(--button-weight) - 100);background:var(--fill);color:var(--ink-2)}
.k-tag.is-danger{background:var(--danger);color:var(--danger-ink)}
.k-tag.is-ok{background:var(--ok);color:var(--ok-ink)}

/* Progress bars: answered, evidenced and verified layers. Width comes from --w (0 to 100), set by script. */
.k-bar{position:relative;display:block;height:12px;border-radius:var(--radius-round);background:var(--cell-fill);overflow:hidden}
.k-bar>span{position:absolute;inset:0 auto 0 0;width:calc(var(--w,0) * 1%);border-radius:inherit;transition:width .8s cubic-bezier(.2,.8,.2,1)}
.k-bar>.is-answered{background:var(--faint)}
.k-bar>.is-evidenced{background:var(--muted)}
.k-bar>.is-verified,.k-bar>.is-fill{background:var(--accent)}
.k-bar.is-done>span{background:var(--ok)}
.k-bar.is-thin{height:6px}

/* Chat bubbles for GetMoat. Corners follow the theme (12px with a 4px tail in light and dark, 6px in GetHacked, square in terminal);
   your own words sit in the accent wash. */
.k-say{--k-say-r:max(var(--radius),calc(var(--radius-lg) - 2px));--k-say-tail:min(4px,var(--radius-sm));margin:0;padding:14px 16px;border-radius:var(--k-say-r) var(--k-say-r) var(--k-say-r) var(--k-say-tail);border:1px solid var(--ghost);background:var(--surface);font:var(--body-weight) 15px/1.5 var(--body);color:var(--ink)}
.k-say.is-me{align-self:flex-end;max-width:85%;border-color:var(--accent-line);border-radius:var(--k-say-r) var(--k-say-r) var(--k-say-tail) var(--k-say-r);background:var(--accent-wash);color:var(--ink)}
.k-who{display:flex;align-items:center;gap:10px;font:var(--button-weight) 16px/1.2 var(--body)}
.k-who small{display:block;font:var(--body-weight) 13px/1.3 var(--body);color:var(--muted)}

/* The GetHacked mark and GetMoat's hex */
.k-mark{width:24px;height:26px;flex:none}
.k-hex{width:34px;height:36px;flex:none}

/* A small honest label on every screen that shows example data */
.k-demo{display:inline-flex;align-items:center;gap:8px;padding:6px 12px;border-radius:var(--radius-sm);background:var(--wash-doing);color:var(--doing-text);font:12px/1.2 var(--label);font-weight:calc(var(--button-weight) - 100);letter-spacing:.02em}

@media (prefers-reduced-motion:reduce){
  .k-btn,.k-pill,.k-bar>span,a.k-card{transition:none}
  .k-btn.is-primary:hover:not(:disabled){transform:none}
}

/* Light and dark: today's look, kept exactly where the rules above follow DESIGN.md. The theme prefix weighs nothing,
   so each line has the weight of the rule it restores and module stylesheets still override it as before. */
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn{gap:10px;min-height:48px;padding:12px 22px;font-size:16px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn.is-lg{min-height:56px;padding:16px 28px;font-size:18px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn.is-sm{min-height:44px;padding:10px 16px;font-size:14px}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn.is-soft{color:var(--ink);box-shadow:none;font-weight:var(--button-weight)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn.is-soft:hover{color:var(--ink);box-shadow:none}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-btn.is-outline{box-shadow:inset 0 0 0 1.5px var(--ink)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) a.k-card:hover{border-color:var(--ink)}
:where(html[data-theme=light],html[data-theme=dark],html[data-theme=retro]) .k-say.is-me{border:0;background:var(--ink);color:var(--bg)}

