/* ═══════════════════════════════════════════════════════════════════════════
   YF Design System — "Streamlined ledger" (Azov house language, 2026-07-17)
   Warm-industrial neutrals, ONE 3-step indigo accent family + gradient,
   three-voice typography (Inter Tight display / Inter body / JetBrains Mono
   labels), hairline discipline, 150/300ms motion on one easing.
   :root here is the ONE source of truth — yf-core.js COLORS holds var()
   references into this block, never raw values.
   ═══════════════════════════════════════════════════════════════════════════ */

:root {
  /* ── Typography (three voices) ── */
  --font-body: 'Inter', -apple-system, 'Segoe UI', sans-serif;
  --font-display: 'Inter Tight', 'Inter', sans-serif;
  --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

  /* ── Neutrals (warm) ── */
  --ink: #0a0a0b;
  --charcoal: #1a1a1d;
  --paper: #ffffff;
  --bone: #f5f2ed;
  --line: #e5e0d8;        /* the ONE structural hairline on light */
  --line-soft: #eeeae2;   /* row dividers inside cards/tables (use me, not #F0F1F7) */
  --steel: #6b7280;       /* muted text on light (4.3:1 on bone) */

  /* Legacy text names, re-pointed (views consume these via COLORS) */
  --ink-2: #52525b;       /* secondary text, 6.9:1 on bone */
  --ink-3: var(--steel);  /* muted text — keep in sync with COLORS.textMuted */

  /* ── Planes (legacy names, warm values) ── */
  --page: var(--bone);
  --surface: var(--paper);
  --surface-2: #faf8f4;
  --border: var(--line);
  --border-strong: #d6d0c5;

  /* ── Accent family — EXACTLY three steps + one gradient ── */
  --accent: #c99a2e;
  --accent-deep: #9a7118;
  --accent-glow: #ecc35c;
  --accent-gradient: linear-gradient(135deg, var(--accent-glow), var(--accent) 50%, var(--accent-deep));
  /* Legacy aliases */
  --primary: var(--accent);
  --primary-deep: var(--accent-deep);
  --primary-soft: #f7efd9;
  --primary-glow: rgba(201, 154, 46, 0.28);
  /* Brass is a LIGHT fill: anything sitting on it carries ink, never white. */
  --on-accent: #0a0a0b;
  --accent-grad: var(--accent-gradient);

  /* ── Money semantics (tints + hairlines, never saturated fills) ── */
  --income: #047857;          /* text-safe green: 4.9:1 on bone */
  --income-bright: #10B981;   /* big figures on dark, chart lines */
  --income-soft: #e6f3ec;
  --expense: #DC2626;
  --expense-bright: #F0532F;
  --expense-soft: #fbecea;
  --warning: #B45309;
  --warning-bright: #F59E0B;
  --warning-soft: #faf0dd;
  --info: #1d64c9;
  --info-soft: #e9f0fa;

  /* ── Shadows (warm-tinted, rare; accent shadows are the branded ones) ── */
  --shadow-xs: 0 1px 2px rgba(40, 33, 20, 0.05);
  --shadow-card: 0 1px 2px rgba(40, 33, 20, 0.04);
  --shadow-lift: 0 4px 10px -2px rgba(40, 33, 20, 0.08), 0 16px 32px -12px rgba(40, 33, 20, 0.14);
  --shadow-pop: 0 8px 16px -6px rgba(40, 33, 20, 0.12), 0 24px 56px -16px rgba(40, 33, 20, 0.22);
  --shadow-accent-soft: 0 4px 24px -4px rgba(201, 154, 46, 0.25);
  --shadow-accent-glow: 0 12px 40px -8px rgba(201, 154, 46, 0.45);
  --shadow-primary: var(--shadow-accent-soft);

  /* ── Radii (cards 16, tiles 12, inputs 8, pills 9999) ── */
  --radius: 10px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 16px;
  --r-xl: 20px;

  /* ── Motion: ONE easing, two interaction speeds ── */
  --ease: cubic-bezier(0.4, 0, 0.2, 1);
  --ease-out: var(--ease);     /* legacy name */
  --ease-spring: var(--ease);  /* legacy name — overshoot retired */
  --t-fast: 150ms;
  --t-med: 300ms;
}

