@import url("https://fonts.googleapis.com/css2?family=Atkinson+Hyperlegible:wght@400;700&family=Bricolage+Grotesque:opsz,wght@12..96,700;12..96,800&display=swap");
/* Link Up Tech — part of the Link Up family */
:root {
  --bg: #fbf6ee;
  --surface: #ffffff;
  --surface-2: #f3ece0;
  --ink: #1c1a17;
  --ink-2: #4a463f;
  --muted: #6f6a61;
  --line: #e6ddcd;
  --accent: #0b6b68;        /* sea teal */
  --accent-ink: #ffffff;
  --accent-soft: #d8eeec;
  --sun: #f2b636;           /* highlight */
  --sun-soft: #fdf0cf;
  --good: #1f7a3f;
  --warn: #a1452a;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(28,26,23,.05), 0 6px 20px rgba(28,26,23,.06);
  --max: 1080px;
  --font-body: "Atkinson Hyperlegible", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Bricolage Grotesque", "Atkinson Hyperlegible", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15140f;
    --surface: #1e1c17;
    --surface-2: #262420;
    --ink: #f3eee4;
    --ink-2: #d4cec2;
    --muted: #a39d91;
    --line: #34312a;
    --accent: #4cc2bc;
    --accent-ink: #0d1a19;
    --accent-soft: #173533;
    --sun: #f2b636;
    --sun-soft: #3a3020;
    --good: #6fcf8f;
    --warn: #f0a080;
    --shadow: none;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  padding-bottom: env(safe-area-inset-bottom);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.15; letter-spacing: -0.01em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.1rem, 6vw, 3.6rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3.6vw, 2.1rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 700; }
p { margin: 0 0 1em; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 16px; }
.skip { position: absolute; left: -9999px; }
.skip:focus { left: 16px; top: 8px; background: var(--surface); padding: 8px 12px; z-index: 50; border-radius: 8px; }
:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bg) 92%, transparent);
  backdrop-filter: saturate(1.2) blur(8px);
  -webkit-backdrop-filter: saturate(1.2) blur(8px);
  border-bottom: 1px solid var(--line);
  padding-top: env(safe-area-inset-top);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 62px; gap: 12px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-size: 1.3rem; font-weight: 600; white-space: nowrap; }
.logo b { color: var(--accent); font-weight: 800; }
.logo-mark { width: 30px; height: 30px; flex: none; }
.nav-toggle {
  display: none; background: none; border: 1px solid var(--line); color: var(--ink);
  border-radius: 999px; padding: 6px 14px; font: inherit; font-size: .95rem; cursor: pointer;
}
.main-nav { display: flex; gap: 4px; }
.main-nav a {
  text-decoration: none; color: var(--ink-2); padding: 8px 12px; border-radius: 999px; font-size: .98rem;
}
.main-nav a:hover { background: var(--surface-2); color: var(--ink); }
.main-nav a[aria-current="page"] { background: var(--ink); color: var(--bg); }
@media (max-width: 760px) {
  .nav-toggle { display: inline-block; }
  .main-nav {
    display: none; position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: 8px 16px 16px;
  }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; font-size: 1.05rem; }
}

/* Hero */
.hero { padding: 56px 0 40px; }
.eyebrow {
  display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--accent); background: var(--accent-soft); padding: 5px 12px; border-radius: 999px; margin-bottom: 18px;
}
.hero h1 em { font-style: normal; color: var(--accent); display: block; font-size: .55em; margin-top: .35em; font-weight: 600; }
.hero .lead { font-size: 1.2rem; color: var(--ink-2); max-width: 40rem; }
.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; }
@media (max-width: 860px) { .hero-grid { grid-template-columns: 1fr; } .hero-art { display: none; } }
.hero-art { background: var(--surface); border: 1px solid var(--line); border-radius: 22px; padding: 22px; box-shadow: var(--shadow); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 20px; border-radius: 999px; font: inherit; font-weight: 700;
  text-decoration: none; cursor: pointer; border: 2px solid transparent;
}
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--bg); }

/* Sections */
section { padding: 40px 0; }
.section-head { max-width: 42rem; margin-bottom: 24px; }
.section-head p { color: var(--ink-2); }
.grid { display: grid; gap: 16px; }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 960px) { .grid-4 { grid-template-columns: repeat(2, 1fr); } .grid-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-4, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow);
}
.card .num { font-family: var(--font-display); font-weight: 800; font-size: 1.05rem; color: var(--accent); margin-bottom: 8px; }
.card p { color: var(--ink-2); }
.card .more { font-weight: 700; text-decoration: none; }
.card .more:hover { text-decoration: underline; }

.split .card h3 { display: flex; align-items: center; gap: 8px; }
.split ul { margin: 0; padding-left: 1.1em; }
.split li { margin-bottom: 8px; color: var(--ink-2); }
.tag { display: inline-block; font-size: .78rem; font-weight: 700; padding: 3px 10px; border-radius: 999px; }
.tag-good { background: color-mix(in srgb, var(--good) 15%, transparent); color: var(--good); }
.tag-warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }

/* Ad slot */
.ad {
  margin: 8px 0; min-height: 110px; border: 1px dashed var(--line); border-radius: var(--radius);
  display: grid; place-items: center; color: var(--muted); font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  background: repeating-linear-gradient(135deg, transparent 0 12px, color-mix(in srgb, var(--line) 35%, transparent) 12px 13px);
}

