@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@500;600;700;800&family=Instrument+Sans:wght@400;500;600&family=Space+Mono:wght@400;700&display=swap');

/* ==========================================================================
   TDP Brand Design System — ported from the tdp-website source of truth.
   Editorial brutalism: warm paper, near-black ink, one gray, no accent hue.
   2px ink borders, 2px (near-sharp) corners, hard offset shadow on focus,
   invert-to-ink for emphasis. Shared by every admin surface.
   ========================================================================== */

:root {
  --paper:     #f4f3ef;
  --white:     #ffffff;
  --ink:       #0e0e0e;
  --ink-soft:  #2a2a28;
  --muted:     #6f6e69;
  --line:      rgba(14, 14, 14, 0.12);
  --line-soft: rgba(14, 14, 14, 0.07);

  --ok:    #1c6b3f;   /* deep green — used sparingly, on-paper */
  --warn:  #8a5a12;
  --bad:   #9a2723;

  --ease:   cubic-bezier(0.16, 1, 0.3, 1);
  --shadow: 4px 4px 0 0 var(--ink);
  --radius: 2px;

  --font-display: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-body:    'Instrument Sans', system-ui, sans-serif;
  --font-mono:    'Space Mono', ui-monospace, monospace;

  /* The accent slot — the same PAIR contract as the client-facing
     proposal.css: --accent is the field, --accent-ink the readable foreground
     for anything sitting on it. TDP ships it EMPTY, and empty means ink (this
     system's invert-to-ink emphasis), not transparent. Accent-free is a design
     position here, not an oversight. */
  --accent:     var(--ink);
  --accent-ink: var(--paper);
}

/* The admin chrome only ever restyles far enough to show WHICH BRAND new
   documents will be created in — it is not a full Animul reskin. The class is
   applied to <body> by the nav switcher's own script, so no admin template
   needs to change and TDP renders exactly as it does today. */
body.brand-animul {
  --accent:     #f5d94e;
  --accent-ink: #0f0e0a;
}

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

body.tdp {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

.tdp a { color: var(--ink); text-decoration: none; }
.tdp a:hover { opacity: 0.55; }

.wrap { max-width: 1180px; margin: 0 auto; padding: 0 40px; }
@media (max-width: 768px) { .wrap { padding: 0 22px; } }

/* ---- header -------------------------------------------------------------- */
.tdp-nav {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(140%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.tdp-nav-inner { display: flex; align-items: center; justify-content: space-between;
  gap: 24px; height: 72px; }
.tdp-nav img { height: 30px; width: auto; display: block; }
.tdp-nav .crumb {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
}

/* ---- typography ---------------------------------------------------------- */
.display { font-family: var(--font-display); font-weight: 800;
  letter-spacing: -0.03em; line-height: 1; }
h1.display { font-size: clamp(1.8rem, 3vw, 2.4rem); }

.eyebrow {
  font-family: var(--font-mono); font-size: 0.68rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px;
}
.eyebrow.rule::before { content: ""; width: 20px; height: 2px; background: var(--ink); }

.mono { font-family: var(--font-mono); }

/* ---- panels -------------------------------------------------------------- */
.panel {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
}
.panel.ink { background: var(--ink); color: var(--paper); }
.panel.ink .eyebrow { color: color-mix(in srgb, var(--paper) 60%, transparent); }
.panel-divider { border: 0; border-top: 1px solid var(--line); margin: 14px 0; }

/* ---- forms --------------------------------------------------------------- */
.field { display: block; }
.field > label, .lbl {
  display: block; margin-bottom: 6px;
  font-family: var(--font-mono); font-size: 0.66rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink);
}
.input {
  width: 100%; font-family: var(--font-body); font-size: 0.95rem; color: var(--ink);
  background: var(--white); border: 1px solid var(--line); border-radius: 3px;
  padding: 11px 13px; appearance: none;
  transition: background 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}
.input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.input:focus { outline: none; background: var(--white); border-color: var(--ink);
  box-shadow: 3px 3px 0 0 var(--ink); }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%),
                    linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 16px) 55%, calc(100% - 11px) 55%;
  background-size: 5px 5px, 5px 5px; background-repeat: no-repeat;
  padding-right: 34px; cursor: pointer;
}