/* ── Canvas: clean warm bone, no ambient washes (data product) ── */
body {
  background: var(--page) !important;
  color: var(--ink);
  font-feature-settings: "ss01", "cv11";
}

::selection { background: var(--accent); color: var(--on-accent); }

/* ── Scrollbars ── */
* { scrollbar-width: thin; scrollbar-color: rgba(107, 114, 128, 0.35) transparent; }
*::-webkit-scrollbar { width: 10px; height: 10px; }
*::-webkit-scrollbar-thumb { background: rgba(107, 114, 128, 0.35); border-radius: 8px; border: 3px solid transparent; background-clip: content-box; }
*::-webkit-scrollbar-thumb:hover { background-color: rgba(201, 154, 46, 0.6); }
*::-webkit-scrollbar-track { background: transparent; }

/* ── Focus ── */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
input:focus-visible, select:focus-visible, textarea:focus-visible, button:focus-visible { outline-offset: 0; }

/* ═══ Mono label voice (uppercase + tracked — the operational voice) ═══════ */

.yf-label,
.yf-eyebrow,
.yf-count,
.yf-stat-label {
  font-family: var(--font-mono);
  text-transform: uppercase;
  font-weight: 500;
}
.yf-label { font-size: 12px; letter-spacing: 0.18em; color: var(--ink-2); }        /* form labels */
.yf-eyebrow { font-size: 11px; letter-spacing: 0.22em; color: var(--accent); }     /* section kickers */
.yf-count { font-size: 11px; letter-spacing: 0.16em; color: var(--steel); }        /* "34 ROWS" meta */
.yf-stat-label { font-size: 11px; letter-spacing: 0.14em; color: var(--steel); }   /* KPI sublabels */

/* ═══ Stat-band money numbers (the ONE bold move) ══════════════════════════ */

.yf-stat-value {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.05;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

/* ═══ Keyframes ═══════════════════════════════════════════════════════════ */

/* Entrance keyframes MUST end at `transform: none` — a retained transform
   (even translateY(0) kept by fill-mode) turns the element into the containing
   block for position:fixed descendants, which shoves modals below the fold. */
@keyframes yfFadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: none; }
}
@keyframes yfFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes yfScaleIn {
  from { opacity: 0; transform: scale(0.96) translateY(8px); }
  to { opacity: 1; transform: none; }
}
@keyframes yfShimmer {
  0% { background-position: -600px 0; }
  100% { background-position: 600px 0; }
}
/* Grow keyframes deliberately have no `to` block: the animation ends at the
   element's natural state (transform: none), so nothing is retained after it
   finishes — see the fill-mode rule below. */
@keyframes yfGrowX { from { transform: scaleX(0); } }
@keyframes yfGrowY { from { transform: scaleY(0); } }
@keyframes yfDrawLine { to { stroke-dashoffset: 0; } }
@keyframes yfPulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.45; } }
@keyframes yfSpin { to { transform: rotate(360deg); } }
@keyframes yfPopIn {
  0% { opacity: 0; transform: scale(0.6); }
  70% { transform: scale(1.04); }
  100% { opacity: 1; transform: none; }
}

/* ═══ Entrance choreography ═══════════════════════════════════════════════ */

/* fill-mode MUST be `backwards`, never `both`/`forwards`: a transform
   animation that stays applied makes the element the containing block for
   position:fixed descendants — modals opened inside it get centered against
   the page instead of the viewport and vanish below the fold. `backwards`
   covers the pre-delay gap, then the animation detaches cleanly. */
