/* Account Rendered — calm, spacious, mobile-first, dark */
/* Part of the Rendered HQ ecosystem */

@import url('https://fonts.googleapis.com/css2?family=Source+Serif+4:wght@400;600;700&family=Inter:wght@400;500;600&display=swap');

:root {
  --bg: #1a1a1a;
  --bg-raised: #222;
  --bg-input: #2a2a2a;
  --text: #e5e5e5;
  --text-muted: #999;
  --text-dim: #666;
  --border: #2e2e2e;
  --accent: #c9a040;
  --accent-hover: #b08830;
  --green: #5cb85c;
  --amber: #d4a020;
  --red: #d45050;
  --radius: 10px;
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font-heading: 'Source Serif 4', Georgia, serif;
  --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html, body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  min-height: 100dvh;
}

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

/* ── Layout ──────────────────────────────────────────────────────── */

.main {
  max-width: 480px;
  margin: 0 auto;
  padding: calc(1.25rem + env(safe-area-inset-top, 0px)) 1.25rem calc(5.5rem + var(--safe-bottom));
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

.page-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.75rem;
  gap: 0.5rem;
}

.page-header h1 {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.back-link {
  color: var(--text-muted);
  font-size: 0.85rem;
}

/* ── Bottom Nav ──────────────────────────────────────────────────── */

.bottom-nav {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  display: flex;
  justify-content: space-around;
  align-items: flex-end;
  background: #111;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  padding: 0.6rem 0 calc(0.6rem + var(--safe-bottom));
  z-index: 100;
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-dim);
  font-size: 0.6rem;
  text-decoration: none;
  padding: 0.25rem 1.5rem;
  transition: color 0.15s;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.nav-item.active {
  color: var(--text);
  border-top: 2px solid var(--accent);
  margin-top: -2px;
}
.nav-item:hover { color: var(--text); opacity: 1; }
.nav-icon { font-size: 1.25rem; line-height: 1; }

/* Elevated center scan button */
.nav-scan { padding: 0; background: none; border: none; font: inherit; color: inherit; cursor: pointer; }
.nav-scan-btn {
  width: 3.25rem;
  height: 3.25rem;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: -1.25rem;
  box-shadow: 0 2px 12px rgba(212, 160, 96, 0.3);
  transition: transform 0.15s, box-shadow 0.15s;
}

.nav-scan-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 16px rgba(212, 160, 96, 0.4);
}

.nav-scan-btn svg { width: 1.5rem; height: 1.5rem; }
.nav-scan .nav-label { margin-top: 0.35rem; }

/* ── Dashboard ───────────────────────────────────────────────────── */

.dash-summary { margin-bottom: 1rem; }

.dash-month-line {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.25rem;
}

.dash-month-label {
  font-size: 0.75rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.dash-month-nums { font-size: 1.1rem; font-weight: 700; }
.dash-expense { color: var(--text); }
.dash-income { color: var(--green); }
.dash-sep { color: var(--text-dim); font-weight: 400; margin: 0 0.2rem; }

.dash-week-line {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.dash-week-line strong { color: var(--text); }

/* ── Cash Flow Card ───────────────────────────────────────────── */

.cash-flow-card {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1rem;
}

.cash-flow-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 1rem;
}

.cash-flow-title {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
}

.cash-flow-period {
  font-size: 0.7rem;
  color: var(--text-dim);
}

.cash-flow-rows { margin-bottom: 0.75rem; }

.cash-flow-row {
  display: flex;
  justify-content: space-between;
  padding: 0.3rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.cash-flow-row-muted {
  font-size: 0.8rem;
  color: var(--text-dim);
}

.cash-flow-net {
  display: flex;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px solid var(--border);
  font-size: 1.15rem;
  font-weight: 700;
}

/* ── Key Numbers Row ─────────────────────────────────────────── */

.key-numbers {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.key-num {
  flex: 1;
  padding: 0.6rem 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  transition: border-color 0.15s;
  border: 1px solid transparent;
}

a.key-num:hover { border-color: var(--border); }

.key-num-label {
  display: block;
  font-size: 0.6rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-dim);
  margin-bottom: 0.2rem;
}

.key-num-value {
  display: block;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
}

.key-num-amber .key-num-value { color: var(--amber); }
.key-num-muted .key-num-value { color: var(--text-muted); }

/* ── Dashboard extras ────────────────────────────────────────── */

.dash-odo {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-bottom: 1rem;
}
.dash-odo strong { color: var(--text-muted); }

/* Hero 2x2 grid */
.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  margin: 1.25rem 0 1.5rem;
}

.hero-actions {
  display: flex;
  gap: 0.75rem;
  margin: 1.25rem 0 0.75rem;
}

.hero-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 72px;
  border-radius: var(--radius);
  font-size: 0.9rem;
  font-weight: 600;
  gap: 0.4rem;
  text-decoration: none;
  transition: opacity 0.15s, transform 0.1s;
}