/* ---- buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  letter-spacing: 0; text-transform: none;
  padding: 9px 15px; border: 1px solid var(--line); border-radius: var(--radius);
  background: transparent; color: var(--ink); cursor: pointer; text-decoration: none;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease,
              transform 0.15s var(--ease), box-shadow 0.15s var(--ease);
}
.btn:hover { background: var(--white); border-color: var(--ink); opacity: 1; }
.btn:active { background: var(--paper); }
.btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.btn.primary:hover {
  background: var(--ink);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 0 color-mix(in srgb, var(--ink) 35%, transparent);
}
.btn.primary:active { transform: translate(0, 0); box-shadow: none; }
/* Destructive confirm — primary's weight in the warning colour, so the
   committing click in a two-step delete is unmistakable. */
.btn.danger { background: var(--bad); color: var(--paper); border-color: var(--bad); }
.btn.danger:hover {
  background: var(--bad);
  transform: translate(-2px, -2px);
  box-shadow: 3px 3px 0 0 color-mix(in srgb, var(--bad) 35%, transparent);
}
.btn.danger:active { transform: translate(0, 0); box-shadow: none; }
.btn.small { padding: 6px 11px; font-size: 0.76rem; }

/* Prompt text beside an inline confirmation ("SURE?") — the mono voice the
   rest of the chrome uses, kept quiet so the buttons carry the decision.
   Shared: documents list, inquiries list. */
.pop-label {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  padding-left: 5px;
}

/* ---- stat readouts ------------------------------------------------------- */
.stat-num { font-family: var(--font-display); font-weight: 800; letter-spacing: -0.03em;
  font-size: clamp(1.5rem, 2.4vw, 2rem); line-height: 1; }

/* margin signal colors (used sparingly on the number itself) */
.sig-ok   { color: var(--ok); }
.sig-warn { color: var(--warn); }
.sig-bad  { color: var(--bad); }

/* ---- nav links (shared header) ------------------------------------------ */
.tdp-nav-links { display: flex; align-items: center; gap: 26px; }
.tdp-nav-links a { font-family: var(--font-body); font-weight: 600; font-size: 0.86rem;
  letter-spacing: -0.01em; }
.tdp-nav-links a.active { border-bottom: 2px solid var(--ink); }
@media (max-width: 720px) { .tdp-nav-links { gap: 16px; font-size: 0.78rem; } }

/* ==========================================================================
   App shell — one shared left sidebar + flex content.
   Used by every admin surface: bookkeeping pages, estimator, and the SPA.
   ========================================================================== */
body.tdp.app-shell { display: flex; min-height: 100vh; }

.sidebar {
  flex: 0 0 240px;
  width: 240px;
  align-self: stretch;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  background: color-mix(in srgb, var(--paper) 55%, var(--white));
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  padding: 22px 0 14px;
  z-index: 40;
}

.sidebar-logo { padding: 0 20px; margin-bottom: 22px; }
.sidebar-logo img { height: 26px; width: auto; display: block; }

