/* learnings.adylanroaffa.com — mirrors the "yetanother" theme of adylanroaffa.com
   (black ink on white paper, one cobalt accent, square edges, thick rules). */

:root {
  --paper: #ffffff;
  --ink: #111111;
  --soft: #444444;
  --muted: #5c5c5c;
  --faint: #a3a3a3;
  --outline: #c4c4c4;
  --line: #e4e4e4;
  --accent: #1f2bd1;
  --accent-light: #8c95ff;
  --accent-wash: #eef0ff;
  --photo: #ff5a1f;

  --font-head: "Schibsted Grotesk", system-ui, sans-serif;
  --font-body: "Source Serif 4", Georgia, serif;
  --font-mono: "JetBrains Mono", ui-monospace, monospace;

  --gutter: 16px;
  --measure: 68ch;
  --rule: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
}
::selection { background: var(--accent); color: var(--paper); }
a { color: var(--ink); text-decoration-thickness: 2px; text-underline-offset: 4px; text-decoration-color: var(--accent); }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.middot::before { content: "/"; margin: 0 0.5em; color: var(--faint); }
.mono { font-family: var(--font-mono); font-weight: 700; letter-spacing: 0.03em; text-transform: uppercase; }
.container { width: 100%; max-width: 1280px; margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: calc(820px + 2 * var(--gutter)); }

/* ---------- Header ---------- */
.site-header { border-bottom: var(--rule) solid var(--ink); }
.site-header .container { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 24px; padding-top: 10px; padding-bottom: 2px; }
.wordmark { font-family: var(--font-head); font-weight: 900; font-size: 22px; letter-spacing: -0.04em; line-height: 1; text-decoration: none; }
.nav-primary ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.nav-primary a { font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; text-decoration: none; display: inline-flex; min-height: 32px; align-items: center; }
.nav-primary a.is-active { text-decoration: underline; text-decoration-color: var(--accent); }

/* ---------- Page head ---------- */
.page { padding-top: 24px; padding-bottom: 48px; }
.page-head { margin-bottom: 24px; padding-bottom: 14px; border-bottom: var(--rule) solid var(--ink); }
.page-title { margin: 0 0 12px; font-family: var(--font-head); font-weight: 800; font-size: clamp(34px, 7vw, 56px); line-height: 1; letter-spacing: -0.04em; text-wrap: balance; }
.page-meta { margin: 0; font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); }
.dek { margin: 10px 0 0; font-size: 19px; color: var(--soft); max-width: var(--measure); }

.section-title { margin: 40px 0 12px; padding-bottom: 6px; border-bottom: var(--rule) solid var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 28px; letter-spacing: -0.03em; line-height: 1.1; }
.label { font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--accent); }

/* ---------- Buttons ---------- */
.btn { min-height: 36px; padding: 0 12px; border: 2px solid var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; }
.btn:hover, .btn:active { background: var(--ink); color: var(--paper); }

