:root {
  color-scheme: light dark;
  --table: #f5f4f0;
  --paper: #fffefa;
  --paper-edge: #d9d5ca;
  --text: #2b2d2f;
  --muted: #656964;
  --quiet: #8d918b;
  --line: #dad8d0;
  --line-strong: #c9c5bb;
  --accent: #5f6b65;
  --shadow: rgba(56, 50, 42, 0.16);
  --grid-major: rgba(116, 124, 118, 0.045);
  --grid-minor: rgba(116, 124, 118, 0.026);
  --glow: rgba(255, 255, 255, 0.92);
  --margin-rule: rgba(206, 74, 44, 0.28);
  --margin-rule-soft: rgba(206, 74, 44, 0.12);
  --margin-rule-faint: rgba(206, 74, 44, 0.09);
  --paper-line: rgba(92, 96, 92, 0.055);
  --paper-line-soft: rgba(92, 96, 92, 0.04);
  --paper-line-faint: rgba(92, 96, 92, 0.035);
  --paper-rule: 31px;
  --paper-half-rule: calc(var(--paper-rule) / 2);
  --paper-rule-offset: 11.5px;
  --paper-pad-x: 38px;
  --paper-pad-y: 32px;
  --panel: rgba(255, 255, 255, 0.34);
  --panel-action: rgba(255, 255, 255, 0.48);
  --panel-action-hover: rgba(255, 255, 255, 0.58);
  --panel-action-border: rgba(95, 107, 101, 0.34);
  --panel-action-border-hover: rgba(95, 107, 101, 0.5);
  --panel-action-inset: rgba(88, 100, 95, 0.12);
  --placeholder: rgba(101, 105, 100, 0.62);
  --note: rgba(101, 105, 100, 0.62);
  --complete: #46734f;
  --danger: #a14f3d;
  --paper-gradient-a: rgba(255, 254, 250, 0.68);
  --paper-gradient-b: rgba(246, 244, 236, 0.58);
  --paper-gradient-c: rgba(246, 244, 236, 0.5);
  --paper-gradient-d: rgba(255, 254, 250, 0.7);
  --sheet-inset: rgba(255, 255, 255, 0.9);
  --stack-shadow: rgba(56, 50, 42, 0.06);
}

html[data-theme="dark"] {
  color-scheme: dark;
  --table: #171a18;
  --paper: #252824;
  --paper-edge: #4a5049;
  --text: #ece8dc;
  --muted: #b5b6ad;
  --quiet: #8d9289;
  --line: #454a42;
  --line-strong: #565d53;
  --accent: #a0aba2;
  --shadow: rgba(0, 0, 0, 0.38);
  --grid-major: rgba(212, 220, 207, 0.045);
  --grid-minor: rgba(212, 220, 207, 0.025);
  --glow: rgba(92, 100, 91, 0.24);
  --margin-rule: rgba(196, 92, 70, 0.26);
  --margin-rule-soft: rgba(196, 92, 70, 0.13);
  --margin-rule-faint: rgba(196, 92, 70, 0.1);
  --paper-line: rgba(218, 224, 211, 0.055);
  --paper-line-soft: rgba(218, 224, 211, 0.04);
  --paper-line-faint: rgba(218, 224, 211, 0.035);
  --panel: rgba(255, 255, 255, 0.045);
  --panel-action: rgba(255, 255, 255, 0.075);
  --panel-action-hover: rgba(255, 255, 255, 0.105);
  --panel-action-border: rgba(160, 171, 162, 0.34);
  --panel-action-border-hover: rgba(160, 171, 162, 0.5);
  --panel-action-inset: rgba(255, 255, 255, 0.08);
  --placeholder: rgba(181, 182, 173, 0.62);
  --note: rgba(181, 182, 173, 0.58);
  --complete: #8fb995;
  --danger: #d18a77;
  --paper-gradient-a: rgba(42, 45, 41, 0.68);
  --paper-gradient-b: rgba(31, 34, 31, 0.58);
  --paper-gradient-c: rgba(31, 34, 31, 0.5);
  --paper-gradient-d: rgba(42, 45, 41, 0.7);
  --sheet-inset: rgba(255, 255, 255, 0.08);
  --stack-shadow: rgba(0, 0, 0, 0.2);
}

html[data-theme="light"] {
  color-scheme: light;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100vh;
  margin: 0;
  background:
    linear-gradient(var(--grid-major) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-major) 1px, transparent 1px),
    linear-gradient(var(--grid-minor) 1px, transparent 1px),
    linear-gradient(90deg, var(--grid-minor) 1px, transparent 1px),
    radial-gradient(circle at 50% 18%, var(--glow), transparent 44%),
    var(--table);
  background-size: 96px 96px, 96px 96px, 16px 16px, 16px 16px, auto, auto;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.landing-shell {
  position: relative;
  width: min(1080px, calc(100% - 32px));
  margin: 0 auto;
  padding: 20px 0;
}

.paper-stack {
  min-height: calc(100vh - 40px);
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.paper-sheet {
  position: relative;
  isolation: isolate;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: min(640px, calc((100vh - 40px) / 1.414), 100%);
  aspect-ratio: 1 / 1.414;
  padding: var(--paper-pad-y) var(--paper-pad-x) 28px;
  border: 1px solid var(--paper-edge);
  background:
    linear-gradient(90deg, transparent 0, transparent 47px, var(--margin-rule) 48px, transparent 49px),
    linear-gradient(var(--paper-line) 1px, transparent 1px),
    var(--paper);
  background-size: auto, 100% var(--paper-rule), auto;
  background-position: 0 0, 0 var(--paper-pad-y), 0 0;
  box-shadow: 0 26px 70px var(--shadow), 0 2px 0 var(--sheet-inset) inset;
}

.report-shell {
  width: min(1240px, calc(100% - 32px));
}

.report-shell .paper-sheet {
  width: min(760px, 100%);
  aspect-ratio: auto;
  min-height: calc(100vh - 40px);
  background:
    linear-gradient(90deg, transparent 0, transparent 47px, var(--margin-rule) 48px, transparent 49px),
    var(--paper);
  background-size: auto;
}

.report-shell .paper-sheet::before,
.report-shell .paper-sheet::after {
  background: var(--paper);
}

.paper-sheet::before,
.paper-sheet::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border: 1px solid color-mix(in srgb, var(--paper-edge) 74%, transparent);
  background: var(--paper);
  transform-origin: center;
  box-shadow: 0 14px 28px var(--stack-shadow);
}

.paper-sheet::before {
  background:
    linear-gradient(90deg, transparent 0, transparent 47px, var(--margin-rule-soft) 48px, transparent 49px),
    linear-gradient(var(--paper-line-soft) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-gradient-a), var(--paper-gradient-b)),
    var(--paper);
  background-size: auto, 100% var(--paper-rule), auto, auto;
  background-position: 0 0, 0 var(--paper-pad-y), 0 0, 0 0;
  transform: translate(6px, 7px) rotate(0.16deg);
}

