/* wardsignal.com (site redesign spec 2, 4): the site's own look. Nothing here comes from the app. */
:root {
  --page: #ffffff; --soft: #f8fafc; --line: #e2e8f0; --line-strong: #cbd5e1;
  --ink: #0f172a; --text: #334155; --muted: #64748b;
  --teal: #0f766e; --teal-dark: #115e59; --teal-tint: #ecfdf5; --mint: #5eead4; --mint-tint: #ccfbf1;
  --orange: #f97316; --orange-strong: #c2410c; --orange-dark: #9a3412; --orange-tint: #fff7ed;
  --navy: #1e3a8a; --navy-tint: #eff6ff;
  --gold-strong: #854d0e; --gold-tint: #fefce8; --cream: #fef3c7;
  --slate: #0f172a; --slate-line: #1e293b; --slate-text: #94a3b8;
  --gradient: linear-gradient(135deg, #ccfbf1 0%, #e0f2fe 55%, #fef3c7 100%);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r: 16px; --r-lg: 24px; --r-pill: 999px;
  --shadow: 0 20px 50px rgba(15, 118, 110, 0.18);
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.08);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 400 16px/1.6 var(--font); color: var(--text); background: var(--page); }
h1, h2, h3 { color: var(--ink); line-height: 1.1; letter-spacing: -0.02em; margin: 0; text-wrap: balance; }
h1 { font-size: 54px; font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: 36px; font-weight: 800; }
h3 { font-size: 18px; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
a { color: var(--teal); }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 48px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -9999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--orange); outline-offset: 2px; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 22px; border-radius: var(--r-pill); font: 700 15px/1 var(--font); text-decoration: none; border: 0; cursor: pointer; }
.btn-cta { background: var(--orange-strong); color: #fff; box-shadow: 0 8px 20px rgba(194, 65, 12, 0.3); }
.btn-cta:hover { background: var(--orange-dark); }
.btn-light { background: #fff; color: var(--teal); box-shadow: var(--shadow-soft); }
.btn-light:hover { background: var(--teal-tint); }
.btn-ghost { background: transparent; color: var(--teal); box-shadow: inset 0 0 0 2px var(--teal); }
.btn[aria-disabled="true"] { cursor: progress; opacity: 0.7; }

/* Top bar */
.top { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 5; }
.top-bar { display: flex; align-items: center; gap: 28px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 19px; color: var(--teal); text-decoration: none; margin-right: auto; }
.top-nav { display: flex; gap: 26px; }
.top-nav a, .top-menu nav a { color: var(--text); font-weight: 600; font-size: 15px; text-decoration: none; }
.top-nav a:hover, .top-nav a[aria-current="page"] { color: var(--teal); }
.top-nav a[aria-current="page"] { box-shadow: 0 2px 0 var(--teal); }
.top-cta { padding: 11px 18px; }
.top-menu { display: none; }
.top-menu summary { list-style: none; cursor: pointer; font-weight: 700; color: var(--teal); padding: 9px 16px; border-radius: var(--r-pill); box-shadow: inset 0 0 0 2px var(--teal); }
.top-menu summary::-webkit-details-marker { display: none; }
.top-menu nav { position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow-soft); display: flex; flex-direction: column; padding: 8px 20px 16px; }
.top-menu nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
.top-menu nav a[aria-current="page"] { color: var(--teal); }

/* Page heads and the home hero */
.page-head, .hero { background: var(--gradient); }
.page-head { padding: 64px 0 56px; }
.page-head .lead { margin-top: 14px; max-width: 680px; }
.eyebrow { color: var(--orange-strong); font-weight: 800; font-size: 13px; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 10px; }
.lead { font-size: 18px; color: var(--text); }
.hero { padding-top: 64px; text-align: center; }
.hero h1 { max-width: 860px; margin: 0 auto 16px; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero .lead { max-width: 660px; margin: 0 auto 28px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.page-head .hero-actions { justify-content: flex-start; margin-top: 24px; }
.hero-demo { max-width: 1040px; margin: 44px auto 0; background: #fff; border-radius: var(--r) var(--r) 0 0; box-shadow: 0 -10px 50px rgba(15, 118, 110, 0.22); padding: 20px 20px 16px; text-align: left; }

/* Statistics */
.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); }
.stat { margin: 0; padding: 32px 48px; color: #fff; }
.stat[data-tone="teal"] { background: var(--teal); }
.stat[data-tone="orange"] { background: var(--orange-strong); }
.stat[data-tone="navy"] { background: var(--navy); }
.stat-figure { font-size: 40px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.05; margin-bottom: 10px; color: #fff; }
.stat figcaption { font-size: 15px; line-height: 1.5; }
.stat a { color: #fff; font-size: 13px; display: inline-block; margin-top: 8px; }

/* Sections, tiles, steps */
.section { padding: 72px 0; }
.section-tint { background: var(--soft); }
.section > .wrap > h2 { margin-bottom: 12px; }
.section > .wrap > .lead { margin-bottom: 32px; color: var(--muted); }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.tiles-3 { grid-template-columns: repeat(3, 1fr); }
.section > .wrap > h2 + :is(.tiles, .checklist, .qa) { margin-top: 24px; }
.tile { border-radius: var(--r); padding: 26px; font-size: 15px; line-height: 1.55; }
.tile h3 { margin: 16px 0 8px; }
.tile-icon { width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center; color: #fff; box-shadow: 0 8px 18px rgba(15, 23, 42, 0.14); }
.tile[data-tone="teal"] { background: var(--teal-tint); } .tile[data-tone="teal"] .tile-icon { background: var(--teal); }
.tile[data-tone="orange"] { background: var(--orange-tint); } .tile[data-tone="orange"] .tile-icon { background: var(--orange-strong); }
.tile[data-tone="navy"] { background: var(--navy-tint); } .tile[data-tone="navy"] .tile-icon { background: var(--navy); }
.tile[data-tone="gold"] { background: var(--gold-tint); } .tile[data-tone="gold"] .tile-icon { background: var(--gold-strong); }
.more { display: inline-block; margin-top: 26px; font-weight: 700; text-decoration: none; }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); background: var(--slate); border-radius: var(--r-lg); overflow: hidden; }
.steps li { padding: 32px; color: var(--slate-text); font-size: 15px; line-height: 1.55; }
.steps li + li { border-left: 1px solid var(--slate-line); }
.steps h3 { color: #fff; margin: 6px 0 10px; }
.step-icon { color: var(--mint); display: block; margin-bottom: 12px; }
.step-n { color: var(--mint); font-weight: 800; font-size: 13px; }
.notes { list-style: none; margin: 32px 0 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 14px 32px; }
.notes li { display: flex; gap: 12px; align-items: flex-start; }
.notes svg { flex: none; color: var(--teal); margin-top: 2px; }

/* The pilot band */
.band { border-radius: var(--r-lg); padding: 48px; background: linear-gradient(120deg, var(--teal), #0e7490); color: #fff; display: grid; grid-template-columns: 1.3fr 1fr; gap: 36px; align-items: center; }
.band-solo { grid-template-columns: 1fr; }
.band h2 { color: #fff; margin-bottom: 12px; }
.band p { color: var(--mint-tint); font-size: 17px; margin-bottom: 26px; }
.checklist { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist svg { flex: none; color: var(--teal); margin-top: 2px; }
.band .checklist svg, .card[data-tone="teal"] .checklist svg { color: var(--cream); }

/* Samples, two-card blocks */
.samples { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.sample { margin: 0; background: #fff; border-radius: var(--r); box-shadow: var(--shadow-soft); overflow: hidden; }
.sample a { display: block; }
.sample img { display: block; width: 100%; }
.sample figcaption { padding: 14px 18px; font-weight: 700; color: var(--ink); }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.cards-2 + .hero-actions { margin-top: 32px; }
.card { border-radius: var(--r-lg); padding: 32px; }
.card[data-tone="teal"] { background: var(--teal); color: #fff; } .card[data-tone="teal"] h2 { color: #fff; }
.card[data-tone="cream"] { background: var(--cream); color: var(--ink); }
.card h2 { font-size: 26px; margin-bottom: 18px; }

/* Request page */
.req { display: grid; grid-template-columns: 1fr 1.25fr; gap: 56px; align-items: start; }
.next { list-style: none; margin: 30px 0 0; padding: 0; display: grid; gap: 16px; counter-reset: next; }
.next li { display: flex; gap: 14px; align-items: flex-start; counter-increment: next; }
.next li::before { content: counter(next); flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--orange-strong); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 14px; }
.form-card { background: #fff; border-radius: var(--r-lg); padding: 32px; box-shadow: var(--shadow); }
.form-card form { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { display: grid; gap: 6px; }
.field-wide { grid-column: 1 / -1; }
.field label, .pills legend { font-size: 13px; font-weight: 700; color: var(--ink); }
.field input, .field textarea { font: inherit; padding: 11px 13px; border: 1.5px solid var(--line-strong); border-radius: 10px; background: var(--soft); color: var(--ink); width: 100%; }
.field textarea { min-height: 120px; resize: vertical; }
.field input:focus, .field textarea:focus { border-color: var(--teal); background: #fff; }
[aria-invalid="true"] { border-color: var(--orange-strong) !important; }
.field-error, .form-error { color: var(--orange-strong); font-size: 13px; font-weight: 600; min-height: 0; }
.pills { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.pills legend { margin-bottom: 6px; width: 100%; }
.pills input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pills label { padding: 9px 18px; border-radius: var(--r-pill); border: 1.5px solid var(--line-strong); font-weight: 600; font-size: 14px; cursor: pointer; }
.pills input:checked + label { background: var(--teal); border-color: var(--teal); color: #fff; }
.pills input[aria-invalid="true"] + label { border-color: var(--orange-strong); }
.pills input:focus-visible + label { outline: 3px solid var(--orange); outline-offset: 2px; }
.pills .field-error { width: 100%; }
.consent { font-size: 13px; color: var(--muted); }
.hp { position: absolute; left: -9999px; }
.done { background: #fff; border-radius: var(--r-lg); padding: 40px; box-shadow: var(--shadow); }
.done h2 { margin-bottom: 10px; }

/* Pricing */
.qa { display: grid; gap: 22px; max-width: 820px; }
.qa h3 { margin-bottom: 6px; }
.price-table { width: 100%; border-collapse: collapse; }

/* The no-JavaScript answer page (backend html_page) */
.answer { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: var(--gradient); }
.answer-card { background: #fff; border-radius: var(--r-lg); padding: 44px; max-width: 560px; box-shadow: var(--shadow); }
.answer-card h1 { font-size: 36px; margin-bottom: 12px; }
.answer-card p + p { margin-top: 22px; }

/* Footer */
.foot { background: var(--slate); color: var(--slate-text); margin-top: 0; }
.foot-bar { display: flex; flex-wrap: wrap; gap: 24px; align-items: center; padding-top: 30px; padding-bottom: 30px; font-size: 14px; }
.foot-brand { color: #fff; font-weight: 800; margin-right: auto; }
.foot nav { display: flex; flex-wrap: wrap; gap: 22px; }
.foot a { color: var(--slate-text); text-decoration: none; }
.foot a:hover { color: #fff; }

/* The hero demo (site redesign spec 5): drawn in the app's look; colours from frontend/src/theme/tokens.css. */
.demo { margin: 0; }
.demo-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.demo-title { font-weight: 700; color: var(--ink); }
.demo-clock { font-weight: 800; font-size: 22px; color: var(--ink); font-variant-numeric: tabular-nums; }
.demo-body { display: grid; grid-template-columns: 1fr 260px; gap: 16px; align-items: start; }
.demo-plan { width: 100%; height: auto; display: block; }
.demo-corridor { fill: #f1f4f8; }
.demo-station rect { fill: #ffffff; stroke: #6b7a90; stroke-width: 1; }
.demo-station text { font: 600 11px var(--font); fill: #4d5a6c; text-anchor: middle; }
.demo-room .demo-wall { fill: #ffffff; stroke: #6b7a90; stroke-width: 1.5; }
.demo-room.is-amber .demo-wall { fill: #fbe3a6; }
.demo-room.is-red .demo-wall { fill: #f6c4c4; stroke: #c43a3a; stroke-width: 2.5; }
.demo-bed { fill: #ffffff; stroke: #7c8ba3; stroke-width: 1.2; }
.demo-pillow { fill: #e3e8ef; }
.demo-label { font: 700 14px var(--font); fill: #0f1b2d; }
.demo-iso { font: 700 11px var(--font); fill: #4d5a6c; text-anchor: end; }
.demo-tag-box { fill: #d13b3b; }
.demo-tag.is-warning .demo-tag-box { fill: #e0a526; }
.demo-tag-text { font: 800 11px var(--font); fill: #ffffff; text-anchor: middle; }
.demo-tag.is-warning .demo-tag-text { fill: #0f1b2d; }
.demo-badge-disc { stroke: #ffffff; stroke-width: 1.5; }
.demo-badge-nurse .demo-badge-disc { fill: #0b5fa5; }
.demo-badge-charge .demo-badge-disc { fill: #0b3b66; }
.demo-badge-patient .demo-badge-disc { fill: #12836e; }
.demo-badge-cross { stroke: #ffffff; stroke-width: 2.6; stroke-linecap: round; fill: none; }
.demo-badge-dot { fill: #e0a526; stroke: #ffffff; stroke-width: 1.2; }
.demo-badge-mark { fill: #ffffff; }
.demo-badge-seam { stroke: #12836e; stroke-width: 1.1; }
.demo-cards { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.demo-card { border-radius: 10px; padding: 10px 12px; border-left: 4px solid #d13b3b; background: #fdecec; font-size: 13px; line-height: 1.4; color: #0f1b2d; }
.demo-card.is-warning { border-left-color: #a36c00; background: #fff6e5; }
.demo-card-sev { font-size: 11px; font-weight: 800; letter-spacing: 0.06em; color: #c02b2b; }
.demo-card.is-warning .demo-card-sev { color: #8a5a00; }
.demo-card-title { font-weight: 700; }
.demo-card-room { color: #5b6b80; font-size: 12px; }
.demo-card-answered { margin-top: 2px; font-size: 12px; font-weight: 700; color: #0f1b2d; }
.demo-caption { margin: 12px 0; min-height: 3em; color: var(--text); }
.demo-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.demo-controls[hidden] { display: none; }
/* No JavaScript, or the night failed to load: only the title and the caption remain (no empty plan, no dead buttons).
   While it loads (is-loading, set by demo.js) everything keeps its space but is invisible, so the hero does not jump. */
.demo:not(.is-ready):not(.is-loading) :is(.demo-body, .demo-clock, .demo-controls, .demo-legend),
.demo.is-failed :is(.demo-body, .demo-clock, .demo-controls, .demo-legend) { display: none; }
.demo.is-loading:not(.is-ready) :is(.demo-body, .demo-clock, .demo-controls, .demo-legend) { visibility: hidden; }
.demo-play { background: var(--teal); color: #fff; }
.demo-play:hover { background: var(--teal-dark); }
.demo-notes { margin: 12px 0 0; padding-left: 20px; font-size: 14px; }
.demo-legend { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 13px; color: var(--text); }
.demo-legend li { display: flex; align-items: center; gap: 6px; }
.demo-key-badge { display: block; flex: none; }
.demo-key { display: block; width: 16px; height: 12px; border-radius: 2px; }
.demo-key-warning { background: #fbe3a6; border: 1px solid #6b7a90; }
.demo-key-critical { background: #f6c4c4; border: 1.5px solid #c43a3a; }

@media (max-width: 1023px) {
  .demo-body { grid-template-columns: 1fr; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
  .tiles-3 { grid-template-columns: repeat(3, 1fr); }
  .stat { padding: 28px 28px; }
  .stat-figure { font-size: 32px; }
  .form-card form { grid-template-columns: 1fr; }
  .req { gap: 32px; }
}

@media (max-width: 759px) {
  h1 { font-size: 38px; }
  h2 { font-size: 28px; }
  .wrap { padding-left: 20px; padding-right: 20px; }
  .top-bar { gap: 12px; min-height: 64px; }
  .top-nav, .top-cta { display: none; }
  .top-menu { display: block; }
  .page-head, .hero { padding-top: 44px; }
  .stats-grid, .tiles, .tiles-3, .steps, .notes, .band, .samples, .cards-2, .req, .form-card form { grid-template-columns: 1fr; }
  .stat { padding: 26px 20px; }
  .steps li + li { border-left: 0; border-top: 1px solid var(--slate-line); }
  .band, .card, .form-card, .done, .answer-card { padding: 26px 20px; }
  .hero-demo { padding: 12px; }
  .demo-body { grid-template-columns: 1fr; }
  /* The plan draws at about half scale on a phone: larger text keeps room labels at about 11 px. */
  .demo-plan { overflow: visible; }
  .demo-label { font-size: 24px; }
  .demo-iso { font-size: 18px; }
  .demo-tag-pill { transform: scale(1.5); }
  .demo-station-desk { transform: scale(1.3); }
  .section { padding: 52px 0; }
}
