/* OLA Dates in the P&F page's clothes (26 Oct 2026): Bricolage + Figtree, navy ink, white cards on a sky ground,
   coloured source stamps (N blue, C mint, F coral), yellow for today and picked grades.
   Loaded after app.css and only restyles it; delete the <link> in dates.html to get the classic look back. */
:root {
  --ground: #F2F7FF; --surface: #ffffff; --raised: #EAF2FF; --active: #DDEBFF; --tint: #FFF4D2;
  --border: rgba(15, 42, 74, .08); --rule: rgba(15, 42, 74, .08); --control: #C9D6EA;
  --text: #0F2A4A; --muted: #41566F; --faint: #5B6E86;
  --accent: #2563EB; --accent-ink: #0F2A4A; --primary: #0F2A4A;
  --sun: #FFC83D; --coral: #FF6B57; --mint: #15805A; --mintt: #E3F4EC; --sky: #DDEBFF;
  --font: Figtree, "Segoe UI", system-ui, sans-serif;
  --display: "Bricolage Grotesque", Figtree, sans-serif;
  --radius-card: 20px; --radius-control: 999px;
  --shadow: 0 6px 18px rgba(15, 42, 74, .05);
  --sidebar-width: 220px;
}
:root[data-theme="dark"] {
  --ground: #0A1628; --surface: #13243C; --raised: #1A2E4A; --active: #22406A; --tint: #3A3214;
  --border: rgba(255, 255, 255, .08); --rule: rgba(255, 255, 255, .08); --control: #34507A;
  --text: #F2F7FF; --muted: #B5C4D8; --faint: #93A6BF;
  --accent: #7FB0FF; --accent-ink: #F2F7FF; --primary: #F2F7FF;
  --mintt: #12392C; --sky: #22406A; --shadow: none;
}
body { font-size: 15px; line-height: 1.45; }
:root[data-theme="dark"] .brand .mark { filter: none; padding: 3px; border-radius: 10px; background: #fff; }  /* the navy logo on a white tile */

/* ---- shell: a white bar across the top (logo, way home, sync), the views down the left ---- */
.app { grid-template-columns: var(--sidebar-width) minmax(0, 1fr); grid-template-areas: "top top" "side main"; grid-template-rows: auto 1fr; }
.topbar { grid-area: top; display: flex; align-items: center; gap: 18px; height: auto; padding: 14px 96px 14px 32px; background: var(--surface); border-bottom: 1px solid var(--border); }
:root[data-theme="dark"] .topbar { background: var(--surface); }
.sidebar { grid-area: side; height: auto; top: 16px; padding: 32px 0 32px 32px; gap: 6px; overflow: visible; }
.canvas { grid-area: main; padding: 32px; max-width: calc(1100px + 64px); }
.sidebar .brand, .sidebar .scope { display: none; }
.brand { color: var(--text); }
.topbar .brand { gap: 12px; flex: none; }
.topbar .brand .mark { height: 48px; }
.wordmark, .sidebar .wordmark, .topbar .wordmark { font-family: var(--display); font-weight: 800; font-size: 26px; letter-spacing: -0.02em; }
.home { display: inline-flex; align-items: center; gap: 6px; padding: 10px 4px; color: var(--muted); font-weight: 600; }
.home svg { width: 14px; height: 14px; }
@media (hover: hover) and (pointer: fine) { .home:hover { color: var(--accent); } }
.fresh-chip { display: inline-flex; align-items: center; gap: 8px; margin-left: auto; height: auto; padding: 8px 14px; border: 0; border-radius: 999px; background: var(--mintt); color: var(--mint); font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; }
:root[data-theme="dark"] .fresh-chip { color: #6FD3A6; }
.fresh-chip i.dot { background: var(--mint); }
:root[data-theme="dark"] .fresh-chip i.dot { background: #6FD3A6; }
.fresh-chip.stale { background: #FFF4D2; color: #8A5A00; }
.fresh-chip.bad { background: #FFE5E0; color: #A3271A; }
.fresh-chip span { overflow: hidden; text-overflow: ellipsis; }
.settings-btn { top: 22px; right: 32px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--ground); color: var(--text); }
.settings-btn svg { width: 20px; height: 20px; }

.nav-item { height: auto; padding: 12px 16px; gap: 12px; border-radius: 16px; color: var(--text); font-weight: 700; }
.nav-item svg { width: 20px; height: 20px; stroke-width: 2; }
.nav-item[aria-current="page"] { background: var(--text); color: var(--ground); }
.nav-item[aria-current="page"] svg { color: inherit; }
.sidebar .bottom { margin-top: 22px; padding: 18px 18px 10px; border-radius: 20px; background: var(--surface); }
.sidebar .group-label { margin: 0 0 10px; font-family: var(--display); font-size: 16px; font-weight: 800; color: var(--text); }
.sidebar .bottom .nav-item { padding: 8px 0; font-size: 13px; font-weight: 600; color: var(--muted); background: none; }
.fresh { margin: 0 0 6px; gap: 4px; }
.fresh li { display: grid; grid-template-columns: 22px minmax(0, 1fr); column-gap: 10px; min-height: 0; padding: 4px 0; font-size: 14px; color: var(--text); }
.fresh li .when { grid-column: 2; margin: 0; font-size: 13px; color: var(--muted); }

/* ---- the source stamps: one colour each, only the sources that carry the item ---- */
.stamps { gap: 4px; }
.stamps i { width: 20px; height: 20px; border: 0; border-radius: 6px; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); }
.stamps i:not(.on) { display: none; }
.stamps i.on:nth-child(1), .fresh li:nth-child(1) i, .src-pills [data-src="newsletter"] .stamps i { background: #2563EB; color: #fff; }
.stamps i.on:nth-child(2), .fresh li:nth-child(2) i, .src-pills [data-src="calendar"] .stamps i { background: var(--mint); color: #fff; }
.stamps i.on:nth-child(3), .fresh li:nth-child(3) i, .src-pills [data-src="nforma"] .stamps i { background: var(--coral); color: #0F2A4A; }
:root[data-theme="dark"] .stamps i.on, :root[data-theme="dark"] .fresh li i { color: #fff; }
:root[data-theme="dark"] .stamps i.on:nth-child(3), :root[data-theme="dark"] .fresh li:nth-child(3) i { color: #0F2A4A; }
.fresh li i { width: 22px; height: 22px; border-radius: 7px; font-size: 12px; font-weight: 800; }
.fresh li.stale i { box-shadow: 0 0 0 2px var(--sun); }
.fresh li.bad i { box-shadow: 0 0 0 2px #E5484D; }

/* ---- the title and the filters ---- */
.title-row { align-items: flex-end; margin-bottom: 22px; }
.title-row h1, :root[data-weight="bolder"] .title-row h1 { font-family: var(--display); font-weight: 800; font-size: 72px; line-height: 1; letter-spacing: -0.03em; }
.title-row .sub { margin-top: 12px; font-size: 18px; font-weight: 500; color: var(--muted); }
.title-row .sub b { font-weight: 700; }
.segmented { padding: 4px; gap: 2px; border-radius: 999px; background: var(--surface); }
.segmented button { height: 36px; padding: 0 14px; border-radius: 999px; color: var(--text); font-weight: 700; font-size: 14px; }
.segmented button[aria-pressed="true"], :root[data-theme="dark"] .segmented button[aria-pressed="true"] { background: var(--text); color: var(--ground); }
.segmented.window button { padding: 0 14px; }
.settings .segmented { background: var(--ground); }

.src-pills { gap: 10px; margin: 0 0 14px; }
.src-pills button[data-src] { height: 40px; padding: 0 14px 0 6px; border: 0; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; }
.src-pills button[data-src][aria-pressed="true"], :root[data-theme="dark"] .src-pills button[data-src][aria-pressed="true"] { background: var(--sky); color: var(--text); }
.src-pills button[data-src][aria-pressed="false"] { opacity: .6; }
.src-pills button[data-lock="true"], :root[data-theme="dark"] .src-pills button[data-lock="true"] { background: var(--text); color: var(--ground); }
.src-pills .stamps i { width: 28px; height: 28px; border-radius: 50%; font-size: 12px; }
.scope { font-weight: 500; }
.grade-pills { gap: 6px; padding: 0; background: none; }
.grade-pills button { display: inline-grid; place-items: center; width: 40px; min-width: 40px; height: 40px; padding: 0; background: var(--surface); color: var(--text); font-family: var(--display); font-size: 15px; font-weight: 800; }
.grade-pills button[aria-pressed="true"] { background: var(--sun); color: #0F2A4A; font-weight: 800; }
.conflicts { height: 40px; padding: 0 14px 0 12px; border: 0; background: var(--surface); color: var(--text); font-size: 14px; font-weight: 700; }
.conflicts.warn, .conflicts[aria-pressed="true"] { background: #FFE5E0; color: #0F2A4A; }
:root[data-theme="dark"] .conflicts.warn, :root[data-theme="dark"] .conflicts[aria-pressed="true"] { background: #4A2420; color: #FFE5E0; }
.conflicts.warn .warn { color: #C2412F; }
.conflict-list { border: 0; border-radius: var(--radius-card); background: #FFF0EC; padding: 6px 18px; }
.conflict-list .row + .row { border-color: rgba(15, 42, 74, .08); }
:root[data-theme="dark"] .conflict-list { background: #3A1F1C; }
.scope-note { font-size: 14px; }
.stamp { color: var(--muted); font-size: 13px; }

/* ---- months and days: a navy month pill, big numerals, each day a white card ---- */
.month + .month { margin-top: 20px; }
.month-head { justify-content: flex-start; align-items: center; padding: 14px 0 10px; }
.month-head h2, :root[data-weight="bolder"] .month-head h2 { display: inline-block; padding: 10px 22px; border-radius: 999px; background: var(--text); color: var(--ground); font-family: var(--display); font-size: 22px; font-weight: 800; letter-spacing: -0.01em; line-height: 1; }
.month-head .meta { font-size: 14px; font-weight: 600; color: var(--muted); }
.passed-line, :root[data-theme="dark"] .passed-line { min-height: 40px; padding: 0 16px; border-radius: 999px; background: var(--sky); color: var(--text); font-size: 14px; font-weight: 700; }
.passed-line .meta { color: var(--muted); opacity: 1; }
.days { gap: 14px; }
.day { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; padding: 0; }
.day + .day { border-top: 0; margin-top: 14px; }  /* the days sit inside each month, so .days' gap never reaches them */
.date { display: block; padding-top: 10px; }
.dnum { display: block; font-family: var(--display); font-weight: 800; font-size: 44px; line-height: .9; letter-spacing: -0.03em; color: var(--text); }
.dname { display: flex; gap: 4px; margin-top: 4px; padding: 0; font-size: 14px; font-weight: 700; color: var(--muted); }
.rel { display: inline-block; margin-top: 6px; padding: 3px 10px; border-radius: 999px; background: var(--sky); color: var(--text); font-size: 12px; font-weight: 800; line-height: 1.3; white-space: nowrap; }
.day.today .dnum, .day.weekend .dnum { color: var(--text); }
.day.today .rel { background: var(--sun); color: #0F2A4A; }
.day .rows { padding: 4px 18px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
.day.today .rows { box-shadow: 0 0 0 3px var(--sun), var(--shadow); }
.day.selected { margin-left: 0; margin-right: 0; padding: 0; background: none; }
.day.selected .rows { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
.row.item { grid-template-columns: 88px minmax(0, 1fr) auto auto; gap: 14px; min-height: 0; padding: 14px 0; }
.row.item:first-child { padding-top: 14px; }
.row + .row { border-top-color: var(--rule); }
.time { font-size: 14px; font-weight: 600; color: var(--muted); }
.row.item .what, :root[data-weight="bolder"] .row.item .what { font-size: 17px; font-weight: 700; line-height: 1.3; }
.what .note, .what .sub { font-size: 13px; line-height: 1.35; margin-top: 2px; }
.pill { height: 22px; padding: 0 9px; font-size: 12px; font-weight: 800; }
.pill.grade { height: 22px; padding: 0 9px; font-size: 12px; font-weight: 800; background: var(--sky); color: var(--text); }
.pill.grade.mine { background: var(--sun); color: #0F2A4A; }
.pill.warn { background: var(--coral); color: #0F2A4A; }
mark, :root[data-theme="dark"] mark { background: var(--tint); color: var(--text); }

/* ---- the rail: this month and the nForma notices, as cards ---- */
.two-col { grid-template-columns: minmax(0, 1fr) 330px; gap: 32px; }
.mini-wrap { margin-bottom: 18px; padding: 20px; border-radius: 22px; background: var(--surface); }
.rail-head, :root[data-weight="bolder"] .rail-head { font-family: var(--display); font-size: 20px; font-weight: 800; letter-spacing: -0.02em; }
.rail-nav { margin-bottom: 10px; }
.rail-nav .rail-head { font-size: 18px; }
.mini-btn { width: 32px; height: 32px; padding: 0; border: 0; border-radius: 50%; background: var(--ground); font-size: 16px; font-weight: 700; }
.panel { border: 0; border-radius: var(--radius-card); }
.mini.panel { border-radius: 0; background: none; }
.mini .month-grid { gap: 4px; }
.mini .dow { padding: 0 0 4px; border: 0; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); }
.mini .cell, .mini .cell.weekend, .mini .cell.pad { align-items: center; justify-content: center; min-height: 36px; padding: 0; border: 0; border-radius: 12px; background: none; }
.mini .cell .n { font-size: 14px; font-weight: 600; color: var(--text); }
.mini .cell .dots { position: absolute; bottom: 3px; gap: 2px; }
.mini .cell .dots i { width: 5px; height: 5px; background: var(--accent); }
.mini .cell .dots i:not(:first-child) { display: none; }  /* one dot: the day has something */
.mini .cell.today { padding: 0; border: 0; background: var(--sun); }
.mini .cell.today .n { color: #0F2A4A; font-weight: 800; }
.mini .cell.today .dots i { background: #0F2A4A; }
.mini .cell.selected { background: var(--sky); }
.notices-head { margin: 0; padding: 20px 20px 0; border-radius: 22px 22px 0 0; background: var(--surface); }
.notices-head:has(button[aria-expanded="false"]) { padding-bottom: 16px; border-radius: 22px; }
.notices-head button, :root[data-weight="bolder"] .notices-head button { font-family: var(--display); font-size: 18px; font-weight: 800; letter-spacing: -0.02em; line-height: 1.15; }
.notices-head .scope { white-space: nowrap; font-family: var(--font); font-size: 14px; font-weight: 600; letter-spacing: 0; }
.notices-head .count { margin-left: auto; height: 24px; padding: 0 10px; background: var(--sky); color: var(--text); font-family: var(--font); font-size: 13px; font-weight: 800; letter-spacing: 0; }
.panel#notices { padding: 6px 20px 16px; border-radius: 0 0 22px 22px; }
.notice-link, details.notice { border-top-color: var(--rule); }
.notice-link .what, details summary .what { font-weight: 700; line-height: 1.3; }
.notice-link .out { color: var(--accent); font-weight: 700; }
.card-link.more { color: var(--accent); font-weight: 800; }

/* ---- the Month view ---- */
.month-nav .btn { height: 44px; min-width: 44px; border: 0; border-radius: 999px; background: var(--surface); font-weight: 700; }
.month-panel:not(.mini) { border-radius: 22px; box-shadow: var(--shadow); }
#view-month .dow { font-weight: 700; }
.cell { border-color: var(--rule); }
.cell.weekend { background: var(--raised); }
.cell.selected { background: var(--tint); }
.cell.today { border-top: 3px solid var(--sun); }
.cell.today .n { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin: -4px 0 0 -4px; border-radius: 999px; background: var(--sun); color: #0F2A4A; font-weight: 800; }
.cell .n { font-weight: 600; }
.cell .titles .stamps i { width: 14px; height: 14px; font-size: 9px; border-radius: 4px; }

/* ---- Search ---- */
.input, .search-row .input { height: 48px; padding: 0 20px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: var(--shadow); font-size: 16px; }
.btn { border: 0; background: var(--surface); font-weight: 700; }
.search-row .btn { height: 48px; padding: 0 22px; background: var(--text); color: var(--ground); }
#search-items, #results { padding: 4px 18px; border-radius: var(--radius-card); background: var(--surface); box-shadow: var(--shadow); }
#search-items:empty, #results:empty { display: none; }
.row.item.dated { grid-template-columns: 116px 120px minmax(0, 1fr) auto auto; }
.day-head { margin: 24px 0 10px; font-family: var(--display); font-size: 22px; font-weight: 800; }
details.hit summary { padding: 14px 0; }

/* ---- settings dialog ---- */
.settings { border: 0; border-radius: 24px; padding: 24px; }
.settings-head h2 { font-family: var(--display); font-size: 22px; font-weight: 800; }
.settings-label { font-size: 13px; font-weight: 700; color: var(--muted); }
.zoom-row .btn { height: 40px; width: 40px; border-radius: 50%; background: var(--ground); }
.zoom-row .ghost { width: auto; background: none; }

/* phones: the calendar and notices sit below the list; two chips under the title point the way */
.jumps { display: none; }
.jump { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 14px 0 12px; border: 0; border-radius: 999px; background: var(--surface); color: var(--text); font: inherit; font-size: 14px; font-weight: 700; cursor: pointer; box-shadow: 0 2px 10px rgba(15, 42, 74, .06); -webkit-tap-highlight-color: transparent; transition: transform 140ms var(--ease-out); }
.jump:active { transform: scale(.97); }
.jump svg { width: 18px; height: 18px; flex: none; }
.jump .go { width: 14px; height: 14px; color: var(--accent); }
.jump .st { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 6px; background: var(--coral); color: #0F2A4A; font-size: 11px; font-weight: 800; }
.jump .num { padding: 2px 8px; border-radius: 999px; background: var(--sky); font-size: 12px; font-weight: 800; }
.jump .num:empty { display: none; }

@media (max-width: 860px) {
  :root { --bar: 62px; }
  .app { grid-template-areas: "top" "main"; grid-template-columns: minmax(0, 1fr); }
  .topbar { position: sticky; top: 0; height: 62px; padding: 0 68px 0 16px; gap: 10px; }
  .topbar .brand .mark { height: 38px; }
  .topbar .wordmark { font-size: 21px; }
  .home { display: none; }
  .fresh-chip { min-width: 0; padding: 6px 10px; font-size: 12px; }
  .settings-btn { top: 9px; right: 12px; }
  .canvas { padding: 16px 16px calc(80px + env(safe-area-inset-bottom)); }
  .title-row { margin-bottom: 16px; }
  .title-row h1, :root[data-weight="bolder"] .title-row h1 { font-size: 44px; }
  .title-row .sub { margin-top: 8px; font-size: 16px; }
  #mini, .notices-head { scroll-margin-top: 76px; }
  .jumps { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
  .title-row .segmented { margin-top: 4px; }
  .segmented button, .segmented.window button { padding: 0 8px; }
  /* the three sources share one line on a phone: smaller stamps, tighter padding */
  .src-pills { gap: 5px; }
  .src-pills button[data-src] { height: 34px; gap: 5px; padding: 0 9px 0 4px; font-size: 13px; }
  .src-pills button[data-src] .stamps i { width: 24px; height: 24px; font-size: 11px; }
  .src-pills .full { display: none; }
  .src-pills .short { display: inline; }
  .src-pills .scope { margin-left: -2px; font-size: 12px; }
  .two-col { grid-template-columns: minmax(0, 1fr); gap: 24px; }
  .rail { order: 0; }
  .mini-wrap { display: block; }
  .day { grid-template-columns: 76px minmax(0, 1fr); gap: 10px; padding: 0; }
  .date { padding-top: 8px; }
  .dnum { font-size: 36px; }
  .dname { font-size: 12px; }
  .rel { max-width: 100%; padding: 3px 8px; font-size: 11px; overflow: hidden; text-overflow: ellipsis; }
  .day .rows, #search-items, #results { padding: 2px 14px; }
  .row.item { grid-template-columns: minmax(0, 1fr) auto auto; gap: 4px 10px; padding: 12px 0; }
  .row.item:first-child { padding-top: 12px; }
  .row.item .time { font-size: 13px; margin-bottom: 0; }
  .row.item .what { font-size: 16px; }
  .month-head h2 { padding: 8px 18px; font-size: 18px; white-space: nowrap; }
  .month-head { flex-wrap: wrap; gap: 6px 12px; }
  .row.item.dated { grid-template-columns: minmax(0, 1fr) auto auto; }
  .cell { min-height: 56px; }
  .tabbar { background: var(--surface); border-top: 1px solid var(--border); }
  .tabbar a { font-weight: 700; color: var(--muted); }
  .tabbar a[aria-current="page"] { color: var(--text); }
  .tabbar a[aria-current="page"] svg { color: var(--accent); }
}
@media (max-width: 480px) {
  .segmented { display: flex; width: 100%; }
}
@media (max-width: 370px) {
  .src-pills button[data-src] { font-size: 12px; padding-right: 8px; }
  .src-pills button[data-src] .stamps i { width: 22px; height: 22px; }
}
