/* dayoff.css — the no-school-day helper (dayoff.html, js/dayoff.js). Prefix do-. Tokens from pages.css. */
:root {
  --do-ok: #17603E; --do-okbg: #E3F3E9;
  --do-stop: #A8231B; --do-stopbg: #FBE4E2;
  --do-info: #1E4A72; --do-infobg: #E3EDF8;
  --do-unk: #4A5868; --do-unkbg: #E9EEF3;
  --do-tint: #EEF3F9; --do-badge: #0B5C66; --do-badgebg: #DDF1F3;
}
:root[data-theme="dark"] {
  --do-ok: #6FD39A; --do-okbg: #173326;
  --do-stop: #FF9A91; --do-stopbg: #3D1D1B;
  --do-info: #9CC8F2; --do-infobg: #1B2E44;
  --do-unk: #B8C5D3; --do-unkbg: #1C2A38;
  --do-tint: #1C2E42; --do-badge: #8FD8E0; --do-badgebg: #12343A;
}
.do-page { overflow-x: hidden; }
.do-main { max-width: 760px; padding-top: 18px; padding-bottom: 8px; display: flex; flex-direction: column; gap: 16px; }
.do-main:focus { outline: none; }
.do-root { display: flex; flex-direction: column; gap: 14px; min-height: 40vh; }
.do-options, .do-dists { display: flex; flex-direction: column; gap: 14px; }
.do-empty, .do-loading { color: var(--muted); margin: 0; }

.do-back a { display: inline-flex; align-items: center; gap: 4px; min-height: 44px; font-weight: 700; font-size: .9rem; text-decoration: none; }
.do-back a:hover { text-decoration: underline; }
.do-back svg, .do-chev { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.do-head { display: flex; flex-direction: column; gap: 2px; }
.do-kicker { margin: 0; font-size: .82rem; font-weight: 700; color: var(--muted); letter-spacing: .02em; }
.do-head h1 { margin: 0; font-size: clamp(1.45rem, 5vw, 1.9rem); line-height: 1.15; color: var(--ink); text-wrap: balance; }
.do-lead { margin: 6px 0 0; color: var(--muted); max-width: 62ch; }
.do-plan-h { display: none; }

/* the answer card */
.do-ans { border-radius: 16px; padding: 16px; display: flex; flex-direction: column; gap: 6px; }
.do-ans h2 { margin: 0; font-size: clamp(1.3rem, 5.4vw, 1.6rem); line-height: 1.15; }
.do-ans p { margin: 0; color: var(--text); }
.do-sub { font-size: 1rem; font-weight: 600; }
.do-kids { font-weight: 700; }
.do-src, .do-fine, .do-note { font-size: .86rem; }
.do-ans a { color: inherit; text-decoration: underline; display: inline-block; padding: 6px 0; margin: -6px 0; }
.do-fine { color: var(--muted) !important; }
.do-t-stop { background: var(--do-stopbg); } .do-t-stop h2 { color: var(--do-stop); }
.do-t-info { background: var(--do-infobg); } .do-t-info h2 { color: var(--do-info); }
.do-t-ok { background: var(--do-okbg); } .do-t-ok h2 { color: var(--do-ok); }
.do-t-unk { background: var(--do-unkbg); } .do-t-unk h2 { color: var(--do-unk); }
.do-badge { display: inline-block; font-size: .72rem; font-weight: 800; border-radius: 999px; padding: 2px 8px; background: var(--do-badgebg); color: var(--do-badge); white-space: nowrap; }
.do-tentative .do-badge { background: var(--warn-bg); color: var(--warn-text); border: 1px solid var(--warn-border); }
.do-tent { font-style: normal; color: var(--warn-text); font-weight: 700; }

/* sections */
.do-opt-h { margin: 6px 0 0; font-size: 1.15rem; color: var(--ink); }
.do-sec, .do-dist, .do-pick { padding: 16px; display: flex; flex-direction: column; gap: 8px; }
.do-sec h2, .do-dist h2 { margin: 0; font-size: 1.05rem; color: var(--ink); display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; }
.do-sec p, .do-dist p, .do-pick p { margin: 0; }
.do-who { font-size: .84rem; font-weight: 600; color: var(--muted); }
.do-call { font-weight: 700; }
.do-small { font-size: .84rem; color: var(--muted); }
.do-none { color: var(--muted); }
.do-h3 { margin: 6px 0 0; font-size: .95rem; color: var(--ink); }
.do-label { font-weight: 700; font-size: .9rem; }
.do-near, .do-pick { display: flex; flex-direction: column; gap: 6px; }
.do-page select { font: inherit; width: 100%; min-height: 46px; border: 1px solid var(--border); border-radius: 10px; padding: 9px 10px; background: var(--surface); color: var(--text); }
.do-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: .9rem; cursor: pointer; }
.do-check input { width: 22px; height: 22px; flex: none; accent-color: var(--accent); }

