* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #f7f8fa;
  color: #1f2933;
}

main {
  padding: 1rem;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(20rem, 28rem);
  gap: clamp(1.5rem, 3vw, 3rem);
  align-items: stretch;
  padding: clamp(1.25rem, 3vw, 2.5rem);
  background:
    radial-gradient(circle at top left, rgb(186 230 253 / 45%), transparent 32%),
    linear-gradient(135deg, #eff6ff 0%, #f8fafc 46%, #eef2ff 100%);
}

.auth-hero,
.auth-card {
  background: rgb(255 255 255 / 90%);
  border: 1px solid #d6d9de;
  border-radius: 24px;
  box-shadow: 0 24px 60px rgb(15 23 42 / 10%);
  backdrop-filter: blur(6px);
}

.auth-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.5rem, 3vw, 2.5rem);
}

.brand-lockup h1,
.auth-card-title {
  color: #0f172a;
}

.brand-lockup h1 {
  margin: 0;
  font-size: clamp(2.25rem, 5vw, 3.75rem);
  line-height: 1.05;
}

.brand-emblem {
  position: relative;
  width: 5.5rem;
  height: 5.5rem;
  margin-bottom: 1rem;
  border-radius: 22px;
  background: linear-gradient(160deg, #0ea5e9, #312e81);
  box-shadow: inset 0 1px 1px rgb(255 255 255 / 28%);
}

.brand-emblem-page,
.brand-emblem-highlight,
.brand-emblem-note {
  position: absolute;
  display: block;
}

.brand-emblem-page {
  inset: 0.8rem 1rem;
  border-radius: 14px;
  background: white;
  transform: rotate(-6deg);
}

.brand-emblem-highlight {
  top: 1.55rem;
  left: 1.45rem;
  width: 2.4rem;
  height: 0.7rem;
  border-radius: 999px;
  background: #bef264;
  box-shadow:
    0 1rem 0 0 #fde68a,
    0 2rem 0 0 #c4b5fd;
}

.brand-emblem-note {
  right: 1rem;
  bottom: 0.95rem;
  width: 1rem;
  height: 1rem;
  border-radius: 999px;
  background: #f97316;
  box-shadow: 0 0 0 4px rgb(249 115 22 / 18%);
}

.auth-kicker,
.auth-card-kicker {
  margin: 0 0 0.4rem;
  color: #0369a1;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.auth-lede {
  margin: 0.85rem 0 0;
  max-width: 38rem;
  color: #334155;
  font-size: 1.1rem;
  line-height: 1.6;
}

.auth-supporting-copy,
.auth-card-copy,
.auth-form-note {
  color: #52606d;
  line-height: 1.55;
}

.auth-supporting-copy {
  max-width: 40rem;
  margin: 1rem 0 0;
}

.auth-feature-list {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
}

.auth-feature-card {
  padding: 1rem;
  border: 1px solid #dbe4ee;
  border-radius: 16px;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
}

.auth-feature-card h2 {
  margin: 0 0 0.45rem;
  font-size: 1rem;
}

.auth-feature-card p,
.auth-card-copy,
.auth-form-note,
.auth-error {
  margin: 0;
}

.auth-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(1.25rem, 3vw, 2rem);
}

.auth-card-title {
  margin: 0;
  font-size: 1.7rem;
}

.auth-card-copy {
  margin-top: 0.75rem;
}

.auth-form {
  margin-top: 1.25rem;
}

.auth-form-actions {
  display: flex;
  gap: 0.75rem;
  align-items: center;
  margin-top: 0.75rem;
}

.auth-form-actions .auth-submit-button {
  margin-top: 0;
}

.auth-back-button {
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: white;
  color: #0f172a;
  font-weight: 600;
}

.auth-flow-secondary[hidden],
.auth-back-button[hidden] {
  display: none;
}


.auth-form .error:empty {
  display: none;
}

.auth-submit-button {
  width: 100%;
  margin-top: 0.75rem;
  border: 1px solid #0369a1;
  border-radius: 12px;
  background: linear-gradient(135deg, #0ea5e9 0%, #2563eb 100%);
  color: white;
  font-weight: 700;
}

.auth-submit-button:hover,
.auth-submit-button:focus-visible {
  background: linear-gradient(135deg, #0284c7 0%, #1d4ed8 100%);
}

.auth-form-note {
  margin-top: 0.85rem;
  font-size: 0.95rem;
}

.auth-error {
  min-height: 1.4rem;
  margin-top: 0.75rem;
}

.auth-error-inline {
  min-height: 0;
  margin-top: 1rem;
}

.login-panel {
  max-width: 28rem;
  margin: 4rem auto;
  padding: 1rem;
  background: white;
  border: 1px solid #d6d9de;
  border-radius: 8px;
}

@media (max-width: 860px) {
  .auth-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .auth-hero {
    order: 2;
  }

  .auth-card {
    order: 1;
  }
}

label {
  display: block;
  margin: 0.75rem 0;
}

input,
textarea,
button {
  font: inherit;
}

input,
textarea {
  display: block;
  width: 100%;
  margin-top: 0.25rem;
  padding: 0.55rem;
}

button {
  min-height: 44px;
  padding: 0.55rem 0.8rem;
}

button[aria-pressed="true"] {
  border-color: #075985;
  background: #e0f2fe;
  box-shadow: inset 0 0 0 2px #0284c7;
}

.student-list-topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 0.75rem 1rem;
  background: #eef7ff;
  border: 2px solid #7dd3fc;
  border-left: 0;
  border-right: 0;
  box-shadow: 0 1px 4px rgb(2 132 199 / 16%);
}

.student-session-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.student-room-label,
.student-session-meta .student-id-label {
  color: #52606d;
  font-variant-numeric: tabular-nums;
}

.student-list-topbar button {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}


.error {
  color: #a61b1b;
}


.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;
}

