@font-face {
  font-family: "Montserrat";
  src: url("/fonts/deep-deutsch/Montserrat-Regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/deep-deutsch/Montserrat-Medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/deep-deutsch/Montserrat-SemiBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 600;
  font-display: swap;
}

@font-face {
  font-family: "Montserrat";
  src: url("/fonts/deep-deutsch/Montserrat-ExtraBold.woff2") format("woff2");
  font-style: normal;
  font-weight: 800;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN";
  src: url("/fonts/deep-deutsch/SourceHanSansCN-Regular.woff") format("woff");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN";
  src: url("/fonts/deep-deutsch/SourceHanSansCN-Medium.woff") format("woff");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN";
  src: url("/fonts/deep-deutsch/SourceHanSansCN-Bold.woff") format("woff");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}

@font-face {
  font-family: "Source Han Sans CN";
  src: url("/fonts/deep-deutsch/SourceHanSansCN-Heavy.woff") format("woff");
  font-style: normal;
  font-weight: 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --dd-brand-navy: #05152d;
  --dd-midnight: #000b18;
  --dd-warm-ivory: #faf1e1;
  --dd-paper-cream: #fcf5e7;
  --dd-german-red: #d22b23;
  --dd-golden-ochre: #ed9a0e;
  --dd-charcoal: #3d3d3e;
  --dd-line-dark: rgba(5, 21, 45, 0.16);
  --dd-line-strong: rgba(5, 21, 45, 0.34);
  --dd-line-light: rgba(250, 241, 225, 0.18);
  --dd-muted-dark: rgba(5, 21, 45, 0.66);
  --dd-muted-light: rgba(250, 241, 225, 0.68);
  --success: #166b46;
  --success-soft: #e2efe6;
  --error: #b9241e;
  --error-soft: #f6dfda;
  --ochre-soft: #f7e4b9;
  --font-latin: "Montserrat";
  --font-cjk: "Source Han Sans CN";
  --page-max: 1560px;
  --page-gutter: clamp(0.75rem, 2vw, 1.75rem);
  --mode-tabs-height: 4.1rem;
  --review-subnav-height: 2.75rem;
}

* {
  box-sizing: border-box;
}

*[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0 0 0 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}

html {
  min-height: 100%;
  background: var(--dd-midnight);
  scroll-behavior: smooth;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--dd-brand-navy);
  background:
    radial-gradient(circle at 18% -12%, rgba(237, 154, 14, 0.16), transparent 29rem),
    radial-gradient(circle at 92% 4%, rgba(210, 43, 35, 0.12), transparent 25rem),
    var(--dd-midnight);
  font-family: var(--font-cjk), "Noto Sans SC", "PingFang SC", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  text-rendering: optimizeLegibility;
}

body::selection {
  background: var(--dd-german-red);
  color: var(--dd-warm-ivory);
}

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

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:disabled,
input:disabled,
select:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
a:focus-visible {
  outline: 3px solid var(--dd-golden-ochre);
  outline-offset: 3px;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 0.75rem;
  inset-inline-start: 0.75rem;
  padding: 0.7rem 1rem;
  border: 2px solid var(--dd-golden-ochre);
  border-radius: 2px;
  background: var(--dd-midnight);
  color: var(--dd-warm-ivory);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transform: translateY(-160%);
  transition: transform 180ms ease;
}

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

.auth-gate {
  position: fixed;
  z-index: 50;
  inset: 0;
  display: grid;
  place-items: center;
  overflow-y: auto;
  padding: 1.25rem;
  background:
    radial-gradient(circle at 76% 12%, rgba(210, 43, 35, 0.18), transparent 28rem),
    radial-gradient(circle at 12% 86%, rgba(237, 154, 14, 0.14), transparent 26rem),
    rgba(0, 11, 24, 0.96);
  backdrop-filter: blur(12px);
}

.auth-card {
  position: relative;
  width: min(650px, 100%);
  max-height: calc(100vh - 2rem);
  overflow: auto;
  border: 1px solid var(--dd-line-dark);
  border-top: 6px solid var(--dd-german-red);
  border-radius: 2px;
  background:
    linear-gradient(90deg, transparent 49.8%, rgba(5, 21, 45, 0.025) 50%, transparent 50.2%),
    var(--dd-paper-cream);
  box-shadow: 0 28px 80px rgba(0, 0, 0, 0.38);
  padding: clamp(1.5rem, 4vw, 3rem);
}

.auth-card::after {
  position: absolute;
  top: 0;
  inset-inline-end: 1.5rem;
  width: 4.5rem;
  height: 0.35rem;
  background: var(--dd-golden-ochre);
  content: "";
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1.3rem;
  border-bottom: 1px solid var(--dd-line-dark);
}

.auth-brand img {
  display: block;
  width: min(13rem, 47%);
  height: auto;
}

.auth-brand span,
.auth-kicker,
.panel-code,
.product-kicker,
.panel-heading > span,
.list-heading > div > span {
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.66rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
}

.auth-brand span {
  color: var(--dd-muted-dark);
  text-align: end;
}

.language-control {
  min-width: 0;
  width: clamp(10.5rem, 12vw, 13rem);
  max-width: 100%;
  display: grid;
  align-content: end;
  gap: 0.25rem;
}

.language-control > label {
  margin: 0;
  line-height: 1.25;
}

.language-control select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.75rem;
  appearance: none;
  background-image:
    linear-gradient(45deg, transparent 50%, currentColor 50%),
    linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position:
    calc(100% - 0.9rem) calc(50% - 0.08rem),
    calc(100% - 0.62rem) calc(50% - 0.08rem);
  background-repeat: no-repeat;
  background-size: 0.3rem 0.3rem;
  padding-inline: 0.85rem 2rem;
  overflow: hidden;
  text-align: start;
  text-overflow: ellipsis;
  unicode-bidi: plaintext;
  white-space: nowrap;
}

.language-control select:focus {
  border-color: var(--dd-golden-ochre);
  box-shadow: inset 0 -3px 0 var(--dd-golden-ochre);
}

.language-control select:focus-visible {
  outline: 3px solid var(--dd-golden-ochre);
  outline-offset: 3px;
}

.language-control option {
  background: var(--dd-warm-ivory);
  color: var(--dd-brand-navy);
}

