:root {
    --header-h: 7.5rem;
    --page-pad: 65px;
}

html { font-size: clamp(12px, 1.1vw, 16px); }

* { box-sizing: border-box; }
body { background: white !important; margin: 0; overflow: hidden; font-family: Helvetica, sans-serif; }

.reveal {
    top: var(--header-h) !important;
    height: calc(100vh - var(--header-h)) !important;
    position: relative;
    z-index: 1;
    transition: opacity 200ms ease;
}
body.is-loading .reveal {
    opacity: 0;
    pointer-events: none;
}
.reveal .slides { width: 100% !important; height: 100% !important; }
.reveal .slides section { height: 100% !important; }
.reveal section {
    padding: 30px 65px !important;
    text-align: left !important;
    box-sizing: border-box;
}

/* HEADER NON MODIFICARE */
.bauhaus-header {
    position: fixed;
    top: 0; left: 0; width: 100%; height: var(--header-h);
    background: white;
    display: flex; justify-content: space-between; align-items: center;
    padding: 0 var(--page-pad); border-bottom: 2px solid #eee;
    z-index: 9999;
}

.header-left {
    font-size: 1.375rem;
    font-weight: 400;
    color: #444;
}

.nav-container { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; position: relative; }
.nav-dots { display: flex; align-items: center; gap: 40px; }
.nav-label {
    position: absolute;
    right: calc(100% + 16px);
    top: calc(50% - 10px);
    transform: translateY(-50%);
    height: 1.125rem;
    line-height: 1.125rem;
    padding: 0 8px;
    font-size: 0.875rem;
    font-weight: 300;
    font-family: Helvetica, sans-serif;
    color: #111;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 999px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 160ms ease;
}
.nav-label.is-visible { opacity: 1; }
.nav-breadcrumb {
    height: 1.3125rem;
    line-height: 1.3125rem;
    font-size: 1.0625rem;
    font-weight: 400;
    font-family: Helvetica, sans-serif;
    color: #444;
    white-space: nowrap;
    margin-top: 8px;
    cursor: pointer;
}