.typed-essay-panel {
  margin: 1rem 0;
  padding: 1rem;
  background: white;
  border: 1px solid #d6d9de;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.typed-essay-header,
.typed-essay-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.typed-essay-title {
  margin: 0;
  font-size: 1.15rem;
}

.typed-essay-help,
.typed-essay-count {
  margin: 0.5rem 0 0;
  color: #52606d;
}

.typed-essay-status {
  font-weight: 700;
  white-space: nowrap;
}

.typed-essay-input {
  width: 100%;
  min-height: 12rem;
  margin-top: 0.75rem;
  padding: 0.75rem;
  border: 1px solid #b8c0cc;
  border-radius: 10px;
  font: inherit;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
  color: #1f2933;
}

.typed-essay-input:focus {
  outline: 2px solid #38bdf8;
  outline-offset: 2px;
}


.layout-student-pdf-list .global-language-drag-handle,
.layout-admin-account .global-language-drag-handle,
.layout-admin-admin-users .global-language-drag-handle,
.reader-language-control .global-language-drag-handle {
  display: none;
}

.reader-topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.5rem 0.75rem;
  background: #eef7ff;
  border: 2px solid #7dd3fc;
  border-left: 0;
  border-right: 0;
  box-shadow: 0 1px 4px rgb(2 132 199 / 16%);
}

.reader-topbar button {
  min-height: 36px;
  padding: 0.35rem 0.65rem;
  white-space: nowrap;
}

.reader-finish-button {
  font-weight: 700;
}

.reader-topbar h1 {
  flex: 1;
  font-size: 1.1rem;
  margin: 0;
}

.student-id-label {
  color: #52606d;
  font-variant-numeric: tabular-nums;
}

.toolbar {
  position: fixed;
  left: 0.75rem;
  bottom: 0.75rem;
  z-index: 20;
  display: flex;
  gap: 0.35rem;
  flex-wrap: wrap;
  max-width: calc(100vw - 1.5rem);
  padding: 0.45rem;
  background: white;
  border: 2px solid #7dd3fc;
  border-radius: 8px;
  box-shadow: 0 2px 10px rgb(15 23 42 / 18%);
}

.toolbar button {
  min-width: 44px;
}

.reader-topbar a,
.reader-topbar button,
.toolbar button,
.toolbar select {
  touch-action: manipulation;
}

.toolbar-help-button {
  font-weight: 700;
}

.reader-finish-dialog,
.reader-help-dialog {
  width: min(60rem, calc(100vw - 2rem));
  border: 1px solid #b8c0cc;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 25%);
  padding: 0;
}

.reader-finish-dialog::backdrop,
.reader-help-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.reader-finish-dialog-form {
  margin: 0;
  padding: 1rem;
}

.reader-finish-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.reader-finish-actions {
  margin-top: 1rem;
  justify-content: flex-end;
}

.reader-finish-logout-button {
  font-weight: 700;
}

.reader-help-dialog-form {
  margin: 0;
  padding: 1rem;
}

.reader-help-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
}

.reader-help-kicker {
  margin: 0 0 0.25rem;
  color: #0369a1;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.reader-help-header h2 {
  margin: 0;
}

.reader-help-intro,
.reader-help-note {
  color: #52606d;
}

.reader-help-intro {
  margin: 0.35rem 0 0;
  max-width: 46rem;
}

