@font-face {
  font-family: "Manrope";
  src: url("assets/fonts/Manrope-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Newsreader";
  src: url("assets/fonts/Newsreader-Variable.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
}

:root {
  --ink: #202821;
  --muted: #667069;
  --forest: #2f6758;
  --forest-deep: #235246;
  --forest-pale: #dfeae5;
  --paper: #f7f2e8;
  --paper-bright: #fffdf7;
  --line: #dcd8cd;
  --coral: #e66c55;
  --coral-pale: #f8ded6;
  --maize: #e7b75a;
  --maize-pale: #f6e7bf;
  --sky: #88b7c8;
  --sky-pale: #ddecf1;
  --white: #ffffff;
  --shadow-soft: 0 20px 50px rgba(43, 61, 51, 0.1);
  --shadow-card: 0 10px 28px rgba(43, 61, 51, 0.08);
  --serif: "Newsreader", Georgia, serif;
  --sans: "Manrope", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  background: var(--paper);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  background:
    radial-gradient(circle at 7% 2%, rgba(231, 183, 90, 0.16), transparent 26rem),
    linear-gradient(180deg, #fbf7ef 0%, var(--paper) 100%);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  color: inherit;
}

button,
label[for],
select {
  cursor: pointer;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(136, 183, 200, 0.58);
  outline-offset: 3px;
}

svg {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
}

[hidden] {
  display: none !important;
}

.ambient-shape {
  position: fixed;
  z-index: 0;
  border-radius: 999px;
  pointer-events: none;
  filter: blur(1px);
}

.ambient-one {
  top: 31vh;
  left: -10rem;
  width: 24rem;
  height: 24rem;
  border: 1px solid rgba(47, 103, 88, 0.1);
}

.ambient-two {
  right: -8rem;
  bottom: -8rem;
  width: 22rem;
  height: 22rem;
  background: rgba(136, 183, 200, 0.08);
}

.app-shell {
  min-height: 100vh;
  padding-bottom: 7.5rem;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 5.25rem;
  padding: 0.75rem clamp(1.2rem, 4vw, 4.5rem);
  border-bottom: 1px solid rgba(47, 103, 88, 0.12);
  background: rgba(251, 247, 239, 0.9);
  backdrop-filter: blur(18px);
}

.brand-button,
.school-switch,
.quiet-icon,
.avatar,
.bottom-dock button,
.text-action,
.route-node,
.large-task,
.upload-document,
.document-row button,
.dialog-close,
.step-progress button {
  border: 0;
  background: none;
}

.brand-button {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 0.65rem;
  padding: 0;
  text-align: left;
}

.brand-button img {
  width: 2.35rem;
  height: 2.35rem;
}

.brand-button span {
  display: grid;
  line-height: 1;
}

.brand-button strong {
  font-family: var(--serif);
  font-size: 1.65rem;
  font-weight: 650;
  letter-spacing: -0.045em;
}

.brand-button small {
  margin-top: 0.32rem;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.school-switch {
  display: grid;
  grid-template-columns: auto 1.2rem;
  align-items: center;
  column-gap: 0.65rem;
  padding: 0.45rem 0.7rem 0.48rem 1rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 253, 247, 0.72);
  text-align: left;
}

.school-switch span,
.school-switch strong {
  grid-column: 1;
  overflow: hidden;
  max-width: 21rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.school-switch span {
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.school-switch strong {
  margin-top: 0.08rem;
  font-size: 0.78rem;
  font-weight: 750;
}

.school-switch svg {
  grid-column: 2;
  grid-row: 1 / span 2;
  width: 1rem;
}

.top-actions {
  display: flex;
  align-items: center;
  justify-self: end;
  gap: 0.65rem;
}

.trial-pill,
.status-chip,
.trace-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 750;
}

.trial-pill {
  padding: 0.55rem 0.75rem;
  background: var(--maize-pale);
  color: #70521d;
}

.trial-pill i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--maize);
}

.quiet-icon,
.avatar {
  display: grid;
  width: 2.55rem;
  height: 2.55rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-bright);
}

.quiet-icon svg {
  width: 1.15rem;
}

.avatar {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
  font-size: 0.72rem;
  font-weight: 800;
}

.workspace {
  width: min(100% - 2.4rem, 1320px);
  margin: 0 auto;
  padding-top: clamp(1.5rem, 3vw, 2.8rem);
}

.app-view {
  animation: view-in 360ms ease both;
}

@keyframes view-in {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.route-intro,
.section-intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 2rem;
  margin-bottom: clamp(1rem, 2vw, 1.7rem);
}

.route-intro > div:first-child,
.section-intro {
  max-width: 48rem;
}

.overline {
  margin: 0 0 0.65rem;
  color: var(--forest);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1,
h2,
h3 {
  font-family: var(--serif);
  font-weight: 570;
  letter-spacing: -0.035em;
}

h1 {
  max-width: 45rem;
  margin-bottom: 0.7rem;
  font-size: clamp(1.75rem, 2.25vw, 2.45rem);
  line-height: 0.98;
}

.route-intro > div:first-child > p:last-child,
.section-intro > p:last-child,
.step-intro > p:last-child {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.7;
}

.intro-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.65rem;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  min-height: 2.85rem;
  padding: 0.72rem 1.05rem;
  border: 1px solid transparent;
  border-radius: 0.75rem;
  font-size: 0.78rem;
  font-weight: 800;
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
}

.button:hover:not(:disabled) {
  transform: translateY(-2px);
}

.button svg {
  width: 1.1rem;
}

.button.primary {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(47, 103, 88, 0.18);
}

.button.primary:hover:not(:disabled) {
  background: var(--forest-deep);
  box-shadow: 0 11px 24px rgba(47, 103, 88, 0.24);
}

.button.secondary {
  border-color: var(--line);
  background: var(--paper-bright);
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.button.full {
  width: 100%;
}

.year-map {
  position: relative;
  padding: clamp(1.3rem, 3vw, 2.2rem);
  border: 1px solid rgba(47, 103, 88, 0.14);
  border-radius: 1.55rem;
  background: rgba(255, 253, 247, 0.72);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
}

.year-map::before {
  position: absolute;
  top: -5rem;
  right: -4rem;
  width: 15rem;
  height: 15rem;
  border: 1px solid rgba(231, 183, 90, 0.35);
  border-radius: 50%;
  content: "";
}

.year-heading,
.panel-heading {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
}

.year-heading h2,
.panel-heading h2,
.guide-panel h2 {
  margin-bottom: 0;
  font-size: clamp(1.55rem, 2.8vw, 2.3rem);
}

.text-action {
  padding: 0.3rem 0;
  border-bottom: 1px solid var(--forest);
  color: var(--forest);
  font-size: 0.75rem;
  font-weight: 800;
}

.route-track {
  position: relative;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  align-items: end;
  min-height: 20rem;
  margin-top: 0.5rem;
  padding: 7.4rem 1.5rem 1.5rem;
}

.route-line {
  position: absolute;
  left: calc(12.5% + 1.5rem);
  right: calc(12.5% + 1.5rem);
  bottom: 6.7rem;
  height: 3px;
  background: repeating-linear-gradient(90deg, var(--line) 0 8px, transparent 8px 15px);
}

.route-line span {
  display: block;
  width: 34%;
  height: 3px;
  background: var(--forest);
}

.route-stop {
  position: relative;
  z-index: 2;
  display: flex;
  min-width: 0;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.route-node {
  display: grid;
  width: 3.25rem;
  height: 3.25rem;
  place-items: center;
  border: 3px solid var(--paper-bright);
  border-radius: 50%;
  background: #d8d6cf;
  box-shadow: 0 0 0 1px var(--line);
  color: #747971;
  font-size: 0.72rem;
  font-weight: 850;
}

.is-complete .route-node {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 0 0 1px var(--forest);
}

.is-current .route-node {
  background: var(--maize);
  color: #4c3a17;
  box-shadow: 0 0 0 1px #c79637, 0 0 0 8px rgba(231, 183, 90, 0.16);
}

.route-copy {
  display: grid;
  gap: 0.25rem;
  max-width: 13rem;
  margin-top: 1rem;
}

.route-copy small {
  color: var(--forest);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.route-copy strong {
  font-family: var(--serif);
  font-size: 1.05rem;
  font-weight: 650;
  line-height: 1.15;
}

.route-copy span {
  color: var(--muted);
  font-size: 0.7rem;
}

.current-card {
  position: absolute;
  bottom: 8rem;
  width: 12.5rem;
  padding: 1rem;
  border: 1px solid #d2c7ad;
  border-radius: 0.85rem;
  background: #fffaf0;
  box-shadow: var(--shadow-card);
  text-align: left;
}

.current-card::after {
  position: absolute;
  bottom: -0.42rem;
  left: calc(50% - 0.42rem);
  width: 0.8rem;
  height: 0.8rem;
  border-right: 1px solid #d2c7ad;
  border-bottom: 1px solid #d2c7ad;
  background: #fffaf0;
  content: "";
  transform: rotate(45deg);
}

.current-card h3 {
  margin-bottom: 0.2rem;
  font-size: 1.35rem;
}

.current-card > p:not(.overline) {
  margin-bottom: 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.current-card .button {
  position: relative;
  z-index: 2;
  min-height: 2.25rem;
  padding: 0.45rem 0.7rem;
  font-size: 0.68rem;
}

.route-legend {
  display: flex;
  justify-content: flex-end;
  gap: 1rem;
  color: var(--muted);
  font-size: 0.67rem;
  font-weight: 700;
}

.route-legend span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.route-legend i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #d8d6cf;
}

.route-legend .done { background: var(--forest); }
.route-legend .current { background: var(--maize); }

.route-support {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(18rem, 0.75fr);
  gap: 1rem;
  margin-top: 1rem;
}

.continue-panel,
.guide-panel {
  border-radius: 1.35rem;
}

.continue-panel {
  padding: clamp(1.25rem, 3vw, 2rem);
  border: 1px solid var(--line);
  background: rgba(255, 253, 247, 0.66);
}

.continue-panel > p {
  max-width: 45rem;
  margin: 1rem 0 1.4rem;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.65;
}

.status-chip {
  padding: 0.45rem 0.65rem;
  background: var(--forest-pale);
  color: var(--forest-deep);
}

.session-glance {
  display: grid;
  grid-template-columns: 1fr auto 2fr auto 1fr;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.session-glance div {
  display: grid;
  gap: 0.18rem;
}

.session-glance span {
  color: var(--forest);
  font-size: 0.66rem;
  font-weight: 800;
  text-transform: uppercase;
}

.session-glance strong {
  font-family: var(--serif);
  font-size: 1.35rem;
  font-weight: 650;
}

.session-glance small {
  color: var(--muted);
  font-size: 0.68rem;
}

.session-glance > i {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 50%;
  background: var(--maize);
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1rem;
}

.trace-tag {
  padding: 0.42rem 0.6rem;
  color: var(--ink);
}

.trace-tag.coral { background: var(--coral-pale); }
.trace-tag.sky { background: var(--sky-pale); }
.trace-tag.maize { background: var(--maize-pale); }

.guide-panel {
  position: relative;
  padding: 1.5rem;
  background: var(--sky-pale);
  overflow: hidden;
}

.guide-panel > p:not(.overline) {
  margin: 0.8rem 0 1.25rem;
  color: #51666d;
  font-size: 0.8rem;
  line-height: 1.6;
}

.guide-mark,
.summary-mark {
  position: relative;
  display: block;
  width: 3.4rem;
  height: 3.4rem;
  margin-bottom: 1.15rem;
  border: 1px solid rgba(47, 103, 88, 0.22);
  border-radius: 50% 50% 44% 56%;
  transform: rotate(-8deg);
}

.guide-mark span,
.summary-mark span {
  position: absolute;
  top: 0.74rem;
  left: 0.6rem;
  width: 2rem;
  height: 1.05rem;
  border-bottom: 3px solid var(--forest);
  border-radius: 50%;
  transform: rotate(12deg);
}

.guide-mark i,
.summary-mark i {
  position: absolute;
  right: 0.45rem;
  bottom: 0.45rem;
  width: 0.65rem;
  height: 0.65rem;
  border-radius: 50%;
  background: var(--coral);
}

.guide-mark b,
.summary-mark b {
  position: absolute;
  bottom: 0.55rem;
  left: 0.65rem;
  width: 0.65rem;
  height: 0.65rem;
  background: var(--maize);
  transform: rotate(45deg);
}

.section-intro {
  display: block;
}

.section-intro h1 {
  font-size: clamp(1.75rem, 2.25vw, 2.45rem);
}

.home-grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 1rem;
}

.large-task {
  display: grid;
  min-height: 16rem;
  align-content: end;
  justify-items: start;
  padding: 1.5rem;
  border-radius: 1.35rem;
  background: var(--forest-pale);
  text-align: left;
  transition: transform 180ms ease, box-shadow 180ms ease;
}

.large-task:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.large-task.warm { background: var(--coral-pale); }
.large-task.sky { background: var(--sky-pale); }
.large-task span {
  color: var(--forest);
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.large-task strong {
  max-width: 20rem;
  margin: 0.4rem 0;
  font-family: var(--serif);
  font-size: 2rem;
  font-weight: 600;
  line-height: 1.05;
}
.large-task small { color: var(--muted); }

.documents-grid {
  display: grid;
  grid-template-columns: minmax(16rem, 0.8fr) minmax(20rem, 1.2fr);
  gap: 0.9rem;
}

.upload-document {
  grid-row: span 2;
  display: grid;
  min-height: 18rem;
  place-items: center;
  align-content: center;
  padding: 1.5rem;
  border: 1.5px dashed rgba(47, 103, 88, 0.35);
  border-radius: 1.3rem;
  background: rgba(223, 234, 229, 0.5);
  text-align: center;
}

.upload-document strong { margin: 1rem 0 0.35rem; }
.upload-document small { color: var(--muted); }

.upload-art,
.file-illustration {
  position: relative;
  width: 4.3rem;
  height: 4.5rem;
}

.upload-art i,
.file-illustration i {
  position: absolute;
  inset: 0.15rem 0.4rem 0.35rem 0.4rem;
  border: 2px solid var(--forest);
  border-radius: 0.35rem;
  background: var(--paper-bright);
  transform: rotate(-5deg);
}

.upload-art i::after,
.file-illustration i::after {
  position: absolute;
  top: 1.2rem;
  left: 0.7rem;
  width: 1.8rem;
  height: 1rem;
  border-top: 2px solid var(--forest);
  border-bottom: 2px solid var(--forest);
  content: "";
}

.upload-art b,
.file-illustration b {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 1.5rem;
  height: 1.5rem;
  border: 3px solid var(--paper-bright);
  border-radius: 50%;
  background: var(--coral);
}

.document-row {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 1rem;
  min-height: 8.55rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(255, 253, 247, 0.72);
}

.document-row div { display: grid; gap: 0.3rem; }
.document-row small { color: var(--muted); }
.document-row button { color: var(--forest); font-weight: 800; }
.doc-state {
  display: grid;
  width: 3.5rem;
  height: 3.5rem;
  place-items: center;
  border-radius: 0.8rem;
  font-size: 0.62rem;
  font-weight: 850;
}
.doc-state.green { background: var(--forest-pale); color: var(--forest); }
.doc-state.coral { background: var(--coral-pale); color: #984332; }
.doc-state.template { background: var(--sky-pale); color: #315f6b; }

.school-profile {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 58rem;
  padding: clamp(1.2rem, 3vw, 2rem);
  border: 1px solid var(--line);
  border-radius: 1.35rem;
  background: rgba(255, 253, 247, 0.75);
}

.school-profile label,
.form-grid label {
  display: grid;
  gap: 0.45rem;
}

.school-profile label > span,
.form-grid label > span {
  font-size: 0.7rem;
  font-weight: 800;
}

.wide { grid-column: 1 / -1; }

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  background: var(--paper-bright);
  color: var(--ink);
}

input,
select { min-height: 2.9rem; padding: 0.7rem 0.8rem; }
textarea { padding: 0.75rem 0.8rem; line-height: 1.55; resize: vertical; }

input:hover,
select:hover,
textarea:hover { border-color: #bdb9ae; }

.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
}

.form-actions > span { color: var(--muted); font-size: 0.72rem; }

.bottom-dock {
  position: fixed;
  z-index: 30;
  bottom: 1.15rem;
  left: 50%;
  display: grid;
  grid-template-columns: repeat(5, minmax(4.3rem, 1fr));
  width: min(calc(100% - 2rem), 35rem);
  padding: 0.42rem;
  border: 1px solid rgba(47, 103, 88, 0.18);
  border-radius: 1.15rem;
  background: rgba(255, 253, 247, 0.94);
  box-shadow: 0 15px 40px rgba(32, 40, 33, 0.16);
  backdrop-filter: blur(18px);
  transform: translateX(-50%);
}

.bottom-dock button {
  display: grid;
  min-height: 3.55rem;
  place-items: center;
  align-content: center;
  gap: 0.2rem;
  border-radius: 0.82rem;
  color: var(--muted);
  font-size: 0.63rem;
  font-weight: 750;
}

.bottom-dock button:hover,
.bottom-dock button.is-active {
  background: var(--forest-pale);
  color: var(--forest-deep);
}

.bottom-dock svg { width: 1.25rem; height: 1.25rem; }

.bottom-dock .create-dock {
  position: relative;
  margin: -1.05rem 0 0;
  border-radius: 1rem;
  background: var(--forest);
  box-shadow: 0 9px 22px rgba(47, 103, 88, 0.25);
  color: var(--white);
}

.bottom-dock .create-dock:hover { background: var(--forest-deep); color: var(--white); }

dialog {
  width: calc(100% - 2rem);
  max-height: calc(100dvh - 2rem);
  margin: auto;
  padding: 0;
  border: 1px solid rgba(47, 103, 88, 0.2);
  border-radius: 1.35rem;
  background: var(--paper-bright);
  box-shadow: 0 28px 85px rgba(32, 40, 33, 0.28);
  color: var(--ink);
}

dialog::backdrop {
  background: rgba(28, 36, 30, 0.54);
  backdrop-filter: blur(5px);
}

.planner-dialog { max-width: 64rem; }
.review-dialog { max-width: 72rem; }
.planner-dialog form { display: grid; max-height: calc(100dvh - 2rem); grid-template-rows: auto auto minmax(0, 1fr) auto; }

.dialog-header,
.review-header,
.dialog-footer,
.review-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.3rem;
}

.dialog-header,
.review-header { border-bottom: 1px solid var(--line); }
.dialog-footer,
.review-footer { border-top: 1px solid var(--line); }

.dialog-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.dialog-brand img { width: 2.15rem; height: 2.15rem; }
.dialog-brand > span { display: grid; gap: 0.1rem; }
.dialog-brand strong { font-size: 0.86rem; }
.dialog-brand small { color: var(--muted); font-size: 0.68rem; }

.dialog-close {
  display: grid;
  width: 2.4rem;
  height: 2.4rem;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font-size: 1.45rem;
  line-height: 1;
}

.step-progress {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  gap: 0.5rem;
  padding: 1.15rem clamp(1.2rem, 5vw, 4rem);
  border-bottom: 1px solid var(--line);
  background: var(--paper-bright);
}

.step-progress > i { height: 1px; background: var(--line); }

.step-progress button {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0;
  color: var(--muted);
}

.step-progress button span {
  display: grid;
  width: 1.7rem;
  height: 1.7rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--paper-bright);
  font-size: 0.65rem;
  font-weight: 850;
}

.step-progress button b { font-size: 0.67rem; }
.step-progress button.is-active { color: var(--forest); }
.step-progress button.is-active span,
.step-progress button.is-complete span { border-color: var(--forest); background: var(--forest); color: var(--white); }

.dialog-body,
.review-body {
  min-height: 0;
  overflow-y: auto;
}

.dialog-body { padding: clamp(1.35rem, 4vw, 2.6rem); }
.form-step { animation: view-in 280ms ease both; }
.step-intro { margin-bottom: 1.15rem; }
.step-intro h2 { margin-bottom: 0.4rem; font-size: clamp(1.45rem, 2vw, 1.95rem); line-height: 1.08; }

.file-drop {
  display: grid;
  place-items: center;
  margin-bottom: 1.3rem;
  padding: 1.35rem;
  border: 1.5px dashed rgba(47, 103, 88, 0.4);
  border-radius: 1rem;
  background: var(--forest-pale);
  text-align: center;
  transition: border 160ms ease, transform 160ms ease;
}

.file-drop:hover { border-color: var(--forest); transform: translateY(-2px); }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.file-drop strong { margin: 0.55rem 0 0.2rem; }
.file-drop small { color: var(--muted); }
.file-illustration { width: 3.5rem; height: 3.5rem; }
.file-illustration em { position: absolute; right: -0.1rem; top: -0.1rem; width: 0.8rem; height: 0.8rem; border-radius: 50%; background: var(--maize); }

.import-result {
  margin: -0.25rem 0 1.25rem;
  padding: 0.9rem 1rem;
  border-left: 4px solid var(--forest);
  border-radius: 0 0.7rem 0.7rem 0;
  background: #edf3f0;
  color: #3c584f;
  font-size: 0.75rem;
  line-height: 1.55;
}

.import-result strong { display: block; margin-bottom: 0.25rem; color: var(--forest-deep); }
.template-readiness { display: grid; gap: 0.12rem; margin-top: 0.65rem; padding: 0.65rem 0.75rem; border: 1px solid #c8dcd4; border-radius: 0.65rem; background: rgba(255,255,255,.56); }
.template-readiness b { color: var(--forest-deep); font-size: 0.7rem; }
.template-readiness span { color: var(--muted); font-size: 0.66rem; }
.template-readiness button { width: fit-content; margin-top: 0.25rem; padding: 0; border: 0; background: transparent; color: var(--forest-deep); font-size: 0.65rem; font-weight: 800; text-decoration: underline; text-underline-offset: 0.16rem; }
.template-readiness.partial { border-color: #e5cf95; background: var(--maize-pale); }
.template-readiness.limited { border-color: #e1b8ae; background: var(--coral-pale); }
.import-tags { display: flex; flex-wrap: wrap; gap: 0.35rem; margin-top: 0.6rem; }
.import-tags span { padding: 0.3rem 0.48rem; border-radius: 99px; background: var(--paper-bright); font-size: 0.65rem; font-weight: 750; }

.knowledge-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.75rem;
  margin: -0.35rem 0 1.25rem;
  padding: 0.9rem 1rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: rgba(255, 253, 247, 0.74);
}

.knowledge-consent input { margin-top: 0.2rem; accent-color: var(--forest); }
.knowledge-consent span { display: grid; gap: 0.2rem; }
.knowledge-consent strong { font-size: 0.74rem; }
.knowledge-consent small { color: var(--muted); font-size: 0.66rem; line-height: 1.5; }

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.choice-fieldset {
  margin: 1.4rem 0 0;
  padding: 0;
  border: 0;
}

.choice-fieldset legend {
  margin-bottom: 0.7rem;
  font-size: 0.72rem;
  font-weight: 850;
}

.choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.choice-grid.compact { grid-template-columns: repeat(5, minmax(0, 1fr)); }

.choice-grid label {
  position: relative;
  min-width: 0;
}

.choice-grid input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.choice-grid span {
  display: flex;
  align-items: center;
  min-height: 3.2rem;
  padding: 0.7rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  background: var(--paper-bright);
  font-size: 0.69rem;
  font-weight: 700;
  line-height: 1.3;
}

.choice-grid span::before {
  flex: 0 0 auto;
  width: 0.75rem;
  height: 0.75rem;
  margin-right: 0.5rem;
  border: 1.5px solid #aaa99f;
  border-radius: 0.2rem;
  content: "";
}

.choice-grid input:checked + span {
  border-color: var(--forest);
  background: var(--forest-pale);
  color: var(--forest-deep);
}

.choice-grid input:checked + span::before {
  border-color: var(--forest);
  background: var(--forest);
  box-shadow: inset 0 0 0 2px var(--forest-pale);
}

.choice-grid input:focus-visible + span { outline: 3px solid rgba(136, 183, 200, 0.58); outline-offset: 2px; }

.custom-choice-adder {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.55rem;
  margin-top: 0.65rem;
}

.custom-choice-adder input {
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.62rem 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.7rem;
  color: var(--ink);
  background: var(--paper-bright);
}

.custom-choice-adder button,
.material-source-list button,
.tester-feedback-actions button {
  padding: 0.62rem 0.85rem;
  border: 1px solid var(--forest);
  border-radius: 0.7rem;
  color: var(--forest-deep);
  background: var(--paper-bright);
  font-size: 0.66rem;
  font-weight: 850;
}

.single-session-settings,
.writing-standard {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--forest-pale) 42%, var(--paper-bright));
}

.writing-standard { display: flex; align-items: flex-start; gap: 0.75rem; }
.writing-standard .info-dot { flex: 0 0 auto; width: 2rem; height: 2rem; padding: 0; border: 1px solid var(--forest); border-radius: 50%; color: var(--forest-deep); background: var(--paper-bright); font-family: var(--serif); font-weight: 800; }
.writing-standard p { margin: 0.25rem 0 0; color: var(--muted); font-size: 0.67rem; line-height: 1.55; }
.writing-standard .writing-help { margin-top: 0.65rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }

#material-source-list { display: grid; gap: 0.5rem; margin-top: 0.7rem; }
#material-source-list article { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; padding: 0.75rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--paper-bright); }
#material-source-list strong,
#material-source-list small { display: block; }
#material-source-list small { margin-top: 0.15rem; color: var(--muted); font-size: 0.62rem; }

.calendar-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 0.9rem;
  margin-top: 1.2rem;
  padding: 1rem;
  border-radius: 1rem;
  background: var(--sky-pale);
}

.calendar-preview.is-ready { background: var(--forest-pale); }
.calendar-preview.is-warning { background: var(--maize-pale); }
.calendar-preview strong { display: block; margin-bottom: 0.2rem; font-size: 0.8rem; }
.calendar-preview p { margin: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.5; }
.calendar-mark { display: grid; width: 3rem; height: 3rem; place-items: center; border: 1px solid rgba(47, 103, 88, 0.28); border-radius: 0.8rem; background: var(--paper-bright); color: var(--forest); font-family: var(--serif); font-size: 1.25rem; font-weight: 650; }

.annual-settings {
  margin-top: 1.2rem;
  padding: 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(247, 242, 232, 0.6);
}

.step-intro.mini { margin-bottom: 0.9rem; }
.step-intro.mini h3 { margin-bottom: 0.2rem; font-size: 1.35rem; }
.step-intro.mini p:last-child { margin: 0; color: var(--muted); font-size: 0.7rem; line-height: 1.5; }

.generation-summary {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1.2rem;
  margin-top: 1.5rem;
  padding: 1.15rem;
  border-radius: 1rem;
  background: var(--maize-pale);
}

.generation-summary .summary-mark { margin: 0; }
.generation-summary h3 { margin-bottom: 0.2rem; font-size: 1.45rem; }
.generation-summary p:last-child { margin: 0; color: #715f38; font-size: 0.72rem; line-height: 1.5; }

.dialog-footer { min-height: 4.6rem; }
.dialog-footer #form-message { flex: 1; color: #9b4638; font-size: 0.72rem; text-align: right; }

.review-dialog { overflow: hidden; }
.review-header h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.3rem); }
.review-header .overline { margin-bottom: 0.25rem; }
.review-body { max-height: calc(100dvh - 11.5rem); padding: clamp(1.2rem, 3vw, 2rem); background: #f4f0e7; }
.review-footer { background: var(--paper-bright); }
.review-footer > span { flex: 1; color: var(--muted); font-size: 0.72rem; }

.empty-review {
  display: grid;
  min-height: 22rem;
  place-items: center;
  align-content: center;
  text-align: center;
}

.empty-review .summary-mark { margin-bottom: 1rem; }
.empty-review h3 { margin-bottom: 0.35rem; font-size: 1.6rem; }
.empty-review p { max-width: 25rem; color: var(--muted); }

.plan-paper {
  width: min(100%, 52rem);
  margin: 0 auto;
  padding: clamp(1.2rem, 4vw, 3rem);
  background: var(--paper-bright);
  box-shadow: 0 12px 34px rgba(54, 57, 51, 0.11);
}

.plan-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 1.4rem 0 1.8rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  overflow: hidden;
}

.plan-meta div { padding: 0.7rem; border-right: 1px solid var(--line); background: #fbf8f0; }
.plan-meta div:nth-child(3n) { border-right: 0; }
.plan-meta small { display: block; margin-bottom: 0.2rem; color: var(--forest); font-size: 0.59rem; font-weight: 850; text-transform: uppercase; }
.plan-meta strong { font-size: 0.72rem; }

.plan-paper > h3 { margin: 1.7rem 0 0.6rem; color: var(--forest); font-size: 1.55rem; }
.plan-detail { margin-bottom: 0.7rem; color: #4f5751; font-size: 0.78rem; line-height: 1.65; }
.plan-detail strong { color: var(--ink); }

.calendar-review {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem 1rem;
  border-radius: 0.8rem;
  background: var(--sky-pale);
  font-size: 0.7rem;
}

.calendar-review strong { font-family: var(--serif); font-size: 1.1rem; }
.calendar-review span { color: var(--muted); line-height: 1.5; }
.calendar-review a { color: var(--forest-deep); font-weight: 800; }

.route-table { overflow-x: auto; border: 1px solid var(--line); border-radius: 0.75rem; }
.route-table table { width: 100%; border-collapse: collapse; font-size: 0.7rem; }
.route-table th, .route-table td { padding: 0.7rem; border-bottom: 1px solid var(--line); text-align: left; }
.route-table thead th { background: var(--forest-pale); color: var(--forest-deep); }
.route-table tbody tr:last-child th, .route-table tbody tr:last-child td { border-bottom: 0; }

.dosage-list { display: grid; gap: 0.6rem; }
.dosage-list article { display: grid; grid-template-columns: 5rem 1fr; gap: 0.8rem; padding: 0.85rem; border-left: 3px solid var(--forest); background: #fbf8f0; }
.dosage-list article > span { color: var(--forest); font-size: 0.68rem; font-weight: 850; }
.dosage-list strong { font-size: 0.73rem; }
.dosage-list p { margin: 0.25rem 0; font-size: 0.71rem; line-height: 1.5; }
.dosage-list small { color: var(--muted); font-size: 0.63rem; line-height: 1.45; }

.session-card {
  margin-top: 0.85rem;
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  overflow: hidden;
}

.session-card header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1rem;
  background: var(--forest-pale);
}

.session-card header h4 { margin: 0; font-family: var(--serif); font-size: 1.15rem; }
.session-card header span { flex: 0 0 auto; padding: 0.3rem 0.45rem; border-radius: 99px; background: var(--paper-bright); color: var(--forest); font-size: 0.62rem; font-weight: 800; }
.session-purpose { margin: 0; padding: 0.85rem 1rem 0; color: var(--muted); font-size: 0.72rem; line-height: 1.55; }
.session-bridge { margin: 0; padding: 0.35rem 1rem 0; color: #496a60; font-size: 0.68rem; line-height: 1.5; }
.moments { display: grid; grid-template-columns: 1fr; gap: 1px; margin-top: 0.75rem; background: var(--line); border-top: 1px solid var(--line); }
.moment { padding: 0.85rem; background: var(--paper-bright); }
.moment strong { display: flex; justify-content: space-between; gap: 0.5rem; color: var(--forest); font-size: 0.66rem; text-transform: uppercase; }
.moment p { margin: 0.5rem 0 0; font-size: 0.7rem; line-height: 1.55; }
.session-evaluation { padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: #fbf8f0; font-size: 0.69rem; line-height: 1.5; }
.session-card .tag-row { padding: 0 1rem 0.85rem; margin-top: 0.75rem; }
.session-card .trace-tag { font-size: 0.61rem; }

.rubric-period { margin-top: 1rem; }
.rubric-period h4 { margin-bottom: 0.2rem; font-family: var(--serif); font-size: 1.15rem; }
.rubric-period > p { margin: 0 0 0.55rem; color: var(--muted); font-size: 0.66rem; }

.source-list { display: grid; gap: 0.55rem; margin: 0; padding: 0; list-style: none; }
.source-list li { padding: 0.75rem; border-left: 3px solid var(--sky); background: var(--sky-pale); font-size: 0.68rem; line-height: 1.5; }
.source-list a { color: var(--forest-deep); font-weight: 800; }

.toast {
  position: fixed;
  z-index: 100;
  right: 1rem;
  bottom: 6.2rem;
  max-width: min(24rem, calc(100% - 2rem));
  padding: 0.8rem 1rem;
  border-radius: 0.75rem;
  background: var(--ink);
  box-shadow: var(--shadow-soft);
  color: var(--white);
  font-size: 0.76rem;
  line-height: 1.5;
  animation: toast-in 240ms ease both;
}

.compact-intro {
  max-width: none;
}

.compact-intro > div:first-child {
  max-width: 42rem;
}

.empty-year-map {
  min-height: 20rem;
}

.route-empty-state {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.3rem;
  max-width: 58rem;
  margin: 3.3rem auto 2.5rem;
  padding: 1.25rem;
  border-radius: 1rem;
  background: var(--forest-pale);
}

.route-empty-state h3 {
  margin-bottom: 0.25rem;
  font-size: 1.4rem;
}

.route-empty-state p {
  margin: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.empty-route-mark {
  position: relative;
  width: 4rem;
  height: 4rem;
  border: 2px solid var(--forest);
  border-radius: 50%;
  background: var(--paper-bright);
}

.empty-route-mark span {
  position: absolute;
  top: 0.85rem;
  left: 0.9rem;
  width: 2rem;
  height: 1.2rem;
  border-bottom: 3px solid var(--forest);
  border-radius: 50%;
  transform: rotate(-12deg);
}

.empty-route-mark i,
.empty-route-mark b {
  position: absolute;
  bottom: 0.58rem;
  width: 0.62rem;
  height: 0.62rem;
}

.empty-route-mark i {
  left: 0.7rem;
  background: var(--maize);
  transform: rotate(45deg);
}

.empty-route-mark b {
  right: 0.65rem;
  border-radius: 50%;
  background: var(--coral);
}

.empty-route-line {
  display: grid;
  grid-template-columns: 1fr auto auto auto;
  align-items: center;
  gap: 1.4rem;
  max-width: 52rem;
  margin: 0 auto 1.2rem;
}

.empty-route-line i {
  height: 2px;
  background: repeating-linear-gradient(90deg, var(--line) 0 7px, transparent 7px 14px);
}

.empty-route-line span {
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid var(--paper-bright);
  border-radius: 50%;
  background: #d8d6cf;
  box-shadow: 0 0 0 1px var(--line);
}

.empty-support {
  grid-template-columns: minmax(0, 1.5fr) minmax(18rem, 0.65fr);
}

.readiness-list {
  display: grid;
  gap: 0.55rem;
  margin-top: 1.2rem;
}

.readiness-list button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 0.8rem;
  min-height: 4rem;
  padding: 0.75rem 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.readiness-list button > span {
  display: grid;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border-radius: 50%;
  background: var(--paper);
  color: var(--forest);
  font-size: 0.68rem;
  font-weight: 850;
}

.readiness-list button div {
  display: grid;
  gap: 0.14rem;
}

.readiness-list button strong { font-size: 0.78rem; }
.readiness-list button small { color: var(--muted); font-size: 0.68rem; }
.readiness-list button b { color: var(--forest); font-size: 0.68rem; }

.empty-documents-grid {
  grid-template-columns: minmax(16rem, 0.7fr) minmax(20rem, 1.3fr);
}

.documents-empty,
.reference-empty {
  display: grid;
  min-height: 12rem;
  place-items: center;
  align-content: center;
  padding: 1.4rem;
  border: 1px dashed var(--line);
  border-radius: 1.15rem;
  color: var(--muted);
  text-align: center;
}

.documents-empty strong,
.reference-empty strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.35rem;
}

.documents-empty p,
.reference-empty p {
  margin: 0.35rem 0 0;
  font-size: 0.75rem;
}

.profile-section-title {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-top: 0.5rem;
  padding: 1rem 0 0.2rem;
  border-top: 1px solid var(--line);
}

.profile-section-title small { color: var(--muted); }

.annex-rule {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  margin: 1.4rem 0 1rem;
  padding: 1rem;
  border-radius: 0.9rem;
  background: var(--maize-pale);
}

.annex-rule p {
  margin: 0.25rem 0 0;
  color: #715f38;
  font-size: 0.72rem;
  line-height: 1.5;
}

.annex-miniature {
  position: relative;
  display: block;
  width: 3rem;
  height: 3.6rem;
  border: 1px solid #c4a65e;
  border-radius: 0.35rem;
  background: var(--paper-bright);
  box-shadow: 5px 5px 0 rgba(231, 183, 90, 0.32);
}

.annex-miniature i {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  display: grid;
  width: 1.1rem;
  height: 1.1rem;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-size: 0.58rem;
  font-style: normal;
  font-weight: 850;
}

.annex-miniature b {
  position: absolute;
  right: 0.45rem;
  bottom: 0.55rem;
  width: 1.8rem;
  height: 1.15rem;
  border-top: 2px solid var(--maize);
  border-bottom: 2px solid var(--maize);
}

.signature-fields {
  margin-top: 1.4rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

.admin-intro {
  max-width: 48rem;
}

.admin-layout {
  display: grid;
  gap: 1rem;
}

.admin-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.admin-summary div {
  display: grid;
  gap: 0.3rem;
  padding: 1rem 1.2rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 253, 247, 0.72);
}

.admin-summary small {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 750;
}

.admin-summary strong {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 600;
}

.knowledge-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(15rem, 0.6fr);
  align-items: center;
  gap: 1rem;
  padding: 1.35rem;
  border-radius: 1.2rem;
  background: var(--forest-pale);
}

.knowledge-copy h2,
.reference-library h2 {
  margin-bottom: 0.35rem;
  font-size: 1.8rem;
}

.knowledge-copy > p:last-child {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.6;
}

.admin-upload {
  display: grid;
  min-height: 10rem;
  place-items: center;
  align-content: center;
  padding: 1rem;
  border: 1.5px dashed rgba(47, 103, 88, 0.42);
  border-radius: 0.9rem;
  background: rgba(255, 253, 247, 0.7);
  text-align: center;
}

.admin-upload input {
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}

.admin-upload .upload-art { width: 3rem; height: 3.2rem; }
.admin-upload strong { margin-top: 0.45rem; font-size: 0.78rem; }
.admin-upload small { margin-top: 0.2rem; color: var(--muted); font-size: 0.65rem; }
.admin-upload-status { padding: 0.75rem 1rem; border-radius: 0.7rem; background: var(--sky-pale); color: #425d65; font-size: 0.72rem; }

.reference-library {
  padding: 1.3rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 253, 247, 0.72);
}

.reference-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1rem;
}

.reference-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.9rem;
  padding: 0.8rem;
  border-top: 1px solid var(--line);
}

.reference-main {
  display: grid;
  gap: 0.25rem;
  min-width: 0;
}

.reference-main > strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 0.78rem;
}

.reference-main > small { color: var(--muted); font-size: 0.65rem; }
.reference-tags { display: flex; flex-wrap: wrap; gap: 0.3rem; }
.reference-tags span { padding: 0.25rem 0.4rem; border-radius: 99px; background: var(--paper); color: var(--forest); font-size: 0.58rem; font-weight: 750; }
.reference-row > button { border: 0; background: none; color: #9b4638; font-size: 0.68rem; font-weight: 800; }

.institutional-upload {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(223, 234, 229, 0.45);
}

.institutional-upload strong { display: block; margin-bottom: 0.25rem; font-size: 0.78rem; }
.institutional-upload p { max-width: 44rem; margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.55; }
.institutional-upload .button { flex: 0 0 auto; }

.guidance-list {
  display: grid;
  gap: 0.45rem;
  margin: -0.35rem 0 1rem;
}

.guidance-list article {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.65rem 0.8rem;
  border-bottom: 1px solid var(--line);
}

.guidance-list article div { display: grid; gap: 0.15rem; }
.guidance-list strong { font-size: 0.72rem; }
.guidance-list small { color: var(--muted); font-size: 0.62rem; }
.guidance-list button { border: 0; background: none; color: #9b4638; font-size: 0.65rem; font-weight: 800; }

.standalone-field {
  display: grid;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.standalone-field > span,
.form-grid label > small { color: var(--muted); font-size: 0.68rem; font-weight: 750; line-height: 1.45; }

.usage-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.8rem;
}

.usage-summary > div {
  display: grid;
  gap: 0.2rem;
  padding: 0.9rem 1.05rem;
  border-bottom: 2px solid var(--forest-pale);
}

.usage-summary small { color: var(--muted); font-size: 0.65rem; font-weight: 750; }
.usage-summary strong { font-family: var(--serif); font-size: 1.85rem; font-weight: 600; }

.usage-map-section,
.usage-trend,
.usage-breakdowns,
.usage-private-lists {
  padding: 1.15rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255, 253, 247, 0.72);
}

.usage-map-section .panel-heading { align-items: start; }
.usage-map-section .panel-heading h2,
.usage-trend .panel-heading h2,
.usage-private-lists .panel-heading h2 { margin-bottom: 0.25rem; font-size: 1.55rem; }
.usage-map-section .panel-heading p:last-child { margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

.usage-map-wrap { position: relative; min-height: 28rem; overflow: hidden; border: 1px solid var(--line); border-radius: 1rem; background: var(--sky-pale); }
#usage-map { display: block; width: 100%; height: auto; max-height: 32rem; touch-action: none; cursor: grab; }
#usage-map:active { cursor: grabbing; }
#usage-map .map-sphere { fill: color-mix(in srgb, var(--sky-pale) 65%, var(--paper-bright)); stroke: var(--line); stroke-width: 1; }
#usage-map .world-country { fill: color-mix(in srgb, var(--forest-pale) 66%, var(--paper-bright)); stroke: var(--paper-bright); stroke-width: 0.75; vector-effect: non-scaling-stroke; }
#usage-map .world-country.is-mexico { fill: color-mix(in srgb, var(--forest) 54%, var(--forest-pale)); }
#usage-map .school-marker { cursor: pointer; }
#usage-map .school-pulse { fill: rgba(230, 108, 85, 0.22); stroke: none; transform-origin: center; animation: school-pulse 2.4s ease-out infinite; }
#usage-map .school-dot { fill: var(--coral); stroke: var(--paper-bright); stroke-width: 2; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 5px rgba(230, 108, 85, 0.75)); }
#usage-map .map-empty-label { fill: var(--muted); stroke: none; font-family: var(--sans); font-size: 13px; }
.map-controls { position: absolute; z-index: 2; top: 0.75rem; right: 0.75rem; display: grid; gap: 0.35rem; }
.map-controls button { display: grid; width: 2.45rem; height: 2.45rem; padding: 0; place-items: center; border: 1px solid var(--line); border-radius: 0.7rem; color: var(--forest-deep); background: color-mix(in srgb, var(--paper-bright) 92%, transparent); box-shadow: var(--shadow-card); font-weight: 900; backdrop-filter: blur(12px); }

.tester-feedback-list { display: grid; gap: 0.65rem; }
.tester-feedback-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: start; gap: 1rem; padding: 0.85rem; border: 1px solid var(--line); border-radius: 0.85rem; background: var(--paper-bright); }
.tester-feedback-item.is-new { border-left: 4px solid var(--coral); }
.tester-feedback-item.is-reviewed { border-left: 4px solid var(--maize); }
.tester-feedback-item.is-resolved { opacity: 0.74; }
.tester-feedback-item strong,
.tester-feedback-item small { display: block; }
.tester-feedback-item small { margin-top: 0.15rem; color: var(--muted); font-size: 0.62rem; }
.tester-feedback-item > div > p:last-child { margin: 0.55rem 0 0; font-size: 0.69rem; line-height: 1.55; white-space: pre-wrap; }
.feedback-meta { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0 0 0.45rem; }
.feedback-meta span { padding: 0.24rem 0.45rem; border-radius: 999px; color: var(--forest-deep); background: var(--forest-pale); font-size: 0.56rem; font-weight: 850; }
.tester-feedback-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 0.4rem; }
.tester-feedback-actions b { color: var(--forest-deep); font-size: 0.65rem; }
.tester-feedback-dialog form { width: min(42rem, calc(100vw - 2rem)); }

@keyframes school-pulse {
  0% { opacity: 0.85; transform: scale(0.45); }
  75%, 100% { opacity: 0; transform: scale(1.45); }
}

.map-selection {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  min-height: 2.3rem;
  padding: 0.6rem 0.2rem 0;
  border-top: 1px solid var(--line);
}

.map-selection strong { font-size: 0.72rem; }
.map-selection span { color: var(--muted); font-size: 0.65rem; }

.usage-chart-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(18rem, 0.65fr);
  gap: 1rem;
}

#usage-line-chart { display: block; width: 100%; height: auto; }
#usage-line-chart text { fill: var(--muted); stroke: none; font-family: var(--sans); font-size: 10px; }
#usage-line-chart .chart-grid path { display: none; }
#usage-line-chart .chart-grid line { stroke: var(--line); stroke-width: 1; }
#usage-line-chart .chart-axis path,
#usage-line-chart .chart-axis line { stroke: var(--line); }
#usage-line-chart .usage-line { fill: none; stroke-width: 2.4; }
#usage-line-chart .usage-line.total { stroke: var(--sky); }
#usage-line-chart .usage-line.plans { stroke: var(--forest); stroke-dasharray: 5 4; }
#usage-line-chart .usage-end-dot { fill: var(--forest); stroke: var(--paper-bright); stroke-width: 2; }
#usage-line-chart .chart-label { fill: var(--ink); font-weight: 750; }

.usage-breakdowns { display: grid; gap: 1.25rem; align-content: start; }
.usage-breakdowns h3 { margin-bottom: 0.65rem; font-size: 1.1rem; }
.usage-bars { display: grid; gap: 0.55rem; }
.usage-bar > div { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.65rem; }
.usage-bar > div span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.usage-bar > i { display: block; height: 0.38rem; margin-top: 0.25rem; overflow: hidden; border-radius: 99px; background: var(--forest-pale); }
.usage-bar > i b { display: block; height: 100%; border-radius: inherit; background: var(--forest); }
.usage-empty { margin: 0; color: var(--muted); font-size: 0.68rem; }

.usage-private-lists {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem;
}

.usage-private-lists > div + div { padding-left: 1.2rem; border-left: 1px solid var(--line); }
.usage-list { display: grid; }
.usage-list > p { color: var(--muted); font-size: 0.68rem; }
.usage-list article { display: flex; justify-content: space-between; gap: 1rem; padding: 0.65rem 0; border-top: 1px solid var(--line); }
.usage-list article div { display: grid; gap: 0.15rem; min-width: 0; }
.usage-list article strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.7rem; }
.usage-list article small { color: var(--muted); font-size: 0.6rem; }
.usage-list article > span { flex: 0 0 auto; color: var(--forest); font-size: 0.62rem; font-weight: 800; }