.sidebar-actions {
  padding: 0 14px; margin-bottom: 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.sidebar-actions .btn {
  width: 100%; justify-content: flex-start;
  font-family: var(--font-body); font-weight: 600; font-size: 0.82rem;
  text-transform: none; letter-spacing: 0;
  border: 1px solid var(--line); border-radius: var(--radius); padding: 9px 13px;
}
.sidebar-actions .btn:hover { transform: none; box-shadow: none; background: var(--white); }
.sidebar-actions .btn.primary { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.sidebar-actions .btn.primary:hover { background: var(--ink-soft); }

/* ---- global search (⌘K palette) ----------------------------------------- */
/* The trigger reads as a quiet faux input, not a button — it opens the real
   one. Sits between the create actions and the nav. */
.sidebar-search {
  display: flex; align-items: center; gap: 8px;
  margin: 0 14px 20px; padding: 8px 12px; width: calc(100% - 28px);
  font-family: var(--font-body); font-size: 0.8rem; color: var(--muted);
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  cursor: pointer; text-align: left;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.sidebar-search:hover { border-color: var(--ink); color: var(--ink); }
.sidebar-search:focus-visible { outline: none; border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(14, 14, 14, 0.07); }
.sidebar-search svg { width: 13px; height: 13px; flex: 0 0 auto; }
.gs-kbd {
  margin-left: auto; font-family: var(--font-mono); font-size: 0.58rem;
  font-weight: 700; letter-spacing: 0.06em; color: var(--muted);
  border: 1px solid var(--line); border-radius: 3px; padding: 1px 5px;
}

.gs-backdrop {
  position: fixed; inset: 0; background: rgba(14, 14, 14, 0.28); z-index: 90;
  display: flex; align-items: flex-start; justify-content: center;
  padding: 12vh 20px 20px;
}
/* display:flex above would silently beat the UA's [hidden]{display:none} —
   author rules outrank UA rules regardless of specificity. */
.gs-backdrop[hidden] { display: none; }
.gs-panel {
  width: 100%; max-width: 580px; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 8px 30px rgba(14, 14, 14, 0.14); overflow: hidden;
}
.gs-input {
  width: 100%; box-sizing: border-box; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; padding: 16px 18px;
  font-family: var(--font-body); font-size: 1rem; color: var(--ink);
}
.gs-input::placeholder { color: color-mix(in srgb, var(--muted) 72%, transparent); }
.gs-input:focus { outline: none; }
.gs-results { max-height: 55vh; overflow-y: auto; padding: 4px 0 10px; }
.gs-group {
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted);
  padding: 14px 18px 6px;
}
.gs-item {
  display: flex; align-items: baseline; gap: 10px;
  padding: 8px 18px; color: var(--ink); text-decoration: none;
}
.gs-item.active { background: var(--paper); }
.gs-item .t { font-weight: 600; font-size: 0.88rem; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.gs-item .s { font-family: var(--font-mono); font-size: 0.66rem; color: var(--muted);
  flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.gs-item .b { font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; }
.gs-hint {
  font-family: var(--font-mono); font-size: 0.68rem; color: var(--muted);
  padding: 16px 18px; letter-spacing: 0.02em;
}

.sidebar-nav { flex: 1; padding: 0; overflow-y: auto; }

.sidebar-group {
  font-family: var(--font-mono); font-weight: 700;
  font-size: 0.6rem; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--muted);
  padding: 16px 20px 7px;
}
.sidebar-group:first-child { padding-top: 4px; }

/* Collapsible group header (Bookkeeping) — looks like .sidebar-group, acts as a button */
.sidebar-group-toggle {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; background: none; border: 0; cursor: pointer; text-align: left;
}
.sidebar-group-toggle:hover { color: var(--ink); }
.sidebar-group-toggle .bk-chevron {
  font-size: 1rem; line-height: 1; transition: transform 0.15s var(--ease);
  transform: rotate(0deg);
}
.sidebar-group-toggle.open .bk-chevron { transform: rotate(90deg); }
.sidebar-collapsible[hidden] { display: none; }

.sidebar-nav a {
  display: flex; align-items: center; gap: 9px;
  margin: 1px 10px; padding: 7px 11px; border-radius: var(--radius);
  font-family: var(--font-body); font-size: 0.85rem; font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--muted); text-decoration: none; cursor: pointer;
  transition: color 0.12s, background 0.12s;
}
.sidebar-nav a:hover { color: var(--ink); background: var(--line-soft); opacity: 1; }
/* Active item inverts to ink — the system's stated emphasis move */
.sidebar-nav a.active { color: var(--paper); background: var(--ink); }
.sidebar-nav a .ext { font-size: 0.7rem; opacity: 0.5; margin-left: auto; }
.sidebar-nav a:hover .ext { opacity: 0.8; }

/* Index numerals — they're also live shortcuts (press 1–9 to jump) */
.sidebar-nav a .nav-idx {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.06em; color: var(--muted); opacity: 0.55;
  width: 16px; flex: none;
}
.sidebar-nav a:hover .nav-idx { color: var(--ink); opacity: 0.9; }
.sidebar-nav a.active .nav-idx { color: var(--paper); opacity: 0.75; }

/* Editorial empty state — eyebrow + human line + optional CTA */
.empty-state { padding: 34px 0 26px; }
.empty-state .es-eyebrow {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  display: inline-flex; align-items: center; gap: 10px; margin-bottom: 10px;
}
.empty-state .es-eyebrow::before { content: ""; width: 20px; height: 2px; background: var(--ink); }
.empty-state .es-line {
  font-family: var(--font-display); font-weight: 700; letter-spacing: -0.02em;
  font-size: 1.15rem; color: var(--ink); margin: 0 0 4px;
}
.empty-state .es-sub { font-size: 0.88rem; color: var(--muted); margin: 0 0 16px; }


.sidebar-footer {
  padding: 12px 20px 2px; margin-top: 6px;
  border-top: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted);
}

/* Content child — fills remaining width, scrolls independently */
.app-shell > main,
.app-shell > .main-content {
  flex: 1 1 auto;
  min-width: 0;
}

/* Mobile slide-in sidebar + hamburger */
.sidebar-backdrop {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.32);
  z-index: 45;
}
.sidebar-toggle {
  display: none;
  position: fixed; top: 14px; left: 14px;
  z-index: 60;
  width: 40px; height: 40px;
  align-items: center; justify-content: center;
  background: var(--paper); color: var(--ink);
  border: 2px solid var(--ink); border-radius: var(--radius);
  cursor: pointer;
}
.sidebar-toggle svg { width: 20px; height: 20px; }