.reader-help-grid {
  display: grid;
  gap: 0.85rem;
  margin-top: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.reader-help-card {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  min-height: 100%;
  padding: 0.85rem 0.9rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #f8fafc;
}

.reader-help-badge {
  flex: 0 0 auto;
  min-width: 4.5rem;
  padding: 0.35rem 0.5rem;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  background: #eff6ff;
  color: #0f172a;
  font-weight: 700;
  text-align: center;
}

.reader-help-badge-icon {
  min-width: 3rem;
  font-size: 1.2rem;
}

.reader-help-card h3 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.reader-help-card p,
.reader-help-note {
  margin: 0;
}

.reader-help-note {
  margin-top: 1rem;
}


.select-pointer-icon {
  display: inline-block;
  color: #111827;
  font-size: 1.35rem;
  font-weight: 900;
  line-height: 1;
  transform: rotate(-135deg) scaleX(1.15);
  transform-origin: center;
}

.evidence-picker {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 44px;
  margin: 0;
  padding: 0 0.4rem;
  border: 1px solid #b8c0cc;
  border-radius: 4px;
  background: #f8fafc;
}

.evidence-picker select {
  min-height: 32px;
}

.pdf-viewer {
  max-width: 1076px;
  margin: 1rem auto 6rem;
  overflow: visible;
}

.pdf-page-frame {
  margin: 0 auto 1rem;
  overflow: visible;
}

.pdf-page {
  position: relative;
  margin: 0 auto;
  background: white;
  box-shadow: 0 1px 4px rgb(0 0 0 / 18%);
  overflow: visible;
}

.pdf-canvas {
  display: block;
}

.text-layer {
  position: absolute;
  inset: 0;
  z-index: 1;
  overflow: hidden;
  line-height: 1;
  opacity: 0.2;
  user-select: text;
}

.text-layer span {
  position: absolute;
  color: transparent;
  cursor: text;
  transform-origin: 0% 0%;
  white-space: pre;
}

.reader-tool-select .annotation-layer [data-annotation-id] {
  cursor: pointer;
}

.reader-tool-box .pdf-page {
  cursor: crosshair;
  touch-action: none;
}

.reader-tool-box .text-layer {
  pointer-events: none;
  user-select: none;
}

.reader-tool-sticky .pdf-page {
  cursor: copy;
  touch-action: none;
}

.reader-tool-symbol .pdf-page {
  cursor: copy;
  touch-action: none;
}

.reader-tool-select .annotation-layer [data-annotation-id],
.reader-tool-select .annotation-layer [data-selected-box-preview],
.reader-tool-delete .annotation-layer [data-annotation-id] {
  touch-action: none;
}

.reader-tool-response-evidence .annotation-layer [data-annotation-id] {
  cursor: copy;
  touch-action: none;
}

.reader-tool-delete .annotation-layer [data-annotation-id] {
  cursor: not-allowed;
}

.annotation-layer,
.target-overlay-layer {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}

.annotation-layer [data-annotation-id],
.reader-tool-box .annotation-layer,
.reader-tool-sticky .annotation-layer {
  pointer-events: auto;
}

.box-drag-preview {
  pointer-events: none;
}

.selected-box-outline {
  pointer-events: none;
}

.annotation-layer [data-selected-box-preview] {
  pointer-events: auto;
}

.box-resize-handle {
  fill: white;
  stroke: #7c3aed;
  stroke-width: 4;
  pointer-events: auto;
  touch-action: none;
}

.box-resize-handle:hover {
  fill: #ede9fe;
}

.box-resize-handle-n,
.box-resize-handle-s {
  cursor: ns-resize;
}

.box-resize-handle-e,
.box-resize-handle-w {
  cursor: ew-resize;
}

.box-resize-handle-nw,
.box-resize-handle-se {
  cursor: nwse-resize;
}

.box-resize-handle-ne,
.box-resize-handle-sw {
  cursor: nesw-resize;
}

.vocabulary-highlight {
  stroke: #65a30d;
  stroke-width: 3;
}

.marked-text-underline {
  fill: #7c3aed;
  opacity: 0.9;
}

.word-selection-preview {
  stroke: #1d4ed8;
  stroke-width: 3;
  stroke-dasharray: 8 5;
}

.annotation-symbol {
  font-size: 76px;
  font-weight: 900;
  dominant-baseline: middle;
  paint-order: stroke;
  stroke: white;
  stroke-linejoin: round;
  stroke-width: 10px;
  pointer-events: none;
}

.annotation-symbol-question {
  fill: #dc2626;
}

.annotation-symbol-star {
  fill: #f59e0b;
}

.annotation-symbol-confused {
  fill: #7c3aed;
  font-size: 58px;
  letter-spacing: -8px;
}

.annotation-symbol-help {
  fill: white;
  font-size: 40px;
  font-weight: 800;
  stroke: none;
}

.reader-help-badge-confused {
  color: #6d28d9;
  border-color: #c4b5fd;
  background: #f5f3ff;
}

.reader-help-badge-help {
  color: #0f766e;
  border-color: #99f6e4;
  background: #f0fdfa;
}

.annotation-symbol-number {
  fill: white;
  font-size: 40px;
  font-weight: 800;
  stroke: none;
}

.response-evidence-selected {
  filter: drop-shadow(0 0 5px rgb(22 163 74 / 55%));
}

.response-evidence-badge {
  pointer-events: none;
}

.response-evidence-badge-circle {
  fill: #16a34a;
  stroke: white;
  stroke-width: 5;
}

.response-evidence-badge-text {
  fill: white;
  font-size: 28px;
  font-weight: 900;
  pointer-events: none;
}

.annotation-entry-dialog,
.vocabulary-dialog {
  width: min(42rem, calc(100vw - 2rem));
  border: 1px solid #b8c0cc;
  border-radius: 8px;
  box-shadow: 0 20px 50px rgb(0 0 0 / 25%);
  padding: 0;
}

.annotation-entry-dialog::backdrop,
.vocabulary-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.annotation-entry-form,
.vocabulary-dialog form {
  margin: 0;
  padding: 1rem;
}

.annotation-entry-header {
  margin-bottom: 0.75rem;
}


.vocabulary-format-field {
  margin-bottom: 0.75rem;
}

.vocabulary-format-field select {
  max-width: 18rem;
}

.annotation-entry-header h2,
.vocabulary-dialog h2 {
  margin: 0 0 0.35rem;
}

.annotation-entry-context {
  margin: 0;
  color: #52606d;
}

.annotation-entry-field {
  margin-top: 0.75rem;
}

.annotation-entry-field[hidden] {
  display: none;
}

.annotation-entry-field label {
  display: block;
  margin: 0 0 0.35rem;
  font-weight: 600;
}

.annotation-entry-field input,
.annotation-entry-field textarea,
.vocabulary-dialog textarea {
  margin-top: 0;
}

.annotation-entry-field textarea {
  min-height: 9rem;
}

.annotation-entry-error {
  margin: 0 0 0.75rem;
  color: #a61b1b;
  font-weight: 600;
}
.dialog-actions {
  display: flex;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.75rem;
}

.pdf-card {
  display: block;
  margin: 0.75rem 0;
  padding: 0.9rem;
  background: white;
  border: 1px solid #d6d9de;
  border-radius: 8px;
}

table {
  width: 100%;
  border-collapse: collapse;
  background: white;
}

th,
td {
  border: 1px solid #d6d9de;
  padding: 0.45rem;
  text-align: left;
}


.settings-page {
  max-width: 1080px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

.settings-page-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.settings-kicker {
  margin: 0 0 0.25rem;
  color: #52606d;
  font-size: 0.92rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.settings-subtle {
  margin: 0.25rem 0 0;
  color: #52606d;
}

.settings-header-actions {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.settings-header-actions a {
  display: inline-block;
  padding: 0.55rem 0.8rem;
  background: white;
  border: 1px solid #cbd2d9;
  border-radius: 8px;
  color: inherit;
  text-decoration: none;
}

.settings-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.settings-card {
  padding: 1rem;
  background: white;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.settings-card h2 {
  margin-top: 0;
  margin-bottom: 0.5rem;
}

.settings-card-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.settings-help,
.settings-summary,
.settings-empty,
.settings-status {
  color: #52606d;
}

.settings-checkbox-grid,
.settings-toggle-list {
  display: grid;
  gap: 0.5rem;
}

.settings-check {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0;
  padding: 0.55rem 0.65rem;
  border: 1px solid #d6d9de;
  border-radius: 8px;
  background: #f8fafc;
}

.settings-check input {
  width: auto;
  margin: 0.15rem 0 0;
}

.settings-warning {
  margin-bottom: 1rem;
  padding: 1rem;
  background: #fff8e6;
  border: 1px solid #f5c76a;
  border-radius: 10px;
}

@media (max-width: 720px) {
  .reader-topbar,
  .reader-help-header {
    flex-direction: column;
    align-items: stretch;
  }

  .reader-help-grid {
    grid-template-columns: 1fr;
  }

  .settings-page-header {
    flex-direction: column;
  }
}


.admin-upload-page {
  max-width: 880px;
  margin: 0 auto;
  padding: 1rem 1rem 2rem;
}

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

.admin-upload-form {
  padding: 1rem;
  background: white;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.admin-upload-actions {
  margin-top: 0.75rem;
}

.admin-feedback {
  margin-top: 1rem;
  padding: 0.9rem 1rem;
  border-radius: 10px;
  border: 1px solid #d6d9de;
  background: #f8fafc;
}

.admin-feedback h2 {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.admin-feedback p {
  margin: 0;
  color: #364152;
}

.admin-feedback-info {
  border-color: #bfdbfe;
  background: #eff6ff;
}

.admin-feedback-success {
  border-color: #86efac;
  background: #f0fdf4;
}

.admin-feedback-warning {
  border-color: #fcd34d;
  background: #fffbeb;
}

.admin-feedback-error {
  border-color: #fca5a5;
  background: #fef2f2;
}

.settings-status-card {
  margin-top: 0.25rem;
}

.admin-dialog {
  width: min(34rem, calc(100vw - 2rem));
  border: 1px solid #b8c0cc;
  border-radius: 12px;
  box-shadow: 0 24px 60px rgb(0 0 0 / 25%);
  padding: 0;
}

.admin-dialog::backdrop {
  background: rgb(15 23 42 / 45%);
}

.admin-dialog-form {
  margin: 0;
  padding: 1rem;
}

.admin-dialog-header h2 {
  margin: 0 0 0.35rem;
}

.admin-dialog-context {
  margin: 0;
  color: #52606d;
}

.admin-dialog-body {
  margin-top: 0.9rem;
}

.admin-dialog-message {
  margin: 0 0 0.85rem;
}

.admin-dialog-list {
  display: grid;
  gap: 0.65rem;
  margin: 0;
}

.admin-dialog-list div {
  padding: 0.7rem 0.8rem;
  border: 1px solid #d6d9de;
  border-radius: 8px;
  background: #f8fafc;
}

.admin-dialog-list dt {
  margin: 0 0 0.15rem;
  font-weight: 700;
}

.admin-dialog-list dd {
  margin: 0;
  color: #364152;
}

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

.admin-identity-bar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  padding: 1rem;
  background: linear-gradient(135deg, #eef7ff, #f8fafc);
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  box-shadow: 0 1px 3px rgb(15 23 42 / 8%);
}

.admin-identity-bar h1 {
  margin: 0;
  font-size: 1.5rem;
}

.inline-form {
  display: inline;
  margin: 0;
}

.inline-form button {
  margin: 0;
}

@media (max-width: 720px) {
  .admin-identity-bar {
    flex-direction: column;
  }
}


.global-language-control {
  position: fixed;
  top: 0.75rem;
  right: 0.75rem;
  z-index: 1100;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.7rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: rgb(255 255 255 / 94%);
  box-shadow: 0 6px 20px rgb(15 23 42 / 10%);
  backdrop-filter: blur(6px);
}

.global-language-control.global-language-control-draggable {
  cursor: default;
}

.global-language-drag-handle {
  display: none;
  align-items: center;
  justify-content: center;
  min-width: 1.8rem;
  min-height: 1.8rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #475569;
  font-size: 0.95rem;
  line-height: 1;
  cursor: grab;
}

.global-language-control.global-language-control-draggable .global-language-drag-handle {
  display: inline-flex;
}

.global-language-control[data-dragging="true"] .global-language-drag-handle {
  cursor: grabbing;
}

.global-language-drag-handle:hover,
.global-language-drag-handle:focus-visible {
  background: rgb(148 163 184 / 16%);
  outline: none;
}

.global-language-control label {
  font-size: 0.875rem;
  font-weight: 600;
  color: #334155;
}

.global-language-control select {
  min-width: 6rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.3rem 0.75rem;
  background: white;
  color: #0f172a;
}

@media (max-width: 720px) {
  .global-language-control {
    top: auto;
    right: 0.5rem;
    bottom: 0.5rem;
  }
}


.layout-student-pdf-list .global-language-control {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  display: inline-flex;
  justify-content: flex-end;
  width: max-content;
  margin: 0.75rem 0.75rem 0 auto;
}

@media (max-width: 720px) {
  .layout-student-pdf-list .global-language-control {
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
}


.layout-admin-account .global-language-control,
.layout-admin-admin-users .global-language-control {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  display: inline-flex;
  justify-content: flex-end;
  width: max-content;
  margin: 0.75rem 0.75rem 0 auto;
}

@media (max-width: 720px) {
  .layout-admin-account .global-language-control,
  .layout-admin-admin-users .global-language-control {
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
}


.layout-admin-shell .global-language-control {
  position: static;
  top: auto;
  right: auto;
  bottom: auto;
  left: auto;
  z-index: auto;
  display: inline-flex;
  justify-content: flex-end;
  width: max-content;
  margin: 0.75rem 0.75rem 0 auto;
}

@media (max-width: 720px) {
  .layout-admin-shell .global-language-control {
    margin-right: 0.5rem;
    margin-bottom: 0;
  }
}


.reader-topbar {
  flex-wrap: wrap;
}

.reader-language-control {
  position: static;
  z-index: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  width: max-content;
  margin-left: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  backdrop-filter: none;
}

.reader-language-control label {
  font-size: 0.875rem;
}

@media (max-width: 720px) {
  .reader-language-control {
    width: 100%;
    justify-content: flex-end;
    margin-left: 0;
  }
}


.admin-student-lookup-form {
  display: grid;
  gap: 0.75rem;
  align-items: end;
  grid-template-columns: minmax(14rem, 22rem) auto;
}

.admin-student-lookup-form button {
  margin: 0;
}

.lookup-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
}

.lookup-summary-card {
  padding: 0.85rem 1rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #f8fafc;
}

.lookup-summary-value {
  margin: 0;
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
}

.lookup-review-ready {
  color: #166534;
  font-weight: 700;
}

.lookup-review-pending {
  color: #52606d;
}

@media (max-width: 720px) {
  .admin-student-lookup-form {
    grid-template-columns: 1fr;
  }
}


.lookup-review-ready a {
  color: inherit;
  font-weight: 700;
  text-decoration: underline;
}

.admin-completion-toolbar {
  display: flex;
  justify-content: flex-end;
  margin: 1rem 0 1.25rem;
}

.admin-completion-toolbar select {
  min-width: 15rem;
}

.admin-completion-summary-grid {
  margin-bottom: 1rem;
}

.admin-review-topbar {
  gap: 0.75rem;
}

.admin-review-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border: 1px solid #7c3aed;
  border-radius: 999px;
  background: rgb(124 58 237 / 10%);
  color: #5b21b6;
  font-size: 0.9rem;
  font-weight: 700;
  white-space: nowrap;
}

.admin-review-summary {
  max-width: 980px;
  margin: 0 auto;
  padding: 0.75rem 1rem 0;
}

.admin-annotation-review-root .pdf-viewer {
  padding-bottom: 2rem;
}


.admin-account-grid,
.admin-management-grid {
  align-items: start;
}

.admin-user-list {
  display: grid;
  gap: 0.85rem;
}

.admin-user-card {
  display: grid;
  gap: 0.85rem;
  padding: 0.9rem 1rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #f8fafc;
}

.admin-user-card h3 {
  margin: 0 0 0.25rem;
}

.admin-user-card-header {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: start;
}

.admin-user-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  justify-content: flex-end;
}

.admin-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.6rem;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: white;
  color: #334155;
  font-size: 0.85rem;
  font-weight: 700;
}

.admin-chip-super {
  border-color: #7c3aed;
  color: #5b21b6;
  background: rgb(124 58 237 / 10%);
}

.admin-chip-active {
  border-color: #16a34a;
  color: #166534;
  background: #f0fdf4;
}

.admin-chip-disabled {
  border-color: #ef4444;
  color: #991b1b;
  background: #fef2f2;
}

.admin-user-reset-form {
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 721px) {
  .admin-user-reset-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: end;
  }

  .admin-user-reset-form button {
    grid-column: span 2;
  }
}

@media (max-width: 720px) {
  .admin-user-card-header {
    flex-direction: column;
  }

  .admin-user-badges {
    justify-content: flex-start;
  }
}


.settings-action-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  align-items: center;
}

.button-danger {
  color: #b42318;
}

button.button-danger {
  border: 1px solid #fda29b;
  background: #fff5f5;
  border-radius: 0.5rem;
  padding: 0.65rem 1rem;
  font: inherit;
  cursor: pointer;
}

button.button-danger:hover {
  background: #ffe4e4;
}

.button-link {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  text-decoration: underline;
  cursor: pointer;
}


.settings-inline-field {
  display: grid;
  gap: 0.35rem;
}

.settings-inline-field span {
  font-weight: 600;
}

.settings-card-muted {
  background: #f8fafc;
}

.settings-badge-row {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  margin-bottom: 0.5rem;
}

.settings-badge {
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #0f172a;
  font-weight: 600;
  font-size: 0.92rem;
}

.settings-badge-confused {
  background: #ede9fe;
  color: #5b21b6;
}

.settings-badge-help {
  background: #ccfbf1;
  color: #115e59;
}

.settings-help-error {
  color: #b91c1c;
  font-weight: 600;
}

.settings-field-invalid {
  border-color: #dc2626;
  box-shadow: inset 0 0 0 1px #dc2626;
}

.settings-inline-field-invalid {
  color: #991b1b;
}



.pre-reading-next-step-card {
  border-color: #bfdbfe;
  background: linear-gradient(180deg, #f8fbff 0%, #ffffff 100%);
}

.pre-reading-next-step-card:focus-visible,
.settings-status-card:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

.pre-reading-next-step-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

.pre-reading-next-step-score {
  margin: 0;
}

.pre-reading-bridge-prompt-block {
  margin-top: 0.9rem;
  padding-top: 0.9rem;
  border-top: 1px solid #dbeafe;
}

.pre-reading-next-step-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 1rem;
}

.pre-reading-primary-link,
.pre-reading-secondary-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.75rem;
  padding: 0.65rem 0.95rem;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
}

.pre-reading-primary-link {
  background: #1d4ed8;
  color: white;
  border: 1px solid #1d4ed8;
}

.pre-reading-secondary-link {
  background: white;
  color: inherit;
  border: 1px solid #cbd5e1;
}

.pre-reading-primary-link:focus-visible,
.pre-reading-secondary-link:focus-visible {
  outline: 3px solid #60a5fa;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .pre-reading-next-step-actions {
    flex-direction: column;
  }

  .pre-reading-primary-link,
  .pre-reading-secondary-link {
    width: 100%;
  }
}

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

.pre-reading-venn-status-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pre-reading-venn-count,
.pre-reading-venn-selection {
  margin: 0;
}

.pre-reading-venn-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  margin: 0.85rem 0 1rem;
}

