/* Rizzo's public site and campus share these theme tokens. */
:root,
body[data-theme="dark"] {
  --ink: #f3f4f7;
  --muted: #a9adba;
  --paper: #181a20;
  --paper-2: #1f222b;
  --surface: #22252f;
  --surface-soft: #292d38;
  --surface-soft-2: #1d2028;
  --surface-tint: #30374c;
  --surface-chip: #3a4259;
  --surface-header: #292e3c;
  --surface-badge: #313951;
  --line: #343844;
  --line-soft: #2d313c;
  --line-strong: #4d5364;
  --line-check: #72798b;
  --text-soft: #e1e3ec;
  --text-body: #c4c9d8;
  --green: #3e5597;
  --green-2: #aabcf5;
  --wine: #aabcf5;
  --blue: #aabcf5;
  --gold: #e2c383;
  --contrast: #fff;
  --primary-hover: #4d67ac;
  --topbar-bg: rgba(25, 27, 34, .78);
  --topbar-line: #343844;
  --workspace-bg: #181a20;
  --workspace-header-bg: rgba(25, 27, 34, .78);
  --success-bg: #243626;
  --success-ink: #a8d798;
  --danger-bg: #422422;
  --danger-bg-hover: #542c29;
  --danger-line: #905552;
  --danger-ink: #ffb6ac;
  --focus-ring: rgba(170, 188, 245, .27);
  --panel-shadow: none;
  --modal-scrim: rgba(0, 0, 0, .76);
  --campus-bg: #171a22;
  --toast-bg: #f3f4f7;
  --shadow: 0 24px 55px rgba(0, 0, 0, .38);
  --teal: #a0ce98;
  --violet: #c6b8e5;
  --amber: #e2c383;
  --coral: #f5a79b;
  --glow: rgba(170, 188, 245, .10);
  --action: #cad6fc;
  --action-ink: #19274a;
  --action-hover: #e0e8ff;
  --radius: 14px;
  --sidebar: 228px;
  --font-body: -apple-system, BlinkMacSystemFont, "Inter", system-ui, sans-serif;
  --font-brand: var(--font-body);
  --font-editorial: "Instrument Serif", Georgia, serif;
  --poster: #18191e;
  --poster-ink: #f5f4f2;
  --poster-muted: #c5c7d0;
  --poster-line: #383940;
  --highlight: #e9ded0;
  --gutter: max(clamp(1.25rem, 5.2vw, 5.5rem), calc((100vw - 1440px) / 2));
  color-scheme: dark;
}

body[data-theme="light"] {
  --ink: #171922;
  --muted: #5b6172;
  --paper: #f4f5f8;
  --paper-2: #eceef4;
  --surface: #fff;
  --surface-soft: #f0f2f7;
  --surface-soft-2: #eef0f5;
  --surface-tint: #e9eefb;
  --surface-chip: #e3e9f8;
  --surface-header: #edf0f6;
  --surface-badge: #eaf0ff;
  --line: #dcdfe8;
  --line-soft: #e5e7ef;
  --line-strong: #cbd0df;
  --line-check: #8992ac;
  --text-soft: #39415a;
  --text-body: #4e566e;
  --green: #344c90;
  --green-2: #364d92;
  --wine: #3a4f8a;
  --blue: #344c90;
  --gold: #75561e;
  --contrast: #fff;
  --primary-hover: #263a75;
  --topbar-bg: rgba(249, 250, 253, .77);
  --topbar-line: #dcdfe8;
  --workspace-bg: #f4f5f8;
  --workspace-header-bg: rgba(249, 250, 253, .77);
  --success-bg: #e3edde;
  --success-ink: #2b5b3a;
  --danger-bg: #fbe5e0;
  --danger-bg-hover: #f8d6cf;
  --danger-line: #d3a39d;
  --danger-ink: #8a302a;
  --focus-ring: rgba(75, 103, 177, .24);
  --panel-shadow: none;
  --modal-scrim: rgba(19, 20, 15, .67);
  --toast-bg: #202637;
  --shadow: 0 20px 55px rgba(32, 33, 25, .15);
  --teal: #36734b;
  --violet: #6a508d;
  --amber: #855c1f;
  --coral: #a54337;
  --glow: rgba(75, 103, 177, .10);
  --action: #374d8e;
  --action-ink: #fff;
  --action-hover: #2d417c;
  color-scheme: light;
}

body { background: var(--paper); }

:where(a, button, summary, input, select, textarea):focus-visible {
  outline: 2px solid var(--green-2);
  outline-offset: 3px;
}

button:disabled { cursor: not-allowed; }
button, input { accent-color: var(--green); }
.button { border-radius: 999px; font-weight: 650; line-height: 1.2; }
.button-primary { background: var(--action); border-color: var(--action); color: var(--action-ink); }
.button-primary:hover { background: var(--action-hover); border-color: var(--action-hover); }
.button-quiet,
.button-ghost,
.button-light { background: var(--surface-soft); border-color: transparent; color: var(--ink); }
.button-quiet:hover,
.button-ghost:hover,
.button-light:hover { background: var(--surface-tint); border-color: transparent; }
.theme-switch { width: 42px; height: 42px; border: 0; border-radius: 50%; }
.theme-switch svg { width: 19px; height: 19px; }
.theme-switch .ts-moon { fill: var(--ink); }
.theme-switch .ts-sun { stroke: var(--ink); }
.theme-switch:hover { background: var(--surface-tint); }
.theme-switch:hover svg { filter: none; }

