/* ==========================================================================
   Office Toolkit — shared stylesheet
   Plain CSS. No build step, no external fonts, no frameworks.
   ========================================================================== */

/* --- Design tokens ------------------------------------------------------ */
:root {
  --bg:            #f4f6f8;
  --bg-grad:       #eef1f5;
  --surface:       #ffffff;
  --surface-2:     #f8fafb;
  --surface-3:     #eef2f6;
  --border:        #dde3ea;
  --border-strong: #c3ccd6;
  --text:          #171c23;
  --text-muted:    #5a6673;
  --text-faint:    #8b95a1;
  --accent:        #1f6feb;
  --accent-hover:  #1a5ecb;
  --accent-soft:   #e9f0fe;
  --accent-text:   #ffffff;
  --ok:            #14713d;
  --ok-soft:       #e4f3ea;
  --warn:          #8a5a00;
  --warn-soft:     #fdf1dc;
  --err:           #bb2f26;
  --err-soft:      #fdecea;
  --shadow-sm:     0 1px 2px rgba(16,24,40,.06), 0 1px 3px rgba(16,24,40,.05);
  --shadow-md:     0 2px 6px rgba(16,24,40,.07), 0 8px 20px rgba(16,24,40,.06);
  --radius:        10px;
  --radius-sm:     7px;
  --radius-lg:     14px;
  --wrap:          1140px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
          Arial, "Noto Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas,
          "Liberation Mono", "Courier New", monospace;
}

[data-theme="dark"] {
  --bg:            #0e1216;
  --bg-grad:       #12171d;
  --surface:       #171d24;
  --surface-2:     #1c232b;
  --surface-3:     #232b34;
  --border:        #2a323b;
  --border-strong: #3b444f;
  --text:          #e5e9ee;
  --text-muted:    #9fa9b5;
  --text-faint:    #78838f;
  --accent:        #5b9dff;
  --accent-hover:  #7db0ff;
  --accent-soft:   #17263d;
  --accent-text:   #0c1218;
  --ok:            #58c98a;
  --ok-soft:       #12271c;
  --warn:          #e0b055;
  --warn-soft:     #2a2213;
  --err:           #f28b82;
  --err-soft:      #2c1817;
  --shadow-sm:     0 1px 2px rgba(0,0,0,.35);
  --shadow-md:     0 2px 6px rgba(0,0,0,.35), 0 10px 24px rgba(0,0,0,.3);
}

/* --- Base --------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  background-image: linear-gradient(var(--bg-grad), var(--bg) 320px);
  background-repeat: no-repeat;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

h1, h2, h3, h4 { margin: 0; line-height: 1.25; font-weight: 650; letter-spacing: -.011em; }
h1 { font-size: 1.65rem; }
h2 { font-size: 1.06rem; }
h3 { font-size: .95rem; }
p  { margin: 0; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.wrap.narrow { max-width: 880px; }

.muted  { color: var(--text-muted); }
.faint  { color: var(--text-faint); }
.small  { font-size: .855rem; }
.mono   { font-family: var(--mono); }
.nowrap { white-space: nowrap; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* --- Site header -------------------------------------------------------- */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 40;
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  font-weight: 650;
  letter-spacing: -.01em;
  margin-right: auto;
}
.brand:hover { text-decoration: none; }

.brand-mark {
  display: grid;
  place-items: center;
  width: 28px; height: 28px;
  border-radius: 7px;
  background: var(--accent);
  color: var(--accent-text);
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .02em;
}

.header-actions { display: flex; align-items: center; gap: 10px; }

.privacy-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .755rem;
  font-weight: 550;
  color: var(--ok);
  background: var(--ok-soft);
  border: 1px solid transparent;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.privacy-pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 34px; height: 34px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
  cursor: pointer;
  padding: 0;
}
.icon-btn:hover { background: var(--surface-3); color: var(--text); }
.icon-btn svg { width: 17px; height: 17px; }

/* --- Dashboard hero ----------------------------------------------------- */
.hero { padding: 44px 0 26px; }
.hero h1 { font-size: 2rem; }
.hero .lede { margin-top: 9px; color: var(--text-muted); max-width: 60ch; }