.venn-token-pool {
  align-content: start;
  min-height: 5rem;
}

.venn-token {
  justify-content: center;
  align-items: center;
  cursor: pointer;
  user-select: none;
  min-height: 3rem;
  width: 100%;
  font: inherit;
  text-align: center;
}

.venn-token strong {
  pointer-events: none;
}

.venn-token.is-selected {
  border-color: #60a5fa;
  background: #eff6ff;
  box-shadow: 0 0 0 2px rgb(59 130 246 / 18%);
}

.venn-token.is-placed {
  border-color: #86efac;
  background: #f0fdf4;
}

.venn-dropzone {
  min-height: 6rem;
  display: grid;
  align-content: start;
  gap: 0.65rem;
  cursor: pointer;
}

.venn-dropzone.is-active {
  border-color: #60a5fa;
  background: #eff6ff;
}

.venn-dropzone.is-filled {
  border-color: #86efac;
}

.venn-token:focus-visible,
.venn-dropzone:focus-visible,
.pre-reading-venn-actions button:focus-visible {
  outline: 3px solid #2563eb;
  outline-offset: 2px;
}

@media (max-width: 720px) {
  .pre-reading-venn-layout {
    grid-template-columns: 1fr;
  }

  .pre-reading-venn-status-row {
    align-items: stretch;
  }
}

