/* ShubhList: plum ink, marigold accents, warm paper. System fonts only. */
:root {
  --paper: #fffaf3;
  --card: #ffffff;
  --ink: #2b1b2e;
  --muted: #5c4a58;
  --plum: #6b2252;
  --plum-dark: #4f1a3c;
  --plum-soft: #f6e9f0;
  --marigold: #f2a516;
  --marigold-deep: #d9730d;
  --marigold-soft: #fdf0d5;
  --leaf: #2f6b4f;
  --leaf-soft: #e5f2ea;
  --rose: #a3283f;
  --rose-soft: #fbe7ea;
  --line: #e8d9c8;
  --radius: 14px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 1rem/1.6 var(--sans); overflow-wrap: break-word; }
img, svg { max-width: 100%; height: auto; }
a { color: var(--plum); text-underline-offset: 0.15em; }
a:hover { color: var(--plum-dark); }
:focus-visible { outline: 3px solid var(--plum-dark); outline-offset: 2px; box-shadow: 0 0 0 6px rgba(242, 165, 22, 0.45); border-radius: 4px; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.2; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 1.2rem + 2.4vw, 2.6rem); margin: 0.2em 0 0.4em; }
h2 { font-size: clamp(1.3rem, 1.1rem + 1vw, 1.7rem); margin: 1.6em 0 0.5em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 0.4em; }
h4 { font-size: 0.95rem; margin: 1em 0 0.3em; text-transform: uppercase; letter-spacing: 0.04em; color: var(--muted); }
p { margin: 0 0 0.9em; }
code { font-size: 0.9em; background: var(--plum-soft); padding: 0.1em 0.35em; border-radius: 4px; word-break: break-all; }
.wrap { width: 100%; max-width: 72rem; margin: 0 auto; padding: 0 16px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 0; background: var(--plum); color: #fff; padding: 12px 16px; z-index: 10; }
.skip:focus { left: 8px; top: 8px; }

/* Header and footer */
.site-header { background: var(--card); border-bottom: 1px solid var(--line); }
.header-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding-top: 8px; padding-bottom: 8px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-height: 44px; }
.brand-name { font-family: var(--serif); font-size: 1.45rem; font-weight: 700; color: var(--plum); }
.brand-name span { color: var(--ink); }
.main-nav ul { list-style: none; display: flex; flex-wrap: wrap; gap: 2px 4px; margin: 0; padding: 0; }
.main-nav a { display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px; text-decoration: none; color: var(--ink); border-radius: 999px; font-weight: 600; font-size: 0.95rem; }
.main-nav a:hover { background: var(--plum-soft); }
.main-nav a[aria-current="page"] { background: var(--plum); color: #fff; }
.site-footer { margin-top: 64px; background: var(--plum-dark); color: #f8eef3; padding: 32px 0 40px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
/* The default plum focus ring would vanish on the plum footer: use white (about 12:1 on --plum-dark). */
.site-footer :focus-visible { outline-color: #fff; box-shadow: 0 0 0 6px rgba(242, 165, 22, 0.6); }
.footer-links { list-style: none; display: flex; flex-wrap: wrap; gap: 0 18px; padding: 0; margin: 0 0 12px; }
.footer-links a { display: inline-flex; align-items: center; min-height: 44px; }
.small { font-size: 0.875rem; }
.site-footer .small { color: #f1dfe8; }

/* Page structure */
.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; align-items: center; gap: 4px; padding: 0; margin: 16px 0 0; font-size: 0.9rem; color: var(--muted); }
.crumbs li + li::before { content: "/"; margin-right: 4px; color: var(--muted); }
.crumbs a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.hero { padding: 20px 0 8px; }
.hero-tool { padding-bottom: 4px; }
.eyebrow { display: inline-block; margin: 8px 0 0; padding: 2px 10px; background: var(--marigold-soft); color: #6a3d00; border-radius: 999px; font-size: 0.85rem; font-weight: 700; }
.lede { font-size: 1.08rem; color: var(--muted); max-width: 46rem; }
.prose { max-width: 46rem; }
.article { margin: 0 auto 0 0; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; box-shadow: 0 1px 0 rgba(43, 27, 46, 0.04); }
.notice { background: var(--marigold-soft); border-left: 4px solid var(--marigold-deep); padding: 12px 14px; border-radius: 8px; }
.limits { background: var(--plum-soft); border-left: 4px solid var(--plum); padding: 12px 14px; border-radius: 8px; font-size: 0.95rem; }
.meta { color: var(--muted); font-size: 0.95rem; margin-top: 2em; }
.hint { color: var(--muted); font-size: 0.92rem; margin: 6px 0 0; }
.error { color: var(--rose); font-weight: 600; min-height: 1.2em; margin: 8px 0 0; }
.error:empty { display: none; }

/* Buttons and inputs */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 2px solid var(--plum); background: var(--plum); color: #fff; font: 600 0.95rem var(--sans); cursor: pointer; }
.btn:hover { background: var(--plum-dark); border-color: var(--plum-dark); }
.btn-quiet { background: var(--card); color: var(--plum); }
.btn-quiet:hover { background: var(--plum-soft); color: var(--plum-dark); }
.btn-icon { min-width: 44px; padding: 0; border-radius: 50%; font-size: 1.2rem; line-height: 1; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 6px; }
input[type="text"], input[type="date"], input:not([type]) { font: inherit; min-height: 44px; width: 100%; padding: 8px 12px; border: 1.5px solid #7d6d60; border-radius: 10px; background: #fff; color: var(--ink); }
input[aria-invalid="true"] { border-color: var(--rose); background: var(--rose-soft); }
.big-label { display: block; font-weight: 700; font-size: 1.05rem; margin-bottom: 6px; }
.total-row input { font-size: 1.35rem; font-weight: 700; max-width: 22rem; }
.choice { display: flex; align-items: center; gap: 10px; min-height: 44px; cursor: pointer; }
.choice input { width: 22px; height: 22px; accent-color: var(--plum); flex: none; }
fieldset { border: 0; padding: 0; margin: 18px 0 0; min-width: 0; }
.field { margin-top: 18px; }

/* Budget planner */
.alloc-bar { display: flex; height: 14px; border-radius: 999px; overflow: hidden; background: var(--plum-soft); margin: 14px 0 10px; }
.alloc-bar span { display: block; height: 100%; }
.summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 8px; margin: 8px 0 12px; }
.stat { background: var(--paper); border: 1px solid var(--line); border-radius: 10px; padding: 8px 12px; }
.stat b { display: block; font-size: 1.15rem; font-variant-numeric: tabular-nums; }
.stat small { color: var(--muted); font-size: 0.82rem; }
.stat.warn { background: var(--rose-soft); border-color: #e6b3bd; }
.stat.warn b { color: var(--rose); }
.stat.ok b { color: var(--leaf); }
.cat-head { display: none; }
.cat-list { display: grid; gap: 10px; }
.cat-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); border-left: 6px solid var(--swatch, var(--marigold)); }
.cat-row .f-name { grid-column: 1 / -1; }
.cat-row label span { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.cat-row input { font-variant-numeric: tabular-nums; }
.cat-row .left { display: flex; flex-direction: column; justify-content: flex-end; }
.cat-row .left output { font-weight: 700; min-height: 44px; display: flex; align-items: center; font-variant-numeric: tabular-nums; }
.cat-row.over { background: var(--rose-soft); }
.cat-row.over .left output { color: var(--rose); }
.cat-row { position: relative; }
.cat-row .f-name { padding-right: 52px; }
.cat-row .remove { position: absolute; top: 10px; right: 10px; }
.heads { margin-top: 24px; border-top: 1px dashed var(--line); padding-top: 8px; }
.heads-list { display: grid; gap: 10px; }
.head-row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px; border: 1px solid var(--line); border-radius: 12px; }
.head-row .f-label { grid-column: 1 / -1; }
.head-row label span { display: block; font-size: 0.8rem; font-weight: 700; color: var(--muted); margin-bottom: 2px; }
.head-row output { font-weight: 700; display: flex; align-items: center; min-height: 44px; }
.save-actions { border-top: 1px solid var(--line); padding-top: 14px; margin-top: 20px; }
@media (min-width: 860px) {
  .card { padding: 24px; }
  .cat-head { display: grid; grid-template-columns: 2.2fr 0.8fr 1.2fr 1.2fr 1fr 44px; gap: 10px; padding: 0 12px 0 18px; font-size: 0.82rem; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: 0.04em; }
  .cat-row { grid-template-columns: 2.2fr 0.8fr 1.2fr 1.2fr 1fr 44px; align-items: center; padding: 8px 12px; }
  .cat-row .f-name { grid-column: auto; padding-right: 0; }
  .cat-row .remove { position: static; }
  .cat-row label span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .head-row { grid-template-columns: 2fr 1fr 1fr 1fr 44px; align-items: end; }
  .head-row .f-label { grid-column: auto; }
}

/* Tiles and cards */
.card-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 12px; margin: 12px 0 8px; }
.tile { display: flex; flex-direction: column; gap: 4px; padding: 16px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); text-decoration: none; color: var(--ink); border-top: 5px solid var(--marigold); }
.tile:hover { border-color: var(--plum); }
.tile strong { font-family: var(--serif); font-size: 1.2rem; color: var(--plum); }
.tile span { color: var(--muted); font-size: 0.95rem; }
.tile .tile-k { font-size: 0.78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; color: #7a4a00; }
.pill-list { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; padding: 0; margin: 8px 0; }
.pill-list a { display: inline-flex; align-items: center; min-height: 44px; padding: 4px 14px; background: var(--card); border: 1px solid var(--line); border-radius: 999px; text-decoration: none; font-size: 0.93rem; }
.pill-list a:hover { border-color: var(--plum); }

/* Lists */
.checks, .avoid, .qlist { padding-left: 1.3em; }
.checks li, .avoid li, .qlist li { margin: 0.35em 0; }
.checks li::marker { color: var(--leaf); }
.avoid li::marker { color: var(--rose); }
.qlist li::marker { color: var(--plum); font-weight: 700; }
.related ul { padding-left: 1.2em; }
.related li { margin: 0.3em 0; }
.related a { display: inline-flex; align-items: center; min-height: 44px; padding: 0; }
.sources-list li { margin: 0.4em 0; }

/* Facts, sources, disclosures */
.fact { background: var(--leaf-soft); border-left: 4px solid var(--leaf); border-radius: 8px; padding: 12px 14px; margin: 12px 0; }
.fact p:last-child { margin-bottom: 0; }
.source { font-size: 0.88rem; color: var(--muted); }
.disclosure { background: var(--marigold-soft); border: 1px solid #f0cf8f; border-radius: 10px; padding: 12px 14px; margin: 16px 0; font-size: 0.95rem; }
.disclosure p { margin: 0; }
.rules { margin-top: 28px; }

/* Shopping */
.product-list { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 860px) { .product-list { grid-template-columns: 1fr 1fr; } }
.product { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; display: flex; flex-direction: column; }
.product h3 { margin-top: 0; color: var(--plum); }
.product .use { color: var(--muted); }
.product .safety { background: var(--rose-soft); padding: 8px 12px; border-radius: 8px; font-size: 0.95rem; }
.product .shop { margin: auto 0 0; padding-top: 10px; }
.shop-link { display: inline-flex; align-items: center; min-height: 44px; padding: 8px 14px; border-radius: 10px; background: var(--plum); color: #fff; font-weight: 600; text-decoration: none; }
.shop-link:hover { background: var(--plum-dark); color: #fff; }
.shop-note { font-size: 0.85rem; color: var(--muted); margin: 6px 0 0; }
.cat-blocks { display: grid; gap: 4px; }
.cat-block h2 a { text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }

/* Timeline */
.event-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 4px 16px; padding: 6px 0; border-bottom: 1px solid var(--line); }
.event-date { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--muted); }
.event-date input { width: auto; min-width: 11rem; }
.optional { font-weight: 400; }
.add-event { margin-top: 14px; }
.add-event > label { font-weight: 700; display: block; margin-bottom: 6px; }
.inline-add { display: flex; flex-wrap: wrap; gap: 8px; }
.inline-add input { flex: 1 1 12rem; width: auto; }
.custom-remove { margin-left: 8px; }
.plan-output { margin-top: 28px; }
.plan-top h2 { margin-top: 0; }
.progress-track { height: 10px; background: var(--plum-soft); border-radius: 999px; overflow: hidden; }
.progress-track span { display: block; height: 100%; width: 0; background: var(--leaf); }
.progress-text { font-weight: 700; margin-bottom: 6px; }
.month { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 16px; margin: 14px 0; }
.month h3 { margin: 4px 0 8px; color: var(--plum); }
.month h3 small { font-family: var(--sans); font-size: 0.85rem; color: var(--muted); font-weight: 400; margin-left: 6px; }
.tasks { list-style: none; padding: 0; margin: 0; }
.task { display: flex; align-items: flex-start; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line); }
.task:first-child { border-top: 0; }
.task input { width: 22px; height: 22px; margin-top: 11px; accent-color: var(--leaf); flex: none; }
.task label { flex: 1; padding: 8px 0; cursor: pointer; }
.task.done label .t { text-decoration: line-through; color: var(--muted); }
.task .when { display: block; font-size: 0.85rem; color: var(--muted); }
.badge { display: inline-block; font-size: 0.75rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; margin-left: 4px; vertical-align: 1px; }
.badge-late { background: var(--rose-soft); color: var(--rose); }
.badge-mine { background: var(--marigold-soft); color: #6a3d00; }
.badge-after { background: var(--leaf-soft); color: var(--leaf); }
.month .inline-add { margin-top: 8px; }
pre.template { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 14px; overflow-x: auto; font-size: 0.88rem; line-height: 1.5; white-space: pre-wrap; }
table.log { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
table.log th, table.log td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
table.log th { background: var(--plum-soft); }
.contact-line { font-size: 1.1rem; font-weight: 600; }

@media (prefers-reduced-motion: no-preference) {
  .btn, .tile, .main-nav a, .progress-track span { transition: background-color 0.15s ease, border-color 0.15s ease, width 0.3s ease; }
}
@media print {
  .site-header nav, .site-footer, .tool-actions, .btn, .no-print, .crumbs, .skip, .alloc-bar, .inline-add, .hint, .cat-row .remove { display: none !important; }
  body { background: #fff; }
  .card, .month, .cat-row, .product { border-color: #999; box-shadow: none; break-inside: avoid; }
  input { border: 0 !important; padding: 0 !important; min-height: 0 !important; }
  a { color: #000; }
}