.breadcrumb-file {
    color: #e5e5e5;
    font-weight: 400;
    font-size: 0.85em;
    margin-left: 6px;
}
.dot-group { display: flex; gap: 10px; }
.dot { width: 1.125rem; height: 1.125rem; border-radius: 50%; background: var(--dot-color); }
.dot.is-active { position: relative; background: none; border: 1.5px solid var(--dot-color); }
.dot.is-active::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: var(--dot-color);
    clip-path: inset(0 50% 0 0);
    transition: transform 180ms ease;
    transform: scale(1);
}
.g1 { --dot-color: #222; } .g2 { --dot-color: #5e5e5e; } 
.c1 { --dot-color: #ef596b; } .c2 { --dot-color: #b9242d; } .c3 { --dot-color: #901d22; } .c4 { --dot-color: #6e161b; }
.c5 { --dot-color: #4d1013; } .f1 { --dot-color: #77cee5; } .f2 { --dot-color: #3aa1c3; }
.f3 { --dot-color: #2f789c; } .f4 { --dot-color: #023752; }
.m1 { --dot-color: #c8d93d; } .m2 { --dot-color: #b5bf69; }

/* TIPOGRAFIA */
.h-bold { font-weight: 900; font-size: 5rem; line-height: 1; text-transform: uppercase; margin: 0; color: black; }
.h-light { font-weight: 300; font-size: 1.5rem; color: #888; text-transform: uppercase; margin-top: 20px; }

.slide-heading {
    font-weight: 900;
    font-size: 3.75rem;
    line-height: 1;
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    color: #000;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.slide-heading::before {
    content: "#";
    color: var(--section-accent, #000);
}

.h-bold {
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
}

.h-bold::before {
    content: "#";
    color: var(--section-accent, #000);
}

.slide-subheading {
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.2;
    text-transform: uppercase;
    margin: 0 0 1.5rem 0;
    color: #2e2e2e;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    padding-bottom: 0.2rem;
    padding-top: 0.8rem;
    text-decoration: none;
}

.slide-subheading:empty {
    display: none;
    margin: 0;
    padding: 0;
}

.slide-subheading-link {
    font-weight: 500;
    font-size: 1rem; /* solo il link */
    color: var(--section-accent, #8e8e8e);
}

.slide-subheading-link:hover {
    text-decoration: underline;
}

/* Spazio extra tra link-subheading e tabs nelle slide ruoli */
.layout-vertical-tabs .slide-subheading-link {
    display: inline-block;
    margin: 0.15rem 0 1.8rem 0;
    padding-top: 0;
}

.slide-h3 {
    font-weight: 600;
    font-size: 2.2rem;
    line-height: 1;
}
.cover-subheading {
    font-weight: 600;
    font-size: 3.8rem;
    line-height: 1;
    text-transform: none;
    margin: 0 0 1.5rem 0;
    color: #5e5e5e;
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    padding-bottom: 2.1rem;
}
/* Testo base e varianti */
.reveal section p {
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.55;
    color: #3a3a3a;
    margin: 0 0 1rem 0;
}

.text-muted {
    color: #5c5c5c;
    font-size: 1.25rem;
}

/* Elenchi con freccia sottile */
.reveal section ul {
    list-style: none;
    padding-left: 0;
    margin: 0 0 1rem 0;
}

.reveal section ul li {
    position: relative;
    padding-left: 1.8rem;
    margin: 0.8rem 0;
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.5;
    color: #383838;
    overflow-wrap: break-word;
    text-wrap: pretty;
    hyphens: auto;
}

.reveal section ul li::before {
    content: "\2192";
    position: absolute;
    left: 0;
    top: 0.05rem;
    color: var(--section-accent, #000);
    font-weight: 400;
}

.reveal section ol {
    margin: 0 0 1rem 1.25rem;
    padding: 0;
}

.reveal section ol li {
    margin: 0.35rem 0;
    font-weight: 300;
    font-size: 1.5rem;
    line-height: 1.2;
    color: #666;
}

/* Layout base per slide con titolo e due box */
.layout-standard {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    height: 100%;
    min-height: 0;
}
.reveal .slides section.layout-standard {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
}
.reveal section.layout-standard {
    padding-top: 40px !important;
}

.layout-standard .slide-title,
.layout-standard .slide-heading,
.layout-split .slide-title,
.layout-split .slide-heading {
    font-weight: 900;
    font-size: 3.75rem;
    text-transform: uppercase;
    color: #000;
    /*margin: 0;*/
    text-align: left;
    margin-left: 0px;   /* oppure 20px, 40px... */
    display: flex;
    align-items: baseline;
    gap: 0.35rem;
    margin: 0;
}

.layout-standard .slide-title::before,
.layout-standard .slide-heading::before,
.layout-split .slide-title::before,
.layout-split .slide-heading::before {
    content: "#";
    color: var(--section-accent, #000);
}

.layout-standard .slide-subheading,
.layout-split .slide-subheading,
.layout-full .slide-subheading {
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.layout-standard .slide-subheading:empty,
.layout-split .slide-subheading:empty,
.layout-full .slide-subheading:empty {
    display: none;
}

.layout-full .slide-heading,
.layout-full .slide-title {
    margin: 0;
}

.layout-standard .slide-body {
    display: grid;
    grid-template-columns: minmax(32.5rem, 1.15fr) minmax(26.25rem, 1fr);
    gap: 3rem;
    align-items: stretch;
    margin-top: 0;
    flex: 1 1 auto;
    min-height: 0;
}

.layout-standard .box,
.layout-split .box {
    padding: 1.5rem;
    min-height: 0;
    height: 100%;
    box-sizing: border-box;
}

.layout-standard .box--media,
.layout-split .box--media {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
}

.layout-standard .box--media img,
.layout-standard .box--media .figure-svg,
.layout-split .box--media img,
.layout-split .box--media .figure-svg {
    width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: top left;
}

.layout-standard .box--chart,
.layout-split .box--chart {
    display: flex;
    align-items: flex-start;
    justify-content: flex-start;
    height: 100%;
    max-height: 100%;
    overflow: hidden;
    border: 0 dashed #d22;
    padding: 8px 8px 16px 16px;
    box-sizing: border-box;
}

/* Layout split: 50/50 sull'intera slide */
.layout-split {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

.reveal section.layout-split {
    padding-top: 40px !important;
}
.reveal .slides section.layout-split {
    display: flex !important;
}

.layout-split .split-left {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
    flex: 1 1 0;
    height: 100%;
}

.layout-split .split-right {
    display: flex;
    min-width: 0;
    min-height: 0;
    flex: 1 1 0;
    height: 100%;
}

.layout-split.layout-60-40 {
    display: flex;
    gap: 3rem;
    align-items: stretch;
    height: 100%;
    min-height: 0;
}

.layout-split.layout-60-40 .split-left {
    flex: 3 1 0;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.layout-split.layout-60-40 .split-right {
    flex: 2 1 0;
    display: flex;
    min-width: 0;
    min-height: 0;
    height: 100%;
}

.layout-split.layout-60-40 .split-right-stack {
    display: grid;
    grid-template-rows: auto auto minmax(0, 1fr);
    gap: 0.75rem;
    height: 100%;
    width: 100%;
}

.layout-split.layout-60-40 .split-left .box,
.layout-split.layout-60-40 .split-right .box {
    flex: 1 1 auto;
    min-height: 0;
}

.layout-split.layout-60-40 .slide-subheading {
    color: #222;
}

.layout-split .split-right .box {
    flex: 1 1 auto;
}

.layout-equal-boxes .box {
    height: 100%;
}

.roles-slide .box--chart {
    overflow: hidden;
    align-items: stretch;
    padding: 0;
}

.roles-slide {
    position: relative;
}

.roles-circle {
    width: 100%;
    height: 100%;
    flex: 1 1 auto;
    min-height: 100%;
}

.roles-circle svg {
    width: 100%;
    height: 100%;
}

.roles-circle-bg {
    fill: var(--section-accent, #f3efda);
}

.roles-node-circle {
    fill: #fcfcfc;
    transition: fill 150ms ease;
}

.roles-node:hover .roles-node-circle {
    fill: #d1cfcf;
}

.roles-node.is-active .roles-node-circle {
    fill: #d1cfcf;
}

.roles-node-label {
    font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
    font-size: 15px;
    font-weight: 500;
    fill: #222222;
    text-anchor: middle;
}


.roles-panel {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}


.roles-panel-empty {
    color: #666;
    font-size: 1.35rem;
    line-height: 1.5;
}

.roles-panel-empty.is-hidden {
    display: none;
}

.roles-panel-content {
    display: none;
}

.roles-panel-content.is-visible {
    display: block;
}

.roles-overlay {
    position: absolute;
    inset: 0;
    display: none;
    z-index: 5;
}

.roles-overlay.is-visible {
    display: block;
}

.roles-overlay-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.6);
}

.roles-overlay-panel {
    position: absolute;
    top: 0;
    right: 0;
    width: 66%;
    height: 100%;
    background: rgba(255, 255, 255, 0.92);
    padding: 1.8rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.roles-overlay .roles-panel-content {
    display: flex;
}

.roles-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.roles-role {
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--section-accent, #000);
}

.roles-person {
    font-size: 1.4rem;
    font-weight: 700;
    color: #222;
    margin-top: 0.35rem;
}

.roles-close {
    appearance: none;
    border: 0;
    background: transparent;
    color: #5e5e5e;
    padding: 0.2rem 0.3rem;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.roles-sunburst {
    width: 100%;
    height: min(60vh, 560px);
}

.roles-slide .slide-body {
    margin-top: 0.6rem;
}

.roles-error {
    font-size: 1rem;
    color: #a33;
    padding: 1rem;
}

.layout-standard .chart-circle {
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    aspect-ratio: 1 / 1;
    border: none;
}

.chart-embed {
    width: 100%;
    height: 100%;
    border: 0 dashed #222;
    display: block;
    flex: 1 1 auto;
    align-self: stretch;
}

/* Debug bordi: attivali mettendo <body class="debug-borders"> */
body.debug-borders .layout-standard .box,
body.debug-borders .layout-split .box { border: 1.5px dashed #999; }
body.debug-borders .layout-standard .box--media,
body.debug-borders .layout-split .box--media { border: 2px dashed #2a6; }
body.debug-borders .layout-standard .box--chart,
body.debug-borders .layout-split .box--chart { border: 2px dashed #d22; }
body.debug-borders .chart-embed { border: 2px dashed #222; }

.chart-test-img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Layout con box unico 100% */
.layout-full {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    width: 100%;
    height: 100%;
    min-height: 0;
}
.reveal .slides section.layout-full {
    display: flex !important;
    flex-direction: column;
    align-items: stretch;
}

.layout-full .slide-body {
    margin-top: 0;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    min-height: 0;
    display: flex;
    align-items: stretch;
    flex: 1 1 auto;
}

.layout-full .box {
    padding: 1.5rem;
    min-height: 0;
    height: 100%;
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    box-sizing: border-box;
}

.layout-full .box--chart {
    display: flex;
    align-items: stretch;
    justify-content: stretch;
    box-sizing: border-box;
}

.layout-full.compact .slide-body {
    margin-top: 1rem;
}

/* Layout tabellare semplice */
.layout-table {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 0.75rem;
}

.layout-table .slide-body {
    margin-top: 0.4rem;
}

.table-simple {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
    font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, sans-serif;
    color: #222;
}

.table-simple colgroup col:first-child { width: 32%; }
.table-simple colgroup col:last-child { width: 68%; }

.table-simple thead th {
    background: #1f1f1f;
    color: #fff;
    font-weight: 700;
    font-size: 1.35rem;
    padding: 0.85rem 1rem;
    text-align: left;
    border-right: 2px solid #fff;
}

.table-simple thead th:last-child {
    border-right: none;
}

.table-simple tbody td {
    padding: 0.7rem 1rem;
    font-size: 1.2rem;
    font-weight: 400;
    border-bottom: 1.5px solid #2b2b2b;
    vertical-align: top;
}

.table-simple tbody td + td {
    border-left: 1.5px solid #2b2b2b;
}

.table-simple .table-section {
    font-weight: 800;
    font-size: 1.35rem;
    text-transform: uppercase;
    padding: 1rem 0.25rem 0.45rem 0.25rem;
    border-bottom: 1.5px solid #2b2b2b;
}

/* Vertical tabs layout */
.layout-vertical-tabs {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 1.25rem;
}

.layout-vertical-tabs .tabs-body {
    display: grid;
    grid-template-columns: 16rem 1fr;
    gap: 3rem;
    align-items: start;
    min-height: 28rem;
}

.tabs-nav {
    display: flex;
    flex-direction: column;
    gap: 2.1rem;
    padding-top: 0.25rem;
}

.tab-btn {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    text-align: left;
    cursor: pointer;
    font-family: Helvetica, sans-serif;
    font-size: 1.6rem;
    font-weight: 300;
    text-transform: none;
    color: #000;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.tab-btn:hover {
    color: var(--section-accent, #000);
    text-decoration: underline;
}

.tab-btn.is-active {
    color: var(--section-accent, #000);
}

.tabs-panels {
    position: relative;
    min-height: 20rem;
}

.tab-panel {
    display: none;
}

.tab-panel.is-active {
    display: block;
}

/* Ruoli: overlay mappa (slide 002_02) */
.roles-map {
    position: relative;
}

.roles-map::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(19, 19, 19, 0.36);
    opacity: 0;
    transition: opacity 180ms ease;
    pointer-events: none;
    z-index: 4;
}

.roles-map.is-overlay-open::before {
    opacity: 1;
}

.roles-map .roles-map-overlay {
    position: absolute;
    top: 0;
    right: 0;
    width: 60%;
    height: 100%;
    background: rgba(255, 255, 255, 0.98);
    padding: 2.5rem 3rem;
    box-sizing: border-box;
    z-index: 5;
    display: none;
}

.roles-map .roles-map-overlay.is-open {
    display: block;
}

.roles-map .roles-map-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    border: 0;
    background: transparent;
    font-size: 1.8rem;
    font-weight: 400;
    color: #222;
    cursor: pointer;
}

.roles-map .roles-map-title {
    margin: 0 0 2rem 0;
    font-family: Helvetica, sans-serif;
    font-size: 1.8rem;
    font-weight: 800;
    text-transform: uppercase;
    color: #111;
}

.roles-map .roles-map-title .hash {
    color: var(--section-accent, #c33);
    margin-right: 0.35rem;
}

.roles-map .roles-map-tabs {
    display: flex;
    gap: 3rem;
    margin: 0 0 2rem 0;
}

.roles-map .roles-map-tab {
    appearance: none;
    background: transparent;
    border: 0;
    padding: 0;
    margin: 0;
    cursor: pointer;
    font-family: Helvetica, sans-serif;
    font-size: 1.2rem;
    font-weight: 400;
    color: #000;
    text-decoration: none;
    text-decoration-thickness: 2px;
    text-underline-offset: 6px;
}

.roles-map .roles-map-tab:hover,
.roles-map .roles-map-tab.is-active {
    color: var(--section-accent, #000);
    text-decoration: underline;
}

.roles-map .roles-map-panel {
    display: none;
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    color: #000;
    text-decoration: none;
}

.roles-map .roles-map-panel.is-active {
    display: block;
}

.roles-map .roles-map-panel p,
.roles-map .roles-map-panel ul,
.roles-map .roles-map-panel li {
    font-family: Helvetica, "Helvetica Neue", Arial, sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    color: #000;
    line-height: 1.55;
}

.roles-map .roles-map-panel ul {
    margin: 1rem 0 0 0;
    padding-left: 1.4rem;
}

/* Stile per tab Manifesto */
.manifesto-box {
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding-left: 0.5rem;
}

.manifesto-line {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    line-height: 0.9;
    letter-spacing: -0.03em;
    /* Rimosso text-transform uppercase */
}

.line-1 {
    font-weight: 900;
    font-size: 6.5rem;
    line-height: 1;
    color: #000;
}

.line-2 {
    font-weight: 300; /* Un Light elegante */
    font-size: 6.5rem;
    line-height: 1;
    color: #000;
}

.line-3 {
    font-weight: 300;
    font-size: 5rem; /* Più piccolo, per creare una cadenza */
    color: #666;
    line-height: 1.1;
    margin-top: -5px;
}

.manifesto-divider {
    width: 60vw;
    height: 1px;
    background-color: var(--section-accent, #000);
    margin: 30px 0;
}

.line-4 {
    font-weight: 800;
    font-size: 4.5rem;
    color: #000;
    display: flex;
    align-items: center;
    gap: 12px;
}

.line-4 .dot {
    color: var(--section-accent, #902428);
    font-size: 3.8rem;
}


.figure-svg { 
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: 100%;
    display: block;
}
