/* Home Outage Plan — V0 styles
   Direction: the circuit directory inside a breaker-panel door. Steel base, signage type,
   utility green for "on", amber only for safety warnings, red only for exclusions. */

:root {
  --steel: #dfe4e2;
  --steel-deep: #c9d1ce;
  --card: #ffffff;
  --ink: #14202d;
  --ink-2: #46535f;
  --line: #b7c1be;
  --on: #1d6a50;
  --on-ink: #ffffff;
  --on-tint: #dcece5;
  --caution: #a86a00;
  --caution-tint: #fdf0cf;
  --stop: #a3261c;
  --stop-tint: #f7e0dc;
  --focus: #1d4ed8;

  --sign: "DIN Alternate", "Bahnschrift", "D-DIN", "Roboto Condensed", "Arial Narrow", "Helvetica Neue", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --measure: 68ch;
  --r: 6px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--steel);
  color: var(--ink);
  font: 400 17px/1.55 var(--text);
}
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--on); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--measure); }

/* Header */
.site-head { background: var(--ink); color: #fff; }
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.wordmark { font: 700 21px/1 var(--sign); color: #fff; text-decoration: none; letter-spacing: 0.01em; }
.wordmark:hover { color: #fff; }
.site-nav { display: flex; gap: 18px; flex-wrap: wrap; }
.site-nav a { color: #d8e2df; text-decoration: none; font-size: 15px; }
.site-nav a:hover { color: #fff; text-decoration: underline; }

/* Headings */
h1, h2, h3 { font-family: var(--sign); line-height: 1.12; margin: 0 0 0.4em; font-weight: 700; }
h1 { font-size: clamp(34px, 5.4vw, 54px); letter-spacing: -0.01em; max-width: 18ch; }
h2 { font-size: 28px; }
h3 { font-size: 21px; }
p { margin: 0 0 1em; }
.lede { font-size: 19px; color: var(--ink-2); max-width: 58ch; }

/* Hero */
.hero { padding: 48px 0 28px; }

/* Planner */
.planner { display: grid; gap: 22px; padding-bottom: 40px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 22px 22px 18px; }
.step-head { display: flex; gap: 14px; align-items: baseline; margin-bottom: 12px; }
.step-num { font: 700 15px/1 var(--sign); background: var(--ink); color: #fff; border-radius: 3px; padding: 6px 8px; flex: none; }
.step-head h2 { font-size: 23px; margin: 0; }
.hint { color: var(--ink-2); font-size: 15px; margin: 0 0 14px; }

/* The panel directory: numbered slots like a breaker card, each with a switch */
.panel { display: grid; grid-template-columns: 1fr 1fr; border: 2px solid var(--ink); border-radius: 4px; background: var(--steel-deep); gap: 2px; }
@media (max-width: 720px) { .panel { grid-template-columns: 1fr; } }
.slot { display: grid; grid-template-columns: 34px 1fr auto; align-items: center; gap: 10px; background: var(--card); padding: 10px 12px; min-height: 58px; cursor: pointer; }
.slot-no { font: 700 14px/1 var(--sign); color: var(--ink-2); text-align: right; }
.slot-label { font-size: 16px; line-height: 1.25; }
.slot-label small { display: block; color: var(--ink-2); font-size: 13px; margin-top: 2px; }
.slot.is-on { background: var(--on-tint); }
.slot input[type=checkbox] { position: absolute; opacity: 0; width: 1px; height: 1px; }
.breaker { width: 44px; height: 24px; border-radius: 3px; background: #8d9894; position: relative; flex: none; transition: background .15s; }
.breaker::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; background: #fff; border-radius: 2px; transition: transform .15s; }
.slot.is-on .breaker { background: var(--on); }
.slot.is-on .breaker::after { transform: translateX(20px); }
.slot:focus-within { outline: 3px solid var(--focus); outline-offset: -3px; }
.slot-confirm { grid-column: 2 / -1; font-size: 13px; color: var(--caution); }
.watts-in { display: flex; align-items: center; gap: 6px; font-size: 14px; color: var(--ink-2); grid-column: 2 / -1; flex-wrap: wrap; }
.watts-in input { width: 84px; font: inherit; padding: 6px 8px; border: 1px solid var(--line); border-radius: 4px; }

.subpanel { margin-top: 18px; }
.subpanel h3 { font-size: 18px; margin-bottom: 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.chip { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 4px; padding: 8px 12px; background: #fff; font-size: 15px; cursor: pointer; }
.chip input { accent-color: var(--on); width: 18px; height: 18px; }

.choices { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.choice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--r); padding: 12px 14px; cursor: pointer; background: #fff; }
.choice input { margin-top: 3px; accent-color: var(--on); width: 18px; height: 18px; flex: none; }
.choice:has(input:checked) { border-color: var(--on); box-shadow: inset 0 0 0 1px var(--on); background: var(--on-tint); }
.choice span small { display: block; color: var(--ink-2); font-size: 14px; }
fieldset { border: 0; padding: 0; margin: 0 0 16px; }
legend { font-weight: 600; margin-bottom: 8px; }
select { font: inherit; padding: 8px 10px; border-radius: 4px; border: 1px solid var(--line); background: #fff; }

.totals { display: flex; gap: 28px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px dashed var(--line); }
.total b { display: block; font: 700 26px/1.1 var(--sign); }
.total span { color: var(--ink-2); font-size: 14px; }

.btn { display: inline-block; font: 700 18px/1 var(--sign); background: var(--on); color: var(--on-ink); border: 0; border-radius: 4px; padding: 15px 22px; cursor: pointer; text-decoration: none; }
.btn:hover { background: #155540; color: #fff; }
.btn-quiet { background: transparent; color: var(--ink); border: 2px solid var(--ink); padding: 12px 18px; font-size: 16px; }
.btn-quiet:hover { background: var(--ink); color: #fff; }
.form-error { color: var(--stop); font-weight: 600; margin-top: 10px; }

/* Notices */
.notice { border-left: 6px solid var(--ink); background: #fff; padding: 14px 18px; border-radius: 0 var(--r) var(--r) 0; margin: 0 0 14px; }
.notice h3 { font-size: 18px; margin-bottom: 6px; }
.notice p:last-child { margin-bottom: 0; }
.notice.caution { border-color: var(--caution); background: var(--caution-tint); }
.notice.stop { border-color: var(--stop); background: var(--stop-tint); }
.notice.info { border-color: var(--on); }
.disclaimer { font-size: 15px; color: var(--ink-2); background: #fff; border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; margin-bottom: 18px; }

/* Results */
.results { padding: 8px 0 48px; }
.result-cards { display: grid; gap: 16px; }
.rcard { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 20px 22px; display: grid; grid-template-columns: 64px 1fr; gap: 0 18px; }
.rcard-rank { font: 700 44px/1 var(--sign); color: var(--ink); }
@media (max-width: 560px) {
  .rcard { grid-template-columns: 1fr; padding: 18px 16px; }
  .rcard-rank { font-size: 30px; margin-bottom: 4px; }
  .step { padding: 18px 14px 14px; }
}
.rcard.is-excluded, .rcard.is-nomatch { background: #f3f5f4; }
.rcard.is-excluded .rcard-rank, .rcard.is-nomatch .rcard-rank { color: #8d9894; }
.archetype { font: 700 16px/1.2 var(--sign); color: var(--on); margin: 4px 0 2px; }
.rcard.is-excluded .archetype { color: var(--stop); }
.rcard.is-nomatch .archetype { color: var(--ink-2); }
.rcard h3.verdict { font-size: 26px; margin: 2px 0 6px; }
.rcard.is-excluded h3.verdict { color: var(--stop); font-size: 21px; }
.rcard.is-nomatch h3.verdict { color: var(--ink-2); font-size: 21px; }
.summary { font-size: 18px; line-height: 1.45; margin: 0 0 6px; max-width: 60ch; }
.evidence-h { font: 700 15px/1.2 var(--sign); color: var(--ink-2); margin: 16px 0 8px; padding-top: 12px; border-top: 1px solid var(--line); }
.rcard h4 { font: 700 21px/1.15 var(--sign); margin: 0 0 8px; }
.fit { list-style: none; padding: 0; margin: 0 0 12px; }
.fit li { padding-left: 26px; position: relative; margin-bottom: 4px; font-size: 15.5px; }
.fit li::before { content: ""; position: absolute; left: 4px; top: 7px; width: 12px; height: 7px; border-left: 2.5px solid var(--on); border-bottom: 2.5px solid var(--on); transform: rotate(-45deg); }
.specline { display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: 14.5px; color: var(--ink-2); margin: 0 0 14px; }
.specline b { color: var(--ink); font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: 10px 16px; align-items: center; }
.actions .btn { font-size: 16px; padding: 12px 16px; }
.small { font-size: 14px; color: var(--ink-2); }
.pair { border-top: 1px dashed var(--line); margin-top: 14px; padding-top: 14px; }
.also { margin-top: 12px; font-size: 14.5px; color: var(--ink-2); }

/* Content pages */
.page { padding: 40px 0 56px; }
.page h1 { font-size: clamp(30px, 4.4vw, 44px); max-width: 22ch; }
.page h2 { margin-top: 1.4em; font-size: 24px; }
.page ul, .page ol { padding-left: 1.3em; }
.page li { margin-bottom: 0.4em; }
table { border-collapse: collapse; width: 100%; background: #fff; font-size: 15px; margin: 0 0 1.4em; }
th, td { text-align: left; padding: 9px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: var(--sign); font-size: 15px; background: var(--steel-deep); }
.table-scroll { overflow-x: auto; }
.status { font-size: 13px; padding: 2px 7px; border-radius: 3px; background: var(--on-tint); white-space: nowrap; }
.status.derived { background: var(--caution-tint); }
.status.not-published { background: #eceeed; }

/* Footer */
.site-foot { background: var(--ink); color: #c9d3d0; font-size: 14.5px; padding: 32px 0 40px; }
.site-foot a { color: #fff; }
.site-foot .cols { display: flex; flex-wrap: wrap; gap: 12px 26px; margin: 12px 0 16px; }
.site-foot p { max-width: 80ch; }

/* Printable Outage Plan */
.plan-print { display: none; }
@media print {
  body { background: #fff; font-size: 12pt; }
  .site-head, .site-foot, .hero, .planner, .no-print, .results { display: none !important; }
  .plan-print { display: block; color: #000; }
  .plan-print h1 { font-size: 22pt; max-width: none; }
  .plan-print h2 { font-size: 14pt; margin-top: 14pt; }
  .plan-print table { font-size: 10.5pt; }
  .plan-print th { background: #eee; }
  a { color: #000; }
}

@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