.auth-language-control {
  width: 100%;
  max-width: none;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
  align-items: center;
  gap: 0.35rem 0.85rem;
  margin-block: 1.05rem 0;
  border-block: 1px solid var(--dd-line-dark);
  border-inline-start: 4px solid var(--dd-golden-ochre);
  background: rgba(250, 241, 225, 0.7);
  padding: 0.7rem 0.85rem;
}

.auth-language-control > label {
  color: var(--dd-brand-navy);
  font-size: 0.74rem;
  font-weight: 800;
}

.auth-language-control > select {
  grid-column: 2;
  grid-row: 1;
  border: 1px solid var(--dd-line-strong);
  border-radius: 2px;
  background-color: var(--dd-paper-cream);
  color: var(--dd-brand-navy);
  font-weight: 700;
}

.locale-loading {
  grid-column: 1 / -1;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  color: var(--dd-muted-dark);
  font-size: 0.66rem;
  font-weight: 700;
  line-height: 1.4;
  unicode-bidi: plaintext;
}

.locale-loading:empty {
  display: none;
}

.locale-loading:not(:empty)::before {
  width: 0.62rem;
  height: 0.62rem;
  flex: 0 0 auto;
  background: var(--error);
  content: "";
}

html.is-locale-loading .locale-loading:not(:empty)::before {
  border: 2px solid currentColor;
  border-block-start-color: var(--dd-golden-ochre);
  border-radius: 50%;
  background: transparent;
  animation: locale-loading-spin 720ms linear infinite;
}

.auth-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1.8rem, 5vw, 3rem) 0 1.6rem;
}

.auth-index {
  color: var(--dd-german-red);
  font-family: var(--font-latin), sans-serif;
  font-size: clamp(2.2rem, 7vw, 4.5rem);
  font-weight: 800;
  letter-spacing: -0.06em;
  line-height: 0.9;
}

.auth-kicker {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: var(--dd-german-red);
}

.auth-kicker::before {
  width: 1.6rem;
  height: 2px;
  background: currentColor;
  content: "";
}

.auth-card h2 {
  margin: 0.65rem 0 0.65rem;
  font-size: clamp(2rem, 6vw, 3.3rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.08;
}

.auth-card #authIntro {
  margin: 0;
  color: var(--dd-muted-dark);
  font-size: 0.95rem;
  line-height: 1.75;
}

.auth-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin-bottom: 1.4rem;
  border-top: 1px solid var(--dd-line-dark);
  border-bottom: 1px solid var(--dd-line-dark);
}

