/* FIELD GUIDE — hard-edge brutalist study interface
   Mobile first. No UI library, no external font, no decorative gradients. */
:root {
  color-scheme: light;
  --paper: #f4f1e8;
  --paper-bright: #fffdf6;
  --paper-deep: #e8e3d6;
  --ink: #191a16;
  --ink-soft: #43453d;
  --muted: #696b61;
  --line: #23241e;
  --line-soft: #c5c1b5;
  --acid: #d9ff43;
  --acid-deep: #b3dc21;
  --coral: #ff674d;
  --blue: #9bd4ff;
  --shadow: 5px 5px 0 var(--ink);
  --shadow-small: 3px 3px 0 var(--ink);
  --sans: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --display: Impact, "Arial Narrow", "Franklin Gothic Condensed", var(--sans);
  --mono: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0;
  min-width: 320px;
  color: var(--ink);
  background-color: var(--paper);
  background-image: linear-gradient(to right, rgba(25,26,22,.035) 1px, transparent 1px), linear-gradient(to bottom, rgba(25,26,22,.035) 1px, transparent 1px);
  background-size: 24px 24px;
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
body::after {
  content: "";
  pointer-events: none;
  position: fixed;
  inset: 0;
  z-index: 20;
  opacity: .13;
  background-image: radial-gradient(#191a16 .45px, transparent .6px);
  background-size: 5px 5px;
  mix-blend-mode: multiply;
}
button, input { font: inherit; }
button, a, label { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
button { color: inherit; }
button:focus-visible, a:focus-visible, input:focus-visible, label:focus-within { outline: 3px solid var(--coral); outline-offset: 3px; }
::selection { color: var(--ink); background: var(--acid); }
.shell { width: min(100% - 28px, 1120px); margin-inline: auto; }
.skip-link { position: fixed; top: 8px; left: 8px; z-index: 100; padding: 10px 14px; background: var(--acid); border: 2px solid var(--ink); transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }

/* Top rail */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 66px;
  padding-block: 10px;
  background: rgba(244,241,232,.96);
  border-bottom: 2px solid var(--ink);
  backdrop-filter: blur(10px);
}
.topbar::before { content: ""; position: absolute; height: 5px; width: 54px; background: var(--acid); left: 0; bottom: -4px; border: 1px solid var(--ink); }
.brand, .footer-brand { display: inline-flex; align-items: center; gap: 9px; text-decoration: none; font-family: var(--display); font-size: 22px; letter-spacing: -.03em; line-height: 1; white-space: nowrap; }
.brand-mark { display: inline-flex; width: 27px; height: 27px; padding: 5px; gap: 2px; align-items: flex-end; justify-content: center; background: var(--ink); border: 2px solid var(--ink); }
.brand-mark span { display: block; width: 4px; background: var(--acid); }
.brand-mark span:nth-child(1) { height: 7px; }
.brand-mark span:nth-child(2) { height: 13px; }
.brand-mark span:nth-child(3) { height: 17px; }
.brand-accent { color: var(--coral); }
.top-nav { display: none; align-items: center; gap: 5px; margin-left: auto; }
.top-nav a { padding: 8px 10px; font-size: 11px; font-weight: 850; text-decoration: none; text-transform: uppercase; letter-spacing: .05em; border: 1px solid transparent; }
.top-nav a:hover { background: var(--acid); border-color: var(--ink); }
.button { min-height: 46px; display: inline-flex; justify-content: center; align-items: center; gap: 9px; padding: 11px 14px; border: 2px solid var(--ink); border-radius: 0; font-size: 12px; font-weight: 900; line-height: 1.15; text-decoration: none; cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; }
.button:hover { transform: translate(-2px,-2px); box-shadow: var(--shadow-small); }
.button:active { transform: translate(1px,1px); box-shadow: none; }
.button-small { min-height: 38px; padding: 8px 11px; font-size: 10px; }
.button-primary { background: var(--acid); box-shadow: 3px 3px 0 var(--ink); }
.button-primary:hover { background: var(--acid-deep); }
.button-quiet { background: var(--paper-bright); }
#focusModeBtn { margin-left: auto; flex-shrink: 0; }

/* Hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 25px; padding: 38px 0 27px; }
.hero-copy { min-width: 0; }
.eyebrow, .section-kicker, .phase-label, .phase-tag, .detail-label, .mini-label, .route-legend, .trust-note, .visual-caption, .phase-status, .phase-completion .completion-status {
  font-family: var(--mono);
  text-transform: uppercase;
  letter-spacing: .075em;
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; padding: 5px 7px; font-size: 9px; font-weight: 900; background: var(--paper-bright); border: 1px solid var(--ink); box-shadow: 2px 2px 0 var(--ink); }
.live-dot { width: 8px; height: 8px; display: inline-block; background: var(--coral); border: 1px solid var(--ink); animation: blink-dot 2.4s steps(2,end) infinite; }
h1, h2, h3, p { overflow-wrap: break-word; }
.hero h1 { max-width: 800px; margin: 22px 0 16px; font-family: var(--display); font-size: clamp(3.6rem, 16.5vw, 6.7rem); line-height: .88; letter-spacing: -.035em; font-weight: 900; text-transform: uppercase; }
.gradient-text { display: inline-block; position: relative; margin-top: 8px; padding: 0 7px 5px 4px; background: var(--acid); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--ink); transform: rotate(-1deg); }
.hero-subtitle { max-width: 590px; margin: 25px 0 19px; color: var(--ink-soft); font-size: 15px; line-height: 1.65; }
.hero-actions { display: flex; flex-direction: column; align-items: stretch; gap: 10px; max-width: 360px; }
.trust-note { display: flex; align-items: flex-start; gap: 8px; margin-top: 18px; font-size: 9px; line-height: 1.65; font-weight: 700; color: var(--muted); }
.trust-note span { color: var(--coral); font-size: 16px; line-height: 1.1; }
.hero-visual { position: relative; isolation: isolate; min-height: 242px; overflow: hidden; border: 2px solid var(--ink); background-color: var(--acid); background-image: linear-gradient(to right, rgba(25,26,22,.16) 1px, transparent 1px), linear-gradient(to bottom, rgba(25,26,22,.16) 1px, transparent 1px); background-size: 20px 20px; box-shadow: 6px 6px 0 var(--ink); }
.hero-visual::before { content: "FIELD NOTE / 001"; position: absolute; top: 12px; left: 12px; z-index: 3; padding: 4px 6px; background: var(--paper-bright); border: 1px solid var(--ink); font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .08em; }
.hero-visual::after { content: ""; position: absolute; width: 155px; height: 155px; right: -44px; top: 8px; border: 2px solid var(--ink); border-radius: 50%; box-shadow: 0 0 0 12px transparent, 0 0 0 13px var(--ink), 0 0 0 25px transparent, 0 0 0 26px var(--ink); opacity: .8; }
.orbit { position: absolute; border: 2px solid var(--ink); border-radius: 50%; }
.orbit-a { width: 175px; height: 175px; left: 50%; top: 43%; transform: translate(-50%,-50%); }
.orbit-b { width: 115px; height: 205px; left: 50%; top: 43%; transform: translate(-50%,-50%) rotate(42deg); border-style: dashed; }
.visual-core { position: absolute; z-index: 2; left: 50%; top: 43%; transform: translate(-50%,-50%) rotate(-5deg); width: 100px; height: 100px; display: flex; flex-direction: column; justify-content: center; align-items: center; gap: 0; background: var(--ink); color: var(--acid); border: 2px solid var(--ink); box-shadow: 5px 5px 0 var(--coral); font-family: var(--display); font-size: 16px; line-height: .95; letter-spacing: .03em; text-align: center; }
.core-glyph { font-family: var(--sans); font-size: 28px; }
.float-chip { position: absolute; z-index: 4; display: flex; align-items: center; gap: 7px; min-width: 106px; padding: 7px 9px; border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: 3px 3px 0 var(--ink); animation: chip-float 6s ease-in-out infinite; }
.float-chip b { display: block; font-family: var(--mono); font-size: 9px; letter-spacing: .09em; }
.float-chip small { display: block; margin-top: 1px; color: var(--muted); font-size: 8px; line-height: 1.2; }
.chip-icon { display: grid; place-items: center; width: 25px; height: 25px; border: 1px solid var(--ink); background: var(--acid); font-weight: 900; }
.chip-data { top: 26%; left: 10px; }
.chip-model { right: 8px; top: 45%; animation-delay: -2s; }
.chip-ship { left: 18px; bottom: 15px; animation-delay: -4s; }
.visual-caption { position: absolute; z-index: 5; right: 9px; bottom: 9px; max-width: 58%; padding: 4px 5px; background: var(--paper-bright); border: 1px solid var(--ink); font-size: 7px; font-weight: 900; text-align: right; }

/* Progress dashboard */
.dashboard { display: grid; grid-template-columns: 1fr; gap: 12px; }
.panel, .progress-card, .focus-card, .today-strip { border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: var(--shadow); }
.progress-card { padding: 18px; }
.card-topline, .progress-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.section-kicker { font-size: 9px; font-weight: 900; }
.muted { color: var(--muted); font-size: 11px; }
#progressLabel { font-family: var(--mono); font-weight: 900; color: var(--ink); }
.progress-track { height: 15px; overflow: hidden; margin: 15px 0 11px; border: 2px solid var(--ink); background: var(--paper-deep); }
.progress-track span { display: block; width: 0; height: 100%; background: var(--acid); border-right: 2px solid var(--ink); transition: width .45s cubic-bezier(.2,.8,.2,1); }
.progress-bottom { font-family: var(--mono); font-size: 10px; }
.progress-bottom strong { font-size: 16px; }
.mini-pill { padding: 5px 7px; border: 1px solid var(--ink); background: var(--blue); font-size: 9px; font-weight: 900; white-space: nowrap; }
.focus-card { display: grid; grid-template-columns: 38px minmax(0,1fr) 36px; gap: 11px; align-items: start; padding: 17px; background: var(--coral); }
.focus-icon { display: grid; place-items: center; width: 36px; height: 36px; border: 2px solid var(--ink); background: var(--paper-bright); font-size: 20px; }
.focus-content { min-width: 0; }
.focus-content .section-kicker { display: block; margin: 2px 0 5px; }
.focus-content h2 { margin: 0 0 6px; font-family: var(--display); font-size: 25px; line-height: .98; text-transform: uppercase; }
.focus-content p { margin: 0; font-size: 12px; line-height: 1.5; }
.icon-button { width: 36px; height: 36px; align-self: center; border: 2px solid var(--ink); background: var(--acid); font-size: 19px; font-weight: 900; cursor: pointer; transition: transform .15s ease; }
.icon-button:hover { transform: translate(2px,-2px); }

/* Focus timer */
.today-strip { display: flex; flex-direction: column; align-items: stretch; gap: 17px; margin-top: 26px; padding: 18px; background: var(--blue); }
.today-heading { display: flex; align-items: flex-start; gap: 12px; }
.today-symbol { display: grid; flex-shrink: 0; place-items: center; width: 39px; height: 39px; background: var(--paper-bright); border: 2px solid var(--ink); font-size: 20px; }
.today-heading h2 { margin: 4px 0 5px; font-family: var(--display); font-size: 25px; line-height: .98; text-transform: uppercase; }
.today-heading p { margin: 0; color: var(--ink-soft); font-size: 12px; line-height: 1.55; }
.timer { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-top: 14px; border-top: 2px dashed var(--ink); }
.timer-display { font-family: var(--mono); font-weight: 900; font-size: clamp(28px, 8vw, 38px); letter-spacing: -.08em; line-height: 1; font-variant-numeric: tabular-nums; }
.timer-actions { display: flex; gap: 8px; }
.timer-actions .button-quiet { background: transparent; }

/* Shared section heading */
.route-section, .learning-rules, .toolkit-section { margin-top: 55px; }
.section-heading { display: flex; flex-direction: column; gap: 14px; align-items: flex-start; margin-bottom: 19px; }
.section-heading .eyebrow { margin-bottom: 11px; }
.section-heading h2 { margin: 0; font-family: var(--display); font-size: clamp(2.1rem, 10vw, 3.6rem); line-height: .93; letter-spacing: -.015em; text-transform: uppercase; }
.section-heading p { max-width: 600px; margin: 12px 0 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.route-legend { display: flex; flex-wrap: wrap; gap: 9px 13px; font-size: 8px; font-weight: 800; }
.route-legend span { display: flex; align-items: center; gap: 6px; }
.legend-dot { width: 11px; height: 11px; display: inline-block; border: 1px solid var(--ink); background: var(--acid); }
.legend-optional { background: var(--paper-bright); border-style: dashed; }

/* Phase cards */
.phase-list { display: grid; gap: 14px; }
.phase-card { min-width: 0; border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: 4px 4px 0 var(--ink); scroll-margin-top: 82px; transition: box-shadow .16s ease, transform .16s ease; }
.phase-card:hover { box-shadow: 6px 6px 0 var(--ink); }
.phase-card.active { box-shadow: 6px 6px 0 var(--acid-deep); }
.phase-card.completed { background: #f0f4dd; }
.phase-summary { width: 100%; display: grid; grid-template-columns: 42px minmax(0,1fr) 20px; align-items: center; gap: 12px; padding: 14px; border: 0; background: transparent; text-align: left; cursor: pointer; }
.phase-number { display: grid; place-items: center; width: 40px; height: 43px; border: 2px solid var(--ink); background: var(--acid); font-family: var(--display); font-size: 24px; line-height: 1; box-shadow: 2px 2px 0 var(--ink); }
.phase-card.completed .phase-number { background: var(--ink); color: var(--acid); font-family: var(--sans); font-size: 21px; }
.phase-title-wrap { display: block; min-width: 0; }
.phase-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 5px; }
.phase-label { color: var(--muted); font-size: 8px; font-weight: 800; }
.phase-tag { display: inline-block; padding: 2px 5px; border: 1px solid var(--ink); background: var(--paper-deep); font-size: 7px; font-weight: 900; line-height: 1.35; }
.phase-card.active .phase-tag, .phase-card.completed .phase-tag { background: var(--acid); }
.phase-title { display: block; font-family: var(--display); font-size: clamp(1.2rem, 5.3vw, 1.55rem); line-height: 1; text-transform: uppercase; letter-spacing: -.01em; }
.phase-description { display: block; margin-top: 6px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.phase-status { display: none; }
.chevron { display: grid; place-items: center; width: 22px; height: 22px; font-size: 23px; line-height: 1; transition: transform .2s ease; }
.phase-card.open .chevron { transform: rotate(180deg); }
.phase-content { display: none; padding: 0 15px 18px; border-top: 2px solid var(--ink); }
.phase-card.open .phase-content { display: block; animation: content-enter .23s ease-out both; }
.phase-intro { margin: 16px 0 20px; padding-left: 12px; border-left: 4px solid var(--coral); color: var(--ink-soft); font-size: 12px; line-height: 1.7; }
.phase-columns { display: grid; grid-template-columns: 1fr; gap: 23px; }
.detail-label { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 9px; font-weight: 900; }
.detail-icon { display: grid; place-items: center; width: 21px; height: 21px; border: 1px solid var(--ink); background: var(--acid); font-family: var(--sans); font-size: 13px; }
.milestone-list { display: grid; gap: 0; border-top: 1px solid var(--line-soft); }
.milestone { display: flex; align-items: flex-start; gap: 10px; padding: 12px 1px; border-bottom: 1px solid var(--line-soft); color: var(--ink-soft); font-size: 12px; line-height: 1.5; cursor: pointer; transition: background-color .15s ease, color .15s ease; }
.milestone:hover { color: var(--ink); background: rgba(217,255,67,.16); }
.milestone input { appearance: none; -webkit-appearance: none; display: grid; flex: 0 0 22px; place-items: center; width: 22px; height: 22px; margin: 0; border: 2px solid var(--ink); border-radius: 0; background: var(--paper-bright); cursor: pointer; }
.milestone input::after { content: ""; width: 10px; height: 6px; margin-top: -3px; border-left: 2px solid transparent; border-bottom: 2px solid transparent; transform: rotate(-45deg) scale(0); transition: transform .12s ease; }
.milestone input:checked { background: var(--acid); }
.milestone input:checked::after { border-color: var(--ink); transform: rotate(-45deg) scale(1); }
.milestone:has(input:checked) span { color: #74766b; text-decoration: line-through; text-decoration-thickness: 1px; text-decoration-color: var(--acid-deep); }
/* Resource links stay readable and thumb-friendly on narrow screens. */
.resource-list { display: grid; gap: 8px; }
.resource-item { display: flex; align-items: flex-start; gap: 10px; min-width: 0; padding: 11px; border: 1px solid var(--ink); background: var(--paper); text-decoration: none; transition: transform .15s ease, background-color .15s ease, box-shadow .15s ease; }
.resource-item:hover { transform: translate(-2px,-2px); background: #fff7d3; box-shadow: 3px 3px 0 var(--ink); }
.resource-arrow { display: grid; flex: 0 0 27px; place-items: center; width: 27px; height: 27px; border: 1px solid var(--ink); background: var(--acid); font-weight: 1000; }
.resource-copy { display: block; min-width: 0; }
.resource-title { display: block; font-size: 12px; font-weight: 900; line-height: 1.35; }
.resource-desc { display: block; margin-top: 4px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.resource-type { display: inline-block; margin-top: 7px; padding: 3px 5px; border: 1px solid var(--ink); background: var(--paper-bright); font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .04em; }
.exit-box, .project-box { margin-top: 17px; padding: 14px; border: 2px solid var(--ink); box-shadow: 3px 3px 0 var(--ink); }
.exit-box { background: #fff0bf; }
.project-box { background: var(--acid); }
.mini-label { display: block; margin-bottom: 7px; font-size: 8px; font-weight: 900; }
.exit-box .mini-label::before { content: "? "; color: var(--coral); }
.project-box .mini-label::before { content: "↗ "; }
.project-box strong, .exit-box strong { display: block; margin-bottom: 5px; font-size: 13px; line-height: 1.35; }
.project-box p, .exit-box p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.phase-completion { position: relative; display: grid; grid-template-columns: 25px minmax(0,1fr); align-items: start; gap: 11px; margin-top: 22px; padding: 13px; border: 2px solid var(--ink); background: var(--paper-deep); cursor: pointer; transition: background-color .18s ease, transform .18s ease, box-shadow .18s ease; }
.phase-completion:hover { transform: translate(-1px,-1px); box-shadow: 3px 3px 0 var(--ink); }
.phase-completion input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.completion-box { display: grid; place-items: center; width: 25px; height: 25px; border: 2px solid var(--ink); background: var(--paper-bright); font-weight: 1000; color: transparent; line-height: 1; }
.phase-completion input:checked + .completion-box { background: var(--acid); color: var(--ink); }
.phase-completion input:focus-visible + .completion-box { outline: 3px solid var(--coral); outline-offset: 3px; }
.completion-copy { display: block; min-width: 0; }
.completion-copy strong { display: block; font-family: var(--display); font-size: 18px; line-height: 1.05; text-transform: uppercase; }
.completion-copy small { display: block; margin-top: 5px; color: var(--muted); font-size: 10px; line-height: 1.5; }
.completion-status { display: inline-block; margin-top: 8px; padding: 3px 5px; border: 1px solid var(--ink); background: var(--paper-bright); font-family: var(--mono); font-size: 8px; font-weight: 900; letter-spacing: .06em; }
.phase-completion:has(input:checked) { background: var(--acid); }
.phase-completion:has(input:checked) .completion-status { background: var(--ink); color: var(--acid); }
.phase-footer { display: flex; flex-direction: column; align-items: stretch; gap: 12px; margin-top: 17px; padding-top: 14px; border-top: 1px dashed var(--line-soft); }
.phase-footer p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.55; }
.phase-action { min-height: 42px; padding: 10px 12px; border: 2px solid var(--ink); background: var(--ink); color: var(--acid); text-align: left; font-size: 11px; font-weight: 900; cursor: pointer; transition: transform .15s ease, background-color .15s ease; }
.phase-action:hover { transform: translate(-2px,-2px); background: #33352c; }

/* Learning principles */
.compact-heading { margin-bottom: 19px; }
.rules-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.rule-card { min-width: 0; padding: 14px 13px; border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: 3px 3px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.rule-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.rule-number { display: inline-block; padding: 4px 6px; border: 1px solid var(--ink); background: var(--acid); font-family: var(--mono); font-size: 9px; font-weight: 900; }
.rule-card h3 { margin: 13px 0 6px; font-family: var(--display); font-size: 19px; line-height: 1.02; text-transform: uppercase; }
.rule-card p { margin: 0; color: var(--muted); font-size: 11px; line-height: 1.6; }
.balance-note { display: flex; align-items: flex-start; gap: 12px; padding: 16px; margin-top: 13px; border: 2px solid var(--ink); background: #fff0bf; box-shadow: 4px 4px 0 var(--ink); }
.balance-icon { display: grid; flex: 0 0 31px; place-items: center; width: 31px; height: 31px; border: 2px solid var(--ink); background: var(--paper-bright); font-size: 20px; }
.balance-note strong { font-family: var(--display); font-size: 17px; line-height: 1; text-transform: uppercase; }
.balance-note p { margin: 6px 0 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }

/* Toolkit */
.toolkit-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.tool-card { display: flex; align-items: flex-start; gap: 13px; min-width: 0; padding: 15px; border: 2px solid var(--ink); background: var(--paper-bright); box-shadow: 3px 3px 0 var(--ink); transition: transform .18s ease, box-shadow .18s ease; }
.tool-card:hover { transform: translate(-2px,-2px); box-shadow: 5px 5px 0 var(--ink); }
.tool-logo { display: grid; flex: 0 0 42px; place-items: center; width: 42px; height: 42px; border: 2px solid var(--ink); font-family: var(--mono); font-size: 14px; font-weight: 900; }
.logo-python { background: var(--blue); }
.logo-data { background: var(--acid); }
.logo-ml { background: #ffc0b4; }
.logo-git { background: #d9d0ff; }
.tool-card > div { min-width: 0; }
.tool-card h3 { margin: 1px 0 4px; font-family: var(--display); font-size: 19px; line-height: 1; text-transform: uppercase; }
.tool-card p { margin: 0 0 8px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.tool-card a { display: inline-flex; align-items: center; gap: 4px; padding-bottom: 2px; border-bottom: 2px solid var(--coral); font-size: 11px; font-weight: 900; text-decoration: none; }
.tool-card a:hover { background: var(--acid); }

/* Honesty and footer */
.honesty { display: flex; align-items: flex-start; gap: 12px; padding: 17px; margin: 32px 0 35px; background: var(--paper-deep); box-shadow: 4px 4px 0 var(--ink); }
.honesty-icon { display: grid; flex: 0 0 30px; place-items: center; width: 30px; height: 30px; border: 2px solid var(--ink); background: var(--acid); font-weight: 900; font-size: 17px; }
.honesty h2 { margin: 1px 0 5px; font-family: var(--display); font-size: 20px; line-height: 1; text-transform: uppercase; }
.honesty p { margin: 0; color: var(--ink-soft); font-size: 11px; line-height: 1.65; }
.footer { display: grid; grid-template-columns: 1fr; gap: 11px; padding: 20px 0 28px; border-top: 2px solid var(--ink); }
.footer-brand { font-size: 19px; }
.footer-brand .brand-mark { width: 24px; height: 24px; }
.footer > p { margin: 0; color: var(--muted); font-size: 11px; }
.footer-actions { display: flex; flex-wrap: wrap; gap: 9px; padding-top: 13px; border-top: 1px dashed var(--line-soft); }
.text-button { min-height: 34px; padding: 6px 8px; border: 1px solid var(--ink); background: var(--paper-bright); font-family: var(--mono); font-size: 9px; font-weight: 800; text-transform: uppercase; cursor: pointer; }
.text-button:hover { background: var(--acid); }
.danger-text:hover { background: var(--coral); }
.import-label { position: relative; display: inline-flex; align-items: center; cursor: pointer; }
.import-label input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.save-status { color: var(--muted); font-family: var(--mono); font-size: 9px; line-height: 1.5; }
.toast { position: fixed; z-index: 50; right: 14px; left: 14px; bottom: max(14px, env(safe-area-inset-bottom)); width: fit-content; max-width: calc(100vw - 28px); margin-inline: auto; padding: 12px 15px; border: 2px solid var(--ink); background: var(--acid); color: var(--ink); box-shadow: 4px 4px 0 var(--ink); font-size: 12px; font-weight: 900; opacity: 0; pointer-events: none; transform: translateY(10px); transition: opacity .18s ease, transform .18s ease; }
.toast.show { opacity: 1; transform: translateY(0); }

/* Focus mode keeps only the work in front of you. */
.focus-mode .ambient, .focus-mode .hero-visual, .focus-mode .today-strip, .focus-mode .learning-rules, .focus-mode .toolkit-section, .focus-mode .honesty { display: none; }
.focus-mode .hero { padding: 23px 0 18px; }
.focus-mode .hero h1 { font-size: clamp(3rem, 13vw, 5rem); }
.focus-mode .hero-subtitle, .focus-mode .trust-note { display: none; }
.focus-mode .dashboard { margin-bottom: 25px; }
.focus-mode .route-section { margin-top: 24px; }
.focus-mode .phase-content { padding-top: 15px; }

/* Little touches of life, never motion for motion's sake. */
@keyframes card-enter { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }
@keyframes content-enter { from { opacity: .45; transform: translateY(-4px); } to { opacity: 1; transform: translateY(0); } }
@keyframes chip-float { 0%, 100% { transform: translateY(0) rotate(-1deg); } 50% { transform: translateY(-4px) rotate(1deg); } }
@keyframes blink-dot { 0%, 65%, 100% { opacity: 1; } 75%, 90% { opacity: .35; } }
.hero-copy > .eyebrow { animation: card-enter .4s both; }
.hero-copy > h1 { animation: card-enter .45s .04s both; }
.hero-copy > .hero-subtitle { animation: card-enter .45s .09s both; }
.hero-copy > .hero-actions { animation: card-enter .45s .14s both; }
.hero-copy > .trust-note { animation: card-enter .45s .19s both; }

@media (min-width: 520px) {
  .shell { width: min(100% - 36px, 1120px); }
  .hero-actions { flex-direction: row; align-items: center; max-width: none; }
  .hero-actions > * { width: auto; }
  .hero-visual { min-height: 280px; }
  .dashboard { grid-template-columns: 1fr 1fr; }
  .focus-card { grid-template-columns: 34px minmax(0,1fr) 34px; padding: 15px; }
  .focus-icon, .icon-button { width: 34px; height: 34px; }
  .focus-content h2 { font-size: 22px; }
  .phase-status { display: block; color: var(--muted); font-size: 8px; line-height: 1.65; text-align: right; letter-spacing: .01em; text-transform: none; }
  .phase-status b { color: var(--ink); font-family: var(--mono); font-size: 10px; }
  .phase-summary { grid-template-columns: 43px minmax(0,1fr) minmax(64px,auto) 20px; }
  .phase-columns { grid-template-columns: 1fr 1fr; gap: 18px; }
  .toolkit-grid { grid-template-columns: 1fr 1fr; }
  .footer { grid-template-columns: 1fr 1fr; align-items: center; }
  .footer > p { text-align: right; }
  .footer-actions, .save-status { grid-column: 1 / -1; }
}
@media (min-width: 760px) {
  .topbar { gap: 20px; min-height: 72px; }
  .top-nav { display: flex; }
  #focusModeBtn { margin-left: 0; }
  .hero { grid-template-columns: minmax(0,1.05fr) minmax(300px,.85fr); gap: 34px; align-items: center; padding: 58px 0 37px; }
  .hero h1 { font-size: clamp(4.7rem, 8.2vw, 7.3rem); }
  .hero-visual { min-height: 345px; }
  .visual-core { width: 120px; height: 120px; font-size: 19px; }
  .core-glyph { font-size: 32px; }
  .chip-data { left: 20px; }
  .chip-model { right: 20px; }
  .chip-ship { left: 28px; bottom: 28px; }
  .dashboard { grid-template-columns: .9fr 1.1fr; }
  .today-strip { flex-direction: row; align-items: center; justify-content: space-between; padding: 21px; }
  .today-heading { max-width: 660px; }
  .timer { min-width: 260px; padding: 0 0 0 19px; border-top: 0; border-left: 2px dashed var(--ink); }
  .section-heading { flex-direction: row; align-items: flex-end; justify-content: space-between; gap: 25px; }
  .route-legend { padding-bottom: 5px; }
  .phase-summary { padding: 18px; }
  .phase-content { padding: 0 20px 22px; }
  .phase-intro { font-size: 13px; }
  .phase-columns { gap: 28px; }
  .milestone { font-size: 13px; }
  .resource-item { padding: 12px; }
  .rules-grid { grid-template-columns: repeat(4, minmax(0,1fr)); }
  .rule-card { padding: 17px; }
  .toolkit-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; transition-duration: .01ms !important; }
}
