@font-face {
  font-family: GrindSerif;
  src: local("Georgia");
  font-display: swap;
}
:root {
  --canvas: #f6f3ec;
  --surface: #fffdf8;
  --ink: #14261c;
  --muted: #617067;
  --line: #dfd8c8;
  --accent: #0f7a55;
  --accent-hover: #096343;
  --mint: #8cddba;
  --soft: #e7efe7;
  --cover: #103e2e;
  --warning: #825b17;
  --danger: #a73831;
  --radius: 16px;
  --shadow: 0 8px 32px #14261c08;
  color-scheme: light;
}
html[data-theme="dark"] {
  --canvas: #0e1512;
  --surface: #16201b;
  --ink: #ecf2e9;
  --muted: #a6b9ad;
  --line: #34483b;
  --accent: #4ecb8f;
  --accent-hover: #7bdfac;
  --soft: #203a2c;
  --cover: #123c2d;
  --warning: #e4bf77;
  --danger: #ffa397;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  html[data-theme="system"] {
    --canvas: #0e1512;
    --surface: #16201b;
    --ink: #ecf2e9;
    --muted: #a6b9ad;
    --line: #34483b;
    --accent: #4ecb8f;
    --accent-hover: #7bdfac;
    --soft: #203a2c;
    --cover: #123c2d;
    --warning: #e4bf77;
    --danger: #ffa397;
    color-scheme: dark;
  }
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
  scroll-padding-top: 100px;
}
body {
  margin: 0;
  background: var(--canvas);
  color: var(--ink);
  font:
    15px/1.6 Arial,
    Helvetica,
    sans-serif;
}
a {
  color: inherit;
  text-decoration: none;
}
a:hover {
  color: var(--accent);
}
button,
input,
textarea,
select {
  font: inherit;
}
button,
a,
input,
select,
textarea {
  touch-action: manipulation;
}
button {
  cursor: pointer;
}
button:disabled {
  cursor: wait;
  opacity: 0.65;
}
img,
video,
iframe {
  max-width: 100%;
}
img {
  display: block;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1,
h2,
h3 {
  line-height: 1.16;
}
h1,
h2,
.serif {
  font-family: GrindSerif, Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -0.035em;
}
h1 {
  font-size: clamp(36px, 4vw, 56px);
  margin-bottom: 18px;
}
h2 {
  font-size: 30px;
  margin-bottom: 14px;
}
h3 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
}
p {
  margin-bottom: 16px;
}
small,
.small {
  font-size: 13px;
}
svg {
  flex-shrink: 0;
}
::selection {
  background: var(--mint);
  color: #14261c;
}
:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 4px;
}
.skip-link {
  position: fixed;
  top: -100px;
  left: 16px;
  background: var(--surface);
  padding: 12px;
  z-index: 100;
}
.skip-link:focus {
  top: 12px;
}
.site-header {
  height: 86px;
  border-bottom: 1px solid var(--line);
  background: var(--canvas);
  position: relative;
  z-index: 20;
}
.header-inner {
  max-width: 1296px;
  height: 100%;
  margin: auto;
  padding: 0 40px;
  display: flex;
  align-items: center;
  gap: 38px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 25px;
  font-weight: 700;
  letter-spacing: -1px;
  white-space: nowrap;
}
.brand-mark {
  display: grid;
  place-items: center;
  background: var(--accent);
  color: var(--canvas);
  width: 34px;
  height: 38px;
  border-radius: 5px 5px 12px 5px;
  font-family: Georgia, serif;
  font-size: 32px;
  line-height: 1;
}
.brand-os {
  font-weight: 400;
  color: var(--muted);
  font-size: 18px;
  letter-spacing: -0.5px;
}
.desktop-nav {
  display: flex;
  gap: 24px;
  align-items: center;
  flex: 1;
  font-size: 14px;
}
.desktop-nav a {
  position: relative;
  padding: 30px 0;
  white-space: nowrap;
}
.desktop-nav a[aria-current="page"] {
  color: var(--accent);
}
.desktop-nav a[aria-current="page"]:after {
  content: "";
  position: absolute;
  height: 3px;
  background: var(--accent);
  bottom: 0;
  left: 0;
  right: 0;
  border-radius: 3px;
}
.header-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}
.icon-button {
  background: none;
  border: 0;
  color: var(--ink);
  width: 40px;
  height: 44px;
  display: grid;
  place-items: center;
  position: relative;
}
.avatar {
  height: 38px;
  width: 38px;
  border-radius: 50%;
  background: var(--soft);
  display: grid;
  place-items: center;
  font-weight: 600;
  color: var(--accent);
}
.notification-dot {
  position: absolute;
  right: 7px;
  top: 9px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  border: 1px solid var(--canvas);
}
.header-caption {
  margin-left: auto;
  letter-spacing: 0.15em;
  font-size: 11px;
  color: var(--muted);
}
.menu-toggle,
.bottom-nav {
  display: none;
}
.mobile-menu {
  border-bottom: 1px solid var(--line);
  background: var(--surface);
  padding: 20px 24px;
}
.mobile-menu:not([hidden]) {
  display: grid;
  gap: 16px;
}
.page-shell {
  max-width: 1216px;
  min-height: calc(100vh - 230px);
  padding: 44px 0 64px;
  margin: auto;
}
.page-heading {
  display: flex;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 32px;
}
.page-heading p {
  color: var(--muted);
  max-width: 630px;
  margin: 0;
}
.eyebrow {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 16px;
}
.hero {
  background: var(--cover);
  color: #f4fbf5;
  padding: 42px 44px;
  border-radius: 20px;
  display: grid;
  grid-template-columns: 1fr 250px;
  gap: 50px;
  margin-bottom: 38px;
  position: relative;
  overflow: hidden;
}
.hero .eyebrow {
  color: var(--mint);
}
.hero h1 {
  max-width: 680px;
  font-size: clamp(38px, 4.7vw, 62px);
}
.hero h1 em {
  font-style: normal;
  color: var(--mint);
}
.hero p {
  color: #c2d8cd;
  max-width: 600px;
}
.hero .button {
  background: var(--mint);
  color: #103e2e;
  border-color: var(--mint);
}
.hero .button:hover {
  background: #c0f0d8;
}
.hero-aside {
  border-left: 1px solid #ffffff28;
  padding-left: 30px;
  display: flex;
  justify-content: center;
  flex-direction: column;
  align-items: flex-start;
}
.hero-aside .big-number {
  font:
    64px/1 Georgia,
    serif;
  color: var(--mint);
  margin: 12px 0;
}
.hero-aside p {
  font-size: 13px;
}
.hero .progress-track {
  background: #ffffff22;
  width: 100%;
}
.hero .progress-track span {
  background: var(--mint);
}
.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: 34px 0 20px;
}
.section-heading h2 {
  margin: 0;
}
.text-link {
  color: var(--accent);
  font-size: 14px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.muted {
  color: var(--muted);
}
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 46px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--canvas);
  padding: 11px 20px;
  border-radius: 9px;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  text-align: center;
}
.button:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
  color: var(--canvas);
}
.button.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
}
.button.secondary:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.button.danger {
  background: transparent;
  color: var(--danger);
  border-color: var(--danger);
}
.button.small {
  min-height: 40px;
  padding: 8px 14px;
  font-size: 13px;
}
.text-button {
  background: none;
  border: 0;
  color: var(--accent);
  padding: 0;
  text-align: left;
}
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
}
.stack {
  display: grid;
  gap: 22px;
}
.grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}
.grid.two {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: 28px;
  align-items: start;
}
.split.equal {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.card,
.panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  min-width: 0;
}
.card {
  display: flex;
  flex-direction: column;
}
.card .card-bottom {
  margin-top: auto;
  padding-top: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
}
.card p {
  font-size: 14px;
  color: var(--muted);
}
.card h3 {
  font:
    25px/1.2 Georgia,
    serif;
  letter-spacing: -0.025em;
}
.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 24px;
}
.module-number {
  color: var(--accent);
  font:
    30px/1 Georgia,
    serif;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border: 1px solid var(--line);
  background: var(--canvas);
  border-radius: 30px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  line-height: 1.5;
}
.pill.success,
.pill.accepted {
  background: var(--soft);
  color: var(--accent);
  border-color: transparent;
}
.pill.needs_revision,
.pill.warning {
  color: var(--warning);
}
.cover {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 10px;
  margin-bottom: 20px;
}
.progress-track {
  height: 5px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--line);
}
.progress-track span {
  height: 100%;
  display: block;
  background: var(--accent);
}
.notice {
  border-left: 3px solid var(--accent);
  background: var(--soft);
  padding: 16px 20px;
  border-radius: 0 8px 8px 0;
  margin-bottom: 22px;
  font-size: 14px;
}
.notice p:last-child {
  margin: 0;
}
.notice.warning {
  border-color: var(--warning);
}
.notice.error {
  border-color: var(--danger);
}
.empty-state {
  text-align: center;
  padding: 52px 24px;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.empty-state p {
  max-width: 490px;
  margin: 0 auto 18px;
  color: var(--muted);
  font-size: 14px;
}
.empty-state h2 {
  font-size: 28px;
}
.empty-mark {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: var(--soft);
  color: var(--accent);
  margin: 0 auto 20px;
}
.list {
  display: grid;
  gap: 0;
}
.list-row {
  display: flex;
  gap: 18px;
  align-items: center;
  padding: 20px 0;
  border-bottom: 1px solid var(--line);
}
.list-row:last-child {
  border-bottom: 0;
}
.list-row .grow {
  flex: 1;
  min-width: 0;
}
.list-row h3,
.list-row p {
  margin: 0;
}
.list-row p {
  font-size: 13px;
  color: var(--muted);
}
.list-row .index {
  font:
    22px Georgia,
    serif;
  color: var(--muted);
  min-width: 28px;
}
.breadcrumb {
  display: flex;
  gap: 9px;
  flex-wrap: wrap;
  font-size: 13px;
  color: var(--muted);
  margin-bottom: 28px;
}
.library-nav {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  margin: 0 0 28px;
  padding-bottom: 8px;
}
.library-nav a {
  position: relative;
  padding: 12px 18px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 15px;
  font-weight: 600;
  transition: background 150ms, color 150ms;
}
.library-nav a:hover {
  color: var(--ink);
  background: var(--surface);
}
.library-nav a[aria-current="page"] {
  color: var(--accent);
  background: var(--soft);
}
.library-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  bottom: -9px;
  left: 18px;
  right: 18px;
  height: 3px;
  border-radius: 3px;
  background: var(--accent);
}
@media (max-width: 600px) {
  .library-nav {
    gap: 4px;
  }
  .library-nav a {
    padding: 10px 12px;
    font-size: 14px;
  }
  .library-nav a[aria-current="page"]::after {
    bottom: 0;
    left: 12px;
    right: 12px;
  }
}
.tabs {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 0 0 28px;
}
.tabs a {
  padding: 10px 16px;
  border-radius: 8px;
  border: 1px solid var(--line);
  font-size: 14px;
}
.tabs a[aria-current="page"],
.tabs a.active {
  background: var(--ink);
  color: var(--canvas);
  border-color: var(--ink);
}
.form-field {
  margin-bottom: 20px;
}
.form-field > label,
.filter-field label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 7px;
}
.form-field label span {
  color: var(--muted);
}
input:not([type="checkbox"]):not([type="radio"]),
select,
textarea {
  width: 100%;
  background: var(--canvas);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 46px;
  padding: 10px 12px;
  font-size: 16px;
  line-height: 1.5;
}
textarea {
  resize: vertical;
  min-height: 130px;
}
input[type="file"] {
  padding: 8px !important;
  font-size: 13px !important;
}
input[type="checkbox"],
input[type="radio"] {
  accent-color: var(--accent);
  width: 19px;
  height: 19px;
  flex-shrink: 0;
}
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.help-text {
  font-size: 12px;
  color: var(--muted);
  margin-top: 6px;
}
.help-text ul {
  padding-left: 18px;
}
.field-errors,
.form-errors,
.errorlist {
  color: var(--danger);
  font-size: 13px;
}
.errorlist {
  padding-left: 18px;
  margin: 6px 0;
}
.form-errors {
  padding: 12px;
  border: 1px solid var(--danger);
  border-radius: 8px;
  margin-bottom: 20px;
}
.has-error input,
.has-error textarea {
  border-color: var(--danger);
}
.filters {
  display: flex;
  gap: 12px;
  align-items: end;
  flex-wrap: wrap;
  margin-bottom: 28px;
}
.filter-field {
  flex: 1;
  min-width: 150px;
}
.filter-field.search {
  flex: 2;
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
}
table {
  border-collapse: collapse;
  width: 100%;
  text-align: left;
  font-size: 14px;
}
th,
td {
  padding: 15px 18px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
th {
  font-size: 11px;
  color: var(--muted);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: var(--canvas);
}
tbody tr:last-child td {
  border-bottom: 0;
}
td a {
  color: var(--accent);
}
td .small {
  display: block;
}
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 20px;
  margin-top: 28px;
}
.prose {
  font-size: 16px;
  line-height: 1.85;
  overflow-wrap: anywhere;
}
.prose h2 {
  margin-top: 32px;
}
.prose a {
  text-decoration: underline;
  color: var(--accent);
}
.prose pre,
.prompt-content {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font:
    14px/1.7 Consolas,
    monospace;
}
.prose p:last-child {
  margin-bottom: 0;
}
.narrow {
  max-width: 800px;
}
.auth-layout {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  min-height: 600px;
  max-width: 1040px;
  margin: 10px auto 24px;
  border: 1px solid var(--line);
  border-radius: 22px;
  overflow: hidden;
  background: var(--surface);
}
.auth-intro {
  padding: 56px 44px;
  background: var(--cover);
  color: #f4fbf5;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.auth-intro h1 {
  font-size: 54px;
}
.auth-intro h1 span {
  color: var(--mint);
}
.auth-intro p {
  color: #c2d8cd;
}
.auth-intro .eyebrow {
  color: var(--mint);
}
.auth-form {
  padding: 54px 44px;
  align-self: center;
}
.auth-form h2 {
  font-size: 34px;
}
.auth-footnote {
  font-size: 12px;
  color: var(--muted);
  margin: 24px 0 0;
}
.video-shell {
  background: #07110c;
  border-radius: 14px;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16/9;
  margin-bottom: 24px;
}
.video-shell video,
.video-shell iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.watermark {
  position: absolute;
  right: 16px;
  top: 13px;
  pointer-events: none;
  color: #fff9;
  font-size: 10px;
  letter-spacing: 0.04em;
  z-index: 2;
  text-shadow: 0 1px 3px #000;
}
.lesson-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 285px;
  gap: 28px;
}
.lesson-sidebar {
  position: sticky;
  top: 25px;
}
.lesson-sidebar h2 {
  font-size: 25px;
}
.lesson-footer {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 24px 0;
  border-top: 1px solid var(--line);
  margin-top: 28px;
}
.details {
  border-top: 1px solid var(--line);
  padding-top: 22px;
  margin-top: 26px;
}
.details summary {
  cursor: pointer;
  font-size: 18px;
  font-weight: 600;
}
.details .prose {
  margin-top: 18px;
}
.definition-list {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
}
.definition-list dt,
.definition-list dd {
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin: 0;
  font-size: 14px;
}
.definition-list dt {
  color: var(--muted);
}
.definition-list dd {
  text-align: right;
  overflow-wrap: anywhere;
}
.stat-value {
  font:
    44px/1.1 Georgia,
    serif;
  color: var(--accent);
  margin: 12px 0;
}
.timeline {
  border-left: 1px solid var(--line);
  padding-left: 22px;
  margin-left: 5px;
}
.timeline-item {
  position: relative;
  margin-bottom: 28px;
}
.timeline-item:before {
  content: "";
  position: absolute;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--accent);
  left: -27px;
  top: 7px;
}
.timeline-item p {
  margin: 6px 0;
}
.site-footer {
  max-width: 1216px;
  margin: auto;
  padding: 22px 0 30px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  gap: 24px;
  color: var(--muted);
  font-size: 11px;
}
.theme-control {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 9px;
}
.theme-control select {
  font-size: 12px;
  min-height: 34px;
  padding: 5px 25px 5px 8px;
  width: auto;
  background: none;
}
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.break-word {
  overflow-wrap: anywhere;
}
.full-width {
  width: 100%;
}
.mt {
  margin-top: 24px;
}
.mb0 {
  margin-bottom: 0;
}
.row-between {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}
.secondary-video {
  margin-top: 24px;
}
.legal-document + .legal-document {
  border-top: 1px solid var(--line);
  padding-top: 30px;
  margin-top: 30px;
}
@media (max-width: 1300px) {
  .page-shell,
  .site-footer {
    margin-left: 40px;
    margin-right: 40px;
  }
  .header-inner {
    gap: 28px;
  }
  .desktop-nav {
    gap: 20px;
  }
}
@media (max-width: 1050px) {
  .header-inner {
    padding: 0 24px;
    gap: 24px;
  }
  .desktop-nav {
    gap: 16px;
    font-size: 13px;
  }
  .page-shell,
  .site-footer {
    margin-left: 24px;
    margin-right: 24px;
  }
  .brand {
    font-size: 23px;
  }
  .brand-os {
    font-size: 15px;
  }
  .split {
    grid-template-columns: minmax(0, 1fr) 300px;
  }
  .hero {
    grid-template-columns: 1fr 210px;
    gap: 25px;
    padding: 34px;
  }
  .lesson-layout {
    grid-template-columns: minmax(0, 1fr) 250px;
  }
  .grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 800px) {
  .site-header {
    height: 72px;
  }
  .desktop-nav {
    display: none;
  }
  .menu-toggle {
    display: grid;
  }
  .page-shell {
    padding-top: 28px;
  }
  .hero {
    padding: 30px;
    grid-template-columns: 1fr 170px;
    gap: 24px;
  }
  .hero h1 {
    font-size: 42px;
  }
  .hero-aside {
    padding-left: 22px;
  }
  .split,
  .lesson-layout {
    grid-template-columns: 1fr;
  }
  .lesson-sidebar {
    position: static;
  }
  .split.equal {
    grid-template-columns: 1fr;
  }
  .auth-intro {
    padding: 36px;
  }
  .auth-intro h1 {
    font-size: 42px;
  }
  .auth-form {
    padding: 36px;
  }
  .auth-layout {
    min-height: 530px;
  }
  .site-footer {
    margin-bottom: 70px;
    flex-wrap: wrap;
  }
  .site-footer > span:nth-child(2) {
    display: none;
  }
  .bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 30;
    display: flex;
    justify-content: space-around;
    background: var(--surface);
    border-top: 1px solid var(--line);
    padding: 8px 8px calc(8px + env(safe-area-inset-bottom));
  }
  .bottom-nav a {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    font-size: 10px;
    padding: 4px 12px;
    color: var(--muted);
  }
  .bottom-nav a[aria-current="page"] {
    color: var(--accent);
  }
  .page-heading {
    align-items: flex-start;
  }
  .page-heading h1 {
    font-size: 40px;
  }
}
@media (max-width: 560px) {
  body {
    font-size: 14px;
  }
  .header-inner {
    padding: 0 20px;
  }
  .header-actions {
    gap: 3px;
  }
  .search-button {
    display: none;
  }
  .page-shell {
    margin: 0 20px;
    padding-top: 26px;
    padding-bottom: 40px;
  }
  .site-footer {
    margin-left: 20px;
    margin-right: 20px;
  }
  .page-heading {
    display: block;
    margin-bottom: 24px;
  }
  .page-heading .actions {
    margin-top: 18px;
  }
  .page-heading h1 {
    font-size: 36px;
  }
  .hero {
    grid-template-columns: 1fr;
    padding: 28px 24px;
    border-radius: 16px;
    margin-bottom: 28px;
    gap: 24px;
  }
  .hero h1 {
    font-size: 38px;
  }
  .hero-aside {
    border-left: 0;
    border-top: 1px solid #ffffff28;
    padding: 20px 0 0;
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 20px;
    align-items: center;
  }
  .hero-aside .eyebrow {
    grid-column: 1/-1;
    margin: 0;
  }
  .hero-aside .big-number {
    font-size: 38px;
    grid-column: 2;
    grid-row: 2/4;
    margin: 0;
  }
  .hero-aside p {
    margin: 0;
    grid-column: 1;
  }
  .hero-aside .progress-track {
    grid-column: 1;
  }
  .grid,
  .grid.two {
    grid-template-columns: 1fr;
  }
  .card,
  .panel {
    padding: 22px;
  }
  .section-heading h2 {
    font-size: 27px;
  }
  .section-heading {
    align-items: baseline;
  }
  .section-heading .text-link {
    font-size: 12px;
    text-align: right;
  }
  .card h3 {
    font-size: 25px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
    margin: 0;
    border-radius: 16px;
  }
  .auth-intro {
    padding: 30px;
  }
  .auth-intro h1 {
    font-size: 40px;
    margin-bottom: 16px;
  }
  .auth-intro .intro-bottom {
    display: none;
  }
  .auth-form {
    padding: 30px 24px;
  }
  .header-caption {
    font-size: 9px;
    letter-spacing: 0.1em;
  }
  .filters {
    gap: 12px;
  }
  .filter-field {
    min-width: calc(50% - 12px);
  }
  .filter-field.search {
    flex-basis: 100%;
  }
  .filters > .button {
    width: 100%;
  }
  .tabs {
    gap: 7px;
  }
  .tabs a {
    font-size: 12px;
    padding: 8px 11px;
  }
  .list-row {
    gap: 12px;
    align-items: flex-start;
  }
  .list-row h3 {
    font-size: 16px;
  }
  .list-row .button {
    font-size: 12px;
    padding: 8px 10px;
  }
  .row-between {
    align-items: flex-start;
  }
  .lesson-footer {
    flex-direction: column;
  }
  .lesson-footer .button {
    width: 100%;
  }
  .video-shell {
    border-radius: 9px;
  }
  .watermark {
    top: 8px;
    right: 8px;
    font-size: 8px;
  }
  .breadcrumb {
    font-size: 12px;
    margin-bottom: 20px;
  }
  .empty-state {
    padding: 36px 22px;
  }
  .empty-state h2 {
    font-size: 27px;
  }
  .definition-list {
    grid-template-columns: 1fr 1fr;
  }
  .definition-list dt,
  .definition-list dd {
    font-size: 13px;
  }
  th,
  td {
    padding: 12px;
  }
  .site-footer {
    gap: 14px;
  }
  .theme-control {
    gap: 6px;
  }
  .notice {
    padding: 14px 16px;
  }
}
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *:before,
  *:after {
    transition: none !important;
    animation: none !important;
  }
}
@media (max-width: 560px) {
  .auth-intro {
    padding: 24px;
  }
  .auth-intro h1 {
    font-size: 30px;
    line-height: 1.12;
    margin-bottom: 0;
  }
  .auth-intro > div > p {
    display: none;
  }
  .auth-intro .eyebrow {
    font-size: 9px;
    margin-bottom: 12px;
  }
  .auth-form {
    padding: 26px 24px;
  }
  .auth-form h2 {
    font-size: 30px;
  }
}