/* Tune-up tool */
.tool { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 24px; box-shadow: var(--shadow); }
.tool-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 16px; }
.tabs { display: inline-flex; background: var(--surface-2); border-radius: 999px; padding: 4px; }
.tabs button {
  border: 0; background: none; font: inherit; font-weight: 700; color: var(--ink-2);
  padding: 8px 16px; border-radius: 999px; cursor: pointer; min-height: 40px;
}
.tabs button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.meter { height: 10px; background: var(--surface-2); border-radius: 999px; overflow: hidden; margin: 6px 0 4px; }
.meter > span { display: block; height: 100%; width: 0; background: var(--accent); border-radius: 999px; transition: width .3s ease; }
.meter-label { font-size: .92rem; color: var(--muted); }
.checklist { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.checklist li label {
  display: grid; grid-template-columns: 28px 1fr; gap: 12px; align-items: start;
  padding: 14px; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; background: var(--bg);
}
.checklist li label:hover { border-color: var(--accent); }
.checklist input { width: 22px; height: 22px; margin: 2px 0 0; accent-color: var(--accent); }
.checklist strong { display: block; }
.checklist span.why { color: var(--muted); font-size: .95rem; }
.checklist input:checked + div strong { text-decoration: line-through; text-decoration-color: var(--accent); }
.tool-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; margin-top: 16px; font-size: .92rem; color: var(--muted); }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; text-decoration: underline; cursor: pointer; }

/* Why */
.why-grid .card h3 { margin-top: 4px; }
.icon-dot { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--sun-soft); margin-bottom: 12px; }
.icon-dot svg { width: 22px; height: 22px; stroke: var(--ink); }

/* Callout */
.callout { background: var(--ink); color: var(--bg); border-radius: 22px; padding: 32px; }
.callout h2 { color: var(--bg); }
.callout p { color: color-mix(in srgb, var(--bg) 80%, transparent); max-width: 42rem; }
.callout .btn-ghost { color: var(--bg); border-color: var(--bg); }
.callout .btn-ghost:hover { background: var(--bg); color: var(--ink); }

/* Page header */
.page-head { padding: 48px 0 16px; }
.page-head p { color: var(--ink-2); font-size: 1.15rem; max-width: 42rem; }
.progress-box { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; margin-top: 8px; }
.progress-box .meter { width: 140px; margin: 0; }

/* Anchors land below the sticky header */
[id] { scroll-margin-top: 80px; }

/* Academy */
.level { padding-top: 28px; }
.level-label { font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--accent); }
.lesson { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); margin: 14px 0; box-shadow: var(--shadow); overflow: hidden; }
.lesson summary {
  list-style: none; cursor: pointer; padding: 18px 20px; display: grid; grid-template-columns: 44px 1fr 28px; gap: 14px; align-items: center;
}
.lesson summary::-webkit-details-marker { display: none; }
.lesson .ln { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-family: var(--font-display); font-weight: 800; background: var(--accent-soft); color: var(--accent); }
.lesson.done .ln { background: var(--accent); color: var(--accent-ink); }
.lesson summary h3 { margin: 0; }
.lesson summary .sub { color: var(--muted); font-size: .95rem; }
.lesson .chev { width: 24px; height: 24px; transition: transform .2s ease; stroke: var(--muted); }
.lesson[open] .chev { transform: rotate(180deg); }
.lesson .body { padding: 0 20px 20px; border-top: 1px solid var(--line); padding-top: 18px; }
.lesson .body ul { padding-left: 1.2em; }
.lesson .body li { margin-bottom: 6px; }
.try { background: var(--sun-soft); border-radius: var(--radius-sm); padding: 14px 16px; margin: 16px 0; }
.try strong { display: block; margin-bottom: 2px; }
.done-btn { min-height: 44px; }
.lesson.done .done-btn { background: var(--surface-2); color: var(--ink); }

.glossary { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
@media (max-width: 620px) { .glossary { grid-template-columns: 1fr; } }
.glossary div { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.glossary dt { font-weight: 700; }
.glossary dd { margin: 4px 0 0; color: var(--ink-2); }

/* Prose pages */
.prose { max-width: 44rem; }
.prose h2 { margin-top: 1.6em; font-size: 1.5rem; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: 8px; }
.note { background: var(--accent-soft); border-radius: var(--radius); padding: 18px 20px; margin: 24px 0; }
.note strong { display: block; }
.source-list { list-style: none; padding: 0; display: grid; gap: 12px; }
.source-list li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 16px; }
.source-list a { font-weight: 700; }
.source-list p { margin: 4px 0 0; color: var(--ink-2); font-size: .98rem; }
.steps { counter-reset: s; list-style: none; padding: 0; }
.steps li { counter-increment: s; position: relative; padding-left: 44px; margin-bottom: 12px; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 30px; height: 30px; border-radius: 50%; background: var(--accent); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: .9rem; }
.standalone-note { display: none; }
.is-standalone .standalone-note { display: block; }
.is-standalone .install-only { display: none; }
#installBtn[hidden] { display: none; }

/* Footer */
.site-footer { border-top: 1px solid var(--line); margin-top: 48px; padding: 32px 0 40px; color: var(--muted); font-size: .95rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 16px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.site-footer a { color: var(--ink-2); }

/* Bottom tabs (phones) */
.tabbar { display: none; }
@media (max-width: 760px) {
  .tabbar {
    display: grid; grid-template-columns: repeat(5, 1fr);
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    background: var(--surface); border-top: 1px solid var(--line);
    padding-bottom: env(safe-area-inset-bottom);
  }
  .tabbar a {
    display: flex; flex-direction: column; align-items: center; gap: 2px;
    padding: 8px 0 10px; font-size: .72rem; text-decoration: none; color: var(--muted);
  }
  .tabbar svg { width: 22px; height: 22px; stroke: currentColor; }
  .tabbar a[aria-current="page"] { color: var(--accent); font-weight: 700; }
  body { padding-bottom: calc(68px + env(safe-area-inset-bottom)); }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