.search-row {
  margin-top: 22px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.search-box { position: relative; flex: 1 1 340px; max-width: 460px; }
.search-box svg {
  position: absolute; left: 12px; top: 50%;
  transform: translateY(-50%);
  width: 16px; height: 16px;
  color: var(--text-faint);
  pointer-events: none;
}
/* Typed selector so the generic input[type="search"] rule further down this
   sheet cannot win on specificity and squash the padding under the icon. */
.search-box input[type="search"] {
  width: 100%;
  padding: 11px 12px 11px 36px;
  font: inherit;
  font-size: .95rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
}
.search-box input[type="search"]::placeholder { color: var(--text-faint); }
.search-box input[type="search"]:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }

.search-count { font-size: .84rem; color: var(--text-muted); }

kbd {
  font-family: var(--font);
  font-size: .72rem;
  border: 1px solid var(--border-strong);
  border-bottom-width: 2px;
  border-radius: 5px;
  padding: 1px 5px;
  background: var(--surface);
  color: var(--text-muted);
}

/* --- Tool grid ---------------------------------------------------------- */
main { flex: 1 0 auto; padding-bottom: 56px; }

.cat { margin-top: 34px; }

.cat-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  padding-bottom: 10px;
  margin-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.cat-head h2 { font-size: .82rem; text-transform: uppercase; letter-spacing: .07em; color: var(--text-muted); }
.cat-head .cat-note { font-size: .82rem; color: var(--text-faint); }

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(238px, 1fr));
  gap: 12px;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 5px;
  padding: 15px 16px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  color: var(--text);
  transition: border-color .13s, box-shadow .13s, transform .13s;
}
a.tool-card:hover {
  text-decoration: none;
  border-color: var(--accent);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.tool-card .ico {
  width: 20px; height: 20px;
  color: var(--accent);
  margin-bottom: 4px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.tool-name { font-weight: 600; font-size: .945rem; letter-spacing: -.008em; }
.tool-desc { font-size: .84rem; color: var(--text-muted); line-height: 1.45; }

.tool-card.is-soon { opacity: .62; box-shadow: none; background: var(--surface-2); }
.tool-card.is-soon .ico { color: var(--text-faint); }

.badge {
  position: absolute;
  top: 12px; right: 12px;
  font-size: .66rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-muted);
  background: var(--surface-3);
  border-radius: 999px;
  padding: 2px 8px;
}

.empty-state {
  display: none;
  margin-top: 40px;
  padding: 34px;
  text-align: center;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
}
.is-empty .empty-state { display: block; }

[hidden] { display: none !important; }

/* --- Tool pages --------------------------------------------------------- */
.breadcrumb { padding-top: 20px; font-size: .855rem; }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--accent); }

.tool-head { padding: 12px 0 22px; }
.tool-head h1 { font-size: 1.55rem; }
.tool-head .lede { margin-top: 7px; color: var(--text-muted); }

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 20px;
  margin-bottom: 16px;
}
.card > h2 {
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-muted);
  margin-bottom: 14px;
}

/* --- Forms -------------------------------------------------------------- */
.field { margin-bottom: 15px; }
.field:last-child { margin-bottom: 0; }

.field > label,
.field-label {
  display: block;
  font-size: .855rem;
  font-weight: 560;
  margin-bottom: 6px;
  color: var(--text);
}

.field .hint { display: block; font-size: .79rem; color: var(--text-faint); margin-top: 5px; }

input[type="text"], input[type="number"], input[type="date"], input[type="time"],
input[type="search"], input[type="password"], select, textarea {
  width: 100%;
  font: inherit;
  font-size: .93rem;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 9px 11px;
}
textarea { resize: vertical; min-height: 120px; line-height: 1.5; }
select { cursor: pointer; }

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

input.is-invalid, select.is-invalid, textarea.is-invalid {
  border-color: var(--err);
  background: var(--err-soft);
}
input.is-invalid:focus, select.is-invalid:focus, textarea.is-invalid:focus {
  box-shadow: 0 0 0 3px var(--err-soft);
}

.err-msg {
  display: none;
  margin-top: 5px;
  font-size: .8rem;
  font-weight: 500;
  color: var(--err);
}
.err-msg.is-shown { display: block; }

.form-error {
  display: none;
  margin-bottom: 15px;
  padding: 10px 12px;
  font-size: .865rem;
  color: var(--err);
  background: var(--err-soft);
  border: 1px solid var(--err);
  border-radius: var(--radius-sm);
}
.form-error.is-shown { display: block; }

/* A page-level notice, such as a CDN library failing to load. Deliberately not
   a .form-error: OT.formError() writes to the first .form-error on the page,
   and it must not overwrite or hide behind this one. */
