:root {
  color-scheme: light;
  --bg: #f4f7f9;
  --surface: #fff;
  --surface-soft: #f5f8f9;
  --header: rgba(255, 255, 255, 0.95);
  --text: #0b1f33;
  --muted: #61717d;
  --accent: #0f766e;
  --accent-strong: #0a625c;
  --accent-soft: #e8f4f2;
  --line: #d9e2e7;
  --shadow: 0 14px 42px rgba(11, 31, 51, 0.10);
  --radius: 10px;
  --width: 1260px;
  --current-green: #08704f;
  --current-green-soft: #e9f8f0;
  --previous-red: #b42318;
  --previous-red-soft: #fff0ee;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

:root[data-theme="construction"] {
  --bg: #f4f0e7;
  --surface: #fff;
  --surface-soft: #eee6da;
  --header: rgba(244, 240, 231, 0.96);
  --text: #252525;
  --muted: #6f6a62;
  --accent: #e56a19;
  --accent-strong: #c9500a;
  --accent-soft: #fff2e7;
  --line: #d9cfc1;
  --shadow: 0 18px 0 rgba(92, 72, 50, 0.04), 0 20px 44px rgba(74, 54, 35, 0.12);
  --radius: 17px;
  --width: 1320px;
}

:root[data-theme="data"] {
  color-scheme: dark;
  --bg: #071827;
  --surface: #0b2239;
  --surface-soft: rgba(255,255,255,.055);
  --header: rgba(7, 24, 39, .96);
  --text: #f7fbff;
  --muted: #b3c1cf;
  --accent: #12b981;
  --accent-strong: #0ea371;
  --accent-soft: rgba(18, 185, 129, .13);
  --line: rgba(199, 219, 234, .23);
  --shadow: 0 20px 50px rgba(0,0,0,.28);
  --radius: 15px;
  --width: 1280px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--bg); color: var(--text); }
