/* Agenda Orvietana - foglio di stile principale */

@font-face { font-family: "Figtree"; src: url(../fonts/figtree-latin-400-normal.woff2) format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(../fonts/figtree-latin-400-italic.woff2) format("woff2"); font-weight: 400; font-style: italic; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(../fonts/figtree-latin-600-normal.woff2) format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Figtree"; src: url(../fonts/figtree-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(../fonts/bricolage-grotesque-latin-700-normal.woff2) format("woff2"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Bricolage Grotesque"; src: url(../fonts/bricolage-grotesque-latin-800-normal.woff2) format("woff2"); font-weight: 800; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url(../fonts/jetbrains-mono-latin-500-normal.woff2) format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #f6f7f8; --surface: #ffffff; --fg: #1e252c; --muted: #5b6670; --line: #dfe3e7;
  --basalto: #26303a; --travertino: #ece9e2; --tufo: #9a6a1f; --tufo-soft: #f3e7d2; --oro: #c9962f;
  --ok: #2f7d4a; --ok-soft: #e1f1e6; --warn: #a86a00; --warn-soft: #fbefd6; --bad: #b23a3a; --bad-soft: #f8e1e1;
  --info: #3563a8; --info-soft: #e3ebf6;
  --d1: #e6efe3; --d2: #f5dfb0; --d3: #eab0a0;
  --display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --body: "Figtree", "Segoe UI", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, Menlo, monospace;
  --radius: 12px; --shadow: 0 1px 2px rgba(20, 25, 30, .06), 0 4px 14px rgba(20, 25, 30, .05);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #14191e; --surface: #1c232a; --fg: #e8ebee; --muted: #9aa6b1; --line: #2e3841;
    --basalto: #0e1216; --travertino: #2a323a; --tufo: #e0b064; --tufo-soft: #3a2f1e; --oro: #d9a845;
    --ok: #6cc58a; --ok-soft: #1d3326; --warn: #e8b04e; --warn-soft: #3a2e16; --bad: #ec7f7f; --bad-soft: #3a1f1f;
    --info: #8db3ea; --info-soft: #1f2b3d;
    --d1: #233a2a; --d2: #4a3a17; --d3: #5a2a22;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.55 var(--body); padding-bottom: 72px; }
@media (min-width: 900px) { body { padding-bottom: 0; } }
img { max-width: 100%; height: auto; }
a { color: var(--tufo); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); font-weight: 800; }
h2 { font-size: 1.35rem; font-weight: 700; }
h3 { font-size: 1.08rem; font-weight: 700; }
p { margin: 0 0 1em; }
:focus-visible { outline: 3px solid var(--oro); outline-offset: 2px; border-radius: 4px; }
.mono { font-family: var(--mono); font-size: .92em; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.nowrap { white-space: nowrap; }
.sr, .hp { position: absolute !important; left: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; background: var(--oro); color: #000; padding: .5rem 1rem; z-index: 100; }
.skip:focus { left: 1rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
main { min-height: 60vh; padding-bottom: 2rem; }
.kicker { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--tufo); margin: 0 0 .4rem; }
.lead { font-size: 1.15rem; color: var(--muted); }

/* header */
.site-header { background: var(--basalto); color: #fff; position: sticky; top: 0; z-index: 20; }
.header-row { display: flex; align-items: center; gap: 1rem; min-height: 64px; }
.brand { display: flex; align-items: center; gap: .6rem; color: #fff; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 1.2rem; white-space: nowrap; }
.main-nav { display: none; gap: .2rem; margin-left: 1rem; }
.main-nav a { color: #d9dee3; text-decoration: none; padding: .45rem .7rem; border-radius: 8px; font-weight: 600; }
.main-nav a:hover, .main-nav a[aria-current] { color: #fff; background: rgba(255, 255, 255, .08); }
.header-actions { margin-left: auto; display: flex; gap: .5rem; align-items: center; }
.site-header .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .25); }
@media (min-width: 900px) { .main-nav { display: flex; } }
@media (max-width: 640px) { .hide-sm { display: none !important; } .brand span { font-size: 1.05rem; } }
@media (max-width: 400px) { .hide-xs { display: none; } }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .6rem 1rem; border-radius: 10px; border: 1px solid transparent; font: 600 .95rem/1.2 var(--body); text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn-primary { background: var(--oro); color: #1b1305; }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--muted); }
.btn-gold { background: var(--oro); color: #1b1305; }
.btn-warn { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.btn-danger { background: var(--bad-soft); color: var(--bad); border-color: var(--bad); }
.btn-link { background: none; color: var(--tufo); text-decoration: underline; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.linkish { background: none; border: 0; padding: 0; color: var(--tufo); font: inherit; text-decoration: underline; cursor: pointer; }
.linkish.danger { color: var(--bad); }

/* chips */
.chips, .cat-chips, .tabs { position: relative; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin: 1rem 0; }
.chip { display: inline-block; padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); text-decoration: none; font-weight: 600; font-size: .92rem; }
.chip:hover { border-color: var(--muted); }
.chip.on { background: var(--basalto); color: #fff; border-color: var(--basalto); }
.chip-cat::before { content: ""; display: inline-block; width: .6rem; height: .6rem; border-radius: 50%; background: var(--c); margin-right: .4rem; vertical-align: .05em; }
.chip-cat.on { background: var(--c); border-color: var(--c); }
.chip-cat.on::before { background: #fff; }
.chip-select { padding: .45rem .85rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: 600 .92rem var(--body); }
.zone-form { display: inline; }
.hero .chip { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .chip.on { background: var(--oro); color: #1b1305; border-color: var(--oro); }
.hero .chip-select { background: rgba(255, 255, 255, .06); color: #fff; border-color: rgba(255, 255, 255, .25); }
.hero .chip-select option { color: #000; }

/* hero */
.hero { background: var(--basalto); color: #fff; padding: 1.5rem 0 .5rem; position: relative; }
.hero::after { content: ""; display: block; height: 10px; margin-top: 1rem; background: repeating-linear-gradient(90deg, var(--basalto) 0 26px, var(--travertino) 26px 52px); }
@media (prefers-color-scheme: dark) { .hero::after { background: repeating-linear-gradient(90deg, #0e1216 0 26px, #b9b2a4 26px 52px); } }
.hero h1 { color: #fff; margin-bottom: 1rem; }
.hero .accent { color: var(--oro); }
.search { display: flex; gap: .5rem; max-width: 720px; }
.search input { flex: 1; min-width: 0; padding: .8rem 1rem; border-radius: 10px; border: 0; font: 1rem var(--body); background: #fff; color: #1e252c; }

/* layout home */
.home-grid { display: grid; gap: 2rem; margin-top: 1.5rem; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 900px) { .home-grid { grid-template-columns: minmax(0, 1fr) 320px; } }
.home-side { display: flex; flex-direction: column; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.1rem 1.2rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.card > :last-child { margin-bottom: 0; }
.card-dark { background: var(--basalto); color: #e8ebee; border-color: var(--basalto); }
.card-dark h3 { color: #fff; }
.card-dark a:not(.btn) { color: var(--oro); }

.featured { display: grid; grid-template-columns: 1fr; border-radius: var(--radius); overflow: hidden; background: var(--tufo-soft); color: var(--fg); text-decoration: none; border: 1px solid var(--line); margin-bottom: 1rem; }
.featured img { width: 100%; max-height: 260px; object-fit: cover; }
.featured div { padding: 1.1rem 1.2rem; }
.featured h2 { font-size: 1.5rem; }
.featured p { margin: 0; color: var(--muted); }
@media (min-width: 640px) { .featured.has-img { grid-template-columns: 200px 1fr; } .featured img { height: 100%; max-height: 240px; } }

.day { margin-bottom: 1.5rem; }
.day-title { font-size: 1.1rem; border-bottom: 2px solid var(--fg); padding-bottom: .4rem; margin-bottom: .2rem; }
.ev-list { list-style: none; padding: 0; margin: 0; }
.ev-row { border-bottom: 1px solid var(--line); }
.ev-link { display: flex; gap: .9rem; padding: .85rem .25rem; text-decoration: none; color: var(--fg); align-items: flex-start; }
.ev-link:hover { background: var(--surface); }
.ev-link:hover .ev-title { color: var(--tufo); }
.ev-date { flex: 0 0 48px; height: 52px; border-radius: 10px; background: var(--travertino); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ev-date b { font-family: var(--display); font-size: 1.35rem; }
.ev-date small { font-family: var(--mono); font-size: .7rem; text-transform: uppercase; color: var(--muted); margin-top: 2px; }
.ev-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .2rem; }
.ev-title { font-weight: 700; font-size: 1.05rem; line-height: 1.3; }
.ev-meta { color: var(--muted); font-size: .9rem; }
.ev-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .15rem; }
.ev-thumb { width: 56px; height: 70px; object-fit: cover; border-radius: 6px; flex: 0 0 auto; }
.tag { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; padding: .15rem .55rem; border-radius: 999px; background: color-mix(in srgb, var(--c, #5b6670) 14%, transparent); color: var(--fg); text-decoration: none; }
.tag::before { content: ""; width: .5rem; height: .5rem; border-radius: 50%; background: var(--c, #5b6670); }
.tag-free { --c: var(--ok); }
.tag-plain { background: var(--travertino); }
.tag-plain::before, .tag-free::before { display: none; }
.empty { padding: 2rem 1rem; text-align: center; color: var(--muted); background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); }

@media (max-width: 640px) {
  .cat-chips { flex-wrap: nowrap; overflow-x: auto; margin-left: -16px; margin-right: -16px; padding: 0 16px 4px; scrollbar-width: none; }
  .cat-chips .chip { flex: 0 0 auto; }
  .hero .chips { flex-wrap: nowrap; overflow-x: auto; margin-right: -16px; padding-right: 16px; scrollbar-width: none; }
  .hero .chip, .hero .chip-select { flex: 0 0 auto; }
}

/* mini calendario e densità */
.mini-cal { width: 100%; border-collapse: separate; border-spacing: 3px; text-align: center; font-family: var(--mono); font-size: .85rem; }
.mini-cal caption { font-family: var(--display); font-weight: 700; text-align: left; margin-bottom: .4rem; font-size: 1.05rem; }
.mini-cal th { color: var(--muted); font-weight: 500; font-size: .75rem; }
.mini-cal td { border-radius: 6px; height: 34px; padding: 0; }
.mini-cal td a, .mini-cal td span { display: flex; align-items: center; justify-content: center; height: 100%; color: var(--fg); text-decoration: none; }
.mini-cal td.today { outline: 2px solid var(--oro); }
.mini-cal td.past { opacity: .45; }
.mini-cal td.marked { box-shadow: inset 0 -4px 0 var(--info); }
.d0 { background: var(--bg); } .d1 { background: var(--d1); } .d2 { background: var(--d2); } .d3 { background: var(--d3); }
.legend { font-size: .78rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; margin: .5rem 0 0; }
.sw { display: inline-block; width: 12px; height: 12px; border-radius: 3px; border: 1px solid var(--line); vertical-align: -1px; }
.sw.marked { background: var(--info); }

/* calendario mensile */
.page-head { margin: 1.5rem 0 1rem; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.cal-head h1 { margin: 0; min-width: 9ch; text-align: center; }
.cal-filters { margin-left: auto; display: flex; gap: .5rem; flex-wrap: wrap; }
.cal-filters select, .filter-input { padding: .5rem .7rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; }
.filter-input { width: 100%; max-width: 420px; margin: .5rem 0 1rem; }
.cal-grid { display: grid; grid-template-columns: 1fr; gap: 6px; margin-bottom: 1rem; }
.cal-dow { display: none; }
.cal-cell { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: .4rem .5rem; min-height: 0; }
.cal-cell.no-ev, .cal-cell.empty-cell { display: none; }
.cal-cell.today { border-color: var(--oro); box-shadow: 0 0 0 1px var(--oro); }
.cal-cell.past { opacity: .6; }
.cal-day { font-family: var(--display); font-weight: 700; margin-bottom: .2rem; }
.cal-ev { display: block; font-size: .85rem; line-height: 1.3; padding: .2rem .35rem; margin: 2px 0; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 8%, transparent); border-radius: 4px; color: var(--fg); text-decoration: none; }
.cal-ev:hover { background: color-mix(in srgb, var(--c) 18%, transparent); }
.long-events { background: var(--tufo-soft); padding: .6rem .9rem; border-radius: 8px; margin-bottom: 1rem; font-size: .92rem; }
@media (min-width: 800px) {
  .cal-grid { grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
  .cal-dow { display: block; text-align: center; font-family: var(--mono); font-size: .78rem; color: var(--muted); }
  .cal-cell, .cal-cell.no-ev, .cal-cell.empty-cell { display: block; min-height: 110px; }
  .cal-cell.empty-cell { background: transparent; border-color: transparent; }
  .cal-day .dname { display: none; }
  .cal-ev { font-size: .78rem; }
  .cal-cell.d3 { background: color-mix(in srgb, var(--d3) 35%, var(--surface)); }
}

/* scheda evento */
.event-page { display: grid; gap: 2rem; margin-top: 1.5rem; }
@media (min-width: 900px) { .event-page { grid-template-columns: minmax(0, 1fr) 340px; } }
.event-page h1 { margin-top: .6rem; }
.facts { display: grid; gap: .1rem; margin: 1.5rem 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.facts > div { display: grid; grid-template-columns: 110px 1fr; gap: 1rem; padding: .75rem 1rem; border-bottom: 1px solid var(--line); }
.facts > div:last-child { border-bottom: 0; }
.facts dt { font-family: var(--mono); font-size: .78rem; text-transform: uppercase; color: var(--muted); padding-top: .15rem; }
.facts dd { margin: 0; font-weight: 600; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; }
.prose { max-width: 68ch; }
.prose p { margin-bottom: 1em; }
.poster { width: 100%; border-radius: var(--radius); border: 1px solid var(--line); display: block; }
.poster-placeholder { aspect-ratio: 4/5; border-radius: var(--radius); background: repeating-linear-gradient(180deg, var(--basalto) 0 28px, var(--travertino) 28px 56px); display: flex; align-items: center; justify-content: center; margin-bottom: 1rem; }
.poster-placeholder span { background: var(--surface); padding: .5rem 1rem; border-radius: 8px; font-family: var(--mono); font-weight: 500; }
.event-side .card { margin-top: 1rem; }
.plain { list-style: none; padding: 0; margin: 0; }
.plain li { padding: .3rem 0; }
.more { margin-top: 2rem; }

.cards-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); }
.assoc-card { text-decoration: none; color: var(--fg); display: block; }
.assoc-card:hover h2 { color: var(--tufo); }
.assoc-card h2 { font-size: 1.15rem; }
.two-col { display: grid; gap: 2rem; }
@media (min-width: 900px) { .two-col { grid-template-columns: minmax(0, 1fr) 340px; } }
.two-equal { display: grid; gap: 1rem; }
@media (min-width: 800px) { .two-equal { grid-template-columns: 1fr 1fr; } }
.steps { padding-left: 1.2rem; }
.steps li { margin-bottom: .5rem; }
.code { width: 100%; font-family: var(--mono); font-size: .78rem; border-radius: 8px; border: 1px solid var(--line); padding: .5rem; background: var(--bg); color: var(--fg); }
.message-card { margin-top: 2rem; text-align: center; padding: 2rem; }

/* moduli */
form.stack, .stack { display: flex; flex-direction: column; gap: .35rem; }
.stack > label:not(.check) { margin-top: .5rem; }
label { font-weight: 600; font-size: .92rem; }
input:not([type=checkbox]):not([type=radio]):not([type=color]):not([type=file]), select, textarea {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); font: 1rem var(--body);
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--oro); outline-offset: 0; border-color: var(--oro); }
.check { display: block; position: relative; padding-left: 1.7rem; font-weight: 500; }
.check input { position: absolute; left: 0; top: .2rem; margin: 0; width: 1.05rem; height: 1.05rem; accent-color: var(--tufo); }
.field-error { color: var(--bad); font-size: .85rem; font-weight: 600; display: block; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem 1.2rem; margin: 0 0 1rem; background: var(--surface); }
legend { font-family: var(--display); font-weight: 700; font-size: 1.1rem; padding: 0 .4rem; }
fieldset > label { display: block; margin: .8rem 0 .3rem; }
fieldset > label.check { margin: .6rem 0; }
.num { display: inline-flex; width: 1.6rem; height: 1.6rem; align-items: center; justify-content: center; border-radius: 50%; background: var(--basalto); color: #fff; font-size: .85rem; margin-right: .3rem; }
.row2, .row3 { display: grid; gap: .8rem; grid-template-columns: 1fr; margin: .4rem 0; }
.row2 > div > label, .row3 > div > label { display: block; margin: .4rem 0 .3rem; }
@media (min-width: 640px) { .row2 { grid-template-columns: 1fr 1fr; } .row3 { grid-template-columns: repeat(3, 1fr); } }
.check-cell { display: flex; flex-direction: column; justify-content: flex-end; padding-bottom: .5rem; }
.event-form { max-width: 820px; }
.form-actions { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }
.sticky-actions { position: sticky; bottom: 72px; background: var(--bg); padding: .8rem 0; border-top: 1px solid var(--line); z-index: 5; }
@media (min-width: 900px) { .sticky-actions { bottom: 0; } }
.small-title { font-size: .95rem; margin: 1rem 0 .4rem; }
.poster-current { display: flex; gap: 1rem; align-items: center; margin-bottom: .5rem; }
.poster-current img { border-radius: 6px; }

/* conflitti */
.conflicts { display: flex; flex-direction: column; gap: .5rem; }
.cf { border-radius: 10px; padding: .6rem .8rem; border-left: 4px solid; }
.cf p { margin: .2rem 0 0; font-size: .92rem; }
.cf .badge { margin-left: .3rem; }
.cf-block { background: var(--bad-soft); border-color: var(--bad); }
.cf-warn { background: var(--warn-soft); border-color: var(--warn); }
.cf-info { background: var(--info-soft); border-color: var(--info); }
.cf-ok { background: var(--ok-soft); border-color: var(--ok); }
.cf-loading { opacity: .6; }

/* badge e messaggi */
.badge { display: inline-block; font-family: var(--mono); font-size: .72rem; font-weight: 500; padding: .12rem .45rem; border-radius: 6px; background: var(--travertino); color: var(--fg); vertical-align: .1em; white-space: nowrap; }
.st-draft { background: var(--travertino); }
.st-received, .st-review { background: var(--info-soft); color: var(--info); }
.st-needs_info { background: var(--warn-soft); color: var(--warn); }
.st-published { background: var(--ok-soft); color: var(--ok); }
.st-rejected, .st-withdrawn { background: var(--bad-soft); color: var(--bad); }
.cf-badge-block { background: var(--bad-soft); color: var(--bad); }
.cf-badge-warn { background: var(--warn-soft); color: var(--warn); }
.cf-badge-info { background: var(--info-soft); color: var(--info); }
.flash { padding: .8rem 1rem; border-radius: 10px; margin: 1rem 0; border-left: 4px solid; }
.flash-ok { background: var(--ok-soft); border-color: var(--ok); }
.flash-error { background: var(--bad-soft); border-color: var(--bad); }
.flash-warn { background: var(--warn-soft); border-color: var(--warn); }
.flash-info { background: var(--info-soft); border-color: var(--info); }
.count { display: inline-block; min-width: 1.4rem; padding: 0 .35rem; border-radius: 999px; background: var(--oro); color: #1b1305; font-size: .78rem; text-align: center; font-family: var(--mono); }

/* tabelle e area riservata */
.table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-bottom: 1.5rem; }
.table th, .table td { text-align: left; padding: .65rem .75rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { font-family: var(--mono); font-size: .74rem; text-transform: uppercase; color: var(--muted); font-weight: 500; background: var(--bg); }
.table input { min-width: 0; }
.w-num { width: 5rem !important; }
.row-actions { font-size: .9rem; }
.row-actions > * { margin-right: .6rem; }
.row-actions form, form.inline { display: inline; }
@media (max-width: 700px) {
  .table thead { display: none; }
  .table, .table tbody, .table tr, .table td { display: block; width: 100%; }
  .table tr { border-bottom: 1px solid var(--line); padding: .4rem 0; }
  .table td { border: 0; padding: .25rem .75rem; }
}
.dash-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: flex-end; gap: 1rem; }
.dash-head .actions { margin: 0; }
.dash-section { margin-bottom: 1.5rem; }
.subnav { display: flex; gap: .3rem; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 1rem; overflow-x: auto; }
.subnav a { padding: .55rem .8rem; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.subnav a[aria-current] { color: var(--fg); border-color: var(--oro); }
.review-grid { display: grid; gap: 1.5rem; }
@media (min-width: 1000px) { .review-grid { grid-template-columns: minmax(0, 1fr) 360px; } .review-side { position: sticky; top: 80px; align-self: start; max-height: calc(100vh - 90px); overflow: auto; } }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { padding: .2rem 0; }
.templates { color: var(--muted); }
.mail-src { white-space: pre-wrap; font-family: var(--mono); font-size: .78rem; max-height: 320px; overflow: auto; background: var(--bg); padding: .6rem; border-radius: 8px; }
.log li { border-bottom: 1px dashed var(--line); }
.hl { background: var(--tufo-soft); border-radius: 6px; padding-left: .4rem; }
.cal-nav { display: flex; gap: .8rem; align-items: center; margin: .5rem 0 1rem; flex-wrap: wrap; }
.cal-nav a { text-decoration: none; font-weight: 700; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: .8rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem 1rem; }
.stat b { display: block; font-family: var(--display); font-size: 1.8rem; }
.stat span { color: var(--muted); font-size: .88rem; }
.coord-list { display: flex; flex-direction: column; gap: 3px; margin-bottom: 1.5rem; }
.coord-day { display: grid; grid-template-columns: 90px 1fr; gap: .6rem; padding: .35rem .6rem; border-radius: 6px; }
.coord-day.d0 { background: var(--surface); }
.coord-ev { display: block; color: var(--fg); text-decoration: none; font-size: .9rem; }
.coord-ev:hover { text-decoration: underline; }
.coord-hold { color: var(--info); }

/* footer e barra mobile */
.site-footer { background: var(--basalto); color: #c5ccd3; margin-top: 3rem; padding-bottom: 2rem; font-size: .92rem; }
.site-footer a { color: #e5e9ec; }
.site-footer strong { color: #fff; font-family: var(--display); font-size: 1.1rem; }
.bands { height: 12px; background: repeating-linear-gradient(90deg, var(--basalto) 0 26px, var(--travertino) 26px 52px); margin-bottom: 1.5rem; }
@media (prefers-color-scheme: dark) { .bands { background: repeating-linear-gradient(90deg, #0e1216 0 26px, #b9b2a4 26px 52px); } }
.footer-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.tabbar { position: fixed; bottom: 0; left: 0; right: 0; display: grid; grid-template-columns: repeat(4, 1fr); background: var(--surface); border-top: 1px solid var(--line); z-index: 30; padding-bottom: env(safe-area-inset-bottom); }
.tabbar a { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: .45rem 0 .5rem; font-size: .72rem; color: var(--muted); text-decoration: none; font-weight: 600; }
.tabbar a[aria-current] { color: var(--tufo); }
.tabbar svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; }
@media (min-width: 900px) { .tabbar { display: none; } }

/* widget */
body.widget { padding: .5rem; background: transparent; }

@media print {
  .site-header, .site-footer, .tabbar, .actions, .chips, .cat-chips, .home-side { display: none !important; }
  body { padding: 0; }
}