.lib-error {
  display: block;
  margin-bottom: 16px;
  padding: 12px 14px;
  font-size: .875rem;
  line-height: 1.5;
  color: var(--err);
  background: var(--err-soft);
  border: 1px solid var(--err);
  border-radius: var(--radius-sm);
}

.input-group { display: flex; }
.input-group input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); }
.input-group .addon {
  display: grid;
  place-items: center;
  padding: 0 12px;
  font-size: .86rem;
  color: var(--text-muted);
  background: var(--surface-3);
  border: 1px solid var(--border-strong);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  white-space: nowrap;
}

.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.row-3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }

.check {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  font-size: .885rem;
  cursor: pointer;
}
.check input { width: 16px; height: 16px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; }

/* Row of day-of-week toggles (working days). The checkbox itself is hidden
   and the label becomes the visible chip. */
.day-picker { display: flex; flex-wrap: wrap; gap: 7px; }
.day-picker label {
  cursor: pointer;
  user-select: none;
}
.day-picker input { position: absolute; opacity: 0; width: 0; height: 0; }
.day-picker span {
  display: inline-block;
  min-width: 52px;
  text-align: center;
  font-size: .855rem;
  font-weight: 540;
  padding: 7px 12px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text-muted);
}
.day-picker input:checked + span {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}
.day-picker input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.day-picker label:hover span { border-color: var(--accent); }

.seg { display: inline-flex; background: var(--surface-3); border-radius: var(--radius-sm); padding: 3px; gap: 3px; }
.seg button {
  font: inherit; font-size: .855rem; font-weight: 540;
  border: 0; background: transparent; color: var(--text-muted);
  padding: 6px 13px; border-radius: 5px; cursor: pointer;
}
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }

/* --- Buttons ------------------------------------------------------------ */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.actions.flush { margin-top: 0; padding-top: 0; border-top: 0; }
.actions .spacer { margin-left: auto; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font: inherit;
  font-size: .89rem;
  font-weight: 560;
  padding: 9px 15px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
  white-space: nowrap;
}
.btn:hover { background: var(--surface-3); text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }

.btn.ghost { border-color: transparent; background: transparent; color: var(--text-muted); }
.btn.ghost:hover { background: var(--surface-3); color: var(--text); }

.btn.small { font-size: .82rem; padding: 6px 11px; }

/* A wrapping set of equal-width action buttons (case converter, unit picker). */
.btn-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
}
.btn-grid .btn { width: 100%; }
.btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* --- Results ------------------------------------------------------------ */
.result-card { background: var(--surface-2); }

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1px;
  background: var(--border);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}
/* Flex + auto margin keeps the numbers on one baseline even when a label wraps. */
.stat { background: var(--surface); padding: 13px 15px; display: flex; flex-direction: column; }
.stat dt { font-size: .755rem; text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); }
.stat dd {
  margin: auto 0 0;
  padding-top: 3px;
  font-size: 1.32rem;
  font-weight: 620;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.stat dd small { font-size: .8rem; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.stat.is-primary { background: var(--accent-soft); }
.stat.is-primary dd { color: var(--accent); }

.readout {
  font-size: 1.05rem;
  line-height: 1.7;
  padding: 14px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  word-break: break-word;
}

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 18px; font-size: .9rem; }
.kv dt { color: var(--text-muted); }
.kv dd { margin: 0; font-weight: 550; text-align: right; font-variant-numeric: tabular-nums; }

.note {
  font-size: .82rem;
  color: var(--text-muted);
  background: var(--surface-3);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  margin-top: 14px;
}

.result-placeholder { color: var(--text-faint); font-size: .9rem; }

/* --- Tables ------------------------------------------------------------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  max-height: 420px;
  overflow-y: auto;
}
table { width: 100%; border-collapse: collapse; font-size: .855rem; }
thead th {
  position: sticky; top: 0;
  background: var(--surface-3);
  text-align: right;
  font-weight: 600;
  font-size: .76rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-muted);
  padding: 9px 12px;
  white-space: nowrap;
  border-bottom: 1px solid var(--border);
}
thead th:first-child, tbody td:first-child { text-align: left; }
/* Numbers read best right-aligned, words do not — mark text columns with this. */
th.txt, td.txt { text-align: left; }
td.wrap-text { white-space: normal; min-width: 12ch; }
tbody td {
  padding: 8px 12px;
  text-align: right;
  border-bottom: 1px solid var(--border);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:nth-child(even) td { background: var(--surface-2); }

details.schedule { margin-top: 16px; }
details.schedule > summary {
  cursor: pointer;
  font-size: .875rem;
  font-weight: 550;
  color: var(--accent);
  list-style: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
details.schedule > summary::-webkit-details-marker { display: none; }
details.schedule > summary::before { content: "▸"; font-size: .8em; }
details.schedule[open] > summary::before { content: "▾"; }
details.schedule > *:not(summary) { margin-top: 12px; }

/* --- Progress bar ------------------------------------------------------- */
.progress {
  height: 8px;
  background: var(--surface-3);
  border-radius: 999px;
  overflow: hidden;
}
.progress > span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--accent);
  border-radius: 999px;
  transition: width .2s ease;
}
.progress.is-done > span { background: var(--ok); }

/* --- Range slider ------------------------------------------------------- */
input[type="range"] {
  width: 100%;
  height: 22px;
  margin: 0;
  padding: 0;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}
input[type="range"]::-webkit-slider-runnable-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
}
input[type="range"]::-moz-range-track {
  height: 5px;
  border-radius: 999px;
  background: var(--surface-3);
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 17px; height: 17px;
  margin-top: -6px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: var(--shadow-sm);
}
input[type="range"]::-moz-range-thumb {
  width: 17px; height: 17px;
  border: 0;
  border-radius: 50%;
  background: var(--accent);
}
input[type="range"]:focus-visible::-webkit-slider-thumb { outline: 2px solid var(--accent); outline-offset: 2px; }