.auth-tab {
  min-height: 3.25rem;
  border: 0;
  border-inline-end: 1px solid var(--dd-line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--dd-muted-dark);
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.auth-tab:last-child {
  border-inline-end: 0;
}

.auth-tab.is-active {
  background: var(--dd-brand-navy);
  color: var(--dd-warm-ivory);
}

.auth-form {
  display: grid;
  gap: 0.45rem;
}

.auth-form label,
.field-label {
  margin-top: 0.7rem;
  color: var(--dd-brand-navy);
  font-size: 0.78rem;
  font-weight: 700;
}

.auth-form > input,
.filter-panel input,
.state-select {
  width: 100%;
  min-height: 3rem;
  border: 1px solid var(--dd-line-strong);
  border-radius: 2px;
  background-color: var(--dd-warm-ivory);
  padding: 0 0.85rem;
  transition:
    border-color 160ms ease,
    box-shadow 160ms ease;
}

.auth-form > input:focus,
.filter-panel input:focus,
.state-select:focus {
  border-color: var(--dd-golden-ochre);
  box-shadow: inset 4px 0 0 var(--dd-golden-ochre);
  outline: 0;
}

.auth-form > small {
  color: var(--dd-muted-dark);
  font-size: 0.7rem;
  line-height: 1.55;
}

.import-legacy-row {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin-top: 0.7rem;
  border-inline-start: 4px solid var(--dd-golden-ochre);
  background: var(--dd-warm-ivory);
  padding: 0.9rem;
  font-size: 0.82rem;
  line-height: 1.5;
}

.import-legacy-row input {
  margin-top: 0.25rem;
}

.auth-message {
  min-height: 1.45rem;
  margin: 0.4rem 0 0;
  color: var(--error);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.45;
}

.auth-form .primary-button {
  width: 100%;
  margin-top: 0.2rem;
}

.auth-form .primary-button:disabled {
  cursor: wait;
  opacity: 0.65;
}

.auth-footnote {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 1.3rem 0 0;
  color: var(--dd-muted-dark);
  font-size: 0.7rem;
}

.auth-footnote span {
  width: 0.45rem;
  height: 0.45rem;
  background: var(--dd-german-red);
}

.app-shell {
  --sticky-navigation-height: var(--mode-tabs-height);
  width: min(calc(100% - (var(--page-gutter) * 2)), var(--page-max));
  margin: var(--page-gutter) auto;
  overflow: clip;
  border: 1px solid var(--dd-line-light);
  border-radius: 2px;
  background: var(--dd-paper-cream);
  animation: shell-in 520ms ease-out both;
}

.app-shell:has(#reviewSubnav:not([hidden])) {
  --sticky-navigation-height: calc(var(--mode-tabs-height) + var(--review-subnav-height));
}

.topbar {
  position: relative;
  min-height: 9.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  overflow: hidden;
  padding: 1.55rem clamp(1rem, 2.4vw, 2.35rem) 2rem;
  border-bottom: 1px solid var(--dd-line-light);
  background:
    radial-gradient(circle at 42% 110%, rgba(237, 154, 14, 0.12), transparent 23rem),
    var(--dd-midnight);
  color: var(--dd-warm-ivory);
}

.topbar-motif {
  position: absolute;
  z-index: 0;
  right: 0;
  bottom: -1.5rem;
  left: 0;
  height: 4rem;
  opacity: 0.68;
  pointer-events: none;
}

.topbar-motif span {
  position: absolute;
  bottom: 0;
  width: 50.2%;
  height: 3rem;
  border-top: 2px solid;
}

.topbar-motif span:first-child {
  left: 0;
  border-color: var(--dd-golden-ochre);
  border-radius: 0 100% 0 0;
}

.topbar-motif span:last-child {
  right: 0;
  border-color: var(--dd-german-red);
  border-radius: 100% 0 0 0;
}

.brand,
.top-actions {
  position: relative;
  z-index: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: clamp(0.9rem, 2vw, 1.65rem);
  min-width: 0;
}

.brand-logo {
  display: block;
  width: clamp(9rem, 13vw, 12.5rem);
  height: auto;
  flex: 0 0 auto;
}

.brand-divider {
  width: 1px;
  height: 4rem;
  background: var(--dd-line-light);
}

.brand-product {
  min-width: 0;
}

.product-kicker {
  display: block;
  margin-bottom: 0.35rem;
  color: var(--dd-golden-ochre);
}

.brand h1 {
  margin: 0;
  color: var(--dd-warm-ivory);
  font-family: var(--font-latin), sans-serif;
  font-size: clamp(1.4rem, 2.6vw, 2.45rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.08;
}

.brand p {
  margin: 0.35rem 0 0;
  color: var(--dd-muted-light);
  font-size: 0.74rem;
  font-weight: 500;
}

.top-actions {
  display: grid;
  grid-template-columns: auto auto auto auto;
  align-items: end;
  justify-items: end;
  gap: 0.45rem 0.75rem;
}

.account-status {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  align-self: center;
}

.user-badge {
  min-height: 2.6rem;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--dd-line-light);
  border-inline-start: 3px solid var(--dd-german-red);
  background: rgba(250, 241, 225, 0.05);
  color: var(--dd-warm-ivory);
  padding: 0 0.75rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.sync-status {
  position: relative;
  padding-inline-start: 0.85rem;
  color: var(--dd-muted-light);
  font-size: 0.68rem;
  font-weight: 600;
}

.sync-status::before {
  position: absolute;
  top: 50%;
  inset-inline-start: 0;
  width: 0.42rem;
  height: 0.42rem;
  border-radius: 50%;
  background: var(--dd-golden-ochre);
  content: "";
  transform: translateY(-50%);
}

.sync-status.is-error {
  color: #ff9089;
}

.sync-status.is-error::before {
  background: #ff6259;
}

.state-control {
  display: grid;
  gap: 0.25rem;
}

.topbar .language-control .locale-loading {
  color: var(--dd-muted-light);
}

.select-label {
  color: var(--dd-muted-light);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.state-select {
  min-width: 13.75rem;
  min-height: 2.75rem;
  border-color: var(--dd-line-light);
  background-color: rgba(250, 241, 225, 0.07);
  color: var(--dd-warm-ivory);
}

.state-select:disabled {
  color: var(--dd-warm-ivory);
  opacity: 1;
}

.account-buttons {
  display: flex;
  gap: 0.45rem;
}

.sync-hint {
  grid-column: 1 / -1;
  color: var(--dd-muted-light);
  font-size: 0.65rem;
  text-align: end;
}

.mode-tabs {
  position: sticky;
  z-index: 12;
  top: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--dd-line-light);
  background: var(--dd-midnight);
}

.mode-tab {
  position: relative;
  min-height: var(--mode-tabs-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.65rem;
  border: 0;
  border-inline-end: 1px solid var(--dd-line-light);
  border-radius: 0;
  background: transparent;
  color: var(--dd-muted-light);
  transition:
    background 170ms ease,
    color 170ms ease;
}

.mode-tab:last-child {
  border-inline-end: 0;
}

.mode-tab::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 0.28rem;
  background: transparent;
  content: "";
}

.mode-tab > span {
  color: var(--dd-german-red);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.66rem;
  font-weight: 800;
}

.mode-tab > strong {
  font-size: 0.84rem;
  font-weight: 700;
}

.mode-tab:hover {
  background: rgba(250, 241, 225, 0.06);
  color: var(--dd-warm-ivory);
}

.mode-tab.is-active {
  background: var(--dd-brand-navy);
  color: var(--dd-warm-ivory);
}

.mode-tab.is-active::after {
  background: var(--dd-golden-ochre);
}

.review-subnav {
  position: sticky;
  z-index: 11;
  top: var(--mode-tabs-height);
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-bottom: 1px solid var(--dd-line-dark);
  background: var(--dd-warm-ivory);
  box-shadow: 0 0.35rem 1rem rgba(0, 11, 24, 0.08);
}

.review-view-tab {
  min-height: var(--review-subnav-height);
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  border: 0;
  border-inline-end: 1px solid var(--dd-line-dark);
  border-radius: 0;
  background: transparent;
  color: var(--dd-muted-dark);
  padding: 0.5rem 0.75rem;
  font-size: 0.76rem;
  font-weight: 700;
  transition:
    background 160ms ease,
    color 160ms ease;
}

.review-view-tab:last-child {
  border-inline-end: 0;
}

.review-view-tab strong {
  min-width: 1.65rem;
  border-radius: 999px;
  background: rgba(5, 21, 45, 0.09);
  padding: 0.1rem 0.38rem;
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  text-align: center;
}

.review-view-tab:hover {
  background: rgba(237, 154, 14, 0.11);
  color: var(--dd-brand-navy);
}

.review-view-tab.is-active {
  background: var(--ochre-soft);
  color: var(--dd-brand-navy);
  box-shadow: inset 0 -4px 0 var(--dd-golden-ochre);
}

.workspace {
  display: grid;
  grid-template-columns: 15.5rem minmax(0, 1fr) 18rem;
  grid-template-areas: "side question list";
  gap: 1px;
  background: var(--dd-line-dark);
}

.side-panel,
.question-panel,
.question-list-panel {
  min-width: 0;
  background: var(--dd-paper-cream);
}

.side-panel {
  grid-area: side;
  align-self: start;
  position: sticky;
  top: var(--sticky-navigation-height);
}

.panel-heading {
  min-height: 4.65rem;
  display: grid;
  align-content: center;
  gap: 0.25rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--dd-line-dark);
  background: var(--dd-warm-ivory);
}

.panel-heading > span {
  color: var(--dd-german-red);
}

.panel-heading > strong {
  font-size: 1.05rem;
  font-weight: 900;
  letter-spacing: -0.04em;
}

.metric-grid {
  display: grid;
  grid-template-columns: 1fr;
  border-bottom: 1px solid var(--dd-line-dark);
}

.metric-grid div {
  min-height: 4.7rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--dd-line-dark);
}