/* ---------- Progress meter (like the life meter) ---------- */
.meter { display: flex; align-items: center; gap: 14px; }
.meter-pct { flex: none; font-family: var(--font-head); font-weight: 800; font-size: 46px; line-height: 1; letter-spacing: -0.05em; }
.meter-pct .pct-sign { color: var(--accent); font-size: 0.6em; vertical-align: 0.35em; }
.meter-bar { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.meter-track { position: relative; height: 20px; border: 3px solid var(--ink); }
.meter-fill { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width .3s; }
.meter-stats { font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.meter-stats b { color: var(--accent); }

/* ---------- Stage strip ---------- */
.strip { display: flex; gap: 0; margin-top: 18px; border: 3px solid var(--ink); }
.strip button { flex: var(--w) 1 0; min-width: 48px; position: relative; padding: 8px 6px 10px; text-align: left; border-right: 2px solid var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; overflow: hidden; }
.strip button:last-child { border-right: 0; }
.strip button small { display: block; font-weight: 500; font-size: 10px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip button .bar { position: absolute; left: 0; bottom: 0; height: 4px; background: var(--accent); transition: width .3s; }
.strip button.complete { background: var(--ink); color: var(--paper); }
.strip button.complete small { color: var(--faint); }

/* ---------- Stages / checklists ---------- */
.stage { border-top: 3px solid var(--ink); }
.stage:last-of-type { border-bottom: 3px solid var(--ink); }
.stage summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 14px; padding: 14px 0; }
.stage summary::-webkit-details-marker { display: none; }
.stage-num { flex: none; width: 36px; height: 36px; display: grid; place-items: center; border: 3px solid var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 18px; }
.stage.complete .stage-num { background: var(--ink); color: var(--paper); }
.stage-title { margin: 0; font-family: var(--font-head); font-weight: 800; font-size: 22px; line-height: 1.15; letter-spacing: -0.03em; }
.stage-count { margin-left: auto; font-family: var(--font-mono); font-weight: 700; font-size: 12px; color: var(--muted); white-space: nowrap; }
.stage.complete .stage-count { color: var(--accent); }
.chev { flex: none; width: 14px; height: 14px; transition: transform .15s; }
.stage[open] .chev { transform: rotate(90deg); }
.stage-body { padding: 0 0 18px 50px; }
@media (max-width: 520px) { .stage-body { padding-left: 0; } }
.stage-body .label { display: block; margin: 12px 0 4px; }
.note { margin: 12px 0 0; padding: 0.2em 0 0.2em 14px; border-left: var(--rule) solid var(--accent); color: var(--soft); font-size: 16px; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.check:last-child { border-bottom: 0; }
.check input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 3px 0 0; border: 3px solid var(--ink); border-radius: 0; background: var(--paper); cursor: pointer; display: grid; place-items: center; }
.check input:checked { background: var(--accent); border-color: var(--accent); }
.check input:checked::after { content: ""; width: 5px; height: 10px; border: solid var(--paper); border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }
.check input:checked ~ .check-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.check-title { font-family: var(--font-head); font-weight: 700; font-size: 19px; letter-spacing: -0.02em; line-height: 1.2; display: block; }
.check-sub { font-size: 15px; color: var(--soft); display: block; }
.check .chip { margin-left: auto; flex: none; align-self: center; min-height: 32px; display: inline-flex; align-items: center; padding: 0 10px; border: 2px solid var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; text-decoration: none; }
.check .chip:hover { background: var(--ink); color: var(--paper); }

/* ---------- Split bar (time budget etc.) ---------- */
.split { display: flex; height: 40px; border: 3px solid var(--ink); }
.split div { display: grid; place-items: center; border-right: 2px solid var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 11px; }
.split div:last-child { border-right: 0; }
.split .s-ink { background: var(--ink); color: var(--paper); }
.split .s-accent { background: var(--accent); color: var(--paper); }
.split .s-wash { background: var(--accent-wash); color: var(--ink); }
.split .s-paper { background: var(--paper); color: var(--ink); }
.rows { list-style: none; margin: 10px 0 0; padding: 0; }
.rows li { display: flex; gap: 14px; align-items: baseline; padding: 10px 0; border-bottom: 1px solid var(--ink); }
.rows .k { flex: none; width: 72px; font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--accent); }
.rows .swatch { display: inline-block; width: 10px; height: 10px; margin-right: 6px; border: 2px solid var(--ink); vertical-align: 0; }

/* ---------- Entry lists (tips, tools, topics) ---------- */
.entries { list-style: none; margin: 0; padding: 0; }
.entry { padding: 12px 0; border-bottom: 1px solid var(--ink); }
.entry-title { margin: 0; font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.2; letter-spacing: -0.03em; }
.entry-text { margin: 2px 0 0; font-size: 16px; color: var(--soft); }
a.entry { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; text-decoration: none; }
a.entry:hover .entry-title { color: var(--accent); }

.defs { margin: 0; }
.defs dt { font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--accent); padding-top: 10px; }
.defs dd { margin: 0; padding-bottom: 10px; border-bottom: 1px solid var(--line); }

/* ---------- Footer ---------- */
.site-footer { border-top: var(--rule) solid var(--ink); margin-top: 24px; }
.site-footer .container { padding-top: 14px; padding-bottom: 28px; }
.footer-meta { margin: 0; display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 16px; }