.post-reading-prompt {
  margin: 0;
  padding: 1rem 1.25rem;
  border-left: 4px solid #d0d7de;
  background: #f8fafc;
  white-space: pre-wrap;
}


.teacher-guidance-annotation {
  opacity: 0.7;
  pointer-events: none;
}

.teacher-guidance-hidden {
  display: none;
}

.admin-guidance-root .toolbar {
  margin-top: 1rem;
}

.admin-guidance-root .pdf-viewer {
  margin-top: 1rem;
}

#teacher-guidance-toggle[aria-pressed="false"] {
  opacity: 0.85;
}


.admin-guidance-summary-card,
.admin-guidance-inspector {
  margin-top: 1rem;
}

.admin-guidance-scope-card {
  margin-top: 1rem;
}

.admin-guidance-scope-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-guidance-scope-header h2 {
  margin-top: 0;
}

.admin-guidance-scope-form {
  display: grid;
  grid-template-columns: minmax(12rem, 1fr) minmax(14rem, 2fr) auto;
  align-items: end;
  gap: 0.75rem;
  margin: 1rem 0;
}

.admin-guidance-scope-form label {
  grid-column: 1 / -1;
  font-weight: 700;
}

.admin-guidance-scope-form select,
.admin-guidance-scope-form button {
  min-height: 2.75rem;
}