.metric-grid div:last-child {
  border-bottom: 0;
}

.metric-grid span {
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), sans-serif;
  font-size: 2rem;
  font-weight: 800;
  letter-spacing: -0.06em;
}

.metric-grid small,
.exam-score small,
.list-heading small {
  color: var(--dd-muted-dark);
  font-size: 0.67rem;
  font-weight: 700;
}

.filter-panel,
.exam-panel,
.review-panel {
  padding: 1rem;
  border-bottom: 1px solid var(--dd-line-dark);
}

.field-label {
  display: block;
  margin: 0 0 0.45rem;
}

.filter-panel input {
  margin-bottom: 0.8rem;
  background: var(--dd-warm-ivory);
  font-size: 0.78rem;
}

.scope-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
}

.scope-chip {
  min-height: 2.75rem;
  border: 1px solid var(--dd-line-strong);
  border-radius: 2px;
  background: transparent;
  padding: 0 0.58rem;
  color: var(--dd-muted-dark);
  font-size: 0.69rem;
  font-weight: 700;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    color 160ms ease;
}

.scope-chip:hover {
  border-color: var(--dd-golden-ochre);
  color: var(--dd-brand-navy);
}

.scope-chip.is-active {
  border-color: var(--dd-golden-ochre);
  background: var(--ochre-soft);
  color: var(--dd-brand-navy);
}

.panel-code {
  display: block;
  margin-bottom: 0.6rem;
  color: var(--dd-german-red);
}

.exam-score {
  display: grid;
  gap: 0.25rem;
  margin-bottom: 0.8rem;
}

.exam-score span {
  font-family: var(--font-latin), sans-serif;
  font-size: 1.7rem;
  font-weight: 800;
  letter-spacing: -0.055em;
  white-space: nowrap;
}

.exam-timer-block {
  display: grid;
  gap: 0.15rem;
  margin-bottom: 0.75rem;
  border-inline-start: 4px solid var(--dd-german-red);
  background: var(--dd-brand-navy);
  padding: 0.7rem 0.8rem;
  color: var(--dd-warm-ivory);
}

.exam-timer-block small {
  color: var(--dd-muted-light);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.58rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.exam-timer-block time {
  font-family: var(--font-latin), sans-serif;
  font-size: 2rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 1.15;
}

.exam-timer-block time.is-urgent {
  color: var(--dd-golden-ochre);
}

.exam-status,
.review-summary {
  margin: 0.65rem 0 0.35rem;
  color: var(--dd-muted-dark);
  font-size: 0.67rem;
  line-height: 1.55;
}

.exam-panel .primary-button,
.exam-panel .ghost-button,
.review-panel .primary-button {
  width: 100%;
  margin-top: 0.45rem;
}

.review-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--dd-line-dark);
}

.review-metrics div {
  display: grid;
  gap: 0.1rem;
  padding: 0.65rem;
}

.review-metrics div + div {
  border-inline-start: 1px solid var(--dd-line-dark);
}

.review-metrics span {
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), sans-serif;
  font-size: 1.45rem;
  font-weight: 800;
}

.review-metrics small {
  color: var(--dd-muted-dark);
  font-size: 0.62rem;
  font-weight: 700;
}

.side-signature {
  min-height: 8rem;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  overflow: hidden;
  padding: 1rem;
  background: var(--dd-brand-navy);
  color: var(--dd-warm-ivory);
}

.side-signature img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: contain;
  opacity: 0.92;
}

.side-signature span {
  color: var(--dd-golden-ochre);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  line-height: 1.7;
  text-align: end;
}

.question-panel {
  grid-area: question;
  min-height: calc(100vh - 8rem);
  display: grid;
  grid-template-rows: auto 1fr auto;
  border-top: 4px solid var(--dd-golden-ochre);
}

.mobile-exam-strip {
  display: none;
}

.question-toolbar {
  min-height: 5.2rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.2rem;
  padding: 1rem clamp(1rem, 2vw, 1.5rem);
  border-bottom: 1px solid var(--dd-line-dark);
  background: var(--dd-warm-ivory);
}

.question-progress {
  flex: 1;
}