@media (min-width: 561px) and (max-width: 800px) {
  .filters .filter-field.search {
    flex-basis: 100%;
  }
}

/* Compact controls remain reachable without sacrificing navigation on phones. */
.header-actions { flex-shrink: 0; }
.icon-button, .avatar { width: 44px; height: 44px; flex-shrink: 0; }
.brand { min-height: 44px; flex-shrink: 0; }
.mobile-menu a, .mobile-menu .text-button { display: flex; align-items: center; min-height: 44px; }
.mobile-menu:not([hidden]) { gap: 4px; }
.page-heading > *, .section-heading > *, .list-row > *, .row-between > * { min-width: 0; }
h1, h2, h3, .notice, .card, .breadcrumb { overflow-wrap: anywhere; }
@media (max-width: 1100px) {
  .desktop-nav { display: none; }
  .menu-toggle { display: grid; }
}
@media (max-width: 560px) {
  .header-inner { padding: 0 16px; gap: 8px; }
  .header-actions { gap: 4px; }
  .brand-wordmark { display: none; }
  .search-button { display: grid; }
  .header-actions .theme-options { left: 0; right: auto; }
  .tabs a, .library-nav a, .text-button, .text-link { min-height: 44px; display: inline-flex; align-items: center; }
  .page-heading > .button { margin-top: 16px; }
  .section-heading, .row-between, .actions { flex-wrap: wrap; }
  .site-footer { margin-bottom: calc(80px + env(safe-area-inset-bottom)); }
  .bottom-nav a { min-width: 44px; min-height: 48px; }
  .contact-table, .contact-table tbody, .contact-table tr, .contact-table td { display: block; width: 100%; }
  .contact-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
  .contact-table tr { padding: 12px 16px; }
  .contact-table tr + tr { border-top: 1px solid var(--line); }
  .contact-table td { padding: 6px 0; border: 0; white-space: normal; overflow-wrap: anywhere; }
  .contact-table td[data-label]::before { content: attr(data-label); display: block; color: var(--muted); font-size: 12px; }
  .contact-table td[data-label]:not(:first-child) { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
  .contact-table td:first-child a { display: inline-flex; align-items: center; min-height: 44px; }
}
/* Factual journal: time rail remains visible without hiding source provenance. */
.journal-filters { display:grid; grid-template-columns:repeat(4,minmax(0,1fr)); gap:16px; align-items:end; }
.journal-filters .button-row,.journal-filters .errorlist { grid-column:1/-1; }
.journal-filters > div {min-width:0;}
.journal-filters input,.journal-filters select {min-width:0;max-width:100%;width:100%;}
.breadcrumbs {display:flex;gap:12px;flex-wrap:wrap;margin-bottom:16px;font-size:13px;}
.journal-timeline { list-style:none; margin:0; padding:0; }
.journal-entry { display:grid; grid-template-columns:100px minmax(0,1fr); gap:20px; padding-bottom:24px; }
.journal-time { display:flex; flex-direction:column; gap:8px; font-variant-numeric:tabular-nums; border-right:1px solid var(--line); padding-right:12px; }
.journal-entry h2 { font-size:19px; }
.journal-json { white-space:pre-wrap; overflow-wrap:anywhere; font:12px/1.7 monospace; max-width:100%; padding:14px; border:1px solid var(--line); border-radius:8px; }
.telegram-preferences { margin-top:24px; }
.telegram-preferences .form-field:first-of-type { padding-bottom:12px; border-bottom:1px solid var(--line); }
.telegram-panel .checkbox-field input { flex:none; margin-top:4px; }
.telegram-panel .button { white-space:normal; }
.telegram-fallback summary { cursor:pointer; font-weight:600; }
.telegram-fallback[open] summary { margin-bottom:16px; }
.journal-report-entry { margin:20px 0; }
.button-row { display:flex; gap:12px; align-items:center; flex-wrap:wrap; }
@media(max-width:720px) { .journal-filters {grid-template-columns:1fr 1fr;} .journal-entry {grid-template-columns:1fr;gap:8px;} .journal-time {flex-direction:row;border-right:0;} .journal-time br {display:none;} }
@media(max-width:480px) { .journal-filters {grid-template-columns:1fr;} }
@media print { .site-header,.mobile-menu,.site-footer,.messages {display:none!important;} .page-shell {max-width:none!important;padding:0!important;} .journal-report {color:#000;background:#fff;} .journal-report .panel {border-color:#ccc;background:#fff;box-shadow:none;color:#000;} .journal-report-entry {break-inside:avoid;} .journal-report pre {font-size:10px;} }