@media (max-width: 720px) {
  .admin-guidance-scope-form {
    grid-template-columns: 1fr;
  }

  .admin-guidance-scope-form label {
    grid-column: auto;
  }
}

.admin-guidance-inspector-list {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.admin-guidance-inspector-item {
  border: 1px solid var(--border-color, #d1d5db);
  border-radius: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.04);
}

[data-teacher-guidance-visible="false"] .teacher-guidance-overlay {
  display: none;
}

.typed-essay-prompt {
  margin: 0 0 0.75rem;
  padding: 0.75rem 1rem;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
}

.typed-essay-context {
  margin: 0 0 1rem;
  padding: 1rem;
  border: 1px solid #dbeafe;
  border-radius: 0.75rem;
  background: #f8fbff;
}

.typed-essay-context-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
}

.typed-essay-context-title {
  margin: 0 0 0.25rem;
  font-size: 1rem;
}

.typed-essay-context-help {
  margin: 0;
  color: #475569;
}

.typed-essay-context-count {
  white-space: nowrap;
  font-weight: 600;
  color: #1d4ed8;
}

.typed-essay-context-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

.typed-essay-context-item {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem;
  border-radius: 0.75rem;
  background: #ffffff;
  border: 1px solid #e2e8f0;
}

.typed-essay-context-copy {
  min-width: 0;
}

