:root {
    --bg: #fbf9f4;
    --surface: #ffffff;
    --ink: #2b2a27;
    --muted: #6d6a62;
    --line: #e6e1d6;
    --brand: #b7791f;
    --brand-dark: #8a5a14;
    --soft: #f3ecdc;
    --radius: 12px;
}
@media (prefers-color-scheme: dark) {
    :root {
        --bg: #17160f;
        --surface: #211f17;
        --ink: #efeadd;
        --muted: #a39e90;
        --line: #38352a;
        --brand: #e0a443;
        --brand-dark: #f0bd6a;
        --soft: #2b2819;
    }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
img { max-width: 100%; display: block; }
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; font-family: Georgia, "Times New Roman", serif; font-weight: 600; }
h1 { font-size: clamp(1.7rem, 4vw, 2.5rem); margin: 0 0 .6rem; }
h2 { font-size: 1.5rem; margin: 2rem 0 .8rem; }
h3 { font-size: 1.1rem; margin: 0 0 .3rem; }
.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.section { padding: 28px 0 40px; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
.meta { color: var(--muted); font-size: .9rem; margin: 0 0 .25rem; }
.lead { font-size: 1.15rem; color: var(--muted); }
.pre { white-space: pre-line; }

.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.site-header .bar { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 60px; flex-wrap: wrap; }
.brand { font: 600 1.3rem Georgia, serif; text-decoration: none; color: var(--ink); }
.site-header nav { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.site-header nav a { text-decoration: none; color: var(--ink); padding: 4px 0; border-bottom: 2px solid transparent; }
.site-header nav a.active, .site-header nav a:hover { border-bottom-color: var(--brand); }
.site-header nav a.btn { border-bottom: 0; color: #fff; }

.btn { display: inline-block; background: var(--brand); color: #fff; border: 0; padding: 10px 20px; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn:hover { background: var(--brand-dark); }
.btn-small { padding: 6px 14px; font-size: .9rem; }

.hero { background: var(--soft); padding: 56px 0 44px; text-align: center; }
.hero .lead { margin: 0 auto 22px; max-width: 40rem; }
.search { display: flex; gap: 8px; max-width: 560px; margin: 0 auto 14px; }
.search input { flex: 1; }
input[type=search], select { font: inherit; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); min-width: 0; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin: 14px 0 22px; }
.filters input[type=search] { flex: 1 1 220px; }

.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.section-head h2 { margin-top: 0; }

.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.grid-6 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-media { display: block; aspect-ratio: 16 / 10; background: var(--soft); }
.card-person .card-media { aspect-ratio: 1; }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.placeholder { display: grid; place-items: center; height: 100%; font-size: 2.5rem; color: var(--brand); }
.card-body { padding: 14px 16px 16px; }
.card-body h3 a { color: var(--ink); text-decoration: none; }
.card-body h3 a:hover { color: var(--brand-dark); }
.chip { display: inline-block; font-size: .8rem; background: var(--soft); color: var(--brand-dark); border-radius: 999px; padding: 2px 10px; margin: 4px 4px 0 0; text-decoration: none; }
.chip-soft { color: var(--muted); }

.tabs { display: flex; gap: 6px; margin: 8px 0; }
.tabs a { padding: 6px 16px; border-radius: 999px; text-decoration: none; color: var(--ink); border: 1px solid var(--line); }
.tabs a.active { background: var(--brand); color: #fff; border-color: var(--brand); }

.map { height: 340px; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 0 24px; z-index: 0; }

.detail-grid { display: grid; gap: 32px; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
@media (max-width: 860px) { .detail-grid { grid-template-columns: 1fr; } }
.cover { width: 100%; max-height: 460px; object-fit: cover; border-radius: var(--radius); margin-bottom: 20px; }
.portrait { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: var(--radius); margin-bottom: 16px; }
.thumb { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 8px; }
.detail-side { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.facts { margin: 0 0 12px; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin-top: 12px; }
.facts dd { margin: 2px 0 0; }
.prose { max-width: 70ch; }
.prose img { border-radius: 8px; }
.schedule-day { border-left: 3px solid var(--brand); padding-left: 14px; margin: 0 0 20px; }
.crumbs { margin: 0 0 12px; }

.pager { display: flex; justify-content: space-between; align-items: center; margin-top: 28px; gap: 12px; flex-wrap: wrap; }
.pager .disabled { color: var(--muted); opacity: .5; }

.cta { background: var(--soft); text-align: center; padding: 44px 0; margin-top: 20px; }
.site-footer { border-top: 1px solid var(--line); padding: 28px 0; font-size: .95rem; }
.site-footer p { margin: 4px 0; }

.form { display: grid; gap: 14px; margin-top: 24px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: .95rem; }
.form input[type=text], .form input[type=email], .form textarea { font: inherit; font-weight: 400; padding: 10px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); color: var(--ink); width: 100%; }
.form .check { grid-template-columns: auto 1fr; align-items: start; font-weight: 400; }
.form .btn { justify-self: start; }
.hp { position: absolute; left: -9999px; height: 0; overflow: hidden; }
.err { color: #c0392b; font-weight: 400; font-size: .875rem; }
.notice { padding: 14px 18px; border-radius: var(--radius); background: var(--soft); border: 1px solid var(--line); }
.notice.ok { border-color: var(--brand); }

/* Negozio */
.price{font-weight:600;margin:.25rem 0}
.price.big{font-size:1.6rem}
.price s{color:#888;font-weight:400;margin-right:.35rem}
.table{width:100%;border-collapse:collapse;margin:.5rem 0 1rem}
.table th,.table td{padding:.5rem .6rem;border-bottom:1px solid #e5e5e0;text-align:left;vertical-align:top}
.link{background:none;border:0;cursor:pointer;color:inherit;font-size:1rem}
.btn-outline{background:transparent;color:inherit;border:1px solid currentColor}
fieldset.group{border:1px solid #e5e5e0;border-radius:8px;padding:1rem;margin:0 0 1rem}
fieldset.group ul{margin:.5rem 0;padding-left:1.1rem}
.check{display:flex;gap:.5rem;align-items:flex-start}
.check input{width:auto;margin-top:.25rem}
.narrow{max-width:480px}

/* Corsi */
.syllabus{padding-left:1.2rem}
.syllabus li{margin:.45rem 0}
.video{position:relative;padding-top:56.25%;margin:1rem 0}
.video iframe{position:absolute;inset:0;width:100%;height:100%;border:0}