.do-list, .do-ups, .do-linklist, .do-legend { list-style: none; margin: 0; padding: 0; }
.do-item { border-top: 1px solid var(--border); padding: 10px 0; display: flex; flex-direction: column; gap: 3px; }
.do-item:focus { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.do-top { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; }
.do-name { font-weight: 700; color: var(--ink); overflow-wrap: anywhere; }
.do-mi { font-size: .84rem; font-weight: 700; color: var(--muted); white-space: nowrap; }
.do-meta, .do-addr { font-size: .86rem; color: var(--muted); overflow-wrap: anywhere; }
.do-links { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.do-link { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; font-size: .9rem; }
.do-noweb { font-size: .84rem; color: var(--muted); min-height: 30px; display: inline-flex; align-items: center; }
.do-more { align-self: flex-start; min-height: 44px; }
.do-linklist li { border-top: 1px solid var(--border); padding: 4px 0; display: flex; flex-direction: column; }
.do-linklist a { display: inline-flex; align-items: center; min-height: 44px; font-weight: 700; }
.do-linklist .do-small { margin-top: -8px; padding-bottom: 6px; }

/* upcoming rows */
.do-ups li { border-top: 1px solid var(--border); }
.do-up { display: flex; align-items: center; gap: 6px; min-height: 52px; padding: 8px 0; color: var(--text); text-decoration: none; }
.do-up:hover .do-up-w, .do-up:focus-visible .do-up-w { text-decoration: underline; }
.do-up-d { font-weight: 800; color: var(--ink); white-space: nowrap; flex: none; }
.do-up-sep { color: var(--muted); flex: none; }
.do-up-w { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.do-up[data-type="off"] .do-up-d { color: var(--do-stop); }
.do-up[data-type="early"] .do-up-d { color: var(--do-info); }
.do-up-k { color: var(--muted); }
.do-chev { color: var(--muted); }

/* map */
.do-map { height: 280px; border-radius: 12px; overflow: hidden; border: 1px solid var(--border); background: var(--surface-2); z-index: 0; }
.do-legend { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .82rem; color: var(--muted); }
.do-legend li { display: inline-flex; align-items: center; gap: 6px; }
.do-legend i { width: 12px; height: 12px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--border); display: inline-block; }

/* planning */
.do-btns { display: flex; flex-wrap: wrap; gap: 8px; }
.do-btns .btn { min-height: 46px; flex: 1 1 160px; }
.do-status { font-size: .88rem; font-weight: 600; color: var(--good); min-height: 1.2em; }
.do-lines { display: none; }
.do-disclaimer { margin: 0; font-size: .86rem; color: var(--muted); }

.do-about { border-top: 1px solid var(--border); padding-top: 14px; }
.do-about h2 { margin: 0 0 8px; font-size: 1rem; color: var(--ink); }
.do-about ul { margin: 0; padding-left: 18px; display: flex; flex-direction: column; gap: 6px; font-size: .88rem; color: var(--muted); }
.do-about b { color: var(--text); }

@media (max-width: 520px) {
  .do-main { padding-left: 14px; padding-right: 14px; }
  .do-hide-xs { display: none; }
  .do-up { flex-wrap: wrap; }
  .do-up-sep { display: none; }
  .do-up-d { flex-basis: 100%; }
  .do-up-w { flex-basis: calc(100% - 30px); }
}

/* Print: one page, "Our plan for <date>": the answer, the nearest five of each list, lines to write on. */
@media print {
  @page { size: letter; margin: 0.45in; }
  .do-page { background: #fff; font-size: 9.5pt; line-height: 1.3; }
  .do-main { max-width: none; padding: 0; gap: 6pt; display: block; }
  .do-root, .do-options { gap: 5pt; }
  .do-about, .do-mapsec, .do-meals, .do-kicker + h1, .do-item.do-extra, .do-list .do-item:nth-child(n+6), .do-links a[target], .do-noweb, .do-fine, .do-opt-h + .do-near, .tabbar, .tab-bar, #tabbar { display: none !important; }
  .do-plan-h { display: block; margin: 0 0 2pt; font-size: 15pt; font-weight: 800; color: #12304D; }
  .do-kicker { font-size: 9pt; }
  .do-ans { padding: 6pt 8pt; border: 1px solid #C9D2DC; border-radius: 6pt; background: #fff !important; gap: 2pt; }
  .do-ans h2 { font-size: 13pt; color: #12304D !important; }
  .do-opt-h { font-size: 11pt; margin: 2pt 0 0; }
  .do-sec { padding: 5pt 8pt; gap: 2pt; border-radius: 6pt; box-shadow: none; break-inside: avoid; }
  .do-sec h2 { font-size: 10.5pt; }
  .do-small { font-size: 8pt; }
  .do-sec .do-small { display: none; }
  .do-item { padding: 2.5pt 0; gap: 0; flex-direction: row; flex-wrap: wrap; column-gap: 8pt; }
  .do-top { flex: 1 1 100%; }
  .do-meta, .do-addr { font-size: 8pt; }
  .do-link { min-height: 0; font-size: 8pt; color: #12304D; text-decoration: none; }
  .do-badge { background: none; padding: 0; color: #12304D; }
  .do-lines { display: grid; grid-template-columns: max-content 1fr; gap: 9pt 8pt; margin: 4pt 0 0; }
  .do-lines dt { font-weight: 700; }
  .do-lines dd { margin: 0; border-bottom: 1px solid #8894A1; min-height: 12pt; }
  .do-disclaimer { font-size: 8pt; }
  .do-dist { break-inside: avoid; padding: 6pt 8pt; }
  .do-chev { display: none; }
  .do-up { min-height: 0; padding: 3pt 0; }
}