.brand { gap: 10px; }
.brand .brand-mark,
.sidebar-brand .brand-mark {
  width: 23px;
  height: 36px;
  background-image: url("assets/logo-gold.png");
  filter: none;
}
body[data-theme="light"] .brand .brand-mark { background-image: url("assets/logo-light.png"); }
body .brand strong,
body[data-theme] .brand strong {
  color: var(--ink);
  font-family: var(--font-brand);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -.04em;
  text-transform: none;
}
.brand small { font-size: .75rem; }
.eyebrow {
  color: var(--green-2);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .14em;
}

.topbar {
  min-height: 74px;
  padding: 12px var(--gutter);
}
.main-nav { gap: clamp(.35rem, 1.25vw, 1.2rem); }
.main-nav a { border-radius: 999px; color: var(--text-soft); font-size: .875rem; }
.main-nav a:hover { background: var(--surface-tint); }
.main-nav [data-open-auth] { min-height: 42px; padding-inline: 16px; }
.nav-toggle { border: 0; border-radius: 50%; background: var(--surface-soft); }

main[data-public-chrome] {
  width: 100%;
  margin: 0;
  overflow: clip;
}
main[data-public-chrome] :is(section[id], aside[id]) { scroll-margin-top: 90px; }
.hero {
  grid-template-columns: minmax(0, 1fr);
  grid-template-rows: minmax(0, 1fr) auto;
  min-height: 0;
  margin: 0;
  color: var(--poster-ink);
  background: var(--poster);
  border: 0;
  border-radius: 0;
}
.hero::before { content: none; }
.hero-copy {
  max-width: 62rem;
  min-width: 0;
  padding: clamp(4.5rem, 9vw, 8.5rem) var(--gutter);
}
.hero .eyebrow { color: var(--highlight); margin-bottom: clamp(1rem, 2.5vw, 2rem); }
.hero h1 {
  max-width: 11ch;
  color: var(--poster-ink);
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(3.75rem, 7.6vw, 7.5rem);
  line-height: .95;
  letter-spacing: -.058em;
}
.hero h1 em {
  color: var(--highlight);
  font-family: var(--font-editorial);
  font-weight: 400;
  font-size: 1.16em;
  line-height: .84;
  letter-spacing: -.04em;
}
.hero p:not(.eyebrow) {
  max-width: 34ch;
  margin-top: clamp(1.45rem, 3vw, 2.2rem);
  color: var(--poster-muted);
  font-size: clamp(1rem, 1.25vw, 1.125rem);
  line-height: 1.6;
}
.hero-actions {
  margin-top: 1.6rem;
  flex-direction: row;
  align-items: center;
  gap: 9px;
}
.hero-actions .button {
  min-height: 48px;
  padding-inline: clamp(.85rem, 1.6vw, 1.35rem);
  font-size: .9rem;
}
.hero .button-primary {
  border-color: var(--highlight);
  background: var(--highlight);
  color: #25212a;
}
.hero .button-primary:hover { background: #fbf6ef; }
.hero .button-light {
  border-color: #ffffff26;
  background: #ffffff12;
  backdrop-filter: blur(14px);
  color: var(--poster-ink);
}
.hero .button-light:hover { background: #ffffff24; border-color: #ffffff4d; }
.hero :focus-visible { outline-color: var(--highlight); }
.hero-photo {
  position: absolute;
  inset: 0 0 0 39%;
  min-width: 0;
  min-height: 0;
}
.hero-photo::after {
  position: absolute;
  inset: 0;
  content: "";
  background: linear-gradient(90deg, var(--poster), transparent 70%), linear-gradient(0deg, var(--poster), transparent 31%);
  pointer-events: none;
}
.hero-image { object-position: 56% 58%; filter: none; }
.hero-pills {
  position: static;
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: 0;
  padding-inline: var(--gutter);
  background: var(--poster);
  border-top: 1px solid #ffffff22;
}
.hero-pills span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 62px;
  padding: .75rem .8rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--poster-ink);
  text-align: center;
  font-size: .9rem;
  font-weight: 700;
  backdrop-filter: none;
}
.hero-pills span + span { border-left: 1px solid #ffffff22; }

.agenda-rail {
  position: static;
  display: grid;
  grid-template-columns: minmax(11rem, .76fr) minmax(0, 3fr);
  align-items: center;
  width: auto;
  max-height: none;
  margin: 0;
  padding: clamp(1.5rem, 3vw, 2.4rem) var(--gutter);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  box-shadow: none;
  overflow: visible;
}
.agenda-rail-head h2 { font-family: var(--font-brand); font-size: 1.32rem; letter-spacing: -.04em; }
.agenda-rail-list { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(.8rem, 2vw, 2rem); margin: 0; }
.agenda-rail-list article,
.agenda-rail-list article:first-child {
  grid-template-columns: 45px minmax(0, 1fr);
  gap: 10px;
  padding: 0 0 0 clamp(.65rem, 1.5vw, 1.1rem);
  border: 0;
  border-left: 1px solid var(--line);
}
.agenda-rail-list time {
  width: auto;
  height: auto;
  align-content: center;
  gap: .2rem;
  border-radius: 0;
  background: transparent;
  color: var(--green-2);
  font-family: var(--font-brand);
  font-size: .72rem;
}
.agenda-rail-list time span { font-size: 1.65rem; line-height: 1; }
.agenda-rail-list h3 { line-height: 1.25; }
.agenda-rail-list p { font-size: .825rem; }

.section { padding: clamp(3.75rem, 8vw, 8rem) var(--gutter); }
main[data-public-chrome] > section:is(.team-section, .media-section) { background: var(--surface-soft-2); }
main[data-public-chrome] > :is(.team-section, .cards-section, .media-section) { border-top: 1px solid var(--line); }
.section-heading h2, .split h2 {
  max-width: 19ch;
  font-family: var(--font-brand);
  font-size: clamp(2.4rem, 5.35vw, 5.4rem);
  font-weight: 600;
  line-height: .99;
  letter-spacing: -.065em;
  text-wrap: balance;
}
.split {
  grid-template-columns: minmax(0, 1.42fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(2rem, 9vw, 8.5rem);
}
.section-copy { line-height: 1.68; }
.split .section-copy { border-left: 1px solid var(--line-strong); padding-left: clamp(1.25rem, 3vw, 3rem); }
.split .section-copy p:first-child { margin-top: 0; }
.split .section-copy p:last-child { margin-bottom: 0; }
.programs-intro { max-width: 58ch; }

.team-grid { gap: clamp(1.6rem, 5vw, 5.25rem); }
.program-grid {
  display: block;
  border-block: 1px solid var(--line);
}
.team-card, .program-grid article {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  padding: clamp(1.15rem, 2.5vw, 2.25rem) 0;
}
.program-grid article + article { border-top: 1px solid var(--line); }
.program-grid article {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(0, 1.25fr) auto;
  align-items: center;
  min-height: 0;
  gap: clamp(1rem, 4vw, 4rem);
}
.team-card .team-avatar,
.team-card:nth-child(n) .team-avatar {
  width: 62px;
  height: 62px;
  border: 0;
  border-radius: 50%;
  background: var(--surface-tint);
  color: var(--ink);
  font-family: var(--font-editorial);
  font-size: 1.45rem;
  font-weight: 400;
  font-style: italic;
}
.team-card h3, .program-grid h3, .program-detail h3, .program-cross h3 {
  font-family: var(--font-brand);
  font-size: clamp(1.35rem, 2.5vw, 2.1rem);
  letter-spacing: -.052em;
  line-height: 1.06;
}
.team-role { color: var(--green-2); font-size: .875rem; }
.program-grid h3, .program-grid p { margin: 0; }
.program-grid p { line-height: 1.58; }
.program-link { margin: 0; padding: .45rem 0; color: var(--green-2); text-decoration: underline; text-underline-offset: .28em; }
.program-link:hover { color: var(--ink); }
.program-detail { margin-top: clamp(2rem, 4vw, 3.5rem); }
.program-detail h3 { font-size: clamp(1.55rem, 3vw, 2.5rem); }
.specialty-chips span { background: var(--surface-soft); border-color: transparent; }
.program-cross { background: var(--poster); border: 1px solid var(--poster-line); color: var(--poster-ink); }
.program-cross .eyebrow { color: var(--highlight); }
.program-cross p { color: var(--poster-muted); }

.video-carousel { max-width: 1070px; }
.video-slide { border-radius: 22px; }
.video-slide.is-placeholder { border-style: solid; }
.video-thumb { position: relative; isolation: isolate; overflow: hidden; background: #161912; }
.video-thumb::before {
  position: absolute;
  z-index: -1;
  inset: 0;
  background: center / cover;
  opacity: .58;
  filter: grayscale(1);
  content: "";
}
.video-slide:nth-child(1) .video-thumb::before { background-image: url("assets/mixstudio-backdrop.jpg"); }
.video-slide:nth-child(2) .video-thumb::before { background-image: url("assets/auditorio/flyer/escenario.jpg"); }
.video-slide:nth-child(3) .video-thumb::before { background-image: url("assets/academia-rizzo-hero.png"); }
.video-caption { padding: .9rem 1rem; }
.video-dot { width: 12px; height: 12px; }
.video-dot.is-active { width: 28px; }
.public-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 1rem 2rem;
  padding: 2rem var(--gutter);
  border-top: 1px solid var(--line);
  background: var(--surface);
  font-size: .9rem;
}
.public-footer .brand { margin-right: auto; }
.public-footer > a:not(.brand) { text-decoration: underline; text-underline-offset: .2em; }

[data-auth-modal] {
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 16px;
  border: 0;
  background: transparent;
  color: var(--ink);
  backdrop-filter: none;
  overflow: hidden;
}
[data-auth-modal]:not([open]) { display: none; }
[data-auth-modal]::backdrop { background: var(--modal-scrim); backdrop-filter: blur(7px); }
.auth-modal {
  max-height: calc(100svh - 32px);
  overflow: auto;
  padding: clamp(1.5rem, 6vw, 2.75rem);
  border: 1px solid var(--line);
  border-radius: 26px;
}
.auth-modal h2 {
  font-family: var(--font-brand);
  font-weight: 600;
  font-size: clamp(2rem, 5vw, 2.75rem);
  line-height: 1;
  letter-spacing: -.055em;
}
.auth-form { margin-top: 1.4rem; }
.auth-form label { font-size: .875rem; }
.auth-note { line-height: 1.55; }
.auth-form input { font-size: 1rem; }

/* Campus navigation, dashboard and tools. */
.app-shell { gap: 12px; padding: 12px; }
.sidebar {
  top: 12px;
  min-height: 0;
  height: calc(100svh - 24px);
  gap: 1.1rem;
  padding: 1.25rem .8rem .8rem;
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: linear-gradient(150deg, var(--surface-soft-2), var(--paper-2));
}
.sidebar-brand { padding: 0 .65rem 1rem; border-bottom: 1px solid var(--line); }
.sidebar-brand small { margin-top: .3rem; }
.side-nav { gap: 4px; }
.side-nav button {
  min-height: 44px;
  padding: .6rem .75rem;
  border: 0;
  border-radius: 999px;
  color: var(--text-soft);
  font-size: .875rem;
}
.side-nav button .nav-icon svg { width: 19px; height: 19px; stroke-width: 1.65; }
.side-nav button:hover { border: 0; background: var(--surface-soft); }
.side-nav button.is-active {
  border: 0;
  background: var(--surface-tint);
  color: var(--green-2);
  box-shadow: none;
}
.side-nav button.is-active .nav-icon { color: var(--green-2); }
.user-card {
  gap: .65rem;
  min-width: 0;
  padding: .65rem;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.user-card > div { min-width: 0; }
.user-card strong { font-size: .875rem; }
.user-card small { font-size: .75rem; }
.user-card .avatar { width: 38px; height: 38px; border-radius: 50%; background-color: var(--action); color: var(--action-ink); }
.user-card :is(strong, small) { max-width: 100%; }
.workspace {
  max-height: calc(100svh - 24px);
  border: 1px solid var(--line-soft);
  border-radius: 22px;
  background: var(--surface);
}
.workspace-header {
  border-bottom: 1px solid var(--line-soft);
  padding: .7rem clamp(1.1rem, 3.2vw, 3rem);
  backdrop-filter: blur(20px) saturate(1.2);
}
.workspace-header .eyebrow {
  margin-bottom: .2rem;
  color: var(--muted);
  letter-spacing: 0;
  text-transform: none;
}
.workspace-header h2 {
  font-family: var(--font-brand);
  font-size: clamp(1.15rem, 2.2vw, 1.55rem);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -.04em;
}
.workspace-actions { gap: .5rem; }
.workspace-actions .button { min-height: 42px; font-size: .875rem; }
.dashboard-view { min-width: 0; padding: clamp(1.15rem, 3.25vw, 3rem); }
.dashboard-grid { gap: clamp(1.35rem, 3vw, 3rem); }
.panel { border-radius: 20px; padding: clamp(1rem, 1.6vw, 1.5rem); }
.dashboard-grid > .panel:not(.game-panel),
.home-rail > .panel {
  padding: 1.2rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.panel h3 {
  font-family: var(--font-brand);
  font-size: 1.2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -.035em;
}
.panel-header { align-items: center; gap: .65rem; }
.panel-header small { display: block; margin-top: .2rem; font-size: .8rem; line-height: 1.4; }
.panel-header .inline-button { white-space: normal; }
.inline-button, td button, .segmented button, .icon-button, .collapse-toggle { border-radius: 999px; }
.inline-button, td button, .icon-button, .collapse-toggle {
  border-color: transparent;
  background: var(--surface-soft);
}
.inline-button:hover, td button:hover, .icon-button:hover, .collapse-toggle:hover {
  border-color: transparent;
  background: var(--surface-tint);
  color: var(--green-2);
}
.badge { background: var(--surface-badge); color: var(--wine); }
.badge.success { background: var(--success-bg); color: var(--success-ink); }
.badge.warning { background: var(--danger-bg); color: var(--danger-ink); }
.badge, .row-time, .calendar-grid, td, .metric-value, .kpi-body strong { font-variant-numeric: tabular-nums; }
.table-wrap { border: 0; border-radius: 0; }
.table-wrap th { background: transparent; border-bottom: 1px solid var(--line); }
.table-wrap td, .table-wrap th { padding-inline: .8rem; }
.table-wrap :is(td, th):first-child { padding-inline-start: 0; }
.table-wrap tr:last-child td { border-bottom: 0; }
.table-wrap tbody tr:hover { background: var(--surface-soft-2); }
.workspace :is(.form-grid, .ficha-form) label { font-size: .875rem; }
.workspace :is(.form-grid, .ficha-form) :is(input, select, textarea) { font-size: .95rem; }
:where(.workspace, .modal-backdrop) :is(input, select, textarea):not(
  [type="hidden"], [type="radio"], [type="checkbox"], [type="range"], [type="color"], [type="file"]
) {
  border: 1px solid transparent;
  border-radius: 13px;
  background-color: var(--surface-soft);
}
:where(.workspace, .modal-backdrop) :is(input, select, textarea):focus-visible {
  border-color: var(--green-2);
  outline: 0;
  box-shadow: 0 0 0 3px var(--focus-ring);
}
.modal-close { border: 0; border-radius: 50%; }
.payment-modal :is(.payment-method, .payment-kind) {
  padding: .6rem 0 0;
  border: 0;
  background: transparent;
}
.payment-modal fieldset legend { padding: 0; }
.payment-modal .method-options {
  gap: 3px;
  padding: 3px;
  border-radius: 16px;
  background: var(--surface-soft);
}
.payment-modal .method-options span {
  min-height: 40px;
  border: 0;
  border-radius: 13px;
  background: transparent;
  font-weight: 650;
}
.payment-modal .method-options input:checked + span {
  background: var(--surface);
  color: var(--green-2);
  box-shadow: 0 1px 5px #00000014;
}
.payment-modal .payment-summary li {
  padding-block: .45rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.users-list { gap: 2px; }
.user-row, .user-row:hover, .user-row.is-active {
  border: 0;
  border-radius: 15px;
  box-shadow: none;
}
.users-chip, .users-chip:hover { border-color: transparent; }
.users-chip.is-active {
  border-color: transparent;
  background: var(--surface-tint);
  color: var(--green-2);
}
.users-chip.is-active span { background: transparent; color: inherit; }
.user-block {
  padding: .75rem 0 0;
  border: 0;
  border-top: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.user-block > legend {
  padding: 0 .6rem 0 0;
  color: var(--ink);
  font-size: .91rem;
  letter-spacing: 0;
  text-transform: none;
}
.workspace .profile-preview,
.workspace .drive-state {
  border-color: transparent;
  border-radius: 16px;
}
.billing-profile summary {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .35rem 1rem;
  padding-block: .5rem;
  cursor: pointer;
}
.billing-profile summary strong {
  font-family: var(--font-brand);
  font-size: 1.15rem;
}
.billing-profile summary::after {
  margin-inline-start: auto;
  color: var(--muted);
  content: "+";
}
.billing-profile[open] summary::after { content: "−"; }
.billing-profile form { margin-top: .85rem; }
.billing-profile .hint { margin: 0; font-size: .85rem; }
.billing-profile input[type="file"] { border: 0; padding: .25rem 0; background: none; }
.billing-profile input::file-selector-button {
  margin-inline-end: .65rem;
  border: 0;
  border-radius: 999px;
  padding: .55rem .75rem;
  background: var(--surface-soft);
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}
.invoice-list { margin: 0; padding: 0; list-style: none; }
.invoice-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .6rem .9rem;
  padding-block: .75rem;
  border-bottom: 1px solid var(--line-soft);
}
.invoice-meta { flex: 1 1 12rem; min-width: 0; overflow-wrap: anywhere; }
.invoice-meta strong, .invoice-meta small { display: block; }
.invoice-amount { font-variant-numeric: tabular-nums; }
.invoice-list .button { min-height: 36px; font-size: .8rem; }
.logs-live { position: relative; }
.logs-live input { width: 1px; height: 1px; margin: 0; }
.logs-live:focus-within { outline: 2px solid var(--green-2); outline-offset: 3px; }
:where(.workspace, .modal-backdrop) select:not([multiple]):not([size]) {
  appearance: none;
  padding-inline-end: 1.9em;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: right calc(.85em + 4px) center, right .85em center;
  background-size: 4px 4px;
  background-repeat: no-repeat;
}

.home-layout { grid-template-columns: minmax(0, 1fr) minmax(240px, 276px); gap: clamp(1.6rem, 4vw, 3.75rem); }
.home-main, .home-rail { gap: 1.8rem; }
.home-banner {
  min-height: 188px;
  align-items: center;
  padding: clamp(1.2rem, 3vw, 2.65rem);
  border: 0;
  border-radius: 22px;
  background: var(--poster);
  color: var(--poster-ink);
}
.home-banner::before {
  inset: 0 0 0 36%;
  background: url("assets/rizzo-piano-editorial.webp") 60% 57% / cover no-repeat;
  filter: none;
}
.home-banner::after { background: linear-gradient(90deg, var(--poster) 34%, #18191ec7 58%, #18191e25); }
.home-banner h2 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(2rem, 4.6vw, 4rem);
  font-weight: 600;
  line-height: .98;
  letter-spacing: -.065em;
  overflow-wrap: anywhere;
}
.home-banner-sub { margin-top: .55rem; color: var(--poster-muted); font-size: .925rem; }
.kpi-row { grid-template-columns: repeat(auto-fit, minmax(min(100%, 114px), 1fr)); gap: 1rem 1.2rem; }
.kpi, .tone-gold.kpi {
  align-items: flex-start;
  flex-direction: column;
  gap: .5rem;
  padding: .65rem 0 .65rem .8rem;
  border: 0;
  border-left: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.kpi .kpi-icon, .feed-dot[class*="tone-"] {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--indicator, var(--green-2)) 14%, var(--surface));
  color: var(--indicator, var(--green-2));
}
.tone-teal { --indicator: var(--teal); }
.tone-gold, .tone-amber { --indicator: var(--amber); }
.tone-violet { --indicator: var(--violet); }
.kpi .kpi-icon svg { width: 17px; height: 17px; }
.kpi-body small { line-height: 1.3; }
.kpi-body strong { margin-top: .2rem; font-family: var(--font-brand); font-size: clamp(1.3rem, 2.4vw, 1.9rem); font-weight: 700; }
.kpi-body em { margin-top: .2rem; color: var(--muted); }
.tone-gold .kpi-body strong { color: var(--ink); }
.quick-grid { grid-template-columns: minmax(0, 1fr); gap: 2px; }
.quick-tile {
  min-height: 44px;
  flex-direction: row;
  justify-content: flex-start;
  gap: .75rem;
  padding: .45rem .55rem;
  border: 0;
  border-radius: 999px;
  background: transparent;
  text-align: left;
}
.quick-tile svg { width: 20px; height: 20px; }
.quick-tile:hover { background: var(--surface-tint); }
.calendar-nav button, .calendar-grid span { border-radius: 50%; }
.calendar-grid .is-today { background: var(--action); color: var(--action-ink); }
.income-bars i, .bar-track i, .progress-bar { background: var(--green-2); }
.income-bars .is-current i { background: var(--gold); }
.subject-pills .is-active,
.chip.is-active,
.segmented button.is-active,
.rooms-days button.is-active {
  border-color: transparent;
  background: var(--surface-tint);
  color: var(--green-2);
  box-shadow: none;
}
.rooms-days button, .res-foot .button { border-radius: 999px; }
.rooms-board, .res-pop { border-radius: 18px; }
.rooms-board { box-shadow: none; }
.res-pop { background: var(--surface); }

/* Student record */
.student-file { gap: 1.4rem; }
.student-file .ficha-head {
  grid-template-columns: minmax(0, 1fr) minmax(0, auto);
  gap: 1.2rem 1.8rem;
  padding: 0;
  border: 0;
  background: transparent;
  overflow: visible;
}
.ficha-head::after { display: none; }
.ficha-back {
  grid-column: 1 / -1;
  justify-self: start;
  min-height: 34px;
  border: 0;
  background: var(--surface-soft);
  color: var(--muted);
}
.ficha-back:hover { background: var(--surface-tint); color: var(--green-2); }
.ficha-id { gap: clamp(.8rem, 2vw, 1.5rem); }
.ficha-id .profile-photo {
  width: clamp(48px, 6.4vw, 86px);
  height: auto;
  aspect-ratio: 1;
  border: 0;
  background-color: var(--surface-tint);
  color: var(--green-2);
  box-shadow: none;
  font-size: clamp(1.15rem, 2.5vw, 1.85rem);
}
.ficha-name h2 {
  font-family: var(--font-brand);
  font-size: clamp(1.85rem, 4vw, 3.8rem);
  font-weight: 630;
  line-height: 1.02;
  letter-spacing: -.05em;
}
.ficha-name p { max-width: 68ch; margin-top: .5rem; line-height: 1.5; }
.ficha-account { display: grid; justify-items: end; gap: .55rem; }
.ficha-account > .badge { min-height: 0; padding: 0; background: transparent; }
.ficha-account > .badge::before,
.tl-card .badge::before {
  width: 6px;
  height: 6px;
  margin-right: .45rem;
  border-radius: 50%;
  background: currentColor;
  content: "";
}
.ficha-actions .button:not(.button-primary) {
  min-height: 36px;
  border: 0;
  background: var(--surface-soft);
  white-space: nowrap;
}
.ficha-actions .button:not(.button-primary):hover { background: var(--surface-tint); }
.export-pop {
  right: 0;
  left: auto;
  min-width: min(265px, 76vw);
  border-color: var(--line-soft);
  border-radius: 17px;
}
.ficha-kpis {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.2rem;
  margin: 0;
  padding: 1.05rem 0;
  border-block: 1px solid var(--line-soft);
}
.ficha-kpis > div {
  display: flex;
  min-width: 0;
  flex-direction: column-reverse;
  gap: .38rem;
}
.ficha-kpis dt { color: var(--muted); font-size: .8rem; line-height: 1.3; }
.ficha-kpis dd {
  margin: 0;
  font-size: clamp(1.1rem, 2.5vw, 1.9rem);
  font-weight: 600;
  line-height: 1.1;
  letter-spacing: -.05em;
  font-variant-numeric: tabular-nums;
}
.ficha-kpis .ficha-kpi-date { font-size: clamp(.94rem, 1.6vw, 1.35rem); letter-spacing: -.035em; }
.ficha-kpis small { color: var(--muted); font-size: .72em; font-weight: 400; }
.ficha-toolbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .7rem 1rem; }
.ficha-tabs {
  flex-wrap: wrap;
  gap: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: none;
  overflow: visible;
}
.ficha-tabs button,
.ficha-tabs button.is-active {
  gap: .45rem;
  min-height: 43px;
  padding: .55rem .85rem;
  border-radius: 999px;
  box-shadow: none;
}
.ficha-tabs button:hover,
.ficha-tabs button.is-active { background: var(--surface-soft); color: var(--ink); }
.ficha-tabs button.is-active { background: var(--surface-tint); color: var(--green-2); }
.ficha-tabs .is-active em, .ficha-tabs em { padding: 0; background: transparent; color: inherit; }
.ficha-subject { display: inline-flex; align-items: center; gap: .45rem; color: var(--muted); font-size: .86rem; }
.ficha-toolbar .subject-pills { grid-column: auto; }
.ficha-cols {
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.18fr);
  gap: clamp(1.5rem, 4vw, 4rem);
}
.ficha .ficha-card {
  padding: 1.35rem 0 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}
.ficha .panel-header { flex-wrap: wrap; margin-bottom: 1.1rem; }
.ficha .panel-header h3 { font-size: clamp(1.2rem, 2vw, 1.6rem); }
.ficha-class-options { display: flex; flex-wrap: wrap; gap: .55rem .65rem; }
.ficha .date-chips, .ficha .att-toggle, .ficha .filter-chips, .ficha .lib-mode {
  display: flex;
  width: fit-content;
  max-width: 100%;
  flex-wrap: wrap;
  gap: 2px;
  padding: 3px;
  border: 0;
  border-radius: 999px;
  background: var(--surface-soft);
}
.ficha :is(.chip, .att-option span, .lib-mode label) {
  min-height: 36px;
  padding: .4rem .65rem;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--muted);
}
.ficha .att-option span { gap: .35rem; }
.ficha .att-option input:checked + span { background: var(--surface); box-shadow: 0 1px 5px #00000014; }
.ficha .att-present input:checked + span { color: var(--success-ink); }
.ficha .att-absent input:checked + span { color: var(--danger-ink); }
.ficha .chip.is-active,
.ficha #lib-kind-pdf:checked~.lib-mode label[for="lib-kind-pdf"],
.ficha #lib-kind-link:checked~.lib-mode label[for="lib-kind-link"] {
  background-color: var(--surface);
  color: var(--green-2);
  box-shadow: 0 1px 5px #00000014;
}
.ficha #lib-kind-pdf:focus-visible~.lib-mode label[for="lib-kind-pdf"],
.ficha #lib-kind-link:focus-visible~.lib-mode label[for="lib-kind-link"] {
  outline: 2px solid var(--green-2);
  outline-offset: -2px;
}
.ficha .chip-date input[type="date"] { width: 7.2rem; border: 0; padding: .1rem; background: transparent; }
.ficha-field { font-size: .875rem; }
.ficha-note-field { gap: .45rem; color: var(--ink); }
.ficha-note-field small { color: var(--muted); font-weight: 400; }
.workspace .ficha-note-field textarea {
  min-height: 110px;
  padding: .6rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-strong);
  border-radius: 0;
  background: transparent;
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.65;
}
.workspace .ficha-note-field textarea:focus {
  border-color: var(--green-2);
  outline: 0;
  box-shadow: 0 1px 0 var(--green-2);
}
.ficha-note-field textarea::placeholder { color: var(--muted); }
.lesson-footer { display: flex; flex-wrap: wrap; align-items: center; gap: .65rem; min-height: 36px; }
.lesson-save-state { margin-inline-end: auto; color: var(--muted); font-size: .84rem; }
.lesson-save-state[data-state="saved"] { color: var(--success-ink); }
.lesson-save-state[data-state="error"] { color: var(--danger-ink); }
.lesson-footer .inline-button { display: inline-flex; align-items: center; gap: .35rem; }
.lesson-footer .inline-button[hidden] { display: none; }
.lesson-footer .fi { width: 15px; height: 15px; }
.ficha-schedule ul { gap: 0; }
.ficha-schedule li { border-top: 1px solid var(--line-soft); padding-inline: 0; border-radius: 0; background: transparent; }
.att-strip { margin-bottom: .65rem; }
.att-strip span { width: 8px; height: 8px; border-radius: 50%; }
.timeline { gap: 0; }
.tl-item {
  grid-template-columns: 44px minmax(0, 1fr);
  gap: .8rem;
  padding: .75rem 0;
  border-bottom: 1px solid var(--line-soft);
}
.tl-item::before { display: none; }
.tl-date, .tl-card {
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.tl-date { align-content: start; gap: .2rem; padding-top: .36rem; }
.tl-date b { font-size: 1.35rem; font-weight: 630; }
.tl-card { padding: 0; }
.tl-card header { gap: .35rem .7rem; }
.tl-card header small { min-width: 0; font-size: .8rem; }
.tl-card .badge { min-height: 0; padding: 0; background: transparent; }
.tl-card p { font-size: .94rem; line-height: 1.6; }
.dropzone { border-width: 1px; border-radius: 18px; }
.dropzone:focus-within { outline: 2px solid var(--green-2); }
.lib-grid { grid-template-columns: 1fr; }
.lib-card {
  padding: .75rem 0;
  border: 0;
  border-bottom: 1px solid var(--line-soft);
  border-radius: 0;
  background: transparent;
}
.lib-card:hover { border-color: var(--line); transform: none; }
.lib-card .lib-badge { border-radius: 12px; }
.game-panel { background: linear-gradient(150deg, #171a12, #28351d); }
.game-panel .badge.blue { color: var(--highlight); }
.world3d-enter-btn { background: var(--highlight); color: #1b2310; }
.world3d-joystick-base { border-color: var(--highlight); }
.world3d-joystick-knob { background: var(--highlight); }

@media (max-width: 1150px) {
  .home-layout { grid-template-columns: minmax(0, 1fr); }
  .home-rail { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); align-items: start; }
}

@media (max-width: 1040px) {
  .student-file .ficha-head { grid-template-columns: minmax(0, 1fr); }
  .ficha-account { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1rem; }
  .ficha-cols { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 1000px) {
  .agenda-rail { grid-template-columns: 1fr; gap: 1rem; }
  .agenda-rail-list article:first-child { padding-left: 0; border-left: 0; }
}

@media (max-width: 900px) {
  .app-shell { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; gap: 0; padding: 0; }
  body.app-active { overflow: auto; }
  .sidebar {
    position: static;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    height: auto;
    padding: .75rem 1rem 0;
    border: 0;
    border-bottom: 1px solid var(--line-soft);
    border-radius: 0;
    gap: .65rem;
  }
  .sidebar-brand { padding: 0; border: 0; }
  .sidebar > .side-nav:first-of-type {
    grid-column: 1 / -1;
    grid-row: 2;
    display: flex;
    margin-inline: -1rem;
    padding: 3px 1rem .55rem;
    overflow-x: auto;
    scrollbar-width: thin;
  }
  .side-nav button { flex: 0 0 auto; width: auto; white-space: nowrap; }
  .user-card { grid-column: 2; grid-row: 1; margin: 0; max-width: 170px; padding: 0; border: 0; }
  .workspace { max-height: none; border: 0; border-radius: 0; overflow: visible; }
  .workspace-header { position: static; flex-direction: row; align-items: center; }
  .rooms-days { flex: 0 1 auto; min-width: 0; max-width: 100%; }
}

@media (max-width: 860px) {
  .main-nav {
    top: 73px;
    gap: .2rem;
    border-radius: 22px;
    background: var(--topbar-bg);
    backdrop-filter: blur(20px) saturate(1.2);
  }
  .main-nav :is(a, button) { min-height: 44px; }
  .main-nav a { display: flex; align-items: center; }
  .main-nav .theme-switch { margin-block: .25rem; }
  .hero-copy { padding-block: clamp(2.8rem, 6vw, 4.25rem); }
  .hero h1 { font-size: clamp(3.65rem, 9.6vw, 5.6rem); }
  .hero-actions { gap: .45rem; }
  .hero-actions .button { min-height: 44px; }
  .split .section-copy { padding-left: 1.2rem; }
}

@media (max-width: 680px) {
  .topbar { min-height: 62px; padding-block: 9px; }
  .main-nav { top: 61px; }
  .hero { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto auto auto; }
  .hero-copy { padding: 2.55rem var(--gutter) 1.65rem; }
  .hero h1 { font-size: clamp(3.15rem, 12vw, 5.65rem); }
  .hero-photo { position: relative; inset: auto; min-height: clamp(160px, 46vw, 300px); }
  .hero-photo::after { background: linear-gradient(180deg, var(--poster), transparent 32%, transparent 73%, var(--poster)); }
  .hero-image { object-position: 55% 70%; }
  .hero-pills { padding-inline: 0; }
  .hero-pills span { min-height: 64px; font-size: .75rem; padding-inline: .25rem; }
  .agenda-rail-list { grid-template-columns: minmax(0, 1fr); gap: .75rem; }
  .agenda-rail-list article,
  .agenda-rail-list article:first-child { gap: 12px; padding: .7rem 0 0; border: 0; border-top: 1px solid var(--line); }
  .split { grid-template-columns: minmax(0, 1fr); gap: 1.6rem; }
  .team-card, .program-grid article { padding-inline: 0; }
  .team-card + .team-card { border-top: 1px solid var(--line-soft); }
  .program-grid article { grid-template-columns: 1fr; gap: .6rem; }
  .public-footer { justify-content: space-between; gap: .75rem; }
  .public-footer .brand { width: 100%; }
  .workspace-header { gap: .55rem; }
  .workspace-header > div:first-child { min-width: 0; }
  .workspace-header h2 { overflow-wrap: anywhere; }
  .workspace-actions { flex: 0 0 auto; }
  .workspace-actions .button { padding-inline: .65rem; font-size: .8rem; }
  .workspace-actions .theme-switch { width: 38px; }
  .home-banner { min-height: 160px; }
  .ficha-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .8rem 1rem; }
  .student-file .ficha-head { gap: .85rem; }
  .ficha-account { justify-items: start; }
  .ficha-account .ficha-actions { justify-content: flex-start; gap: .35rem; }
  .ficha-toolbar { align-items: flex-start; }
  .ficha-toolbar .ficha-subject { padding-inline: .65rem; }
}

@media (max-width: 360px) {
  .user-card { max-width: 126px; }
  .user-card .avatar { width: 30px; height: 30px; }
  .dashboard-view { padding-inline: .75rem; }
  .panel-header { flex-wrap: wrap; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .button, .theme-switch svg, .video-slide, .video-dot { transition: none; }
}