.yf-enter { animation: yfFadeUp 0.3s var(--ease) backwards; }
.yf-enter-1 { animation: yfFadeUp 0.3s var(--ease) 0.05s backwards; }
.yf-enter-2 { animation: yfFadeUp 0.3s var(--ease) 0.1s backwards; }
.yf-enter-3 { animation: yfFadeUp 0.3s var(--ease) 0.15s backwards; }
.yf-enter-4 { animation: yfFadeUp 0.3s var(--ease) 0.2s backwards; }
.yf-enter-5 { animation: yfFadeUp 0.3s var(--ease) 0.25s backwards; }

/* Stagger direct children of a container (cards in a grid, rows in a list) */
.yf-stagger > * { animation: yfFadeUp 0.3s var(--ease) backwards; }
.yf-stagger > *:nth-child(1) { animation-delay: 0.03s; }
.yf-stagger > *:nth-child(2) { animation-delay: 0.08s; }
.yf-stagger > *:nth-child(3) { animation-delay: 0.13s; }
.yf-stagger > *:nth-child(4) { animation-delay: 0.18s; }
.yf-stagger > *:nth-child(5) { animation-delay: 0.23s; }
.yf-stagger > *:nth-child(6) { animation-delay: 0.28s; }
.yf-stagger > *:nth-child(7) { animation-delay: 0.33s; }
.yf-stagger > *:nth-child(8) { animation-delay: 0.38s; }
.yf-stagger > *:nth-child(n+9) { animation-delay: 0.42s; }

/* ═══ Cards — flat, hairline-bordered; lift only when clickable ═══════════ */

.yf-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--t-med) var(--ease), transform var(--t-med) var(--ease), border-color var(--t-fast) var(--ease);
}
.yf-card-hover:hover {
  box-shadow: var(--shadow-lift);
  transform: translateY(-2px);
  border-color: rgba(10, 10, 11, 0.2);
}

/* Dark hero band: ink gradient + 56px grid texture + one accent glow */
.yf-card-hero {
  position: relative;
  background: linear-gradient(150deg, var(--charcoal) 0%, #131316 60%, var(--ink) 100%);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.yf-card-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
  pointer-events: none;
}
.yf-card-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(420px 220px at 88% -20%, rgba(109, 102, 245, 0.4), transparent 65%);
  pointer-events: none;
}

/* ═══ Buttons — pills, press-down actives, lift+glow hovers ═══════════════ */

.yf-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  font-family: var(--font-body);
  font-size: 0.875rem;
  font-weight: 600;
  padding: 9px 18px;
  border-radius: 999px;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--t-med) var(--ease);
  -webkit-tap-highlight-color: transparent;
}
.yf-btn:active { transform: scale(0.98); }
.yf-btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

.yf-btn-primary {
  background: var(--accent-gradient);
  background-origin: border-box; /* same WebKit rounded-corner gradient fix as .yf-pill.active */
  color: var(--on-accent);
  box-shadow: var(--shadow-accent-soft);
}
.yf-btn-primary:hover:not(:disabled) {
  transform: scale(1.02);
  box-shadow: var(--shadow-accent-glow);
}
.yf-btn-primary:active:not(:disabled) { transform: scale(0.98); }
.yf-btn-ghost {
  background: var(--surface);
  color: var(--ink);
  border-color: var(--line);
}
.yf-btn-ghost:hover:not(:disabled) { border-color: rgba(10, 10, 11, 0.4); background: var(--surface); }
.yf-btn-danger { background: var(--expense); color: #fff; }
.yf-btn-danger:hover:not(:disabled) { transform: scale(1.02); box-shadow: 0 4px 20px -4px rgba(220, 38, 38, 0.35); }
.yf-btn-danger:active:not(:disabled) { transform: scale(0.98); }
.yf-btn-soft { background: var(--primary-soft); color: var(--accent-deep); }
.yf-btn-soft:hover:not(:disabled) { background: #e2e0fa; }

/* ═══ Inputs — mono labels above, accent focus ring ═══════════════════════ */

.yf-input, .yf-select {
  font-family: var(--font-body);
  font-size: 0.9rem;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 10px 14px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
}
/* iPhones and iPads zoom the whole page when you tap a field whose text is
   under 16px — 0.9rem lands at 14.4px, so every form in the app jumped on
   focus (found on the sign-in screen, 2026-07-29). Only touch devices behave
   that way, so desktop keeps the density it was designed with. */
@media (pointer: coarse), (max-width: 820px) {
  .yf-input, .yf-select { font-size: 16px; }
}
.yf-input::placeholder { color: var(--ink-3); }
.yf-input:hover, .yf-select:hover { border-color: var(--border-strong); }
.yf-input:focus, .yf-select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 154, 46, 0.18);
}

