:root {
  --ink: #14182b; --navy: #1b2140; --deep: #0f1325; --gold: #c9a45c; --gold-soft: #f3e7cc; --ivory: #fbf8f2;
  --line: #e4dccb; --muted: #5d6178; --ok: #2f6b4f; --warn: #a86a12; --late: #a3322a;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; background: linear-gradient(180deg, var(--ivory), #fff 60%); -webkit-text-size-adjust: 100%; }
h1, h2, h3, h4, .brand strong, .buy-price { font-family: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif; }
.skip-link { position: absolute; left: -999px; }
.skip-link:focus { left: 12px; top: 12px; background: #fff; padding: 8px; z-index: 10; }
.topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; padding-top: max(12px, env(safe-area-inset-top)); background: var(--deep); color: #fff; flex-wrap: wrap; border-bottom: 1px solid rgba(201,164,92,.4); }
.brand { display: flex; gap: 10px; align-items: center; color: inherit; text-decoration: none; }
.brand strong { font-size: 19px; letter-spacing: .02em; }
.brand small { display: block; opacity: .75; font-size: 12px; }
.logo-mark { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--gold); color: var(--gold); display: grid; place-items: center; font: 600 13px/1 Georgia, serif; letter-spacing: .06em; }
.privacy-pill { background: rgba(201,164,92,.16); color: var(--gold-soft); padding: 6px 12px; border-radius: 999px; font-size: 13px; }
main { max-width: 1100px; margin: 0 auto; padding: 18px; padding-bottom: max(18px, env(safe-area-inset-bottom)); }
.hero { padding: 10px 0 6px; }
.hero h1 { font-size: clamp(28px, 5.6vw, 46px); margin: 8px 0; line-height: 1.12; font-weight: 600; }
.hero em { color: #8a6a2c; font-style: italic; }
.hero p { max-width: 760px; color: var(--muted); line-height: 1.55; }
.eyebrow { font-size: 12px; letter-spacing: .14em; font-weight: 700; color: #8a6a2c; }
.welcome { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 18px; margin: 12px 0; }
.welcome h2 { margin-top: 0; }
.tabs { position: sticky; top: 0; z-index: 5; display: flex; gap: 6px; overflow-x: auto; padding: 8px 0; background: linear-gradient(var(--ivory), rgba(251,248,242,.94)); -webkit-overflow-scrolling: touch; scrollbar-width: none; }
.tabs button { flex: 0 0 auto; min-height: 44px; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: #fff; color: var(--ink); font-weight: 600; font-size: 15px; cursor: pointer; }
.tabs button[aria-selected=true] { background: var(--navy); color: var(--gold-soft); border-color: var(--navy); }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 16px; margin-top: 8px; }
.panel-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.panel-head h2 { margin: 0; font-size: 24px; font-weight: 600; }
.panel h3 { margin: 18px 0 8px; font-size: 19px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.button { min-height: 44px; border: 0; border-radius: 12px; padding: 10px 14px; font-weight: 700; font-size: 15px; background: var(--navy); color: #fff; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; justify-content: center; gap: 6px; }
.button-gold { background: var(--gold); color: var(--deep); }
.button-soft { background: var(--gold-soft); color: var(--ink); }
.button-danger { background: #fff; color: var(--late); border: 1px solid #e7c3bf; }
.button-small { min-height: 38px; padding: 6px 12px; font-size: 14px; }
.file-button { cursor: pointer; }
.link { background: none; border: 0; color: var(--navy); font-weight: 600; font-size: 14px; min-height: 38px; padding: 6px 8px; cursor: pointer; text-decoration: underline; }
.link.danger { color: var(--late); }
label { display: grid; gap: 6px; font-weight: 600; font-size: 14px; }
label.inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; white-space: nowrap; }
select, input:not([type=checkbox]):not([type=file]), textarea { min-height: 44px; border: 1px solid var(--line); border-radius: 12px; padding: 8px 10px; font-size: 16px; font-family: inherit; background: #fff; color: var(--ink); width: 100%; }
label.inline select, label.inline input { width: auto; }
textarea { resize: vertical; }
.status { margin: 6px 0 0; font-size: 14px; color: var(--muted); min-height: 1.2em; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin: 4px 0 10px; }
.chip { min-height: 40px; border: 1px solid var(--line); background: var(--ivory); border-radius: 999px; padding: 6px 12px; font-size: 14px; cursor: pointer; color: var(--ink); }
.chip[aria-pressed=true] { background: var(--navy); color: var(--gold-soft); border-color: var(--navy); }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.card { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; background: #fff; box-shadow: 0 4px 16px rgba(20,24,43,.05); }
.card h3, .card h4 { margin: 2px 0 6px; font-size: 18px; }
.card.compact h3 { font-size: 16px; }
.card-kicker { margin: 0; font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: #8a6a2c; font-weight: 700; }
.meta, .notes, .contact { margin: 4px 0; color: var(--muted); font-size: 14px; line-height: 1.45; }
.contact a { color: var(--navy); margin-right: 10px; }
.card-actions { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin-top: 8px; }
.badge { display: inline-block; margin: 6px 0 0; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-ok { background: #e6f1eb; color: var(--ok); }
.badge-due-soon { background: #fbefd8; color: var(--warn); }
.badge-overdue, .badge-never { background: #f8e3e1; color: var(--late); }
.card.status-overdue, .card.status-never { border-left: 4px solid var(--late); }
.card.status-due-soon { border-left: 4px solid var(--warn); }
.card.prio-urgent { border-left: 4px solid var(--late); }
.card.prio-high { border-left: 4px solid var(--warn); }
.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .board { grid-template-columns: 1fr; } }
.column .card { min-width: 0; }
.column label.inline { display: grid; gap: 4px; }
.column label.inline select { width: 100%; }
.column { background: var(--ivory); border-radius: 14px; padding: 10px; display: grid; gap: 10px; align-content: start; }
.column h3 { margin: 4px 2px; font-size: 16px; display: flex; justify-content: space-between; }
.column h3 span { color: var(--muted); font-family: system-ui, sans-serif; }
.checklist { list-style: none; padding: 0; margin: 8px 0; display: grid; gap: 4px; }
.checklist label { display: flex; gap: 8px; align-items: flex-start; font-weight: 500; min-height: 36px; }
.checklist input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--navy); flex: 0 0 auto; }
progress { width: 100%; height: 8px; accent-color: var(--gold); }
.add-check { display: flex; gap: 6px; }
.empty { color: var(--muted); font-style: italic; }
.week-strip { background: var(--gold-soft); border-radius: 12px; padding: 4px 12px; margin-bottom: 12px; }
.total { margin: 0; font-weight: 700; color: var(--navy); }
.editor { margin-top: 14px; border: 1px dashed var(--gold); border-radius: 14px; padding: 10px 12px; background: var(--ivory); }
.editor summary { cursor: pointer; font-weight: 700; min-height: 36px; display: flex; align-items: center; color: var(--navy); }
.editor form, .settings { display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); margin-top: 10px; }
.editor form .actions, .editor form fieldset, .editor form label:has(textarea) { grid-column: 1 / -1; }
.days { border: 0; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.days legend { font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.day { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--line); border-radius: 999px; padding: 6px 10px; min-height: 40px; background: #fff; font-weight: 500; }
.fine { color: var(--muted); font-size: 14px; }

/* weekly brief */
.brief { border: 1px solid var(--line); border-radius: 16px; padding: 18px 20px; background: #fff; line-height: 1.5; }
.brief-head { border-bottom: 2px solid var(--gold); padding-bottom: 10px; margin-bottom: 6px; }
.brief-kicker { margin: 0; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: #8a6a2c; font-weight: 700; }
.brief h2 { margin: 4px 0; font-size: 28px; font-weight: 600; }
.brief-week { margin: 0; color: var(--muted); }
.brief-headline { margin: 6px 0 0; font-weight: 700; color: var(--navy); }
.brief section { break-inside: avoid; }
.brief h3 { font-size: 17px; margin: 16px 0 6px; color: var(--navy); }
.brief ul { margin: 0; padding-left: 18px; }
.brief li { margin: 4px 0; }
.brief-sub { font-size: 14px; color: var(--muted); }
.brief-muted { color: var(--muted); font-size: 14px; }
.brief-tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 1px 8px; border-radius: 999px; background: var(--gold-soft); color: var(--ink); }
.brief-urgent { background: #f8e3e1; color: var(--late); }
.brief-high { background: #fbefd8; color: var(--warn); }
.brief-empty { color: var(--muted); font-style: italic; margin: 0; }
.brief-table { border-collapse: collapse; width: 100%; font-size: 14px; }
.brief-table th { text-align: left; width: 90px; padding: 5px 8px 5px 0; vertical-align: top; white-space: nowrap; }
.brief-table td { padding: 5px 0; border-bottom: 1px solid var(--line); }
.brief-foot { margin-top: 16px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }

/* buy */
.buy { margin-top: 28px; padding: 22px 18px; border-radius: 18px; background: var(--deep); color: #fff; text-align: center; border: 1px solid rgba(201,164,92,.45); }
.buy-kicker { letter-spacing: 0.14em; text-transform: uppercase; color: var(--gold); font-size: 0.75rem; font-weight: 700; margin: 0; }
.buy-price { font-size: 2rem; font-weight: 600; margin: 0.35rem 0; color: var(--gold-soft); }
.buy-copy { color: #d8d9e3; margin: 0.35rem auto 0; max-width: 640px; }
.buy-row { display: flex; flex-wrap: wrap; gap: 0.55rem; justify-content: center; margin: 0.9rem 0; }
.button-primary { background: var(--gold); color: var(--deep); }
.buy-shopify { background: transparent; color: var(--gold-soft); border: 1px solid var(--gold); }
.buy-note { color: #b9bbcb; font-size: 0.88rem; }
.buy-note a { color: var(--gold-soft); }

footer { text-align: center; padding: 24px; font-size: 14px; }
footer a { color: var(--navy); }

@media print {
  .no-print, .tabs, .status { display: none !important; }
  body, main { background: #fff; padding: 0; margin: 0; max-width: none; }
  #app, #panel-brief { display: block !important; border: 0; padding: 0; margin: 0; }
  .panel:not(#panel-brief) { display: none !important; }
  .brief { border: 0; padding: 0; font-size: 11pt; }
  .brief h2 { font-size: 20pt; }
}
@page { margin: 0.5in; }