.paper-sheet::after {
  background:
    linear-gradient(90deg, transparent 0, transparent 47px, var(--margin-rule-faint) 48px, transparent 49px),
    linear-gradient(var(--paper-line-faint) 1px, transparent 1px),
    linear-gradient(90deg, var(--paper-gradient-c), var(--paper-gradient-d)),
    var(--paper);
  background-size: auto, 100% var(--paper-rule), auto, auto;
  background-position: 0 0, 0 var(--paper-pad-y), 0 0, 0 0;
  transform: translate(-4px, 11px);
}

.landing-shell:not(.report-shell):not(.pricing-shell) .paper-sheet {
  display: grid;
  grid-template-rows: repeat(38, var(--paper-half-rule)) minmax(0, 1fr) var(--paper-rule);
  padding-top: calc(var(--paper-pad-y) + var(--paper-rule-offset));
}

.landing-shell:not(.report-shell):not(.pricing-shell) .paper-sheet {
  width: min(500px, 100%);
  aspect-ratio: auto;
  min-height: auto;
  grid-template-rows: repeat(28, var(--paper-half-rule));
}

.landing-shell:not(.report-shell) .report-header {
  align-items: start;
  grid-row: 1 / 6;
  border-bottom: 0;
  min-height: 0;
  padding-bottom: 0;
  transform: translateY(calc(var(--paper-half-rule) * -1));
}

.landing-shell:not(.report-shell) .report-header h1 a,
.landing-shell:not(.report-shell) .publisher-mark {
  display: flex;
  align-items: center;
  min-height: calc(var(--paper-rule) * 2);
}

.landing-shell:not(.report-shell) .publisher-mark {
  margin-top: 0;
}

.landing-shell:not(.report-shell) .report-subject {
  transform: translateY(calc((var(--paper-rule) * -1) + 17px));
}

.landing-shell:not(.report-shell) .summary-grid {
  grid-row: 6 / 14;
  margin-top: 0;
  transform: translateY(calc(var(--paper-half-rule) * -1));
}

.landing-shell:not(.report-shell) .report-body {
  display: grid;
  grid-template-columns: 184px minmax(0, 1fr);
  grid-template-rows: repeat(3, calc(var(--paper-rule) * 2));
  grid-row: 15 / 27;
  border-top: 0;
  margin-top: 0;
}

.landing-shell:not(.report-shell) .sample-position {
  grid-column: 1;
  grid-row: 1 / 4;
  align-self: center;
  justify-self: center;
  margin: 0;
  transform: translateY(calc(var(--paper-half-rule) * -1));
}

.landing-shell:not(.report-shell) .sample-position-board {
  width: 156px;
}

.landing-shell:not(.report-shell) .report-footer {
  grid-row: 40 / 41;
  align-self: stretch;
  align-items: center;
  justify-content: center;
  transform: translateY(calc(var(--paper-rule) - 13.5px));
  margin-top: 0;
  padding-top: 0;
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

.landing-shell:not(.report-shell) .summary-panel,
.landing-shell:not(.report-shell) .rule-block {
  min-height: 0;
}

.landing-shell:not(.report-shell) .summary-panel {
  display: flex;
  flex-direction: column;
  min-height: calc(var(--paper-rule) * 2.5);
  background: var(--paper);
}

.landing-shell:not(.report-shell) .summary-panel .field-label {
  display: block;
  width: auto;
  margin-right: -11px;
  margin-left: -11px;
  padding-right: 11px;
  padding-left: 11px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--line);
}

.landing-shell:not(.report-shell) .summary-panel-large .field-label {
  margin-right: -28px;
  padding-right: 28px;
}

.landing-shell:not(.report-shell) .summary-panel-large p {
  margin-top: auto;
  margin-bottom: auto;
}

.landing-shell:not(.report-shell) .summary-panel-action .account-form {
  margin-top: auto;
}

.landing-shell:not(.report-shell) .summary-panel-action .account-note,
.landing-shell:not(.report-shell) .summary-panel-action .account-status {
  margin-bottom: auto;
}

.landing-shell:not(.report-shell) .summary-panel-action {
  background: color-mix(in srgb, var(--accent) 4%, var(--paper));
}

.landing-shell:not(.report-shell) .summary-panel-action:hover,
.landing-shell:not(.report-shell) .summary-panel-action:focus-within {
  background: color-mix(in srgb, var(--accent) 7%, var(--paper));
}

.landing-shell:not(.report-shell) .rule-block {
  grid-column: 2 / -1;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 16px;
  border-bottom: 0;
  height: calc(var(--paper-rule) * 2);
  align-items: start;
  padding: 0;
}

.landing-shell:not(.report-shell) .report-body > .rule-block:nth-of-type(1) {
  grid-row: 1;
}

.landing-shell:not(.report-shell) .report-body > .rule-block:nth-of-type(2) {
  grid-row: 1;
  transform: translateY(var(--paper-rule));
}

.landing-shell:not(.report-shell) .report-body > .rule-block:nth-of-type(3) {
  grid-row: 2;
  transform: translateY(var(--paper-rule));
}

.landing-shell:not(.report-shell) .section-number {
  align-self: start;
  justify-self: end;
  display: inline-flex;
  align-items: center;
  min-height: var(--paper-rule);
  font-size: 21px;
  line-height: 1;
  transform: translateY(0);
}

.landing-shell:not(.report-shell) .rule-block > div {
  display: grid;
  grid-template-rows: repeat(2, var(--paper-rule));
  min-height: calc(var(--paper-rule) * 2);
  transform: translateY(0);
}

.landing-shell:not(.report-shell) .rule-block h2 {
  display: flex;
  align-items: center;
  min-height: var(--paper-rule);
  margin-bottom: 0;
}

.landing-shell:not(.report-shell) .rule-block h2:only-child {
  grid-row: 1;
}

.landing-shell:not(.report-shell) .rule-block p {
  display: flex;
  align-items: center;
  grid-row: 2;
  min-height: var(--paper-rule);
  line-height: calc(var(--paper-rule) / 2);
}

.report-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  padding-bottom: 20px;
  border-bottom: 1px solid var(--line-strong);
}

.field-label,
.report-footer {
  text-transform: uppercase;
  letter-spacing: 0.055em;
}

.report-header h1 {
  margin: 0;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 42px;
  font-weight: 500;
  line-height: 0.98;
  letter-spacing: 0;
  white-space: nowrap;
}

.report-header h1 a {
  color: inherit;
  text-decoration: none;
}

.report-header h1 a:hover {
  color: var(--accent);
}

.report-meta {
  position: relative;
  display: grid;
  align-items: start;
  justify-items: end;
  gap: 8px;
}

.report-subject {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--complete);
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
}

.report-subject a {
  color: inherit;
  text-decoration: none;
}