.question-meta {
  margin: 0 0 0.55rem;
  color: var(--dd-german-red);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.progress-track {
  width: min(24rem, 48vw);
  height: 0.35rem;
  overflow: hidden;
  background: rgba(5, 21, 45, 0.12);
}

.progress-track span {
  display: block;
  width: 0%;
  height: 100%;
  background: var(--dd-german-red);
  transition: width 240ms ease;
}

.question-actions,
.nav-buttons {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.question-card {
  position: relative;
  overflow: hidden;
  scroll-margin-top: calc(var(--sticky-navigation-height) + 1rem);
  padding: clamp(1.5rem, 4vw, 3.4rem);
  background:
    linear-gradient(90deg, rgba(5, 21, 45, 0.025) 1px, transparent 1px) 0 0 / 3rem 3rem,
    linear-gradient(rgba(5, 21, 45, 0.02) 1px, transparent 1px) 0 0 / 3rem 3rem,
    var(--dd-paper-cream);
}

.question-watermark {
  position: absolute;
  top: -1.5rem;
  inset-inline-end: 1rem;
  color: rgba(5, 21, 45, 0.035);
  font-family: var(--font-latin), sans-serif;
  font-size: clamp(8rem, 17vw, 15rem);
  font-weight: 800;
  letter-spacing: -0.09em;
  line-height: 1;
  pointer-events: none;
}

.question-card h2 {
  position: relative;
  z-index: 1;
  max-width: 59rem;
  margin: 0 0 1.65rem;
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: clamp(1.65rem, 3vw, 3rem);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 1.2;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.question-translation {
  position: relative;
  z-index: 1;
  max-width: 59rem;
  margin: -0.4rem 0 1.6rem;
  border-inline-start: 4px solid var(--dd-german-red);
  background: var(--dd-warm-ivory);
  padding: 1rem 1.1rem;
  text-align: start;
  unicode-bidi: plaintext;
}

.question-translation > span {
  color: var(--dd-german-red);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.question-translation p {
  margin: 0.45rem 0 0.5rem;
  font-size: clamp(1rem, 1.7vw, 1.28rem);
  font-weight: 700;
  line-height: 1.55;
}

.question-translation small {
  color: var(--dd-muted-dark);
  font-size: 0.7rem;
}

.image-frame {
  position: relative;
  z-index: 1;
  max-width: 59rem;
  margin: 0 0 1.6rem;
  border: 1px solid var(--dd-line-strong);
  background: white;
  padding: 0.8rem;
}

.image-frame img {
  width: 100%;
  max-height: 27rem;
  object-fit: contain;
  display: block;
}

.image-frame figcaption {
  margin-top: 0.55rem;
  color: var(--dd-muted-dark);
  font-size: 0.66rem;
  font-weight: 600;
}

.options-list {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.7rem;
  max-width: 61rem;
}

.option-button {
  min-height: 4rem;
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.8rem;
  border: 1px solid var(--dd-line-strong);
  border-inline-start: 4px solid var(--dd-line-strong);
  border-radius: 2px;
  background: rgba(250, 241, 225, 0.82);
  color: var(--dd-brand-navy);
  padding: 0.8rem 1rem;
  text-align: start;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.option-button:hover {
  border-color: var(--dd-golden-ochre);
  background: var(--dd-warm-ivory);
  transform: translateX(4px);
}

.option-key {
  width: 2.1rem;
  height: 2.1rem;
  display: grid;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  font-family: var(--font-latin), sans-serif;
  font-size: 0.78rem;
  font-weight: 800;
}

.option-copy {
  min-width: 0;
}

.option-text {
  display: block;
  overflow-wrap: anywhere;
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.93rem;
  font-weight: 500;
  line-height: 1.45;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.option-translation {
  display: block;
  margin-top: 0.42rem;
  color: var(--dd-german-red);
  font-family: var(--font-cjk), sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  line-height: 1.5;
  text-align: start;
  unicode-bidi: plaintext;
}

.option-status {
  min-width: 0;
  justify-self: end;
  font-size: 0.66rem;
  font-weight: 700;
  text-align: end;
  white-space: nowrap;
}

.option-button.is-correct {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.option-button.is-wrong {
  border-color: var(--error);
  background: var(--error-soft);
  color: var(--error);
}

.option-button.is-selected {
  border-color: var(--dd-golden-ochre);
  background: var(--ochre-soft);
  color: var(--dd-brand-navy);
}

.option-button:disabled {
  cursor: default;
  opacity: 1;
}

.option-button:disabled:hover {
  transform: none;
}

.feedback-box {
  position: relative;
  z-index: 1;
  max-width: 61rem;
  margin-top: 1.25rem;
  border-inline-start: 5px solid var(--success);
  background: var(--success-soft);
  padding: 0.9rem 1rem;
  font-size: 0.85rem;
  font-weight: 700;
  line-height: 1.5;
}

.feedback-box.is-wrong {
  border-inline-start-color: var(--error);
  background: var(--error-soft);
}

.answer-confidence {
  position: relative;
  z-index: 1;
  max-width: 61rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 0.55rem;
  border: 1px solid rgba(237, 154, 14, 0.52);
  background: rgba(247, 228, 185, 0.55);
  padding: 0.65rem 0.75rem 0.65rem 1rem;
  color: var(--dd-brand-navy);
  font-size: 0.76rem;
  font-weight: 700;
}

.answer-confidence button {
  min-height: 2.75rem;
  flex: 0 0 auto;
  border: 2px solid var(--dd-brand-navy);
  border-radius: 2px;
  background: var(--dd-brand-navy);
  color: var(--dd-warm-ivory);
  padding: 0 0.8rem;
  font-size: 0.7rem;
  font-weight: 800;
}

.answer-confidence button.is-active {
  border-color: var(--dd-golden-ochre);
  background: var(--ochre-soft);
  color: #765006;
}

.answer-guide {
  position: relative;
  z-index: 1;
  max-width: 61rem;
  margin-top: 1rem;
  border: 1px solid var(--dd-line-strong);
  border-top: 4px solid var(--dd-golden-ochre);
  background:
    linear-gradient(135deg, rgba(237, 154, 14, 0.08), transparent 42%),
    rgba(250, 241, 225, 0.72);
  padding: clamp(1rem, 2vw, 1.35rem);
  text-align: start;
}

.answer-guide::after {
  content: "DD";
  position: absolute;
  top: 0.45rem;
  inset-inline-end: 0.8rem;
  color: rgba(5, 21, 45, 0.055);
  font-family: var(--font-latin), sans-serif;
  font-size: 3.6rem;
  font-weight: 800;
  letter-spacing: -0.08em;
  pointer-events: none;
}

.answer-guide-heading {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 0.35rem;
  padding-inline-end: 3.8rem;
}

.answer-guide-heading > span {
  color: var(--dd-german-red);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.12em;
}

.answer-guide-heading h3 {
  margin: 0;
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
  line-height: 1.35;
}

.answer-guide-answer {
  position: relative;
  z-index: 1;
  margin: 1rem 0 0;
  color: var(--dd-brand-navy);
  font-weight: 800;
  line-height: 1.6;
  unicode-bidi: plaintext;
}

.answer-guide-why {
  position: relative;
  z-index: 1;
  margin: 0.55rem 0 0;
  color: var(--dd-brand-navy);
  font-size: 0.92rem;
  line-height: 1.75;
  unicode-bidi: plaintext;
}

.answer-translation-notice {
  position: relative;
  z-index: 1;
  margin: 0.75rem 0 0;
  border-inline-start: 3px solid rgba(237, 154, 14, 0.72);
  background: rgba(247, 228, 185, 0.42);
  padding: 0.55rem 0.7rem;
  color: var(--dd-muted-dark);
  font-size: 0.73rem;
  font-weight: 600;
  line-height: 1.55;
  unicode-bidi: plaintext;
}

.knowledge-details {
  position: relative;
  z-index: 1;
  margin-top: 1rem;
  border-top: 1px solid var(--dd-line-strong);
}

.knowledge-details summary {
  min-height: 3rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  cursor: pointer;
  color: var(--dd-brand-navy);
  font-weight: 800;
  list-style: none;
}

.knowledge-details summary::-webkit-details-marker {
  display: none;
}

.knowledge-details summary::after {
  content: "+";
  width: 1.6rem;
  height: 1.6rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  font-family: var(--font-latin), sans-serif;
}

.knowledge-details[open] summary::after {
  content: "−";
}

.knowledge-details summary small {
  margin-inline-start: auto;
  color: var(--dd-muted-dark);
  font-size: 0.66rem;
  font-weight: 500;
}

.knowledge-body {
  display: grid;
  gap: 0.8rem;
  padding: 0.15rem 0 0.35rem;
  font-size: 0.86rem;
  line-height: 1.7;
}

.knowledge-body > p,
.knowledge-body ul {
  margin: 0;
}

.knowledge-body > p,
.knowledge-body li {
  unicode-bidi: plaintext;
}

.knowledge-body ul {
  display: grid;
  gap: 0.35rem;
  padding-inline-start: 1.25rem;
}

.memory-tip {
  border-inline-start: 3px solid var(--dd-german-red);
  background: rgba(255, 255, 255, 0.56);
  padding: 0.7rem 0.8rem;
  color: var(--dd-brand-navy);
  font-weight: 700;
}

.knowledge-sources {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem 0.8rem;
  padding-top: 0.2rem;
}

.knowledge-sources a {
  color: var(--dd-brand-navy);
  font-size: 0.72rem;
  font-weight: 800;
  text-underline-offset: 0.2em;
}

.knowledge-sources small {
  color: var(--dd-muted-dark);
  font-size: 0.62rem;
}

.nav-row {
  min-height: 5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 2vw, 1.5rem);
  border-top: 1px solid var(--dd-line-dark);
  background: var(--dd-warm-ivory);
}

.nav-note {
  color: var(--dd-muted-dark);
  font-size: 0.7rem;
}

.primary-button,
.ghost-button,
.icon-button {
  min-height: 2.75rem;
  border: 2px solid var(--dd-brand-navy);
  border-radius: 2px;
  padding: 0 0.85rem;
  font-size: 0.74rem;
  font-weight: 700;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease,
    transform 160ms ease;
}

.primary-button {
  border-color: var(--dd-brand-navy);
  background: var(--dd-brand-navy);
  color: var(--dd-warm-ivory);
}

.primary-button:hover {
  border-color: var(--dd-golden-ochre);
  background: var(--dd-golden-ochre);
  color: var(--dd-midnight);
  transform: translateY(-2px);
}

.ghost-button {
  background: transparent;
  color: var(--dd-brand-navy);
}

.ghost-button:hover {
  border-color: var(--dd-german-red);
  color: var(--dd-german-red);
  transform: translateY(-2px);
}

.topbar .ghost-button {
  min-height: 2.6rem;
  border: 1px solid var(--dd-line-light);
  color: var(--dd-warm-ivory);
  font-size: 0.68rem;
}

.topbar .ghost-button:hover {
  border-color: var(--dd-golden-ochre);
  color: var(--dd-golden-ochre);
}

.icon-button {
  width: 2.75rem;
  padding: 0;
  background: transparent;
  color: var(--dd-brand-navy);
  font-size: 1.25rem;
  line-height: 1;
}

.icon-button:hover {
  border-color: var(--dd-golden-ochre);
  color: var(--dd-golden-ochre);
  transform: translateY(-2px);
}

.icon-button.is-active {
  border-color: var(--dd-golden-ochre);
  background: var(--ochre-soft);
  color: #926006;
}

.question-actions .ghost-button.is-active {
  border-color: var(--dd-german-red);
  background: var(--error-soft);
  color: var(--dd-german-red);
}

.question-actions .focus-button.is-active {
  border-color: var(--dd-golden-ochre);
  background: var(--ochre-soft);
  color: #765006;
}

.focus-button {
  min-width: 7.5rem;
}

.question-list-panel {
  grid-area: list;
  align-self: start;
  position: sticky;
  top: var(--sticky-navigation-height);
  max-height: calc(100vh - var(--sticky-navigation-height));
  display: grid;
  grid-template-rows: auto 1fr;
}

.list-heading {
  min-height: 4.9rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.8rem 1rem;
  border-bottom: 1px solid var(--dd-line-dark);
  background: var(--dd-warm-ivory);
}

.list-heading > div {
  display: grid;
  gap: 0.18rem;
}

.list-heading > div > span {
  color: var(--dd-german-red);
}

.list-heading strong {
  font-size: 1rem;
  font-weight: 900;
}

.list-heading small {
  min-width: 2.5rem;
  padding: 0.35rem 0.45rem;
  border: 1px solid var(--dd-line-dark);
  font-family: var(--font-latin), sans-serif;
  text-align: center;
}

.question-list {
  overflow: auto;
  scrollbar-color: var(--dd-golden-ochre) transparent;
  scrollbar-width: thin;
}

.question-list.is-exam-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(44px, 1fr));
  align-content: start;
  gap: 0.45rem;
  padding: 0.8rem;
  background: rgba(5, 21, 45, 0.035);
}

.exam-grid-item {
  min-width: 44px;
  min-height: 44px;
  border: 1px solid var(--dd-line-strong);
  border-radius: 2px;
  background: var(--dd-warm-ivory);
  color: var(--dd-brand-navy);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.76rem;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  transition:
    border-color 150ms ease,
    background 150ms ease,
    color 150ms ease,
    transform 150ms ease;
}

.exam-grid-item:hover {
  border-color: var(--dd-golden-ochre);
  transform: translateY(-2px);
}

.exam-grid-item.is-answered {
  border-color: #9a6504;
  background: var(--ochre-soft);
}

.exam-grid-item.is-correct {
  border-color: var(--success);
  background: var(--success-soft);
  color: var(--success);
}

.exam-grid-item.is-wrong {
  border-color: var(--error);
  background: var(--error-soft);
  color: var(--error);
}

.exam-grid-item.is-active {
  outline: 3px solid var(--dd-brand-navy);
  outline-offset: 2px;
}

.list-item {
  width: 100%;
  min-height: 3.5rem;
  display: grid;
  grid-template-columns: 3.3rem minmax(0, 1fr) 1.25rem;
  gap: 0.45rem;
  align-items: center;
  border: 0;
  border-bottom: 1px solid var(--dd-line-dark);
  border-inline-start: 4px solid transparent;
  border-radius: 0;
  background: transparent;
  padding: 0.65rem 0.65rem;
  text-align: start;
  transition:
    background 150ms ease,
    border-color 150ms ease;
}

.list-item:hover {
  background: var(--dd-warm-ivory);
}

.list-item.is-active {
  border-inline-start-color: var(--dd-german-red);
  background: var(--ochre-soft);
}

.list-id {
  color: var(--dd-muted-dark);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.63rem;
  font-weight: 700;
}

.list-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-family: var(--font-latin), var(--font-cjk), sans-serif;
  font-size: 0.7rem;
  font-weight: 500;
  direction: ltr;
  text-align: left;
  unicode-bidi: isolate;
}

.list-mark {
  color: var(--dd-german-red);
  font-size: 0.9rem;
  font-weight: 800;
}

.empty-state {
  align-self: center;
  padding: clamp(2rem, 7vw, 5rem);
}

.empty-state > span {
  color: var(--dd-german-red);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.12em;
}

.empty-state h2 {
  margin: 0.5rem 0 0.4rem;
  font-size: clamp(2rem, 5vw, 3.5rem);
  font-weight: 900;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.empty-state p {
  margin: 0;
  color: var(--dd-muted-dark);
}

.product-disclaimer {
  display: grid;
  grid-template-columns: minmax(12rem, 0.42fr) minmax(0, 1fr);
  gap: 0.45rem 1.5rem;
  align-items: start;
  padding: 1rem clamp(1rem, 2.4vw, 2.35rem);
  border-top: 1px solid var(--dd-line-dark);
  background: #eee8dc;
  color: var(--dd-brand-navy);
}

.product-disclaimer > span {
  color: var(--dd-german-red);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.11em;
}

.product-disclaimer p {
  max-width: 62rem;
  margin: 0;
  font-size: 0.78rem;
  line-height: 1.7;
}

.product-disclaimer a {
  color: var(--dd-brand-navy);
  font-weight: 800;
  text-decoration-color: var(--dd-golden-ochre);
  text-decoration-thickness: 0.12em;
  text-underline-offset: 0.18em;
}

.product-disclaimer a:hover {
  color: var(--dd-german-red);
}

.language-research-note {
  grid-column: 2;
  width: 100%;
  max-width: 62rem;
  margin-block-start: 0.25rem;
  border-block-start: 1px solid var(--dd-line-dark);
  color: var(--dd-muted-dark);
}

.language-research-note summary {
  min-height: 2.5rem;
  display: flex;
  align-items: center;
  gap: 0.65rem;
  cursor: pointer;
  color: var(--dd-brand-navy);
  font-size: 0.72rem;
  font-weight: 800;
  list-style: none;
}

.language-research-note summary::-webkit-details-marker {
  display: none;
}

.language-research-note summary::after {
  width: 1.45rem;
  height: 1.45rem;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  margin-inline-start: auto;
  border: 1px solid var(--dd-line-strong);
  color: var(--dd-german-red);
  content: "+";
  font-family: var(--font-latin), sans-serif;
  font-size: 0.9rem;
  line-height: 1;
}

.language-research-note[open] summary::after {
  content: "−";
}

.language-research-note p {
  padding-block-end: 0.7rem;
  color: var(--dd-muted-dark);
  unicode-bidi: plaintext;
}

.language-research-note > a {
  display: inline-flex;
  margin-block-end: 0.7rem;
  direction: ltr;
  font-size: 0.7rem;
  unicode-bidi: isolate;
}

.product-footer {
  min-height: 5.5rem;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  padding: 1rem clamp(1rem, 2.4vw, 2.35rem);
  border-top: 1px solid var(--dd-line-light);
  background: var(--dd-midnight);
  color: var(--dd-muted-light);
}

.product-footer > div {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  color: var(--dd-warm-ivory);
  font-weight: 700;
}

.product-footer .footer-wordmark {
  width: 10rem;
  height: auto;
  object-fit: contain;
}

.product-footer p {
  margin: 0;
  color: var(--dd-golden-ochre);
  font-family: var(--font-latin), sans-serif;
  font-size: 0.76rem;
  font-weight: 500;
}

.product-footer > span {
  font-family: var(--font-latin), sans-serif;
  font-size: 0.59rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-align: end;
}

html[dir="rtl"] .language-control select {
  background-position:
    0.9rem calc(50% - 0.08rem),
    0.62rem calc(50% - 0.08rem);
}

html[dir="rtl"] .question-translation,
html[dir="rtl"] .answer-guide {
  direction: rtl;
}

html[dir="rtl"] .option-button:hover {
  transform: translateX(-4px);
}

@keyframes locale-loading-spin {
  to {
    transform: rotate(1turn);
  }
}

@keyframes shell-in {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@media (max-width: 1280px) {
  .workspace {
    grid-template-columns: 14rem minmax(0, 1fr);
    grid-template-areas:
      "side question"
      "list list";
  }

  .question-list-panel {
    grid-column: 1 / -1;
    position: static;
    max-height: 22rem;
  }

  .question-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .list-item:nth-child(odd) {
    border-inline-end: 1px solid var(--dd-line-dark);
  }
}

@media (max-width: 1400px) {
  .topbar {
    align-items: flex-start;
    flex-direction: column;
  }

  .top-actions {
    width: 100%;
    grid-template-columns: minmax(0, 1fr) minmax(10rem, 13rem) minmax(12rem, 16rem);
    justify-items: start;
  }

  .top-actions > .language-control,
  .state-control {
    width: 100%;
  }

  .account-buttons {
    grid-column: 2 / -1;
    justify-self: end;
  }

  .sync-hint {
    justify-self: end;
  }
}

@media (max-width: 900px) {
  :root {
    --page-gutter: 0rem;
    --mode-tabs-height: 3.6rem;
  }

  .app-shell {
    width: 100%;
    margin: 0;
    border: 0;
  }

  .topbar {
    min-height: auto;
    gap: 1.25rem;
    padding: 1.2rem 1rem 1.65rem;
  }

  .brand {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .brand-logo {
    width: 9.5rem;
  }

  .brand-divider {
    display: none;
  }

  .brand-product {
    flex-basis: 100%;
    padding-top: 0.85rem;
    border-top: 1px solid var(--dd-line-light);
  }

  .brand h1 {
    font-size: 1.8rem;
  }

  .top-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
    gap: 0.7rem;
  }

  .account-status {
    grid-column: 1 / -1;
    min-width: 0;
  }

  .user-badge {
    max-width: 10rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .sync-hint {
    display: none;
  }

  .top-actions > .language-control {
    grid-column: 1;
    width: 100%;
  }

  .state-control {
    grid-column: 2;
    width: 100%;
  }

  .state-select,
  .language-control select {
    width: 100%;
    min-width: 0;
  }

  .account-buttons {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .topbar .ghost-button {
    padding: 0 0.65rem;
  }

  .mode-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .mode-tab {
    min-height: var(--mode-tabs-height);
  }

  .review-subnav {
    top: var(--mode-tabs-height);
  }

  .workspace {
    display: flex;
    flex-direction: column;
    gap: 1px;
  }

  .question-panel {
    min-height: auto;
    display: flex;
    flex-direction: column;
  }

  .mobile-exam-strip {
    position: fixed;
    z-index: 18;
    top: 0;
    inset-inline: 0;
    min-height: 4.25rem;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 4px solid var(--dd-golden-ochre);
    background: var(--dd-brand-navy);
    padding: 0.6rem 1rem;
    color: var(--dd-warm-ivory);
    box-shadow: 0 0.55rem 1.3rem rgba(0, 11, 24, 0.18);
  }

  .app-shell.is-exam-mode .question-panel {
    padding-top: 4.25rem;
  }

  .mobile-exam-strip > div {
    display: grid;
    gap: 0.05rem;
  }

  .mobile-exam-strip small,
  .mobile-exam-strip strong {
    color: var(--dd-muted-light);
    font-size: 0.62rem;
    font-weight: 700;
  }

  .mobile-exam-strip time {
    color: var(--dd-warm-ivory);
    font-family: var(--font-latin), sans-serif;
    font-size: 1.35rem;
    font-variant-numeric: tabular-nums;
    font-weight: 800;
    line-height: 1.1;
  }

  .mobile-exam-strip time.is-urgent {
    color: var(--dd-golden-ochre);
  }

  .mobile-exam-strip button {
    min-width: 3.8rem;
    min-height: 44px;
    border: 1px solid var(--dd-warm-ivory);
    border-radius: 2px;
    background: transparent;
    color: var(--dd-warm-ivory);
    font-size: 0.72rem;
    font-weight: 800;
  }

  .side-panel {
    position: static;
    width: 100%;
    align-self: stretch;
  }

  .question-list-panel {
    width: 100%;
    align-self: stretch;
    max-height: 24rem;
  }

  .app-shell.is-exam-mode .question-list-panel {
    max-height: none;
  }

  .app-shell.is-exam-mode .question-list.is-exam-grid {
    grid-template-columns: repeat(7, minmax(44px, 1fr));
  }

  .question-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .progress-track {
    width: 100%;
  }

  .question-actions {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .question-actions .ghost-button {
    width: 100%;
  }

  .question-card {
    padding: 1.35rem 1rem 1.6rem;
  }

  .question-card h2 {
    font-size: clamp(1.4rem, 7vw, 2rem);
    line-height: 1.25;
  }

  .question-watermark {
    top: 0;
    inset-inline-end: 0.4rem;
    font-size: 7.5rem;
  }

  .option-button {
    grid-template-columns: 2.15rem minmax(0, 1fr);
    padding: 0.75rem;
  }

  .option-status {
    grid-column: 2;
    justify-self: start;
    text-align: start;
    white-space: normal;
  }

  .option-button:hover {
    transform: none;
  }

  .nav-row {
    align-items: stretch;
    flex-direction: column;
  }

  .nav-note {
    text-align: center;
  }

  .nav-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .nav-buttons button {
    width: 100%;
  }

  .metric-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .metric-grid div {
    min-height: 4.5rem;
    display: block;
    border-inline-end: 1px solid var(--dd-line-dark);
    border-bottom: 0;
  }

  .metric-grid div:last-child {
    border-inline-end: 0;
  }

  .metric-grid span {
    display: block;
    font-size: 1.55rem;
  }

  .side-signature {
    min-height: 6rem;
  }

  .question-list {
    display: block;
  }

  .list-item:nth-child(odd) {
    border-inline-end: 0;
  }

  .product-footer {
    grid-template-columns: 1fr;
    gap: 0.5rem;
    padding: 1.25rem 1rem;
  }

  .product-footer p,
  .product-footer > span {
    text-align: start;
  }

  .product-disclaimer {
    grid-template-columns: 1fr;
    gap: 0.45rem;
  }

  .language-research-note {
    grid-column: 1;
  }

  .auth-gate {
    align-items: start;
    padding: 0.75rem;
  }

  .auth-card {
    max-height: none;
    padding: 1.25rem;
  }

  .auth-brand span {
    display: none;
  }

  .auth-heading {
    grid-template-columns: 1fr;
    gap: 0.8rem;
    padding: 1.6rem 0 1.25rem;
  }

  .auth-index {
    font-size: 2.3rem;
  }

  .auth-card h2 {
    font-size: 2rem;
  }
}

@media (max-width: 430px) {
  .top-actions {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .account-status {
    grid-column: 1;
    justify-content: space-between;
  }

  .state-control {
    grid-column: 1;
  }

  .language-control,
  .auth-language-control {
    grid-column: 1;
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .auth-language-control {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .auth-language-control > select {
    grid-column: 1;
    grid-row: auto;
  }

  .language-control select {
    width: 100%;
    min-width: 0;
    max-width: 100%;
  }

  .account-buttons {
    grid-column: 1;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.3rem;
  }

  .topbar .ghost-button {
    width: 100%;
    min-height: 2.75rem;
    padding: 0 0.5rem;
    font-size: 0.62rem;
  }

  .mode-tab {
    gap: 0.45rem;
  }

  .mode-tab > strong {
    font-size: 0.78rem;
  }

  .question-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .question-actions .focus-button {
    width: 100%;
    min-width: 0;
  }

  .question-actions #wrongToggleButton {
    grid-column: 1 / -1;
  }

  .review-view-tab {
    gap: 0.28rem;
    padding-inline: 0.35rem;
    font-size: 0.7rem;
  }

  .answer-confidence {
    align-items: stretch;
    flex-direction: column;
  }

  .answer-confidence button {
    width: 100%;
  }
}

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