/* --- Item list (checklist, picker results, note list) ------------------- */
.item-list { list-style: none; margin: 0; padding: 0; }
.item-list li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--surface);
  margin-bottom: 7px;
}
.item-list li:last-child { margin-bottom: 0; }
.item-list li.is-done .item-text { text-decoration: line-through; color: var(--text-faint); }
.item-list input[type="checkbox"] { width: 17px; height: 17px; margin: 2px 0 0; accent-color: var(--accent); cursor: pointer; flex: none; }
.item-text { flex: 1 1 auto; word-break: break-word; font-size: .92rem; }
.item-list .item-btn {
  flex: none;
  border: 0;
  background: transparent;
  color: var(--text-faint);
  font: inherit;
  font-size: 1.05rem;
  line-height: 1;
  padding: 2px 6px;
  border-radius: 5px;
  cursor: pointer;
}
.item-list .item-btn:hover { background: var(--err-soft); color: var(--err); }

.empty-list {
  padding: 22px;
  text-align: center;
  font-size: .89rem;
  color: var(--text-faint);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
}

/* --- Toast -------------------------------------------------------------- */
.toast-host {
  position: fixed;
  left: 50%;
  bottom: 26px;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  align-items: center;
  pointer-events: none;
}
.toast {
  font-size: .875rem;
  font-weight: 540;
  padding: 9px 16px;
  border-radius: 999px;
  background: var(--text);
  color: var(--surface);
  box-shadow: var(--shadow-md);
  animation: toast-in .16s ease-out;
}
.toast.is-err { background: var(--err); color: #fff; }
@keyframes toast-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* --- Footer ------------------------------------------------------------- */
.site-footer {
  flex-shrink: 0;
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 22px 0;
  font-size: .855rem;
  color: var(--text-muted);
}
.site-footer strong { color: var(--text); font-weight: 600; }
.site-footer p + p { margin-top: 7px; }

/* --- 404 ---------------------------------------------------------------- */
.notfound { text-align: center; padding: 80px 0 60px; }
.notfound .code { font-size: 3.4rem; font-weight: 700; letter-spacing: -.03em; color: var(--accent); }
.notfound h1 { margin-top: 6px; }
.notfound p { margin-top: 10px; color: var(--text-muted); }
.notfound .actions { justify-content: center; border: 0; }

/* --- Responsive --------------------------------------------------------- */
@media (max-width: 720px) {
  body { font-size: 15px; }
  .wrap { padding: 0 15px; }
  .hero { padding: 30px 0 18px; }
  .hero h1 { font-size: 1.65rem; }
  .grid { grid-template-columns: 1fr; }
  .row, .row-3 { grid-template-columns: 1fr; }
  .privacy-pill { display: none; }
  .search-box { max-width: none; }
  /* Stack the section note under its heading instead of squeezing beside it. */
  .cat-head { flex-direction: column; align-items: flex-start; gap: 2px; }
  .cat-head h2 { white-space: nowrap; }
  .card { padding: 16px; }
  .actions .btn { flex: 1 1 auto; }
  .actions .spacer { margin-left: 0; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
