/* AsigRadar: shared styles of the daily radar and the overview (design system: ui-ux-pro-max "Insurance Platform") */
:root {
    --primary: #0369A1;
    --primary-strong: #075985;
    --primary-soft: #E0F2FE;
    --ink: #0C4A6E;
    --text: #1E293B;
    --muted: #475569;
    --subtle: #64748B;
    --bg: #F0F9FF;
    --card: #FFFFFF;
    /* neutral edges: a blue border on the blue page made a halo around every card */
    --border: #E2E8F0;
    --border-strong: #CBD5E1;
    --protect: #15803D;
    --protect-soft: #ECFDF3;
    --urgent: #B42318;
    --urgent-soft: #FEF3F2;
    --important: #B54708;
    --important-soft: #FFF6ED;
    --radius: 14px;
    --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 2px 8px rgba(15, 23, 42, .03);
    --serif: 'Newsreader', Georgia, serif;
    --sans: 'IBM Plex Sans', -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 88px; }
body { margin: 0; font: 16px/1.55 var(--sans); color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 24px; }

/* header */
header { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid var(--border); }
.top { display: flex; align-items: center; gap: 20px; min-height: 68px; }
.brand { display: flex; flex: none; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); white-space: nowrap; }
.brand svg { width: 34px; height: 34px; flex: none; }
.brand b { font-size: 20px; font-weight: 700; letter-spacing: -.02em; }
.brand b span { color: var(--primary); }
.brand small { display: block; font-size: 12px; color: var(--subtle); font-weight: 500; letter-spacing: .01em; margin-top: -2px; }
/* page tabs: full header height, the active one's line sits on the header's bottom border */
.views { display: flex; gap: 4px; align-self: stretch; margin-right: auto; margin-bottom: -1px; }
.views a { display: inline-flex; align-items: center; padding: 0 12px; border-bottom: 2px solid transparent; font-size: 15px; font-weight: 500; color: var(--muted); text-decoration: none; transition: color .15s, border-color .15s; }
.views a:hover { color: var(--ink); border-bottom-color: var(--border-strong); }
.views a[aria-current="page"] { color: var(--primary); font-weight: 600; border-bottom-color: var(--primary); }
.days { display: flex; align-items: center; gap: 4px; background: var(--bg); border: 1px solid var(--border); border-radius: 999px; padding: 4px; }
.days > a, .days > span { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px; border-radius: 999px; font-size: 14px; text-decoration: none; white-space: nowrap; }
.days > a { color: var(--muted); transition: background .15s, color .15s; }
.days > a:hover { background: #fff; color: var(--ink); }
.days > span { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(12, 74, 110, .08); }
.days > a svg { width: 16px; height: 16px; }

/* calendar */
.calendar { position: relative; display: flex; }
.calendar > button { display: grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 999px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.calendar > button:hover, .calendar > button:focus-visible { background: #fff; color: var(--primary); }
.calendar > button svg { width: 18px; height: 18px; }
.cal { position: fixed; inset: auto; top: 76px; left: 50%; translate: -50% 0; margin: 0; width: 332px; padding: 16px; overflow: visible; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 16px 40px rgba(12, 74, 110, .18); opacity: 1; transform: none; transition: opacity .16s ease-out, transform .16s ease-out, display .16s allow-discrete, overlay .16s allow-discrete; }
@starting-style { .cal:popover-open { opacity: 0; transform: translateY(-6px); } }
.cal:not(:popover-open) { opacity: 0; transform: translateY(-6px); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-head strong { font: 600 19px/1.2 var(--serif); color: var(--ink); }
.cal-head button { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; transition: background .15s, color .15s; }
.cal-head button:hover:not(:disabled) { background: var(--bg); color: var(--ink); }
.cal-head button:disabled { opacity: .3; cursor: default; }
.cal-head button svg { width: 18px; height: 18px; }
.cal :focus-visible { outline: 2px solid var(--primary); outline-offset: 2px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; text-align: center; }
.cal-grid .dow { font-size: 12px; font-weight: 600; color: var(--subtle); padding: 4px 0 6px; }
.cal-grid a, .cal-grid span.d { position: relative; display: grid; place-items: center; height: 40px; border-radius: 10px; font-size: 14px; font-variant-numeric: tabular-nums; text-decoration: none; color: var(--subtle); }
.cal-grid a { color: var(--ink); font-weight: 500; transition: background .15s; }
.cal-grid a:hover { background: var(--bg); }
.cal-grid .today { box-shadow: inset 0 0 0 1.5px var(--primary); }
.cal-grid .on { background: var(--primary); color: #fff; }
.cal-grid .on:hover { background: var(--primary-strong); }
.cal-grid .future { opacity: .35; }
.cal-grid i, .cal-legend i { width: 6px; height: 6px; border-radius: 50%; background: var(--primary); }
.cal-grid i { position: absolute; bottom: 4px; left: 50%; transform: translateX(-50%); }
.cal i.s4 { background: var(--urgent); }
.cal i.s3 { background: var(--important); }
.cal-grid a.on i { background: #fff; }
.cal-legend { display: flex; gap: 14px; justify-content: center; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 5px; }

/* search */
/* search: the first filter in the sidebar */
form.search label { display: block; margin: 0 0 8px; padding: 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); }
.search-field { position: relative; }
.search-field svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 18px; height: 18px; color: var(--subtle); pointer-events: none; }
.search-field input { width: 100%; min-height: 44px; padding: 0 12px 0 38px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; color: var(--text); background: #fff; transition: border-color .15s, box-shadow .15s; }
.search-field input:hover { border-color: var(--border-strong); }
.search-field input:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.search-field:focus-within svg { color: var(--primary); }

/* layout */
main.wrap { display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 32px; padding-top: 32px; padding-bottom: 64px; }
.day-head { margin-bottom: 20px; }
.day-head h1 { font: 600 32px/1.2 var(--serif); color: var(--ink); margin: 0 0 4px; letter-spacing: -.01em; }
.day-head p { margin: 0; color: var(--muted); font-size: 15px; }
.day-head p strong { color: var(--ink); }
.day-head h1 .range { color: var(--subtle); font-weight: 500; }
.period { display: inline-flex; gap: 4px; padding: 4px; background: #fff; border: 1px solid var(--border); border-radius: 999px; }
.period a, .period span { display: inline-flex; align-items: center; min-height: 36px; padding: 0 16px; border-radius: 999px; font-size: 14px; text-decoration: none; }
.period a { color: var(--muted); transition: background .15s, color .15s; }
.period a:hover { background: var(--bg); color: var(--ink); }
.period span { background: var(--primary); color: #fff; font-weight: 600; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.filter { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 12px; border-radius: 999px; background: var(--primary-soft); color: var(--primary-strong); font-size: 14px; text-decoration: none; transition: background .15s; }
.filter strong { font-weight: 600; }
.filter span { font-size: 18px; line-height: 1; margin-left: 2px; }
.filter:hover { background: #CDEBFC; }
.clear { display: inline-flex; align-items: center; min-height: 36px; padding: 0 12px; border-radius: 999px; border: 1px solid var(--border-strong); background: #fff; color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none; }
.clear:hover { border-color: var(--primary); color: var(--primary); }

/* topics */
.topics { background: linear-gradient(135deg, #075985, #0369A1); color: #fff; border-radius: var(--radius); padding: 20px 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.topics h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: #BAE6FD; }
.topics h2 svg { width: 16px; height: 16px; }
.topics ol { margin: 0; padding: 0; list-style: none; counter-reset: topic; }
.topics li { counter-increment: topic; display: flex; align-items: baseline; gap: 12px; padding: 8px 0; border-top: 1px solid rgba(255, 255, 255, .14); }
.topics li:first-child { border-top: 0; padding-top: 0; }
.topics li::before { content: counter(topic); font: 600 20px/1 var(--serif); color: #7DD3FC; min-width: 16px; }
.topics a { flex: 1; font: 500 18px/1.35 var(--serif); text-decoration: none; }
.topics a:hover { text-decoration: underline; text-underline-offset: 3px; }
.topics span { flex: none; font-size: 13px; color: #BAE6FD; white-space: nowrap; }

/* ads */
.ads { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.ads h2 { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; font-size: 13px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--important); }
.ads h2 svg { width: 18px; height: 18px; }
.ads ul { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.ads li { border: 1px solid #EEF4F9; border-radius: 10px; padding: 12px 14px; background: #FCFDFE; display: flex; flex-direction: column; gap: 6px; }
.ad-head { display: flex; justify-content: space-between; align-items: center; font-size: 13px; color: var(--subtle); }
.ad-offer { margin: 0; font-size: 15px; color: var(--text); flex: 1; }
.ad-link { font-size: 13px; font-weight: 600; color: var(--primary); }

/* articles */
ol.articles { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; box-shadow: var(--shadow); transition: border-color .2s, box-shadow .2s; }
.card:hover { border-color: var(--border-strong); box-shadow: 0 2px 4px rgba(15, 23, 42, .05), 0 8px 20px rgba(15, 23, 42, .06); }
.card:target { border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.tags { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 13px; }
.score { display: inline-flex; align-items: center; padding: 3px 10px; border-radius: 999px; font-weight: 600; background: #F1F5F9; color: var(--muted); }
.score.s4 { background: var(--urgent-soft); color: var(--urgent); }
.score.s3 { background: var(--important-soft); color: var(--important); }
.score.s2 { background: var(--primary-soft); color: var(--primary-strong); }
.tag { color: var(--muted); font-weight: 500; }
a.tag { text-decoration: none; }
a.tag:hover { color: var(--primary); text-decoration: underline; }
.tag.sources { display: inline-flex; align-items: center; gap: 5px; color: var(--ink); font-weight: 600; }
.tag.sources svg { width: 14px; height: 14px; color: var(--primary); }
.tag.official { display: inline-flex; align-items: center; gap: 4px; color: var(--protect); background: var(--protect-soft); padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.tag.official svg { width: 14px; height: 14px; }
.dot { color: #CBD5E1; }
.title { display: block; font: 600 21px/1.3 var(--serif); color: var(--ink); text-decoration: none; letter-spacing: -.005em; }
.title:hover { color: var(--primary); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.source { margin-top: 6px; font-size: 14px; color: var(--subtle); }
.source strong { color: var(--muted); font-weight: 600; }
.points { margin: 14px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.points li { position: relative; padding-left: 18px; font-size: 15px; color: var(--text); }
.points li::before { content: ''; position: absolute; left: 2px; top: .62em; width: 6px; height: 6px; border-radius: 50%; background: var(--primary); opacity: .55; }
.desc { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.why { display: flex; gap: 10px; margin: 14px 0 0; padding: 10px 14px; background: var(--protect-soft); border-left: 3px solid var(--protect); border-radius: 0 10px 10px 0; font-size: 15px; color: #14532D; }
.why svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--protect); }
.why strong { font-weight: 600; }
.foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #EEF4F9; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { display: inline-flex; align-items: center; min-height: 28px; padding: 0 10px; border-radius: 8px; background: var(--bg); border: 1px solid var(--border); color: var(--ink); font-size: 13px; font-weight: 600; text-decoration: none; transition: background .15s, border-color .15s; }
.chip:hover { background: var(--primary-soft); border-color: var(--border-strong); }
.also { margin: 0; font-size: 13px; color: var(--subtle); }
.also a { color: var(--primary); font-weight: 500; }

/* sidebar */
/* aside is a popover (mobile drawer); on desktop undo the popover defaults and always show it */
aside { display: grid; gap: 20px; align-content: start; position: sticky; top: 92px; inset: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; overflow: visible; background: none; color: inherit; }
.drawer-head, .drawer-button { display: none; }
.panel { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); }
.panel h2 { margin: 0 0 10px; padding: 0 6px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--subtle); }
.panel ul { list-style: none; margin: 0; padding: 0; }
.companies a { display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 0 8px; border-radius: 8px; text-decoration: none; font-size: 15px; color: var(--text); transition: background .15s; }
.companies a:hover { background: var(--bg); }
.companies a.on { background: var(--primary-soft); color: var(--primary-strong); font-weight: 600; }
.companies a span:last-child { min-width: 26px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); background: #F1F5F9; border-radius: 999px; padding: 1px 8px; }
.legend a { display: flex; align-items: center; justify-content: space-between; min-height: 40px; padding: 0 8px; border-radius: 8px; text-decoration: none; font-size: 14px; transition: background .15s; }
.legend a:hover { background: var(--bg); }
.legend a.on { background: var(--primary-soft); }
.legend .count { min-width: 26px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); background: #F1F5F9; border-radius: 999px; padding: 1px 8px; }
.legend.categories a span:first-child { color: var(--text); }
.empty { background: var(--card); border: 1px dashed var(--border-strong); border-radius: var(--radius); padding: 40px 24px; text-align: center; color: var(--muted); }
.empty svg { width: 40px; height: 40px; color: var(--border-strong); margin-bottom: 8px; }
.panel .empty { padding: 16px; border: 0; }

/* overview */
.kpis { list-style: none; margin: 0 0 24px; padding: 0; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 18px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--subtle); text-transform: uppercase; letter-spacing: .06em; }
.kpi strong { font: 600 40px/1.1 var(--serif); color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-urgent strong { color: var(--urgent); }
.kpi-important strong { color: var(--important); }
.kpi-delta { font-size: 13px; color: var(--subtle); }
.kpi-delta.up { color: var(--ink); font-weight: 600; }
.kpi-hint { font-size: 13px; color: var(--subtle); }
.block { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 20px 22px; margin-bottom: 20px; box-shadow: var(--shadow); }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 14px; }
.block-head h2 { margin: 0; font: 600 22px/1.2 var(--serif); color: var(--ink); }
.block-head span, .block-head a { font-size: 14px; color: var(--subtle); }
.block-head a { color: var(--primary); font-weight: 600; }
.bars { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--days), minmax(0, 1fr)); gap: 3px; align-items: end; height: 152px; border-bottom: 0; }
.bars li { position: relative; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: 22px; }
.bars a { display: flex; align-items: flex-end; height: 120px; border-radius: 4px; }
.bars a:hover .bar { filter: brightness(1.15); }
.bar { display: block; width: 100%; min-height: 2px; border-radius: 4px 4px 2px 2px; background: #7DB9DE; transition: filter .15s; }
.bar.s4 { background: var(--urgent); }
.bar.s3 { background: #DD7A2E; }
.bar-day { position: absolute; bottom: 0; left: 50%; translate: -50% 0; font-size: 11px; color: var(--subtle); white-space: nowrap; }
.chart-legend { margin-top: 10px; justify-content: flex-start; }
.chart-legend i { background: #7DB9DE; }
.chart-legend i.s4 { background: var(--urgent); }
.chart-legend i.s3 { background: #DD7A2E; }
.briefs { list-style: none; margin: 0; padding: 0; }
.briefs li { padding: 14px 0; border-top: 1px solid #EEF4F9; }
.briefs li:first-child { border-top: 0; padding-top: 0; }
.briefs .tags { margin-bottom: 6px; }
.brief-date { margin-left: auto; }
.brief-title { display: block; font: 600 19px/1.3 var(--serif); color: var(--ink); text-decoration: none; }
.brief-title:hover { color: var(--primary); text-decoration: underline; text-underline-offset: 4px; }
.brief-why { margin: 6px 0 0; font-size: 15px; color: #14532D; }
.brief-why strong { color: var(--protect); }
.briefs.compact li { padding: 10px 0; }
.briefs.compact .brief-title { font-size: 17px; }
.brief-meta { display: block; margin-top: 2px; font-size: 13px; color: var(--subtle); }
.side-topics { margin-bottom: 0; padding: 18px; }
.side-topics a { font-size: 16px; }
.side-topics li { flex-wrap: wrap; }
.meters li a { position: relative; display: flex; justify-content: space-between; align-items: center; min-height: 40px; padding: 0 8px 6px; border-radius: 8px; text-decoration: none; font-size: 14px; color: var(--text); transition: background .15s; }
.meters li a:hover { background: var(--bg); }
.meters li a span:last-child { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; }
.meters i { position: absolute; left: 8px; bottom: 4px; height: 3px; max-width: calc(100% - 16px); border-radius: 2px; background: var(--primary); opacity: .45; }

/* subscribe: header button and its popover form */
.subscribe-button { display: inline-flex; align-items: center; gap: 8px; min-height: 40px; padding: 0 14px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; white-space: nowrap; transition: background .15s; }
.subscribe-button:hover { background: var(--primary-strong); }
.subscribe-button svg { width: 18px; height: 18px; flex: none; }
.subscribe { position: fixed; inset: auto; top: 76px; right: max(24px, calc((100vw - 1160px) / 2 + 24px)); margin: 0; width: min(380px, calc(100vw - 24px)); padding: 0 20px 20px; border: 1px solid var(--border); border-radius: 16px; background: #fff; color: var(--text); box-shadow: 0 16px 40px rgba(12, 74, 110, .18); }
.subscribe::backdrop { background: rgba(12, 74, 110, .2); }
.subscribe .drawer-head { display: flex; align-items: center; justify-content: space-between; margin: 0 -20px 4px; padding: 12px 8px 4px 20px; }
.subscribe .drawer-head strong { font: 600 20px/1.2 var(--serif); color: var(--ink); }
.subscribe .drawer-head button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
.subscribe .drawer-head button:hover { background: var(--bg); color: var(--ink); }
.subscribe .drawer-head svg { width: 20px; height: 20px; }
.subscribe-lead { margin: 0 0 14px; font-size: 14px; color: var(--muted); }
.subscribe fieldset { margin: 0 0 14px; padding: 0; border: 0; display: grid; gap: 8px; }
.choice { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; font-size: 14px; color: var(--muted); cursor: pointer; transition: border-color .15s, background .15s; }
.choice:has(input:checked) { border-color: var(--primary); background: var(--primary-soft); }
.choice input { margin: 3px 0 0; accent-color: var(--primary); }
.choice strong { display: block; color: var(--ink); font-size: 15px; }
.field-label { display: block; margin-bottom: 6px; font-size: 14px; font-weight: 600; color: var(--ink); }
.subscribe input[type="email"] { width: 100%; min-height: 44px; padding: 0 12px; border: 1px solid var(--border); border-radius: 10px; font: inherit; font-size: 16px; }
.subscribe input[type="email"]:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px var(--primary-soft); }
.subscribe input[aria-invalid="true"] { border-color: var(--urgent); }
.field-error { margin: 6px 0 0; font-size: 14px; color: var(--urgent); }
.subscribe-submit { width: 100%; min-height: 44px; margin-top: 14px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
.subscribe-submit:hover { background: var(--primary-strong); }
.subscribe-note { margin: 10px 0 0; font-size: 12px; color: var(--subtle); }

/* unsubscribe page */
main.wrap.unsubscribe { display: block; max-width: 560px; }
.unsubscribe h1 { margin: 0 0 8px; font: 600 28px/1.2 var(--serif); color: var(--ink); }
.unsubscribe p { margin: 0 0 16px; color: var(--muted); }
.action-button { display: inline-flex; align-items: center; min-height: 44px; padding: 0 20px; border: 0; border-radius: 10px; background: var(--primary); color: #fff; font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; transition: background .15s; }
.action-button:hover { background: var(--primary-strong); }
.action-button.quiet { border: 1px solid var(--border-strong); background: #fff; color: var(--ink); }
.action-button.quiet:hover { border-color: var(--urgent); color: var(--urgent); background: #fff; }

/* medium screens: the header's items no longer fit side by side, keep the essentials */
@media (max-width: 1240px) {
    .top { gap: 14px; }
    .brand small { display: none; }
}
@media (max-width: 1040px) {
    .days > a, .days > span { padding: 0 10px; }
    .views a { padding: 0 8px; }
}

@media (max-width: 900px) {
    .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    main.wrap { grid-template-columns: 1fr; gap: 24px; }
    /* the sidebar becomes a drawer from the right, opened by .drawer-button */
    aside { position: fixed; inset: 0 0 0 auto; width: min(360px, 88vw); height: 100dvh; max-height: none; align-content: start; gap: 16px; padding: 0 16px 24px; overflow-y: auto; overscroll-behavior: contain; background: var(--bg); box-shadow: -12px 0 40px rgba(12, 74, 110, .2); transform: translateX(0); transition: transform .22s ease-out, display .22s allow-discrete, overlay .22s allow-discrete; }
    aside:not(:popover-open) { display: none; transform: translateX(100%); }
    @starting-style { aside:popover-open { transform: translateX(100%); } }
    aside::backdrop { background: rgba(12, 74, 110, .35); }
    .drawer-head { position: sticky; top: 0; z-index: 1; display: flex; align-items: center; justify-content: space-between; margin: 0 -16px; padding: 12px 8px 12px 20px; background: var(--bg); border-bottom: 1px solid var(--border); }
    .drawer-head strong { font: 600 20px/1.2 var(--serif); color: var(--ink); }
    .drawer-head button { display: grid; place-items: center; width: 44px; height: 44px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; }
    .drawer-head button:hover { background: #fff; color: var(--ink); }
    .drawer-head svg { width: 22px; height: 22px; }
    .drawer-button { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; margin-top: 12px; padding: 0 16px; border: 1px solid var(--border-strong); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; font-size: 15px; font-weight: 600; cursor: pointer; }
    .drawer-button:hover { border-color: var(--primary); color: var(--primary); }
    .drawer-button svg { width: 18px; height: 18px; }
    .drawer-count { display: inline-grid; place-items: center; min-width: 22px; height: 22px; padding: 0 6px; border-radius: 999px; background: var(--primary); color: #fff; font-size: 12px; }
}
/* tablets and phones: the header wraps, the day navigation gets its own row */
@media (max-width: 900px) {
    .top { flex-wrap: wrap; gap: 10px; padding: 10px 0; }
    .brand small { display: none; }
    /* the header wraps, so the active tab is a pill, not a line on the border */
    .views { align-self: center; margin-bottom: 0; }
    .views a { min-height: 40px; padding: 0 12px; border-bottom: 0; border-radius: 999px; }
    .views a:hover { background: var(--bg); }
    .views a[aria-current="page"] { background: var(--primary-soft); color: var(--primary-strong); }
    /* the call to action stays labelled, at the right of the first row */
    .subscribe-button { margin-left: auto; }
    .top > .period { order: 2; }
    .subscribe { top: 64px; right: 12px; }
    .days { order: 3; width: 100%; justify-content: space-between; }
}
@media (max-width: 720px) {
    .wrap { padding-inline: 16px; }
    .day-head h1 { font-size: 26px; }
    .title { font-size: 19px; }
    .card { padding: 16px; }
}
/* phones: logo shield only, so tabs, magnifier and envelope stay on one row (the link keeps its aria-label) */
@media (max-width: 480px) {
    .top { gap: 8px; }
    .brand div { display: none; }
}
@media (prefers-reduced-motion: reduce) {
    html { scroll-behavior: auto; }
    * { transition: none !important; }
}