.generated-route {
  display: grid;
  grid-template-columns: auto 1fr auto 1fr auto 1fr auto 1fr auto;
  align-items: center;
  max-width: 60rem;
  margin: 4rem auto 3rem;
}

.generated-route > i { height: 2px; background: var(--line); }
.generated-node { display: grid; place-items: center; gap: 0.45rem; text-align: center; }
.generated-node span { display: grid; width: 3rem; height: 3rem; place-items: center; border: 3px solid var(--paper-bright); border-radius: 50%; background: #d8d6cf; box-shadow: 0 0 0 1px var(--line); color: var(--muted); font-size: 0.7rem; font-weight: 850; }
.generated-node small { color: var(--muted); font-size: 0.65rem; font-weight: 750; }
.generated-node.is-done span { background: var(--forest); color: var(--white); }
.generated-node.is-current span { background: var(--maize); color: #5a4217; box-shadow: 0 0 0 1px #c79637, 0 0 0 7px rgba(231, 183, 90, 0.17); }

.session-card header > div { min-width: 0; }
.session-card header small { display: block; margin-bottom: 0.25rem; color: var(--forest); font-size: 0.6rem; font-weight: 800; text-transform: uppercase; }
.session-observations { display: grid; grid-template-columns: auto 1fr; gap: 0.7rem; padding: 0.75rem 1rem; border-top: 1px solid var(--line); background: repeating-linear-gradient(180deg, var(--paper-bright) 0 27px, #e8e4da 28px); font-size: 0.68rem; }
.session-observations span { color: var(--muted); }

.annex-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.annex-preview {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.8rem;
  padding: 0.8rem;
  border: 1px solid var(--line);
  border-radius: 0.8rem;
  background: #fbf8f0;
}

.annex-preview > div:last-child { min-width: 0; }
.annex-preview span { color: var(--forest); font-size: 0.58rem; font-weight: 850; letter-spacing: 0.08em; }
.annex-preview h4 { margin: 0.2rem 0; font-family: var(--serif); font-size: 1rem; }
.annex-preview p { margin: 0; color: var(--muted); font-size: 0.65rem; line-height: 1.45; }
.annex-preview small { color: var(--muted); font-size: 0.58rem; }

.annex-sheet {
  position: relative;
  width: 4rem;
  height: 5rem;
  padding: 0.35rem;
  border: 1px solid #c8c4ba;
  background: var(--white);
  box-shadow: 3px 3px 0 #e9e3d7;
}

.annex-sheet small { color: var(--forest); font-size: 0.5rem; font-weight: 850; }
.annex-sheet > i { display: flex; gap: 0.18rem; width: 100%; margin-top: 0.28rem; color: #58625c; font-size: 0.28rem; font-style: normal; line-height: 1.2; }
.annex-sheet > i > b { display: grid; flex: 0 0 auto; width: 0.62rem; height: 0.62rem; place-items: center; border-radius: 50%; color: var(--forest-deep); background: var(--forest-pale); font-size: 0.3rem; }
.annex-sheet > strong { display: block; margin-top: 0.65rem; color: var(--forest-deep); text-align: center; font-size: 0.48rem; line-height: 1.2; }
.annex-sheet.layout-digital > b { display: grid; width: 1.35rem; height: 1.35rem; margin: 0.5rem auto 0; place-items: center; border-radius: 50%; color: var(--paper-bright); background: var(--forest); font-size: 0.65rem; }

.rubric-scroll { overflow-x: auto; }
.rubric-table { width: 100%; min-width: 54rem; border-collapse: collapse; font-size: 0.62rem; line-height: 1.4; }
.rubric-table th, .rubric-table td { padding: 0.6rem; border: 1px solid var(--line); vertical-align: top; text-align: left; }
.rubric-table thead th { background: var(--forest); color: var(--white); }
.rubric-table tbody th { min-width: 8rem; background: var(--forest-pale); color: var(--forest-deep); }

.signature-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.8rem; }
.signature-grid div { display: grid; min-height: 8rem; align-content: end; text-align: center; }
.signature-grid small { color: var(--forest); font-weight: 850; text-transform: uppercase; }
.signature-grid i { width: 100%; margin: 2.5rem 0 0.45rem; border-top: 1px solid var(--muted); }
.signature-grid strong { min-height: 1rem; font-size: 0.65rem; }
.signature-grid span { color: var(--muted); font-size: 0.58rem; }
.knowledge-note { margin-top: 1.4rem; padding: 0.7rem; border-left: 3px solid var(--sky); background: var(--sky-pale); color: #49616a; font-size: 0.65rem; }

.confirm-popover {
  position: fixed;
  z-index: 120;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1rem;
  background: rgba(32, 40, 33, 0.5);
  backdrop-filter: blur(4px);
}

.confirm-popover > div {
  width: min(100%, 25rem);
  padding: 1.2rem;
  border-radius: 1rem;
  background: var(--paper-bright);
  box-shadow: var(--shadow-soft);
}

.confirm-popover p { margin: 0.4rem 0 1rem; color: var(--muted); font-size: 0.75rem; line-height: 1.5; }
.confirm-popover span { display: flex; justify-content: flex-end; gap: 0.5rem; }

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 900px) {
  .topbar { grid-template-columns: 1fr auto; }
  .school-switch { display: none; }
  .route-intro { align-items: start; flex-direction: column; }
  .year-map { overflow: hidden; }
  .route-track { grid-template-columns: 1fr; gap: 1.2rem; min-height: 0; padding: 1.5rem 0.4rem; }
  .route-line { top: 1.5rem; bottom: 1.5rem; left: 1.92rem; width: 3px; height: auto; background: repeating-linear-gradient(180deg, var(--line) 0 8px, transparent 8px 15px); }
  .route-line span { width: 3px; height: 33%; }
  .route-stop { min-height: 5.2rem; align-items: start; padding-left: 4.5rem; text-align: left; }
  .route-node { position: absolute; top: 0; left: 0; }
  .route-copy { margin-top: 0.2rem; }
  .current-card { position: relative; bottom: auto; width: 100%; margin-bottom: 1rem; }
  .current-card::after { display: none; }
  .route-legend { justify-content: start; flex-wrap: wrap; }
  .route-support { grid-template-columns: 1fr; }
  .home-grid { grid-template-columns: 1fr 1fr; }
  .large-task:first-child { grid-column: 1 / -1; }
  .documents-grid { grid-template-columns: 1fr; }
  .upload-document { grid-row: auto; min-height: 14rem; }
  .choice-grid.compact { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .route-empty-state { grid-template-columns: auto 1fr; }
  .route-empty-state .button { grid-column: 1 / -1; }
  .empty-support { grid-template-columns: 1fr; }
  .knowledge-panel { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .usage-chart-grid { grid-template-columns: 1fr; }
  .signature-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
  .ambient-shape { display: none; }
  .app-shell { padding-bottom: 6.5rem; }
  .topbar { min-height: 4.5rem; padding: 0.65rem 1rem; }
  .brand-button img { width: 2rem; height: 2rem; }
  .brand-button strong { font-size: 1.4rem; }
  .brand-button small, .trial-pill, .quiet-icon { display: none; }
  .workspace { width: min(100% - 1.4rem, 1320px); padding-top: 1.35rem; }
  h1, .section-intro h1 { font-size: clamp(1.65rem, 7vw, 2rem); }
  .route-intro { margin-bottom: 1.25rem; }
  .intro-actions { width: 100%; }
  .intro-actions .button { flex: 1; padding-inline: 0.6rem; }
  .year-map { padding: 1.1rem; border-radius: 1.15rem; }
  .year-heading { display: block; }
  .year-heading .text-action { margin-top: 0.8rem; }
  .route-track { padding-top: 1.8rem; }
  .continue-panel, .guide-panel { padding: 1.15rem; }
  .panel-heading { display: block; }
  .panel-heading .status-chip { margin-top: 0.6rem; }
  .session-glance { grid-template-columns: 1fr; gap: 0.7rem; }
  .session-glance > i { display: none; }
  .session-glance div { grid-template-columns: auto auto; align-items: center; }
  .session-glance small { grid-column: 1 / -1; }
  .home-grid { grid-template-columns: 1fr; }
  .large-task:first-child { grid-column: auto; }
  .large-task { min-height: 12rem; }
  .document-row { grid-template-columns: auto 1fr; }
  .document-row button { grid-column: 2; justify-self: start; padding: 0; }
  .school-profile, .form-grid { grid-template-columns: 1fr; }
  .wide { grid-column: auto; }
  .form-actions { align-items: stretch; flex-direction: column; gap: 0.7rem; }
  .bottom-dock { bottom: 0.6rem; grid-template-columns: repeat(5, 1fr); width: calc(100% - 1rem); }
  .bottom-dock button { min-width: 0; min-height: 3.3rem; }
  .bottom-dock button span { font-size: 0.55rem; }
  dialog { width: 100%; max-height: 100dvh; border-radius: 0; }
  .planner-dialog form { max-height: 100dvh; }
  .dialog-header, .review-header, .dialog-footer, .review-footer { padding: 0.8rem 0.9rem; }
  .step-progress { grid-template-columns: repeat(4, 1fr); padding: 0.8rem; }
  .step-progress > i, .step-progress button b { display: none; }
  .step-progress button { justify-content: center; }
  .dialog-body { padding: 1.1rem; }
  .step-intro h2 { font-size: 1.55rem; }
  .choice-grid, .choice-grid.compact { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dialog-footer { flex-wrap: wrap; }
  .dialog-footer #form-message { order: -1; width: 100%; flex-basis: 100%; text-align: left; }
  .review-body { max-height: calc(100dvh - 10rem); padding: 0.7rem; }
  .review-footer > span { display: none; }
  .plan-paper { padding: 1.1rem; }
  .plan-meta { grid-template-columns: repeat(2, 1fr); }
  .plan-meta div, .plan-meta div:nth-child(3n) { border-right: 1px solid var(--line); }
  .plan-meta div:nth-child(2n) { border-right: 0; }
  .moments { grid-template-columns: 1fr; }
  .route-empty-state { grid-template-columns: 1fr; margin: 2rem auto 1.5rem; text-align: center; }
  .empty-route-mark { margin: 0 auto; }
  .empty-route-line { display: none; }
  .readiness-list button { grid-template-columns: auto 1fr; }
  .readiness-list button b { grid-column: 2; }
  .empty-documents-grid { grid-template-columns: 1fr; }
  .admin-summary { grid-template-columns: 1fr; }
  .usage-summary { grid-template-columns: 1fr 1fr; }
  .usage-map-section, .usage-trend, .usage-breakdowns, .usage-private-lists { padding: 0.85rem; }
  .usage-map-wrap { min-height: 0; }
  .usage-private-lists { grid-template-columns: 1fr; }
  .usage-private-lists > div + div { padding: 1rem 0 0; border-top: 1px solid var(--line); border-left: 0; }
  .institutional-upload { align-items: stretch; flex-direction: column; }
  .institutional-upload .button { text-align: center; }
  .map-selection { align-items: start; flex-direction: column; gap: 0.2rem; }
  .reference-row { grid-template-columns: auto 1fr; }
  .reference-row > button { grid-column: 2; justify-self: start; padding: 0; }
  .generated-route { grid-template-columns: 1fr; gap: 0.6rem; margin: 2rem 0 1rem; }
  .generated-route > i { width: 2px; height: 1.2rem; margin: 0 auto; }
  .annex-grid { grid-template-columns: 1fr; }
  .signature-grid { grid-template-columns: 1fr 1fr; }
  .session-observations { grid-template-columns: 1fr; }
  .calendar-review { grid-template-columns: 1fr; }
  .dosage-list article { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  #usage-map .school-pulse { animation: none; opacity: 0.35; }
}

.skip-link {
  position: fixed;
  z-index: 1000;
  top: 0.6rem;
  left: 0.6rem;
  transform: translateY(-160%);
  padding: 0.7rem 1rem;
  border-radius: 0.75rem;
  color: var(--white);
  background: var(--forest-deep);
}

.skip-link:focus { transform: translateY(0); }

.connection-banner {
  position: fixed;
  z-index: 900;
  inset: 0 0 auto;
  padding: 0.65rem 1rem;
  color: #5b3710;
  background: var(--maize-pale);
  text-align: center;
  font-size: 0.84rem;
  font-weight: 700;
  box-shadow: 0 4px 16px rgba(32, 40, 33, 0.12);
}

.auth-gate {
  position: relative;
  isolation: isolate;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
  background:
    linear-gradient(135deg, #fffaf0 0%, #f8f2e7 46%, #eef4ef 100%);
}

.auth-scene { position: absolute; inset: 0; z-index: -1; overflow: hidden; pointer-events: none; }
.auth-scene::before {
  content: "";
  position: absolute;
  inset: 0;
  opacity: 0.34;
  background-image: radial-gradient(circle, rgba(47, 103, 88, 0.22) 1.2px, transparent 1.3px);
  background-size: 28px 28px;
  mask-image: linear-gradient(115deg, #000, transparent 37%, transparent 68%, #000);
  animation: auth-pattern-drift 26s linear infinite;
}
.auth-aurora { position: absolute; width: 34rem; aspect-ratio: 1; border-radius: 50%; filter: blur(18px); opacity: 0.5; will-change: transform; }
.auth-aurora-one { top: -15rem; left: -10rem; background: radial-gradient(circle at 60% 55%, rgba(231, 183, 90, 0.72), rgba(230, 108, 85, 0.22) 42%, transparent 70%); animation: auth-aurora-one 18s ease-in-out infinite alternate; }
.auth-aurora-two { right: -12rem; bottom: -16rem; background: radial-gradient(circle at 40% 38%, rgba(29, 139, 145, 0.5), rgba(47, 103, 88, 0.22) 48%, transparent 72%); animation: auth-aurora-two 22s ease-in-out infinite alternate; }
.auth-route-line { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0.3; }
.auth-route-line path { fill: none; stroke: var(--forest); stroke-width: 2; stroke-linecap: round; stroke-dasharray: 4 14; vector-effect: non-scaling-stroke; animation: auth-route-flow 18s linear infinite; }
.auth-route-line circle { fill: var(--coral); stroke: rgba(255, 253, 247, 0.95); stroke-width: 4; vector-effect: non-scaling-stroke; filter: drop-shadow(0 0 8px rgba(230, 108, 85, 0.45)); }
.auth-tile { position: absolute; display: block; width: 3.2rem; height: 3.2rem; border: 1px solid rgba(255, 255, 255, 0.7); box-shadow: 0 18px 45px rgba(32, 40, 33, 0.12); will-change: transform; }
.auth-tile-one { top: 18%; left: 12%; border-radius: 0.35rem 1.3rem 0.35rem 0.35rem; background: rgba(29, 139, 145, 0.7); transform: rotate(13deg); animation: auth-tile-one 13s ease-in-out infinite; }
.auth-tile-two { right: 10%; bottom: 18%; width: 2.25rem; height: 4.3rem; border-radius: 0.45rem; background: rgba(230, 108, 85, 0.72); transform: rotate(-12deg); animation: auth-tile-two 15s ease-in-out infinite; }
.auth-tile-three { left: 16%; bottom: 15%; width: 5.4rem; height: 2.2rem; border-radius: 0.45rem; background: rgba(20, 47, 76, 0.74); transform: rotate(-5deg); animation: auth-tile-three 17s ease-in-out infinite; }
.auth-arrow { position: absolute; top: 17%; right: 18%; width: 3.5rem; height: 3.5rem; background: rgba(230, 108, 85, 0.82); clip-path: polygon(0 26%, 100% 0, 76% 100%, 55% 57%); filter: drop-shadow(0 14px 20px rgba(230, 108, 85, 0.18)); animation: auth-arrow-flight 16s ease-in-out infinite; }

.auth-card {
  position: relative;
  z-index: 1;
  width: min(100%, 31rem);
  padding: clamp(1.4rem, 5vw, 2.4rem);
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 1.8rem;
  background: rgba(255, 253, 247, 0.84);
  box-shadow: 0 28px 75px rgba(32, 40, 33, 0.16), inset 0 1px rgba(255, 255, 255, 0.8);
  backdrop-filter: blur(22px) saturate(1.08);
}

@keyframes auth-pattern-drift { to { background-position: 56px 28px; } }
@keyframes auth-route-flow { to { stroke-dashoffset: -180; } }
@keyframes auth-aurora-one { from { transform: translate3d(-3%, -2%, 0) scale(0.94); } to { transform: translate3d(18%, 16%, 0) scale(1.12); } }
@keyframes auth-aurora-two { from { transform: translate3d(5%, 4%, 0) scale(1); } to { transform: translate3d(-18%, -13%, 0) scale(1.12); } }
@keyframes auth-tile-one { 0%, 100% { transform: translate3d(0, 0, 0) rotate(13deg); } 50% { transform: translate3d(32px, -22px, 0) rotate(25deg); } }
@keyframes auth-tile-two { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-12deg); } 50% { transform: translate3d(-26px, -35px, 0) rotate(-3deg); } }
@keyframes auth-tile-three { 0%, 100% { transform: translate3d(0, 0, 0) rotate(-5deg); } 50% { transform: translate3d(38px, 20px, 0) rotate(4deg); } }
@keyframes auth-arrow-flight { 0%, 100% { transform: translate3d(0, 0, 0) rotate(4deg); } 50% { transform: translate3d(34px, -28px, 0) rotate(13deg); } }

.auth-card .dialog-brand { margin-bottom: 2rem; }
.auth-card > img { display: block; width: min(12rem, 58vw); height: auto; margin-bottom: 1.8rem; }
.auth-card h1 { margin: 0.15rem 0 0.55rem; font-size: clamp(2rem, 7vw, 3.15rem); line-height: 0.98; }
.auth-card > div > p:last-child { margin: 0 0 1.4rem; color: var(--muted); line-height: 1.55; }
.auth-card form { display: grid; gap: 0.95rem; }
.auth-card form > label:not(.auth-consent) { display: grid; gap: 0.35rem; color: var(--ink); font-size: 0.78rem; font-weight: 750; }
.auth-card input[type="email"], .auth-card input[type="password"], .auth-card input[type="text"] { width: 100%; padding: 0.85rem 0.95rem; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--paper-bright); }
.auth-consent { display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: start; color: var(--muted); font-size: 0.76rem; line-height: 1.45; }
.auth-consent input { margin-top: 0.18rem; accent-color: var(--forest); }
.auth-consent button, .auth-switch { padding: 0; border: 0; color: var(--forest-deep); background: transparent; font-weight: 750; text-decoration: underline; text-underline-offset: 0.18rem; }
.auth-switch { display: block; margin: 1.2rem auto 0; font-size: 0.8rem; }
.auth-legal-link { margin: 0.55rem 0 0; text-align: center; }
.auth-legal-link button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 0.7rem; text-decoration: underline; text-underline-offset: 0.18rem; }
.auth-legal-link button:hover { color: var(--forest-deep); }
.auth-message { min-height: 1.1rem; color: #a13b2a; font-size: 0.76rem; }

.account-layout { display: grid; gap: 1rem; max-width: 64rem; }
.account-identity, .privacy-panel, .password-panel, .privacy-actions, .master-entry, .privacy-request-status {
  border: 1px solid var(--line);
  border-radius: 1.3rem;
  background: rgba(255, 253, 247, 0.82);
  box-shadow: var(--shadow-card);
}
.account-identity { display: grid; grid-template-columns: auto 1fr auto; gap: 1rem; align-items: center; padding: 1.2rem; }
.account-monogram { display: grid; place-items: center; width: 3.4rem; height: 3.4rem; border-radius: 50%; color: var(--white); background: var(--forest); font-weight: 800; }
.account-identity div { display: grid; gap: 0.12rem; }
.account-identity strong { font-family: var(--serif); font-size: 1.55rem; }
.account-identity small { color: var(--muted); }
.account-identity b { width: max-content; margin-top: 0.25rem; padding: 0.25rem 0.5rem; border-radius: 999px; color: var(--forest-deep); background: var(--forest-pale); font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.07em; }
.privacy-panel { display: grid; grid-template-columns: 1fr auto; gap: 1.5rem; align-items: center; padding: 1.25rem; }
.privacy-panel h2, .password-panel h2, .master-entry h2 { margin: 0.1rem 0 0.35rem; font-family: var(--serif); font-size: 1.65rem; }
.privacy-panel p, .password-panel p, .master-entry p { margin: 0; color: var(--muted); line-height: 1.5; }
.password-panel { display: grid; grid-template-columns: 1.4fr repeat(3, minmax(0, 1fr)); gap: 0.9rem; align-items: end; padding: 1.25rem; }
.password-panel label { display: grid; gap: 0.35rem; color: var(--ink); font-size: 0.72rem; font-weight: 750; }
.password-panel input { min-width: 0; padding: 0.72rem 0.8rem; border: 1px solid var(--line); border-radius: 0.75rem; background: var(--paper-bright); }
.password-panel .form-actions { grid-column: 1 / -1; }
.password-panel #password-message { color: #a13b2a; font-size: 0.75rem; }
.privacy-switch { display: flex; gap: 0.65rem; align-items: center; font-size: 0.78rem; font-weight: 750; }
.privacy-switch input { width: 2.5rem; height: 1.35rem; accent-color: var(--forest); }
.privacy-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); overflow: hidden; }
.privacy-actions button { display: grid; gap: 0.28rem; padding: 1.1rem; border: 0; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: transparent; text-align: left; }
.privacy-actions button:nth-child(2n) { border-right: 0; }
.privacy-actions button:nth-last-child(-n + 2) { border-bottom: 0; }
.privacy-actions button:hover { background: rgba(223, 234, 229, 0.45); }
.privacy-actions small { color: var(--muted); line-height: 1.45; }
.privacy-actions .danger-action strong, .danger-link { color: #a13b2a; }
.master-entry { display: flex; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.25rem; background: linear-gradient(120deg, var(--forest-pale), var(--sky-pale)); }
.privacy-request-status { padding: 0.9rem 1rem; color: var(--forest-deep); font-size: 0.8rem; font-weight: 700; }

/* Planika 0.8 · formularios compactos y controles pedagógicos */
.section-intro h1 { font-size: clamp(1.6rem, 2vw, 2.15rem); }
.school-profile { width: 100%; max-width: none; grid-template-columns: repeat(3, minmax(0, 1fr)); }
.account-layout { width: 100%; max-width: none; }
.trial-pill.is-master { color: var(--forest-deep); background: var(--forest-pale); }

.profile-section-title,
.form-section-title {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 0.35rem;
  padding: 0.35rem 0 0.55rem;
  border-bottom: 1px solid var(--line);
}
.profile-section-title strong,
.form-section-title strong { font-family: var(--serif); font-size: 1.16rem; }
.profile-section-title small,
.form-section-title small,
.fieldset-help { margin: 0; color: var(--muted); font-size: 0.68rem; line-height: 1.5; }

.resource-count-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.7rem;
  margin: 0.85rem 0 1rem;
}
.resource-count-grid label { display: grid; gap: 0.35rem; }
.resource-count-grid label > span { font-size: 0.68rem; font-weight: 800; }
.resource-count-grid input { min-height: 2.6rem; }
.compact-fieldset { margin-top: 0.85rem; }

.methodology-phases,
.curriculum-picker,
.continuation-panel {
  margin-top: 1.15rem;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: rgba(255, 253, 247, 0.68);
}
.methodology-phases legend { padding: 0 0.2rem; }
.methodology-phases .choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 0.8rem; }
.methodology-phase-group { display: grid; align-content: start; gap: 0.4rem; padding: 0.8rem; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--paper-bright); }
.methodology-phase-group > strong { font-family: var(--serif); font-size: 1rem; }
.methodology-phase-group > small { color: var(--muted); font-size: 0.62rem; }
.methodology-phase-group label { position: relative; }
.methodology-phase-group input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.methodology-phase-group label span { display: flex; gap: 0.45rem; align-items: center; min-height: 2.5rem; padding: 0.55rem; border: 1px solid var(--line); border-radius: 0.62rem; font-size: 0.66rem; font-weight: 700; line-height: 1.35; }
.methodology-phase-group label span::before { flex: 0 0 auto; width: 0.72rem; height: 0.72rem; border: 1.5px solid #aaa99f; border-radius: 0.18rem; content: ""; }
.methodology-phase-group input:checked + span { border-color: var(--forest); color: var(--forest-deep); background: var(--forest-pale); }
.methodology-phase-group input:checked + span::before { border-color: var(--forest); background: var(--forest); box-shadow: inset 0 0 0 2px var(--forest-pale); }

.inline-select { display: grid; grid-template-columns: minmax(13rem, 1fr) minmax(15rem, 1.2fr); align-items: center; gap: 1rem; font-size: 0.72rem; font-weight: 800; }
.compact-file-drop { margin: 1rem 0 0; padding: 0.9rem; }
.compact-file-drop .file-illustration { width: 2.6rem; height: 2.6rem; }

.curriculum-picker { padding: 0; border: 0; background: transparent; }
.curriculum-options { display: grid; gap: 0.55rem; max-height: 24rem; margin-top: 0.85rem; padding-right: 0.35rem; overflow-y: auto; }
.curriculum-option { position: relative; display: block; }
.curriculum-option input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.curriculum-option > span { display: grid; gap: 0.35rem; padding: 0.85rem 0.9rem 0.85rem 2.8rem; border: 1px solid var(--line); border-radius: 0.8rem; background: var(--paper-bright); }
.curriculum-option > span::before { position: absolute; top: 1rem; left: 1rem; width: 0.85rem; height: 0.85rem; border: 1.5px solid #aaa99f; border-radius: 0.2rem; content: ""; }
.curriculum-option strong { font-size: 0.72rem; line-height: 1.45; }
.curriculum-option small { color: var(--muted); font-size: 0.67rem; line-height: 1.5; }
.curriculum-option em { color: var(--forest); font-size: 0.6rem; font-style: normal; font-weight: 750; }
.curriculum-option input:checked + span { border-color: var(--forest); background: var(--forest-pale); }
.curriculum-option input:checked + span::before { border-color: var(--forest); background: var(--forest); box-shadow: inset 0 0 0 2px var(--forest-pale); }
.empty-options { grid-column: 1 / -1; margin: 0; padding: 0.9rem; color: var(--muted); background: rgba(247, 242, 232, 0.55); border-radius: 0.7rem; font-size: 0.72rem; }
.choice-grid label.is-suggested span { box-shadow: inset 3px 0 0 var(--maize); }

.inline-annex { display: grid; width: min(100%, 23rem); min-height: 7.5rem; margin: 0.9rem auto 0; padding: 0.8rem; border: 1px solid rgba(47, 103, 88, 0.36); border-radius: 0.75rem; background: linear-gradient(145deg, var(--paper-bright), var(--forest-pale)); text-align: center; }
.inline-annex span { color: var(--forest); font-size: 0.58rem; font-weight: 900; letter-spacing: 0.09em; }
.inline-annex strong { margin: 0.35rem 0 0.6rem; font-size: 0.7rem; }
.inline-annex i { height: 0.28rem; margin: 0.18rem 10%; border-radius: 1rem; background: var(--line); }
.inline-annex b { width: 42%; height: 1.6rem; margin: 0.35rem auto 0; border: 1px solid var(--line); border-radius: 0.35rem; background: var(--paper); }

.password-field { position: relative; display: block; }
.password-field input { padding-right: 3.15rem !important; }
.password-field input::-ms-reveal,
.password-field input::-ms-clear { display: none; }
.password-field button { position: absolute; top: 50%; right: 0.55rem; display: grid; width: 2.2rem; height: 2.2rem; padding: 0; place-items: center; transform: translateY(-50%); border: 0; border-radius: 0.55rem; color: var(--forest-deep); background: transparent; }
.password-field button:hover { background: var(--forest-pale); }
.password-field svg { width: 1.25rem; fill: none; stroke: currentColor; stroke-width: 1.7; }

.auth-gate { height: 100dvh; min-height: 0; padding: 0.55rem; overflow: hidden; }
.auth-card { max-height: calc(100dvh - 1.1rem); padding: clamp(1rem, 2.4vh, 1.45rem); overflow: hidden; }
.auth-card > img { width: min(9.5rem, 46vw); margin-bottom: 0.7rem; }
.auth-card h1 { font-size: clamp(1.65rem, 4.2vh, 2.35rem); }
.auth-card > div > p:last-child { margin-bottom: 0.75rem; font-size: 0.78rem; line-height: 1.42; }
.auth-card form { gap: 0.58rem; }
.auth-card input[type="email"], .auth-card input[type="password"], .auth-card input[type="text"] { min-height: 2.65rem; padding-block: 0.6rem; }
.auth-consent { align-items: center; min-height: 1.5rem; }
.auth-consent input { width: 1.2rem; height: 1.2rem; min-height: 0; margin: 0; }
.auth-switch { margin-top: 0.7rem; }
.auth-legal-link { margin-top: 0.35rem; }

.button:active:not(:disabled),
.bottom-dock button:active,
.large-task:active { transform: translateY(0) scale(0.975); }
button:disabled { animation: loading-breathe 1.15s ease-in-out infinite; }
dialog[open] { animation: dialog-in 220ms cubic-bezier(.2,.8,.2,1) both; }
dialog::backdrop { animation: backdrop-in 180ms ease both; }
.form-step.is-active { animation: step-in 260ms cubic-bezier(.2,.8,.2,1) both; }

@keyframes dialog-in { from { opacity: 0; transform: translateY(14px) scale(0.985); } to { opacity: 1; transform: none; } }
@keyframes backdrop-in { from { background: rgba(32, 40, 33, 0); } to { background: rgba(32, 40, 33, 0.34); } }
@keyframes step-in { from { opacity: 0; transform: translateX(12px); } to { opacity: 1; transform: none; } }
@keyframes loading-breathe { 50% { opacity: 0.68; } }

@media (max-width: 980px) {
  .school-profile { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-count-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .methodology-phases .choice-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .resource-count-grid, .methodology-phases .choice-grid { grid-template-columns: 1fr 1fr; }
  .inline-select { grid-template-columns: 1fr; }
  .profile-section-title, .form-section-title { align-items: start; flex-direction: column; gap: 0.25rem; }
}

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

.master-security-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.master-security-grid > div { padding: 1.15rem; border: 1px solid var(--line); border-radius: 1.25rem; background: var(--paper-bright); box-shadow: var(--shadow-card); }
.master-security-grid .usage-list article { align-items: start; }
.master-security-grid .usage-list p { margin: 0.35rem 0 0; color: var(--muted); font-size: 0.74rem; }
.master-security-grid button, .document-actions button, .session-heading-actions button { border: 0; background: transparent; color: var(--forest-deep); font-size: 0.72rem; font-weight: 800; }
.master-user-info { min-width: 0; }
.demo-credit-editor { display: flex; flex-wrap: wrap; align-items: end; gap: 0.38rem; margin-top: 0.62rem; }
.demo-credit-editor label { display: grid; gap: 0.2rem; color: var(--muted); font-size: 0.56rem; font-weight: 850; text-transform: uppercase; letter-spacing: 0.08em; }
.demo-credit-editor input { width: 5.2rem; min-height: 2.1rem; padding: 0.35rem 0.5rem; border: 1px solid var(--line); border-radius: 0.55rem; color: var(--ink); background: var(--paper-bright); }
.master-security-grid .demo-credit-editor button { min-height: 2.1rem; padding: 0.35rem 0.58rem; border: 1px solid var(--line); border-radius: 0.55rem; background: var(--paper-bright); }
.master-security-grid .demo-credit-editor button[data-demo-credit-action="add"] { color: var(--paper-bright); background: var(--forest); }
.master-request-actions { display: flex; gap: 0.55rem; }

.document-actions { display: flex; gap: 0.8rem; justify-self: end; }
.document-actions button { padding: 0.35rem 0; }
.session-heading-actions { display: grid; gap: 0.25rem; justify-items: end; min-width: max-content; }
.session-heading-actions b { color: var(--forest-deep); font-size: 0.8rem; }
.session-heading-actions button { padding: 0; text-decoration: underline; text-underline-offset: 0.18rem; }
.copyright-check { display: grid; grid-template-columns: auto 1fr; gap: 0.8rem; align-items: start; margin-top: 1rem; padding: 1rem; border: 1px solid var(--maize); border-radius: 1rem; background: var(--maize-pale); }
.copyright-check input { margin-top: 0.2rem; accent-color: var(--forest); }
.copyright-check span { display: grid; gap: 0.2rem; }
.copyright-check small { color: #6f572a; line-height: 1.45; }

.feedback-dialog, .privacy-dialog { width: min(92vw, 48rem); border: 0; border-radius: 1.35rem; padding: 0; background: var(--paper-bright); box-shadow: var(--shadow-soft); }
.feedback-dialog form { max-height: 90dvh; display: grid; grid-template-rows: auto minmax(0, 1fr) auto; }
.feedback-body { overflow-y: auto; }
.legal-copy { max-height: 65dvh; overflow-y: auto; }
.legal-copy h3 { margin: 1.25rem 0 0.25rem; font-family: var(--serif); font-size: 1.35rem; }
.legal-copy p { margin: 0; color: var(--muted); line-height: 1.65; }
.legal-copy .legal-note { margin-top: 1.4rem; padding: 0.9rem; border-radius: 0.8rem; color: #6f572a; background: var(--maize-pale); }

/* Planika 0.9 · bienvenida, recorrido y movimiento visible */
.route-intro h1,
.section-intro h1 {
  font-size: clamp(2.05rem, 3.15vw, 2.75rem);
  line-height: 1.02;
}

.year-heading h2,
.panel-heading h2,
.guide-panel h2 {
  font-size: clamp(1.4rem, 2.15vw, 1.95rem);
  line-height: 1.08;
}

.app-view { animation: none; }
.app-view.view-entering { animation: planika-view-enter 440ms cubic-bezier(.16, .84, .28, 1) both; }

@keyframes planika-view-enter {
  from { opacity: 0; transform: translateY(18px) scale(.992); filter: blur(2px); }
  to { opacity: 1; transform: translateY(0) scale(1); filter: blur(0); }
}

button,
.button,
.large-task,
.document-row,
.continue-panel,
.guide-panel,
.year-map {
  transition: transform 220ms cubic-bezier(.2, .8, .2, 1), box-shadow 220ms ease, border-color 220ms ease, background-color 220ms ease, color 220ms ease;
}

button,
.button { position: relative; overflow: hidden; }
.large-task:hover,
.document-row:hover,
.continue-panel:hover,
.guide-panel:hover { transform: translateY(-4px); box-shadow: 0 18px 44px rgba(35, 52, 43, 0.12); }
.bottom-dock button.is-active svg { animation: dock-pop 360ms cubic-bezier(.2, .9, .25, 1.3) both; }

.button-ripple {
  position: absolute;
  z-index: 0;
  width: 0.75rem;
  height: 0.75rem;
  pointer-events: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.52);
  transform: translate(-50%, -50%) scale(0);
  animation: button-ripple 600ms ease-out forwards;
}

@keyframes button-ripple { to { opacity: 0; transform: translate(-50%, -50%) scale(18); } }
@keyframes dock-pop { 0% { transform: translateY(4px) scale(.86); } 100% { transform: none; } }

.first-use-welcome {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 1.25rem;
  margin-bottom: 1rem;
  padding: 1.2rem 1.3rem;
  border: 1px solid rgba(47, 103, 88, 0.28);
  border-radius: 1.25rem;
  background: linear-gradient(115deg, var(--forest-pale), rgba(244, 225, 176, 0.55));
  box-shadow: var(--shadow-card);
  animation: welcome-in 560ms 120ms cubic-bezier(.16, .84, .28, 1) both;
}
.first-use-welcome[hidden] { display: none; }
.first-use-welcome h2 { margin: 0 0 0.28rem; font-family: var(--serif); font-size: 1.65rem; }
.first-use-welcome p { margin: 0; color: var(--muted); line-height: 1.5; }
.welcome-mark { position: relative; display: grid; width: 3.5rem; height: 3.5rem; place-items: center; border-radius: 1rem; color: var(--paper-bright); background: var(--forest); box-shadow: 0 10px 24px rgba(47, 103, 88, 0.2); }
.welcome-mark span { font-family: var(--serif); font-size: 1.45rem; font-weight: 800; }
.welcome-mark i, .welcome-mark b { position: absolute; right: -0.3rem; width: 0.75rem; height: 0.75rem; border: 2px solid var(--paper-bright); border-radius: 50%; background: var(--maize); }
.welcome-mark i { top: 0.45rem; }
.welcome-mark b { bottom: 0.45rem; background: var(--coral); }
.welcome-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: flex-end; }

@keyframes welcome-in { from { opacity: 0; transform: translateY(-12px) scale(.985); } to { opacity: 1; transform: none; } }

.tour-layer { position: fixed; inset: 0; z-index: 5000; }
.tour-layer[hidden] { display: none; }
.tour-spotlight {
  position: fixed;
  z-index: 5001;
  border: 2px solid var(--maize);
  border-radius: 1rem;
  background: transparent;
  box-shadow: 0 0 0 9999px rgba(24, 34, 29, 0.68), 0 0 0 6px rgba(255, 253, 247, 0.94), 0 16px 48px rgba(0, 0, 0, 0.26);
  pointer-events: none;
  transition: left 150ms ease-out, top 150ms ease-out, width 150ms ease-out, height 150ms ease-out, opacity 100ms ease;
  animation: tour-pulse 1.8s ease-in-out infinite;
}
.tour-card {
  position: fixed;
  z-index: 5002;
  width: min(23rem, calc(100vw - 2rem));
  padding: 1.15rem;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 1.15rem;
  color: var(--ink);
  background: var(--paper-bright);
  box-shadow: 0 26px 80px rgba(11, 25, 18, 0.3);
  transition: opacity 160ms ease, transform 220ms ease;
  animation: tour-card-in 300ms cubic-bezier(.2, .85, .25, 1) both;
}
.tour-layer.is-changing .tour-card,
.tour-layer.is-changing .tour-spotlight { opacity: 0; }
.tour-card header, .tour-card footer { display: flex; align-items: center; justify-content: space-between; gap: 0.75rem; }
.tour-card header span { color: var(--forest); font-size: 0.68rem; font-weight: 900; letter-spacing: 0.08em; text-transform: uppercase; }
.tour-card header button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: 0.72rem; font-weight: 750; }
.tour-card h2 { margin: 1rem 0 0.5rem; font-family: var(--serif); font-size: 1.7rem; line-height: 1.05; }
.tour-card p { margin: 0 0 1.1rem; color: var(--muted); font-size: 0.86rem; line-height: 1.58; }
.tour-card footer { justify-content: flex-end; }
.tour-card footer .button { min-width: 6.4rem; }
.tour-launcher { color: var(--forest-deep); background: var(--forest-pale); }
.tour-launcher svg { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

@keyframes tour-card-in { from { opacity: 0; transform: translateY(10px) scale(.97); } to { opacity: 1; transform: none; } }
@keyframes tour-pulse { 50% { border-color: var(--coral); } }

.brand-button strong {
  color: #080b09;
  font-family: var(--sans);
  font-weight: 950;
  letter-spacing: -0.055em;
}
.trial-pill.is-demo { color: #6d4318; background: var(--maize-pale); }

.demo-account-panel {
  display: grid;
  grid-template-columns: minmax(15rem, 0.65fr) minmax(0, 1.35fr);
  gap: 1.25rem;
  padding: 1.25rem;
  border: 1px solid rgba(47, 103, 88, 0.24);
  border-radius: 1.25rem;
  background: linear-gradient(120deg, var(--forest-pale), rgba(255, 253, 247, 0.86));
  box-shadow: var(--shadow-card);
}
.demo-account-panel h2 { margin: 0.08rem 0 0.35rem; font-family: var(--serif); font-size: 1.72rem; }
.demo-account-panel > div > p:last-child { margin: 0; color: var(--muted); line-height: 1.55; }
.demo-account-panel form { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0.75rem; }
.demo-account-panel form > label:not(.demo-privacy) { display: grid; gap: 0.35rem; color: var(--ink); font-size: 0.68rem; font-weight: 800; }
.demo-account-panel input { min-width: 0; min-height: 2.7rem; padding: 0.65rem 0.75rem; border: 1px solid var(--line); border-radius: 0.72rem; background: var(--paper-bright); }
.demo-privacy { grid-column: 1 / -1; display: grid; grid-template-columns: auto 1fr; gap: 0.65rem; align-items: start; color: var(--muted); font-size: 0.7rem; line-height: 1.45; }
.demo-privacy input { width: 1.1rem; height: 1.1rem; min-height: 0; padding: 0; accent-color: var(--forest); }
.demo-account-panel .form-actions { grid-column: 1 / -1; }
.demo-account-panel #demo-account-message { color: #a13b2a; font-size: 0.72rem; }

@media (max-width: 760px) {
  .account-identity { grid-template-columns: auto 1fr; }
  .account-identity .button { grid-column: 1 / -1; }
  .privacy-panel, .password-panel, .master-entry { display: grid; grid-template-columns: 1fr; }
  .password-panel .form-actions { grid-column: auto; }
  .privacy-actions, .master-security-grid { grid-template-columns: 1fr; }
  .privacy-actions button, .privacy-actions button:nth-child(2n), .privacy-actions button:nth-last-child(-n + 2) { border-right: 0; border-bottom: 1px solid var(--line); }
  .privacy-actions button:last-child { border-bottom: 0; }
  .document-actions { grid-column: 2; justify-self: start; }
  .session-card header { align-items: start; }
  .session-heading-actions { justify-items: start; }
  .first-use-welcome { grid-template-columns: auto 1fr; align-items: start; }
  .welcome-actions { grid-column: 1 / -1; justify-content: stretch; }
  .welcome-actions .button { flex: 1; }
  .route-intro h1, .section-intro h1 { font-size: clamp(1.9rem, 8vw, 2.25rem); }
  .year-heading h2, .panel-heading h2, .guide-panel h2 { font-size: clamp(1.35rem, 6vw, 1.72rem); }
  .demo-account-panel { grid-template-columns: 1fr; }
  .demo-account-panel form { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 640px) {
  .tour-launcher { display: grid; }
  .tour-card { width: auto !important; }
  .tour-spotlight { border-radius: 0.8rem; }
  .demo-account-panel form { grid-template-columns: 1fr; }
}

/* Planika 0.11 beta · captura pedagógica, calendario propio y tema oscuro */
.choice-grid.categorized-choices .choice-category {
  grid-column: 1 / -1;
  margin: 0.35rem 0 0;
  padding: 0.5rem 0.7rem;
  border-left: 3px solid var(--forest);
  color: var(--forest-deep);
  background: color-mix(in srgb, var(--forest-pale) 64%, transparent);
  font-size: 0.7rem;
  font-weight: 850;
}
.choice-grid.categorized-choices .choice-category.needs-work {
  border-left-color: var(--coral);
  color: color-mix(in srgb, var(--coral) 78%, var(--ink));
  background: color-mix(in srgb, var(--coral-pale) 62%, transparent);
}

.curriculum-pair-list { display: grid; gap: 0.85rem; margin-top: 0.85rem; }
.curriculum-pair {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.35fr) auto;
  gap: 0.8rem;
  align-items: start;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: color-mix(in srgb, var(--paper-bright) 86%, var(--forest-pale));
  box-shadow: var(--shadow-card);
}
.curriculum-pair label { display: grid; gap: 0.4rem; }
.curriculum-pair label > span { color: var(--ink); font-size: 0.7rem; font-weight: 850; }
.curriculum-pair textarea { min-height: 6.2rem; }
.curriculum-remove { align-self: center; color: #a84738; white-space: nowrap; }
.curriculum-add { margin-top: 0.8rem; }

.material-review-note {
  display: grid;
  gap: 0.22rem;
  margin-top: 1.1rem;
  padding: 1rem;
  border: 1px solid color-mix(in srgb, var(--maize) 74%, var(--line));
  border-radius: 1rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--maize-pale) 78%, var(--paper-bright));
}
.material-review-note strong { font-size: 0.78rem; }
.material-review-note span { color: var(--muted); font-size: 0.7rem; line-height: 1.5; }

.date-field { position: relative; display: grid; }
.date-field input { padding-right: 3rem; cursor: pointer; }
.date-field button {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: grid;
  width: 2.15rem;
  height: 2.15rem;
  padding: 0;
  place-items: center;
  transform: translateY(-50%);
  border: 0;
  border-radius: 0.58rem;
  color: var(--forest-deep);
  background: var(--forest-pale);
}
.date-field button svg { width: 1.05rem; height: 1.05rem; }

.planika-date-picker {
  position: fixed;
  z-index: 2600;
  display: grid;
  gap: 0.7rem;
  padding: 0.85rem;
  border: 1px solid color-mix(in srgb, var(--forest) 34%, var(--line));
  border-radius: 1rem;
  color: var(--ink);
  background: color-mix(in srgb, var(--paper-bright) 94%, var(--forest-pale));
  box-shadow: 0 24px 70px rgba(20, 35, 28, 0.28);
  animation: date-picker-in 180ms cubic-bezier(.2, .85, .25, 1) both;
}
.planika-date-picker > header {
  display: grid;
  grid-template-columns: 2.3rem 1fr 2.3rem;
  align-items: center;
  gap: 0.45rem;
}
.planika-date-picker > header strong { text-align: center; text-transform: capitalize; font-family: var(--serif); font-size: 1.12rem; }
.planika-date-picker > header button {
  display: grid;
  width: 2.3rem;
  height: 2.3rem;
  padding: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  color: var(--forest-deep);
  background: var(--paper-bright);
  font-size: 1.35rem;
}
.planika-date-picker > header button:disabled { opacity: 0.35; animation: none; }
.date-picker-weekdays,
.date-picker-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0.28rem; }
.date-picker-weekdays span { color: var(--muted); text-align: center; font-size: 0.58rem; font-weight: 900; }
.date-picker-grid button {
  position: relative;
  display: grid;
  aspect-ratio: 1;
  min-width: 0;
  padding: 0;
  place-items: center;
  border: 1px solid transparent;
  border-radius: 0.62rem;
  color: var(--ink);
  background: transparent;
  font-size: 0.68rem;
  font-weight: 750;
}
.date-picker-grid button:hover:not(:disabled) { border-color: var(--forest); background: var(--forest-pale); }
.date-picker-grid button.outside-month { color: color-mix(in srgb, var(--muted) 48%, transparent); }
.date-picker-grid button.is-weekend { color: var(--muted); }
.date-picker-grid button.is-class-day::after,
.date-picker-grid button.is-non-class::after {
  position: absolute;
  right: 0.26rem;
  bottom: 0.2rem;
  width: 0.3rem;
  height: 0.3rem;
  border-radius: 50%;
  background: var(--forest);
  content: "";
}
.date-picker-grid button.is-non-class::after { background: var(--coral); }
.date-picker-grid button.is-today { border-color: var(--maize); }
.date-picker-grid button.is-selected { color: var(--white); background: var(--forest); box-shadow: 0 5px 14px color-mix(in srgb, var(--forest) 36%, transparent); }
.date-picker-grid button.outside-cycle { opacity: 0.2; }
.planika-date-picker > footer { display: grid; gap: 0.5rem; padding-top: 0.65rem; border-top: 1px solid var(--line); }
.planika-date-picker > footer p { min-height: 2rem; margin: 0; color: var(--muted); font-size: 0.62rem; line-height: 1.45; }
.date-picker-legend { display: flex; gap: 0.8rem; color: var(--muted); font-size: 0.58rem; }
.date-picker-legend span { display: flex; align-items: center; gap: 0.32rem; }
.date-picker-legend i { width: 0.45rem; height: 0.45rem; border-radius: 50%; background: var(--forest); }
.date-picker-legend i.non-class-day { background: var(--coral); }
.planika-date-picker > footer > button { justify-self: end; padding: 0; border: 0; color: var(--forest-deep); background: transparent; font-size: 0.62rem; font-weight: 850; text-decoration: underline; text-underline-offset: 0.16rem; }
@keyframes date-picker-in { from { opacity: 0; transform: translateY(7px) scale(.975); } to { opacity: 1; transform: none; } }

.pedagogical-mark { font-weight: 800; text-decoration-line: underline; text-decoration-thickness: 0.16em; text-underline-offset: 0.17em; }
.pedagogical-mark.axis { text-decoration-color: var(--coral); }
.pedagogical-mark.knowledge { text-decoration-color: #1d8b91; }
.pedagogical-activity-use { text-decoration-line: underline; text-decoration-color: var(--pedagogical-color, var(--maize)); text-decoration-thickness: 0.13em; text-underline-offset: 0.17em; }
.pedagogical-header-mark { color: var(--ink); font-weight: 850; text-decoration-line: underline; text-decoration-color: var(--pedagogical-color, var(--maize)); text-decoration-thickness: 0.16em; text-underline-offset: 0.18em; }

.theme-toggle { display: grid; place-items: center; color: var(--forest-deep); }
.theme-toggle svg { width: 1.15rem; height: 1.15rem; }
.dialog-theme-toggle { width: 2.4rem; height: 2.4rem; margin-left: auto; padding: 0; border: 1px solid var(--line); border-radius: 50%; background: var(--paper); }
.theme-icon-sun { display: none; }
html[data-theme="dark"] .theme-icon-moon { display: none; }
html[data-theme="dark"] .theme-icon-sun { display: block; }
.auth-theme-toggle {
  position: absolute;
  z-index: 3;
  top: 1rem;
  right: 1rem;
  width: 2.7rem;
  height: 2.7rem;
  padding: 0;
  border: 1px solid rgba(47, 103, 88, 0.2);
  border-radius: 50%;
  background: color-mix(in srgb, var(--paper-bright) 82%, transparent);
  box-shadow: var(--shadow-card);
  backdrop-filter: blur(14px);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --ink: #eff8f3;
  --muted: #a8beb4;
  --forest: #73bca6;
  --forest-deep: #9ad1c0;
  --forest-pale: #17382e;
  --paper: #07130e;
  --paper-bright: #0f2119;
  --line: #2d4b3f;
  --coral: #f27c66;
  --coral-pale: #482c28;
  --maize: #e9bd66;
  --maize-pale: #233a31;
  --sky: #87b8cb;
  --sky-pale: #223944;
  --white: #fffdf7;
  --shadow-soft: 0 22px 58px rgba(0, 0, 0, 0.34);
  --shadow-card: 0 12px 30px rgba(0, 0, 0, 0.23);
}
html[data-theme="dark"],
html[data-theme="dark"] body {
  background: #101713;
}
html[data-theme="dark"] body {
  background:
    radial-gradient(circle at 7% 2%, rgba(233, 189, 102, 0.09), transparent 26rem),
    linear-gradient(180deg, #131c17 0%, var(--paper) 100%);
}
html[data-theme="dark"] .topbar { border-color: rgba(115, 188, 166, 0.16); background: rgba(16, 23, 19, 0.9); }
html[data-theme="dark"] .auth-gate { background: linear-gradient(135deg, #111813 0%, #19231e 48%, #15231f 100%); }
html[data-theme="dark"] .auth-card { border-color: rgba(255, 255, 255, 0.08); background: rgba(24, 35, 30, 0.88); }
html[data-theme="dark"] .auth-scene::before { opacity: 0.2; }
html[data-theme="dark"] .auth-aurora-one { opacity: 0.3; }
html[data-theme="dark"] .auth-aurora-two { opacity: 0.42; }
html[data-theme="dark"] .school-profile,
html[data-theme="dark"] .document-row,
html[data-theme="dark"] .account-identity,
html[data-theme="dark"] .privacy-panel,
html[data-theme="dark"] .password-panel,
html[data-theme="dark"] .privacy-actions,
html[data-theme="dark"] .master-entry,
html[data-theme="dark"] .privacy-request-status,
html[data-theme="dark"] .bottom-dock { background: rgba(24, 35, 30, 0.88); }
html[data-theme="dark"] .step-progress,
html[data-theme="dark"] .review-body,
html[data-theme="dark"] .annual-settings,
html[data-theme="dark"] .plan-meta div,
html[data-theme="dark"] .dosage-list article { background: #141d18; }
html[data-theme="dark"] .plan-detail { color: #c8d1ca; }
html[data-theme="dark"] .generation-summary p:last-child { color: var(--muted); }
html[data-theme="dark"] .import-result { color: #c2d7cd; background: #20332b; }
html[data-theme="dark"] .template-readiness { background: rgba(16, 23, 19, 0.5); }
html[data-theme="dark"] .doc-state.coral { color: #ffab98; }
html[data-theme="dark"] .doc-state.template { color: #afd6e4; }
html[data-theme="dark"] .material-review-note { background: color-mix(in srgb, var(--forest-pale) 72%, var(--paper-bright)); }
html[data-theme="dark"] .admin-summary,
html[data-theme="dark"] .knowledge-panel,
html[data-theme="dark"] .reference-library,
html[data-theme="dark"] .usage-map-section,
html[data-theme="dark"] .usage-trend,
html[data-theme="dark"] .usage-breakdowns,
html[data-theme="dark"] .usage-private-lists,
html[data-theme="dark"] .demo-account-panel,
html[data-theme="dark"] .institutional-upload {
  border-color: var(--line);
  background: var(--paper-bright);
  color: var(--ink);
}
html[data-theme="dark"] .knowledge-panel,
html[data-theme="dark"] .demo-account-panel {
  background: linear-gradient(120deg, var(--forest-pale), var(--paper-bright));
}
html[data-theme="dark"] .admin-upload {
  border-color: color-mix(in srgb, var(--forest) 52%, transparent);
  background: color-mix(in srgb, var(--paper) 70%, transparent);
}
html[data-theme="dark"] .usage-summary > div {
  border-color: var(--forest-pale);
  background: transparent;
}
html[data-theme="dark"] .usage-map-wrap { background: #0c1c21; }
html[data-theme="dark"] #usage-map .map-sphere { fill: #10242b; }
html[data-theme="dark"] #usage-map .world-country {
  fill: #1c3b35;
  stroke: #0f2119;
}
html[data-theme="dark"] #usage-map .world-country.is-mexico { fill: #477f6e; }
html[data-theme="dark"] .reference-tags span,
html[data-theme="dark"] .feedback-meta span { color: var(--ink); }
html[data-theme="dark"] .admin-upload-status { color: #c6e4ee; }
html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder { color: #78867e; }
html[data-theme="dark"] .brand-button strong { color: var(--ink); }
html[data-theme="dark"] dialog::backdrop { background: rgba(4, 8, 6, 0.72); }
html[data-theme="dark"] .tour-spotlight { box-shadow: 0 0 0 9999px rgba(3, 7, 5, 0.78), 0 0 0 6px rgba(24, 35, 30, 0.96), 0 16px 48px rgba(0, 0, 0, 0.5); }
html[data-theme="dark"] .button-ripple { background: rgba(255, 255, 255, 0.28); }

@media (max-width: 760px) {
  .curriculum-pair { grid-template-columns: 1fr; }
  .curriculum-remove { justify-self: start; }
  .auth-theme-toggle { top: 0.65rem; right: 0.65rem; }
}

/* Planika 0.11 beta · perfil escolar y navegación móvil */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

.demo-feedback-launch:not([hidden]) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  min-height: 2.55rem;
  padding: 0.55rem 0.78rem;
  border: 1px solid rgba(47, 103, 88, 0.24);
  border-radius: 999px;
  color: var(--forest-deep);
  background: var(--forest-pale);
  font-size: 0.68rem;
  font-weight: 850;
  white-space: nowrap;
}
.demo-feedback-launch svg {
  width: 1.05rem;
  height: 1.05rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.school-profile {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1rem;
}
.school-form-section {
  min-width: 0;
  padding: 1.15rem;
  border: 1px solid rgba(47, 103, 88, 0.13);
  border-radius: 1.15rem;
  background: rgba(255, 253, 247, 0.68);
}
.school-field-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}
.school-form-section .profile-section-title {
  margin: 0;
  padding: 0 0 0.8rem;
  border-top: 0;
  border-bottom: 1px solid var(--line);
}
.school-form-section .profile-section-title > div {
  display: flex;
  align-items: center;
  gap: 0.65rem;
}
.section-index {
  display: grid;
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  place-items: center;
  border-radius: 0.58rem;
  color: var(--white);
  background: var(--forest);
  font-family: var(--sans);
  font-size: 0.68rem;
  font-weight: 900;
}
.school-choice-fieldset {
  margin: 1rem 0 0;
}
.school-choice-grid {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.signature-editor {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
}
.signature-editor.is-empty::before {
  content: "No se incluirán firmas adicionales.";
  display: block;
  padding: 0.85rem;
  border: 1px dashed var(--line);
  border-radius: 0.8rem;
  color: var(--muted);
  font-size: 0.72rem;
  text-align: center;
}
.signature-editor-card {
  display: grid;
  gap: 0.7rem;
  padding: 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0.9rem;
  background: var(--paper-bright);
}
.signature-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
}
.signature-card-heading strong {
  color: var(--forest-deep);
  font-size: 0.7rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}
.signature-card-heading button,
.signature-add-button {
  border: 0;
  color: var(--forest-deep);
  background: transparent;
  font-size: 0.7rem;
  font-weight: 850;
}
.signature-card-heading button {
  color: #9b4536;
  text-decoration: underline;
  text-underline-offset: 0.16rem;
}
.signature-card-fields {
  display: grid;
  grid-template-columns: minmax(8rem, 0.7fr) minmax(0, 1.15fr) minmax(0, 1fr);
  gap: 0.7rem;
}
.signature-card-fields label {
  display: grid;
  gap: 0.35rem;
}
.signature-card-fields label > span {
  font-size: 0.66rem;
  font-weight: 800;
}
.signature-add-button {
  width: max-content;
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1px dashed rgba(47, 103, 88, 0.45);
  border-radius: 0.72rem;
  background: rgba(223, 234, 229, 0.42);
}
.signature-fields {
  display: block;
}
.signature-fields .form-section-title {
  margin-bottom: 0;
}

html[data-theme="dark"] .school-form-section,
html[data-theme="dark"] .signature-editor-card {
  border-color: rgba(115, 188, 166, 0.18);
  background: rgba(24, 35, 30, 0.72);
}
html[data-theme="dark"] .demo-feedback-launch:not([hidden]),
html[data-theme="dark"] .signature-add-button {
  color: var(--ink);
  background: rgba(62, 105, 89, 0.35);
}

@media (max-width: 980px) {
  .school-field-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .school-choice-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .signature-card-fields { grid-template-columns: 1fr 1fr; }
  .signature-card-fields label:last-child { grid-column: 1 / -1; }
}

@media (max-width: 640px) {
  .app-shell { padding-bottom: calc(7rem + env(safe-area-inset-bottom)); }
  .topbar {
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.45rem;
    min-height: 4.3rem;
    padding: 0.55rem 0.75rem;
  }
  .brand-button { gap: 0; }
  .brand-button img { width: 2.35rem; height: 2.35rem; }
  .brand-button span { display: none; }
  .top-actions {
    min-width: 0;
    width: 100%;
    gap: 0.35rem;
    justify-content: flex-end;
  }
  .top-actions .quiet-icon,
  .top-actions .avatar,
  .demo-feedback-launch:not([hidden]) {
    flex: 0 0 auto;
    width: 2.42rem;
    height: 2.42rem;
    min-height: 2.42rem;
    padding: 0;
  }
  .demo-feedback-launch span { display: none; }
  .top-actions > .quiet-icon:not(.theme-toggle):not(.tour-launcher) { display: none; }
  .theme-toggle,
  .tour-launcher { display: grid; }

  .workspace { width: min(100% - 1rem, 1320px); }
  .school-view { padding-bottom: 1.5rem; }
  .school-profile {
    grid-template-columns: 1fr !important;
    gap: 0.85rem;
    padding: 0;
    border: 0;
    background: transparent;
  }
  .school-form-section {
    padding: 1rem;
    border-radius: 1rem;
    background: rgba(255, 253, 247, 0.82);
    box-shadow: 0 8px 22px rgba(43, 61, 51, 0.05);
  }
  .school-field-grid { grid-template-columns: 1fr; gap: 0.8rem; }
  .school-form-section .profile-section-title {
    align-items: stretch;
    flex-direction: column;
    gap: 0.45rem;
    padding-bottom: 0.75rem;
  }
  .school-form-section .profile-section-title > div { align-items: center; }
  .school-form-section .profile-section-title strong { font-size: 1.25rem; }
  .school-form-section .profile-section-title small { padding-left: 2.4rem; }
  .resource-count-grid { grid-template-columns: 1fr 1fr; gap: 0.65rem; }
  .resource-count-grid label > span { min-height: 2.25rem; align-content: end; }
  .school-choice-grid { grid-template-columns: 1fr 1fr; }
  .school-choice-grid span { min-height: 3rem; padding: 0.65rem 0.55rem; font-size: 0.66rem; }
  .custom-choice-adder { grid-template-columns: 1fr auto; }
  .custom-choice-adder button { min-width: 5.3rem; }

  .signature-card-fields { grid-template-columns: 1fr; }
  .signature-card-fields label:last-child { grid-column: auto; }
  .signature-editor-card { padding: 0.85rem; }
  .signature-add-button { width: 100%; min-height: 2.75rem; }
  .school-profile-actions {
    align-items: center;
    justify-content: center;
    padding: 0.8rem 0 calc(6.4rem + env(safe-area-inset-bottom));
    text-align: center;
  }
  .school-profile-actions .button {
    width: min(100%, 19rem);
    margin-inline: auto;
  }
  .bottom-dock {
    bottom: calc(0.55rem + env(safe-area-inset-bottom));
  }
  .tour-card {
    overflow-y: auto;
    overscroll-behavior: contain;
  }
}


/* Planika 0.11.0-beta.3 · cierre de configuración escolar */
.large-task.is-complete {
  border-color: rgba(47, 103, 88, 0.28);
  background: linear-gradient(145deg, #dceee7, #edf6f1);
  box-shadow: inset 0 0 0 1px rgba(47, 103, 88, 0.08);
}
.large-task.is-complete span { color: var(--forest-deep); }
.large-task.is-complete strong::after {
  content: "✓";
  display: inline-grid;
  width: 1.55rem;
  height: 1.55rem;
  margin-left: 0.55rem;
  place-items: center;
  border-radius: 50%;
  background: var(--forest);
  color: var(--white);
  font-family: var(--sans);
  font-size: 0.8rem;
  vertical-align: 0.18em;
}
.readiness-list button.is-complete { border-color: rgba(47, 103, 88, 0.28); background: var(--forest-pale); }
.readiness-list button.is-complete b { color: var(--forest-deep); }

.configuration-success-dialog { width: min(34rem, calc(100% - 2rem)); overflow: visible; }
.configuration-success-content { display: grid; justify-items: center; gap: 0.8rem; padding: clamp(1.5rem, 5vw, 2.4rem); text-align: center; }
.configuration-success-content h2 { max-width: 24rem; margin: 0; font-family: var(--serif); font-size: clamp(1.75rem, 6vw, 2.35rem); line-height: 1.08; }
.configuration-success-content > p:not(.overline) { max-width: 27rem; margin: 0; color: var(--muted); line-height: 1.55; }
.configuration-success-mark { display: grid; width: 4.5rem; height: 4.5rem; place-items: center; border-radius: 50%; background: var(--forest-pale); box-shadow: 0 14px 34px rgba(47, 103, 88, 0.18); }
.configuration-success-mark svg { width: 2.2rem; height: 2.2rem; fill: none; stroke: var(--forest); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.configuration-success-countdown { padding: 0.65rem 0.9rem; border-radius: 999px; background: var(--paper); color: var(--forest-deep) !important; font-size: 0.76rem; font-weight: 800; }
.configuration-success-actions { display: flex; width: 100%; gap: 0.7rem; justify-content: center; margin-top: 0.35rem; }
.configuration-success-actions .button { min-height: 3rem; }
html[data-theme="dark"] .large-task.is-complete { background: linear-gradient(145deg, rgba(47, 103, 88, 0.42), rgba(25, 58, 49, 0.7)); }

@media (max-width: 680px) {
  .configuration-success-dialog { width: calc(100% - 1.5rem); border-radius: 1.5rem; }
  .configuration-success-content { padding: 1.5rem 1.1rem 1.2rem; }
  .configuration-success-actions { flex-direction: column-reverse; }
  .configuration-success-actions .button { width: 100%; }
}


/* Planika 0.11.0-beta.5 · refinamiento de configuración */
.configuration-board { display: grid; gap: 1rem; }
.configuration-board-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; padding: 1rem 0 0.2rem; }
.configuration-board-heading h2 { margin: 0.15rem 0 0; font-family: var(--serif); font-size: clamp(1.7rem, 3vw, 2.35rem); }
.configuration-meter { display: grid; min-width: 12rem; gap: 0.2rem; text-align: right; }
.configuration-meter strong { color: var(--forest-deep); font-size: 1.15rem; }
.configuration-meter span { color: var(--muted); font-size: 0.68rem; }
.configuration-meter i { display: block; overflow: hidden; width: 100%; height: 0.42rem; border-radius: 999px; background: rgba(47,103,88,.12); }
.configuration-meter b { display: block; width: 0; height: 100%; border-radius: inherit; background: var(--forest); transition: width 300ms ease; }
.configuration-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 1rem; }
.config-task-card { position: relative; display: grid; min-height: 10.5rem; align-content: center; justify-items: start; padding: 1.4rem; border: 1px solid transparent; border-radius: 1.35rem; background: var(--forest-pale); text-align: left; transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease; }
.config-task-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-card); }
.config-task-card.warm { background: var(--coral-pale); }
.config-task-card.sky { background: var(--sky-pale); }
.config-task-card.optional { background: #eee9f3; }
.config-card-kicker { color: var(--forest); font-size: .7rem; font-weight: 850; letter-spacing: .1em; text-transform: uppercase; }
.config-task-card strong { max-width: 26rem; margin: .42rem 0; font-family: var(--serif); font-size: clamp(1.6rem, 3.5vw, 2.15rem); font-weight: 600; line-height: 1.05; }
.config-task-card small { max-width: 28rem; color: var(--muted); line-height: 1.45; }
.config-card-status { position: absolute; top: 1rem; right: 1rem; display: none; width: 2.75rem; height: 2.75rem; place-items: center; border-radius: 50%; background: var(--forest); color: var(--white); box-shadow: 0 8px 20px rgba(47,103,88,.22); font-size: 1.15rem; font-weight: 900; }
.config-task-card.is-complete { border-color: rgba(47,103,88,.28); background: linear-gradient(145deg,#dceee7,#edf6f1); }
.config-task-card.is-complete .config-card-status { display: grid; }
.configuration-create-panel { display: flex; align-items: center; justify-content: space-between; gap: 1.2rem; padding: 1.2rem 1.35rem; border: 1px solid rgba(47,103,88,.15); border-radius: 1.2rem; background: rgba(255,253,247,.78); }
.configuration-create-panel h2 { margin: .2rem 0; font-family: var(--serif); font-size: clamp(1.35rem,2.5vw,1.85rem); }
.configuration-create-panel p:last-child { margin: 0; color: var(--muted); }
.profile-hub-summary { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin-bottom: .8rem; padding: 1rem 1.2rem; border: 1px solid rgba(47,103,88,.15); border-radius: 1.1rem; background: rgba(255,253,247,.72); }
.profile-hub-summary h2 { margin: .15rem 0; font-family: var(--serif); font-size: 1.55rem; }
.profile-hub-summary p:last-child { margin: 0; color: var(--muted); }
.profile-hub-badge { padding: .55rem .8rem; border-radius: 999px; background: var(--coral-pale); color: #8d4334; font-size: .72rem; font-weight: 850; white-space: nowrap; }
.profile-hub-badge.is-complete { background: var(--forest-pale); color: var(--forest-deep); }
.profile-tabs { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .55rem; margin-bottom: 1rem; }
.profile-tabs button { display: grid; grid-template-columns: auto 1fr; grid-template-rows: auto auto; column-gap: .6rem; align-items: center; padding: .8rem; border: 1px solid var(--line); border-radius: .95rem; background: rgba(255,253,247,.72); text-align: left; }
.profile-tabs button > span { grid-row: 1 / 3; display: grid; width: 2rem; height: 2rem; place-items: center; border-radius: .65rem; background: var(--paper); color: var(--forest); font-size: .7rem; font-weight: 900; }
.profile-tabs button strong { font-size: .78rem; }
.profile-tabs button small { color: var(--muted); font-size: .62rem; }
.profile-tabs button.is-active { border-color: rgba(47,103,88,.35); background: var(--forest-pale); color: var(--forest-deep); }
.profile-tabs button.is-active > span { background: var(--forest); color: var(--white); }
.profile-panel { animation: view-reveal 280ms ease both; }
.profile-editor-form { display: grid; gap: 1rem; }
.group-profile-editor { display: grid; gap: 1rem; margin-top: 1rem; }
.group-profile-card { display: grid; gap: .9rem; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--paper-bright); }
.group-card-heading { display: flex; align-items: start; justify-content: space-between; gap: .8rem; padding-bottom: .7rem; border-bottom: 1px solid var(--line); }
.group-card-heading h3 { margin: .15rem 0 0; font-family: var(--serif); font-size: 1.35rem; }
.group-card-heading button { color: #9b4536; font-size: .7rem; font-weight: 850; text-decoration: underline; text-underline-offset: .15rem; }
.group-card-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: .75rem; }
.group-card-grid label { display: grid; gap: .35rem; }
.group-card-grid label > span { font-size: .66rem; font-weight: 800; }
.group-card-grid.textareas { grid-template-columns: repeat(3,minmax(0,1fr)); }
.group-grades-fieldset small { display: block; margin-top: .5rem; color: var(--muted); font-size: .68rem; }
.group-days-grid { grid-template-columns: repeat(5,minmax(0,1fr)); }
.group-add-button { margin-top: 1rem; }
.profile-information-note { margin-top: 1rem; padding: .9rem 1rem; border-left: 4px solid var(--forest); border-radius: .8rem; background: var(--forest-pale); }
.profile-information-note p { margin: .25rem 0 0; color: var(--muted); }
.saved-context-picker { display: grid; grid-template-columns: minmax(0,1fr) minmax(14rem,.6fr); gap: 1rem; align-items: end; margin-bottom: 1rem; padding: 1rem; border: 1px solid rgba(47,103,88,.18); border-radius: 1rem; background: var(--forest-pale); }
.saved-context-picker h3 { margin: .15rem 0; font-family: var(--serif); font-size: 1.45rem; }
.saved-context-picker p { margin: 0; color: var(--muted); }
.saved-context-picker label { display: grid; gap: .4rem; }
.saved-context-picker label > span { font-size: .68rem; font-weight: 850; }
.saved-context-note { grid-column: 1 / -1; padding-top: .55rem; border-top: 1px solid rgba(47,103,88,.15); font-size: .7rem; }
html[data-theme="dark"] .config-task-card.is-complete,
html[data-theme="dark"] .profile-tabs button.is-active { background: rgba(47,103,88,.38); }
html[data-theme="dark"] .configuration-create-panel,
html[data-theme="dark"] .profile-hub-summary,
html[data-theme="dark"] .profile-tabs button,
html[data-theme="dark"] .group-profile-card { background: rgba(24,35,30,.76); }

/* El estado completado ya no se coloca dentro del título */
.large-task.is-complete strong::after { content: none; display: none; }

@media (max-width: 820px) {
  .group-card-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .group-card-grid.textareas { grid-template-columns: 1fr; }
  .profile-tabs { grid-template-columns: repeat(2,minmax(0,1fr)); }
}
@media (max-width: 640px) {
  .configuration-board-heading { align-items: stretch; flex-direction: column; }
  .configuration-meter { min-width: 0; text-align: left; }
  .configuration-grid { grid-template-columns: 1fr; }
  .config-task-card { min-height: 9.5rem; padding: 1.15rem; }
  .config-card-status { top: .85rem; right: .85rem; width: 3rem; height: 3rem; font-size: 1.3rem; }
  .config-task-card.is-complete strong { padding-right: 3.2rem; }
  .configuration-create-panel { align-items: stretch; flex-direction: column; }
  .configuration-create-panel .button { width: 100%; }
  .profile-hub-summary { align-items: flex-start; }
  .profile-tabs { position: sticky; z-index: 6; top: 4.4rem; grid-template-columns: repeat(2,minmax(0,1fr)); gap: .45rem; overflow: visible; padding: .45rem 0; background: var(--paper); }
  .profile-tabs button { min-width: 0; grid-template-columns: auto 1fr; grid-template-rows: auto; justify-items: start; gap: .45rem; padding: .65rem .7rem; text-align: left; }
  .profile-tabs button > span { grid-row: auto; width: 1.7rem; height: 1.7rem; }
  .profile-tabs button strong { font-size: .72rem; line-height: 1.1; }
  .profile-tabs button small { display: none; }
  .group-card-grid { grid-template-columns: 1fr; }
  .group-days-grid { grid-template-columns: 1fr 1fr; }
  .saved-context-picker { grid-template-columns: 1fr; }
  .saved-context-note { grid-column: auto; }
}


/* Ajustes de legibilidad y selección del perfil docente */
.input-with-suffix {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.68rem;
  background: var(--paper-bright);
}
.input-with-suffix input {
  min-width: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.input-with-suffix b {
  display: grid;
  min-width: 3.2rem;
  place-items: center;
  border-left: 1px solid var(--line);
  color: var(--muted);
  background: var(--paper);
  font-size: 0.72rem;
  font-weight: 850;
}
.teacher-fields-grid span,
.teacher-disciplines-fieldset .choice-grid span { min-height: 3.35rem; }
.choice-fieldset .fieldset-help {
  margin: .2rem 0 .75rem;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.45;
}
.group-add-button { justify-self: center; min-width: min(100%, 16rem); }

@media (max-width: 760px) {
  .configuration-welcome {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
  .configuration-welcome .welcome-mark { width: 4rem; height: 4rem; }
  .configuration-welcome .welcome-copy,
  .configuration-welcome .welcome-actions { grid-column: 1; width: 100%; }
  .configuration-welcome .welcome-copy { text-align: center; }
  .configuration-welcome .welcome-copy p:last-child { max-width: 32rem; margin-inline: auto; }
  .configuration-welcome .welcome-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .configuration-welcome .welcome-actions .button { width: 100%; }
  .teacher-basic-grid { grid-template-columns: 1fr; }
}

@media (max-width: 430px) {
  .configuration-welcome .welcome-actions { grid-template-columns: 1fr; }
  .config-task-card { min-height: 8.75rem; }
  .config-task-card strong { font-size: clamp(1.55rem, 8vw, 1.95rem); }
  .profile-tabs { top: 4rem; }
}


/* Beta 6: brillo sutil, firmas con título y centro de configuración */
.configuration-welcome,
.config-task-card {
  overflow: hidden;
  isolation: isolate;
}

.configuration-welcome::after,
.config-task-card::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -45% auto -45% -35%;
  width: 22%;
  transform: skewX(-18deg) translateX(-220%);
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.52), transparent);
  filter: blur(2px);
  pointer-events: none;
  animation: planika-panel-shine 6.8s ease-in-out infinite;
}

.configuration-welcome > *,
.config-task-card > * { position: relative; z-index: 1; }

.config-task-card:nth-child(2)::after { animation-delay: 1.2s; }
.config-task-card:nth-child(3)::after { animation-delay: 2.2s; }
.config-task-card:nth-child(4)::after { animation-delay: 3.1s; }

@keyframes planika-panel-shine {
  0%, 48% { transform: skewX(-18deg) translateX(-260%); opacity: 0; }
  55% { opacity: .75; }
  72%, 100% { transform: skewX(-18deg) translateX(760%); opacity: 0; }
}

.signature-name-row {
  display: grid;
  grid-template-columns: minmax(7.4rem, .34fr) minmax(0, 1fr);
  gap: .75rem;
}

.signature-title-field select { text-transform: uppercase; }

.settings-layout { gap: 1rem; }
.settings-tabs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 1.15rem;
  background: rgba(255,253,247,.72);
}
.settings-tabs button {
  min-height: 2.8rem;
  padding: .65rem .8rem;
  border: 0;
  border-radius: .8rem;
  background: transparent;
  color: var(--muted);
  font-weight: 800;
}
.settings-tabs button.is-active {
  background: var(--forest);
  color: var(--white);
  box-shadow: 0 8px 18px rgba(47,103,88,.18);
}
.settings-panel { display: grid; gap: 1rem; }
.settings-card {
  display: grid;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: 1.2rem;
  background: rgba(255,253,247,.76);
}
.settings-card h2 { margin-bottom: .25rem; }
.settings-card > div > p:last-child { margin: 0; color: var(--muted); }
.accessibility-settings label,
.settings-card > label { display: grid; gap: .4rem; color: var(--ink); font-size: .75rem; font-weight: 750; }
.settings-card input,
.settings-card select { min-width: 0; width: 100%; padding: .76rem .82rem; border: 1px solid var(--line); border-radius: .78rem; background: var(--paper-bright); color: var(--ink); }
.settings-card .form-actions { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; }
.settings-card [role="alert"] { color: #a13b2a; font-size: .75rem; }
.signature-title-field select { width: 100%; }

html[data-text-size="large"] { font-size: 112.5%; }
html[data-contrast="high"] {
  --muted: #3f463f;
  --line: #777d75;
}
html[data-contrast="high"] input,
html[data-contrast="high"] select,
html[data-contrast="high"] textarea,
html[data-contrast="high"] button { border-color: #555d55; }

html[data-motion="reduced"] *,
html[data-motion="reduced"] *::before,
html[data-motion="reduced"] *::after {
  scroll-behavior: auto !important;
  animation-duration: .001ms !important;
  animation-iteration-count: 1 !important;
  transition-duration: .001ms !important;
}

@media (prefers-reduced-motion: reduce) {
  html[data-motion="system"] *,
  html[data-motion="system"] *::before,
  html[data-motion="system"] *::after {
    scroll-behavior: auto !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}

html[data-theme="dark"] .settings-tabs,
html[data-theme="dark"] .settings-card { background: rgba(31,42,37,.84); }

@media (max-width: 720px) {
  .signature-name-row { grid-template-columns: minmax(6.6rem, .38fr) minmax(0, 1fr); gap: .55rem; }
  .settings-tabs { grid-template-columns: 1fr 1fr; }
  .settings-card { padding: 1rem; }
}

@media (max-width: 390px) {
  .signature-name-row { grid-template-columns: 1fr; }
}
