/* AVA ROM Estimator — all brand styling lives here. Adjust the tokens to match avadesigns.us. */
:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --panel-soft: #f1f5f9;
  --text: #0f172a;
  --muted: #475569;
  --line: #e2e8f0;
  --accent: #0f172a;
  --accent-text: #ffffff;
  --ok-bg: #ecfdf5;  --ok-text: #065f46;
  --warn-bg: #fff7ed; --warn-text: #9a3412; --warn-line: #fdba74;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.06);
  --font: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 var(--font); }
.wrap { width: min(1180px, 100% - 32px); margin: 0 auto; padding: 40px 0 64px; }

/* Intro: series guide */
.intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .85fr); gap: 32px; align-items: center; padding: 16px 0 48px; margin-bottom: 40px; border-bottom: 1px solid var(--line); }
.pill { display: inline-block; margin: 0 0 18px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--panel); color: var(--muted); font-size: 14px; box-shadow: var(--shadow); }
.intro h1 { font-size: clamp(32px, 4.2vw, 44px); max-width: 680px; }
.intro .lead { font-size: 18px; line-height: 1.75; }
.points { list-style: none; margin: 24px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.points li { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; font-size: 14px; color: var(--muted); box-shadow: var(--shadow); }
.fit-card { background: var(--panel); border: 1px solid var(--line); border-radius: 30px; padding: 22px; box-shadow: 0 18px 45px rgba(15, 23, 42, .08); }
.fit-inner { border-radius: 24px; padding: 26px; color: #fff; background: linear-gradient(135deg, #0f172a, #1e293b 60%, #334155); }
.eyebrow { margin: 0; font-size: 12px; font-weight: 700; letter-spacing: .22em; text-transform: uppercase; color: #cbd5e1; }
.fit-inner h2 { margin: 10px 0 0; font-size: 24px; line-height: 1.15; letter-spacing: -.02em; }
.fit-list { list-style: none; margin: 20px 0 0; padding: 0; display: grid; gap: 10px; }
.fit-list li { background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .1); border-radius: 16px; padding: 13px 16px; font-size: 14px; line-height: 1.6; color: #e2e8f0; }
.fit-list strong { color: #fff; }

.hero { margin-bottom: 28px; scroll-margin-top: 16px; }
.kicker { margin: 0 0 8px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); }
h1, .hero-title { margin: 0; font-size: clamp(30px, 4.5vw, 46px); line-height: 1.08; letter-spacing: -.03em; }
.hero-title { font-size: clamp(26px, 3.6vw, 38px); }
.lead { max-width: 720px; color: var(--muted); font-size: 17px; margin: 14px 0 0; }
.series-tag { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; background: var(--accent); color: var(--accent-text); }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 24px; align-items: start; }

.rooms { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.room { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.room-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.room-index { font-size: 12px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.room-grid { display: grid; grid-template-columns: 1fr 1.4fr 90px; gap: 12px; }
.room-grid label { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--muted); }
select, input { width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 44px; }
select:focus, input:focus { outline: 2px solid #94a3b8; outline-offset: 1px; }
select:disabled { background: var(--panel-soft); color: #94a3b8; }

.room-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 12px; font-size: 14px; }
.muted { color: var(--muted); }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok-text); }
.badge-warn { background: var(--warn-bg); color: var(--warn-text); }

.room-costs { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.room-costs > div { display: grid; gap: 4px; align-content: start; }
.cost-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.money { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; }
.survey-msg { display: grid; gap: 8px; font-size: 14px; color: var(--warn-text); background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 10px 12px; }

/* Design information (Vendor(s), Display Count, Ideal Use Case, Things to Avoid, Design Description) */
.room-info { display: grid; gap: 12px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }
.facts { display: flex; flex-wrap: wrap; gap: 8px 20px; margin: 0; }
.facts > div { display: flex; align-items: baseline; gap: 8px; }
.facts dt, .info-label { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; }
.chip { display: inline-block; padding: 2px 10px; margin: 0 4px 4px 0; border-radius: 999px; background: var(--panel-soft); border: 1px solid var(--line); font-size: 13px; }
.info-block { display: grid; gap: 4px; }
.info-text { margin: 0; white-space: pre-line; color: var(--text); font-size: 15px; }
.info-avoid { background: var(--warn-bg); border: 1px solid var(--warn-line); border-radius: 12px; padding: 10px 12px; }
.info-avoid .info-label { color: var(--warn-text); }

.design-desc { border: 1px solid var(--line); border-radius: 12px; background: var(--panel-soft); }
.design-desc > summary { cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 14px; font-weight: 600; min-height: 44px; }
.design-desc > summary::-webkit-details-marker { display: none; }
.design-desc > summary::after { content: "+"; font-size: 20px; line-height: 1; color: var(--muted); }
.design-desc[open] > summary::after { content: "–"; }
.design-desc > summary:focus-visible { outline: 2px solid #94a3b8; outline-offset: 2px; border-radius: 12px; }
.desc-body { padding: 14px 16px 16px; background: var(--panel); border-top: 1px solid var(--line); border-radius: 0 0 12px 12px; font-size: 15px; overflow-wrap: break-word; }
.desc-body::after { content: ""; display: block; clear: both; }
.desc-body p { margin: 0 0 10px; }
.desc-body h4 { margin: 18px 0 8px; font-size: 18px; clear: both; }
.desc-body h5 { margin: 16px 0 6px; font-size: 16px; clear: both; }
.desc-body ul, .desc-body ol { padding-left: 22px; margin: 0 0 12px; display: flow-root; }
.desc-body li p { margin: 0 0 4px; }
.desc-body a { color: var(--accent); }
.desc-body hr { border: 0; border-top: 1px solid var(--line); margin: 16px 0; }
.desc-body img, .desc-body video { max-width: 100%; height: auto; border-radius: 10px; }
.desc-body .fig { margin: 8px 0 12px; }
.desc-body .fig-right { float: right; clear: both; margin: 4px 0 12px 16px; max-width: 40%; }
.desc-body .fig-left { float: left; clear: both; margin: 4px 16px 12px 0; max-width: 40%; }
.desc-body figcaption { font-size: 12px; color: var(--muted); margin-top: 4px; }
.desc-body .video-embed { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: 10px; margin: 8px 0 12px; background: #000; }
.desc-status { padding: 12px 16px; color: var(--muted); font-size: 14px; }

.row-actions { display: flex; align-items: center; gap: 16px; margin-top: 16px; }

.summary { position: sticky; top: 16px; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow); display: grid; gap: 12px; }
.summary h2 { margin: 0; font-size: 20px; }
.summary dl { margin: 0; display: grid; gap: 10px; }
.summary dl > div { display: flex; justify-content: space-between; gap: 12px; }
.summary dt { color: var(--muted); }
.summary dd { margin: 0; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.summary .range { padding-top: 10px; border-top: 1px solid var(--line); }
.summary .range dd { font-size: 20px; }
.note-warn { margin: 0; color: var(--warn-text); font-size: 14px; font-weight: 600; }
.note-warn:empty { display: none; }
.fine { margin: 4px 0 0; font-size: 12px; color: var(--muted); }

.btn { display: inline-flex; justify-content: center; align-items: center; min-height: 44px; padding: 10px 16px; border-radius: 12px; border: 1px solid transparent; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.btn-primary { background: var(--accent); color: var(--accent-text); }
.btn-secondary { background: var(--panel); color: var(--text); border-color: var(--line); }
.btn-warn { background: var(--warn-text); color: #fff; }
.btn-small { min-height: 36px; padding: 6px 12px; font-size: 14px; background: var(--warn-text); color: #fff; justify-self: start; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link { background: none; border: 0; padding: 0; color: var(--muted); font: inherit; font-size: 14px; text-decoration: underline; cursor: pointer; }

.status { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-line); border-radius: var(--radius); padding: 16px 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.print-only { display: none; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; gap: 24px; padding-bottom: 36px; margin-bottom: 32px; }
  .layout { grid-template-columns: 1fr; }
  .summary { position: static; }
}
@media (max-width: 560px) {
  .points { grid-template-columns: 1fr; }
  .fit-card { padding: 12px; border-radius: 24px; }
  .fit-inner { padding: 20px; }
  .room-grid { grid-template-columns: 1fr; }
  .room-costs { grid-template-columns: 1fr; }
  .desc-body .fig-right, .desc-body .fig-left { float: none; max-width: 100%; margin: 8px 0 12px; }
}
@media print {
  body { background: #fff; }
  .no-print, .link { display: none !important; }
  .print-only { display: block; color: var(--muted); }
  .layout { grid-template-columns: 1fr; }
  .room, .summary { box-shadow: none; break-inside: avoid; }
  select, input { border: 0; padding: 0; min-height: 0; appearance: none; -webkit-appearance: none; }
}
