@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/static/fonts/AtkinsonHyperlegible-Regular.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Atkinson Hyperlegible";
  src: url("/static/fonts/AtkinsonHyperlegible-Bold.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("/static/fonts/SourceSerif4-Semibold.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
:root {
  color-scheme: light;
  --paper: #F4F1EA;
  --surface: #FFFcf6;
  --ink: #1A1612;
  --muted: #3F3830;
  --line: #C9BBA6;
  --green: #12324A;
  --on-green: #FFFcf6;
  --soft: #E4EEF4;
  --amber: #8A4300;
  --red: #9B1C1C;
  --chip: #EBE3D4;
  --shadow: 0 10px 28px #12324A14;
  --radius: 22px;
  --family: #4A5A68;
  --sans: "Atkinson Hyperlegible", "Avenir Next", "Segoe UI", ui-sans-serif, system-ui, sans-serif;
  --serif: "Source Serif 4", "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  background: var(--paper);
  color: var(--ink);
}
html[data-theme="dark"] {
  color-scheme: dark;
  --paper: #12151A;
  --surface: #1C222A;
  --ink: #F4EFE6;
  --muted: #E8E0D2;
  --line: #3A4552;
  --green: #8EB6E0;
  --on-green: #10141A;
  --soft: #243140;
  --amber: #F0B15A;
  --red: #F0A098;
  --chip: #243140;
  --shadow: 0 10px 28px #00000050;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="auto"] {
    color-scheme: dark;
    --paper: #12151A;
    --surface: #1C222A;
    --ink: #F4EFE6;
    --muted: #E8E0D2;
    --line: #3A4552;
    --green: #8EB6E0;
    --on-green: #10141A;
    --soft: #243140;
    --amber: #F0B15A;
    --red: #F0A098;
    --chip: #243140;
    --shadow: 0 10px 28px #00000050;
  }
}
* { box-sizing: border-box; }
body {
  margin: 0;
  min-height: 100dvh;
  padding-left: env(safe-area-inset-left);
  padding-right: env(safe-area-inset-right);
}
body.menu-open { overflow: hidden; }
button, input, textarea, select { font: inherit; }
button, a, input, select, textarea, summary { touch-action: manipulation; }
button {
  cursor: pointer;
  min-height: 44px;
  background: var(--green);
  color: var(--on-green);
  border: 1px solid transparent;
  border-radius: 12px;
  padding: .65rem 1.1rem;
  font-weight: 700;
  line-height: 1.35;
  white-space: normal;
}
button:hover:not(:disabled) { filter: brightness(.94); }
button:disabled { opacity: .5; cursor: not-allowed; }
button.secondary { background: var(--surface); border-color: var(--line); color: var(--green); }
button.quiet { color: var(--green); background: transparent; text-decoration: underline; text-underline-offset: 4px; }
button.danger { background: var(--red); color: #fffaf2; }
a { color: var(--green); text-underline-offset: 3px; overflow-wrap: anywhere; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 4px; }
input, select, textarea {
  width: 100%;
  min-width: 0;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: .7rem .8rem;
  min-height: 46px;
}
textarea { resize: vertical; }
input[type=checkbox], input[type=radio] {
  width: 20px; height: 20px; min-height: 20px; flex: 0 0 20px; accent-color: var(--green);
}
label { display: flex; flex-direction: column; gap: .4rem; font-weight: 600; margin-bottom: 1rem; min-width: 0; overflow-wrap: anywhere; }
fieldset { padding: 0; margin: 0; border: 0; min-width: 0; }
legend { font-weight: 700; font-size: 1.12rem; margin-bottom: 1rem; padding: 0; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1, h2, .brand strong { font-family: var(--serif); }
h1 { font-weight: 600; font-size: clamp(1.85rem, 4.4vw, 2.7rem); letter-spacing: -.02em; line-height: 1.15; margin: .25rem 0 1rem; }
h2 { font-size: 1.2rem; line-height: 1.35; margin: 0 0 .85rem; font-weight: 600; }
h3 { font-size: 1.05rem; line-height: 1.35; margin: 0 0 .35rem; font-weight: 700; }
p { margin: .35rem 0 .9rem; }
.site-header {
  max-width: 1360px;
  margin: auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: calc(1.15rem + env(safe-area-inset-top)) 1.6rem 1rem;
}
.header-actions { display: flex; align-items: center; gap: .75rem; }
.logout-status { flex-basis: 100%; margin: 0; font-size: .875rem; color: var(--ink); overflow-wrap: anywhere; }
.menu-account { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding-block: .35rem .9rem; border-bottom: 1px solid var(--line); }
.menu-account .menu-link { flex: 1; }
.brand { display: flex; align-items: center; gap: .85rem; }
.brand strong { display: block; font-size: 1.05rem; }
.brand span:not(.brand-mark) { display: block; color: var(--muted); font-size: .85rem; }
.brand-mark { height: 46px; width: 46px; flex: 0 0 46px; border-radius: 15px; }
.local-badge, .badge {
  display: inline-block;
  padding: .28rem .7rem;
  border-radius: 999px;
  font-size: .76rem;
  background: var(--soft);
  color: var(--green);
  font-weight: 650;
}
.shell { max-width: 1360px; padding: 0 1.5rem; margin: auto; }
.tabs {
  display: flex;
  gap: .3rem;
  border-bottom: 1px solid var(--line);
  padding: .2rem 0 .7rem;
  margin-bottom: 1.6rem;
}
.tabs button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  padding: .7rem .3rem;
  font-weight: 600;
}
.tabs button[aria-selected=true] { background: var(--green); color: var(--on-green); }
.tabs .tab-secondary { display: none; }
/* Flat section navigation: chips reach sub-panels from a section tab. */
.section-chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.1rem; }
.section-chips a { display: inline-flex; align-items: center; min-height: 40px; padding: .4rem .9rem; border: 1px solid var(--line); border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 650; background: var(--surface); }
.section-chips a:hover { background: var(--soft); }
.section-chips a:focus-visible { outline: 3px solid #aa6137; outline-offset: 2px; }
/* The five-section dock is the identity; the legacy brand/note crowd it. */
.tabs .studio-nav-brand, .tabs .studio-nav-note { display: none; }
.brand-home { color: inherit; text-decoration: none; }
.brand-home:hover { text-decoration: underline; }
.section-heading { max-width: 760px; margin-bottom: 1.4rem; }
.section-heading > p:not(.eyebrow) { color: var(--muted); }
.eyebrow {
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: .7rem;
  font-weight: 750;
  color: var(--green);
  margin: 0 0 .5rem;
}
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
  min-width: 0;
  box-shadow: var(--shadow);
}
.card.accent, .ticket { background: var(--soft); border-color: transparent; }
.card.flash-card { border-left: 5px solid var(--family, var(--green)); }
.two-columns { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.15rem; }
.stack { display: grid; gap: .9rem; min-width: 0; }
.stack > .entry + .entry { border-top: 1px solid var(--line); padding-top: .9rem; }
.entry { min-width: 0; }
.muted, small { color: var(--muted); }
.notice {
  background: var(--chip);
  border-left: 3px solid var(--amber);
  padding: .85rem 1rem;
  border-radius: 0 10px 10px 0;
}
.status { font-size: .9rem; color: var(--muted); white-space: pre-wrap; }
.status:empty { display: none; }
.status.error { color: var(--red); border-left: 3px solid var(--red); padding: .65rem .9rem; background: color-mix(in srgb, var(--red) 10%, var(--surface)); }
.status.success { color: var(--green); }
.form-row { display: flex; align-items: flex-end; gap: 1rem; flex-wrap: wrap; }
.form-row > label { flex: 1 1 190px; }
.actions { display: flex; gap: .65rem; align-items: center; flex-wrap: wrap; margin: .7rem 0 1rem; }
.question-top { display: flex; gap: 1rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.question-card > h2 { font-size: 1.22rem; white-space: pre-wrap; margin-top: 1rem; }
.session-controls {
  display: flex; align-items: flex-end; flex-wrap: wrap; gap: .65rem 1rem;
  position: sticky; top: 0; z-index: 6;
  background: var(--surface);
  padding: .6rem 0; margin: 0 0 1.1rem;
  border-bottom: 1px solid var(--line);
}
.session-control { flex: 1 1 200px; margin-bottom: 0; }
.session-control > span { font-size: .82rem; font-weight: 650; color: var(--muted); }
.session-controls > button { align-self: flex-end; }
.session-navigation {
  display: flex; gap: .65rem; flex-wrap: wrap; align-items: center;
  position: sticky; top: 0; z-index: 5;
  background: var(--surface);
  padding: .6rem 0; margin: 0 0 1rem;
  border-bottom: 1px solid var(--line);
}
.session-navigation button:last-child { margin-left: auto; }
/* A learning question has one reading column; teaching and evidence open on demand. */
#panel-practice.is-studying div#session,
#panel-practice.is-studying div#session-context { max-width: 760px; }
#panel-practice #session-context { background: transparent; border: 0; padding: .25rem 0 .8rem; box-shadow: none; }
#session-context h1 { margin: 0; font: inherit; font-weight: 650; font-size: 1rem; flex: 1 1 16rem; }
#session-context #toggle-session-setup { padding-inline: .65rem; font-size: .82rem; }
#session .question-card { border-left: 1px solid var(--line); padding: clamp(1rem, 4vw, 2rem); }
#session .question-top { gap: .4rem 1rem; }
#session .question-top .eyebrow { margin: 0; font-size: .73rem; letter-spacing: .04em; text-transform: none; color: var(--muted); }
#session #question-state { font-size: .75rem; }
#session #question-prompt { font-size: clamp(1.25rem, 2.5vw, 1.65rem); line-height: 1.45; margin: 1.25rem 0 1.5rem; }
#session #answer-controls fieldset { margin: 0; }
#session #answer-controls legend { font-size: .85rem; font-weight: 450; color: var(--muted); margin-bottom: .75rem; }
#session .choice-label { padding: .85rem 1rem; border-radius: 12px; }
#session .answer-notes { border: 0; padding: .25rem 0; font-size: .85rem; color: var(--muted); }
#session .answer-notes summary { font-weight: 450; }
#session .question-actions { display: flex; align-items: center; gap: .65rem 1rem; flex-wrap: wrap; margin: .7rem 0 0; }
#session .question-actions #help-button { text-decoration: underline; text-underline-offset: .2em; font-size: .9rem; }
#session .question-help { margin: 1rem 0; padding: 1.1rem; border: 1px solid var(--line); border-radius: 16px; background: var(--paper); }
#session .question-help h3 { font-size: 1.05rem; margin: 0 0 .4rem; }
#session .help-intro { font-size: .85rem; margin: 0 0 .9rem; }
#session #hints:not(:empty) { margin: 1rem 0; gap: .5rem; }
#session #hints .hint { margin: 0; background: var(--surface); font-size: .95rem; }
#session .help-options { display: flex; flex-wrap: wrap; gap: .3rem .6rem; margin-top: .75rem; }
#session .help-options button { font-size: .85rem; text-align: left; padding-inline: .5rem; }
#session .help-reading { padding-top: .8rem; margin-top: .5rem; border-top: 1px solid var(--line); }
#session .help-reading h4 { margin: .4rem 0; }
#session .help-reading .prose { font-size: .94rem; }
#session .help-reveal { border-top: 1px solid var(--line); margin-top: .8rem; padding-top: .6rem; display: flex; flex-wrap: wrap; gap: .3rem .6rem; align-items: center; }
#session .help-reveal button { font-size: .85rem; padding-inline: .5rem; }
#session .help-reveal small { font-size: .76rem; }
#session .feedback h3 { margin-top: 0; font-size: 1.05rem; }
#session .feedback p:last-child { margin-bottom: 0; }
#session .session-navigation { justify-content: flex-end; align-items: center; margin: 0 0 1.2rem; padding: .6rem 0; }
#session .session-navigation #previous-question { margin-right: auto; }
#session .session-navigation button:last-child { margin-left: 0; }
#session .question-sources { border-top: 0; padding: .65rem 0 0; margin-top: .7rem; font-size: .8rem; }
#session .question-sources summary { color: var(--muted); font-weight: 450; }
#session .question-source { padding: .5rem 0; border-bottom: 1px solid var(--line); }
#session .question-source button { text-align: left; padding: .3rem 0; font-size: .85rem; overflow-wrap: anywhere; }
#session .question-source p { margin: .15rem 0 .35rem; }
#session #session-save-note { font-size: .75rem; }
#return-practice-tutor { margin-bottom: 1rem; }
@media (max-width: 480px) {
  #session-context h1 { flex-basis: 100%; }
  #panel-practice #session-context { gap: .1rem; }
  #session-context #toggle-session-setup { min-height: 36px; padding: .2rem 0; }
  #session .question-actions { gap: .5rem; }
  #session .question-actions button { flex: 1 1 auto; padding-inline: .75rem; }
  #session .help-options { flex-direction: column; align-items: flex-start; }
  #session .question-help { padding: .85rem; }
}
.prose { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.75; }
.citations { padding-top: .35rem; margin-bottom: 1rem; font-size: .83rem; }
.citation { display: flex; align-items: baseline; gap: .4rem; flex-wrap: wrap; margin: .3rem 0; }
.citation > span { min-width: 0; overflow-wrap: anywhere; }
.citation button { font-size: .8rem; min-height: 36px; padding: .35rem .5rem; }
.citation .missing { color: var(--amber); }
details { border-top: 1px solid var(--line); padding: 1rem 0; }
details.card { border-top: 1px solid var(--line); }
summary { cursor: pointer; font-weight: 650; min-height: 36px; }
.check-label, .choice-label { flex-direction: row; align-items: flex-start; font-weight: 450; gap: .75rem; }
.profile-readonly { margin: .35rem 0; color: var(--muted); font-size: .9rem; }
.profile-readonly strong { color: var(--text); font-weight: 600; }
.profile-interests-title { margin: 1.2rem 0 .35rem; font-size: 1.05rem; }
.interest-group { border: 1px solid var(--line); border-radius: 12px; padding: .75rem 1rem 1rem; margin: .75rem 0; }
.interest-group legend { font-weight: 650; padding: 0 .35rem; }
.interest-group .check-label { display: flex; margin: .35rem 0; }
.interest-group .check-label > span { min-width: 0; overflow-wrap: anywhere; }
.interest-group .interest-meta { color: var(--muted); font-size: .8rem; }
.choice-label { padding: .8rem; background: var(--paper); border: 1px solid var(--line); border-radius: 12px; }
.feedback { border-left: 4px solid var(--green); background: var(--soft); border-radius: 0 12px 12px 0; padding: 1rem; margin-top: 1rem; }
.feedback.needs-work { border-color: var(--amber); background: color-mix(in srgb, var(--amber) 12%, var(--surface)); }
.hint { background: var(--paper); padding: .8rem 1rem; border-radius: 12px; }
.source-image { display: block; width: 100%; height: auto; border: 1px solid var(--line); background: var(--surface); }
.viewer-actions { margin-bottom: 1rem; }
.tik-bar { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin: .35rem 0 1rem; }
.tik-bar label { flex: 1 1 16rem; margin-bottom: 0; }
.tik-bar button { flex: 0 0 auto; }
.viewer-card { max-width: none; }
.document-meta { font-size: .84rem; color: var(--muted); }
.danger-zone { border-color: color-mix(in srgb, var(--red) 35%, var(--line)); }
.review-row { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: .75rem; }
.count-line { font-weight: 650; }
footer {
  padding: 1.5rem 0 calc(2rem + env(safe-area-inset-bottom));
  color: var(--muted);
  font-size: .78rem;
  border-top: 1px solid var(--line);
  margin-top: 1.5rem;
}
dialog {
  width: min(520px, calc(100% - 2rem));
  max-height: 90dvh;
  overflow: auto;
  padding: 1.5rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--ink);
  background: var(--surface);
}
dialog::backdrop { background: #172d2580; }
.skip-link { position: fixed; top: -100px; left: 1rem; z-index: 10; background: var(--surface); padding: 1rem; }
.skip-link:focus { top: calc(1rem + env(safe-area-inset-top)); }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
[aria-busy=true] { cursor: progress; }

.pill-row, .chip-row { display: flex; flex-wrap: wrap; gap: .45rem; margin: 0 0 1rem; }
.pill, .chip {
  border: 1px solid var(--line);
  background: var(--chip);
  color: var(--ink);
  border-radius: 999px;
  min-height: 40px;
  padding: .4rem .85rem;
  font-weight: 650;
  font-size: .86rem;
}
.chip[aria-pressed="true"], .chip.is-selected {
  background: var(--green);
  color: var(--on-green);
  border-color: transparent;
}
.family-grid, .topic-grid, .source-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: .75rem;
  margin-bottom: 1.15rem;
}
.family-card, .topic-card, .source-grid > .card {
  text-align: left;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
  border-left: 5px solid var(--family);
  border-radius: 18px;
  min-height: 88px;
  box-shadow: var(--shadow);
}
.family-card.is-selected, .topic-card.is-selected { outline: 3px solid var(--amber); }
.family-card small, .topic-card small { display: block; color: var(--muted); font-weight: 500; }
.deck-card { border-style: dashed; }
.week-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: .55rem; margin-top: 1rem; }
.week-day {
  min-width: 0;
  min-height: 12rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  cursor: pointer;
}
.week-day.is-today { border-color: var(--green); }
.week-day.is-selected { outline: 3px solid var(--amber); outline-offset: 2px; }
.week-strip { display: none; gap: .4rem; flex-wrap: wrap; margin-top: .75rem; }
.week-strip-day { flex: 1 1 4.2rem; background: var(--surface); color: var(--green); border: 1px solid var(--line); }
.week-strip-day.is-selected { background: var(--green); color: var(--on-green); }
.plan-chip {
  margin: .35rem 0 0;
  padding: .35rem .45rem;
  border-radius: 8px;
  border-left: 4px solid var(--family);
  background: var(--surface);
  font-size: .78rem;
  font-weight: 650;
  line-height: 1.3;
}
.plan-chip.plan-own { --family: #3d6b7a; }
.plan-chip.plan-overlay { --family: var(--muted); font-weight: 500; }
.plan-class { border-left: 4px solid var(--family); padding-left: .85rem; }
.family-chemistry { --family: #c48a2a; }
.family-mathematics { --family: #8a6a2a; }
.family-anatomy { --family: #2a7a78; }
.family-histology { --family: #b45a6a; }
.family-cellbio, .family-biology { --family: #3c7a45; }
.family-physics { --family: #3a5fa8; }
.family-terminology { --family: #6b4aa8; }
.family-bioexam { --family: #3c7a45; }
.family-hungarian { --family: #c45a2a; }
.family-preventive { --family: #4a7a8a; }
.family-sport { --family: #5a6570; }
a.plan-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .65rem 1.1rem;
  border-radius: 12px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--green);
  text-decoration: none;
  font-weight: 650;
}
.empty-state { text-align: center; padding: 1.4rem 1rem; color: var(--muted); }
.empty-state svg { width: 72px; height: 72px; margin: 0 auto .7rem; display: block; }
.badge-wall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(168px, 1fr));
  gap: .75rem;
  margin: 0 0 1.4rem;
}
.sticker {
  text-align: left;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--family, var(--green));
  border-radius: 18px;
  padding: .9rem 1rem;
  min-height: 148px;
  box-shadow: var(--shadow);
}
.sticker.is-locked { opacity: .55; box-shadow: none; }
.sticker svg { width: 44px; height: 44px; display: block; margin-bottom: .55rem; }
.sticker h3 { font-size: .95rem; margin: 0 0 .35rem; }
.sticker p { font-size: .78rem; margin: 0; color: var(--muted); }
.badge-pop {
  position: sticky;
  top: calc(.4rem + env(safe-area-inset-top));
  z-index: 5;
  background: var(--soft);
  border: 1px solid var(--line);
  border-left: 5px solid var(--amber);
  border-radius: 18px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.badge-pop h2 { margin-bottom: .35rem; }
.coach {
  position: sticky;
  top: calc(.4rem + env(safe-area-inset-top));
  z-index: 4;
  background: var(--soft);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 1rem 1.15rem;
  margin-bottom: 1rem;
  box-shadow: var(--shadow);
}
.thread { border-left: 5px solid var(--green); }

@media (max-width: 900px) {
  body { padding-bottom: calc(4.75rem + env(safe-area-inset-bottom)); }
  .site-header { padding-left: 1rem; padding-right: 1rem; }
  .local-badge { display: none; }
  .shell { padding: 0 1rem; }
  .tabs {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 8;
    gap: .1rem;
    margin: 0;
    border-bottom: 0;
    border-top: 1px solid var(--line);
    background: var(--surface);
    padding: .3rem .3rem calc(.3rem + env(safe-area-inset-bottom));
  }
  .tabs button { font-size: .68rem; padding: .45rem .1rem; min-height: 48px; min-width: 44px; }
  .tabs { overflow-x: auto; }
  .week-grid { display: none; }
  .week-strip { display: flex; }
  .two-columns { grid-template-columns: minmax(0, 1fr); }
  .card { padding: 1.1rem; }
  .form-row > label { flex-basis: 100%; }
  .session-navigation button:last-child { margin-left: 0; }
  footer { border-top: 0; }
}
@media (max-width: 360px) {
  .site-header { gap: .5rem; }
  .menu-toggle { padding-left: .7rem; padding-right: .7rem; }
}
@media (prefers-reduced-motion: no-preference) {
  button, .card, .family-card, .topic-card, .coach, .sticker, .badge-pop { transition: background-color .16s ease, filter .16s ease, transform .16s ease, opacity .16s ease; }
  .tabs button[aria-selected=true] { transform: translateY(-1px); }
  .sticker:not(.is-locked) { animation: badge-pop .28s ease; }
  .badge-pop:not([hidden]) { animation: badge-pop .28s ease; }
}
@keyframes badge-pop {
  from { transform: scale(.94); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.quest-card h2 { margin-bottom: .4rem; }
.quest-steps { display: grid; gap: .55rem; margin-top: .85rem; }
.quest-step { text-align: left; justify-self: stretch; }
.quest-step.is-done { background: var(--green); color: var(--on-green); }
.bridge {
  --bridge-ink: #F4EFE6;
  --bridge-muted: #C9BBA6;
  --bridge-panel: #10141C;
  --bridge-panel-2: #1A2230;
  --bridge-amber: #F4A53A;
  --bridge-cyan: #4BA3C7;
  --bridge-ok: #7DCEA0;
  --bridge-line: #2A3648;
  background: var(--bridge-panel);
  color: var(--bridge-ink);
  border-radius: 28px;
  padding: 1.15rem 1.1rem 1.45rem;
  box-shadow: inset 0 0 0 1px #F4A53A33;
}
.bridge h1, .bridge h2, .bridge h3, .bridge h4 { color: var(--bridge-ink); }
.bridge .muted, .bridge .learner-hint, .bridge .document-meta { color: var(--bridge-muted); }
.bridge .card {
  background: var(--bridge-panel-2);
  color: var(--bridge-ink);
  border-color: var(--bridge-line);
  box-shadow: none;
}
.bridge .ticket, .bridge .quest-card { border-left-color: var(--bridge-amber); }
.bridge a.plan-link {
  background: #121926;
  border-color: #3A4A5C;
  color: var(--bridge-ink);
}
.bridge button.secondary, .bridge button.quiet {
  background: #121926;
  border-color: #3A4A5C;
  color: var(--bridge-ink);
  text-decoration: none;
}
.bridge-mast {
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  margin-bottom: 1.15rem;
}
.bridge-cap {
  width: 18px;
  min-height: 78px;
  background: var(--bridge-amber);
  border-radius: 0 14px 14px 0;
}
.bridge-stardate {
  margin: .2rem 0 0;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--bridge-amber);
}
.bridge-status { display: grid; gap: .4rem; justify-items: end; }
.bridge-light {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: .2rem .75rem .2rem 1.55rem;
  border-radius: 999px;
  background: #121926;
  color: var(--bridge-muted);
  font-size: .78rem;
  font-weight: 700;
  position: relative;
}
.bridge-light::before {
  content: "";
  position: absolute;
  left: .55rem;
  width: .55rem;
  height: .55rem;
  border-radius: 50%;
  background: #5A6570;
}
.bridge-light.is-on { color: var(--bridge-ink); }
.bridge-light.is-on::before { background: var(--bridge-ok); box-shadow: 0 0 0 3px #7DCEA033; }
.bridge-mission { margin-bottom: 1.1rem; }
.bridge-rail, .bridge-log {
  position: relative;
  margin: 0 0 1.25rem;
  padding: .2rem 0 .2rem 1.35rem;
  border-left: 4px solid var(--bridge-amber);
}
.bridge-rail-item, .bridge-log-row {
  position: relative;
  margin: 0 0 .95rem;
  padding: .75rem .85rem;
  background: var(--bridge-panel-2);
  border-radius: 4px 18px 18px 4px;
}
.bridge-rail-item::before, .bridge-log-row::before {
  content: "";
  position: absolute;
  left: calc(-1.35rem - 7px);
  top: 1rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--bridge-cyan);
  box-shadow: 0 0 0 3px var(--bridge-panel);
}
.bridge-rail-item.is-now::before {
  background: var(--bridge-amber);
  box-shadow: 0 0 0 4px #F4A53A44;
}
.bridge-rail-item.is-past { opacity: .55; }
.bridge-rail-item.is-next {
  outline: 2px solid var(--bridge-amber);
  outline-offset: 2px;
}
.bridge-hero .actions { margin-top: .7rem; }
.bridge-more-families { margin-top: 1rem; }
.bridge-more-families summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--bridge-cyan, var(--green));
}
.bridge-lane-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(16.8rem, 1fr));
  gap: .85rem;
  margin-top: .75rem;
}
.bridge-lane {
  background: var(--bridge-panel-2);
  border-radius: 18px 6px 18px 6px;
  padding: .95rem;
  border-top: 6px solid var(--family, var(--bridge-amber));
}
.bridge-lane .actions, .bridge-rail-item .actions { display: flex; flex-wrap: wrap; gap: .45rem; }
.bridge-later { margin: 0 0 1.25rem; }
.bridge-later-item {
  margin: 0 0 .65rem;
  padding: .7rem .85rem;
  background: var(--bridge-panel-2);
  border-radius: 4px 16px 16px 4px;
  border-left: 4px solid var(--family, var(--bridge-cyan));
}
.bridge-log-day { margin: 0 0 1rem; }
.bridge-log-day h3 { margin: 0 0 .55rem; font-size: 1rem; }
.bridge-log-row h4 { margin: 0 0 .25rem; font-size: 1rem; }
@media (max-width: 900px) {
  .bridge-mast { grid-template-columns: 12px minmax(0, 1fr); }
  .bridge-status { justify-items: start; grid-column: 1 / -1; }
  .bridge-cap { min-height: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  .bridge-light.is-on::before { box-shadow: none; }
}
.thread-docs { display: grid; gap: .2rem; margin-top: .4rem; }
.thread-docs button { justify-self: start; }
.week-ring { display: flex; gap: .45rem; margin: 0 0 1rem; }
.bridge .week-ring { margin-top: .2rem; }
.quest-tick { color: var(--green); font-weight: 700; }
.evening-note, .hu-walk { margin-top: 1rem; }
.evening-note textarea { width: 100%; min-height: 4.5rem; }
.motion-reveal, .motion-planes { margin-top: .55rem; }
.motion-planes { display: flex; flex-wrap: wrap; gap: .45rem; }
.motion-beat { margin-top: .45rem; }
.ring-day {
  flex: 1;
  min-height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  font-weight: 700;
  background: var(--surface);
}
.ring-day.is-tried { background: var(--green); color: var(--on-green); border-color: transparent; }
.ring-day.is-today { outline: 2px solid var(--amber); outline-offset: 2px; }
.meter { display: block; width: 100%; height: .55rem; color: var(--green); margin-top: .45rem; }
.learner-hint { color: var(--muted); line-height: 1.6; }
.operator-note { display: none !important; }
.menu-toggle {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  min-width: 44px;
  background: var(--surface);
  color: var(--ink);
  border: 1px solid var(--line);
}
.menu-toggle-bars,
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  display: block;
  width: 1.15rem;
  height: 2px;
  background: currentColor;
  border-radius: 2px;
  position: relative;
}
.menu-toggle-bars::before,
.menu-toggle-bars::after {
  content: "";
  position: absolute;
  left: 0;
}
.menu-toggle-bars::before { top: -.38rem; }
.menu-toggle-bars::after { top: .38rem; }
.menu-backdrop {
  position: fixed;
  inset: 0;
  z-index: 20;
  background: #12151A66;
}
.app-menu {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 21;
  width: min(26rem, 100%);
  height: 100dvh;
  overflow: auto;
  padding: calc(1rem + env(safe-area-inset-top)) 1.2rem calc(1.4rem + env(safe-area-inset-bottom));
  background: var(--surface);
  color: var(--ink);
  border-left: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.menu-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.menu-label {
  margin: 1.15rem 0 .35rem;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--muted);
}
.menu-group { display: grid; }
.menu-link {
  display: flex;
  align-items: center;
  min-height: 44px;
  padding: .45rem .2rem;
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
}
.menu-link-strong { color: var(--green); }
.contact-list { display: grid; gap: .75rem; margin: 0 0 1rem; }
.contact-list div { display: grid; gap: .2rem; }
.contact-list dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.contact-list dd { margin: 0; font-weight: 700; }
.contact-copy { font-size: 1.02rem; }
.qr-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
.qr-item {
  margin: 0;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--paper);
  text-align: center;
}
.qr-item figcaption { font-size: .8rem; font-weight: 700; margin-bottom: .55rem; color: var(--ink); }
.qr-box {
  width: 100%;
  aspect-ratio: 1;
  color: #1A1612;
  background: #fff;
  border-radius: 8px;
  padding: .45rem;
}
.qr-box svg { display: block; width: 100%; height: 100%; }
.studio-card { overflow: hidden; }
.motion { margin: 1rem 0 0; }
.motion-svg { width: 100%; max-width: 28rem; height: auto; display: block; }
.motion-svg .flask, .motion-svg .wire, .motion-svg .body, .motion-svg .membrane { fill: none; stroke: var(--green); stroke-width: 3; }
.motion-svg .fill { fill: color-mix(in srgb, var(--green) 45%, var(--soft)); }
.motion-svg .fill-a { animation: rise 2.8s ease-in-out infinite alternate; transform-origin: center bottom; }
.motion-svg .fill-b { animation: rise 2.8s ease-in-out infinite alternate-reverse; }
.motion-svg .flow, .motion-svg .plane { fill: none; stroke: var(--amber); stroke-width: 3; stroke-dasharray: 6 8; animation: dash 1.6s linear infinite; }
.motion-svg .scale { fill: var(--soft); }
.motion-svg .marker { fill: var(--green); }
.motion-svg .marker-b { animation: slide 2.4s ease-in-out infinite alternate; }
.motion-svg .organelle { fill: var(--soft); stroke: var(--green); stroke-width: 2; }
.motion-svg .organelle-n { animation: pulse 2s ease-in-out infinite; }
.motion-svg .organelle-m { animation: pulse 2s ease-in-out infinite 0.4s; }
.motion-svg .charge { fill: var(--amber); animation: ride 2.2s linear infinite; }
.motion-svg .charge-2 { animation-delay: .7s; }
.motion-svg .charge-3 { animation-delay: 1.4s; }
.motion-svg .layer { fill: color-mix(in srgb, var(--green) 18%, var(--surface)); stroke: var(--green); stroke-width: 2; animation: stack 2.6s ease-in-out infinite; }
.motion-svg .basal { fill: var(--amber); }
.motion-svg .phase { fill: var(--soft); stroke: var(--green); stroke-width: 2; }
.motion-svg .phase-1 { animation: pulse 1.8s ease-in-out infinite; }
.motion-svg .tile { fill: var(--soft); stroke: var(--green); stroke-width: 2; }
.motion-svg .tile-0 { animation: gather 2s ease-in-out infinite alternate; }
.motion-svg .tile-2 { animation: gather 2s ease-in-out infinite alternate-reverse; }
.motion-svg .ion { fill: var(--soft); stroke: var(--green); stroke-width: 3; }
.motion-svg .ion-b { animation: pulse 1.6s ease-in-out infinite; }
.motion-svg .bubble { fill: var(--soft); stroke: var(--green); stroke-width: 3; animation: pulse 2s ease-in-out infinite; }
.motion-svg text { font-size: 14px; font-weight: 700; fill: var(--ink); font-family: var(--sans); }
.word-cloud { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin-top: .85rem; }
.cloud-word {
  border: 1px solid var(--line);
  background: var(--soft);
  color: var(--ink);
  border-radius: 999px;
  padding: .35rem .8rem;
  min-height: 44px;
  font-weight: 700;
}
.cloud-word.is-open { background: var(--green); color: var(--on-green); }
.match-board { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; margin-top: .7rem; }
.match-col, .forge-tiles, .order-row { display: grid; gap: .45rem; }
.match-tile, .forge-tile, .order-tile { text-align: left; }
.forge-preview { font-weight: 700; font-size: 1.2rem; min-height: 2rem; }
@keyframes rise { from { transform: scaleY(.55); } to { transform: scaleY(1); } }
@keyframes dash { to { stroke-dashoffset: -28; } }
@keyframes slide { from { transform: translateX(0); } to { transform: translateX(78px); } }
@keyframes pulse { 50% { transform: scale(1.08); } }
@keyframes ride { from { transform: translateX(0); opacity: .2; } 20% { opacity: 1; } to { transform: translateX(180px); opacity: .2; } }
@keyframes stack { 50% { transform: translateY(-6px); } }
@keyframes gather { from { transform: translateX(0); } to { transform: translateX(8px); } }
.unit-chips { display: flex; flex-wrap: wrap; gap: .4rem; margin: .45rem 0 .2rem; }
.unit-chip {
  min-height: 40px;
  padding: .3rem .75rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--soft);
  font-weight: 650;
}
.quantity-row { display: grid; gap: .45rem; }
.reason-label.is-calc textarea { min-height: 5.5rem; }
.question-figure {
  margin: .75rem 0 1rem;
  padding: .85rem;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.question-figure svg { display: block; width: 100%; max-width: 28rem; height: auto; }
.tutor-turn { margin: 0 0 .85rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }
.tutor-turn .eyebrow { margin-bottom: .25rem; }
.cloze-row { display: flex; flex-wrap: wrap; gap: .55rem; align-items: center; margin: .6rem 0; }
.cloze-row input { flex: 1 1 10rem; min-height: 44px; }
.speak-word { min-height: 40px; }
@media (prefers-reduced-motion: reduce) {
  .motion-svg * { animation: none !important; }
}
@media print {
  .tabs, form, button, footer, .site-header, .coach, .app-menu, .menu-backdrop, .menu-toggle { display: none !important; }
  .card { break-inside: avoid; box-shadow: none; }
  body { background: white; padding: 0; }
  .shell { max-width: none; }
}

/* Authored schemas with hidden meanings: erst erinnern, dann aufdecken. */
.sketch { margin: 1rem 0 .4rem; }
.sketch-pad {
  display: block;
  width: 100%;
  max-width: 28rem;
  height: auto;
  aspect-ratio: 16 / 10;
  margin: .55rem 0;
  border: 1px dashed var(--line);
  border-radius: calc(var(--radius) / 2);
  background: var(--surface);
  touch-action: none;
  cursor: crosshair;
}
.figure-stage { position: relative; width: 100%; max-width: 28rem; margin: .55rem 0 .8rem; }
.figure-svg { width: 100%; height: auto; display: block; }
.figure-svg .fig-body, .figure-svg .fig-membrane { fill: none; stroke: var(--green); stroke-width: 3; }
.figure-svg .fig-limb, .figure-svg .fig-join { stroke: var(--green); stroke-width: 3; stroke-linecap: round; }
.figure-svg .fig-plane { fill: none; stroke: var(--amber); stroke-width: 2.5; stroke-dasharray: 7 7; }
.figure-svg .fig-basal { fill: var(--amber); }
.figure-svg .fig-cell, .figure-svg .fig-tile {
  fill: color-mix(in srgb, var(--green) 16%, var(--surface));
  stroke: var(--green);
  stroke-width: 2;
}
.figure-svg .fig-nucleus, .figure-svg .fig-nucleolus, .figure-svg .fig-ribo { fill: var(--green); }
.figure-svg .fig-organelle { fill: var(--soft); stroke: var(--green); stroke-width: 2; }
.figure-svg .fig-crista { fill: none; stroke: var(--green); stroke-width: 2.2; }
.figure-svg .fig-er-sheet { fill: color-mix(in srgb, var(--green) 30%, var(--surface)); stroke: var(--green); stroke-width: 1.6; }
.figure-svg .fig-label { font-size: 15px; font-weight: 700; fill: var(--ink); font-family: var(--sans); }
.figure-spots { position: absolute; inset: 0; }
.hotspot-dot {
  position: absolute;
  transform: translate(-50%, -50%);
  width: 1.7rem;
  height: 1.7rem;
  padding: 0;
  display: grid;
  place-items: center;
  border: 2px solid var(--green);
  border-radius: 50%;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.hotspot-dot.is-open { background: var(--amber); border-color: var(--amber); color: var(--on-green); }
.figure-legend { display: flex; flex-direction: column; gap: .4rem; margin-top: .2rem; max-width: 34rem; }
.hotspot-row {
  display: grid;
  grid-template-columns: 1.7rem 1fr;
  gap: .55rem;
  align-items: start;
  padding: .45rem .6rem;
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) / 2);
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  text-align: left;
  cursor: pointer;
}
.hotspot-row:hover { background: var(--soft); }
.hotspot-row.is-open { border-color: var(--amber); background: var(--soft); }
.hotspot-num { font-weight: 700; text-align: center; }

/* Cards Lernvisite writes herself, from the page she was reading. */
.own-card { margin-top: 1rem; border-top: 1px solid var(--line); padding-top: .8rem; }
.own-card summary { cursor: pointer; font-weight: 700; }
.own-card form { display: flex; flex-direction: column; gap: .55rem; margin-top: .7rem; }
.own-entry { border-left: 3px solid var(--green); padding-left: .8rem; }
.own-entry .own-answer { font-weight: 700; }

/* Semester shape, course rules, page task, constellation. */
.semester-band { display: flex; align-items: flex-end; gap: 4px; height: 6.5rem; margin: .8rem 0; }
.semester-week { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: .25rem; height: 100%; }
.semester-week small { max-width: 100%; overflow-wrap: anywhere; text-align: center; font-size: .62rem; color: var(--muted); }
.semester-bar { width: 100%; border-radius: 3px 3px 0 0; background: color-mix(in srgb, var(--green) 45%, var(--surface)); }
.semester-week.is-past .semester-bar { background: var(--chip); }
.semester-week.is-current .semester-bar { background: var(--amber); }
.semester-week.is-current small { font-weight: 700; color: var(--ink); }
@media (max-width: 44rem) {
  .semester-week small { display: none; }
  .semester-week.is-current small { display: block; }
}
.conflict-note { border-left: 3px solid var(--amber); }
.rule-row { display: grid; gap: .3rem; padding: .55rem 0; border-top: 1px solid var(--line); }
.rule-row.is-known { opacity: .82; }
.rule-row input { width: 100%; }
.illness-steps { margin: .2rem 0 .8rem 1.1rem; display: flex; flex-direction: column; gap: .35rem; }
.page-task textarea { width: 100%; margin: .5rem 0; }
.page-task-stage { margin: .6rem 0; }
.page-task-stage .source-image { max-width: 100%; height: auto; border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); }
.calc-doors { margin-top: .4rem; }
.cloud-speak { border: 1px solid var(--line); background: var(--surface); color: var(--ink); border-radius: 999px; padding: 0 .5rem; cursor: pointer; font-size: .9rem; }
.constellation { display: flex; flex-direction: column; gap: .6rem; margin-top: .6rem; }
.constellation-row { display: grid; gap: .2rem; }
.constellation-dots { display: flex; flex-wrap: wrap; gap: .3rem; align-items: center; min-height: 1rem; }
.constellation-dot { width: .7rem; height: .7rem; border-radius: 50%; background: var(--green); display: inline-block; }
.rule-title { font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.badge.is-done { opacity: .7; }
details.entry > summary { cursor: pointer; display: flex; flex-wrap: wrap; gap: .6rem; align-items: baseline; justify-content: space-between; }
.figure-page { width: 100%; height: auto; display: block; border: 1px solid var(--line); border-radius: calc(var(--radius) / 3); background: #fff; }

/* Runtime contact cards keep QR codes readable without dominating the page. */
#runtime-contacts .contact-card > svg { display:block; width:min(100%, 12rem); height:auto; margin-top:1rem; }

/* Karten: one card at a time; the front stays calm until the learner reveals. */
.karten-card .karten-front { font-size: 1.15rem; margin: .5rem 0 1rem; }
.karten-card .karten-back { border-top: 1px solid var(--line); padding-top: .8rem; margin-top: .6rem; }
.karten-ratings { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .5rem; margin: 1rem 0 .5rem; }
.karten-ratings button { min-height: 3rem; }
@media (max-width: 480px) { .karten-ratings { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.karten-tools { align-items: center; }
.karten-tools label { display: inline-flex; gap: .4rem; align-items: center; }
.karten-editor label { display: block; margin: .5rem 0; }
.karten-editor input, .karten-editor textarea { width: 100%; }
.karten-choices { border: 1px solid var(--line); border-radius: calc(var(--radius) / 2); padding: .5rem .75rem; }
.karten-history { font-size: .9rem; margin: .5rem 0 0 1.2rem; }
#karten-transfer { margin-top: 1rem; }
#karten-import-form label { display: block; margin: .5rem 0; }
#karten-import-form input[type="file"] { max-width: 100%; }
#karten-shared { margin-top: 1rem; }
.karten-shared-card { margin: .75rem 0; }
.karten-notice { border-left: 4px solid var(--accent, #146b5f); }

/* Profile identity and independently editable university accounts. */
.profile-identity { display:flex; gap:1.5rem; align-items:center; padding:1.5rem 0; border-bottom:1px solid var(--line, #d5dcd7); }
.profile-picture { width:88px; height:88px; flex:0 0 88px; border-radius:50%; overflow:hidden; background:#dcebe6; color:#22554a; display:grid; place-items:center; font-size:28px; }
.profile-picture img { width:100%; height:100%; object-fit:cover; }
.profile-identity-text { min-width:0; }
.profile-identity h2 { font-size:24px; margin:0 0 .4rem; overflow-wrap:anywhere; }
.profile-identity p { margin:.4rem 0; }
.profile-upload { position:relative; cursor:pointer; text-decoration:underline; text-underline-offset:4px; overflow:hidden; }
.profile-upload input { position:absolute; inset:0; opacity:0; cursor:pointer; width:100%; }
.profile-upload:focus-within { outline:2px solid currentColor; outline-offset:4px; }
.profile-editor { padding:1.5rem 0; }
.profile-editor > fieldset { border:0; padding:0; min-width:0; }
.profile-editor > fieldset > legend { font-size:20px; font-weight:650; margin-bottom:1rem; }
.profile-editor .form-row, .profile-accounts .form-row { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.profile-editor label, .profile-accounts label { min-width:0; }
.profile-editor input, .profile-editor select, .profile-accounts input { width:100%; box-sizing:border-box; min-width:0; }
.profile-disclosure { border-top:1px solid var(--line, #d5dcd7); padding:1rem 0; }
.profile-disclosure > summary { cursor:pointer; font-weight:600; padding:.3rem 0; overflow-wrap:anywhere; }
.profile-disclosure[open] > summary { margin-bottom:1rem; }
.profile-accounts { padding:1rem 0 1.5rem; }
.profile-accounts h2 { font-size:22px; margin-bottom:.4rem; }
.profile-accounts .actions { margin-top:1rem; flex-wrap:wrap; }
.profile-accounts .actions a { overflow-wrap:anywhere; }
#panel-me > .section-heading h1 { font-size:28px; }
#panel-me .profile-disclosure > .card { box-shadow:none; border-radius:0; }
#panel-me .profile-identity .status:empty { display:none; }
#panel-me > .section-heading { margin-bottom:0; }
.profile-academics { padding:1rem 0; border-top:1px solid var(--line, #d5dcd7); min-width:0; }
.profile-academics .form-row { display:grid; grid-template-columns:repeat(3,minmax(0,1fr)); gap:1rem; }
.profile-academics select, .profile-academics input[type="number"] { width:100%; min-width:0; }
.academic-offerings { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:1rem; }
.academic-offerings fieldset { min-width:0; border:0; padding:0; }
.academic-offerings legend { font-weight:600; overflow-wrap:anywhere; }
.academic-offerings .check-label { align-items:flex-start; }
.academic-offerings span { overflow-wrap:anywhere; }
@media(max-width:650px) { .profile-academics .form-row, .academic-offerings { grid-template-columns:minmax(0,1fr); } }
@media(max-width:560px) {
  .profile-identity { gap:1rem; align-items:flex-start; }
  .profile-picture { width:64px; height:64px; flex-basis:64px; }
  .profile-identity h2 { font-size:21px; }
  .profile-editor .form-row, .profile-accounts .form-row { grid-template-columns:minmax(0,1fr); }
}

/* Authored process diagrams: real labels, readable stills, optional motion. */
.workflow-diagram { list-style: none; display: flex; gap: 1.5rem; padding: 1.25rem 0; margin: 0; }
.workflow-step { position: relative; flex: 1; min-width: 0; display: flex; flex-direction: column; gap: .7rem; align-items: flex-start; padding: 1rem; border: 1px solid var(--line); border-radius: 1rem; background: var(--surface); }
.workflow-marker { display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border: 1px solid var(--green); border-radius: 50%; background: var(--soft); color: var(--green); font-size: .8rem; font-weight: 700; }
.workflow-label { font-weight: 650; overflow-wrap: anywhere; }
.motion-workflow .workflow-step:not(:last-child)::after { content: "→"; position: absolute; right: -1.2rem; top: 1.6rem; color: var(--green); }
.motion-levels .workflow-marker { width: .65rem; height: .65rem; border: 0; background: var(--green); }
.motion-toggle { margin: .5rem .75rem .5rem 0; }
@media (prefers-reduced-motion: no-preference) {
  .motion-workflow .workflow-marker { animation: workflow-emphasis var(--motion-cycle) linear infinite; animation-delay: var(--motion-delay); }
}
@keyframes workflow-emphasis { 0%, 20% { box-shadow: 0 0 0 5px color-mix(in srgb, var(--green) 13%, transparent); } 28%, 100% { box-shadow: 0 0 0 0 transparent; } }
.motion-paused *, .motion-paused *::before, .motion-paused *::after { animation-play-state: paused !important; }
@media (prefers-reduced-motion: reduce) { .motion-toggle { display: none; } .workflow-marker { animation: none !important; } }
@media (max-width: 620px) {
  .workflow-diagram { flex-direction: column; gap: 1.3rem; }
  .workflow-step { flex-direction: row; align-items: center; }
  .workflow-marker { flex-shrink: 0; }
  .motion-workflow .workflow-step:not(:last-child)::after { content: "↓"; top: auto; bottom: -1.25rem; left: 2.05rem; right: auto; }
}