.report-subject a:hover,
.report-subject a:focus-visible {
  color: var(--accent);
  outline: none;
}

.report-subject[hidden] {
  display: none;
}

.publisher-mark {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 3px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 650;
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: 0.055em;
  white-space: nowrap;
}

.publisher-mark img {
  display: block;
  width: 96px;
  height: auto;
  opacity: 0.78;
}

.page-menu {
  position: fixed;
  top: 18px;
  left: 18px;
  z-index: 30;
}

.page-menu,
.page-menu-panel {
  color: var(--text);
}

.page-menu {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.page-menu summary {
  list-style: none;
}

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

.page-menu-toggle {
  position: relative;
}

.page-menu-toggle,
.theme-btn {
  width: 32px;
  height: 32px;
  border: 1px solid var(--line);
  background: var(--panel-action);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  color: var(--text);
  cursor: pointer;
  transition: border-color 120ms ease, background 120ms ease, color 120ms ease;
}

.page-menu-toggle:hover,
.page-menu-toggle:focus-visible,
.theme-btn:hover,
.theme-btn:focus-visible {
  border-color: var(--panel-action-border-hover);
  background: var(--panel-action-hover);
}

.page-menu-toggle:focus-visible,
.theme-btn:focus-visible,
.page-menu-item:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.page-menu[open] .page-menu-toggle,
.theme-btn.is-active {
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 14%, var(--panel-action));
}

.page-menu-toggle img,
.theme-btn img {
  display: block;
  width: 17px;
  height: 17px;
  opacity: 0.82;
  filter: brightness(0) saturate(100%) invert(39%) sepia(8%) saturate(615%) hue-rotate(101deg) brightness(94%) contrast(88%);
  pointer-events: none;
}

.page-menu-toggle:hover img,
.page-menu-toggle:focus-visible img,
.theme-btn:hover img,
.theme-btn:focus-visible img,
.theme-btn.is-active img {
  opacity: 1;
}

.page-menu-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  min-width: 172px;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: color-mix(in srgb, var(--paper) 94%, transparent);
  box-shadow: 0 14px 32px var(--shadow);
  display: flex;
  flex-direction: column;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(-4px) scale(0.98);
  transform-origin: top left;
  transition: opacity 120ms ease, transform 120ms ease, visibility 120ms ease;
}

.page-menu[open] .page-menu-panel,
.page-menu.is-open .page-menu-panel {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.page-menu-item {
  display: block;
  width: 100%;
  padding: 8px 9px;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.1;
  text-align: left;
  text-decoration: none;
  cursor: pointer;
  transition: background 120ms ease, color 120ms ease;
}

.page-menu-item:hover,
.page-menu-item:focus-visible {
  background: color-mix(in srgb, var(--accent) 9%, var(--paper));
  color: var(--text);
}

.page-menu-item:disabled {
  color: var(--quiet);
  cursor: default;
}

.page-menu-item:disabled:hover {
  background: transparent;
}

.page-menu-divider {
  height: 1px;
  margin: 4px 2px;
  background: var(--line);
}

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 2px 1px 1px;
}

.summary-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 12px;
  margin-top: 18px;
}

.paper-sheet[data-mode="repair"] .summary-grid {
  display: none;
}

.summary-panel {
  min-height: 74px;
  padding: 10px 11px 9px;
  border: 1px solid var(--line);
  background: var(--panel);
}

.summary-panel-large {
  padding-right: 28px;
}

.summary-panel-action {
  border-color: var(--panel-action-border);
  background: var(--panel-action);
  box-shadow: 0 1px 0 var(--panel-action-inset) inset;
}

.summary-panel-action .field-label {
  color: var(--accent);
}

.summary-panel-action:hover,
.summary-panel-action:focus-within {
  border-color: var(--panel-action-border-hover);
  background: var(--panel-action-hover);
}

.summary-panel-action.is-verified {
  border-color: color-mix(in srgb, var(--complete), var(--panel-action-border) 35%);
}

.summary-panel-action.is-error {
  animation: account-error-flash 640ms ease;
}

.summary-panel-action.is-error,
.summary-panel-action.is-error:focus-within {
  border-color: var(--danger);
  background: color-mix(in srgb, var(--danger) 13%, var(--panel-action));
}

.summary-panel-action.is-error input {
  border-bottom-color: var(--danger);
}

.field-label {
  display: block;
  margin-bottom: 8px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 650;
}

.summary-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.summary-panel-large p {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.account-form {
  position: relative;
}

.account-form input,
.account-form button {
  font: inherit;
}

.account-form input {
  width: 100%;
  min-width: 0;
  min-height: 32px;
  padding: 4px 34px 5px 0;
  border: 0;
  border-bottom: 1px solid var(--accent);
  background: transparent;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
  outline: none;
}

.account-form input:focus {
  border-bottom-color: var(--accent);
}

.account-form input::placeholder {
  color: var(--placeholder);
}

.account-form button {
  position: absolute;
  right: -4px;
  bottom: 1px;
  width: 30px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.account-form button:hover {
  transform: translateX(1px);
}

.account-form button:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 2px;
}

.account-form button img {
  display: block;
  width: 24px;
  height: 24px;
  opacity: 0.94;
  pointer-events: none;
}

.account-form button:hover img,
.account-form button:focus-visible img {
  opacity: 1;
}

.summary-panel-action.is-checking .account-form button,
.summary-panel-action.is-verified .account-form button {
  pointer-events: none;
}

.summary-panel-action.is-checking .account-form button img {
  opacity: 0.38;
}

.summary-panel-action.is-verified .account-form button img {
  opacity: 0;
}

.summary-panel-action.is-verified .account-form::after {
  content: "";
  position: absolute;
  right: 6px;
  bottom: 11px;
  width: 9px;
  height: 5px;
  border-left: 1.5px solid var(--complete);
  border-bottom: 1.5px solid var(--complete);
  transform: rotate(-45deg);
}

.summary-panel-action.is-verified input {
  color: var(--complete);
}

html[data-theme="dark"] .account-form button img {
  filter: brightness(1.78) saturate(0.62);
}

html[data-theme="dark"] .page-menu-toggle img,
html[data-theme="dark"] .theme-btn img {
  filter: brightness(0) saturate(100%) invert(75%) sepia(8%) saturate(257%) hue-rotate(94deg) brightness(88%) contrast(88%);
}

html[data-theme="dark"] .publisher-mark img {
  filter: brightness(0) invert(1) sepia(0.12) saturate(0.55);
  opacity: 0.82;
}

.summary-panel .account-note,
.summary-panel .account-status {
  margin-top: 8px;
  color: var(--note);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.35;
  letter-spacing: 0;
}

.summary-panel .account-status {
  color: var(--muted);
}

.summary-panel .account-status.is-error {
  color: var(--danger);
}

@keyframes account-error-flash {
  0%,
  100% {
    transform: translateX(0);
  }

  12% {
    transform: translateX(-5px);
  }

  24% {
    transform: translateX(5px);
  }

  38% {
    transform: translateX(-4px);
  }

  52% {
    transform: translateX(4px);
  }

  68% {
    transform: translateX(-2px);
  }

  84% {
    transform: translateX(2px);
  }
}

.repair-panel {
  margin-top: 18px;
}

.repair-panel-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.progress-track {
  height: 5px;
  margin-top: 9px;
  background: var(--line);
}

.progress-track span {
  display: block;
  width: 12%;
  height: 100%;
  background: var(--accent);
  transition: width 160ms ease;
}

.repair-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.4;
}

