/* adsys. Palette and fonts are ads.charitonmedia.com's (build-decisions #14). */
:root {
  --void:#08080c; --ink:#1a1a2e;
  --cyan:#00b8b8; --cyan-deep:#008a8a; --cyan-ink:#006b6b; --cyan-bright:#00d4d4;
  --cream:#f4f1eb; --cream-warm:#eae6de; --warm-white:#e8e4dc;
  --ok:#2f9e44; --warn:#e8a200; --err:#c92a2a; --political:#6a3a8a;
  --rule:rgba(8,8,12,.12); --rule-strong:rgba(8,8,12,.32);
  --shadow-card:0 1px 3px rgba(8,8,12,.08), 0 4px 12px rgba(8,8,12,.04);
  --serif:'Playfair Display', Georgia, serif;
  --sans:'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --mono:'IBM Plex Mono', 'SF Mono', Menlo, monospace;
  /* older names the staff pages use */
  --muted:rgba(26,26,46,.72); --line:var(--rule); --bg:var(--cream); --accent:var(--ink); --bad:var(--err);
}
* { box-sizing:border-box; }
body { margin:0; font:15px/1.5 var(--sans); color:var(--ink); background:var(--cream); -webkit-font-smoothing:antialiased; }
a { color:var(--ink); text-decoration:underline; text-decoration-color:var(--cyan-deep); text-decoration-thickness:2px; text-underline-offset:2px; }
a:hover { text-decoration-color:var(--cyan); }
:focus-visible { outline:3px solid var(--cyan-deep); outline-offset:2px; }
h1, h2 { font-family:var(--serif); font-weight:700; letter-spacing:-.01em; line-height:1.15; }
h1 { font-size:1.9rem; margin:.4rem 0 .6rem; }