.hero-btn:hover { opacity: 0.9; }
.hero-btn:active { transform: scale(0.97); }
.hero-btn-scan { background: var(--accent); color: #1a1a1a; }
.hero-btn-trip { background: var(--green); color: #fff; }
.hero-btn-outline {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--text-muted);
}
.hero-btn-outline:hover { border-color: var(--text-muted); color: var(--text); }

/* Redd's nudges */
.redd-nudges {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.redd-nudges-header {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
  margin-bottom: 0.6rem;
}

.nudge-green .badge-dot { background: var(--green); }
.badge-dot-green { background: var(--green); }

.nudge {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  line-height: 1.4;
  padding: 0.3rem 0;
}

.nudge .badge-dot {
  flex-shrink: 0;
  margin-top: 0.45rem;
}

a.nudge:hover { color: var(--text); }

.dash-manual {
  text-align: center;
  margin-bottom: 1rem;
}

.dash-footer {
  text-align: center;
  padding: 1rem 0;
  margin-top: auto;
}

.page-footer {
  text-align: center;
  padding: 1.5rem 0;
  margin-top: auto;
  font-size: 0.7rem;
}
.page-footer a { color: var(--text-dim); }
.page-footer a:hover { color: var(--accent); }

/* ── About page ──────────────────────────────────────────────────── */

.app-icon-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.app-icon {
  width: 80px;
  height: 80px;
  border-radius: 22%;
  box-shadow: 0 2px 12px rgba(0,0,0,0.4);
}

.app-icon-title {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  font-weight: 600;
  margin: 0;
  color: var(--text);
}

.app-subtitle {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin: 0.15rem 0 0;
}

.app-version {
  color: var(--text-dim);
  font-size: 0.7rem;
  font-family: monospace;
  margin: 0.15rem 0 0;
}

.about-content section {
  margin-bottom: 1.75rem;
}

.about-content h2 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.4rem;
  color: var(--text);
}

.about-content p {
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.5rem;
}

.about-content ul {
  list-style: none;
  padding: 0;
}

.about-content li {
  padding-left: 1.25rem;
  position: relative;
  color: var(--text-muted);
  font-size: 0.85rem;
  line-height: 1.6;
  margin-bottom: 0.35rem;
}

.about-content li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.55em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--accent);
}

.about-changelog-link {
  margin: 2rem 0;
  padding: 1rem 1.25rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}

.about-changelog-link a {
  font-weight: 600;
  font-size: 0.9rem;
}

.about-changelog-link p {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin: 0.25rem 0 0;
}

.about-credit {
  border-top: 1px solid var(--border);
  padding-top: 1.5rem;
  margin-top: 2rem;
}

.about-credit p {
  color: var(--text-dim);
  font-size: 0.8rem;
  margin-bottom: 0.25rem;
}

/* ── Changelog ───────────────────────────────────────────────────── */

.changelog-intro {
  color: var(--text-muted);
  font-size: 0.85rem;
  margin-bottom: 1.5rem;
}

.changelog-timeline {
  border-left: 2px solid var(--border);
  padding-left: 1.25rem;
}

.changelog-entry {
  margin-bottom: 2rem;
  position: relative;
}

.changelog-entry::before {
  content: '';
  position: absolute;
  left: -1.56rem;
  top: 0.35rem;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--bg);
}

.changelog-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-bottom: 0.15rem;
}

.changelog-headline {
  font-family: var(--font-heading);
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.changelog-body p {
  color: var(--text-muted);
  font-size: 0.8rem;
  line-height: 1.55;
}

.badge-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  margin-right: 0.3rem;
  vertical-align: middle;
}