button, input, select { font: inherit; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky; z-index: 50; top: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  min-height: 80px; padding: 0 max(24px, calc((100% - var(--width))/2));
  border-bottom: 1px solid var(--line); background: var(--header); backdrop-filter: blur(14px);
}
.brand { display: flex; align-items: center; gap: 12px; width: max-content; font-size: 1.2rem; font-weight: 800; letter-spacing: -.035em; text-decoration: none; }
.brand-mark { display: grid; grid-template-columns: repeat(3, 7px); align-items: end; gap: 3px; width: 27px; height: 28px; }
.brand-mark i { display: block; background: var(--accent); }
.brand-mark i:nth-child(1) { height: 21px; clip-path: polygon(0 38%, 100% 0, 100% 100%, 0 100%); }
.brand-mark i:nth-child(2) { height: 27px; }
.brand-mark i:nth-child(3) { height: 17px; }
.site-header nav { display: flex; gap: 42px; }
.site-header nav a { color: var(--muted); font-size: .91rem; font-weight: 700; text-decoration: none; }
.site-header nav a:hover { color: var(--accent); }
.theme-picker { position: relative; justify-self: end; }
.theme-picker > button, .secondary-button {
  min-height: 44px; padding: 0 15px; border: 1px solid var(--line); border-radius: calc(var(--radius) - 3px);
  background: transparent; color: var(--text); font-weight: 700; cursor: pointer;
}
.theme-menu {
  position: absolute; top: calc(100% + 10px); right: 0; width: 320px; padding: 12px;
  border: 1px solid #d9e2e7; border-radius: 16px; background: #fff; color: #0b1f33;
  box-shadow: 0 24px 64px rgba(7,24,39,.2);
}
.theme-menu > p { margin: 3px 8px 8px; color: #61717d; font-size: .72rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.theme-menu > button {
  display: grid; grid-template-columns: 54px 1fr; align-items: center; gap: 12px; width: 100%;
  padding: 11px 9px; border: 0; border-radius: 11px; background: transparent; color: #0b1f33; text-align: left; cursor: pointer;
}
.theme-menu > button:hover, .theme-menu > button[aria-current="true"] { background: #f2f6f7; }
.theme-menu strong, .theme-menu small { display: block; }
.theme-menu small { margin-top: 2px; color: #61717d; }
.swatches { display: flex; overflow: hidden; height: 32px; border: 1px solid #d9e2e7; border-radius: 7px; }
.swatches i { flex: 1; }

.hero { padding: 76px max(24px, calc((100% - var(--width))/2)) 46px; }
:root[data-theme="data"] .hero { background: radial-gradient(circle at 73% 44%, rgba(18,185,129,.10), transparent 28%), #071827; }
:root[data-theme="construction"] .hero {
  background-image: linear-gradient(rgba(121,91,57,.06) 1px, transparent 1px), linear-gradient(90deg,rgba(121,91,57,.06) 1px,transparent 1px);
  background-size: 72px 72px;
}
.hero-copy { max-width: 900px; margin-bottom: 38px; }
.eyebrow { margin: 0 0 10px; color: var(--accent); font-size: .78rem; font-weight: 850; letter-spacing: .12em; text-transform: uppercase; }
.hero h1 { max-width: 930px; margin: 0; font-size: clamp(2.4rem, 5vw, 4.75rem); line-height: .99; letter-spacing: -.058em; }
.hero-copy > p:last-child { max-width: 720px; margin: 24px 0 0; color: var(--muted); font-size: 1.1rem; line-height: 1.65; }

.search-panel { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: var(--shadow); }
.primary-fields { display: grid; grid-template-columns: minmax(280px, 1.8fr) minmax(210px, .75fr) auto; gap: 10px; }
.query-field { display: flex; align-items: center; gap: 8px; }
.query-field > span { margin-left: 12px; color: var(--accent); font-size: 1.7rem; }
.query-field input { padding-left: 0; }
.primary-fields label, .advanced label { border: 1px solid var(--line); border-radius: calc(var(--radius) - 3px); background: var(--surface-soft); }
input, select { width: 100%; min-height: 52px; padding: 0 14px; border: 0; outline: none; background: transparent; color: var(--text); }
select option { color: #0b1f33; background: #fff; }
input:focus, select:focus { box-shadow: inset 0 0 0 2px var(--accent); border-radius: inherit; }
.primary-button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 25px;
  border: 0; border-radius: calc(var(--radius) - 3px); background: var(--accent); color: #fff; font-weight: 800; text-decoration: none; cursor: pointer;
}
.primary-button:hover { background: var(--accent-strong); }
.type-fields { display: flex; align-items: center; gap: 9px; margin-top: 13px; }
.type-fields label { cursor: pointer; }
.type-fields input { position: absolute; opacity: 0; pointer-events: none; }
.type-fields span { display: block; padding: 9px 13px; border: 1px solid var(--line); border-radius: 999px; color: var(--muted); font-size: .88rem; font-weight: 700; }
.type-fields input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.clear-link { margin-left: auto; color: var(--muted); font-size: .86rem; }
.advanced { margin-top: 12px; border-top: 1px solid var(--line); }
.advanced summary { width: max-content; padding-top: 12px; color: var(--accent); font-size: .86rem; font-weight: 750; cursor: pointer; }
.advanced > div { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin-top: 12px; }
.advanced label { padding: 8px 12px 0; color: var(--muted); font-size: .75rem; font-weight: 750; }
.advanced label input, .advanced label select { min-height: 38px; padding: 0; }
.aggregation-filters { margin: 14px 0 0; padding: 15px; border: 1px solid var(--line); border-radius: calc(var(--radius) - 2px); }
.aggregation-filters legend { padding: 0 7px; color: var(--text); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
.aggregation-filters > p { margin: 0 0 10px; color: var(--muted); font-size: .78rem; }
.aggregation-filters > div { display: flex; flex-wrap: wrap; gap: 8px; }
.aggregation-filters label { display: flex; align-items: center; gap: 7px; min-height: 36px; padding: 7px 10px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--text); cursor: pointer; }
.aggregation-filters label:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.aggregation-filters input { min-height: auto !important; margin: 0; }

.results-section, .detail-shell { width: min(calc(100% - 48px), var(--width)); margin: 0 auto; padding: 58px 0 96px; }
.section-heading, .panel-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; }
.section-heading { margin-bottom: 24px; }
.section-heading h2, .panel-heading h2, .panel-heading h3 { margin: 0; letter-spacing: -.035em; }
.section-heading h2 { font-size: clamp(1.75rem, 3vw, 2.6rem); }
.section-heading > p, .panel-heading > span { margin: 0; color: var(--muted); font-size: .84rem; }
.tender-list { display: grid; gap: 14px; }
.tender-card, .panel {
  border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 25px rgba(11,31,51,.045);
}
.tender-card { padding: 24px; }
.tender-card.comparison-result { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(340px, .75fr); padding: 0; overflow: hidden; }
.current-tender-panel { min-width: 0; padding: 24px; border-left: 5px solid var(--current-green); background: linear-gradient(135deg, var(--current-green-soft), var(--surface) 40%); }
.previous-tenders-panel { min-width: 0; padding: 21px; border-left: 1px solid #efb7b2; background: var(--previous-red-soft); }
.comparison-label { width: max-content; margin-bottom: 13px; padding: 6px 9px; border-radius: 999px; font-size: .7rem; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.comparison-label-current { color: #fff; background: var(--current-green); }
.comparison-label-previous { color: #fff; background: var(--previous-red); }
.current-publication-date { width: max-content; margin: -4px 0 13px; padding: 8px 10px; border: 1px solid #8dc9ac; border-radius: 7px; background: #fff; color: var(--current-green); font-size: .78rem; text-transform: uppercase; }
.latest-comparison-summary { display: flex; justify-content: space-between; gap: 12px; margin: 0 0 4px; padding: 10px; border: 1px solid #df8f88; border-radius: 8px; background: #fff; color: var(--previous-red); }
.latest-comparison-summary span { color: #74423e; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.latest-comparison-summary strong { flex: 0 0 auto; font-size: .84rem; }
.current-award-summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 8px 14px; margin-top: 14px; padding: 12px 14px; border: 1px solid #efb7b2; border-radius: 8px; background: var(--previous-red-soft); color: var(--previous-red); }
.current-award-summary span { color: #74423e; font-size: .72rem; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.current-award-summary strong { font-size: 1.1rem; }
.current-award-summary b { margin-left: auto; }
.direct-award-result .comparison-label-current { background: #9a6700; }
.direct-award-result .current-publication-date { border-color: #d6ad4a; color: #795300; }
.previous-tender-card.direct-award-card { margin-top: 8px; padding-right: 9px; padding-left: 9px; border-left: 4px solid #c58a00; border-radius: 7px; background: #fff8e1; }
.variation-not-applicable { color: #795300 !important; font-size: .76rem; }
.previous-tender-card { padding: 13px 0; border-bottom: 1px solid #efb7b2; color: #4b1814; }
.previous-tender-card:last-of-type { border-bottom: 0; }
.previous-meta { display: flex; justify-content: space-between; gap: 8px; color: #8f3129; font-size: .68rem; font-weight: 800; letter-spacing: .03em; text-transform: uppercase; }
.previous-procedure { margin-top: 6px; color: #8f3129; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.previous-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 8px; }
.previous-dates span { padding: 7px 8px; border: 1px solid #efb7b2; border-radius: 6px; background: #fff; color: #8f3129; font-size: .68rem; font-weight: 800; text-transform: uppercase; }
.previous-dates time { display: block; margin-top: 3px; color: var(--previous-red); font-size: .79rem; }
.previous-tender-card h4 { margin: 8px 0 10px; font-size: .92rem; line-height: 1.35; }
.previous-tender-card h4 a { text-decoration: none; }
.previous-tender-card h4 a:hover { text-decoration: underline; }
.previous-amounts { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin: 0; }
.previous-amounts dt { color: #8f3129; }
.previous-amounts dd { color: var(--previous-red); font-size: .85rem; }
.previous-variation { display: block; margin-top: 8px; color: var(--previous-red); font-size: .82rem; }
.no-previous { margin: 9px 0 0; color: #8f3129; font-size: .84rem; line-height: 1.5; }
.card-topline { display: flex; flex-wrap: wrap; align-items: center; gap: 9px; color: var(--muted); font-size: .76rem; font-weight: 750; letter-spacing: .02em; text-transform: uppercase; }
.badge, .status { padding: 6px 9px; border-radius: 999px; }
.badge { background: var(--accent-soft); color: var(--accent); }
.status { background: var(--surface-soft); color: var(--muted); }
.status-open, .status-published { color: #08704f; background: #e5f7ee; }
.status-awarded, .status-completed { color: #315d9a; background: #eaf2ff; }
.tender-card h3 { max-width: 1000px; margin: 16px 0 8px; font-size: 1.28rem; line-height: 1.35; }
.tender-card h3 a { text-decoration: none; }
.tender-card h3 a:hover { color: var(--accent); }
.tender-card > p { margin: 0 0 19px; color: var(--muted); }
.card-facts { display: grid; grid-template-columns: 1.15fr 1fr 1fr .75fr; gap: 12px; margin: 0; padding: 16px 0; border-block: 1px solid var(--line); }
dl div { min-width: 0; }
dt { margin-bottom: 5px; color: var(--muted); font-size: .72rem; font-weight: 750; letter-spacing: .05em; text-transform: uppercase; }
dd { margin: 0; font-weight: 680; overflow-wrap: anywhere; }
.card-link { display: block; width: max-content; margin-top: 17px; color: var(--accent); font-weight: 800; text-decoration: none; }
.empty-state, .missing-data { border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface-soft); text-align: center; }
.empty-state { padding: 70px 24px; }
.empty-state strong { font-size: 1.2rem; }
.empty-state p, .missing-data p { margin: 8px auto 0; max-width: 660px; color: var(--muted); line-height: 1.55; }
.pagination { display: flex; justify-content: center; gap: 24px; margin-top: 28px; color: var(--muted); }
.pagination a { color: var(--accent); font-weight: 750; }

.back-link { display: inline-block; margin-bottom: 25px; color: var(--muted); font-weight: 700; text-decoration: none; }
.tender-heading { padding: 32px 0 46px; }
.tender-heading .eyebrow { margin-top: 24px; }
.tender-heading h1 { max-width: 1050px; margin: 0; font-size: clamp(2.1rem, 4.5vw, 4rem); line-height: 1.04; letter-spacing: -.055em; }
.tender-heading > p:last-of-type { color: var(--muted); font-size: 1.08rem; }
.heading-actions { display: flex; gap: 10px; margin-top: 25px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.lot-selector { width: min(520px, 100%); margin-bottom: 18px; }
.lot-selector label { display: grid; gap: 6px; color: var(--muted); font-size: .78rem; font-weight: 750; }
.lot-selector select { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.panel { padding: 26px; }
.panel-heading { padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.facts-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px 18px; margin: 25px 0 0; }
.facts-grid .wide { grid-column: span 2; }
.money { color: var(--accent); font-size: 1.14rem; }
.detail-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0; }
.money-record { padding-top: 22px; }
.money-record > div { display: flex; align-items: baseline; justify-content: space-between; gap: 15px; margin-bottom: 9px; }
.money-record span, .money-record p { color: var(--muted); }
.money-record strong { font-size: 1.15rem; }
.money-record p { margin: 15px 0 8px; font-size: .88rem; }
.money-record a, .documents a, table a { color: var(--accent); font-weight: 750; }
.missing-data { margin-top: 20px; padding: 28px 18px; }
.documents > article { display: flex; justify-content: space-between; gap: 22px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.documents > article:last-child { border: 0; padding-bottom: 0; }
.documents h3 { margin: 5px 0 0; font-size: 1rem; }
.document-type { color: var(--muted); font-size: .72rem; font-weight: 750; text-transform: uppercase; }
.document-meta { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 10px; color: var(--muted); font-size: .77rem; text-align: right; }
.availability { padding: 6px 8px; border-radius: 999px; }
.waiting { background: #fff4d5; color: #715308; }
.unavailable { background: #f7e9e9; color: #8b3030; }
.comparisons { margin-top: 56px; }
.comparison-window + .comparison-window { margin-top: 16px; }
.metric-strip { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; margin: 20px 0; overflow: hidden; border: 1px solid var(--line); border-radius: calc(var(--radius) - 3px); background: var(--line); }
.metric-strip > div { padding: 16px; background: var(--surface-soft); }
.metric-strip span, .metric-strip strong { display: block; }
.metric-strip span { margin-bottom: 7px; color: var(--muted); font-size: .72rem; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: .86rem; }
th, td { padding: 13px 10px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; white-space: nowrap; }
th { color: var(--muted); font-size: .69rem; letter-spacing: .05em; text-transform: uppercase; }
td:first-child { min-width: 260px; white-space: normal; }
td small { display: block; margin-top: 5px; color: var(--muted); line-height: 1.35; }

footer {
  display: flex; justify-content: space-between; gap: 20px; width: min(calc(100% - 48px), var(--width));
  margin: 0 auto; padding: 30px 0 42px; border-top: 1px solid var(--line); color: var(--muted); font-size: .78rem;
}
footer span:first-child { color: var(--text); font-weight: 800; }

@media (max-width: 900px) {
  .site-header { grid-template-columns: 1fr auto; padding: 0 18px; }
  .site-header nav { display: none; }
  .primary-fields { grid-template-columns: 1fr; }
  .advanced > div { grid-template-columns: 1fr 1fr; }
  .card-facts, .facts-grid, .metric-strip { grid-template-columns: 1fr 1fr; }
  .detail-columns { grid-template-columns: 1fr; }
  .tender-card.comparison-result { grid-template-columns: 1fr; }
  .previous-tenders-panel { border-top: 1px solid #efb7b2; border-left: 0; }
}

@media (max-width: 600px) {
  .site-header { min-height: 68px; }
  .brand { font-size: .98rem; }
  .theme-picker > button { font-size: 0; }
  .theme-picker > button::before { content: "Aspetto"; font-size: .78rem; }
  .hero { padding: 52px 18px 30px; }
  .hero h1 { font-size: 2.45rem; }
  .search-panel { padding: 11px; }
  .type-fields { align-items: stretch; flex-direction: column; }
  .type-fields span { text-align: center; }
  .clear-link { margin: 4px auto; }
  .advanced > div, .card-facts, .facts-grid, .metric-strip { grid-template-columns: 1fr; }
  .facts-grid .wide { grid-column: auto; }
  .results-section, .detail-shell { width: calc(100% - 32px); padding-top: 38px; }
  .section-heading, .panel-heading { align-items: flex-start; flex-direction: column; gap: 7px; }
  .tender-card, .panel { padding: 19px; }
  .tender-card.comparison-result { padding: 0; }
  .current-tender-panel, .previous-tenders-panel { padding: 19px; }
  .documents > article { flex-direction: column; }
  .document-meta { justify-content: flex-start; text-align: left; }
  .heading-actions { align-items: stretch; flex-direction: column; }
  footer { align-items: flex-start; flex-direction: column; width: calc(100% - 32px); }
}

/* Account, alert subscriptions and web-push controls */
.account-nav { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: .78rem; font-weight: 750; }
.account-nav a, .account-nav button { color: var(--ink); text-decoration: none; }
.account-nav form { margin: 0; }
.account-nav button, .text-button { padding: 0; border: 0; background: transparent; font: inherit; cursor: pointer; text-decoration: underline; }
.flash-messages { position: relative; z-index: 5; width: min(1180px, calc(100% - 48px)); margin: 16px auto 0; }
.flash { padding: 12px 15px; border: 1px solid #8dc9ac; border-radius: 8px; background: #e9f8f1; color: #075e47; font-weight: 700; }
.flash-error { border-color: #efb7b2; background: #fff0ee; color: #9c2018; }
.account-shell { display: grid; place-items: start center; min-height: 65vh; padding: 60px 24px; background: var(--surface-soft); }
.account-card { width: min(620px, 100%); padding: 30px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 12px 35px rgba(11,31,51,.08); }
.account-card h1 { margin: 3px 0 9px; }
.stacked-form { display: grid; gap: 16px; margin: 24px 0; }
.stacked-form label, .alert-form-field { display: grid; gap: 7px; color: var(--ink); font-size: .82rem; font-weight: 800; }
.stacked-form input:not([type="checkbox"]), .stacked-form textarea, .stacked-form select { width: 100%; padding: 11px 12px; border: 1px solid var(--line); border-radius: 7px; background: #fff; color: var(--ink); font: inherit; }
.stacked-form small { color: var(--muted); font-weight: 500; line-height: 1.45; }
.errorlist { margin: 4px 0 0; padding-left: 18px; color: #a72219; font-size: .76rem; }
.alert-dashboard { width: min(1180px, calc(100% - 48px)); margin: 0 auto; padding: 54px 0 70px; }
.alert-dashboard-heading, .saved-alert-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.alert-dashboard-heading h1 { margin: 3px 0 7px; }
.push-explainer { display: grid; grid-template-columns: auto 1fr; gap: 18px; margin: 28px 0 18px; padding: 22px; border: 1px solid #82c6b0; border-radius: var(--radius); background: linear-gradient(135deg, #e8f8f2, #fff); }
.push-explainer h2 { margin: 0 0 6px; }
.push-explainer p { margin: 5px 0; line-height: 1.5; }
.push-icon { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--current-green); font-size: 1.35rem; }
.channel-status { color: #07634b; font-weight: 800; }
.channel-status.error, .channel-warning { color: #8d321e; }
.channel-warning { margin: 14px 0; padding: 12px 14px; border: 1px solid #e4a995; border-radius: 8px; background: #fff4ef; font-weight: 700; }
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 14px; }
.secondary-button { display: inline-flex; align-items: center; justify-content: center; padding: 10px 14px; border: 1px solid var(--line); border-radius: 8px; background: #fff; color: var(--ink); font-weight: 800; text-decoration: none; cursor: pointer; }
.text-button.danger { color: #a72219; }
.saved-alerts { display: grid; gap: 18px; margin-top: 24px; }
.saved-alert-card { padding: 22px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); box-shadow: 0 6px 25px rgba(11,31,51,.045); }
.saved-alert-card.inactive { opacity: .72; }
.saved-alert-heading h2 { margin: 7px 0 0; }
.status-pill { display: inline-block; padding: 4px 8px; border-radius: 999px; background: #e5f7ee; color: #08704f; font-size: .68rem; font-weight: 850; text-transform: uppercase; }
.alert-chips { display: flex; flex-wrap: wrap; gap: 7px; margin: 16px 0; }
.alert-chips span { padding: 6px 9px; border-radius: 999px; background: var(--surface-soft); color: var(--muted); font-size: .72rem; font-weight: 750; }
.alert-preview-list { display: grid; gap: 8px; }
.alert-preview-list a { display: grid; grid-template-columns: 115px 1fr auto; gap: 10px; align-items: center; padding: 10px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--ink); text-decoration: none; }
.alert-preview-list a:hover { border-color: var(--accent); }
.alert-preview-list small { color: var(--muted); text-align: right; }
.alert-editor-shell { place-items: start center; }
.alert-editor { width: min(820px, 100%); }
.alert-form-field > ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin: 0; padding: 0; list-style: none; }
.alert-form-field > ul label { display: flex; align-items: center; gap: 7px; padding: 8px; border: 1px solid var(--line); border-radius: 7px; font-weight: 650; }

@media (max-width: 900px) {
  .site-header { flex-wrap: wrap; }
  .account-nav { order: 4; width: 100%; justify-content: flex-end; }
  .alert-preview-list a { grid-template-columns: 1fr; }
  .alert-preview-list small { text-align: left; }
}

@media (max-width: 600px) {
  .account-nav { justify-content: flex-start; overflow-x: auto; }
  .alert-dashboard-heading, .saved-alert-heading { flex-direction: column; }
  .push-explainer { grid-template-columns: 1fr; }
  .alert-form-field > ul { grid-template-columns: 1fr; }
  .account-card { padding: 22px; }
}
