/* Dos Búhos UI kit — shared by the Hub and, over time, every app behind it.
   Same palette and type as the Cellar Target Calendar: IBM Plex Sans for text, Barlow Condensed for names and
   headings, IBM Plex Mono for numbers. Colour carries meaning: each section has one hue, used as a stripe, never a wash. */

:root {
  --bg: var(--db-bg, #f4f3ef); --paper: var(--db-surface, #fffefb); --paper-2: var(--db-surface-2, #f8f6f1); --ink: var(--db-ink, #1f2426); --muted: var(--db-muted, #5d6568); --rule: var(--db-line, #dcd9d1); --dot: #d6d2c7;
  --accent: var(--db-accent, #6b2737); --accent-soft: var(--db-accent-soft, #f2e5e8);
  --now: #fff7e0; --now-rule: #b98f2f;
  --ok: var(--db-ok, #3d6a38); --ok-soft: var(--db-ok-soft, #e6efe2); --warn: var(--db-warn, #8f6200); --warn-soft: var(--db-warn-soft, #faefd3); --bad: var(--db-bad, #b42318); --bad-soft: var(--db-bad-soft, #fbe6e4);
  --bodega: #8b2437; --bodega-soft: #f7e1e6;
  --huerta: #3d6a38; --huerta-soft: #e6efe2;
  --hospitalidad: #8f6200; --hospitalidad-soft: #faefd3;
  --ventas: #2d5c8a; --ventas-soft: #e6eef7;
  --marketing: #5a4a8c; --marketing-soft: #ece8f6;
  --equipo: #1f7a74; --equipo-soft: #e0f1ef;
  --admin: #5d6568; --admin-soft: #ebe9e4;
  --f-body: var(--db-font-body, "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif);
  --f-display: var(--db-font-display, "Barlow Condensed", "Arial Narrow", "Helvetica Neue", sans-serif);
  --f-mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;
  --radius: var(--db-radius, 10px); --radius-sm: var(--db-radius-sm, 6px);
  --bw: var(--db-border, 1px); --tap: var(--db-tap, 44px); --w-display: var(--db-weight-display, 600); --w-body: var(--db-weight-body, 400);
  --shadow: 0 1px 0 rgba(31, 36, 38, .04), 0 6px 18px -12px rgba(31, 36, 38, .25);
  --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--db-bg, #141719); --paper: var(--db-surface, #1c2023); --paper-2: var(--db-surface-2, #22272a); --ink: var(--db-ink, #e9e7e2); --muted: var(--db-muted, #a2a9ac); --rule: var(--db-line, #343a3e); --dot: #2a2f33;
    --accent: var(--db-accent, #e08fa0); --accent-soft: var(--db-accent-soft, #3a2329);
    --now: #2a2616; --now-rule: #d9a93c;
    --ok: var(--db-ok, #9ccb8f); --ok-soft: var(--db-ok-soft, #1f2c1c); --warn: var(--db-warn, #e8c066); --warn-soft: var(--db-warn-soft, #342a13); --bad: var(--db-bad, #f1a7a0); --bad-soft: var(--db-bad-soft, #3c1f1c);
    --bodega: #e98ea0; --bodega-soft: #3a1f26;
    --huerta: #9ccb8f; --huerta-soft: #1f2c1c;
    --hospitalidad: #e8c066; --hospitalidad-soft: #342a13;
    --ventas: #8db7e2; --ventas-soft: #1e2b38;
    --marketing: #b9a8ec; --marketing-soft: #29233f;
    --equipo: #7fd1c8; --equipo-soft: #183230;
    --admin: #a2a9ac; --admin-soft: #2a2f33;
    --shadow: 0 1px 0 rgba(0, 0, 0, .3), 0 8px 24px -14px rgba(0, 0, 0, .7);
  }
}
:root[data-theme="dark"] {
  --bg: var(--db-bg, #141719); --paper: var(--db-surface, #1c2023); --paper-2: var(--db-surface-2, #22272a); --ink: var(--db-ink, #e9e7e2); --muted: var(--db-muted, #a2a9ac); --rule: var(--db-line, #343a3e); --dot: #2a2f33;
  --accent: var(--db-accent, #e08fa0); --accent-soft: var(--db-accent-soft, #3a2329);
  --now: #2a2616; --now-rule: #d9a93c;
  --ok: var(--db-ok, #9ccb8f); --ok-soft: var(--db-ok-soft, #1f2c1c); --warn: var(--db-warn, #e8c066); --warn-soft: var(--db-warn-soft, #342a13); --bad: var(--db-bad, #f1a7a0); --bad-soft: var(--db-bad-soft, #3c1f1c);
  --bodega: #e98ea0; --bodega-soft: #3a1f26;
  --huerta: #9ccb8f; --huerta-soft: #1f2c1c;
  --hospitalidad: #e8c066; --hospitalidad-soft: #342a13;
  --ventas: #8db7e2; --ventas-soft: #1e2b38;
  --marketing: #b9a8ec; --marketing-soft: #29233f;
  --equipo: #7fd1c8; --equipo-soft: #183230;
  --admin: #a2a9ac; --admin-soft: #2a2f33;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { overflow-x: clip; max-width: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: var(--w-body) var(--db-size-base, 15px)/1.45 var(--f-body); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
h1, h2, h3 { margin: 0; font-weight: 600; line-height: 1.1; }
.h-display { font-family: var(--f-display); font-weight: var(--w-display); letter-spacing: .005em; }
.num { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Theme: the Hub follows /theme.css (Diseño in admin). Every colour, font and shape above reads a --db- token with the
   original value as fallback, so the kit still works when theme.css is missing. */
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; animation: none !important; } }
/* The handwritten wordmark is black on transparent; in dark mode it is inverted. */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) img.wordmark-img { filter: invert(1); } }
:root[data-theme="dark"] img.wordmark-img { filter: invert(1); }

/* ---------- top bar ---------- */
.topbar { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: blur(10px); border-bottom: var(--bw) solid var(--rule); padding-top: var(--safe-t); }
.topbar-in { display: flex; align-items: center; gap: 14px; max-width: 1180px; margin: 0 auto; padding: 10px 16px; min-height: 54px; }
.topbar .wordmark { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.topbar .wordmark img { height: 22px; width: auto; display: block; }
.topbar .crumb { font-family: var(--f-display); font-size: 19px; font-weight: var(--w-display); color: var(--muted); white-space: nowrap; }
.topbar .crumb b { color: var(--ink); font-weight: 600; }
.topbar .spacer { flex: 1; }
.topbar .who { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 38vw; }
.topbar nav { display: flex; gap: 2px; white-space: nowrap; }
.topbar nav a { font-size: 13px; color: var(--muted); text-decoration: none; padding: 6px 8px; border-radius: var(--radius-sm); }
@media (max-width: 560px) { .topbar .who { display: none; } .topbar-in { gap: 10px; } }
.topbar nav a:hover, .topbar nav a[aria-current="page"] { color: var(--ink); background: var(--paper-2); }

.wrap { max-width: 1180px; margin: 0 auto; padding: 18px 16px calc(40px + var(--safe-b)); }

/* ---------- section heading (launcher, admin) ---------- */
.section-head { display: flex; align-items: baseline; gap: 10px; margin: 0 0 10px; padding-left: 12px; border-left: 4px solid var(--k, var(--rule)); }
.section-head h2 { font-family: var(--f-display); font-size: 22px; font-weight: var(--w-display); }
.section-head .count { font-size: 13px; color: var(--muted); }

/* section hues */
.k-bodega { --k: var(--bodega); --kb: var(--bodega-soft); }
.k-huerta { --k: var(--huerta); --kb: var(--huerta-soft); }
.k-hospitalidad { --k: var(--hospitalidad); --kb: var(--hospitalidad-soft); }
.k-ventas { --k: var(--ventas); --kb: var(--ventas-soft); }
.k-marketing { --k: var(--marketing); --kb: var(--marketing-soft); }
.k-equipo { --k: var(--equipo); --kb: var(--equipo-soft); }
.k-admin { --k: var(--admin); --kb: var(--admin-soft); }

/* ---------- chips, buttons ---------- */
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 500; line-height: 1.5; background: var(--paper-2); color: var(--muted); border: var(--bw) solid var(--rule); white-space: nowrap; }
.chip.k { background: var(--kb); color: var(--k); border-color: transparent; }
.chip.ok { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.chip.warn { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.chip.bad { background: var(--bad-soft); color: var(--bad); border-color: transparent; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 38px; padding: 0 14px; border-radius: var(--radius-sm); border: var(--bw) solid var(--rule); background: var(--paper); color: var(--ink); font: 500 14px var(--f-body); text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--muted); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--bad); }
.btn.sm { min-height: 30px; padding: 0 10px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; }
.btn-google { min-height: 50px; width: 100%; font-weight: 600; font-size: 15px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 4px; }
.field > span { font-size: 12.5px; color: var(--muted); }
input, select, textarea { font: 14px var(--f-body); color: var(--ink); background: var(--paper); border: var(--bw) solid var(--rule); border-radius: var(--radius-sm); padding: 8px 10px; min-height: 38px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
select.inline { min-height: 30px; padding: 3px 26px 3px 8px; width: auto; font-size: 13px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; }
.row .field { flex: 1 1 160px; }
.toggle { display: inline-flex; align-items: center; gap: 8px; font-size: 13.5px; cursor: pointer; }
.toggle input { width: auto; min-height: 0; margin: 0; accent-color: var(--accent); }

/* ---------- tables ---------- */
.table-wrap { overflow: auto; border: var(--bw) solid var(--rule); border-radius: var(--radius); background: var(--paper); }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th { text-align: left; font-weight: 500; font-size: 12px; color: var(--muted); padding: 10px 12px; border-bottom: var(--bw) solid var(--rule); background: var(--paper-2); white-space: nowrap; }
table.t td { padding: 9px 12px; border-bottom: var(--bw) solid var(--rule); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t td.num, table.t th.num { text-align: right; }
table.t .who { font-weight: 500; }
table.t .who small { display: block; color: var(--muted); font-weight: 400; }

/* ---------- panels, tabs, empty, toast ---------- */
.panel { background: var(--paper); border: var(--bw) solid var(--rule); border-radius: var(--radius); padding: 14px; }
.tabs { display: flex; flex-wrap: wrap; gap: 0 4px; border-bottom: var(--bw) solid var(--rule); margin: 0 0 16px; }
.tabs a { padding: 8px 12px; text-decoration: none; color: var(--muted); font-family: var(--f-display); font-size: 18px; font-weight: var(--w-display); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--ink); border-bottom-color: var(--accent); }
.empty { padding: 28px 16px; text-align: center; color: var(--muted); border: var(--bw) dashed var(--rule); border-radius: var(--radius); }
.empty b { display: block; color: var(--ink); font-family: var(--f-display); font-size: 20px; font-weight: var(--w-display); margin-bottom: 4px; }
.toast { position: fixed; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 14px; border-radius: var(--radius-sm); font-size: 13.5px; box-shadow: var(--shadow); z-index: 50; max-width: 92vw; }
.toast.bad { background: var(--bad); color: #fff; }
.stack { display: flex; flex-direction: column; gap: 14px; }
.between { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }

/* ---------- trend tiles (the infographic row every app gets) ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.tile { background: var(--paper); border: var(--bw) solid var(--rule); border-radius: var(--radius); padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.tile .label { font-size: 12px; color: var(--muted); }
.tile .value { font-family: var(--f-mono); font-size: 24px; line-height: 1.1; }
.tile .delta { font-size: 12px; color: var(--muted); }
.tile .delta.up { color: var(--ok); } .tile .delta.down { color: var(--bad); }
.tile svg.spark { width: 100%; height: 28px; margin-top: 4px; }
.tile svg.spark path { fill: none; stroke: var(--k, var(--accent)); stroke-width: 1.5; }
.tile svg.spark .area { fill: var(--k, var(--accent)); opacity: .12; stroke: none; }

/* ---------- sign-in ---------- */
body.login { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.login-card { width: min(380px, 100%); background: var(--paper); border: var(--bw) solid var(--rule); border-radius: 16px; padding: 30px 24px 24px; text-align: center; box-shadow: var(--shadow); }
.login-logo { width: 190px; height: auto; display: block; margin: 0 auto 10px; }
.login-sub { margin: 0 0 22px; color: var(--muted); }
.login-err { color: var(--bad); font-weight: 500; margin: 16px 0 0; }

/* ======================================================================
   Launcher (pass 1). Phone = one column of rows; ≥720px = grid of cards.
   ====================================================================== */
.home-head { display: flex; flex-direction: column; gap: 2px; margin: 4px 0 14px; }
.home-head h1 { font-family: var(--f-display); font-weight: var(--w-display); font-size: clamp(34px, 7vw, 46px); line-height: 1; letter-spacing: -.005em; }
.home-head .date { color: var(--muted); font-size: 15px; }
.home-head .date::first-letter { text-transform: uppercase; }
@media (min-width: 720px) { .home-head { flex-direction: row; align-items: baseline; gap: 16px; } }

.search { position: relative; display: block; margin: 0 0 22px; max-width: 560px; }
.search input { min-height: 48px; padding-left: 42px; font-size: 16px; border-radius: var(--radius); background: var(--paper); }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--muted); pointer-events: none; }
.search .clear { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); min-height: 40px; min-width: 40px; border: 0; background: none; color: var(--muted); font-size: 20px; cursor: pointer; border-radius: var(--radius-sm); }

/* section chips: phone only, sticky under the top bar */
.jump { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 18px; }
.jump a { flex: none; display: inline-flex; align-items: center; gap: 7px; min-height: 36px; padding: 0 12px; border: var(--bw) solid var(--rule); border-radius: 999px; background: var(--paper); text-decoration: none; font-size: 14px; font-weight: 500; }
.jump a::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--k); }
@media (min-width: 720px) { .jump { display: none; } }

.block-title { display: flex; align-items: baseline; gap: 10px; margin: 0 0 8px; font-family: var(--f-display); font-size: 21px; font-weight: var(--w-display); }
.block-title .count { font-family: var(--f-mono); font-size: 12px; font-weight: 400; color: var(--muted); }
.home-block { margin: 0 0 26px; scroll-margin-top: 120px; }
.home-block .section-head { margin-bottom: 8px; }

/* app rows (phone) / cards (desktop) */
.apps { display: flex; flex-direction: column; gap: 8px; }
@media (min-width: 720px) { .apps { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; } }
.app { position: relative; display: flex; align-items: center; gap: 12px; min-height: 68px; padding: 10px 6px 10px 16px; background: var(--paper); border: var(--bw) solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); }
.app::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 3px 3px 0; background: var(--k, var(--rule)); }
.app > a.open { position: absolute; inset: 0; border-radius: inherit; z-index: 1; }
.app > a.open:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
/* Theme: the Hub follows /theme.css (Diseño in admin). Every colour, font and shape above reads a --db- token with the
   original value as fallback, so the kit still works when theme.css is missing. */
.app:hover { border-color: color-mix(in srgb, var(--k) 50%, var(--rule)); }
.app .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.app .name { font-family: var(--f-display); font-size: 21px; font-weight: var(--w-display); line-height: 1.05; }
.app .desc { font-size: 13px; line-height: 1.35; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.app .meta { display: flex; align-items: center; gap: 8px; margin-top: 4px; flex-wrap: wrap; }
.app .fav { position: relative; z-index: 2; flex: none; width: 48px; height: 48px; display: grid; place-items: center; border: 0; background: none; color: var(--muted); border-radius: var(--radius-sm); cursor: pointer; }
.app .fav svg { width: 22px; height: 22px; }
.app .fav[aria-pressed="true"] { color: var(--now-rule); }
.app .fav:hover { background: var(--paper-2); }
@media (min-width: 720px) {
  .app { flex-direction: column; align-items: stretch; min-height: 150px; padding: 14px 14px 12px 18px; gap: 6px; }
  .app::before { top: 0; bottom: 0; border-radius: 0; }
  .app .fav { position: absolute; top: 4px; right: 4px; width: 40px; height: 40px; }
  .app .name { font-size: 22px; padding-right: 34px; }
  .app .meta { margin-top: auto; }
}

/* the live number + sparkline an app can report */
.stat { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: 10px; align-items: center; }
.stat svg { grid-row: 1 / span 2; width: 64px; height: 26px; }
.stat svg path { fill: none; stroke: var(--k); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }
.stat svg circle { fill: var(--k); }
.stat .top { display: flex; align-items: baseline; gap: 8px; }
.stat .v { font-family: var(--f-mono); font-size: 18px; font-weight: 500; line-height: 1.1; }
.stat .d { font-size: 12px; font-family: var(--f-mono); white-space: nowrap; }
.stat .d.good { color: var(--ok); } .stat .d.bad { color: var(--bad); }
.stat .l { font-size: 12px; color: var(--muted); line-height: 1.3; }
.ext { font-size: 12px; color: var(--muted); display: inline-flex; align-items: center; gap: 4px; }
.ext svg { width: 13px; height: 13px; }

/* recents and favourites: stacked rows on phone, grid on desktop */
.recents { display: flex; flex-direction: column; gap: 8px; }
.recents a { position: relative; display: flex; flex-direction: row; align-items: baseline; justify-content: space-between; gap: 10px; min-height: 52px; align-items: center; padding: 8px 12px 8px 16px; background: var(--paper); border: var(--bw) solid var(--rule); border-radius: var(--radius); text-decoration: none; box-shadow: var(--shadow); }
.recents a::before { content: ""; position: absolute; left: 0; top: 8px; bottom: 8px; width: 4px; border-radius: 0 3px 3px 0; background: var(--k); }
.recents a b { font-family: var(--f-display); font-size: 18px; font-weight: var(--w-display); line-height: 1.05; }
.recents a small { font-size: 12px; color: var(--muted); }
@media (min-width: 720px) { .recents { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); } }

/* what's not usable yet: one quiet line per section */
.later { margin-top: 8px; border-top: var(--bw) dashed var(--rule); }
.later summary { list-style: none; display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 4px; cursor: pointer; color: var(--muted); font-size: 13.5px; }
.later summary::-webkit-details-marker { display: none; }
.later summary::before { content: ""; width: 7px; height: 7px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform .15s; margin: 0 4px 0 2px; }
.later[open] summary::before { transform: rotate(45deg); }
.later summary .names { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.later ul { list-style: none; margin: 0 0 6px; padding: 0 0 0 24px; display: grid; gap: 2px; }
.later li { display: flex; align-items: baseline; gap: 10px; padding: 6px 0; font-size: 14px; }
.later li b { font-weight: 500; }
.later li span { color: var(--muted); font-size: 12.5px; }
.later li .chip { margin-left: auto; flex: none; }

/* loading skeleton and the no-results line */
.skel { height: 68px; border-radius: var(--radius); background: linear-gradient(90deg, var(--paper-2), var(--paper), var(--paper-2)); background-size: 200% 100%; animation: skel 1.2s ease-in-out infinite; border: var(--bw) solid var(--rule); }
@keyframes skel { from { background-position: 100% 0; } to { background-position: -100% 0; } }
.noresults { padding: 22px 4px; color: var(--muted); }
.noresults b { color: var(--ink); }
.offline { margin: 0 0 14px; padding: 10px 12px; border-radius: var(--radius-sm); background: var(--warn-soft); color: var(--warn); font-size: 14px; }

/* ======================================================================
   Pass 2: segmented role picker, avatars, back link, placeholder panels
   ====================================================================== */
.seg { display: inline-flex; flex-wrap: wrap; border: var(--bw) solid var(--rule); border-radius: var(--radius-sm); background: var(--paper-2); padding: 2px; gap: 2px; }
.seg button { min-height: 40px; min-width: 44px; padding: 0 12px; border: 0; border-radius: 4px; background: none; color: var(--muted); font: 500 13.5px var(--f-body); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1.5px var(--ink); }
.seg.full { display: grid; grid-template-columns: repeat(4, 1fr); width: 100%; }
@media (min-width: 640px) { .seg.full { display: inline-grid; width: auto; grid-template-columns: repeat(4, auto); } }
.seg button[aria-pressed="true"][data-v="admin"] { color: var(--accent); box-shadow: 0 0 0 1.5px var(--accent); }
.seg button[aria-pressed="true"][data-v=""] { color: var(--muted); box-shadow: 0 0 0 1px var(--rule); font-weight: 500; }
.seg button:disabled { opacity: .5; cursor: default; }
.avatar { flex: none; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); font: 600 15px var(--f-body); letter-spacing: .02em; }
.avatar.lg { width: 52px; height: 52px; font-size: 19px; }
.avatar.off { background: var(--paper-2); color: var(--muted); }
.back { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; color: var(--muted); text-decoration: none; font-size: 14px; background: none; border: 0; padding: 0; cursor: pointer; font-family: inherit; }
.future { display: grid; gap: 12px; }
.future .lead { max-width: 60ch; }
.future .ghost { display: grid; gap: 8px; }
.future .ghost > div { display: flex; align-items: center; gap: 12px; min-height: 56px; padding: 10px 14px; background: var(--paper); border: var(--bw) dashed var(--rule); border-radius: var(--radius); color: var(--muted); }
.future .ghost b { color: var(--ink); font-weight: 500; }
.future .ghost .r { margin-left: auto; text-align: right; font-size: 12.5px; }

@media (max-width: 560px) { .tabs { gap: 0; justify-content: space-between; } .tabs a { font-size: 16px; padding: 8px 4px; } }

/* ======================================================================
   Pass 3: fixes from the fresh-eyes review (contrast, focus, 44px targets)
   ====================================================================== */
:root { --on-accent: var(--db-on-accent, #fff); --field-rule: var(--db-line-strong, #8a9194); }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --on-accent: var(--db-on-accent, #141719); --field-rule: var(--db-line-strong, #6b7377); } }
:root[data-theme="dark"] { --on-accent: var(--db-on-accent, #141719); --field-rule: var(--db-line-strong, #6b7377); }
.btn.primary { color: var(--on-accent); }
.toast.bad { background: var(--bad-soft); color: var(--bad); border: 1px solid var(--bad); }
input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }
input, select, textarea, .seg { border-color: var(--field-rule); }
.topbar nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 10px; font-size: 14px; }
.topbar .wordmark { min-height: 44px; }
@media (max-width: 380px) { .topbar .crumb { display: none; } }
.jump { gap: 8px; } .jump a { min-height: 44px; }
.btn, .btn.sm, input, select, select.inline, .seg button { min-height: var(--tap); }
.tabs a { display: inline-flex; align-items: center; min-height: 44px; }
.search .clear { min-width: 44px; min-height: 44px; }
.toggle { min-height: 44px; } .toggle input { width: 22px; height: 22px; }
.seg button[aria-pressed="true"][data-v=""] { color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1.5px var(--ink); }
.app .fav[aria-pressed="true"] { color: var(--warn); }
.login-err, .phead .small { overflow-wrap: anywhere; }
.login-card h1 { margin: 0 0 8px; }
.hint { color: var(--muted); font-size: 13.5px; margin: 0 0 6px; }