.badge-dot-amber { background: var(--amber); }
.badge-dot-blue { background: #6ab0e0; }

.dash-actions {
  display: flex;
  gap: 1.25rem;
  margin: 1.5rem 0;
  font-size: 0.85rem;
}

.dash-actions a {
  color: var(--text-muted);
  transition: color 0.15s;
}

.dash-actions a:hover { color: var(--text); }

/* ── Transaction List ────────────────────────────────────────────── */

.section-label {
  font-size: 0.7rem;
  font-weight: 500;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 0.75rem;
}

.tx-list { list-style: none; }

.tx-item {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
  min-height: 52px;
}

.tx-item:last-child { border-bottom: none; }

.tx-link {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  color: var(--text);
  text-decoration: none;
}

.tx-link:hover { opacity: 0.85; }

.tx-left {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  min-width: 0;
}

.tx-vendor {
  font-size: 0.95rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tx-date {
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.tx-amount {
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  margin-left: 0.75rem;
}

.tx-amount-expense { color: var(--text); }
.tx-amount-income { color: var(--green); }

/* ── History table ────────────────────────────────────────────── */

.history-table {
  width: 100%;
  border-collapse: collapse;
}

.history-row {
  cursor: pointer;
  border-bottom: 1px solid var(--border);
  transition: background 0.1s;
}

.history-row:hover { background: var(--bg-raised); }
.history-row:last-child { border-bottom: none; }

.history-thumb-cell {
  width: 48px;
  padding: 0.6rem 0.6rem 0.6rem 0;
  vertical-align: top;
}

.history-main {
  padding: 0.6rem 0.5rem;
  vertical-align: top;
}

.history-vendor {
  font-size: 0.95rem;
  font-weight: 500;
}

.history-amount {
  padding: 0.6rem 0;
  text-align: right;
  font-size: 0.95rem;
  font-weight: 600;
  white-space: nowrap;
  vertical-align: top;
}

.history-date {
  padding: 0.6rem 0 0.6rem 0.5rem;
  text-align: right;
  font-size: 0.75rem;
  color: var(--text-dim);
  white-space: nowrap;
  vertical-align: top;
}

.tx-row-inner {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
}

.tx-thumb {
  width: 40px;
  height: 52px;
  object-fit: cover;
  border-radius: 4px;
  flex-shrink: 0;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.tx-thumb:hover { opacity: 1; }

.tx-row-content {
  flex: 1;
  min-width: 0;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.92);
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  cursor: pointer;
}

.lightbox-img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: var(--radius);
}

.tx-notes {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.2rem;
  padding-left: 0;
  font-style: italic;
}

.empty-state {
  text-align: center;
  color: var(--text-dim);
  padding: 3rem 0;
  font-size: 0.9rem;
  line-height: 1.8;
}

/* ── Filter Chips ────────────────────────────────────────────────── */

.filter-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 1.25rem;
}

/* Chips/Pills — Boltkey pattern (flex-wrap pad, ADA ready) */
.chip {
  padding: 0.5rem 1rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 100px;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 0.78rem;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
  transition: color 0.15s, border-color 0.15s, background 0.15s, transform 0.1s, box-shadow 0.15s;
}

.chip:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(255, 255, 255, 0.15);
  transform: translateY(-1px);
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
  text-decoration: none;
}

.chip:active { transform: scale(0.97); }

.chip-active {
  color: var(--accent);
  border-color: var(--accent);
  background: rgba(212, 160, 96, 0.12);
  box-shadow: 0 0 12px rgba(212, 160, 96, 0.15);
}

.chip-group { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 320px) {
  .chip { font-size: 0.7rem; padding: 0.45rem 0.75rem; }
}

@media (prefers-reduced-motion: reduce) {
  .chip { transition-duration: 0.01ms !important; }
}

/* ── Landscape ───────────────────────────────────────────────────── */

@media (orientation: landscape) {
  .main {
    max-width: 720px;
    padding-left: calc(1.25rem + env(safe-area-inset-left, 0px));
    padding-right: calc(1.25rem + env(safe-area-inset-right, 0px));
  }
}

/* ── Forms ────────────────────────────────────────────────────────── */

.form { margin-bottom: 2rem; }
.form-compact { margin-bottom: 0; }
.form-compact .form-group { margin-bottom: 0.75rem; }

.form-group { margin-bottom: 1.25rem; }

.form-group label {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.4rem;
  font-weight: 500;
}

.input {
  width: 100%;
  padding: 0.75rem 0.85rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  font-size: 1rem;
  font-family: inherit;
  appearance: none;
  transition: border-color 0.15s;
}

.input:focus {
  outline: none;
  border-color: var(--accent);
}

.input-lg {
  font-size: 1.5rem;
  font-weight: 600;
  padding: 0.85rem;
}

select.input { cursor: pointer; }

.form-hint {
  font-size: 0.75rem;
  color: var(--text-dim);
  margin-top: 0.3rem;
}

.form-row {
  display: flex;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1rem;
}

/* Type pills */
.type-pills {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 1.25rem;
}

.type-pill {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.4rem 0.85rem;
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  border: 1px solid var(--border);
  color: var(--text-muted);
  transition: all 0.15s;
}

.type-pill input { display: none; }
.type-pill.active { border-color: var(--accent); color: var(--accent); }

/* Toggle */
.toggle-group {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  font-size: 0.9rem;
}

