:root {
  color-scheme: light;
  --ink: #17314a;
  --navy: #123c57;
  --teal: #58bba9;
  --teal-ink: #006b63;
  --green: #00823f;
  --lime: #79cf1b;
  --pink: #d10a4f;
  --paper: #f4f7f8;
  --white: #fff;
  --line: #d9e2e6;
  --muted: #5f7483;

  --surface-canvas: #f4f7f8;
  --surface-raised: #fff;
  --surface-soft: #edf4f4;
  --surface-success: #e7f5ec;
  --surface-danger: #f9e7ef;
  --focus-ring: #006b63;

  --font-sans: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 22px;
  --radius-xl: 30px;
  --shadow-sm: 0 8px 22px rgb(18 60 87 / 8%);
  --shadow-md: 0 18px 45px rgb(18 60 87 / 11%);
  --shadow-lg: 0 26px 70px rgb(18 60 87 / 18%);
  --motion-fast: 160ms;
  --motion-base: 220ms;
  --ease-standard: cubic-bezier(.2, .8, .2, 1);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-height: 100%; background: var(--navy); scroll-behavior: smooth; }
body { min-height: 100%; margin: 0; color: var(--ink); background: linear-gradient(145deg, var(--surface-soft) 0%, var(--white) 48%, #eef6f2 100%); font-family: var(--font-sans); line-height: 1.5; text-rendering: optimizeLegibility; -webkit-font-smoothing: antialiased; }
button, input, textarea, select, a { font: inherit; }
button, [role="button"], summary { touch-action: manipulation; }
a { color: inherit; }
::selection { color: var(--white); background: var(--navy); }

.site-header { min-height: 126px; padding: 18px clamp(20px, 5vw, 72px); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px; border-bottom: 1px solid #d8e2d7; background: radial-gradient(ellipse at 85% 0%, #e1f0e6, transparent 65%), #f8f8ef; box-shadow: 0 8px 28px rgb(18 60 87 / 5%); position: relative; z-index: 10; }
.site-header::after { content: ""; position: absolute; inset: auto 0 0; height: 3px; background: linear-gradient(90deg, #007356 0% 35%, #20b6b5 35% 65%, #e80061 65% 78%, #83bc42 78% 100%); }
.site-brand { min-height: 50px; min-width: 0; display: inline-flex; align-items: center; gap: 20px; color: #075a46; text-decoration: none; }
.site-logo { display: block; width: 90px; height: 90px; flex: 0 0 auto; overflow: hidden; border-radius: 16px; background: #fff; box-shadow: 0 4px 16px rgb(7 90 70 / 7%); }
.site-logo img { display: block; width: 100%; height: 100%; object-fit: contain; }
.site-brand-copy { display: grid; gap: 5px; min-width: 0; }
.site-brand-name { font-size: clamp(1.2rem, 2.1vw, 1.75rem); font-weight: 850; line-height: 1.12; letter-spacing: -.035em; }
.site-brand-place { color: #087c7b; font-size: .8rem; font-weight: 750; letter-spacing: .15em; text-transform: uppercase; }
.brandmark { width: 42px; height: 42px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid rgb(18 60 87 / 8%); border-radius: 14px; color: white; background: linear-gradient(145deg, var(--green), #006f4b); box-shadow: 0 0 0 5px rgb(121 207 27 / 14%); font-weight: 900; }
.site-header > p { margin: 0; color: var(--muted); font-size: .68rem; }
.site-status { display: flex; align-items: center; gap: 12px; }
.site-status > span { color: var(--muted); font-weight: 750; }
.site-status a { min-height: 44px; padding: 8px 12px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: var(--white); box-shadow: 0 3px 10px rgb(18 60 87 / 4%); font-weight: 850; text-decoration: none; white-space: nowrap; transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-standard); }
.site-status a:hover { color: var(--green); border-color: var(--teal-ink); box-shadow: var(--shadow-sm); }
.site-status a:active { transform: translateY(1px); box-shadow: none; }
.page-nav { display: flex; gap: 8px; }
.page-nav a, .back-link { min-height: 44px; padding: 9px 13px; display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 11px; color: var(--navy); background: var(--surface-raised); box-shadow: 0 3px 10px rgb(18 60 87 / 4%); font-size: .76rem; font-weight: 800; text-decoration: none; white-space: nowrap; transition: color var(--motion-fast) ease, border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease, transform var(--motion-fast) var(--ease-standard); }
.page-nav a:hover, .back-link:hover { color: var(--green); border-color: var(--teal-ink); box-shadow: var(--shadow-sm); }
.page-nav a:active, .back-link:active { transform: translateY(1px); box-shadow: none; }

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; }
.hero { min-height: 650px; padding: 0; display: grid; grid-template-columns: minmax(0, 1.06fr) minmax(390px, .94fr); align-items: stretch; overflow: hidden; position: relative; border-radius: 0 0 42px 42px; color: white; background: linear-gradient(135deg, var(--navy) 0%, #175e68 100%); box-shadow: var(--shadow-lg); }
.hero-photo { min-width: 0; min-height: 650px; grid-column: 2; grid-row: 1; overflow: hidden; position: relative; background: #9eb2ad; }
.hero-photo img { width: 100%; height: 100%; display: block; object-fit: cover; object-position: 68% center; }
.hero-photo::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, var(--navy) 0%, rgb(18 60 87 / 38%) 18%, transparent 52%), linear-gradient(0deg, rgb(18 60 87 / 34%), transparent 44%); pointer-events: none; }
.hero-copy { max-width: none; padding: clamp(46px, 5.2vw, 72px); grid-column: 1; grid-row: 1; align-self: center; position: relative; z-index: 3; }
.eyebrow, .step, .area-tag { margin: 0; font-size: .7rem; font-weight: 900; letter-spacing: .14em; text-transform: uppercase; }
.eyebrow { color: #c9f981; }
.hero h1 { margin: 12px 0 18px; max-width: 690px; line-height: .93; letter-spacing: -.055em; }
.hero h1 span { display: block; }
.hero-title-main { color: white; font-size: clamp(3.25rem, 5.4vw, 5.15rem); }
.hero-title-school { margin-top: 14px; color: #c9f981; font-size: clamp(1.25rem, 2.15vw, 2rem); line-height: 1.04; letter-spacing: -.025em; }
.hero-subtitle { margin: 0; color: white; font-size: clamp(1.12rem, 1.8vw, 1.35rem); font-weight: 800; line-height: 1.35; }
.hero-intro { max-width: 650px; margin: 22px 0 0; color: #dce9ed; font-size: clamp(.92rem, 1.35vw, 1.02rem); line-height: 1.55; }
.hero-notice { max-width: 650px; margin-top: 22px; padding: 12px 12px 12px 15px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border: 1px solid rgb(255 255 255 / 25%); border-radius: 16px; color: #eff7f8; background: rgb(255 255 255 / 10%); }
.hero-notice > span { font-size: .8rem; line-height: 1.4; }
.hero-notice strong { color: white; }
.hero-notice a { min-height: 44px; padding: 8px 12px; display: inline-flex; align-items: center; flex: 0 0 auto; border-radius: 11px; color: var(--navy); background: white; font-size: .75rem; font-weight: 900; text-decoration: none; white-space: nowrap; transition: transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) ease; }
.hero-notice a:hover { box-shadow: 0 9px 24px rgb(0 0 0 / 22%); transform: translateY(-1px); }
.hero-notice a:active { box-shadow: none; transform: translateY(1px); }

.audience-section, .areas-section { padding: 64px clamp(4px, 2.5vw, 26px) 8px; }
.section-heading { margin-bottom: 22px; display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.step { margin-bottom: 7px; color: var(--green); }
.section-heading h2 { margin: 0; color: var(--navy); font-size: clamp(1.7rem, 3.5vw, 2.9rem); letter-spacing: -.045em; }
.reset-filter { min-height: 44px; padding: 8px 12px; border: 1px solid transparent; border-radius: var(--radius-sm); color: var(--green); background: var(--surface-success); cursor: pointer; font-size: .74rem; font-weight: 850; transition: border-color var(--motion-fast) ease, background-color var(--motion-fast) ease, transform var(--motion-fast) var(--ease-standard); }
.reset-filter:hover { border-color: var(--teal-ink); }
.reset-filter:active { transform: translateY(1px); }
.audience-buttons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.audience-buttons button { min-height: 74px; padding: 15px 22px; border: 1px solid var(--line); border-radius: 20px; color: var(--navy); background: white; box-shadow: 0 12px 28px rgb(18 60 87 / 7%); cursor: pointer; font-size: clamp(.92rem, 1.6vw, 1.13rem); font-weight: 850; text-align: left; transition: transform 160ms ease, color 160ms ease, background 160ms ease; }
.audience-buttons button span { margin-right: 8px; color: var(--pink); }
.audience-buttons button:nth-child(2) span { color: var(--green); }
.audience-buttons button:nth-child(3) span { color: var(--teal); }
.audience-buttons button:hover { transform: translateY(-2px); border-color: var(--teal); }
.audience-buttons button[aria-pressed="true"] { color: white; border-color: var(--navy); background: var(--navy); box-shadow: 0 14px 34px rgb(18 60 87 / 18%); }
.filter-status { margin: 12px 2px 0; color: var(--muted); font-size: .72rem; }

.areas-section { padding-top: 56px; padding-bottom: 78px; }
.area-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.area-card { min-height: 330px; padding: 28px; display: grid; grid-template-columns: 54px 1fr; gap: 20px; border-radius: 30px; color: white; box-shadow: 0 22px 50px rgb(18 60 87 / 13%); }
.area-card[hidden] { display: none; }
.welcome-area { background: linear-gradient(145deg, var(--green), #00a66a); }
.orientation-area { background: linear-gradient(145deg, var(--pink), #b70858); }
.study-area { background: linear-gradient(145deg, var(--navy), #247c88); }
.curricula-area { background: linear-gradient(145deg, #4f8700, var(--green)); }
.support-area { background: linear-gradient(145deg, #17656b, var(--navy)); }
.area-number { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 30%); border-radius: 16px; background: rgb(255 255 255 / 12%); font-size: .72rem; font-weight: 900; }
.area-content { display: flex; flex-direction: column; }
.area-tag { color: rgb(255 255 255 / 72%); }
.area-content h3 { margin: 19px 0 13px; font-size: clamp(1.75rem, 3vw, 2.75rem); line-height: .98; letter-spacing: -.045em; }
.area-content > p:not(.area-tag) { margin: 0; max-width: 440px; color: rgb(255 255 255 / 83%); font-size: .94rem; line-height: 1.48; }
.area-content a { width: fit-content; margin-top: auto; padding: 12px 16px; border-radius: 13px; color: var(--navy); background: white; font-size: .8rem; font-weight: 900; text-decoration: none; }
.area-content a:hover { box-shadow: 0 8px 24px rgb(18 60 87 / 20%); }
.area-content a span { margin-left: 8px; }
.area-actions { margin-top: auto; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 10px; }
.area-content .area-actions a { margin-top: 0; }
.area-content .area-actions .secondary-action { color: white; border: 1px solid rgb(255 255 255 / 45%); background: rgb(255 255 255 / 12%); }
.empty-state { padding: 30px; border: 1px dashed var(--line); border-radius: 20px; color: var(--muted); text-align: center; }

.orientation-main { padding-bottom: 72px; }
.orientation-hero { min-height: 350px; padding: 42px clamp(28px, 6vw, 72px) 60px; overflow: hidden; position: relative; border-radius: 0 0 40px 40px; color: white; background: linear-gradient(140deg, var(--navy), #174f68); }
.orientation-hero > * { position: relative; z-index: 2; }
.orientation-hero .back-link { width: fit-content; display: inline-block; margin-bottom: 54px; color: white; border-color: rgb(255 255 255 / 25%); background: rgb(255 255 255 / 10%); }
.orientation-hero h1 { margin: 10px 0 18px; font-size: clamp(2.5rem, 6vw, 5.4rem); line-height: .94; letter-spacing: -.06em; }
.orientation-hero > p:last-child { max-width: 670px; margin: 0; color: #d9e7ec; font-size: 1rem; line-height: 1.5; }
.protected-shell { padding: 48px clamp(4px, 2.5vw, 26px) 0; }
.access-panel, .workspace-panel { max-width: 820px; margin: 0 auto; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: 30px; background: white; box-shadow: 0 18px 45px rgb(18 60 87 / 9%); }
.access-panel { text-align: center; }
.lock-symbol { width: 70px; height: 70px; margin: 0 auto 22px; display: grid; place-items: center; border-radius: 22px; background: #f9e7ef; font-size: 1.8rem; }
.access-panel .step { color: var(--pink); }
.access-panel h2, .workspace-heading h2 { margin: 8px 0 12px; color: var(--navy); font-size: clamp(1.8rem, 4vw, 3rem); letter-spacing: -.045em; }
.access-panel > p:not(.step) { max-width: 540px; margin: 0 auto; color: var(--muted); line-height: 1.5; }
.password-form { max-width: 520px; margin: 32px auto 0; text-align: left; }
.password-form label { display: block; margin-bottom: 8px; color: var(--navy); font-size: .78rem; font-weight: 900; }
.password-row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
.password-row input { min-width: 0; min-height: 52px; padding: 0 16px; border: 1px solid #b9c8cf; border-radius: 13px; color: var(--ink); background: #fbfdfd; font-size: 1rem; }
.password-row button, .logout-button { min-height: 52px; padding: 0 22px; border: 0; border-radius: 13px; color: white; background: var(--navy); cursor: pointer; font-weight: 900; }
.password-row button:hover, .logout-button:hover { background: var(--green); }
.password-row button:disabled { cursor: wait; opacity: .65; }
.access-message { min-height: 21px; margin: 10px 2px 0; color: #a00040; font-size: .76rem; font-weight: 800; }
.workspace-panel { max-width: none; }
.workspace-heading { display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.workspace-heading .step { color: var(--green); }
.workspace-session { display: flex; align-items: center; gap: 10px; }
.role-badge { padding: 8px 11px; border-radius: 99px; font-size: .67rem; font-weight: 900; text-transform: uppercase; }
.role-badge.orientatore, .role-badge.funzione_strumentale { color: #9d0040; background: #f9e7ef; }
.role-badge.supporter { color: var(--green); background: #e5f5e8; }
.logout-button { min-height: 42px; padding-inline: 16px; color: var(--navy); background: #e8f1f3; font-size: .75rem; }
.workspace-intro { max-width: 720px; margin: 0 0 28px; color: var(--muted); line-height: 1.5; }
.upload-panel { margin: 28px 0 38px; padding: clamp(22px, 4vw, 34px); display: grid; grid-template-columns: minmax(180px, .7fr) minmax(300px, 1.3fr); gap: 34px; border-radius: 24px; color: white; background: linear-gradient(140deg, var(--navy), #175e68); }
.upload-panel .step { color: #c9f981; }
.upload-panel h3, .documents-heading h3 { margin: 7px 0 0; font-size: clamp(1.45rem, 3vw, 2.1rem); letter-spacing: -.035em; }
.upload-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.upload-form label { display: flex; flex-direction: column; gap: 7px; color: #dce9ed; font-size: .72rem; font-weight: 850; }
.upload-form label:nth-child(2) { grid-row: span 2; }
.upload-form input, .upload-form textarea, .upload-form select, .document-manage input, .document-manage textarea, .document-manage select { width: 100%; min-width: 0; padding: 11px 12px; border: 1px solid rgb(255 255 255 / 24%); border-radius: 11px; color: var(--ink); background: white; font: inherit; }
.upload-form input[type="file"], .replacement-input { padding: 8px; font-size: .72rem; }
.upload-form button { min-height: 46px; padding: 0 16px; border: 0; border-radius: 12px; color: var(--navy); background: #c9f981; cursor: pointer; font-weight: 900; }
.upload-form button:disabled { cursor: wait; opacity: .65; }
.upload-message { min-height: 18px; margin: 0; align-self: center; color: white; font-size: .72rem; font-weight: 800; }
.documents-heading { margin-bottom: 18px; color: var(--navy); }
.resource-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.resource-card { min-height: 220px; padding: 24px; border: 1px solid var(--line); border-top: 7px solid var(--pink); border-radius: 22px; background: linear-gradient(145deg, white, #f8fbfb); }
.resource-card h3 { margin: 0 0 9px; color: var(--navy); font-size: 1.35rem; }
.resource-card > p { margin: 0; color: var(--muted); font-size: .86rem; line-height: 1.45; }
.resource-card .resource-meta { margin-top: 10px; color: #8297a3; font-size: .7rem; }
.resource-list { margin-top: 22px; }
.resource-empty { margin: 0; padding: 16px; border: 1px dashed #bfd0d7; border-radius: 13px; color: var(--muted); background: white; font-size: .8rem; }
.resource-link { width: 100%; padding: 14px 16px; display: flex; align-items: flex-start; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: 13px; color: var(--navy); background: white; cursor: pointer; text-align: left; }
.resource-link + .resource-link { margin-top: 9px; }
.resource-link:hover { border-color: var(--teal); box-shadow: 0 8px 20px rgb(18 60 87 / 8%); }
.resource-link span { font-weight: 900; }
.resource-link small { color: var(--muted); }
.document-actions { margin-top: 24px; display: flex; align-items: flex-start; flex-wrap: wrap; gap: 12px; }
.document-actions > a { padding: 11px 14px; border-radius: 11px; color: white; background: var(--navy); font-size: .76rem; font-weight: 900; text-decoration: none; }
.document-actions > a:hover { background: var(--green); }
.document-manage { flex: 1 1 100%; padding-top: 8px; }
.document-manage summary { width: fit-content; color: var(--green); cursor: pointer; font-size: .76rem; font-weight: 900; }
.document-manage[open] summary { margin-bottom: 12px; }
.document-manage input, .document-manage textarea, .document-manage select { margin-top: 9px; border-color: var(--line); background: white; }
.manage-actions { margin-top: 12px; display: flex; gap: 9px; }
.manage-actions button { min-height: 40px; padding: 0 13px; border: 0; border-radius: 10px; cursor: pointer; font-size: .7rem; font-weight: 900; }
.save-button { color: white; background: var(--green); }
.archive-button { color: #9d0040; background: #f9e7ef; }
.manage-status { min-height: 17px; margin: 9px 0 0; color: var(--muted); font-size: .7rem; font-weight: 800; }
.course-grid { padding: 48px clamp(4px, 2.5vw, 26px) 0; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.course-card { min-height: 365px; padding: 28px; display: flex; flex-direction: column; border: 1px solid var(--line); border-top: 9px solid var(--course-accent); border-radius: 28px; background: white; box-shadow: 0 18px 45px rgb(18 60 87 / 9%); }
.course-code { width: fit-content; padding: 8px 12px; border-radius: 11px; color: var(--course-text, white); background: var(--course-accent); font-size: .82rem; font-weight: 950; letter-spacing: .09em; }
.course-copy h2 { margin: 24px 0 12px; color: var(--navy); font-size: clamp(1.4rem, 2.5vw, 2.15rem); line-height: 1.04; letter-spacing: -.04em; }
.course-copy p { margin: 0; color: var(--muted); line-height: 1.45; }
.course-actions { margin-top: auto; padding-top: 28px; display: flex; align-items: center; gap: 14px; }
.course-actions a { padding: 12px 15px; border-radius: 12px; color: white; background: var(--course-accent); font-size: .78rem; font-weight: 900; text-decoration: none; }
.course-actions .download-link { padding-inline: 4px; color: var(--navy); background: transparent; text-decoration: underline; text-decoration-color: var(--teal); text-underline-offset: 4px; }
.afm-card { --course-accent: var(--navy); }
.sia-card { --course-accent: var(--lime); --course-text: var(--navy); }
.tur-card { --course-accent: var(--green); }
.ssas-card { --course-accent: var(--pink); }
.cat-card { --course-accent: var(--teal); --course-text: var(--navy); }
.info-card { min-height: 285px; }
.pending-card { border-style: solid; background: linear-gradient(145deg, white, #edf8f6); }
.course-topline { display: flex; align-items: center; justify-content: space-between; gap: 14px; }
.status-badge { padding: 7px 10px; border-radius: 99px; color: var(--green); background: #e5f5e8; font-size: .66rem; font-weight: 900; letter-spacing: .04em; text-transform: uppercase; }
.study-hero { background: linear-gradient(140deg, var(--navy), #237985); }
.curricula-hero { background: linear-gradient(140deg, #315d17, var(--green)); }

.curricula-section { padding: 52px clamp(4px, 2.5vw, 26px) 0; }
.curriculum-card { min-height: 250px; padding: 30px; display: grid; grid-template-columns: 100px 1fr auto; gap: 26px; align-items: center; border: 1px solid var(--line); border-radius: 30px; background: white; box-shadow: 0 18px 45px rgb(18 60 87 / 9%); }
.curriculum-code { width: 90px; height: 90px; display: grid; place-items: center; border-radius: 25px; color: white; background: var(--pink); font-size: 1rem; font-weight: 950; letter-spacing: .08em; }
.curriculum-copy > p:first-child { margin: 0 0 8px; color: var(--green); font-size: .7rem; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.curriculum-copy h3 { margin: 0 0 12px; color: var(--navy); font-size: clamp(1.55rem, 3vw, 2.5rem); line-height: 1; letter-spacing: -.04em; }
.curriculum-copy > p:last-child { max-width: 610px; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.curriculum-card > a { padding: 13px 16px; border-radius: 13px; color: white; background: var(--navy); font-size: .8rem; font-weight: 900; text-decoration: none; white-space: nowrap; }
.curriculum-card > a:hover { background: var(--green); }
.growth-note { margin: 18px 0 0; padding: 19px 22px; border-left: 5px solid var(--lime); border-radius: 0 16px 16px 0; color: var(--muted); background: #edf5e8; font-size: .82rem; line-height: 1.45; }
.growth-note strong { color: var(--navy); }

.site-footer { padding: 25px clamp(20px, 5vw, 72px); display: flex; justify-content: space-between; gap: 20px; color: #dce8ec; background: linear-gradient(135deg, #0d3048, var(--navy)); border-top: 1px solid rgb(255 255 255 / 10%); font-size: .68rem; line-height: 1.45; }
.site-footer p { margin: 0; }

:focus-visible { outline: 3px solid var(--focus-ring); outline-offset: 3px; }
:where(input, textarea, select):focus-visible { border-color: var(--focus-ring); }
:where(button, input, textarea, select):disabled, [aria-disabled="true"] { cursor: not-allowed; opacity: .62; }
input::placeholder, textarea::placeholder { color: #718692; opacity: 1; }

@media (max-width: 760px) {
  .site-header { flex-wrap: wrap; }
  .site-header > p { flex: 1 0 100%; padding-top: 10px; border-top: 1px solid var(--line); }
  .page-nav { max-width: 100%; padding: 2px 1px 4px; overflow-x: auto; overscroll-behavior-inline: contain; scrollbar-width: thin; -webkit-overflow-scrolling: touch; }
  .hero { min-height: 0; padding: 0; display: flex; flex-direction: column; border-radius: 0 0 30px 30px; }
  .hero-photo { width: 100%; min-height: clamp(170px, 36vw, 250px); max-height: 250px; order: 1; }
  .hero-photo img { object-position: center 44%; }
  .hero-photo::after { background: linear-gradient(0deg, rgb(18 60 87 / 30%), transparent 50%); }
  .hero-copy { width: 100%; padding: 36px clamp(25px, 6vw, 48px) 42px; order: 2; }
  .audience-buttons, .area-grid, .course-grid, .resource-grid { grid-template-columns: 1fr; }
  .audience-buttons button { min-height: 62px; }
  .area-card { min-height: 295px; }
  .orientation-hero .back-link { margin-bottom: 42px; }
  .course-card { min-height: 330px; }
  .info-card { min-height: 260px; }
  .curriculum-card { grid-template-columns: 80px 1fr; }
  .curriculum-code { width: 76px; height: 76px; border-radius: 20px; }
  .curriculum-card > a { width: fit-content; grid-column: 1 / -1; }
  .upload-panel { grid-template-columns: 1fr; }
  .site-footer { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 500px) {
  main { width: calc(100% - 24px); }
  .site-header { padding-inline: 14px; }
  .page-nav { width: 100%; }
  .site-header { gap: 16px; padding-block: 15px 18px; }
  .site-brand { gap: 14px; }
  .site-logo { width: 70px; height: 70px; border-radius: 13px; }
  .site-brand-name { font-size: 1.23rem; }
  .site-brand-place { font-size: .68rem; letter-spacing: .1em; }
  .site-status { justify-content: space-between; gap: 8px; }
  .site-status > span { max-width: 135px; line-height: 1.3; }
  .hero { padding-inline: 0; }
  .hero-copy { padding: 31px 22px 38px; }
  .hero-title-main { font-size: clamp(2.7rem, 13vw, 3.35rem); }
  .hero-title-school { font-size: clamp(1.18rem, 5.7vw, 1.45rem); }
  .hero-subtitle { font-size: 1.05rem; }
  .hero-notice { align-items: stretch; flex-direction: column; }
  .hero-notice a { width: 100%; justify-content: center; }
  .hero-intro { font-size: .92rem; }
  .audience-section, .areas-section { padding-inline: 0; }
  .area-card { padding: 22px; grid-template-columns: 1fr; }
  .area-number { width: 42px; height: 42px; }
  .orientation-main { width: calc(100% - 24px); }
  .orientation-hero { padding-inline: 24px; }
  .protected-shell { padding-inline: 0; }
  .access-panel, .workspace-panel { padding: 24px; border-radius: 24px; }
  .password-row { grid-template-columns: 1fr; }
  .workspace-heading { align-items: flex-start; }
  .workspace-session { align-items: flex-end; flex-direction: column; }
  .upload-form { grid-template-columns: 1fr; }
  .upload-form label:nth-child(2) { grid-row: auto; }
  .course-grid { padding-inline: 0; }
  .course-actions { align-items: flex-start; flex-direction: column; }
  .curriculum-card { padding: 23px; grid-template-columns: 1fr; }
  .curriculum-card > a { grid-column: auto; white-space: normal; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0ms !important; }
}

.groups-section { padding: 56px clamp(4px, 2.5vw, 26px) 78px; }
.group-jump { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 26px; }
.group-jump a { min-height: 64px; padding: 14px 18px; display: flex; align-items: center; border: 1px solid var(--line); border-radius: 18px; color: var(--navy); background: white; box-shadow: 0 12px 28px rgb(18 60 87 / 7%); font-size: clamp(.9rem, 1.5vw, 1.05rem); font-weight: 850; text-decoration: none; transition: transform var(--motion-fast) var(--ease-standard), border-color var(--motion-fast) ease, box-shadow var(--motion-fast) ease; }
.group-jump a:hover { border-color: var(--teal); transform: translateY(-2px); }
.group-jump a:active { transform: translateY(1px); box-shadow: none; }
.group-jump span { margin-right: 9px; color: var(--pink); }
.group-jump a:nth-child(2) span { color: var(--green); }
.group-jump a:nth-child(3) span { color: var(--teal); }
.group-jump a:nth-child(4) span { color: #d98c00; }
.group-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; }
.group-card { padding: 26px; border-radius: 28px; color: white; box-shadow: 0 22px 50px rgb(18 60 87 / 13%); scroll-margin-top: 20px; }
.group-studenti, .group-famiglie { grid-column: span 6; }
.group-docenti { grid-column: span 5; }
.group-medie { grid-column: span 7; }
.group-studenti { background: linear-gradient(145deg, var(--green), #00a66a); }
.group-famiglie { background: linear-gradient(145deg, var(--navy), #247c88); }
.group-docenti { background: linear-gradient(145deg, var(--pink), #b70858); }
.group-medie { background: linear-gradient(145deg, #17656b, #4f8700); }
.group-card header { display: grid; grid-template-columns: 50px 1fr; gap: 16px; align-items: center; }
.group-icon { width: 50px; height: 50px; display: grid; place-items: center; border: 1px solid rgb(255 255 255 / 30%); border-radius: 16px; background: rgb(255 255 255 / 12%); font-size: 1.2rem; }
.group-card h3 { margin: 0; font-size: clamp(1.6rem, 2.8vw, 2.3rem); line-height: 1; letter-spacing: -.04em; }
.group-card header p { margin: 6px 0 0; color: rgb(255 255 255 / 82%); font-size: .9rem; }
.group-links { display: grid; gap: 9px; margin: 22px 0 0; padding: 0; list-style: none; }
.group-links a { display: grid; gap: 3px; padding: 13px 16px; border: 1px solid rgb(18 60 87 / 7%); border-radius: 14px; color: var(--navy); background: white; text-decoration: none; transition: transform var(--motion-fast) var(--ease-standard), box-shadow var(--motion-fast) ease; }
.group-links a:hover { box-shadow: 0 8px 24px rgb(18 60 87 / 25%); }
.group-links a:active { transform: translateY(1px); box-shadow: none; }
.group-links strong { font-size: .94rem; }
.group-links span { color: var(--muted); font-size: .8rem; line-height: 1.4; overflow-wrap: anywhere; }
.group-links strong span { color: inherit; font-size: inherit; }
.group-medie .group-links li:first-child a { border-color: rgb(201 249 129 / 75%); box-shadow: inset 5px 0 0 #c9f981; }
@media (max-width: 850px) { .group-jump { grid-template-columns: repeat(2, 1fr); } .group-grid { grid-template-columns: 1fr; } .group-card { grid-column: auto; } }
@media (max-width: 420px) { .group-card { padding: 20px 16px; } .group-jump a { min-height: 56px; padding: 12px; } }

/* Supplied campaign imagery, limited to the public home and branded footers. */
.home-page .hero { grid-template-columns: minmax(0, 1.02fr) minmax(0, .98fr); }
.home-page .hero h1 { line-height: 1.04; }
.home-page .hero-title-main { font-size: clamp(2.7rem, 4.8vw, 4.45rem); }
.home-page .hero-campaign { min-height: 0; margin: 0; align-self: center; background: #0c344b; }
.home-page .hero-campaign > a { display: block; }
.home-page .hero-campaign img { width: 100%; height: auto; object-fit: contain; }
.home-page .hero-campaign::after { content: none; }
.home-page .hero-campaign figcaption { padding: 12px 16px; color: #dce8ec; font-size: .8rem; text-align: center; }
.home-page .hero-campaign figcaption a { text-underline-offset: 3px; }
.home-page .home-bussola-entry { padding: 0; display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 0; overflow: hidden; }
.home-life-image { margin: 0; position: relative; min-width: 0; }
.home-life-image img { display: block; width: 100%; height: 100%; min-height: 350px; object-fit: cover; object-position: center 42%; }
.home-bussola-copy { padding: clamp(26px, 4vw, 48px); align-self: center; min-width: 0; }
.home-bussola-copy .explore-button { margin-top: 24px; }
.visual-footer { align-items: center; }
.visual-footer-brand { display: flex; align-items: center; gap: 24px; }
.visual-footer-brand img { display: block; width: 140px; height: auto; border-radius: 10px; }
.visual-footer-brand p { max-width: 27ch; font-size: .96rem; font-weight: 750; }
.visual-footer > p { max-width: 48ch; font-size: .8rem; }
@media (max-width: 900px) {
  .home-page .hero { display: flex; flex-direction: column; }
  .home-page .hero-copy { order: 1; }
  .home-page .hero-campaign { order: 2; width: min(100%, 560px); max-height: none; }
}
@media (max-width: 760px) {
  .home-page .home-bussola-entry { grid-template-columns: minmax(0, 1fr); }
  .home-bussola-copy { grid-row: 1; }
  .home-life-image img { height: auto; min-height: 0; max-height: 380px; aspect-ratio: 4 / 3; }
  .visual-footer { align-items: flex-start; }
  .visual-footer-brand { gap: 18px; }
  .visual-footer-brand img { width: 112px; }
}

/* Leggibilità delle schede in home: testo bianco pieno e fondi abbastanza scuri (contrasto almeno 4.5:1). */
.group-card header p { color: #fff; }
.group-studenti { background: linear-gradient(145deg, #006733, var(--green)); }
.group-medie { background: linear-gradient(145deg, #17656b, #437300); }

/* Telefoni: i titoli grandi non devono avere righe che si toccano e la navigazione va a capo invece di essere tagliata. */
.hero h1, .orientation-hero h1 { line-height: 1.02; }
.area-content h3, .group-card h3, .curriculum-copy h3 { line-height: 1.1; }
@media (max-width: 760px) {
  .page-nav { flex-wrap: wrap; overflow-x: visible; }
  .hero h1, .orientation-hero h1 { line-height: 1.06; letter-spacing: -.04em; }
}

/* Intestazione e piè di pagina di tutte le pagine: niente maiuscolo, niente scritte sotto 13 px (Claude, 9 ottobre 2026). */
.site-brand-place { color: #064a3a; font-size: .92rem; letter-spacing: 0; text-transform: none; }
.site-header > p { font-size: .88rem; }
.page-nav a, .back-link { font-size: .92rem; }
.site-footer { font-size: .9rem; }
.site-footer a { color: #fff; }
.visual-footer > p { max-width: 62ch; font-size: .9rem; }

/* ===== Leggibilità in tutte le pagine (Claude, 9 ottobre 2026) =====
   Regole aggiunte in coda: nessuna regola precedente è stata tolta. Colori di testo e di fondo più scuri
   (contrasto almeno 7:1 con il bianco), niente maiuscolo, niente scritte sotto 13 px. */
:root { --muted: #33495a; --green: #006733; --pink: #ad093e; --teal-ink: #005a53; }
.eyebrow, .step, .area-tag { font-size: .86rem; text-transform: none; letter-spacing: 0; }
.hero-notice > span { font-size: .92rem; }
.hero-notice a { font-size: .92rem; }
.reset-filter { font-size: .86rem; }
.filter-status { font-size: .86rem; }
.area-number { font-size: .86rem; }
.area-content a { font-size: .92rem; }
.password-form label { font-size: .92rem; }
.access-message { font-size: .92rem; }
.role-badge { font-size: .82rem; text-transform: none; letter-spacing: 0; }
.logout-button { font-size: .92rem; }
.upload-form label { font-size: .86rem; }
.upload-form input[type="file"], .replacement-input { font-size: .86rem; }
.upload-message { font-size: .86rem; }
.resource-card .resource-meta { font-size: .86rem; }
.resource-empty { font-size: .92rem; }
.document-actions > a { font-size: .92rem; }
.document-manage summary { font-size: .92rem; }
.manage-actions button { font-size: .86rem; }
.manage-status { font-size: .86rem; }
.course-actions a { font-size: .92rem; }
.status-badge { font-size: .82rem; text-transform: none; letter-spacing: 0; }
.curriculum-copy > p:first-child { font-size: .86rem; text-transform: none; letter-spacing: 0; }
.curriculum-card > a { font-size: .92rem; }
.group-links span { font-size: .92rem; }
.home-page .hero-campaign figcaption { font-size: .92rem; }
.eyebrow, .step, .area-tag { font-size: .92rem; font-weight: 800; }
.step { color: #00522a; }
.orientation-hero { background: linear-gradient(150deg, #0b2f47 0%, #103f58 60%, #0f4f58 100%); }
.orientation-hero .back-link { border: 2px solid rgb(255 255 255 / 55%); color: #fff; background: transparent; }
.orientation-hero .back-link:hover { color: #0b2f47; border-color: #fff; background: #fff; }
.orientation-hero .eyebrow { width: fit-content; padding: 6px 13px; border-radius: 99px; color: #0b2f47; background: #c9f981; }
.orientation-hero h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); line-height: 1.04; letter-spacing: -.04em; }
.orientation-hero > p:last-child { color: #fff; font-size: 1.08rem; line-height: 1.5; }
.curricula-hero { background: linear-gradient(150deg, #00522a, #006733); }
.curriculum-code { letter-spacing: 0; }
.curriculum-copy > p:first-child { color: #33495a; font-size: .95rem; font-weight: 750; }
.curriculum-copy > p:last-child { color: #33495a; font-size: 1rem; line-height: 1.5; }
.curriculum-card > a { min-height: 52px; background: #006733; font-size: 1rem; font-weight: 850; }
.curriculum-card > a:hover { background: #00522a; }
.growth-note { color: #17314a; background: #dfe9ec; font-size: 1rem; line-height: 1.5; }
.growth-note a { color: #0b2f47; font-weight: 800; }