@media (max-width: 860px) {
  .sidebar {
    position: fixed; left: -260px; top: 0;
    transition: left 0.25s var(--ease);
  }
  .sidebar.open { left: 0; box-shadow: 4px 0 22px rgba(0,0,0,0.14); }
  .sidebar-backdrop.open { display: block; }
  .sidebar-toggle { display: inline-flex; }
  /* keep page content clear of the fixed hamburger */
  .app-shell > main,
  .app-shell > .main-content { padding-top: 8px; }
}

/* ---- chips / stat cards -------------------------------------------------- */
.chip { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white);
  padding: 16px 18px; }
.chip .lbl { margin-bottom: 6px; }

/* ---- tables -------------------------------------------------------------- */
.tdp-table { width: 100%; border-collapse: collapse; border: 0;
  background: transparent; font-size: 0.9rem; }
.tdp-table thead th {
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted);
  text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.tdp-table tbody td { padding: 13px 14px; border-top: 1px solid rgba(14, 14, 14, 0.07); vertical-align: top; }
.tdp-table tbody tr:hover { background: var(--white); }

/* Horizontal scroll wrapper so wide tables don't clip off-page on mobile */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; }

/* ---- status badges (editorial tones, not neon) -------------------------- */
.badge { display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--font-mono); font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: none;
  padding: 4px 10px; border: 0; border-radius: 999px;
  background: rgba(14, 14, 14, 0.06); color: var(--muted); }
.badge.muted   { background: rgba(14, 14, 14, 0.06); color: var(--muted); }
.badge.ok      { background: rgba(28, 107, 63, 0.10);  color: var(--ok); }
.badge.warn    { background: rgba(138, 90, 18, 0.12);  color: var(--warn); }
.badge.bad     { background: rgba(154, 39, 35, 0.10);  color: var(--bad); }
.badge.solid   { background: var(--ink); color: var(--paper); }

/* ---- filter pills -------------------------------------------------------- */
.pill { font-family: var(--font-mono); font-size: 0.64rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; padding: 6px 13px;
  border: 1px solid var(--line); border-radius: 999px; background: transparent;
  color: var(--muted); cursor: pointer; transition: background .15s, color .15s, border-color .15s; }
.pill:hover { background: var(--white); color: var(--ink); }
.pill.active { background: var(--ink); color: var(--paper); border-color: var(--ink); }

/* ---- toast --------------------------------------------------------------- */
.toast { position: fixed; bottom: 24px; right: 24px; z-index: 80;
  background: var(--ink); color: var(--paper); border-radius: var(--radius);
  padding: 13px 18px; font-family: var(--font-mono); font-size: 0.72rem;
  letter-spacing: 0.04em; box-shadow: var(--shadow); }

/* ---- scrollbar ----------------------------------------------------------- */
.tdp ::-webkit-scrollbar { width: 8px; height: 8px; }
.tdp ::-webkit-scrollbar-thumb { background: var(--line); border-radius: 0; }

/* ---- brand switcher (sidebar) -------------------------------------------
   Sets the brand for NEWLY CREATED documents only. Each document's own brand
   is authoritative from then on and is edited in the document itself — this
   control can never restyle an existing document, least of all a sent one.
   The state lives in localStorage, never on the server, so there is no global
   render-time setting that could leak into a client-facing page.
   -------------------------------------------------------------------------- */
.brand-switch { padding: 0 14px; margin-bottom: 18px; }