.typed-essay-context-badge {
  display: inline-block;
  margin-bottom: 0.35rem;
  padding: 0.15rem 0.5rem;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: 0.85rem;
  font-weight: 600;
}

.typed-essay-context-text {
  margin: 0;
  color: #0f172a;
  word-break: break-word;
}

.typed-essay-context-empty {
  margin: 0;
  color: #475569;
}

.typed-essay-context-empty[hidden] {
  display: none;
}

.typed-essay-context-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 0.5rem;
  align-items: center;
}

.typed-essay-context-insert,
.typed-essay-context-remove {
  flex: 0 0 auto;
}

.typed-essay-context-remove {
  border-color: #cbd5e1;
  background: #f8fafc;
  color: #334155;
}

@media (max-width: 720px) {
  .typed-essay-context-item {
    flex-direction: column;
  }

  .typed-essay-context-actions {
    width: 100%;
    flex-wrap: wrap;
  }

  .typed-essay-context-actions button {
    min-height: 44px;
  }
}


.meaning-report-page {
  max-width: 1240px;
}

.meaning-report-page > .settings-card {
  margin-bottom: 1rem;
}

.meaning-report-caution {
  margin: 0.75rem 0 0;
  padding: 0.75rem 0.9rem;
  border-left: 4px solid #2563eb;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 600;
}

.meaning-report-filter {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr));
  align-items: end;
  margin-top: 1rem;
}

.meaning-report-filter label {
  display: grid;
  gap: 0.35rem;
  min-width: 0;
  font-weight: 600;
}

.meaning-report-filter select {
  width: 100%;
  min-width: 0;
}

.meaning-report-filter-actions {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
}

.meaning-report-filter-actions button {
  margin: 0;
}

.meaning-report-filter-result {
  margin: 0.85rem 0 0;
  color: #334155;
  font-weight: 600;
}

.meaning-report-export-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.meaning-report-export-card h2 {
  margin-bottom: 0.25rem;
}

