/* DiskTidy site. System fonts only, no third-party requests. Colours and type go through tokens. */
:root {
  color-scheme: light dark;
  --bg: #fbfbfa;
  --surface: #f2f2ef;
  --text: #16181a;
  --muted: #565d64;
  --line: rgba(22, 24, 26, 0.12);
  --accent: #0f766e;          /* filled buttons: white text on it is 5.5:1 */
  --accent-text: #0f766e;     /* links and small accents on --bg */
  --on-accent: #ffffff;
  --safe: #0d6b34;
  --review: #8f5200;
  --careful: #b3201f;
  --code-bg: rgba(22, 24, 26, 0.06);
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.06), 0 18px 40px -18px rgba(0, 0, 0, 0.28);

  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas, monospace;
  --measure: 62ch;
  --gutter: clamp(20px, 5vw, 48px);
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #101214;
    --surface: #17191c;
    --text: #eceff1;
    --muted: #a0a8af;
    --line: rgba(236, 239, 241, 0.14);
    --accent: #0f766e;
    --accent-text: #5eead4;
    --safe: #4ade80;
    --review: #fbbf24;
    --careful: #f87171;
    --code-bg: rgba(236, 239, 241, 0.08);
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 18px 40px -18px rgba(0, 0, 0, 0.7);
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { overflow-x: clip; -webkit-text-size-adjust: 100%; scroll-padding-top: 72px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: var(--accent-text); text-underline-offset: 0.18em; text-decoration-thickness: 0.06em; }
a:hover { text-decoration-thickness: 0.12em; }
:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 4px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute; left: 12px; top: -48px; z-index: 20;
  background: var(--accent); color: var(--on-accent); padding: 10px 14px; border-radius: 8px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Header */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
  backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid var(--line);
}
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; font-size: 1.05rem; }
.brand img { border-radius: 7px; }
nav { display: flex; gap: 22px; }
nav a { color: var(--muted); text-decoration: none; font-size: 0.97rem; }
nav a:hover { color: var(--text); }

/* Type */
h1, h2, h3 { margin: 0; line-height: 1.12; letter-spacing: -0.02em; font-weight: 650; overflow-wrap: break-word; min-width: 0; }
h1 { font-size: clamp(2.5rem, 6.4vw, 4.6rem); letter-spacing: -0.03em; max-width: 14ch; }
h2 { font-size: clamp(1.8rem, 3.8vw, 2.7rem); max-width: 18ch; }
h3 { font-size: 1.2rem; letter-spacing: -0.01em; margin-top: 2.2rem; margin-bottom: 0.6rem; }
p, ul, dl { margin: 0; }
p + p, p + ul, ul + p { margin-top: 1rem; }
h2 + p, h2 + .measure { margin-top: 1.1rem; }
h3 + p, h3 + pre { margin-top: 0; }
code { font-family: var(--mono); font-size: 0.9em; background: var(--code-bg); padding: 0.1em 0.38em; border-radius: 5px; }
.small { font-size: 0.95rem; color: var(--muted); }
.measure { max-width: var(--measure); }

/* Hero */
.hero { padding-block: clamp(48px, 9vw, 104px) clamp(40px, 7vw, 88px); }
.lede { font-size: clamp(1.15rem, 2.2vw, 1.45rem); color: var(--muted); margin-top: 1.1rem; max-width: 34ch; line-height: 1.4; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 1.8rem; margin-bottom: clamp(36px, 6vw, 64px); }
.btn {
  display: inline-flex; align-items: center; min-height: 46px; padding: 0 20px; border-radius: 10px;
  font-weight: 600; font-size: 1rem; text-decoration: none;
  color: var(--text); background: var(--surface); border: 1px solid var(--line);
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn.primary:hover { background: #0b5f58; }
.btn:active { transform: translateY(1px); }

.shot { width: 100%; border-radius: 12px; border: 1px solid var(--line); box-shadow: var(--shadow); background: var(--surface); }
.shot.narrow { max-width: 420px; margin-inline: auto; }

/* Bands: one idea each */
.band { padding-block: clamp(56px, 9vw, 112px); border-top: 1px solid var(--line); }
.band .copy p { max-width: var(--measure); margin-top: 1.1rem; }
.band .copy ul { margin-top: 1.1rem; padding-left: 1.2rem; max-width: var(--measure); }
.band .copy li { margin-top: 0.4rem; }

#explore .wrap { display: grid; gap: clamp(28px, 5vw, 48px); }
.pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
@media (min-width: 880px) { .pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 5vw, 56px); align-items: center; }
@media (min-width: 880px) {
  .split { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
  .split.reverse { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); }
  .split.reverse > .copy { order: 2; }
}

/* Risk labels */
.risks { display: grid; gap: 0; border-top: 1px solid var(--line); }
.risks > div { display: grid; grid-template-columns: 7rem minmax(0, 1fr); gap: 16px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.risks dt { font-weight: 650; }
.risks dd { margin: 0; color: var(--muted); }
.safe { color: var(--safe); } .review { color: var(--review); } .careful { color: var(--careful); }
.stack > .small { margin-top: 1.2rem; }

/* Code */
pre {
  position: relative; margin: 1.1rem 0 0; padding: 16px 18px; padding-right: 84px;
  background: var(--code-bg); border: 1px solid var(--line); border-radius: 10px;
  overflow-x: auto; font-family: var(--mono); font-size: 0.9rem; line-height: 1.65;
}
/* Commands wrap instead of scrolling sideways, so nothing hides under the Copy button. */
pre code { background: none; padding: 0; font-size: inherit; white-space: pre-wrap; overflow-wrap: anywhere; }
.copy-btn {
  position: absolute; top: 10px; right: 10px; min-height: 30px; padding: 0 12px;
  font: inherit; font-size: 0.82rem; font-weight: 600; color: var(--text);
  background: var(--bg); border: 1px solid var(--line); border-radius: 7px; cursor: pointer;
}
.copy-btn:hover { border-color: var(--muted); }

.code-pair { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; margin-top: 1.4rem; }
.code-pair pre { margin: 0; }
@media (min-width: 880px) { .code-pair { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Trust and install */
.facts { list-style: none; padding: 0; margin-top: 1.6rem; display: grid; gap: 0; border-top: 1px solid var(--line); }
.facts li { padding: 16px 0; border-bottom: 1px solid var(--line); max-width: 78ch; }
.facts strong { font-weight: 650; }
@media (min-width: 880px) {
  .facts:not(.plain) { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; }
  .facts:not(.plain) li { max-width: none; }
}
.notes { display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px 28px; margin-top: 0.4rem; }
@media (min-width: 880px) { .notes { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.notes pre { padding-right: 84px; }
.install { background: var(--surface); }
.install pre { background: var(--bg); }

/* Footer */
.foot { padding-block: 40px 56px; border-top: 1px solid var(--line); }
.foot p:first-child { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot .small { margin-top: 14px; }

@media (max-width: 520px) {
  nav { gap: 16px; }
  .risks > div { grid-template-columns: 5.5rem minmax(0, 1fr); }
  pre { font-size: 0.82rem; padding-right: 76px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