.repair-report-summary {
  margin-top: 12px;
  display: grid;
  gap: 4px;
}

.repair-report-summary p {
  margin: 0;
}

.repair-report-intro {
  color: var(--text);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
}

.repair-report-generated {
  color: var(--quiet);
  font-size: 11px;
  font-weight: 500;
  line-height: 1.35;
}

.repair-section-bar {
  display: flex;
  align-items: flex-end;
  gap: 12px;
  margin-top: 12px;
  border-bottom: 1px solid var(--line-strong);
}

.repair-section-bar[hidden] {
  display: none;
}

.repair-tabs {
  display: flex;
  align-items: end;
  gap: 0;
}

.repair-tabs[hidden] {
  display: none;
}

.repair-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  z-index: 1;
  margin: 0 0 -1px;
  padding: 7px 10px 6px;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.repair-tab + .repair-tab {
  border-left: 0;
}

.repair-tab-count {
  color: var(--muted);
  font-size: 8px;
  font-variant-numeric: tabular-nums;
}

.repair-tab[aria-selected="true"] {
  border-color: var(--line-strong);
  color: var(--text);
}

.repair-tab[aria-selected="true"]::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 1px;
  background: var(--paper);
}

.repair-tab:hover,
.repair-tab:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.repair-tab:disabled {
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
  cursor: default;
}

.repair-tab:disabled:hover {
  border-color: var(--line-strong);
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
}

.repair-tab:disabled .repair-tab-count {
  color: inherit;
}

.report-actions {
  display: flex;
  align-items: center;
  gap: 0;
  margin-left: auto;
}