.meaning-report-export-groups {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.meaning-report-export-groups > div {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 0.75rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #f8fafc;
}

.meaning-report-export-groups a {
  white-space: nowrap;
}

.meaning-summary-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.meaning-summary-card {
  min-height: 9rem;
  padding: 0.9rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #f8fafc;
}

.meaning-summary-card p:last-child {
  margin-bottom: 0;
  color: #52606d;
}

.meaning-summary-value {
  margin: 0.15rem 0 0.35rem;
  color: #0f172a;
  font-size: 1.5rem;
  font-weight: 800;
}

.meaning-distribution-grid {
  display: grid;
  gap: 0.75rem;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
}

.meaning-distribution-grid article {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid #d6d9de;
  border-radius: 10px;
  background: #fff;
}

.meaning-distribution-grid strong {
  min-width: 2.5rem;
  font-size: 1.45rem;
}

.meaning-report-page > * {
  min-width: 0;
}

.meaning-table-scroll {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.meaning-table-scroll table {
  min-width: 860px;
}

.meaning-report-page [data-testid="meaning-report-room-summary-table"] {
  min-width: 1120px;
}

.meaning-report-page [data-testid="meaning-report-student-table"] {
  min-width: 1380px;
}

.meaning-report-page th {
  white-space: nowrap;
}

.meaning-monitor-caption {
  margin: 0.75rem 0 1rem;
  padding: 0.7rem 0.85rem;
  border-left: 4px solid #7c3aed;
  background: #f5f3ff;
  color: #4c1d95;
}

.meaning-monitor-table-heading {
  margin-top: 1.25rem;
}

.meaning-hotspot-badge {
  display: inline-block;
  padding: 0.2rem 0.5rem;
  border-radius: 999px;
  background: #ede9fe;
  color: #5b21b6;
  font-size: 0.85rem;
  font-weight: 700;
  white-space: nowrap;
}

@media (max-width: 820px) {
  .meaning-report-export-card {
    align-items: stretch;
    flex-direction: column;
  }

  .meaning-report-export-groups {
    display: grid;
    grid-template-columns: 1fr;
  }

  .meaning-report-export-groups > div {
    justify-content: space-between;
  }
}

@media (max-width: 720px) {
  .meaning-report-filter {
    grid-template-columns: 1fr;
  }

  .meaning-report-filter-actions,
  .meaning-report-filter-actions button,
  .meaning-report-filter-actions a {
    width: 100%;
  }

  .meaning-report-filter-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .meaning-summary-grid,
  .meaning-distribution-grid {
    grid-template-columns: 1fr;
  }

  .meaning-summary-card {
    min-height: 0;
  }

  .meaning-report-export-groups > div {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Locale direction is declared on <html>; logical properties preserve LTR behavior. */
html[dir="rtl"] body {
  text-align: right;
}

html[dir="rtl"] .global-language-control {
  right: auto;
  left: 0.75rem;
}

html[dir="rtl"] input,
html[dir="rtl"] textarea,
html[dir="rtl"] select {
  text-align: right;
}

html[dir="rtl"] input[type="number"],
html[dir="rtl"] input[type="date"],
html[dir="rtl"] input[type="time"],
html[dir="rtl"] input[type="file"],
html[dir="rtl"] [data-ltr-value="true"] {
  direction: ltr;
  text-align: left;
}

html[dir="rtl"] .reader-toolbar,
html[dir="rtl"] .admin-actions,
html[dir="rtl"] .admin-nav,
html[dir="rtl"] .button-row,
html[dir="rtl"] .inline-actions {
  direction: rtl;
}

html[dir="rtl"] .pdf-page,
html[dir="rtl"] .pdf-page canvas,
html[dir="rtl"] .textLayer {
  direction: ltr;
}


/* Tar 72 public-facing platform foundation */
.site-footer {
  align-items: center;
  background: #111827;
  color: #e5e7eb;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  margin-top: 2rem;
  padding: 1rem clamp(1rem, 4vw, 3rem);
}

.site-footer p {
  margin: 0;
}

.site-footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
}

.site-footer a {
  color: #f9fafb;
}

.public-page {
  background: #f3f4f6;
  color: #111827;
}

.public-shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: clamp(4.5rem, 8vw, 7rem) clamp(1rem, 4vw, 3rem) 2rem;
}

.public-hero,
.public-detail-card,
.legal-card,
.public-principles {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 1.25rem;
  box-shadow: 0 16px 40px rgb(15 23 42 / 8%);
  padding: clamp(1.5rem, 5vw, 4rem);
}

.public-hero h1,
.public-detail-card h1,
.legal-card h1 {
  font-size: clamp(2rem, 5vw, 4.25rem);
  letter-spacing: -0.04em;
  line-height: 1.02;
  margin: 0.4rem 0 1.25rem;
  max-width: 16ch;
}

.public-kicker {
  color: #1d4ed8;
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  margin: 0;
  text-transform: uppercase;
}

.public-lede {
  color: #374151;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.6;
  max-width: 60ch;
}

.public-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.8rem;
  margin-top: 2rem;
}

.public-actions a {
  border-radius: 0.7rem;
  display: inline-flex;
  font-weight: 750;
  padding: 0.8rem 1.1rem;
  text-decoration: none;
}

.public-primary-action {
  background: #1d4ed8;
  color: #ffffff;
}

.public-secondary-action {
  border: 1px solid #1d4ed8;
  color: #1d4ed8;
}

.public-feature-grid,
.public-principle-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  margin-top: 1rem;
}

.public-feature-card,
.public-principle-grid article {
  background: #ffffff;
  border: 1px solid #dbe2ea;
  border-radius: 1rem;
  padding: 1.35rem;
}

.public-feature-card h2,
.public-principles h2,
.public-related h2,
.legal-card h2 {
  line-height: 1.2;
}

.public-principles,
.public-related {
  margin-top: 1rem;
}

.public-breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 1rem;
}

.public-detail-list {
  display: grid;
  gap: 0.8rem;
  padding-left: 1.2rem;
}

.public-related-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.public-related-links a {
  background: #ffffff;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
}

.legal-shell {
  max-width: 900px;
}

.legal-card h1 {
  font-size: clamp(2rem, 5vw, 3.5rem);
}

.legal-card section {
  border-top: 1px solid #e5e7eb;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
}

.legal-updated {
  color: #6b7280;
}

.legal-review-note {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 0.8rem;
  margin-top: 2rem;
  padding: 1rem;
}

.error-shell {
  margin: 8rem auto 3rem;
  max-width: 720px;
  padding: 2rem;
}

@media (max-width: 720px) {
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .site-footer-links {
    flex-direction: column;
  }
}


.auth-choice-links {
  display: grid;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.button-link {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.9rem;
  border: 1px solid #0369a1;
  border-radius: 12px;
  background: #0369a1;
  color: white;
  font-weight: 700;
  text-decoration: none;
}

.button-link-secondary {
  background: white;
  color: #0369a1;
}

.checkbox-row {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
}

.checkbox-row input {
  width: auto;
  margin-top: 0.2rem;
}

.status-banner {
  padding: 0.85rem 1rem;
  border: 1px solid #86efac;
  border-radius: 12px;
  background: #f0fdf4;
  color: #166534;
}

.card-list {
  display: grid;
  gap: 0.85rem;
}

.class-card {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 1rem;
  border: 1px solid #dbe4ee;
  border-radius: 14px;
  background: #fff;
}

.class-card h3,
.class-card p {
  margin: 0;
}

.class-card p {
  margin-top: 0.35rem;
  color: #52606d;
}

.danger-zone {
  border-color: #fecaca;
  background: #fff7f7;
}


.public-site-header {
  border-bottom: 1px solid var(--border, #d8dee8);
  background: var(--surface, #fff);
}

.public-top-navigation {
  width: min(1120px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 4rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.public-brand {
  font-weight: 800;
  text-decoration: none;
}

.public-top-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.public-screenshot img {
  display: block;
  max-width: 100%;
  height: auto;
}

.public-faq article + article {
  margin-top: 1rem;
}