.brand-switch .bs-label {
  font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.16em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 7px;
}

.brand-switch .bs-options {
  display: flex; border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden;
}

.brand-switch button {
  flex: 1; min-width: 0;
  padding: 6px 8px; border: 0; background: transparent; cursor: pointer;
  font-family: var(--font-mono); font-size: 0.6rem; font-weight: 700;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: background 0.15s, color 0.15s;
}
.brand-switch button:hover { color: var(--ink); background: var(--line-soft); }

/* The selected brand fills with its OWN accent. On TDP the slot is empty, so
   this is the invert-to-ink chip the rest of the chrome already uses; on Animul
   it is the yellow. The pair is what keeps the label readable in both. */
.brand-switch button[aria-pressed="true"],
.brand-switch button.bs-on {
  background: var(--accent); color: var(--accent-ink);
}

/* ---- date picker (datePicker component) ---------------------------------- */
.dp { position: relative; }
.dp-trigger { display: flex; align-items: center; justify-content: space-between; gap: 8px;
  width: 100%; cursor: pointer; text-align: left; }
.dp-trigger .dp-placeholder { color: var(--muted); }
.dp-trigger .dp-cal { color: var(--muted); font-size: 0.7rem; }
.dp-pop { position: absolute; z-index: 60; top: calc(100% + 6px); left: 0;
  width: 268px; background: var(--white); border: 1px solid var(--ink);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 12px; }
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.dp-head span { font-family: var(--font-mono); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.04em; color: var(--ink); }
.dp-head button { border: 0; background: none; cursor: pointer; font-size: 1.1rem; line-height: 1;
  color: var(--muted); padding: 2px 8px; border-radius: var(--radius); }
.dp-head button:hover { color: var(--ink); background: var(--paper); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-wd { font-family: var(--font-mono); font-size: 0.56rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--muted); text-align: center; padding: 4px 0; }
.dp-day { border: 0; background: none; cursor: pointer; aspect-ratio: 1; border-radius: var(--radius);
  font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); }
.dp-day:hover { background: var(--paper); }
.dp-day.dp-other { color: var(--muted); opacity: 0.45; }
.dp-day.dp-today { box-shadow: inset 0 0 0 1px var(--line); }
.dp-day.dp-sel { background: var(--ink); color: var(--white); }
/* Range variant (dateRangePicker): the field stays a text input — the calendar
   sits inside its right edge, so free text and picking share one control. */
.dp { --dp-band: color-mix(in srgb, var(--ink) 9%, var(--white)); }
.dp-input { padding-right: 2.2rem; }
.dp-icon { position: absolute; right: 8px; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center; padding: 2px;
  border: 0; background: none; cursor: pointer; color: var(--muted); line-height: 0;
  border-radius: var(--radius); transition: color 0.18s ease; }
.dp-icon:hover, .dp-icon[aria-expanded="true"] { color: var(--ink); }
/* The span reads as one band: the tint bridges the 2px grid gap with a shadow
   on each side, and the cells facing inward lose their rounding. */
.dp-day.dp-in { background: var(--dp-band); border-radius: 0;
  box-shadow: -2px 0 0 var(--dp-band), 2px 0 0 var(--dp-band); }
.dp-day.dp-edge-start { border-top-right-radius: 0; border-bottom-right-radius: 0;
  box-shadow: 2px 0 0 var(--dp-band); }
.dp-day.dp-edge-end { border-top-left-radius: 0; border-bottom-left-radius: 0;
  box-shadow: -2px 0 0 var(--dp-band); }
/* An uncommitted edge is the day under the cursor mid-pick — it carries the band
   tint rather than the ink fill, so the range reaches the cursor as you sweep. */
.dp-day.dp-edge-start:not(.dp-sel), .dp-day.dp-edge-end:not(.dp-sel) { background: var(--dp-band); }
.dp-hint { font-family: var(--font-mono); font-size: 0.58rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted);
  text-align: center; margin-top: 8px; }
.dp-foot { display: flex; justify-content: space-between; margin-top: 10px;
  border-top: 1px solid var(--line); padding-top: 8px; }
.dp-foot button { border: 0; background: none; cursor: pointer; font-family: var(--font-mono);
  font-size: 0.62rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase;
  color: var(--muted); }
.dp-foot button:hover { color: var(--ink); }
