/* The hard drive failure calculator (/hard-drive-failure-calculator/). Builds on
   style.css and landing.css.
   Spec: docs/BACKUP-ODDS.md. */

.odds-hero { padding-bottom: 18px; }
.odds-hero .lede { max-width: 70ch; }
.odds-hero { grid-template-columns: 1fr; grid-template-areas: "eyebrow" "lede" "title"; }
.odds-hero .odds-eyebrow { grid-area: eyebrow; margin: 0; }

.odds { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; padding-bottom: 28px; }
.odds-result { position: sticky; top: 16px; }
@media (max-width: 900px) {
  .odds { grid-template-columns: minmax(0, 1fr); }
  .odds-result { position: static; }
}
.odds .panel-head { justify-content: flex-start; }

/* 01 copies */
.setups { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-bottom: 14px; }
.setups-label { font: 12px var(--mono); color: var(--muted); margin-right: 2px; }
/* Trial colour for the random button (owner, 2026-11-10): a warm yellow,
   darker on paper so it stays readable, brighter on the dark theme. */
:root { --dice: #8a6100; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --dice: #e7b64a; } }
:root[data-theme="dark"] { --dice: #e7b64a; }
.chip-random { border-style: dashed; border-color: color-mix(in srgb, var(--dice) 60%, transparent); color: var(--dice); }
.chip-random:hover { border-color: var(--dice); }
.copies { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; }
.copy { border: 1px solid var(--rule); border-radius: 3px; padding: 10px 12px; background: var(--paper); }
.copy-head { display: flex; align-items: center; gap: 10px; }
.copy-n { font: 600 11px var(--mono); letter-spacing: .1em; color: var(--muted); white-space: nowrap; }
.copy-head select, .kind-fixed { flex: 1; min-width: 0; font: 500 14px var(--sans); color: var(--ink); }
.copy-head select { background: var(--card); border: 1px solid var(--rule-strong); border-radius: 2px; padding: 6px 8px; }
.kind-fixed { padding: 6px 0; }
.remove { flex: none; width: 30px; height: 30px; border: 1px solid var(--rule-strong); border-radius: 3px; background: transparent; color: var(--muted); font: 16px var(--mono); cursor: pointer; }
.remove:hover { color: var(--signal); border-color: var(--signal); }
.copy select, .copy input { min-width: 0; max-width: 100%; }
.copy-fields { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr)); gap: 8px 10px; margin-top: 10px; }
.copy-fields .field.check { align-self: end; padding-bottom: 7px; }
.copy [hidden] { display: none; }
.add-copy { margin-top: 12px; width: 100%; border-style: dashed; border-color: var(--rule-strong); color: var(--muted); }
.add-copy:not(:disabled):hover { color: var(--ink); border-color: var(--ink); }
.source-note { margin-top: 12px; line-height: 1.5; }
.source-note a { color: var(--ink); }
.explain dl { margin: 10px 0 0; font-size: 13.5px; line-height: 1.5; }
.explain dt { font: 600 12px var(--mono); margin-top: 10px; }
.explain dt:first-child { margin-top: 0; }
.explain dd { margin: 2px 0 0; color: var(--muted); }
.risks[hidden] { display: none; }
.risks .grid2 { margin-top: 8px; }
@media (max-width: 520px) { .risks .grid2 { grid-template-columns: 1fr; } }

/* 04 result */
.headline { margin-bottom: 14px; }
.big { font: 600 clamp(34px, 5vw, 46px)/1.05 var(--mono); color: var(--signal); letter-spacing: -.02em; }
.big.low { color: var(--green); }
.one-in { font: 500 16px var(--mono); margin-top: 4px; }
.scope { font: 12px var(--mono); color: var(--muted); margin-top: 6px; }
.estimate-note { font-size: 12.5px; line-height: 1.45; color: var(--muted); margin: 6px 0 0; }
.estimate-note a { color: var(--muted); }
.dots { margin: 0 0 18px; display: flex; gap: 14px; align-items: center; }
.dots canvas { width: 120px; height: 120px; flex: none; image-rendering: pixelated; border: 1px solid var(--rule-strong); }
.dots figcaption { font: 12.5px/1.5 var(--mono); color: var(--muted); }
.help-title { font: 600 15px var(--sans); margin: 0 0 8px; padding-top: 14px; border-top: 1px solid var(--rule); }
.help { margin: 0 0 6px; padding-left: 20px; display: grid; gap: 8px; }
.help li { font-size: 14.5px; line-height: 1.45; }
.help .gain { display: block; font: 12.5px var(--mono); color: var(--green); }
.help-none[hidden], .breakdown[hidden] { display: none; }
.breakdown { margin-top: 14px; }
.breakdown ul { margin: 0; padding-left: 18px; font-size: 14px; }
.breakdown li { margin-bottom: 4px; }
.breakdown b { font-family: var(--mono); font-weight: 500; }
.share { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--rule); }
.share .btn { padding: 8px 12px; font-size: 13px; }
.share .hint { margin: 0; }

/* notes under the calculator */
.odds-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 8px 0 44px; }
@media (max-width: 900px) { .odds-notes { grid-template-columns: 1fr; } }
.odds-notes .card { background: var(--card); border: 1px solid var(--rule-strong); border-radius: 3px; padding: 16px 18px; }
.odds-notes h2 { font: 600 17px/1.25 var(--sans); margin: 6px 0 8px; }
.odds-notes p, .odds-notes li { font-size: 14.5px; line-height: 1.6; color: var(--ink); }
.odds-notes p { margin: 0 0 10px; }
.odds-notes ul { margin: 0; padding-left: 18px; }
.odds-notes li { margin-bottom: 6px; }

/* 03 other risks: one row per risk, the value beside its name, the source under it */
.risk-rows { display: grid; gap: 12px; margin-top: 12px; }
.risk-row { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; align-items: center; padding-bottom: 10px; border-bottom: 1px solid var(--rule); }
.risk-row:last-child { border-bottom: 0; padding-bottom: 0; }
.risk-name { font: 600 14px var(--sans); }
.risk-input { font: 12px var(--mono); color: var(--muted); white-space: nowrap; }
.risk-input input { width: 76px; font: 13px var(--mono); color: var(--ink); background: var(--paper); border: 1px solid var(--rule-strong); border-radius: 2px; padding: 5px 6px; }
.risk-row small { grid-column: 1 / -1; font-size: 12.5px; line-height: 1.45; color: var(--muted); }

/* The bridge from these odds to bit rot, at the foot of the result */
.rot-note { margin: 16px 0 0; padding: 10px 12px; border-left: 3px solid var(--signal); background: color-mix(in srgb, var(--signal) 6%, transparent); font-size: 13.5px; line-height: 1.5; }
.rot-note a { color: var(--ink); white-space: nowrap; }

/* Sources, at the foot of the page */
.odds-sources { max-width: 80ch; padding: 0 0 48px; }
.odds-sources h2 { font: 600 19px var(--sans); margin: 0 0 6px; }
.odds-sources ol { margin: 12px 0; padding-left: 22px; display: grid; gap: 10px; }
.odds-sources li { font-size: 14.5px; line-height: 1.5; }
.odds-sources li a { color: var(--ink); font-weight: 500; }
.odds-sources li span { display: block; color: var(--muted); font-size: 13.5px; }