.toggle-group input[type="checkbox"] {
  accent-color: var(--accent);
  width: 1.1rem;
  height: 1.1rem;
}

/* Progressive disclosure */
.more-details {
  margin-top: 1rem;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.more-details summary {
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.more-details-inner {
  padding-top: 0.75rem;
}

/* Meal fields */
.meal-prompt {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1rem;
  margin-bottom: 1rem;
}

.meal-prompt label {
  color: var(--amber);
  font-size: 0.8rem;
}

/* Range input */
.input-range { accent-color: var(--accent); }
.range-value {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text);
  min-width: 2.5rem;
  text-align: right;
}

/* ── Buttons ─────────────────────────────────────────────────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.75rem 1.5rem;
  border: none;
  border-radius: var(--radius);
  font-size: 1rem;
  font-weight: 500;
  font-family: inherit;
  cursor: pointer;
  transition: opacity 0.15s, transform 0.1s;
  text-decoration: none;
}

.btn:hover { opacity: 0.9; }
.btn:active { transform: scale(0.98); }

.btn-primary {
  background: var(--accent);
  color: #1a1a1a;
}

.btn-save {
  background: var(--green);
  color: #fff;
  min-height: 56px;
  font-size: 1.1rem;
}

.btn-outline {
  background: transparent;
  color: var(--text-muted);
  border: 1px solid var(--border);
}

.btn-danger {
  background: transparent;
  color: var(--red);
  border: 1px solid var(--border);
}

.btn-full { width: 100%; }
.btn-sm { padding: 0.45rem 0.85rem; font-size: 0.85rem; }

/* ── Badge ────────────────────────────────────────────────────────── */

.badge {
  display: inline-block;
  padding: 0.15rem 0.45rem;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  background: var(--bg-raised);
  color: var(--text-muted);
  vertical-align: middle;
  margin-left: 0.3rem;
}

/* ── Scan Page ───────────────────────────────────────────────────── */

.scan-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 3rem 0;
}

.scan-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 4rem 2rem;
  border: 2px dashed var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s;
  width: 100%;
  max-width: 320px;
}

.scan-trigger:hover { border-color: var(--accent); }
.scan-trigger svg { width: 3rem; height: 3rem; color: var(--text-muted); }
.scan-text { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.scan-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.preview-container { width: 100%; max-width: 400px; }
.preview-img { width: 100%; border-radius: var(--radius); margin-bottom: 1.25rem; }
.preview-actions { display: flex; flex-direction: column; gap: 0.5rem; }

/* ── Processing ──────────────────────────────────────────────────── */

.processing {
  text-align: center;
  padding: 3rem 0;
}

.spinner {
  width: 2.5rem;
  height: 2.5rem;
  border: 3px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
  margin: 0 auto 1.25rem;
}

@keyframes spin { to { transform: rotate(360deg); } }
.processing-hint { font-size: 0.8rem; color: var(--text-dim); margin-top: 0.5rem; }

/* ── Receipt Review (4-fact confirmation) ────────────────────────── */

.receipt-thumb {
  text-align: center;
  margin-bottom: 1.5rem;
}

.receipt-thumb img {
  max-width: 120px;
  max-height: 160px;
  border-radius: var(--radius);
  object-fit: cover;
  opacity: 0.8;
}

.facts {
  margin-bottom: 1.5rem;
}

.fact {
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}

.fact:last-child { border-bottom: none; }

.fact-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.fact-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.fact-input {
  display: block;
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid transparent;
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.25rem 0;
  font-family: inherit;
  transition: border-color 0.15s;
}

.fact-input:focus {
  outline: none;
  border-bottom-color: var(--accent);
}

.fact-input::placeholder {
  color: var(--text-dim);
  font-weight: 400;
}

.fact-input-amount {
  font-size: 1.4rem;
}

.fact-low-confidence {
  border-bottom: 2px solid var(--amber) !important;
}

.fact-value-lg {
  font-size: 1.6rem;
  font-weight: 700;
}

.fact-hint {
  font-size: 0.7rem;
  color: var(--text-dim);
  margin-top: 0.15rem;
}

.confidence-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  margin-left: 0.4rem;
  vertical-align: middle;
}

.confidence-high { background: var(--green); }
.confidence-medium { background: var(--amber); }
.confidence-low { background: var(--red); }

/* ── Mileage ─────────────────────────────────────────────────────── */

.mileage-ytd {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-bottom: 1.25rem;
}

.mileage-ytd strong { color: var(--text); }

.common-trips { margin-bottom: 0.5rem; }

.common-trips-label {
  font-size: 0.7rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.5rem;
}