/* staff header */
.top { display:flex; align-items:center; gap:1.5rem; padding:.6rem 1.2rem; background:var(--void); color:var(--cream); }
.brand { font-family:var(--serif); font-weight:700; color:var(--cream); text-decoration:none; }
.top nav { display:flex; flex-wrap:wrap; gap:.3rem 1rem; flex:1; }
.top nav a { color:rgba(244,241,235,.75); text-decoration:none; }
.top nav a:hover, .top nav a[aria-current] { color:var(--cream); text-decoration:underline; text-decoration-color:var(--cyan); }
.top .who { color:rgba(244,241,235,.8); }
.top :focus-visible { outline-color:var(--cyan-bright); }
.who { display:flex; align-items:center; gap:.6rem; margin:0; }
main { padding:1.2rem; max-width:1200px; }
.narrow { max-width:380px; margin:3rem auto; background:#fff; padding:1.5rem; border:1px solid var(--rule); border-radius:3px; box-shadow:var(--shadow-card); }
.narrow label { display:block; margin-bottom:.8rem; }
.narrow input { width:100%; }
input, select, button, textarea { font:inherit; padding:.4rem .55rem; border:1px solid var(--rule-strong); border-radius:3px; background:#fff; color:var(--ink); }
button { background:var(--ink); color:var(--cream); border-color:var(--ink); cursor:pointer; font-weight:600; }
button:hover { background:var(--cyan-ink); border-color:var(--cyan-ink); }
button.secondary { background:#fff; color:var(--ink); border-color:var(--rule-strong); }
button.secondary:hover { border-color:var(--cyan-deep); }
a.button { display:inline-block; padding:.7rem 1.4rem; font-size:1.1rem; background:var(--ink); color:var(--cream); border-radius:3px; text-decoration:none; }
a.button:hover { background:var(--cyan-ink); }
table { border-collapse:collapse; width:100%; background:#fff; margin:.5rem 0 1rem; }
th, td { text-align:left; padding:.45rem .6rem; border-bottom:1px solid var(--rule); vertical-align:top; }
thead th { font-weight:600; font-size:.88em; color:var(--muted); }
tr.disabled td { color:var(--muted); }
form.inline { display:inline-flex; flex-wrap:wrap; gap:.4rem; align-items:center; margin:0; }
form.grid { display:flex; flex-wrap:wrap; gap:.8rem; align-items:end; background:#fff; padding:1rem; border:1px solid var(--rule); border-radius:3px; }
form.grid label { display:flex; flex-direction:column; font-size:.9em; color:var(--muted); }
.error { color:var(--err); }
p.error { border-left:3px solid var(--err); padding:.2rem 0 .2rem .7rem; }
.notice { background:var(--warm-white); border-left:3px solid var(--cyan-deep); padding:.8rem 1rem; border-radius:0 3px 3px 0; }
.token { display:block; word-break:break-all; font-size:1.05em; font-family:var(--mono); }
.audit pre { margin:0; max-width:320px; white-space:pre-wrap; word-break:break-all; font-size:.8em; }
h3 { margin:1rem 0 .4rem; }
.muted { color:var(--muted); }
tr.ended td { color:var(--muted); }
tr.scheduled td { background:#fff8e1; }
.cols2 { display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; }
.cols2 > form { flex:1 1 420px; }
table.widths { width:auto; min-width:300px; margin:0; }
td.label { min-width:18rem; }
form.inline input[type=date] { width:9.5rem; }
section.step { background:#fff; border:1px solid var(--rule); border-radius:3px; padding:.9rem 1.1rem; margin:0 0 1rem; }
section.step h2 { margin:.1rem 0 .7rem; font-size:1.2rem; }
ul.plan { columns:2 18rem; margin:.4rem 0 .8rem; padding-left:1.2rem; }
tr.total td, tr.total th { border-top:2px solid var(--ink); }
.narrow.wide { max-width:660px; }
.narrow table { margin:.8rem 0; }
.row { display:flex; justify-content:space-between; align-items:center; gap:1rem; flex-wrap:wrap; }
.outbox pre { white-space:pre-wrap; max-width:520px; font-size:.85em; margin:.3rem 0 0; }
.proof { display:flex; flex-wrap:wrap; gap:1rem; align-items:flex-start; }
.proof figure { margin:0; }
.proof img { display:block; border:1px solid var(--rule); max-height:480px; max-width:100%; height:auto; }
.proof img.web { width:300px; height:250px; }
#creative details { border:1px solid var(--rule); border-radius:3px; padding:.5rem .8rem; margin:.6rem 0; background:#fff; }
#creative summary { cursor:pointer; }
#creative textarea { font:inherit; }

/* ---------------------------------------------------------------- buyer pages */
.masthead { display:flex; align-items:center; justify-content:space-between; gap:1.5rem; flex-wrap:wrap;
  padding:1rem clamp(1rem, 4vw, 2.5rem); background:var(--void); color:var(--cream); border-bottom:1px solid var(--cyan-deep); }
.masthead-brand { display:flex; flex-direction:column; gap:2px; color:var(--cream); text-decoration:none; }
.masthead-name { font-family:var(--serif); font-size:1.7rem; font-weight:700; letter-spacing:-.02em; line-height:1; }
.masthead-name i { color:var(--cyan); }
.masthead-sub { font-family:var(--mono); font-size:.75rem; color:rgba(244,241,235,.7); }
.masthead nav { display:flex; gap:1.4rem; }
.masthead nav a { color:var(--cream); text-decoration:none; font-weight:500; }
.masthead nav a:hover, .masthead nav a[aria-current] { text-decoration:underline; text-decoration-color:var(--cyan); text-decoration-thickness:2px; }
.masthead :focus-visible { outline-color:var(--cyan-bright); }
body.buyer main { max-width:1180px; margin:0 auto; padding:1.5rem clamp(1rem, 4vw, 2.5rem) 4rem; font-size:16px; }
body.buyer main > h1, body.buyer .row h1 { font-size:2.2rem; }
body.buyer h2 { font-size:1.35rem; margin:1.6rem 0 .5rem; }
body.buyer .narrow td:last-child { font-family:var(--mono); text-align:right; }
body.buyer .narrow h1 { font-size:1.7rem; }

.buy-head { max-width:62ch; margin-bottom:1.2rem; }
.buy-head h1 { font-size:clamp(2.2rem, 5vw, 3.1rem); margin:.6rem 0 .5rem; }
.lede { font-size:1.12rem; color:var(--muted); margin:0; }
.buy-layout { display:grid; grid-template-columns:minmax(0, 1fr) minmax(300px, 400px); gap:1.6rem; align-items:start; }
@media (max-width:900px) { .buy-layout { grid-template-columns:minmax(0, 1fr); } }
.buy select { max-width:100%; }
.buy .step { background:#fff; border:1px solid var(--rule); border-radius:3px; padding:1rem 1.2rem 1.1rem; margin:0 0 1rem; box-shadow:var(--shadow-card); }
.buy .step h2 { display:flex; align-items:baseline; gap:.6rem; margin:0 0 .8rem; font-size:1.3rem; }
.buy .step h2 .n { font-family:var(--mono); font-size:.85rem; font-weight:500; color:var(--cyan-ink); border:1px solid var(--cyan-ink); border-radius:50%;
  width:1.6rem; height:1.6rem; display:inline-grid; place-items:center; flex:none; transform:translateY(-.1rem); }
.buy .fields { display:flex; flex-wrap:wrap; gap:.7rem 1rem; align-items:end; }
.buy .fields label { display:flex; flex-direction:column; gap:.2rem; font-size:.9rem; font-weight:500; }
.buy .fields .custom { display:flex; gap:1rem; }
.buy input[type=number] { width:6rem; }
.buy input[type=radio], .buy input[type=checkbox] { accent-color:var(--cyan-deep); width:1.05rem; height:1.05rem; margin:0; }

.seg { display:inline-flex; border:1px solid var(--rule-strong); border-radius:3px; overflow:hidden; }
.seg label { display:flex; align-items:center; gap:.5rem; padding:.55rem 1rem; cursor:pointer; }
.seg label + label { border-left:1px solid var(--rule-strong); }
.seg label:has(input:checked) { background:var(--ink); color:var(--cream); }
.seg label:has(input:focus-visible) { outline:3px solid var(--cyan-deep); outline-offset:-3px; }

.modes { display:grid; grid-template-columns:1.6fr 1fr; gap:.8rem; }
@media (max-width:600px) { .modes { grid-template-columns:1fr; } }
.mode { display:grid; grid-template-columns:auto 1fr; align-content:start; gap:.15rem .7rem; align-items:baseline; padding:.9rem 1rem; border:1px solid var(--rule-strong); border-radius:3px; cursor:pointer; background:var(--cream); }
.mode input { grid-row:1 / span 2; align-self:start; margin-top:.35rem !important; }
.mode-name { font-family:var(--serif); font-weight:700; font-size:1.15rem; }
.mode-lead .mode-name { font-size:1.4rem; }
.mode-desc { font-size:.92rem; color:var(--muted); }
.mode:has(input:checked) { border-color:var(--cyan-deep); box-shadow:inset 4px 0 0 var(--cyan-deep); background:#fff; }
.mode:has(input:focus-visible) { outline:3px solid var(--cyan-deep); outline-offset:2px; }

.buy fieldset { border:0; margin:0; padding:0; min-width:0; }
.buy fieldset.pub { border-top:1px solid var(--rule); padding:.7rem 0 .8rem; }
.buy fieldset.pub:first-of-type { border-top:0; padding-top:0; }
.buy fieldset.pub legend { padding:0; }
.pub-toggle { display:flex; align-items:baseline; gap:.6rem; cursor:pointer; padding:.2rem 0; }
.pub-toggle input { transform:translateY(.12rem); }
.pub-name { font-family:var(--serif); font-weight:700; font-size:1.15rem; }
.pub-kind { font-size:.85rem; color:var(--muted); }
.buy fieldset.pub .details { display:grid; grid-template-columns:minmax(0, 1fr); gap:.8rem; padding:.6rem 0 .2rem 1.65rem; }
.buy fieldset.pub:not(:has(legend input:checked)) .details { display:none; }
.buy fieldset.pub:not(:has(option[value=custom]:checked)) .custom { display:none; }
.check { display:inline-flex; align-items:center; gap:.5rem; font-weight:500; cursor:pointer; }
.runs legend, .issues legend { font-weight:600; font-size:.9rem; margin-bottom:.35rem; }
.runs { display:flex; flex-wrap:wrap; gap:.45rem; }
.runs legend { flex-basis:100%; }
.run { display:inline-flex; align-items:center; gap:.45rem; padding:.4rem .7rem; border:1px solid var(--rule-strong); border-radius:3px; cursor:pointer; background:var(--cream); font-size:.93rem; }
.run:has(input:checked) { border-color:var(--cyan-deep); background:#fff; box-shadow:inset 0 -3px 0 var(--cyan-deep); }
.run .off { font-family:var(--mono); font-size:.8rem; color:var(--ink); background:var(--warm-white); padding:.05rem .35rem; border-radius:2px; }
.run .off.muted { background:none; color:var(--muted); font-family:var(--sans); }
.run-start { display:flex; flex-direction:column; gap:.25rem; font-size:.9rem; font-weight:500; max-width:34rem; }
.run-start small { font-weight:400; }
.issues label { display:flex; align-items:baseline; gap:.5rem; padding:.15rem 0; cursor:pointer; }
.details:has(.runs input[value=pick]:checked) .run-start, .details:not(:has(.runs input[value=pick]:checked)) .issues { display:none; }
.buy:has(#mode-package:checked) .pick-only, .buy:not(:has(#mode-package:checked)) .package-only { display:none; }
.buy:has(#kind-political:checked) .commercial-only, .buy:not(:has(#kind-political:checked)) .political-only { display:none; }

/* the light table: the selected ad drawn to scale */
.lighttable { position:sticky; top:1rem; background:var(--void); color:var(--cream); border-radius:3px; padding:1.1rem 1.1rem 1.2rem; }
.lighttable h2 { margin:0 0 .8rem !important; font-size:1.35rem; color:var(--cream); }
.lighttable :focus-visible { outline-color:var(--cyan-bright); }
.ad-pic { margin:0 0 1.1rem; }
.ad-pic figcaption { font-family:var(--serif); font-weight:700; font-size:1.05rem; margin-bottom:.45rem; }
.page-svg { display:block; width:100%; max-width:250px; height:auto; margin:0 auto; }
.web-svg { display:block; width:100%; height:auto; margin-top:.5rem; }
.page-svg .sheet { fill:var(--cream); }
.page-svg .col { fill:var(--warm-white); stroke:rgba(8,8,12,.16); stroke-width:12; }
.ad { fill:var(--cyan); stroke:var(--cyan-bright); stroke-width:30; }
.web-svg .ad { stroke-width:4; }
.ad-text { fill:var(--void); font-family:var(--sans); font-weight:600; }
.web-svg .frame { fill:var(--cream); }
.web-svg .bar { fill:var(--ink); }
.web-svg .bar-text { fill:var(--cream); font-family:var(--serif); font-weight:700; }
.web-svg .bar-place { fill:var(--cyan-bright); font-family:var(--sans); }
.web-svg .block { fill:var(--warm-white); }
.web-svg .line { fill:rgba(8,8,12,.12); }
.dims { font-family:var(--mono); font-size:.86rem; margin:.5rem 0 0; color:var(--cream); text-align:center; }
.dates { font-size:.88rem; margin:.45rem 0 0; color:rgba(244,241,235,.85); }
.dates span { font-weight:600; color:var(--cream); }
.note { font-size:.88rem; margin:.45rem 0 0; padding:.4rem .6rem; border-left:3px solid var(--warn); background:rgba(232,162,0,.12); color:var(--cream); }
.empty { color:rgba(244,241,235,.75); border:1px dashed rgba(244,241,235,.3); border-radius:3px; padding:2rem 1rem; text-align:center; margin:0 0 1rem; }
.price { background:var(--cream); color:var(--ink); border-radius:3px; padding:.6rem .8rem; }
.price p { margin:.3rem 0; }
.price p.error { color:var(--err); }
table.quote { background:none; margin:0; }
table.quote th, table.quote td { padding:.5rem 0; border-bottom:1px solid var(--rule); font-weight:400; }
table.quote th { padding-right:.8rem; }
table.quote th small { display:block; color:var(--muted); font-size:.8rem; }
table.quote th small.disc { color:var(--ink); font-weight:500; }
table.quote td { text-align:right; font-family:var(--mono); white-space:nowrap; }
table.quote tr.total th { font-weight:600; }
table.quote tr.total td { font-size:1.15rem; }
.pay { width:100%; margin-top:1rem; padding:.8rem 1rem; font-size:1.05rem; background:var(--cyan-ink); border-color:var(--cyan-ink); color:#fff; }
.pay:hover { background:var(--cyan); border-color:var(--cyan); color:var(--void); }
.fine { font-size:.82rem; color:rgba(244,241,235,.72); margin:.6rem 0 0; }
@media (max-width:900px) { .lighttable { position:static; } }
@media (prefers-reduced-motion:no-preference) { .ad { transition:all .2s ease; } }

/* narrow screens: wide buyer tables scroll inside themselves; the page never does */
@media (max-width:700px) { body.buyer main table:not(.quote) { display:block; overflow-x:auto; max-width:100%; } }
/* AI designer (CO6) */
.proof img.preview { max-width:min(100%, 672px); max-height:none; }
ol.chat { list-style:none; padding:0; margin:1rem 0; max-width:48rem; }
ol.chat li { padding:.5rem .8rem; margin:0 0 .5rem; border-radius:3px; border:1px solid var(--rule); white-space:pre-wrap; }
ol.chat li.assistant { background:var(--warm-white); border-left:3px solid var(--cyan-deep); }
form.brief textarea { width:100%; }
input[type=file] { max-width:100%; box-sizing:border-box; }
.cols2 > *, form.grid > * { min-width:0; max-width:100%; } /* a file input must not widen its column past the card (390 px) */
/* The designer's working panel: a turning daisy wheel, the real step, a saying */
.working { --gold:#d9ac55; display:flex; gap:1rem; align-items:center; background:var(--cream); border:1px solid var(--rule); border-left:3px solid var(--gold); border-radius:3px; padding:.9rem 1rem; margin:0 0 1rem; max-width:48rem; }
.working .wheel { flex:none; width:64px; height:64px; box-sizing:border-box; border-radius:50%; border:5px dotted var(--gold);
  background:radial-gradient(circle, var(--gold) 0 14%, var(--cream) 15% 24%, transparent 25%), repeating-conic-gradient(var(--cyan-ink) 0 5deg, transparent 5deg 30deg);
  animation:wheel-spin 3s linear infinite; }
@keyframes wheel-spin { to { transform:rotate(360deg); } }
@keyframes wheel-pulse { 50% { opacity:.5; transform:scale(.94); } }
@media (prefers-reduced-motion: reduce) { .working .wheel { animation:wheel-pulse 2.4s ease-in-out infinite; } }
.working .step { margin:0; font-weight:600; color:var(--ink); }
.working .clock { font-family:var(--mono); font-weight:500; color:var(--cyan-ink); margin-left:.5rem; }
.working .saying { margin:.25rem 0 0; color:var(--muted); font-style:italic; }
.proof.dim { opacity:.45; filter:grayscale(.3); }