.start-training-action {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin: 0;
  padding: 0 8px;
  border: 0;
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.start-training-action[hidden] {
  display: none;
}

.start-training-icon {
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("/static/img/target-arrow.svg") center / contain no-repeat;
  mask: url("/static/img/target-arrow.svg") center / contain no-repeat;
}

.extend-report-icon {
  display: block;
  width: 13px;
  height: 13px;
  background: currentColor;
  -webkit-mask: url("/static/img/cylinder-plus.svg") center / contain no-repeat;
  mask: url("/static/img/cylinder-plus.svg") center / contain no-repeat;
}

.start-training-action:hover,
.start-training-action:focus-visible {
  color: var(--text);
  outline: none;
}

.start-training-action:disabled {
  opacity: 0.72;
  cursor: default;
}

.queue-preview {
  margin-top: 0;
}

.queue-preview ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.queue-preview li,
.opening-choice-preview li {
  display: grid;
  grid-template-columns: 124px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.queue-preview li:last-child,
.opening-choice-preview li:last-child {
  border-bottom: 0;
}

.queue-preview li.queue-empty {
  grid-template-columns: 1fr;
}

.queue-empty .queue-body {
  justify-items: center;
  text-align: center;
}

.queue-waiting-illustration {
  display: block;
  width: min(260px, 72%);
  height: auto;
  margin: 4px auto 10px;
  mix-blend-mode: multiply;
}

html[data-theme="dark"] .queue-waiting-illustration {
  content: url("/static/img/pawn_reading_dark.png");
  mix-blend-mode: normal;
}

.queue-board {
  display: block;
  width: 124px;
  aspect-ratio: 1;
  align-self: start;
  border-radius: 2px;
  outline: 0 solid transparent;
  outline-offset: 3px;
  transition: outline-color 140ms ease;
}

.queue-board:hover,
.queue-board:focus-visible {
  outline: 1px solid color-mix(in srgb, var(--accent) 58%, transparent);
}

.queue-board .cm-chessboard {
  display: block;
  width: 100%;
  height: 100%;
}

.queue-header {
  display: flex;
  gap: 6px;
  align-items: baseline;
  min-width: 0;
}

.queue-rank,
.queue-count {
  color: var(--quiet);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.queue-title {
  min-width: 0;
  color: var(--text);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-decision-badge {
  flex: 0 0 auto;
  border: 1px solid var(--rule);
  color: var(--quiet);
  font-size: 8px;
  font-weight: 900;
  line-height: 1;
  padding: 3px 5px 2px;
  text-transform: uppercase;
  white-space: nowrap;
}

.queue-line,
.queue-move,
.queue-data {
  color: var(--muted);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  font-variant-numeric: tabular-nums;
}

.queue-line {
  display: block;
  margin-top: 9px;
  color: var(--quiet);
}

.move-comparison {
  display: grid;
  gap: 5px;
  margin-top: 10px;
  width: 244px;
}

.move-comparison-row {
  display: grid;
  grid-template-columns: 60px 88px 36px;
  gap: 7px;
  align-items: baseline;
  color: var(--text);
  font-size: 12px;
  line-height: 1.35;
  font-variant-numeric: tabular-nums;
}

.move-comparison-label {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.move-comparison-move {
  min-width: 0;
  font-weight: 750;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.move-comparison-eval {
  font-weight: 800;
  text-align: right;
}

.move-comparison-eval.is-played {
  color: var(--danger);
}

.move-comparison-eval.is-best {
  color: var(--complete);
}

.move-comparison-eval.is-score {
  color: var(--text);
}

.review-training-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  margin-top: 10px;
  max-width: 100%;
}

.review-training-line[hidden] {
  display: none;
}

.review-training-line-label {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.queue-move {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-data {
  text-align: right;
}

.queue-summary {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.35;
}

.success-rate-note {
  display: block;
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.4;
}

.success-rate-value {
  font-weight: 900;
}

.success-rate-value.is-low {
  color: var(--danger);
}

.success-rate-value.is-neutral,
.success-rate-value.is-unknown {
  color: var(--text);
}

.success-rate-value.is-high {
  color: var(--complete);
}

.queue-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 10px;
  margin-top: 18px;
}

.queue-action {
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 1px 10px 0;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: none;
  text-transform: uppercase;
}

.queue-action-primary {
  border-color: var(--accent);
  color: var(--accent);
}

.queue-action-link {
  color: var(--text);
  text-decoration: none;
}

.queue-action-icon {
  display: block;
  width: 12px;
  height: 12px;
  object-fit: contain;
}

html[data-theme="dark"] .queue-action-icon-lichess {
  content: url("/static/img/lichesslogowhite.svg");
}

.queue-action:hover,
.queue-action:focus-visible,
.queue-action[aria-pressed="true"] {
  border-color: var(--text);
  color: var(--text);
  outline: none;
}

.opening-choice-preview {
  margin-top: 0;
}

.opening-choice-preview ol {
  display: grid;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
}

.report-body {
  margin-top: 22px;
  border-top: 1px solid var(--line);
}

.paper-sheet[data-mode="repair"] .report-body {
  display: none;
}

.rule-block {
  display: grid;
  grid-template-columns: 50px 1fr;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.section-number {
  color: var(--accent);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 24px;
  line-height: 1;
}

.rule-block h2 {
  margin: 0 0 5px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.025em;
  text-transform: uppercase;
}

.rule-block p {
  max-width: 460px;
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.report-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-top: auto;
  padding-top: 22px;
  color: var(--quiet);
  font-size: 9px;
  font-weight: 400;
}

.report-footer a {
  color: inherit;
  text-decoration: none;
}

.report-footer a:hover {
  color: var(--accent);
}

.report-shell:not(.pricing-shell) .report-footer {
  align-items: center;
  justify-content: center;
  letter-spacing: 0;
  text-transform: none;
}

.review-panel,
.training-panel {
  margin-top: 24px;
}

.review-loading {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.review-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 10px;
}

.review-nav a {
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  text-decoration: none;
  text-transform: uppercase;
}

.review-nav a:hover,
.review-nav a:focus-visible {
  color: var(--accent);
  outline: none;
}

.review-nav a[aria-disabled="true"] {
  color: color-mix(in srgb, var(--quiet) 45%, transparent);
  cursor: default;
  pointer-events: none;
}

.review-rank-nav {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.review-layout {
  display: grid;
  grid-template-columns: minmax(220px, 320px) minmax(0, 1fr);
  gap: 22px;
  align-items: start;
}

.review-board {
  width: 100%;
  aspect-ratio: 1;
}

.review-board .cm-chessboard {
  display: block;
  width: 100%;
  height: 100%;
}

.review-copy h2 {
  min-width: 0;
  margin: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.review-copy .move-comparison {
  width: 254px;
}

.review-choice-section {
  width: min(320px, 100%);
  margin-top: 10px;
  padding: 10px 11px 11px;
  border: 1px solid var(--rule);
}

.review-choice-section .move-comparison {
  margin-top: 0;
}

.review-decision {
  width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.review-decision-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  cursor: pointer;
  font-size: 10px;
  font-weight: 600;
  line-height: 1.2;
}

.review-decision-control input {
  width: 14px;
  height: 14px;
  margin: 0;
  accent-color: var(--accent);
}

.review-decision-copy {
  min-width: 72px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 400;
  line-height: 1.2;
}

.review-decision:not(.is-marked) .review-decision-copy {
  visibility: hidden;
}

.review-decision.is-marked .review-decision-copy {
  color: var(--quiet);
}

.review-insights {
  width: min(320px, 100%);
  margin-top: 16px;
}

.review-paper-tabs {
  display: flex;
  align-items: end;
  gap: 0;
  border-bottom: 1px solid var(--line-strong);
}

.review-paper-tab {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  margin: 0;
  border: 1px solid var(--line-strong);
  border-bottom: 0;
  background: var(--paper);
  color: var(--quiet);
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  line-height: 1.2;
  padding: 7px 10px 6px;
  text-transform: uppercase;
}

.review-paper-tab + .review-paper-tab {
  border-left: 0;
}

.review-paper-tab:hover,
.review-paper-tab:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.review-paper-tab[aria-selected="true"] {
  margin-bottom: -1px;
  border-color: var(--line-strong);
  border-bottom: 1px solid var(--paper);
  color: var(--text);
}

html[data-theme="dark"] .review-paper-tab[aria-selected="true"] {
  border-bottom-color: var(--paper);
}

.review-paper-tab:disabled {
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
  cursor: default;
}

.review-paper-tab:disabled:hover {
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
}

.review-explorer-action {
  height: 24px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  border: 1px solid var(--rule);
  color: var(--text);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  padding: 0 8px;
  text-decoration: none;
  text-transform: uppercase;
}

.review-explorer-action img {
  display: block;
  width: 12px;
  height: 12px;
  object-fit: contain;
}

html[data-theme="dark"] .review-explorer-action img {
  content: url("/static/img/lichesslogowhite.svg");
}

.review-explorer-action:hover,
.review-explorer-action:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.review-tab-panel {
  padding-top: 12px;
}

.training-layout {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(0, 240px);
  gap: 24px;
  align-items: start;
  min-width: 0;
}

.training-board-column {
  --training-eval-column: 24px;
  display: grid;
  justify-items: stretch;
  width: min(620px, 100%);
  justify-self: center;
}

.training-board-wrap {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr);
  gap: 12px;
  align-items: stretch;
  width: 100%;
}

.training-board-column .review-nav {
  width: calc(100% - var(--training-eval-column));
  margin-left: var(--training-eval-column);
}

.training-board {
  width: 100%;
  aspect-ratio: 1;
}

.training-board .cm-chessboard {
  display: block;
  width: 100%;
  height: 100%;
}

.training-eval {
  position: relative;
  min-height: 100%;
  border: 1px solid var(--line-strong);
  background: var(--paper-strong);
  overflow: hidden;
}

.training-eval::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto;
  height: 1px;
  background: var(--line-strong);
}

.training-eval span {
  position: absolute;
  inset: auto 0 0;
  height: 50%;
  background: var(--text);
  transition: height 180ms ease;
}

html[data-theme="dark"] .training-eval span {
  background: var(--accent);
}

.training-side {
  display: grid;
  gap: 14px;
  align-content: start;
  min-width: 0;
  overflow: hidden;
}

.training-status {
  min-width: 0;
}

.training-review-action {
  display: flex;
  justify-content: center;
  margin-top: 12px;
}

.training-review-action[hidden] {
  display: none;
}

.training-status h2 {
  margin: 0;
  min-width: 0;
  color: var(--text);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.training-status-copy {
  margin: -4px 0 0;
  color: var(--quiet);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.35;
}

.training-control-row {
  display: grid;
  grid-template-columns: repeat(7, 24px);
  align-items: center;
  gap: 6px;
  min-width: 0;
  max-width: 100%;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
}

.training-meter {
  display: contents;
  color: var(--quiet);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.2;
  text-transform: uppercase;
}

.training-progress-icon {
  display: block;
  position: relative;
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: inherit;
}

button.training-progress-icon {
  cursor: pointer;
}

.training-progress-icon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--quiet);
  -webkit-mask: url("/static/img/mood-neutral.svg") center / contain no-repeat;
  mask: url("/static/img/mood-neutral.svg") center / contain no-repeat;
}

.training-progress-icon[data-training-progress-active="true"] {
  transform: translateY(-2px);
}

.training-progress-icon[data-training-progress-active="true"]::after {
  content: "";
  position: absolute;
  right: 8px;
  bottom: -3px;
  left: 8px;
  height: 2px;
  background: var(--accent);
}

button.training-progress-icon:focus-visible {
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.training-progress-icon[data-training-progress-status="passed"]::before {
  background: var(--complete);
  -webkit-mask-image: url("/static/img/mood-check.svg");
  mask-image: url("/static/img/mood-check.svg");
}

.training-progress-icon[data-training-progress-status="missed"]::before {
  background: var(--danger);
  -webkit-mask-image: url("/static/img/mood-puzzled.svg");
  mask-image: url("/static/img/mood-puzzled.svg");
}

.training-progress-icon[data-training-progress-status="skipped"]::before {
  background: var(--quiet);
  -webkit-mask-image: url("/static/img/mood-off.svg");
  mask-image: url("/static/img/mood-off.svg");
}

button.training-progress-icon:hover::before,
button.training-progress-icon:focus-visible::before {
  background: var(--accent);
}

.training-actions {
  display: contents;
}

.training-actions button {
  width: 24px;
  height: 24px;
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  position: relative;
}

.training-icon-action::before {
  content: "";
  position: absolute;
  inset: 0;
  background: currentColor;
  -webkit-mask: center / contain no-repeat;
  mask: center / contain no-repeat;
}

.training-icon-skip::before {
  -webkit-mask-image: url("/static/img/mood-look-right.svg");
  mask-image: url("/static/img/mood-look-right.svg");
}

.training-icon-give-up::before {
  -webkit-mask-image: url("/static/img/flag.svg");
  mask-image: url("/static/img/flag.svg");
}

.training-icon-action:hover,
.training-icon-action:focus-visible {
  color: var(--accent);
  outline: 1px solid var(--accent);
  outline-offset: 1px;
}

.training-actions button:disabled {
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
  cursor: default;
}

.training-actions button:disabled:hover {
  color: color-mix(in srgb, var(--quiet) 52%, transparent);
  outline: none;
}

.training-overlay {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: grid;
  place-items: center;
  padding: 18px;
  background: color-mix(in srgb, var(--paper) 76%, transparent);
}

.training-overlay[hidden] {
  display: none;
}

.training-dialog {
  width: min(360px, 100%);
  padding: 18px 18px 16px;
  border: 1px solid var(--line-strong);
  background: var(--paper);
  color: var(--text);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--shadow) 24%, transparent);
}

.training-dialog h2 {
  margin: 0;
  font-size: 15px;
  font-weight: 850;
  line-height: 1.2;
  text-align: center;
}

.training-dialog p {
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: center;
  white-space: pre-line;
}

.training-dialog-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--rule);
  color: var(--text);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
  text-transform: uppercase;
}

.training-overlay[data-training-overlay-mode="result"] .training-dialog-stats {
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
  padding-top: 0;
  border-top: 0;
}

.training-dialog-result-icon {
  width: 28px;
  height: 28px;
}

.training-dialog-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 14px;
}

.training-dialog button {
  height: 28px;
  padding: 1px 12px 0;
  border: 1px solid var(--accent);
  background: transparent;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  font-size: 10px;
  font-weight: 850;
  line-height: 1.2;
  text-transform: uppercase;
}

.training-dialog button[hidden] {
  display: none;
}

.training-dialog button:hover,
.training-dialog button:focus-visible {
  border-color: var(--text);
  color: var(--text);
  outline: none;
}

.review-games {
  width: 100%;
}

.review-game-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.review-game-links a {
  max-width: 100%;
  min-height: 24px;
  height: 24px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--rule);
  color: var(--quiet);
  font-size: 9px;
  font-weight: 800;
  line-height: 1;
  overflow: hidden;
  padding: 0 8px;
  text-decoration: none;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-game-links a:hover,
.review-game-links a:focus-visible {
  border-color: var(--accent);
  color: var(--accent);
  outline: none;
}

.review-engine {
  width: 100%;
}

.review-engine-meta {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
}

.review-engine-eval {
  color: var(--text);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
}

.review-engine-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 650;
  line-height: 1.25;
}

.review-engine-status {
  color: var(--accent);
}

.review-engine-lines {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-height: 58px;
  margin-top: 10px;
}

.review-engine-line {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 8px;
  min-height: 17px;
}

.review-engine-line-eval {
  color: var(--quiet);
  font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.review-engine-line-text {
  min-width: 0;
  overflow: hidden;
  color: var(--text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.35;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-engine-line-empty {
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  line-height: 1.35;
}

.review-line-navigation {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 2px 6px;
  white-space: normal;
}

.review-line-number {
  color: var(--muted);
  font-size: 10px;
  font-weight: 700;
}

.review-line-move {
  margin: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--quiet);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1.35;
  padding: 1px 3px 2px;
}

.review-line-move:hover,
.review-line-move:focus-visible,
.review-line-move.is-active {
  background: color-mix(in srgb, var(--accent) 14%, transparent);
  color: var(--accent);
  outline: none;
}

.review-line-move[aria-disabled="true"] {
  cursor: default;
}

.review-line-move[aria-disabled="true"]:hover,
.review-line-move[aria-disabled="true"]:focus-visible {
  background: transparent;
  color: var(--quiet);
}

.review-line-eval {
  color: var(--muted);
  font-weight: 700;
}

.review-board-piece-preview,
.cm-chessboard-draggable-piece {
  z-index: 2000 !important;
}

.cm-chessboard.opening-book {
  --book-square-light: #fbf8f0;
  --book-square-ink: #4f493f;
}

html[data-theme="dark"] .cm-chessboard.opening-book {
  --book-square-light: #ddd8ce;
  --book-square-ink: #28241f;
}

.cm-chessboard.opening-book .board .square.white {
  fill: var(--book-square-light);
}

.cm-chessboard.opening-book.border-type-thin .board .border,
.cm-chessboard.opening-book.border-type-none .board .border {
  fill: var(--book-square-light);
  stroke: var(--book-square-ink);
}

.cm-chessboard.opening-book.border-type-thin .board .border {
  stroke-width: 0.5%;
}

.cm-chessboard.opening-book.border-type-none .board .border {
  stroke-width: 0;
}

.cm-chessboard.opening-book.border-type-frame .board .border {
  fill: var(--book-square-light);
  stroke: none;
}

.cm-chessboard.opening-book.border-type-frame .board .border-inner {
  fill: var(--book-square-light);
  stroke: var(--book-square-ink);
  stroke-width: 0.5%;
}

.cm-chessboard.opening-book .coordinates {
  pointer-events: none;
  user-select: none;
}

.cm-chessboard.opening-book .coordinates .coordinate,
.cm-chessboard.opening-book .coordinates .coordinate.black,
.cm-chessboard.opening-book .coordinates .coordinate.white {
  fill: color-mix(in srgb, var(--book-square-ink) 74%, transparent);
  font-size: 7px;
  cursor: default;
}

.pricing-shell .paper-sheet,
.credits-shell .paper-sheet {
  width: min(600px, 100%);
  display: grid;
  grid-template-rows: repeat(28, var(--paper-half-rule));
  aspect-ratio: auto;
  min-height: auto;
  padding-top: calc(var(--paper-pad-y) + var(--paper-rule-offset));
}

.credits-shell .paper-sheet {
  width: min(500px, 100%);
}

.privacy-shell .paper-sheet {
  width: min(600px, 100%);
  display: grid;
  grid-template-rows: repeat(38, var(--paper-half-rule));
  aspect-ratio: auto;
  min-height: auto;
  padding-top: calc(var(--paper-pad-y) + var(--paper-rule-offset));
  background: var(--paper);
  background-size: auto;
  background-position: 0 0;
}

.privacy-shell .paper-sheet::before,
.privacy-shell .paper-sheet::after {
  background: var(--paper);
}

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

.pricing-page {
  display: grid;
  gap: 0;
  margin-top: 0;
}

.pricing-shell .pricing-page {
  grid-row: 6 / 26;
  align-self: start;
  transform: translateY(15px);
}

.credits-page {
  display: grid;
  grid-row: 6 / 26;
  align-self: start;
  transform: translateY(17px);
}

.credits-page h2 {
  height: var(--paper-rule);
  margin: 0;
  color: var(--text);
  font-size: 18px;
  line-height: var(--paper-rule);
}

.credits-list {
  display: grid;
  gap: 0;
  padding: 0;
  margin: 0;
  list-style: none;
}

.credits-list li {
  min-height: var(--paper-rule);
  padding-left: 18px;
  color: var(--muted);
  font-size: 12px;
  line-height: var(--paper-rule);
}

.credits-list a {
  color: var(--accent);
  font-weight: 700;
  text-decoration: none;
}

.credits-list a:hover {
  text-decoration: underline;
}

.pricing-intro {
  max-width: 520px;
}

.pricing-intro p {
  margin: 8px 0 0;
  color: var(--text);
  font-size: 13px;
  line-height: 1.45;
}

.pricing-table-wrap {
  overflow-x: auto;
  outline: 1px solid color-mix(in srgb, var(--line-strong) 54%, transparent);
  outline-offset: 0;
}

.pricing-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  table-layout: fixed;
  color: var(--text);
  font-size: 12px;
  line-height: 1;
}

.pricing-table th,
.pricing-table td {
  height: var(--paper-rule);
  padding: 0 12px;
  text-align: left;
  vertical-align: middle;
}

.pricing-table thead th {
  color: var(--text);
  font-weight: 750;
}

.pricing-table thead tr:first-child th {
  border-bottom: 1px solid color-mix(in srgb, var(--line-strong) 36%, transparent);
}

.pricing-table thead tr:nth-child(2) th {
  color: var(--accent);
  font-size: 11px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
}

.pricing-table thead th:first-child,
.pricing-table tbody th {
  width: 33.333%;
  color: var(--muted);
  font-weight: 650;
}

.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  width: 33.333%;
}

.pricing-table th:nth-child(2),
.pricing-table td:nth-child(2),
.pricing-table th:nth-child(3),
.pricing-table td:nth-child(3) {
  border-left: 1px solid color-mix(in srgb, var(--line-strong) 36%, transparent);
}

.pricing-mobile-label {
  display: none;
}

.privacy-page {
  display: grid;
  gap: 0;
  grid-row: 1 / 38;
  align-self: start;
  transform: none;
}

.privacy-section {
  min-height: calc(var(--paper-rule) * 3);
}

.privacy-title h2,
.privacy-section h3,
.privacy-section p {
  margin: 0;
}

.privacy-title h2 {
  color: var(--text);
  font-size: 18px;
  line-height: var(--paper-rule);
}

.privacy-title p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: var(--paper-rule);
}