/* ═══ Pills / filter chips — active = solid accent gradient ═══════════════ */

.yf-pill {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--steel);
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.yf-pill:hover { border-color: rgba(10, 10, 11, 0.4); color: var(--ink); }
.yf-pill:active { transform: scale(0.96); }
.yf-pill.active, .yf-pill[data-active="true"] {
  background: var(--accent-gradient);
  /* WebKit mispaints a gradient on fully-rounded corners when its origin
     (padding-box) mismatches its clip (border-box): a stray sliver of gold
     appears past the left cap, reading as "cut off" on iPhone. Aligning the
     origin to border-box fixes the paint. */
  background-origin: border-box;
  border-color: transparent;
  color: var(--on-accent);
  font-weight: 600;
  box-shadow: var(--shadow-accent-soft);
}

/* Sticky filter-bar recipe (wrap a pill row in this under the header) */
.yf-filter-bar {
  position: sticky;
  top: 0;
  z-index: 40;
  background: rgba(245, 242, 237, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

/* ═══ Badges — mono voice, tint + hairline, never saturated fills ═════════ */

.yf-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding: 3px 9px;
  border-radius: 999px;
  border: 1px solid transparent;
  line-height: 1.5;
}
.yf-badge-income { background: var(--income-soft); color: var(--income); border-color: rgba(4, 120, 87, 0.25); }
.yf-badge-expense { background: var(--expense-soft); color: var(--expense); border-color: rgba(220, 38, 38, 0.25); }
.yf-badge-warning { background: var(--warning-soft); color: var(--warning); border-color: rgba(180, 83, 9, 0.25); }
.yf-badge-info { background: var(--info-soft); color: var(--info); border-color: rgba(29, 100, 201, 0.25); }
.yf-badge-neutral { background: var(--surface-2); color: var(--ink-2); border-color: var(--line); }
.yf-badge-primary { background: var(--primary-soft); color: var(--accent-deep); border-color: rgba(201, 154, 46, 0.3); }

/* ═══ Tables — mono headers, hairline rows ════════════════════════════════ */

.yf-table-modern { width: 100%; border-collapse: collapse; }
.yf-table-modern thead th {
  font-family: var(--font-mono);
  font-size: 0.6563rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--steel);
  text-align: left;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  background: var(--surface-2);
  position: sticky;
  top: 0;
  z-index: 1;
}
.yf-table-modern tbody td {
  padding: 12px 14px;
  font-size: 0.875rem;
  color: var(--ink);
  border-bottom: 1px solid var(--line-soft);
}
.yf-table-modern tbody tr { transition: background var(--t-fast) var(--ease); }
.yf-table-modern tbody tr:hover { background: rgba(245, 242, 237, 0.5); }
.yf-table-modern tbody tr:last-child td { border-bottom: none; }

/* ═══ Modals ══════════════════════════════════════════════════════════════ */

.yf-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 10, 11, 0.5);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  animation: yfFadeIn 0.15s var(--ease) backwards;
}
.yf-modal-card {
  background: var(--surface);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-pop);
  border: 1px solid var(--line);
  animation: yfScaleIn 0.3s var(--ease) backwards;
  max-height: calc(100vh - 48px);
  overflow-y: auto;
}

