:root {
  color-scheme: light;
  --ink: #203831;
  --forest: #194d3b;
  --green: #235d47;
  --teal: #1e5a5a;
  --paper: #fbfaf5;
  --line: #d6dacf;
  --muted: #56685e;
  --serif: Georgia, 'Iowan Old Style', 'Times New Roman', serif;
  --sans: Inter, 'Segoe UI', system-ui, sans-serif;
  font-family: var(--sans);
  color: var(--ink);
  background: #f5f4ed;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .62; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #b2661f; outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; top: -10rem; left: 1rem; z-index: 1; padding: .7rem 1rem; background: white; }
.skip:focus { top: .6rem; }
.masthead { background: var(--paper); border-bottom: 1px solid var(--line); }
.mast-inner, main, .page-footer { width: min(1100px, calc(100% - 5rem)); margin: 0 auto; }
.mast-inner { min-height: 76px; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.wordmark { display: inline-flex; align-items: center; gap: .65rem; font: 600 26px/1 var(--serif); letter-spacing: -1.4px; color: var(--ink); text-decoration: none; }
.wordmark img { border-radius: 10px; }
.main-nav { display: flex; align-items: center; gap: 5px; }
.main-nav a { color: var(--muted); font-size: .94rem; font-weight: 600; text-decoration: none; padding: 9px 16px; border-radius: 7px; }
.main-nav a:hover, .main-nav [aria-current] { background: #e4eae0; color: var(--forest); }
main { flex: 1; padding: clamp(1.6rem, 4vw, 3.4rem) 0 3rem; outline: none; }
.page h1 { font: 500 clamp(2.35rem, 4vw, 3.65rem)/1.08 var(--serif); letter-spacing: -.055em; margin: 0 0 1.7rem; }
.overview-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: 25px; }
.overview-head h1 { margin: 0; }
.cap { margin: 0 0 .55rem; font: 650 .71rem/1.5 var(--sans); text-transform: uppercase; letter-spacing: .13em; color: var(--muted); }
.action-button, .plain-button { display: inline-flex; justify-content: center; align-items: center; align-self: flex-start; min-height: 43px; border-radius: 7px; padding: .65rem 1rem; font-weight: 620; font-size: .93rem; text-decoration: none; }
.action-button { color: #fffbee; background: var(--green); border: 1px solid var(--green); }
.action-button:hover { background: #174831; }
.plain-button { color: var(--forest); background: var(--paper); border: 1px solid #bbc7b7; }
.plain-button:hover { background: #e9ede3; }
.overview-grid { display: grid; grid-template-columns: minmax(0, 1.75fr) minmax(250px, 1fr); gap: 20px; }
.month-card, .queue-card, .recent, .settings-card { border-radius: 14px; }
.month-card { display: flex; flex-direction: column; padding: 27px 32px 0; color: #fffbee; background: repeating-linear-gradient(0deg, transparent, transparent 30px, #d2e9cf0a 30px, #d2e9cf0a 31px), var(--forest); border-left: 6px solid #96ad82; overflow: hidden; }
.month-card .cap { color: #c8d9bd; }
.month-card h2 { margin: 0 0 1.3rem; font: 400 clamp(1.8rem, 3.2vw, 2.7rem)/1.12 var(--serif); letter-spacing: -.045em; }
.month-totals { display: flex; flex-wrap: wrap; gap: .5rem 1.2rem; font: 500 clamp(1.6rem, 2.7vw, 2.1rem)/1.2 var(--serif); font-variant-numeric: tabular-nums; }
.month-caption { color: #d9e2d2; font-size: .81rem; margin: .35rem 0 1.5rem; }
.folio-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: .5rem; margin-top: auto; padding: .9rem 0 1.1rem; border-top: 1px solid #ffffff38; font-size: .88rem; }
.folio-bottom a { color: #fffbee; text-decoration: none; font-weight: 650; }
.folio-bottom a:hover, .text-link:hover { text-decoration: underline; }
.queue-card, .recent, .settings-card { background: var(--paper); border: 1px solid var(--line); }
.queue-card { padding: 26px; }
.queue-card h2, .section-head h2, .settings-card h2, .reader-dialog h2 { font: 500 1.58rem/1.15 var(--serif); letter-spacing: -.04em; margin: 0; }
.queue-card h2 { margin-bottom: 10px; }
.queue-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; color: var(--ink); font-size: .93rem; border-top: 1px solid var(--line); text-decoration: none; }
.queue-row:first-of-type { border: 0; }
.queue-row:last-of-type { padding-bottom: 0; }
.queue-row:hover span:nth-child(2) { text-decoration: underline; }
.queue-row strong { margin-left: auto; font-variant-numeric: tabular-nums; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: #83897f; }
.status-dot.pending { background: #ba833a; }
.status-dot.approved { background: #4c8060; }
.status-dot.declined { background: #ad6a5c; }
.recent { margin-top: 22px; padding: 23px 27px; }
.section-head, .recent-empty, .recent-row, .save-row, .dialog-actions { display: flex; align-items: center; gap: 1rem; }
.section-head { justify-content: space-between; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.text-link { font-size: .88rem; font-weight: 650; text-decoration: none; }
.recent-empty { padding: 24px 0 3px; }
.receipt-art { width: 68px; height: 68px; border-radius: 13px; object-fit: cover; }
.recent-empty h3 { font: 500 1.25rem/1.25 var(--serif); margin: 0; }
.recent-empty p, .setting-help { font-size: .91rem; color: var(--muted); line-height: 1.55; }
.recent-empty p { margin: .25rem 0 0; }
.recent-empty a { margin-left: auto; }
.recent-row { padding: 13px 0; color: var(--ink); text-decoration: none; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.recent-row:last-child { border: 0; }
.recent-row:hover strong { text-decoration: underline; }
.recent-row small { display: block; color: var(--muted); margin-top: 3px; }
.recent-amount { text-align: right; min-width: 5rem; font-variant-numeric: tabular-nums; }
.home-status { margin-left: auto; white-space: nowrap; border-radius: .4rem; padding: 3px 8px; font-size: .75rem; text-transform: capitalize; background: #edf0e8; }
.home-status.pending { background: #f5e8ce; }
.home-status.approved { background: #dcebdc; }
.home-status.declined { background: #f2dfd9; }
.page-footer { border-top: 1px solid var(--line); padding: 16px 0 22px; display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); font-size: .78rem; }
.page-footer span { font-family: var(--serif); font-size: 1rem; }
.page-footer a { color: inherit; }
.settings-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; margin: 16px 0; }
.settings-card { padding: 24px; }
.settings-card h2 { margin-bottom: .65rem; }
.setting-help { margin: .3rem 0 1rem; }
.setting-field { display: grid; gap: .4rem; font-weight: 600; font-size: .91rem; margin: 1rem 0; }
.setting-field input { min-width: 0; width: 100%; border: 1px solid #bac5b7; border-radius: 6px; padding: .65rem .75rem; background: #fffefa; color: var(--ink); font-weight: 400; }
.toggle-label { display: flex; align-items: center; gap: .6rem; font-size: .9rem; margin: .9rem 0; }
input[type=checkbox], input[type=radio] { accent-color: var(--green); width: 17px; height: 17px; }
.save-row { grid-column: 1/-1; flex-wrap: wrap; }
.save-row .setting-help { margin: 0; }
.reader-dialog { width: min(450px, calc(100% - 2rem)); color: var(--ink); background: var(--paper); padding: 26px; border: 1px solid var(--line); border-radius: 14px; box-shadow: 0 16px 60px #10291d44; }
.reader-dialog::backdrop { background: #0b271e85; }
.reader-dialog fieldset { border: 0; margin: 16px 0; padding: 0; }
.reader-dialog legend { font-size: .85rem; color: var(--muted); }
.reader-option { display: flex; align-items: flex-start; gap: .6rem; margin-top: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; cursor: pointer; }
.reader-option input { flex-shrink: 0; }
.reader-option:has(:checked) { background: #e9eee3; border-color: #7b947c; }
.reader-option small { display: block; margin-top: .3rem; font-size: .83rem; line-height: 1.45; color: var(--muted); }
.dialog-actions { justify-content: flex-end; margin-top: 18px; }
@media (max-width: 700px) {
  .mast-inner, main, .page-footer { width: min(100% - 2rem, 1100px); }
  .mast-inner { justify-content: flex-start; flex-wrap: wrap; padding-top: 12px; gap: 9px; }
  .main-nav { width: 100%; gap: 2px; padding-bottom: 7px; }
  .main-nav a { text-align: center; padding: 8px 2px; flex: 1; font-size: .87rem; }
  .wordmark { font-size: 24px; }
  .wordmark img { width: 32px; height: 32px; }
  .overview-grid, .settings-grid { grid-template-columns: 1fr; gap: 14px; }
  .overview-head { margin-bottom: 18px; }
  .queue-card, .recent, .settings-card { padding: 18px; }
  .month-card { padding: 21px 21px 0; }
  .recent { margin-top: 14px; }
  .recent-empty { align-items: flex-start; flex-wrap: wrap; }
  .recent-empty a { margin-left: 0; }
  .receipt-art { width: 45px; height: 45px; }
  .recent-empty div { flex: 1; min-width: 160px; }
}