.privacy-section h3 {
  color: var(--text);
  font-size: 12px;
  font-weight: 750;
  line-height: var(--paper-rule);
}

.privacy-section p {
  color: var(--muted);
  font-size: 11px;
  line-height: var(--paper-half-rule);
}

.privacy-main-link {
  color: var(--accent);
  font-size: 11px;
  font-weight: 700;
  line-height: var(--paper-rule);
  text-decoration: none;
}

.privacy-main-link:hover {
  text-decoration: underline;
}

.pricing-reward-note {
  height: var(--paper-rule);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  line-height: var(--paper-rule);
}

@media (max-width: 760px) {
  .page-menu {
    position: absolute;
    top: calc(16px + var(--paper-pad-y) - var(--paper-half-rule) + ((var(--paper-rule) - 22px) / 2) - 3px);
    right: auto;
    left: -3px;
  }

  .page-menu-toggle,
  .theme-btn {
    width: 22px;
    height: 22px;
  }

  .page-menu-toggle {
    border: 0;
    border-radius: 0;
    background: none;
  }

  .page-menu-toggle:hover,
  .page-menu-toggle:focus-visible,
  .page-menu[open] .page-menu-toggle {
    background: none;
  }

  .page-menu-toggle img,
  .theme-btn img {
    width: 12px;
    height: 12px;
  }

  .page-menu-panel {
    right: auto;
    left: 0;
    min-width: 150px;
    padding: 5px;
    transform-origin: top left;
  }

  .landing-shell {
    width: min(100% - 20px, 1080px);
    padding: 18px 0;
  }

  .paper-stack {
    min-height: calc(100vh - 36px);
  }

  .landing-shell:not(.report-shell):not(.pricing-shell) .paper-stack {
    align-items: flex-start;
  }

  .pricing-shell .paper-stack {
    align-items: flex-start;
  }

  .privacy-shell .paper-stack {
    align-items: flex-start;
  }

  .paper-sheet {
    --paper-pad-x: 20px;
    --paper-pad-y: 34px;
    width: 100%;
    aspect-ratio: auto;
    min-height: 620px;
    padding: var(--paper-pad-y) var(--paper-pad-x) 32px;
    background:
      linear-gradient(var(--paper-line) 1px, transparent 1px),
      var(--paper);
    background-size: 100% var(--paper-rule), auto;
  }

  .paper-sheet::before,
  .paper-sheet::after {
    background:
      linear-gradient(var(--paper-line-soft) 1px, transparent 1px),
      var(--paper);
    background-size: 100% var(--paper-rule), auto;
  }

  .paper-sheet::before {
    transform: translate(5px, 6px) rotate(0.14deg);
  }

  .paper-sheet::after {
    transform: translate(-4px, 10px) rotate(-0.16deg);
  }

  .report-shell .paper-sheet {
    background:
      linear-gradient(90deg, transparent 0, transparent 47px, var(--margin-rule) 48px, transparent 49px),
      var(--paper);
    background-size: auto;
  }

  .report-shell .paper-sheet::before,
  .report-shell .paper-sheet::after {
    background: var(--paper);
  }

  .report-header {
    flex-direction: row;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 12px;
    padding-bottom: 22px;
  }

  .report-header h1 {
    font-size: clamp(22px, 6.6vw, 29px);
    flex: 0 1 auto;
  }

  .publisher-mark img {
    width: clamp(92px, 28vw, 124px);
  }

  .publisher-mark {
    flex: 0 0 auto;
    gap: 3px;
    margin-top: 0;
    font-size: 7px;
  }

  .report-meta {
    gap: 6px;
  }

  .report-subject {
    font-size: 11px;
  }

  .summary-grid {
    grid-template-columns: 1fr;
    margin-top: 24px;
  }

  .landing-shell:not(.report-shell) .summary-grid {
    transform: translateY(calc(var(--paper-half-rule) * -1));
  }

  .landing-shell:not(.report-shell) .summary-panel {
    min-height: calc(var(--paper-rule) * 3);
    padding: 13px 13px 12px;
  }

  .landing-shell:not(.report-shell) .summary-panel .field-label {
    margin-right: 0;
    margin-left: 0;
    padding-right: 0;
    padding-left: 0;
    padding-bottom: 0;
    border-bottom: 0;
  }

  .landing-shell:not(.report-shell) .summary-panel-large {
    transform: translateY(-3px);
  }

  .landing-shell:not(.report-shell) .summary-panel-action {
    min-height: calc(var(--paper-rule) * 4);
  }

  .landing-shell:not(.report-shell) .summary-panel p {
    font-size: 14px;
    line-height: 1.5;
  }

  .landing-shell:not(.report-shell) .field-label {
    font-size: 11px;
  }

  .landing-shell:not(.report-shell) .account-form input {
    min-height: 38px;
    font-size: 14px;
  }

  .landing-shell:not(.report-shell) .summary-panel .account-note,
  .landing-shell:not(.report-shell) .summary-panel .account-status {
    font-size: 12px;
  }

  .landing-shell:not(.report-shell) .account-form button {
    bottom: 3px;
  }

  .report-body {
    margin-top: 34px;
  }

  .landing-shell:not(.report-shell) .report-body {
    display: block;
    grid-row: 21 / 33;
  }

  .landing-shell:not(.report-shell) .sample-position {
    display: none;
  }

  .rule-block {
    grid-template-columns: 48px 1fr;
    gap: 16px;
  }

  .landing-shell:not(.report-shell) .rule-block {
    grid-column: auto;
    grid-template-columns: 48px minmax(0, 1fr);
    gap: 16px;
  }

  .landing-shell:not(.report-shell) .report-body > .rule-block:nth-of-type(2),
  .landing-shell:not(.report-shell) .report-body > .rule-block:nth-of-type(3) {
    transform: translateY(calc(var(--paper-rule) * -1));
  }

  .landing-shell:not(.report-shell) .section-number,
  .landing-shell:not(.report-shell) .rule-block > div {
    transform: translateY(-2px);
  }

  .section-number {
    font-size: 23px;
  }

  .repair-tabs {
    overflow-x: auto;
    scrollbar-width: none;
  }

  .repair-section-bar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .repair-tabs::-webkit-scrollbar {
    display: none;
  }

  .repair-tab {
    flex: 0 0 auto;
    font-size: 9px;
  }

  .start-training-action {
    margin-left: 0;
  }

  .queue-preview li,
  .opening-choice-preview li {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .queue-body {
    display: contents;
  }

  .queue-header {
    grid-column: 1 / -1;
    grid-row: 1;
    gap: 5px;
  }

  .queue-board {
    grid-column: 1;
    grid-row: 3;
    width: min(190px, 100%);
    justify-self: center;
  }

  .queue-line,
  .move-comparison,
  .queue-actions {
    grid-column: 1;
  }

  .queue-line {
    grid-row: 2;
  }

  .move-comparison {
    grid-row: 4;
    justify-self: center;
  }

  .queue-actions {
    grid-row: 5;
    justify-content: center;
    margin-top: 0;
  }

  .queue-title {
    display: -webkit-box;
    overflow: hidden;
    white-space: normal;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }

  .review-layout {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .review-board {
    width: min(260px, 100%);
    justify-self: center;
  }

  .training-layout {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .training-board-column {
    --training-eval-column: 18px;
    width: min(360px, 100%);
  }

  .training-board-wrap {
    grid-template-columns: 10px minmax(0, 1fr);
    gap: 8px;
  }

  .training-side {
    gap: 12px;
  }

  .review-copy .queue-header {
    display: flex;
  }

  .review-copy .move-comparison {
    width: 220px;
    justify-self: start;
  }

  .review-choice-section {
    width: min(280px, 100%);
  }

  .move-comparison {
    width: 220px;
  }

  .move-comparison-row {
    grid-template-columns: 60px 78px 34px;
    gap: 6px;
  }

  .move-comparison-label {
    font-size: 8px;
  }

  .queue-data {
    text-align: left;
  }

  .pricing-page {
    margin-top: 0;
  }

  .pricing-intro p {
    font-size: 18px;
  }

  .pricing-shell .pricing-page {
    grid-row: 5 / 25;
    transform: translateY(-2px);
  }

  .credits-page {
    grid-row: 7 / 27;
    transform: translateY(-2px);
  }

  .credits-page h2 {
    font-size: 16px;
  }

  .credits-list li {
    font-size: 10px;
  }

  .pricing-table {
    font-size: 10px;
  }

  .pricing-table th,
  .pricing-table td {
    padding: 0 4px;
  }

  .pricing-table thead th:first-child,
  .pricing-table tbody th {
    width: 34%;
  }

  .pricing-table th:nth-child(2),
  .pricing-table td:nth-child(2) {
    width: 27%;
  }

  .pricing-table th:nth-child(3),
  .pricing-table td:nth-child(3) {
    width: 39%;
  }

  .pricing-table thead tr:first-child th {
    font-size: 11px;
  }

  .pricing-table thead tr:nth-child(2) th {
    font-size: 10px;
  }

  .privacy-shell .privacy-page {
    grid-row: 1 / 38;
    transform: none;
  }

  .privacy-section {
    min-height: calc(var(--paper-rule) * 3);
  }

  .privacy-title h2 {
    font-size: 16px;
  }

  .privacy-title p,
  .privacy-section h3 {
    font-size: 11px;
  }

  .privacy-section p {
    font-size: 10px;
  }

  .pricing-full-label {
    display: none;
  }

  .pricing-mobile-label {
    display: inline;
  }

  .report-footer {
    flex-direction: column;
    margin-top: 34px;
  }

  .landing-shell:not(.report-shell) .report-footer {
    transform: translateY(-5px);
  }

  .report-shell:not(.pricing-shell) .report-footer {
    margin-top: auto;
  }
}
