/* Top Tier Strategies — Onboarding Walkthrough
   Matched to the concepts site (/thebuild/): blueprint grid, Archivo + Hanken Grotesk + IBM Plex Mono,
   brick-red accent with navy + green. Built to screen-share. */

@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@500;600;800;900&family=Hanken+Grotesk:wght@400;500;600&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* concepts-site palette */
  --paper: #eceef1;
  --card: #ffffff;
  --ink: #2c2d31;
  --ink-soft: #5c5f66;
  --line: #b7bcc2;
  --accent: #c0392b;
  --accent-ink: #8f2018;
  --blueprint: #1f3a5f;
  --green: #3f6f4a;

  --font-display: 'Archivo', sans-serif;
  --font-body: 'Hanken Grotesk', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  /* aliases so existing markup keeps resolving, remapped to source roles */
  --bone: #eceef1;
  --ochre: var(--blueprint);   /* intake form */
  --slate: var(--green);       /* we crawl */
  --clay: var(--accent);       /* the call */
  --gold: var(--accent);       /* highlights / open questions */

  --shadow: 0 1px 0 rgba(44,45,49,.04), 0 14px 34px -26px rgba(31,58,95,.5);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--paper);
  background-image:
    linear-gradient(rgba(44,45,49,0.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44,45,49,0.045) 1px, transparent 1px),
    linear-gradient(rgba(44,45,49,0.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(44,45,49,0.08) 1px, transparent 1px);
  background-size: 26px 26px, 26px 26px, 130px 130px, 130px 130px;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

.shell { display: grid; grid-template-columns: 290px 1fr; min-height: 100vh; }

/* ---- Sidebar (blueprint title block) ---- */
.sidebar {
  position: sticky; top: 0; align-self: start;
  height: 100vh; overflow-y: auto;
  background: var(--blueprint);
  color: #eef2f6;
  padding: 38px 26px;
  border-right: 2px solid var(--ink);
}
.brand { font-family: var(--font-display); font-weight: 900; font-size: 23px; line-height: 1.02; letter-spacing: -.02em; }
.brand span { color: #fff; }
.brand-logo { width: 176px; height: auto; display: block; }
.brand-sub { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .24em; text-transform: uppercase; color: #9fb2c6; margin-top: 14px; }

.nav { margin-top: 36px; list-style: none; }
.nav li { margin: 2px 0; }
.nav a {
  display: flex; gap: 12px; align-items: baseline;
  color: #cfdae5; text-decoration: none;
  padding: 9px 12px; border-radius: 4px;
  font-size: 14.5px; transition: background .15s, color .15s;
}
.nav a .n { font-family: var(--font-mono); font-weight: 500; color: #7f97ad; font-size: 12px; min-width: 18px; }
.nav a:hover { background: rgba(255,255,255,.07); color: #fff; }
.nav a.active { background: var(--accent); color: #fff; font-weight: 600; }
.nav a.active .n { color: #fff; }

.side-foot { margin-top: 34px; font-size: 12.5px; color: #9fb2c6; line-height: 1.5; border-top: 1px solid #34507180; padding-top: 18px; }

/* ---- Main ---- */
.main { padding: 64px clamp(28px, 5vw, 80px) 120px; max-width: 1200px; }

/* text-size stepper */
.zoombar { position: fixed; bottom: 18px; right: 18px; z-index: 50; display: flex; align-items: center; gap: 8px; background: var(--blueprint); color: #fff; border-radius: 9px; padding: 7px 10px; box-shadow: 0 10px 26px -8px rgba(31,58,95,.6); }
.zoombar button { width: 32px; height: 32px; border: 1px solid rgba(255,255,255,.35); background: transparent; color: #fff; border-radius: 6px; font-family: var(--font-display); font-weight: 800; font-size: 14px; cursor: pointer; line-height: 1; }
.zoombar button:hover:not(:disabled) { background: var(--accent); border-color: var(--accent); }
.zoombar button:disabled { opacity: .35; cursor: default; }
.zoombar .zlvl { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; min-width: 62px; text-align: center; }

.eyebrow { font-family: var(--font-mono); font-size: 11px; letter-spacing: .26em; text-transform: uppercase; color: var(--accent-ink); font-weight: 500; }
h1 { font-family: var(--font-display); font-weight: 900; font-size: clamp(34px, 5vw, 58px); line-height: .98; letter-spacing: -.025em; margin: 14px 0 0; }
.lede { font-size: 18px; color: var(--ink-soft); margin-top: 18px; max-width: 64ch; }

h2 { font-family: var(--font-display); font-weight: 800; font-size: 25px; letter-spacing: -.015em; margin: 56px 0 18px; padding-bottom: 10px; border-bottom: 2px solid var(--ink); }
h3 { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -.01em; margin: 30px 0 10px; }
p { margin: 12px 0; max-width: 72ch; }
strong { font-weight: 600; }

/* ---- Source tags (mono, squared) ---- */
.tag { display: inline-flex; align-items: center; gap: 7px; font-family: var(--font-mono); font-size: 11px; font-weight: 500; letter-spacing: .08em; text-transform: uppercase; padding: 4px 10px; border-radius: 3px; white-space: nowrap; border: 1px solid; }
.tag::before { content: ""; width: 7px; height: 7px; border-radius: 50%; }
.tag.form  { background: #e7edf4; color: var(--blueprint); border-color: #c2d0e0; } .tag.form::before { background: var(--blueprint); }
.tag.crawl { background: #e4eee7; color: #2c5739; border-color: #c2d8c9; } .tag.crawl::before { background: var(--green); }
.tag.call  { background: #f6e4e2; color: var(--accent-ink); border-color: #e6c4bf; } .tag.call::before { background: var(--accent); }
.tag.them  { background: #e6e7ea; color: var(--ink); border-color: #c9ccd2; } .tag.them::before { background: var(--ink); }

.legend { display: flex; flex-wrap: wrap; gap: 10px; margin: 22px 0 8px; }

/* ---- Timeline (legacy, unused) ---- */
.flow { list-style: none; margin: 30px 0; border-left: 2px solid var(--line); }
.flow li { position: relative; padding: 0 0 30px 34px; }
.flow .step-t { font-family: var(--font-display); font-weight: 600; font-size: 19px; }
.flow .step-d { color: var(--ink-soft); margin: 4px 0 8px; }

/* ---- Diagram ---- */
.diagram { margin: 26px 0 8px; padding: 22px 10px; background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; box-shadow: var(--shadow); }
.diagram svg a { cursor: pointer; }
.diagram svg a:hover rect { fill: #f4f6f9; }

/* ---- State rows + browser mockups (one-link page) ---- */
.staterow { display: grid; grid-template-columns: 1fr 340px; gap: 30px; align-items: center; padding: 26px 0; border-top: 1px solid var(--line); }
.staterow:first-of-type { border-top: none; padding-top: 8px; }
.staterow .st-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--blueprint); font-weight: 600; }
.staterow h3 { margin: 6px 0 8px; }
.staterow p { margin: 8px 0; }
.staterow .trig { font-size: 13px; color: var(--ink-soft); font-style: italic; }
@media (max-width: 820px) { .staterow { grid-template-columns: 1fr; } }

.mock { border: 1.5px solid var(--line); border-radius: 8px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.mock .bar { background: #e3e6ea; padding: 8px 11px; display: flex; gap: 5px; align-items: center; border-bottom: 1px solid var(--line); }
.mock .bar i { width: 9px; height: 9px; border-radius: 50%; background: #c3c8cf; }
.mock .body { padding: 16px; min-height: 158px; }
.mock .body.center { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; gap: 9px; }
.mck-h { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 10px; }
.mck-row { display: flex; align-items: center; gap: 9px; font-size: 13px; padding: 5px 0; color: var(--ink); }
.mck-row.todo { color: var(--ink-soft); }
.mck-box { width: 16px; height: 16px; border: 1.5px solid var(--line); border-radius: 3px; display: inline-grid; place-items: center; font-size: 11px; color: #fff; flex: none; }
.mck-row.done .mck-box { background: var(--green); border-color: var(--green); }
.mck-up { margin-top: 10px; border: 1.5px dashed var(--line); border-radius: 6px; padding: 14px; text-align: center; font-size: 12px; color: var(--ink-soft); }
.mck-spin { width: 30px; height: 30px; border: 3px solid var(--line); border-top-color: var(--accent); border-radius: 50%; }
.mck-title { font-family: var(--font-display); font-weight: 800; font-size: 16px; color: var(--ink); }
.mck-sub { font-size: 12.5px; color: var(--ink-soft); }
.mck-site { border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.mck-site .sh { height: 22px; background: var(--blueprint); }
.mck-site .si { height: 44px; background: #dfe3e8; }
.mck-site .sl { height: 7px; background: #e3e6ea; margin: 8px 10px; border-radius: 3px; }
.mck-site .sl.short { width: 55%; }
.mck-actions { display: flex; gap: 8px; margin-top: 12px; }
.mck-btn { font-family: var(--font-mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; padding: 7px 12px; border-radius: 4px; border: 1.5px solid var(--ink); }
.mck-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.mck-btn.ghost { background: #fff; color: var(--ink); }
.mck-seal { width: 40px; height: 40px; border-radius: 50%; background: var(--green); color: #fff; display: grid; place-items: center; font-size: 22px; }
.mck-link { font-family: var(--font-mono); font-size: 11px; color: var(--blueprint); background: #eef2f6; padding: 5px 9px; border-radius: 4px; }

/* ---- Cards ---- */
.cards { display: grid; gap: 16px; margin: 24px 0; }
.cards.two { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.card { background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; padding: 22px 24px; box-shadow: var(--shadow); }
.card h3 { margin-top: 0; }
.card .state-k { font-family: var(--font-mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--blueprint); font-weight: 600; }

/* ---- Table ---- */
table { width: 100%; border-collapse: collapse; margin: 22px 0; font-size: 15px; background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; overflow: hidden; box-shadow: var(--shadow); }
th, td { text-align: left; padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--font-mono); font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-soft); background: #e3e6ea; font-weight: 500; }
tr:last-child td { border-bottom: none; }
td .muted { color: var(--ink-soft); font-size: 13.5px; }

/* ---- Open question callout ---- */
.q { position: relative; background: #faf1f0; border: 1px solid var(--accent); border-left: 5px solid var(--accent); border-radius: 0 6px 6px 0; padding: 16px 20px 16px 50px; margin: 16px 0; box-shadow: var(--shadow); }
.q::before { content: "?"; position: absolute; left: 13px; top: 14px; width: 24px; height: 24px; background: var(--accent); color: #fff; border-radius: 50%; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; }
.q .ql { font-family: var(--font-mono); font-size: 10.5px; letter-spacing: .16em; text-transform: uppercase; color: var(--accent-ink); font-weight: 600; }
.q p { margin: 3px 0 0; }

/* ---- Form preview ---- */
.fld { margin: 12px 0; }
.fld label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 5px; }
.fld .inp { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 10px 13px; color: var(--ink-soft); font-size: 14px; }
.fld .req { color: var(--accent); font-weight: 700; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.chip { background: var(--paper); border: 1px solid var(--line); border-radius: 4px; padding: 6px 14px; font-size: 13.5px; }
.formsec { background: var(--card); border: 1.5px solid var(--line); border-radius: 6px; padding: 24px 26px; margin: 18px 0; box-shadow: var(--shadow); }
.formsec > .sec-h { display: flex; align-items: center; gap: 12px; margin-bottom: 6px; }
.formsec > .sec-h h3 { margin: 0; }

ul.clean { list-style: none; margin: 14px 0; }
ul.clean li { padding: 7px 0 7px 26px; position: relative; border-bottom: 1px dashed var(--line); }
ul.clean li::before { content: ""; position: absolute; left: 4px; top: 15px; width: 8px; height: 8px; border: 2px solid var(--accent); border-radius: 1px; }

.note { font-size: 13.5px; color: var(--ink-soft); font-style: italic; }
.pagefoot { margin-top: 70px; padding-top: 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; font-size: 14px; }
.pagefoot a { color: var(--accent); font-weight: 600; text-decoration: none; }
.pagefoot a:hover { color: var(--accent-ink); }

@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
}
