/* ----- Editorial budgeting app — design system ----- */

@import url('https://fonts.googleapis.com/css2?family=Instrument+Serif:ital@0;1&family=Newsreader:ital,opsz,wght@0,6..72,300..800;1,6..72,300..800&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

:root {
  /* Paper (warm cream, low chroma) */
  --paper:    #F4EFE6;
  --paper-2:  #EBE3D2;
  --paper-3:  #DBCEB1;
  --paper-deep: #2A241D;

  /* Ink */
  --ink:      #1C1814;
  --ink-mid:  #5A4F42;
  --ink-soft: #8B8170;
  --ink-faint:#B5AB95;

  /* Rules */
  --rule:        rgba(28, 24, 20, 0.12);
  --rule-strong: rgba(28, 24, 20, 0.32);
  --rule-double: rgba(28, 24, 20, 0.55);

  /* Editorial accents — sage / brick / amber / umber */
  --good:       #5C7A52;
  --good-bg:    #DDE3CB;
  --trouble:    #B23B22;
  --trouble-bg: #F0D5C9;
  --warn:       #B0801F;
  --warn-bg:    #EFE0B4;

  /* Hazel — the bookkeeper voice */
  --hazel:    #7A4B2F;
  --hazel-bg: #ECDFCD;
}

/* Type stacks --------------------------------------------------------- */
.disp  { font-family: 'Instrument Serif', 'Cormorant Garamond', Georgia, serif; font-weight: 400; letter-spacing: -0.005em; }
.disp-i{ font-family: 'Instrument Serif', Georgia, serif; font-style: italic; font-weight: 400; }
.body  { font-family: 'Newsreader', 'Source Serif Pro', Georgia, serif; font-feature-settings: 'tnum' 1, 'lnum' 1; }
.body-i{ font-family: 'Newsreader', Georgia, serif; font-style: italic; }
.mono  { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-feature-settings: 'tnum' 1; }

.caps {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-weight: 500;
  font-size: 10.5px;
  color: var(--ink-soft);
}
.tnum { font-variant-numeric: tabular-nums lining-nums; }

/* Rules --------------------------------------------------------------- */
.rule       { border-bottom: 1px solid var(--rule); }
.rule-top   { border-top:    1px solid var(--rule); }
.rule-bold  { border-bottom: 1px solid var(--rule-strong); }
.rule-dbl   { border-bottom: 3px double var(--rule-double); }
.rule-dbl-t { border-top:    3px double var(--rule-double); }
.rule-thick { border-bottom: 2px solid var(--ink); }

/* No-text-decoration but pretty underline for hovers */
.editorial-link { color: inherit; text-decoration: none; border-bottom: 1px solid var(--rule-strong); }
.editorial-link:hover { border-bottom-color: var(--ink); }

/* Money chip — bordered amount block */
.amt-good     { color: var(--good); }
.amt-trouble  { color: var(--trouble); }
.amt-warn     { color: var(--warn); }
.amt-faint    { color: var(--ink-faint); }
.amt-zero     { color: var(--ink-soft); }

/* Tag — small caps pill (no rounded corners, hairline edge) */
.pill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 10px; font-weight: 500;
  padding: 3px 7px 3px 7px;
  border: 1px solid currentColor;
  border-radius: 2px;
  line-height: 1;
}
.pill-fill {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: 'IBM Plex Mono', monospace;
  text-transform: uppercase; letter-spacing: 0.12em;
  font-size: 10px; font-weight: 500;
  padding: 4px 8px;
  border-radius: 2px;
  line-height: 1;
}

.dot { display: inline-block; width: 6px; height: 6px; border-radius: 50%; }

/* Editorial page baseline ------------------------------------------------- */
.page {
  background: var(--paper);
  color: var(--ink);
  font-family: 'Newsreader', Georgia, serif;
  -webkit-font-smoothing: antialiased;
  position: relative;
  overflow: hidden;
}

/* Drop-cap helper for editorial paragraphs */
.dropcap::first-letter {
  font-family: 'Instrument Serif', serif;
  font-size: 3.4em;
  float: left;
  line-height: 0.85;
  padding: 4px 6px 0 0;
  color: var(--ink);
}

/* Hazel column */
.hazel-col {
  background: var(--hazel-bg);
  color: var(--ink);
}

/* Page-fold corner decoration — for The Daily masthead */
.masthead-rule {
  border-top: 1px solid var(--ink);
  border-bottom: 3px double var(--ink);
  padding: 6px 0;
}

/* Tiny ledger row arrow */
.svg-arrow { width: 14px; height: 14px; display: inline-block; vertical-align: -2px; }

/* Subtle striped placeholder for image slots */
.imgslot {
  background:
    repeating-linear-gradient(135deg,
      rgba(28,24,20,0.06) 0 8px,
      rgba(28,24,20,0.02) 8px 16px);
  border: 1px solid var(--rule);
  display: flex; align-items: center; justify-content: center;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 11px; color: var(--ink-soft);
  text-transform: uppercase; letter-spacing: 0.1em;
}

/* Bar — proportional spend within budget envelope */
.bar-track {
  height: 4px;
  background: rgba(28, 24, 20, 0.08);
  position: relative;
  overflow: hidden;
}
.bar-fill {
  position: absolute; top: 0; left: 0; bottom: 0;
  background: var(--ink);
}

/* Lighter hover */
.row-hover { transition: background .12s; }
.row-hover:hover { background: rgba(28, 24, 20, 0.035); }

/* Disable selection on UI chrome */
.nosel { user-select: none; }

/* Status-strip for credit cards (visible reveal of the silent move) */
.flash-keyframes {
  animation: flashfade 1.6s ease-out forwards;
}
@keyframes flashfade {
  0% { background: var(--warn-bg); }
  100% { background: transparent; }
}

/* For empty/error/loading states */
.scrim { background: rgba(28,24,20,0.04); }

/* Print-figure feel: small italic caption */
.cap { font-family: 'Newsreader', Georgia, serif; font-style: italic; font-size: 11.5px; color: var(--ink-mid); }