/* ═══ Skeletons ═══════════════════════════════════════════════════════════ */

.yf-shimmer {
  background: linear-gradient(90deg, #ece8e0 25%, var(--surface-2) 50%, #ece8e0 75%);
  background-size: 600px 100%;
  animation: yfShimmer 1.4s linear infinite;
  border-radius: var(--r-sm);
}

/* ═══ Progress / meter bars (500ms per motion contract) ═══════════════════ */

.yf-meter { height: 7px; background: #ece8e0; border-radius: 999px; overflow: hidden; }
.yf-meter > div {
  height: 100%;
  border-radius: 999px;
  transform-origin: left;
  animation: yfGrowX 0.5s var(--ease) backwards;
}

/* ═══ Charts ══════════════════════════════════════════════════════════════ */

.yf-chart-line { stroke-dasharray: 1600; stroke-dashoffset: 1600; animation: yfDrawLine 0.7s var(--ease) 0.15s forwards; }
.yf-chart-area { animation: yfFadeIn 0.7s var(--ease) 0.4s backwards; }
.yf-chart-dot { animation: yfPopIn 0.3s var(--ease) backwards; }
.yf-chart-bar { transform-origin: bottom; animation: yfGrowY 0.5s var(--ease) backwards; }

.yf-tip {
  position: absolute;
  pointer-events: none;
  background: rgba(26, 26, 29, 0.95);
  color: #fff;
  border-radius: var(--radius);
  padding: 8px 12px;
  font-size: 0.75rem;
  line-height: 1.5;
  box-shadow: var(--shadow-pop);
  z-index: 50;
  white-space: nowrap;
  transform: translate(-50%, calc(-100% - 12px));
  transition: opacity var(--t-fast) var(--ease);
}
.yf-tip::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 5px solid transparent;
  border-top-color: rgba(26, 26, 29, 0.95);
}

/* ═══ Misc polish ═════════════════════════════════════════════════════════ */

.yf-icon-tile {
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--r-md);
  flex-shrink: 0;
}
.yf-divider { height: 1px; background: var(--line); border: none; }
.yf-link { color: var(--accent); font-weight: 600; text-decoration: none; transition: color var(--t-fast) var(--ease); }
.yf-link:hover { color: var(--accent-deep); text-decoration: underline; text-underline-offset: 3px; }

.yf-money { font-family: var(--font-mono); font-variant-ligatures: none; letter-spacing: -0.01em; }

.yf-empty {
  text-align: center;
  padding: 48px 24px;
  color: var(--ink-2);
}
.yf-empty .yf-empty-icon {
  width: 56px;
  height: 56px;
  border-radius: var(--r-lg);
  background: var(--primary-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
}

.yf-spin { animation: yfSpin 0.8s linear infinite; }

/* Number tick when values update */
.yf-tick { transition: color var(--t-med) var(--ease); }

/* ═══ Sidebar (app shell — ink surface, white-opacity system) ═════════════ */

.yf-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  min-height: 44px;
  padding: 10px 13px;
  border: none;
  border-radius: var(--radius);
  background: transparent;
  color: rgba(255, 255, 255, 0.6);
  font-family: var(--font-mono);
  font-size: 0.71875rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  text-align: left;
  cursor: pointer;
  transition: all var(--t-fast) var(--ease);
}
.yf-nav-item:hover { background: rgba(255, 255, 255, 0.05); color: rgba(255, 255, 255, 0.9); }
.yf-nav-item:active { transform: scale(0.98); }
.yf-nav-item.active {
  background: rgba(201, 154, 46, 0.22);
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 0 0 1px rgba(109, 102, 245, 0.35);
}
.yf-nav-item.active::before {
  content: '';
  position: absolute;
  left: -8px;
  top: 22%;
  bottom: 22%;
  width: 2px;
  border-radius: 2px;
  background: var(--accent-glow);
}

