/* courtcommand.com. Navy and scoreboard amber; system fonts; no external resources. */
:root {
    --navy: #0f1f3d; --navy-2: #172b52; --amber: #e8a317; --amber-ink: #1a1200;
    --ink: #17202e; --muted: #5b6579; --line: #d9deea; --bg: #f6f7fb; --card: #ffffff;
    --heading: "Arial Narrow", "Roboto Condensed", "Segoe UI", Arial, sans-serif;
    --body: "Segoe UI", Roboto, system-ui, -apple-system, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: var(--body); color: var(--ink); background: var(--bg); line-height: 1.6; font-size: 17px; }
h1, h2, h3 { font-family: var(--heading); color: var(--navy); line-height: 1.15; letter-spacing: .01em; }
h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 0 0 .4em; text-transform: uppercase; }
h2 { font-size: 1.6rem; margin: 1.6em 0 .4em; }
h3 { font-size: 1.15rem; margin: 0 0 .3em; }
a { color: #0b5cad; }
img { max-width: 100%; height: auto; }
code { background: rgba(15, 31, 61, .07); padding: 1px 5px; border-radius: 4px; font-size: .92em; }
small { color: var(--muted); }

/* Header */
.site-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 20px; padding: 10px clamp(14px, 4vw, 36px); background: var(--navy); }
.brand { font-family: var(--heading); font-weight: 800; font-size: 1.45rem; letter-spacing: .06em; text-transform: uppercase; color: #fff; text-decoration: none; white-space: nowrap; }
.brand span { color: var(--amber); font-size: .7em; vertical-align: super; }
.site-header nav { display: flex; align-items: center; gap: 4px; margin-left: auto; flex-wrap: wrap; }
.site-header nav a { color: #dbe4f5; text-decoration: none; padding: 8px 12px; border-radius: 8px; font-size: .95rem; }
.site-header nav a:hover, .site-header nav a.active { background: var(--navy-2); color: #fff; }
.site-header nav a.pill { background: var(--amber); color: var(--amber-ink); font-weight: 700; margin-left: 6px; }
.nav-toggle, .nav-button { display: none; }
@media (max-width: 1300px) { .site-header nav a { padding: 8px 8px; font-size: .9rem; } }
@media (max-width: 1140px) {
    .nav-button { display: block; margin-left: auto; color: #fff; border: 1px solid #5d6f96; border-radius: 8px; padding: 6px 14px; cursor: pointer; }
    .site-header { flex-wrap: wrap; }
    .site-header nav { display: none; width: 100%; flex-direction: column; align-items: stretch; margin: 0; }
    .nav-toggle:checked ~ nav { display: flex; }
    .site-header nav a.pill { margin: 6px 0 0; text-align: center; }
}

/* Page body */
main { width: min(880px, calc(100vw - 32px)); margin: 0 auto; padding: 36px 0 56px; }
main.wide { width: min(1500px, calc(100vw - 32px)); padding-top: 24px; }
.lead { font-size: 1.2rem; color: #2c3850; }
.narrow { max-width: 760px; margin-left: auto; margin-right: auto; }
.center { text-align: center; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 1.2em; }
.actions.center { justify-content: center; }
.button { display: inline-block; background: var(--navy); color: #fff; text-decoration: none; border: 2px solid var(--navy); border-radius: 999px; padding: 11px 24px; font-size: 1rem; font-weight: 700; cursor: pointer; font-family: var(--body); }
.button:hover { background: var(--navy-2); }
.button.ghost { background: transparent; color: var(--navy); }
.button.amber { background: var(--amber); border-color: var(--amber); color: var(--amber-ink); }
.login { max-width: 520px; }
.login .cc-form { margin: 18px 0 8px; }
.badge { display: inline-block; background: var(--amber); color: var(--amber-ink); font-weight: 800; letter-spacing: .08em; text-transform: uppercase; font-size: .85rem; padding: 5px 14px; border-radius: 999px; margin: 0 0 4px; }
.button.ghost.on-dark { color: #fff; border-color: #fff; }
.button.small { padding: 6px 14px; font-size: .88rem; }
.disclaimer { border-left: 4px solid var(--amber); background: rgba(15, 31, 61, .05); padding: 10px 14px; font-size: .92rem; border-radius: 4px; }
.steps li { margin-bottom: 8px; }
.columns { columns: 3 140px; }
.nowrap { white-space: nowrap; }

/* Home */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 36px; align-items: center; margin-bottom: 36px; }
.hero img { border-radius: 18px; box-shadow: 0 10px 30px rgba(15, 31, 61, .2); }
.hero h1 { font-size: clamp(2.3rem, 5.4vw, 4.2rem); }
.band { background: var(--navy); color: #e8eefc; border-radius: 18px; padding: 34px clamp(18px, 4vw, 44px); margin: 36px 0; }
.band h2 { color: #fff; margin-top: 0; text-align: center; text-transform: uppercase; font-size: 1.9rem; }
.band p { text-align: center; }
.band a { color: #ffd166; }
.band.light { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.band.light h2 { color: var(--navy); }
.band.light a { color: #0b5cad; }
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.cards > div { background: var(--navy-2); border-radius: 14px; padding: 18px 20px; }
.cards h3 { color: var(--amber); text-transform: uppercase; }
.cards p { margin: 0; text-align: left; }
.cards.light > div { background: #fff; border: 1px solid var(--line); }
.cards.light h3 { color: var(--navy); }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 36px; align-items: center; margin: 44px 0; }
.split img { border-radius: 18px; box-shadow: 0 8px 24px rgba(15, 31, 61, .16); }
.split h2 { margin-top: 0; }
.split img.tall { max-height: 560px; width: auto; justify-self: center; }
.split.buy { align-items: start; margin-top: 16px; }
.split.buy h2 { margin-top: 1.2em; }

/* The controller's own pages, live, in phone frames (/setup) */
.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin: 20px 0 28px; }
.shot { margin: 0; }
.shot .phone { width: 273px; height: 518px; margin: 10px auto 0; border-radius: 20px; overflow: hidden; background: #f0f0f0; box-shadow: 0 0 0 8px #1b1f2a, 0 12px 30px rgba(0, 0, 0, .3); }
.shot iframe { width: 390px; height: 740px; border: 0; transform: scale(.7); transform-origin: 0 0; }
.shot figcaption { text-align: center; font-size: .92rem; color: var(--muted); margin: 18px auto 0; max-width: 290px; }
@media (max-width: 1000px) { .shots { grid-template-columns: 1fr; } }
.table th { text-align: left; white-space: nowrap; vertical-align: top; }
.code-card { background: #0b1220; color: #e8eefc; border-radius: 16px; padding: 18px 20px; box-shadow: 0 8px 24px rgba(15, 31, 61, .2); overflow: auto; }
.code-card .code-title { color: var(--amber); font-family: var(--heading); text-transform: uppercase; letter-spacing: .1em; margin-bottom: 8px; }
.code-card pre { margin: 0; font-size: .92rem; }
.code-card code { background: none; padding: 0; color: #cfe3ff; }
@media (max-width: 900px) {
    .hero, .split { grid-template-columns: 1fr; gap: 20px; }
    .split.reverse > div:first-child { order: 0; }
    .cards { grid-template-columns: 1fr; }
}
@media (min-width: 901px) and (max-width: 1200px) { .cards { grid-template-columns: repeat(2, 1fr); } }

/* Customize / API reference */
.diagram { display: flex; align-items: stretch; gap: 8px; margin: 24px 0; flex-wrap: wrap; }
.diagram .node { flex: 1 1 150px; background: #fff; border: 2px solid var(--navy); border-radius: 14px; padding: 14px; text-align: center; font-weight: 700; color: var(--navy); }
.diagram .node.accent { background: var(--navy); color: #fff; }
.diagram .node small, .diagram .arrow small { display: block; font-weight: 400; color: inherit; opacity: .8; }
.diagram .arrow { flex: 0 1 150px; align-self: center; text-align: center; font-size: .85rem; color: var(--muted); border-top: 3px solid var(--amber); padding-top: 6px; position: relative; }
.diagram .arrow::after { content: "▶"; position: absolute; right: -4px; top: -13px; color: var(--amber); }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; background: #fff; border-radius: 12px; overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { background: var(--navy); color: #fff; font-size: .78rem; text-transform: uppercase; letter-spacing: .1em; }
pre.code { background: #0b1220; color: #cfe3ff; padding: 16px; border-radius: 12px; overflow: auto; font-size: .85rem; line-height: 1.45; }
pre.code code { background: none; padding: 0; }

/* Forms */
.cc-form { display: flex; flex-direction: column; gap: 6px; max-width: 640px; }
.cc-form label { font-weight: 600; margin-top: 10px; }
.cc-form input[type=text], .cc-form input[type=email], .cc-form input[type=tel], .cc-form input[type=password], .cc-form select, .cc-form textarea { font: inherit; padding: 10px 12px; border: 2px solid #b9c2d6; border-radius: 10px; background: #fff; width: 100%; }
.cc-form input:focus, .cc-form select:focus, .cc-form textarea:focus { outline: none; border-color: var(--navy); }
.cc-form .check { font-weight: 400; display: flex; gap: 8px; align-items: baseline; margin-top: 6px; }
.cc-form .radios { border: none; padding: 0; margin: 10px 0 0; display: flex; flex-wrap: wrap; gap: 4px 18px; align-items: center; }
.cc-form .radios legend { font-weight: 600; width: 100%; padding: 0; }
.cc-form .radios .check { margin-top: 2px; }
.cc-form .form-heading { margin: 26px 0 0; font-size: 1.25rem; border-bottom: 2px solid var(--amber); padding-bottom: 4px; }
.cc-form .button { align-self: flex-start; margin-top: 20px; }
.cc-form .hp { position: absolute; left: -5000px; height: 0; overflow: hidden; }
.field-error { color: #b3261e; font-size: .9rem; }
.form-problem { background: #fdecea; border-left: 4px solid #b3261e; padding: 10px 14px; border-radius: 4px; margin: 0 0 6px; }
.form-result { background: #e7f5ea; border-left: 4px solid #2e7d32; padding: 16px 18px; border-radius: 4px; font-size: 1.15rem; }

/* Footer */
.site-footer { background: var(--navy); color: #c9d4ec; text-align: center; padding: 30px 16px 24px; }
.site-footer .tagline { font-family: var(--heading); color: var(--amber); font-size: 1.3rem; text-transform: uppercase; letter-spacing: .08em; }
.site-footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 18px; margin: 12px 0; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer .fine { font-size: .8rem; max-width: 760px; margin: 8px auto 0; opacity: .8; }

/* ---------- Live demo ---------- */
.demo-head h1 { margin-bottom: .1em; }
.demo-head p { margin: 0 0 16px; max-width: 900px; color: #2c3850; }
.demo { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.demo-ui, .demo-board { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; }
.demo-board { position: sticky; top: 70px; }
.picker { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.picker-note { margin: 0; font-size: .88rem; color: var(--muted); min-height: 1.4em; }
.seg { display: inline-flex; background: #e9edf6; border-radius: 999px; padding: 4px; align-self: flex-start; }
.seg button, .chips button { font: inherit; border: none; cursor: pointer; border-radius: 999px; padding: 7px 16px; background: transparent; color: var(--navy); font-weight: 600; }
.seg button.on { background: var(--navy); color: #fff; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chips button { background: #e9edf6; font-size: .92rem; }
.chips button.on { background: var(--amber); color: var(--amber-ink); }
.device-stage { display: flex; justify-content: center; background: repeating-linear-gradient(45deg, #eef1f8, #eef1f8 12px, #e6eaf4 12px, #e6eaf4 24px); border-radius: 14px; padding: 14px; overflow: hidden; }
.device { position: relative; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 8px #1b1f2a, 0 12px 30px rgba(0, 0, 0, .35); background: #000; margin: 8px; }
.device.tablet, .device.any { border-radius: 14px; }
.device iframe { border: 0; transform-origin: 0 0; display: block; background: #111; }
.board-stage { background: #2a2f3a linear-gradient(#3a4050, #23272f); border-radius: 14px; padding: 16px; }
.board-tools { display: flex; gap: 8px; margin: 12px 0; flex-wrap: wrap; }
.wire { background: #0b1220; color: #cfe3ff; border-radius: 12px; padding: 12px 14px; }
.wire-head { display: flex; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: .85rem; margin-bottom: 6px; }
.wire-head strong { color: var(--amber); text-transform: uppercase; letter-spacing: .08em; }
.wire-head span { opacity: .7; }
.wire-log { list-style: none; margin: 0; padding: 0; font-size: .85rem; min-height: 9.5em; }
.wire-log li { padding: 2px 0; border-bottom: 1px solid rgba(255, 255, 255, .06); overflow-wrap: anywhere; }
.wire-log li:first-child code b { color: #ffd166; }
.wire-log code { background: none; color: inherit; padding: 0; }
.wire-log .muted, .wire-poll { opacity: .6; }
.wire-poll { margin: 6px 0 0; font-size: .78rem; min-height: 1.2em; }
.demo-explain { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 28px; }
.demo-explain h2 { font-size: 1.25rem; margin-top: 0; }
@media (max-width: 1000px) {
    .demo { grid-template-columns: 1fr; }
    .demo-board { position: static; order: -1; }
    .demo-board .wire { display: none; }   /* on a phone it would sit between the board and the screen */
    .demo-explain { grid-template-columns: 1fr; gap: 0; }
}

/* Pretend scoreboards */
.sb { --face: #0a0a0a; --label: #fff; --off: #161616; border-radius: 10px; padding: 3.5% 4%; background: var(--face); color: var(--label); border: 4px solid #e8e8e8; font-family: var(--heading); font-weight: 800; display: flex; flex-direction: column; gap: 3cqw; user-select: none; }
#Board { container-type: inline-size; }
.sb-look-bulb { --face: #a3191d; --off: #3a0d0f; border-color: #f2e9d8; box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .3); }
.sb-digit { height: 100%; width: auto; display: block; }
.sb-digit polygon, .sb-digit circle { fill: var(--off); }
.sb-look-bulb .sb-digit circle { fill: #2a0a0b; }
.sb-amber .on { fill: #ffd21f; filter: drop-shadow(0 0 2px rgba(255, 210, 31, .7)); }
.sb-red .on { fill: #ff2b2b; filter: drop-shadow(0 0 2px rgba(255, 43, 43, .7)); }
.sb-green .on { fill: #5bd94a; filter: drop-shadow(0 0 2px rgba(91, 217, 74, .7)); }
.sb-look-bulb .sb-amber .on { fill: #ffe9a8; } .sb-look-bulb .sb-red .on { fill: #ffd0b0; } .sb-look-bulb .sb-green .on { fill: #d9ffc7; }
.sb-window { display: inline-flex; gap: 1.2cqw; height: 15cqw; padding: 1.2cqw 1.6cqw; background: #000; border: .5cqw solid #d8d8d8; border-radius: 1cqw; }
.sb-look-bulb .sb-window { background: #1a0607; border-color: #f2e9d8; }
.sb-top { display: flex; justify-content: center; align-items: center; position: relative; }
.sb-clock { display: inline-flex; align-items: center; gap: 1.6cqw; padding: 1.6cqw 2.4cqw; border: .9cqw solid #fff; border-radius: 4cqw; }
.sb-clock .sb-window { height: 19cqw; border: none; padding: 0 .8cqw; }
.sb-colon { display: inline-flex; flex-direction: column; justify-content: center; gap: 4cqw; height: 19cqw; }
.sb-colon i { width: 2.2cqw; height: 2.2cqw; border-radius: 50%; background: #ffd21f; display: block; }
.sb-colon.off i { background: var(--off); }
.sb-colon.point { justify-content: flex-end; padding-bottom: 1cqw; }
.sb-colon.point i:first-child { display: none; }
.sb-horn { position: absolute; right: 0; top: 0; font-size: 2.4cqw; letter-spacing: .1em; padding: .6cqw 1.6cqw; border-radius: 1cqw; background: var(--off); color: #555; }
.sb-horn.on { background: #ff2b2b; color: #fff; box-shadow: 0 0 3cqw #ff2b2b; }
.sb-mid, .sb-fouls { display: grid; grid-template-columns: 1fr auto 1fr; align-items: end; gap: 2cqw; }
.sb-team { display: flex; flex-direction: column; align-items: center; gap: 1cqw; }
.sb-label { font-size: 5.4cqw; letter-spacing: .04em; line-height: 1; }
.sb-label.small { font-size: 3.4cqw; }
.sb-centre { display: flex; flex-direction: column; align-items: center; gap: 1cqw; }
.sb-centre .sb-window { height: 11cqw; }
.sb-ind { display: flex; align-items: center; gap: 1.6cqw; }
.sb-arrow { font-size: 4.6cqw; color: #4a1010; line-height: 1; }
.sb-look-bulb .sb-arrow { color: #5c1215; }
.sb-arrow.on { color: #ff2b2b; text-shadow: 0 0 2cqw #ff2b2b; }
.sb-look-bulb .sb-arrow.on { color: #ffe08a; text-shadow: 0 0 2cqw #ffd21f; }
.sb-fouls { border-top: .5cqw solid rgba(255, 255, 255, .25); padding-top: 2.4cqw; align-items: end; }
.sb-fouls .sb-window { height: 10cqw; }
.sb-player { display: flex; gap: 2cqw; }
.sb-model-compact .sb-centre { padding-bottom: 1cqw; }
