/* GROWTH, ADS (public/rooms/growth/ads.js): one glance (DESIGN.md "One glance", room-layout.css .rv-g-*): the headline
   under the tab row with New ad, the ads a row each (waiting on Chris first), leftover space at the bottom; and the ad's
   sheet and New ad dialogs. Every rule is scoped to the page (.ga) or its dialogs (.ga-dialog). Materials from
   theme.css, plus one red for Stop and a failed make: blue stays the primary action. */
.gr-tabview:has(> .ga){container:glance / inline-size}
.rv-room.ga{justify-content:flex-start;padding-top:0}
/* a room's own lists reset their padding (room-layout.css .rv-room ul); the glance sheet keeps its own */
.rv-room.ga .rv-g-tools .btn{white-space:nowrap}
:root[data-theme=light] .ga-dialog{--ga-red:#B42318}
.ga-dialog{--ga-red:#FF9B94}
.ga-dialog .ga-dim{margin:0;color:var(--muted);overflow-wrap:break-word;text-wrap:pretty}

/* the dialogs: centred, scrolling inside themselves (theme.css .rv-dialog-body); the close keeps its width beside a
   long title */
@media (min-width:720px){.ga-dialog.ga-sheet,.ga-dialog.ga-new{width:min(760px,calc(100% - 32px))}}
.ga-dialog .rv-dialog-head button{flex:none}
.ga-dialog .rv-dialog-body{display:flex;flex-direction:column;gap:20px}
.ga-dialog p{margin:0}
.ga-dialog h3{margin:0 0 8px;font:var(--w-strong) var(--t-section)/22px var(--display);color:var(--ink)}
.ga-dialog .ga-warn{padding:12px;border-radius:10px;border-left:4px solid var(--ga-red);background:color-mix(in srgb,var(--ga-red) 10%,var(--bg2));overflow-wrap:break-word}

/* the ad as it will show, then its two links, each a 44px target */
.ga-dialog .ga-ad{display:flex;flex-direction:column;gap:8px;padding-block:12px;border-block:1px solid var(--line)}
.ga-dialog .ga-headline{font-weight:var(--w-strong);overflow-wrap:break-word}
.ga-dialog .ga-words{white-space:pre-wrap;overflow-wrap:break-word}
.ga-dialog .ga-go{display:flex;flex-wrap:wrap;gap:0 20px}
.ga-dialog .ga-go a{display:inline-flex;align-items:center;min-height:44px;color:var(--accent);text-underline-offset:4px}
.ga-dialog .ga-fine{margin-top:8px;font-size:var(--t-meta);line-height:18px}

/* the one decision */
.ga-dialog .ga-act{display:flex;flex-direction:column;gap:12px;padding-block:12px;border-block:1px solid var(--line)}
.ga-dialog .ga-means{text-wrap:pretty}
.ga-dialog .ga-acts{display:flex;flex-wrap:wrap;gap:8px}
.ga-dialog .ga-acts .btn{flex:1 1 140px}
.ga-dialog .ga-kill{background:var(--ga-red);border-color:var(--ga-red);color:#1A1414}
.ga-dialog .ga-confirm{display:flex;flex-direction:column;gap:8px}
.ga-dialog .ga-say{color:var(--muted)}
.ga-dialog .ga-say:empty{display:none}

/* the figures that matter today, four (two by two on the phone); the rest in one quiet line under them */
.ga-dialog .ga-nums{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;margin:0}
@media (max-width:599px){.ga-dialog .ga-nums{grid-template-columns:repeat(2,minmax(0,1fr))}}
.ga-dialog .ga-nums div{padding-block:8px;border-block:1px solid var(--line);min-width:0}
.ga-dialog .ga-nums dt{font-size:var(--t-meta);line-height:16px;color:var(--muted)}
.ga-dialog .ga-nums dd{margin:4px 0 0;font:var(--w-strong) var(--t-head)/24px var(--display);font-variant-numeric:tabular-nums;overflow-wrap:break-word}
.ga-dialog .ga-more{margin-top:8px}

/* its days: one row a day, the figures in right-aligned columns */
.ga-dialog .ga-days{width:100%;border-collapse:collapse;font-variant-numeric:tabular-nums}
.ga-dialog .ga-days th,.ga-dialog .ga-days td{padding:8px 0 8px 8px;vertical-align:bottom;text-align:right;white-space:nowrap;border-top:1px solid var(--line)}
.ga-dialog .ga-days th:first-child{padding-left:0;text-align:left}
.ga-dialog .ga-days thead th{border-top:0;padding-top:0;font:var(--w-mid) var(--t-meta)/16px var(--body);color:var(--muted)}
.ga-dialog .ga-days tbody th{font-weight:var(--w-mid)}
.ga-dialog .ga-days td{color:var(--muted)}
.ga-dialog .ga-days .ga-wd::after{content:","}
/* the phone stacks a day's weekday over its date, so six columns fit without a sideways scroll */
@media (max-width:599px){.ga-dialog .ga-days .ga-wd{display:block;font:var(--w-row) var(--t-meta)/16px var(--body);color:var(--muted)}.ga-dialog .ga-days .ga-wd::after{content:none}}

/* New ad */
.ga-dialog .ga-form{display:flex;flex-direction:column;gap:16px}
.ga-dialog .ga-field{display:grid;gap:8px;margin:0;padding:0;border:0;min-width:0}
.ga-dialog .ga-field > span,.ga-dialog .ga-field legend{color:var(--muted);padding:0}
.ga-dialog .ga-field legend{margin-bottom:8px}
.ga-dialog .ga-field input:not([type=checkbox]):not([type=radio]),.ga-dialog .ga-field textarea,.ga-dialog .ga-field select{box-sizing:border-box;width:100%;min-height:44px;padding:10px 12px;border:1px solid var(--line2);border-radius:8px;background:var(--bg2);color:var(--ink);font-size:var(--t-head)}
.ga-dialog .ga-field textarea{resize:vertical;min-height:72px;line-height:1.4}
.ga-dialog .ga-two{display:grid;grid-template-columns:repeat(auto-fit,minmax(180px,1fr));gap:16px}
.ga-dialog .ga-checks{display:flex;flex-wrap:wrap;gap:4px 20px}
.ga-dialog .ga-check{display:flex;align-items:center;gap:12px;min-height:44px}
.ga-dialog .ga-check input{width:20px;height:20px;min-height:0;margin:0;accent-color:var(--accent)}