.trip-card {
  display: block;
  width: 100%;
  padding: 0.85rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-align: left;
  margin-bottom: 0.5rem;
  cursor: pointer;
  min-height: 56px;
  font-family: inherit;
  color: var(--text);
  transition: border-color 0.15s;
}

.trip-card:hover { border-color: var(--accent); }
.trip-card:active { transform: scale(0.98); }

.trip-card-dest {
  display: block;
  font-size: 1rem;
  font-weight: 600;
}

.trip-card-meta {
  display: block;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

/* ── Quick Log pills ─────────────────────────────────────────────── */

.quick-log-section { margin-bottom: 1rem; }

.chip-quick {
  font-weight: 500;
  gap: 0.35rem;
}

.chip-meta {
  font-size: 0.7rem;
  opacity: 0.6;
}

.chip-pin {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent);
  margin-left: 2px;
  vertical-align: middle;
}

.chip-wrap {
  display: inline-flex;
  align-items: center;
  position: relative;
}

.chip-delete {
  background: var(--bg-raised);
  border: 1px solid var(--border);
  color: var(--text-dim);
  font-size: 0.75rem;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  margin-left: -8px;
  padding: 0;
  line-height: 1;
  font-family: inherit;
}
.chip-delete:hover { color: #d45050; border-color: #d45050; }

/* ── Toast ───────────────────────────────────────────────────────── */

.toast {
  position: fixed;
  bottom: calc(4.5rem + var(--safe-bottom));
  left: 1rem;
  right: 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.75rem 1rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  z-index: 90;
  font-size: 0.9rem;
  box-shadow: 0 4px 16px rgba(0,0,0,0.3);
  animation: toast-in 0.25s ease-out;
}

@keyframes toast-in {
  from { transform: translateY(1rem); opacity: 0; }
  to { transform: translateY(0); opacity: 1; }
}

.toast-undo {
  background: none;
  border: none;
  color: var(--accent);
  font-weight: 600;
  font-size: 0.85rem;
  cursor: pointer;
  padding: 0.25rem 0.5rem;
  font-family: inherit;
  white-space: nowrap;
}

/* ── Pull to refresh ─────────────────────────────────────────────── */

.ptr {
  position: fixed;
  top: 0;
  left: 50%;
  transform: translateX(-50%) translateY(-40px);
  opacity: 0;
  z-index: 200;
  transition: opacity 0.2s;
  pointer-events: none;
}

.ptr-spinner {
  width: 28px;
  height: 28px;
  border: 2.5px solid var(--border);
  border-top-color: var(--accent);
  border-radius: 50%;
  margin: env(safe-area-inset-top, 12px) auto 0;
}

.ptr-ready .ptr-spinner {
  border-top-color: #5cb85c;
}

.ptr-loading .ptr-spinner {
  animation: ptr-spin 0.6s linear infinite;
}

@keyframes ptr-spin {
  to { transform: rotate(360deg); }
}

.miles-row {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

/* ── P&L ─────────────────────────────────────────────────────────── */

.pnl-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.pnl-nav-arrow {
  color: var(--text-dim);
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.25rem;
  text-decoration: none;
}

.pnl-nav-arrow:hover { color: var(--text); }

.pnl-nav-period {
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.pnl-big-numbers {
  text-align: center;
  margin-bottom: 2rem;
}

.pnl-line {
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.2rem;
}

.pnl-amount {
  font-size: 1.5rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.pnl-net {
  font-size: 2rem;
  font-weight: 700;
}

.pnl-positive { color: var(--green); }
.pnl-negative { color: var(--red); }

.pnl-details {
  margin-top: 1.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.pnl-details summary {
  cursor: pointer;
  padding: 0.5rem 0;
  font-size: 0.8rem;
  color: var(--text-dim);
}

.pnl-row {
  display: flex;
  justify-content: space-between;
  padding: 0.5rem 0;
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border);
}

.pnl-row:last-child { border-bottom: none; }

.pnl-pct { color: var(--text-dim); font-size: 0.7rem; }

/* ── Redd's TLDR summary ──────────────────────────────────────── */

.redd-summary {
  background: var(--bg-raised);
  border-radius: var(--radius);
  padding: 1.25rem;
  margin-bottom: 1.5rem;
}

.redd-header { margin-bottom: 0.75rem; }

.redd-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent);
  font-weight: 600;
}

.redd-text {
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}

.redd-text:last-child { margin-bottom: 0; }
.redd-text strong { color: var(--text); }
.redd-good strong { color: var(--green); }
.redd-caution strong { color: var(--amber); }
.redd-text a { color: var(--accent); }

/* ── Simple P&L numbers ──────────────────────────────────────── */

.pnl-simple {
  margin-bottom: 1.5rem;
}

.pnl-simple-row {
  display: flex;
  justify-content: space-between;
  padding: 0.6rem 0;
  font-size: 0.95rem;
  border-bottom: 1px solid var(--border);
}

.pnl-simple-net {
  font-weight: 700;
  font-size: 1.1rem;
  border-bottom: none;
  padding-top: 0.75rem;
}

/* ── Tom's section ───────────────────────────────────────────── */

.tom-section {
  margin-top: 1rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.tom-toggle {
  cursor: pointer;
  font-size: 0.75rem;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0.5rem 0;
}

.pnl-footer {
  text-align: center;
  font-size: 0.7rem;
  color: var(--text-dim);
  padding: 2rem 0 1rem;
}

/* ── Login ────────────────────────────────────────────────────────── */

.login-page {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100dvh;
  padding: 2rem;
}

.login-card {
  width: 100%;
  max-width: 320px;
  text-align: center;
}

.login-title {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 0.3rem;
  letter-spacing: -0.02em;
}

.login-subtitle {
  color: var(--text-dim);
  font-size: 0.85rem;
  margin-bottom: 2.5rem;
  font-style: italic;
}

.login-form {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

/* ── Odometer scan ───────────────────────────────────────────────── */

.input-with-scan {
  display: flex;
  gap: 0.5rem;
  align-items: center;
}

.input-with-scan .input { flex: 1; }

.scan-odo-btn {
  padding: 0.65rem 0.85rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.15s;
}

.scan-odo-btn:hover { border-color: var(--accent); }

.scan-file-input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

/* ── Utilities ───────────────────────────────────────────────────── */

.text-muted { color: var(--text-muted); }
.text-dim { color: var(--text-dim); }
.text-amber { color: var(--amber); }
.text-green { color: var(--green); }
.text-sm { font-size: 0.8rem; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }

/* ── Scan Overlay ───────────────────────────────────────────────── */

.scan-overlay {
  position: relative;
}

.scan-overlay-spinner {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: rgba(26, 26, 26, 0.85);
  border-radius: var(--radius);
}

/* ── Category Chips Scroll ──────────────────────────────────────── */

/* Category chip grid — wrapping pad (Boltkey pattern) */
.category-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding-bottom: 0.5rem;
}

/* ── Review Warning ─────────────────────────────────────────────── */

.review-warn {
  color: var(--amber);
  font-size: 0.85rem;
  margin-bottom: 1rem;
}

/* ── Type Pills (transaction form expense/income toggle) ───────── */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.4rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 20px;
  font-size: 0.8rem;
  cursor: pointer;
  color: var(--text-muted);
  transition: all 0.15s;
}
.pill input { display: none; }
.pill-active { border-color: var(--accent); color: var(--accent); }

/* ── Mileage List Extras ───────────────────────────────────────── */

.badge-rt {
  display: inline-block;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  font-size: 0.6rem;
  font-weight: 600;
  background: var(--green);
  color: #fff;
  vertical-align: middle;
  margin-left: 0.3rem;
}

.mileage-dot { color: var(--text-dim); margin: 0 0.3rem; }

.odo-status {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.85rem;
}
.odo-reading { color: var(--text); }
.odo-date { color: var(--text-dim); font-size: 0.75rem; }
.odo-not-set { color: var(--text-dim); }

.odo-edit {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.odo-edit .input { max-width: 140px; }

/* Odometer confirmation bar */
.odo-confirm {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  font-size: 0.85rem;
}

.odo-confirm-label {
  color: var(--accent);
  font-weight: 500;
  white-space: nowrap;
}

.odo-confirm-input {
  width: 80px;
  padding: 0.35rem 0.5rem;
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 6px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
}

.odo-confirm-input:focus {
  outline: none;
  border-color: var(--accent);
}

/* Odometer math breakdown */
.odo-breakdown {
  margin-top: 0.5rem;
  padding: 0.6rem 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  font-size: 0.8rem;
  font-family: 'SF Mono', 'Menlo', monospace;
}

.odo-math-row {
  display: flex;
  gap: 0.5rem;
  padding: 0.15rem 0;
  color: var(--text-muted);
}

.odo-math-label {
  color: var(--text-dim);
  min-width: 3rem;
}

.odo-math-divider {
  border-top: 1px solid var(--border);
  margin: 0.25rem 0;
}

.odo-math-result {
  font-weight: 600;
  color: var(--text);
}

.odo-snap-btn, .odo-update-btn {
  margin-left: auto;
  padding: 0.35rem 0.75rem;
  background: var(--accent);
  color: #1a1a1a;
  border: none;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

/* ── Scan Page Extras ──────────────────────────────────────────── */

.scan-tip {
  margin-top: 1.5rem;
  padding: 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  font-size: 0.75rem;
  color: var(--text-dim);
  line-height: 1.5;
  text-align: center;
}
.scan-tip strong { color: var(--text-muted); }

.scan-cta { font-size: 0.95rem; font-weight: 500; color: var(--text-muted); }
.scan-hint { font-size: 0.75rem; color: var(--text-dim); }
.processing-text { font-size: 0.95rem; color: var(--text); margin-bottom: 0.25rem; }

/* ── Scan Buttons (Snap / Upload) ───────────────────────────────── */

.scan-buttons {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  width: 100%;
  max-width: 320px;
}

.scan-btn-group { position: relative; }

.scan-btn-trigger {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  padding: 1.5rem 1rem;
  border: 2px dashed var(--border);
  border-radius: 16px;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s;
  text-align: center;
}

.scan-btn-trigger:hover {
  border-color: var(--accent);
  background: rgba(212, 160, 96, 0.05);
}

.scan-btn-icon { font-size: 2rem; }
.scan-btn-text { font-size: 0.95rem; font-weight: 600; color: var(--text); }
.scan-btn-hint { font-size: 0.7rem; color: var(--text-dim); }

/* ── Attach Receipt (transaction form) ──────────────────────────── */

.attach-receipt {
  padding: 0.75rem;
  background: var(--bg-raised);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  text-align: center;
}
.attach-receipt-label {
  font-size: 0.8rem;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
}
.attach-receipt-btns {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
}

/* Trip banner */
.trip-banner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.6rem 0.85rem;
  background: var(--bg-raised);
  border-left: 3px solid var(--green);
  border-radius: var(--radius);
  margin-bottom: 1rem;
  font-size: 0.8rem;
}

.trip-banner-stale { border-left-color: var(--amber); }
.trip-banner-stale .trip-banner-label { color: var(--amber); }

.trip-banner-info { flex: 1; }
.trip-banner-label { font-weight: 600; color: var(--green); display: block; font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.03em; }
.trip-banner-detail { color: var(--text-muted); }
.trip-banner-detail strong { color: var(--text); }

.trip-banner-actions { display: flex; align-items: center; gap: 0.5rem; }
.trip-banner-end {
  padding: 0.35rem 0.75rem;
  background: var(--green);
  color: #fff;
  border-radius: var(--radius);
  font-size: 0.75rem;
  font-weight: 600;
  text-decoration: none;
}
.trip-banner-cancel {
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0.25rem;
  font-family: inherit;
}

/* Start/End trip screens */
.trip-start-container { text-align: center; padding: 1rem 0; }
.trip-start-prompt { font-size: 1rem; color: var(--text-muted); margin-bottom: 0.5rem; }
.trip-start-skip { margin-top: 1.5rem; font-size: 0.8rem; }
.trip-start-skip a { color: var(--text-dim); }
.trip-end-info { text-align: center; font-size: 0.9rem; color: var(--text-muted); margin-bottom: 1rem; }
.trip-end-info strong { color: var(--text); }

/* ── Audit Feed (BOOM Tower Pattern) ─────────────────────────────── */

.feed-row {
  border-bottom: 1px solid var(--border);
}

.feed-summary {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 0;
  cursor: pointer;
  min-height: 48px;
}

.feed-summary:hover { opacity: 0.85; }

.feed-badge {
  font-size: 0.55rem;
  text-transform: uppercase;
  font-weight: 700;
  letter-spacing: 0.04em;
  min-width: 3.8rem;
  text-align: center;
  padding: 0.25rem 0.4rem;
  border-radius: 4px;
  flex-shrink: 0;
}

.feed-badge-expense { background: var(--bg-raised); color: var(--text-muted); }
.feed-badge-income { background: rgba(92,184,92,0.15); color: var(--green); }
.feed-badge-mileage { background: rgba(212,160,96,0.15); color: var(--accent); }
.feed-badge-draw { background: rgba(147,112,219,0.15); color: #9370db; }

.feed-vendor {
  flex: 1;
  font-size: 0.85rem;
  font-weight: 500;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.3;
}

.feed-amount {
  font-size: 0.9rem;
  font-weight: 600;
  white-space: nowrap;
}

.feed-amount-income { color: var(--green); }
.feed-amount-mileage { color: var(--accent); }

.feed-date {
  font-size: 0.7rem;
  color: var(--text-dim);
  white-space: nowrap;
}

.feed-chevron {
  color: var(--text-dim);
  font-size: 0.75rem;
  transition: transform 0.2s;
  flex-shrink: 0;
}

.feed-row.expanded .feed-chevron {
  transform: rotate(180deg);
}

/* Expand/collapse animation */
.feed-expand {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.feed-row.expanded .feed-expand {
  max-height: 600px;
}

.feed-expand-inner {
  padding: 0.5rem 0 1rem 0;
}

.feed-expand-heading {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 0.15rem;
}

.feed-expand-amount {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.75rem;
}

.feed-expand-amount-income { color: var(--green); }
.feed-expand-amount-expense { color: var(--text); }
.feed-expand-amount-mileage { color: var(--accent); }
.feed-expand-amount-draw { color: #9370db; }

.feed-receipt {
  margin-bottom: 0.75rem;
}

/* ── PDF receipt display ─────────────────────────────────────────── */

.receipt-pdf {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1rem;
  background: var(--bg-raised);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--text);
}

.receipt-pdf-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  background: rgba(212,160,96,0.15);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.03em;
}

.receipt-pdf-label {
  font-size: 0.85rem;
  color: var(--accent);
}

.receipt-pdf-sm {
  padding: 0.5rem 0.75rem;
}
.receipt-pdf-sm .receipt-pdf-icon {
  width: 28px;
  height: 28px;
  font-size: 0.6rem;
}
.receipt-pdf-sm .receipt-pdf-label {
  font-size: 0.8rem;
}

.receipt-pdf-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: rgba(212,160,96,0.15);
  color: var(--accent);
  border-radius: 6px;
  font-size: 0.6rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  text-decoration: none;
}

.receipt-display {
  position: relative;
}

.receipt-remove {
  display: block;
  margin-top: 0.5rem;
  background: none;
  border: none;
  color: var(--text-dim);
  font-size: 0.75rem;
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.receipt-remove:hover { color: #d45050; }

.feed-thumb {
  width: 60px;
  height: 80px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  opacity: 0.85;
  transition: opacity 0.15s;
}

.feed-thumb:hover { opacity: 1; }

.feed-detail {
  font-size: 0.8rem;
  color: var(--text-muted);
  padding: 0.2rem 0;
}

.feed-detail-label {
  color: var(--text-dim);
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.feed-redd-notes {
  font-style: italic;
  color: var(--accent);
  background: rgba(212,160,96,0.08);
  padding: 0.5rem 0.65rem;
  border-radius: var(--radius);
  margin-bottom: 0.5rem;
  font-size: 0.8rem;
}

.feed-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.feed-edit {
  display: inline-block;
  padding: 0.5rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--accent);
  background: rgba(212,160,96,0.1);
  border-radius: 100px;
  text-decoration: none;
}

.feed-pin-btn {
  background: none;
  border: none;
  font-size: 0.75rem;
  color: var(--text-dim);
  cursor: pointer;
  padding: 0;
  font-family: inherit;
}
.feed-pin-btn:hover { color: var(--accent); }

/* ── Feed Sublinks ──────────────────────────────────────────────── */

.feed-sublink { font-size: 0.75rem; color: var(--text-dim); margin-bottom: 1rem; }
.feed-sublink a { color: var(--text-dim); }
.feed-sublink a:hover { color: var(--accent); }

/* ── Action Sheet ────────────────────────────────────────────── */

.action-sheet {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 150;
}

.action-sheet-backdrop {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s;
}

.action-sheet-open .action-sheet-backdrop {
  background: rgba(0, 0, 0, 0.5);
}

.action-sheet-panel {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: #222;
  border-radius: 16px 16px 0 0;
  padding: 0.5rem 1rem calc(1.5rem + env(safe-area-inset-bottom, 0px));
  transform: translateY(100%);
  transition: transform 0.25s ease;
}

.action-sheet-open .action-sheet-panel {
  transform: translateY(0);
}

.action-sheet-handle {
  width: 36px;
  height: 4px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 2px;
  margin: 0 auto 1rem;
}

.action-sheet-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 0.5rem;
  font-size: 1rem;
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  min-height: 56px;
  transition: background 0.1s;
}

.action-sheet-item:last-child { border-bottom: none; }
.action-sheet-item:hover { background: rgba(255, 255, 255, 0.04); }
.action-sheet-item:active { background: rgba(255, 255, 255, 0.08); }

.action-sheet-primary {
  font-weight: 600;
  color: var(--accent);
}

.action-sheet-icon {
  font-size: 1.25rem;
  width: 2rem;
  text-align: center;
}

/* ── Feed Stats ──────────────────────────────────────────────── */

.feed-stats {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem;
  font-size: 0.8rem;
  margin-bottom: 0.75rem;
  color: var(--text-muted);
}