/* ---------- Wider screens ---------- */
@media (min-width: 720px) {
  :root { --gutter: 24px; }
  .defs { display: grid; grid-template-columns: 180px minmax(0, 1fr); }
  .defs dt, .defs dd { padding: 10px 0; border-bottom: 1px solid var(--line); }
}
@media (min-width: 1000px) {
  :root { --rule: 6px; }
  body { font-size: 18px; }
  .wordmark { font-size: 34px; }
  .site-header .container { padding-top: 16px; padding-bottom: 10px; }
  .nav-primary ul { gap: 4px 24px; }
  .nav-primary a { font-size: 13px; }
  .meter-pct { font-size: 72px; line-height: 0.9; }
  .meter-track { height: 28px; border-width: 4px; }
  .section-title { font-size: 32px; }
  .footer-meta { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---------- Tools: switches, fields, stats, plots ---------- */
.switch { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); border: 3px solid var(--ink); }
.switch button { min-height: 44px; font-family: var(--font-mono); font-weight: 700; font-size: 12px; letter-spacing: 0.03em; text-transform: uppercase; border-right: 2px solid var(--ink); }
.switch button:last-child { border-right: 0; }
.switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); }
.btn-big { min-height: 48px; padding: 0 16px; border: 3px solid var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 13px; letter-spacing: 0.03em; text-transform: uppercase; }
.btn-big:hover { background: var(--ink); color: var(--paper); }
.btn-big.primary { background: var(--ink); color: var(--paper); }
.btn-big.primary:hover { background: var(--accent); border-color: var(--accent); }
.btn-big:disabled { opacity: .4; cursor: not-allowed; }
.row { display: flex; flex-wrap: wrap; gap: 10px; align-items: end; margin: 14px 0; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-family: var(--font-mono); font-weight: 700; font-size: 11px; letter-spacing: 0.03em; text-transform: uppercase; color: var(--muted); }
.field input, .field select { min-height: 44px; padding: 0 10px; border: 3px solid var(--ink); border-radius: 0; background: var(--paper); color: var(--ink); font-family: var(--font-mono); font-weight: 700; font-size: 14px; -webkit-appearance: none; appearance: none; }
.field input[type=number] { width: 96px; }
.status { font-family: var(--font-mono); font-weight: 700; font-size: 12px; text-transform: uppercase; letter-spacing: 0.03em; color: var(--accent); min-height: 18px; }
.status.bad { color: var(--photo); }
.stats-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border-top: 3px solid var(--ink); margin-top: 14px; }
.stat { padding: 12px 0; border-bottom: 1px solid var(--ink); }
.stat:nth-child(odd) { padding-right: 12px; border-right: 1px solid var(--ink); }
.stat:nth-child(even) { padding-left: 12px; }
.stat-num { font-family: var(--font-head); font-weight: 800; font-size: 36px; line-height: 1; letter-spacing: -0.04em; }
.stat-num small { font-size: 0.45em; color: var(--muted); letter-spacing: 0; margin-left: 2px; }
.stat-label { font-family: var(--font-mono); font-weight: 700; font-size: 11px; text-transform: uppercase; color: var(--muted); }
.stat-note { font-size: 14px; color: var(--soft); }
.pass { color: var(--accent); }
.fail { color: var(--photo); }
.badge { display: inline-block; padding: 1px 6px; border: 2px solid currentColor; font-family: var(--font-mono); font-weight: 700; font-size: 10.5px; text-transform: uppercase; }
.plot { width: 100%; border: 3px solid var(--ink); margin-top: 14px; display: block; }
.big-chord { font-family: var(--font-head); font-weight: 900; font-size: clamp(56px, 18vw, 120px); line-height: 1; letter-spacing: -0.05em; margin: 10px 0 4px; }
.chord-next { font-family: var(--font-mono); font-weight: 700; font-size: 14px; color: var(--muted); }
.chord-feedback { min-height: 24px; font-family: var(--font-mono); font-weight: 700; font-size: 13px; text-transform: uppercase; }
.panel { border: 3px solid var(--ink); padding: 14px; margin-top: 14px; }
.beat-dots { display: flex; gap: 6px; margin-top: 10px; }
.beat-dots span { width: 18px; height: 18px; border: 3px solid var(--ink); }
.beat-dots span.on { background: var(--accent); border-color: var(--accent); }
.history { width: 100%; border-collapse: collapse; font-size: 15px; }
.history th { text-align: left; font-family: var(--font-mono); font-size: 11px; text-transform: uppercase; color: var(--muted); border-bottom: 3px solid var(--ink); padding: 6px 8px 6px 0; }
.history td { border-bottom: 1px solid var(--ink); padding: 8px 8px 8px 0; vertical-align: top; }
.history td.num { font-family: var(--font-mono); font-weight: 700; white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.strip button small { white-space: normal; }
.entry-title, .check-title, .stage-title, .page-title, .section-title { font-variant-numeric: normal; }