/* ═══ Login — ink canvas, grid texture, static accent glow (no ambient
       animation: banned on data products) ═══════════════════════════════════ */

.yf-login-bg {
  position: fixed;
  inset: 0;
  overflow: hidden;
  background: linear-gradient(160deg, var(--charcoal) 0%, var(--ink) 70%);
}
.yf-login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 56px 56px;
}
.yf-login-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 380px at 78% 12%, rgba(236, 195, 92, 0.22), transparent 65%),
    radial-gradient(420px 320px at 12% 92%, rgba(154, 113, 24, 0.28), transparent 65%);
}
.yf-login-card {
  position: relative;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: 0 24px 80px -16px rgba(0, 0, 0, 0.55);
  animation: yfScaleIn 0.3s var(--ease) backwards;
}

/* ═══ Mobile bottom tab bar — hairline-separated, mono labels ═════════════ */

.yf-tabbar {
  position: fixed;
  bottom: 0; left: 0; right: 0;
  z-index: 90;
  display: flex;
  align-items: stretch;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.yf-tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 58px;
  padding: 7px 4px 9px;
  background: none;
  border: none;
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 0.625rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--steel);
  position: relative;
  -webkit-tap-highlight-color: transparent;
  transition: color var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
}
.yf-tab::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  width: 36px;
  height: 3px;
  border-radius: 0 0 99px 99px;
  background: var(--accent-gradient);
  transform: translateX(-50%) scaleX(0);
  transition: transform var(--t-med) var(--ease);
}
.yf-tab.active { color: var(--accent); font-weight: 700; }
.yf-tab.active::before { transform: translateX(-50%) scaleX(1); }
.yf-tab:active { transform: scale(0.94); }

/* ═══ Date-field hint ═════════════════════════════════════════════════════ */

/* Empty date inputs: hide the native mm/dd/yyyy (blank on iPhone anyway) so
   the plain-words hint span reads alone; on focus the native segments return
   and the hint steps aside. React adds .yf-date-empty only while valueless. */
input.yf-date-empty:not(:focus) { color: transparent; }
input.yf-date-empty:not(:focus)::-webkit-datetime-edit { color: transparent; }
input.yf-date-empty:focus + .yf-date-hint { display: none; }

/* ═══ Touch targets & press feedback ══════════════════════════════════════ */

/* Press feedback for inline-styled controls (tabs, icon buttons) that can't
   declare :active in their style objects. */
.yf-pressable { transition: transform var(--t-fast) var(--ease); }
.yf-pressable:active { transform: scale(0.96); }

/* On touch screens (and small viewports) every tappable control gets a
   ≥44px hit area; the visual density on desktop stays as designed. */
@media (pointer: coarse), (max-width: 767px) {
  .yf-btn, .yf-pill, .yf-pressable { min-height: 44px; }
  .yf-nav-item { min-height: 46px; }
}

/* ═══ Accessibility ═══════════════════════════════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .yf-chart-line { stroke-dasharray: none; stroke-dashoffset: 0; }
}

/* ═══ Print — the event one-pager (Phase 4) ═══════════════════════════════
   While the one-pager overlay is open, printing prints ONLY the sheet:
   everything else goes invisible, the sheet re-anchors to the top of the
   page and keeps its tints (print-color-adjust). */

@media print {
  body.yf-print-mode * { visibility: hidden; }
  body.yf-print-mode .yf-onepager,
  body.yf-print-mode .yf-onepager * { visibility: visible; }
  body.yf-print-mode .yf-onepager-wrap {
    position: absolute !important;
    inset: 0 auto auto 0 !important;
    width: 100% !important;
    overflow: visible !important;
    padding: 0 !important;
    background: #fff !important;
  }
  body.yf-print-mode .yf-onepager {
    border: none !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.yf-print-mode .yf-noprint { display: none !important; }
}
