:root {
  color-scheme: light;
  --ink: #17201c;
  --muted: #61706a;
  --line: #d7dfd9;
  --surface: #ffffff;
  --surface-2: #f6f8f4;
  --accent: #b43b47;
  --accent-dark: #8d2430;
  --teal: #1f7a75;
  --gold: #b97d15;
  --green: #2e7d4f;
  --green-soft: #edf8f1;
  --green-line: #9bd1ae;
  --red: #b3263b;
  --red-soft: #fff1f2;
  --red-line: #efb7bf;
  --teal-soft: #e9f6f4;
  --gold-soft: #fff7e6;
  --shadow: 0 12px 36px rgba(23, 32, 28, 0.1);
  --font-sans: "Aptos", "Segoe UI", Arial, sans-serif;
  --font-display: var(--font-sans);
}

/* Post-attempt feedback continues the visual language of the result report
   while remaining separate from the account and contact dialogs. */
.experience-feedback-dialog,
.feedback-thank-you-dialog {
  width: min(720px, calc(100vw - 32px));
  max-width: 100%;
  max-height: calc(100vh - 32px);
  padding: 0;
  overflow: auto;
  border: 1px solid #7f1d2d;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 24px 70px rgba(21, 31, 27, 0.28);
}

.experience-feedback-dialog::backdrop,
.feedback-thank-you-dialog::backdrop {
  background: rgba(18, 28, 24, 0.68);
  backdrop-filter: blur(3px);
}

.experience-feedback-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  padding: 12px 20px;
  color: #fff;
  background: linear-gradient(110deg, #17231f 0%, #4d2024 52%, #a42336 100%);
}

.feedback-dialog-close {
  display: grid;
  place-items: center;
  align-self: start;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.feedback-dialog-close:hover,
.feedback-dialog-close:focus-visible {
  background: rgba(255, 255, 255, 0.22);
  outline: 3px solid rgba(255, 255, 255, 0.25);
  outline-offset: 2px;
}

.experience-feedback-header img {
  width: 82px;
  height: auto;
  padding: 4px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
}

.experience-feedback-header .section-kicker {
  color: #a8eee9;
}

.experience-feedback-header h2 {
  margin: 2px 0 3px;
  color: #fff;
  font-size: clamp(1.45rem, 2.4vw, 1.9rem);
}

.experience-feedback-header p:last-child {
  margin: 0;
  color: #f7eeee;
  font-size: 0.92rem;
}

.experience-feedback-body {
  display: grid;
  gap: 10px;
  padding: 12px 20px 16px;
  background: linear-gradient(135deg, #fff 0%, #fffaf0 55%, #fff3f4 100%);
}

.feedback-rating-fieldset {
  margin: 0;
  padding: 8px 12px;
  border: 1px solid #ead6b2;
  border-radius: 8px;
  background: #fffaf0;
  text-align: center;
}

.feedback-rating-fieldset legend,
.feedback-text-label > span {
  padding: 0 8px;
  color: #18231f;
  font-weight: 700;
}

.feedback-stars {
  display: flex;
  justify-content: center;
  gap: 6px;
  margin: 2px 0 0;
}

.feedback-satisfaction-grid {
  display: grid;
  gap: 8px;
  margin-top: 4px;
}

.feedback-satisfaction-option {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 58px;
  align-items: center;
  gap: 14px;
  width: 100%;
  min-height: 48px;
  padding: 9px 12px;
  border: 1px solid #d5ddd8;
  border-radius: 9px;
  color: var(--ink);
  background: #fff;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: border-color 140ms ease, background 140ms ease, transform 140ms ease, box-shadow 140ms ease;
}

.feedback-satisfaction-option:hover,
.feedback-satisfaction-option:focus-visible {
  border-color: var(--teal);
  background: #f3fbfa;
  box-shadow: 0 5px 14px rgba(31, 122, 117, 0.1);
  transform: translateY(-1px);
}

.feedback-satisfaction-option.is-selected {
  border-color: var(--accent-dark);
  background: linear-gradient(90deg, #fff3f4, #fffaf0);
  box-shadow: 0 0 0 2px rgba(180, 59, 71, 0.12);
}

.feedback-option-stars {
  color: #b78016;
  font-size: 1.08rem;
  letter-spacing: 1px;
  white-space: nowrap;
}

.feedback-option-label {
  font-weight: 800;
}

.feedback-satisfaction-option small {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-align: right;
}

.feedback-star {
  width: 42px;
  height: 42px;
  padding: 0;
  border: 1px solid #b8d2ec;
  border-radius: 50%;
  color: #6f94bd;
  background: #f5faff;
  font-size: 1.55rem;
  line-height: 1;
  cursor: pointer;
  transition: transform 140ms ease, color 140ms ease, background 140ms ease, border-color 140ms ease;
}

.feedback-star:hover,
.feedback-star:focus-visible {
  transform: translateY(-2px);
  color: #1556b3;
  border-color: #5792d2;
  background: #eaf4ff;
}

.feedback-star.is-selected {
  color: #1556b3;
  border-color: #5792d2;
  background: #deefff;
}

.feedback-rating-label {
  min-height: 18px;
  margin: 2px 0 0;
  color: #66736e;
  font-size: 0.9rem;
}

.feedback-text-label {
  display: grid;
  gap: 4px;
}

.feedback-text-label small {
  color: var(--muted);
  font-weight: 500;
}

.feedback-text-label strong {
  color: var(--teal);
  font-size: 0.9em;
}

.feedback-text-label textarea {
  width: 100%;
  min-height: 72px;
  resize: vertical;
}

.feedback-testimonial-consent {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid #b9dedd;
  border-radius: 8px;
  background: #edf9f8;
  color: #233630;
}

.feedback-testimonial-consent input {
  flex: 0 0 auto;
  width: 18px;
  height: 18px;
  margin: 0;
}

.experience-feedback-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 12px;
}

.experience-feedback-actions button {
  min-height: 44px;
}

.experience-feedback-actions.feedback-submit-only {
  grid-template-columns: 1fr;
}

.experience-feedback-actions .primary-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.experience-feedback-body .account-status:empty {
  display: none;
}

.feedback-thank-you-dialog {
  width: min(540px, calc(100vw - 32px));
  border: 2px solid rgba(23, 32, 28, 0.88);
  border-radius: 16px;
}

.feedback-thank-you-dialog form {
  display: block;
  padding: 0;
}

.feedback-thank-you-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  color: #fff;
  background: linear-gradient(110deg, #17231f 0%, #4d2024 52%, #a42336 100%);
}

.feedback-thank-you-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.feedback-thank-you-brand img {
  flex: 0 0 auto;
  width: 82px;
  height: auto;
  padding: 4px;
  border: 2px solid #111;
  border-radius: 8px;
  background: #fff;
}

.feedback-thank-you-header .section-kicker {
  margin: 0;
  color: #a8eee9;
}

.feedback-thank-you-header h2 {
  margin: 2px 0;
  color: #fff;
  font-size: 1.35rem;
}

.feedback-thank-you-header p:last-child {
  margin: 0;
  color: #f7eeee;
  font-size: 0.9rem;
}

.feedback-thank-you-close {
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  width: 42px;
  min-width: 42px;
  height: 42px;
  padding: 0;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 10px;
  color: #fff;
  background: rgba(180, 59, 71, 0.92);
  font-size: 1.45rem;
  font-weight: 700;
  line-height: 1;
  box-shadow: 0 6px 14px rgba(141, 36, 48, 0.2);
}

.feedback-thank-you-close:hover {
  color: #fff;
  background: #8d2430;
  transform: translateY(-1px);
}

.feedback-thank-you-close:focus-visible {
  outline: 3px solid rgba(43, 123, 207, 0.4);
  outline-offset: 2px;
}

.feedback-thank-you-body {
  display: grid;
  justify-items: center;
  gap: 6px;
  padding: 18px 28px 22px;
  text-align: center;
  background: linear-gradient(135deg, #f5fffd 0%, #fffaf0 52%, #fff1f3 100%);
}

.feedback-thank-you-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: #20866e;
  font-size: 1.3rem;
  font-weight: 700;
}

.feedback-thank-you-body h3 {
  margin: 0;
  color: #202e29;
  font-size: 1.15rem;
}

.feedback-thank-you-body p {
  max-width: 520px;
  margin: 0;
  font-size: 0.9rem;
  line-height: 1.35;
}

.experience-feedback-card {
  display: grid;
  gap: 14px;
  margin: 18px 0;
  padding: clamp(18px, 3vw, 26px);
  border: 1px solid rgba(31, 122, 117, 0.32);
  border-left: 6px solid var(--teal);
  border-radius: 14px;
  background: linear-gradient(135deg, #f5fffd 0%, #fffaf0 100%);
  box-shadow: 0 12px 30px rgba(23, 32, 28, 0.08);
}

.practice-report-card > .experience-feedback-card {
  margin-right: 18px;
  margin-left: 18px;
}

.experience-feedback-card-copy h2 {
  margin: 2px 0 5px;
  color: var(--ink);
  font-size: clamp(1.2rem, 2vw, 1.55rem);
}

.experience-feedback-card-copy p:last-child,
.feedback-inline-thanks p {
  margin: 0;
  color: var(--muted);
}

.feedback-choice-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.feedback-choice-grid button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 52px;
  padding: 10px 12px;
  border: 1px solid #bfd8d4;
  border-radius: 10px;
  color: #21443e;
  background: #fff;
  font: inherit;
  font-weight: 800;
  cursor: pointer;
}

.feedback-choice-grid button span {
  color: var(--gold);
  font-size: 1.25rem;
}

.feedback-choice-grid button:hover,
.feedback-choice-grid button:focus-visible,
.feedback-choice-grid button.is-selected {
  border-color: var(--teal);
  background: var(--teal-soft);
  transform: translateY(-1px);
}

.feedback-choice-grid button:disabled:not(.is-selected) {
  opacity: 0.55;
  cursor: default;
}

.feedback-inline-status {
  min-height: 20px;
  margin: 0;
  color: var(--teal);
  font-weight: 750;
}

.feedback-inline-status.error {
  color: var(--red);
}

.feedback-optional-followup {
  display: grid;
  gap: 10px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.feedback-optional-followup[hidden] {
  display: none;
}

.feedback-optional-followup > label:first-child {
  display: grid;
  gap: 6px;
  color: var(--ink);
  font-weight: 750;
}

.feedback-optional-followup small {
  color: var(--muted);
  font-weight: 500;
}

.feedback-optional-followup textarea {
  width: 100%;
  min-height: 80px;
  resize: vertical;
}

.feedback-not-now {
  justify-self: start;
  padding: 4px 0;
  border: 0;
  color: var(--muted);
  background: transparent;
  font: inherit;
  font-weight: 750;
  text-decoration: underline;
  cursor: pointer;
}

.feedback-inline-thanks {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
}

.feedback-inline-thanks > span {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 50%;
  color: #fff;
  background: var(--green);
  font-weight: 900;
}

.feedback-inline-thanks strong {
  color: var(--ink);
}

@media (max-width: 640px) {
  .feedback-choice-grid {
    grid-template-columns: 1fr;
  }

  .practice-report-card > .experience-feedback-card {
    margin-right: 10px;
    margin-left: 10px;
  }

  .feedback-inline-thanks {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .feedback-inline-thanks .feedback-not-now {
    grid-column: 2;
  }
}

/* Premium offer surfaces are intentionally centralized so pricing can be
   hidden globally without leaving isolated upgrade prompts behind. */
.pricing-section {
  padding: clamp(48px, 7vw, 82px) clamp(18px, 6vw, 72px);
  border-bottom: 1px solid rgba(31, 122, 117, 0.13);
  background:
    radial-gradient(circle at 82% 15%, rgba(185, 125, 21, 0.14), transparent 28%),
    linear-gradient(145deg, #f5faf7, #fffaf0 56%, #fff);
}

.pricing-heading,
.pricing-grid {
  width: min(1080px, 100%);
  margin-inline: auto;
}

.pricing-heading {
  max-width: 760px;
  margin-bottom: 28px;
  text-align: center;
}

.pricing-heading h2 {
  margin: 6px 0 12px;
  font-size: clamp(1.8rem, 4vw, 2.7rem);
}

.pricing-heading > p:last-child {
  color: var(--muted);
  font-size: 1.05rem;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 22px;
  align-items: stretch;
}

.pricing-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: clamp(24px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: 0 18px 45px rgba(23, 32, 28, 0.09);
}

.pricing-card-premium {
  border: 2px solid rgba(180, 59, 71, 0.72);
  background: linear-gradient(155deg, #fff 0%, #fff8e9 55%, #fff1f2 100%);
  box-shadow: 0 22px 54px rgba(141, 36, 48, 0.15);
}

.pricing-recommended {
  position: absolute;
  top: -14px;
  right: 22px;
  padding: 7px 12px;
  border-radius: 999px;
  color: #fff;
  background: var(--accent-dark);
  font-size: 0.78rem;
  font-weight: 800;
}

.pricing-plan-label {
  margin: 0 0 6px;
  color: var(--teal);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.pricing-card h3 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(1.65rem, 4vw, 2.25rem);
}

.pricing-plan-note {
  min-height: 24px;
  margin: 8px 0 18px;
  color: var(--muted);
}

.pricing-card ul,
.premium-upgrade-benefits {
  display: grid;
  gap: 12px;
  margin: 0 0 24px;
  padding: 0;
  list-style: none;
}

.pricing-card li {
  position: relative;
  padding-left: 28px;
}

.pricing-card li::before {
  position: absolute;
  left: 0;
  content: "\2713";
  color: var(--green);
  font-weight: 900;
}

.pricing-card > button {
  width: 100%;
  margin-top: auto;
}

.dashboard-premium-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin: 18px auto 22px;
  padding: 22px 24px;
  border: 1px solid rgba(180, 59, 71, 0.3);
  border-radius: 14px;
  background: linear-gradient(120deg, #fff8e7, #fff 52%, #fff1f2);
  box-shadow: 0 12px 30px rgba(141, 36, 48, 0.08);
}

.dashboard-premium-card h3,
.dashboard-premium-card p {
  margin: 3px 0;
}

.premium-upgrade-dialog {
  width: min(700px, calc(100vw - 28px));
  max-width: 100%;
  max-height: calc(100vh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid rgba(141, 36, 48, 0.76);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(17, 27, 23, 0.34);
}

.premium-upgrade-dialog::backdrop {
  background: rgba(14, 24, 20, 0.68);
  backdrop-filter: blur(4px);
}

.premium-upgrade-shell {
  min-width: 0;
}

.premium-upgrade-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 20px;
  color: #fff;
  background: linear-gradient(115deg, #18241f 0%, #5c242b 56%, #a12438 100%);
}

.premium-upgrade-brand {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
}

.premium-upgrade-brand img {
  width: 56px;
  height: 56px;
  padding: 4px;
  border-radius: 10px;
  background: #fff;
}

.premium-upgrade-header .section-kicker {
  margin: 0;
  color: #b7eee7;
}

.premium-upgrade-header h2 {
  margin: 4px 0 0;
  color: #fff;
  font-size: clamp(1.25rem, 3.4vw, 1.7rem);
  line-height: 1.08;
}

.premium-upgrade-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.72);
  border-radius: 10px;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  font-size: 1.25rem;
  font-weight: 800;
}

.premium-upgrade-close:hover,
.premium-upgrade-close:focus-visible {
  transform: translateY(-2px);
  background: rgba(255, 255, 255, 0.22);
}

.premium-upgrade-body {
  padding: 16px 20px;
}

.premium-upgrade-intro {
  margin: 0 0 11px;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.4;
}

.premium-performance-areas {
  margin: 0 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(179, 38, 59, 0.2);
  border-radius: 12px;
  background: linear-gradient(135deg, #fff8ed, #fff 58%, #eefaf7);
}

.premium-performance-areas h3 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 0.95rem;
}

.premium-performance-areas ul {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.premium-performance-areas li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 9px;
  border-radius: 9px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.88);
  font-size: 0.95rem;
  box-shadow: 0 4px 12px rgba(33, 48, 42, 0.06);
}

.premium-performance-areas li > span {
  min-width: 0;
  font-weight: 700;
}

.premium-performance-areas li > strong {
  flex: 0 0 auto;
  padding: 3px 7px;
  border-radius: 999px;
  color: #7a4d05;
  background: #fff1c9;
  font-size: 0.95rem;
  white-space: nowrap;
}

.premium-performance-areas li > strong[data-performance-status="needs-practice"] {
  color: #8f2032;
  background: #ffe5e9;
}

.premium-performance-areas li > strong[data-performance-status="strong"] {
  color: #13645e;
  background: #def5f1;
}

.premium-benefits-title {
  margin: 0 0 7px;
  color: var(--ink);
  font-size: 0.95rem;
}

.premium-upgrade-benefits {
  gap: 8px;
  margin-bottom: 14px;
}

.premium-upgrade-benefits li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 9px;
  padding: 8px 11px;
  border: 1px solid rgba(31, 122, 117, 0.15);
  border-radius: 10px;
  background: #f8fbf9;
  font-weight: 700;
}

.premium-benefit-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  color: #fff;
  border: 2px solid rgba(255, 255, 255, 0.92);
  box-shadow: 0 6px 14px rgba(23, 32, 28, 0.14);
}

.premium-benefit-icon-simulator {
  background: linear-gradient(135deg, #0d817a, #28b8ae);
}

.premium-benefit-icon-practice {
  background: linear-gradient(135deg, #d78909, #f06c3b);
}

.premium-benefit-icon-weakArea {
  background: linear-gradient(135deg, #b3263b, #7853bd);
}

.premium-benefit-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.premium-benefit-text {
  min-width: 0;
  font-size: 0.95rem;
}

.premium-upgrade-price-box {
  display: grid;
  gap: 3px;
  padding: 10px 14px;
  border: 1px solid rgba(185, 125, 21, 0.34);
  border-radius: 12px;
  background: var(--gold-soft);
}

.premium-tier-label {
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--gold);
  font-size: 0.78rem;
  font-weight: 900;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.premium-tier-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: conic-gradient(from 210deg, #1f8a83, #e4a11b, #b3263b, #1f8a83);
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  box-shadow: 0 6px 15px rgba(141, 36, 48, 0.2);
}

.premium-tier-icon svg {
  width: 17px;
  height: 17px;
  overflow: visible;
}

.premium-tier-icon path:first-child {
  fill: currentColor;
  stroke: none;
}

.premium-tier-icon path:last-child {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.premium-upgrade-price-box strong {
  color: var(--accent-dark);
  font-size: clamp(1.25rem, 4vw, 1.7rem);
}

.premium-upgrade-price-box small,
.premium-upgrade-status {
  color: var(--muted);
}

.premium-upgrade-status {
  min-height: 22px;
  margin: 8px 0 0;
  font-weight: 700;
}

.premium-upgrade-status:empty {
  display: none;
}

.premium-upgrade-status[data-status="error"] {
  color: var(--accent-dark);
}

.premium-upgrade-actions button:disabled {
  cursor: wait;
  opacity: 0.72;
}

.premium-checkout-result-dialog {
  width: min(600px, calc(100vw - 28px));
  max-width: 100%;
  max-height: calc(100dvh - 28px);
  padding: 0;
  overflow: auto;
  border: 1px solid #7f1d2d;
  border-radius: 9px;
  background: #fff;
  box-shadow: 0 30px 90px rgba(17, 27, 23, 0.34);
}

.premium-checkout-result-dialog::backdrop {
  background: rgba(14, 24, 20, 0.68);
  backdrop-filter: blur(4px);
}

.premium-checkout-result-shell {
  display: grid;
  overflow: hidden;
  background: #fffaf6;
}

.premium-checkout-result-header {
  display: grid;
  grid-template-columns: 72px minmax(0, 1fr) auto;
  align-items: center;
  gap: 16px;
  padding: 17px 24px;
  color: #fff;
  background: linear-gradient(110deg, #17231f 0%, #4d2024 52%, #a42336 100%);
}

.premium-checkout-result-header > img {
  width: 72px;
  height: 72px;
  padding: 5px;
  border: 2px solid #111;
  border-radius: 9px;
  background: #fff;
}

.premium-checkout-result-header .section-kicker {
  margin: 0;
  color: #a8eee9;
}

.premium-checkout-result-header h2 {
  margin: 3px 0 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 1.75rem);
}

.premium-checkout-result-close {
  align-self: start;
}

.premium-checkout-result-body {
  display: grid;
  gap: 16px;
  padding: 24px;
}

.premium-checkout-result-dialog[data-tone="success"] .premium-checkout-result-body {
  background: linear-gradient(135deg, #fff, #edf9f4);
}

.premium-checkout-result-dialog[data-tone="error"] .premium-checkout-result-body {
  background: linear-gradient(135deg, #fff, #fff4f5);
}

.premium-checkout-result-dialog[data-tone="neutral"] .premium-checkout-result-body {
  background: linear-gradient(135deg, #fff, #fff9ea);
}

.premium-checkout-result-body > p {
  margin: 0;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.55;
}

.premium-checkout-result-dialog[data-tone="success"] #premiumCheckoutResultMessage {
  padding: 14px 16px;
  border: 1px solid rgba(13, 129, 122, 0.34);
  border-left: 5px solid var(--teal);
  border-radius: 10px;
  color: #174f48;
  background: linear-gradient(135deg, #e9faf5, #f7fffc);
  box-shadow: 0 8px 20px rgba(13, 129, 122, 0.1);
  font-size: 1.08rem;
  font-weight: 700;
}

.premium-checkout-result-features {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.premium-checkout-result-features li {
  display: grid;
  grid-template-columns: 36px minmax(0, 1fr);
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 700;
}

.premium-checkout-result-actions {
  display: flex;
  justify-content: flex-end;
  padding: 0 24px 24px;
  background: #fffaf6;
}

.premium-checkout-result-actions .primary-button {
  min-width: 138px;
}

.premium-checkout-spinner {
  justify-self: center;
  width: 30px;
  height: 30px;
  border: 4px solid rgba(31, 122, 117, 0.18);
  border-top-color: var(--teal);
  border-radius: 50%;
  animation: premium-checkout-spin 0.8s linear infinite;
}

@keyframes premium-checkout-spin {
  to { transform: rotate(360deg); }
}

.premium-upgrade-actions {
  display: grid;
  grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr);
  gap: 10px;
  padding: 0 20px 16px;
}

.premium-upgrade-actions button {
  padding-top: 10px;
  padding-bottom: 10px;
}

.premium-upgrade-actions.has-alternative {
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.12fr) minmax(0, 1.16fr);
}

.premium-upgrade-actions [data-premium-later],
.premium-upgrade-actions [data-premium-alternative] {
  border-color: #a9cbe9;
  color: #183d5c;
  background: linear-gradient(135deg, #f1f8ff, #deefff);
  box-shadow: 0 8px 18px rgba(54, 95, 145, 0.08);
}

.premium-upgrade-actions [data-premium-later]:hover,
.premium-upgrade-actions [data-premium-alternative]:hover {
  border-color: #6da8d6;
  color: #12354f;
  background: linear-gradient(135deg, #e7f4ff, #cfe8ff);
  box-shadow: 0 10px 22px rgba(54, 95, 145, 0.16);
}

.premium-admin-controls {
  display: grid;
  grid-template-columns: minmax(210px, 1fr) minmax(170px, 0.6fr);
  align-items: end;
  gap: 14px;
}

.weak-area-action-button.is-premium-locked {
  border-color: rgba(185, 125, 21, 0.5);
  color: #7a4d05;
  background: linear-gradient(135deg, #fff8e7, #fff1d0);
  box-shadow: 0 8px 20px rgba(185, 125, 21, 0.12);
}

.weak-area-action-button.is-premium-locked:hover,
.weak-area-action-button.is-premium-locked:focus-visible {
  transform: translateY(-2px);
  border-color: var(--gold);
  background: linear-gradient(135deg, #fff4ce, #ffe7a8);
}

.premium-admin-controls .settings-toggle,
.premium-duration-note {
  grid-column: 1 / -1;
}

.premium-duration-note {
  margin: 0;
  color: var(--muted);
}

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

  .dashboard-premium-card {
    align-items: stretch;
    flex-direction: column;
  }

  .premium-upgrade-header {
    padding: 13px 14px;
  }

  .premium-upgrade-brand {
    grid-template-columns: 44px minmax(0, 1fr);
  }

  .premium-upgrade-brand img {
    width: 44px;
    height: 44px;
  }

  .premium-upgrade-body {
    padding: 14px;
  }

  .premium-performance-areas {
    margin-bottom: 10px;
    padding: 9px 10px;
  }

  .premium-performance-areas ul {
    gap: 6px;
  }

  .premium-performance-areas li {
    padding: 7px 8px;
    font-size: 0.95rem;
  }

  .premium-upgrade-actions,
  .premium-upgrade-actions.has-alternative,
  .premium-admin-controls {
    grid-template-columns: 1fr;
  }

  .premium-upgrade-actions {
    padding: 0 14px 14px;
  }

  .premium-upgrade-actions .primary-button {
    grid-row: 1;
  }

  .premium-upgrade-actions [data-premium-alternative] {
    grid-row: 2;
  }

  .premium-upgrade-actions [data-premium-later] {
    grid-row: 3;
  }

  .premium-checkout-result-header {
    grid-template-columns: 58px minmax(0, 1fr) auto;
    gap: 12px;
    padding: 13px 16px;
  }

  .premium-checkout-result-header > img {
    width: 58px;
    height: 58px;
  }

  .premium-checkout-result-body {
    gap: 14px;
    padding: 18px 16px;
  }

  .premium-checkout-result-actions {
    padding: 0 16px 18px;
  }

  .premium-checkout-result-actions .primary-button {
    width: 100%;
  }

  .premium-admin-controls .settings-toggle,
  .premium-duration-note {
    grid-column: auto;
  }
}

@media (prefers-reduced-motion: reduce) {
  .premium-checkout-spinner {
    animation-duration: 1.8s;
  }
}

.admin-feedback-list {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.admin-feedback-card {
  padding: 20px;
  border: 1px solid #cfded8;
  border-left: 5px solid #a42336;
  border-radius: 8px;
  background: #fff;
}

.admin-feedback-card header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.admin-feedback-card h3 {
  margin: 5px 0 2px;
}

.admin-feedback-card a {
  color: #52645e;
}

.admin-feedback-stars {
  color: #b78016;
  font-size: 1.35rem;
  letter-spacing: 2px;
}

.admin-feedback-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
  color: #60716b;
}

.admin-feedback-comment {
  margin: 18px 0;
  padding: 16px;
  border-radius: 8px;
  background: #f6faf8;
  white-space: pre-wrap;
}

.testimonial-approved,
.testimonial-private {
  display: inline-flex;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.86rem;
  font-weight: 700;
}

.testimonial-approved {
  color: #12624f;
  background: #e6f7f0;
}

.testimonial-private {
  color: #7b2634;
  background: #fff0f2;
}

.admin-feedback-empty {
  display: grid;
  gap: 6px;
  padding: 24px;
}

@media (max-width: 640px) {
  .experience-feedback-dialog,
  .feedback-thank-you-dialog {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
  }

  .experience-feedback-header {
    grid-template-columns: 58px minmax(0, 1fr);
    gap: 10px;
    padding: 10px 12px;
  }

  .experience-feedback-header img {
    width: 58px;
  }

  .feedback-dialog-close {
    width: 36px;
    height: 36px;
  }

  .experience-feedback-header h2 {
    font-size: 1.25rem;
  }

  .experience-feedback-header p:last-child {
    font-size: 0.82rem;
  }

  .experience-feedback-body {
    gap: 8px;
    padding: 10px 12px 12px;
  }

  .feedback-thank-you-header {
    gap: 10px;
    padding: 12px;
  }

  .feedback-thank-you-brand {
    gap: 10px;
  }

  .feedback-thank-you-brand img {
    width: 68px;
  }

  .feedback-thank-you-header h2 {
    font-size: 1.15rem;
  }

  .feedback-thank-you-header p:last-child {
    font-size: 0.82rem;
  }

  .feedback-thank-you-close {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .feedback-thank-you-body {
    padding: 16px 18px 20px;
  }

  .feedback-star {
    width: 40px;
    height: 40px;
    font-size: 1.45rem;
  }

  .feedback-satisfaction-option {
    grid-template-columns: 96px minmax(0, 1fr);
    gap: 10px;
  }

  .feedback-satisfaction-option small {
    display: none;
  }

  .experience-feedback-actions {
    grid-template-columns: 1fr;
  }

  .experience-feedback-actions .primary-button {
    grid-row: 1;
  }

  .admin-feedback-card header {
    flex-direction: column;
  }

  .admin-feedback-meta {
    justify-items: start;
  }
}

* {
  box-sizing: border-box;
}

html {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overscroll-behavior-x: none;
  font-family: var(--font-sans);
}

*,
*::before,
*::after {
  font-family: inherit;
}

body {
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  margin: 0;
  color: var(--ink);
  background:
    linear-gradient(180deg, #f8faf7 0%, #eef4f0 45%, #f7faf7 100%);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.5;
}

@supports (overflow: clip) {
  html,
  body {
    overflow-x: clip;
  }
}

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

a {
  color: var(--accent-dark);
  overflow-wrap: anywhere;
}

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 36px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.eyebrow,
.section-kicker {
  margin: 0 0 4px;
  color: var(--teal);
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-family: var(--font-display);
  font-weight: 400;
  font-size: 2rem;
  line-height: 1.15;
}

h2 {
  margin-bottom: 8px;
  font-family: var(--font-display);
  font-weight: 430;
  font-size: 1.25rem;
}

h3 {
  margin-bottom: 8px;
  font-size: 1rem;
}

.trust-note {
  max-width: 420px;
  color: var(--muted);
  font-size: 0.95rem;
}

.app-shell {
  width: min(1440px, 100%);
  margin: 0 auto;
  padding: 24px 36px 48px;
}

.summary-band {
  display: grid;
  grid-template-columns: repeat(5, minmax(120px, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.metric {
  min-height: 94px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric-value {
  display: block;
  color: var(--accent-dark);
  font-size: 1.75rem;
  font-weight: 800;
  line-height: 1.15;
}

.metric-label {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.92rem;
}

.source-panel {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 16px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.admin-settings-panel {
  align-items: center;
}

.abuse-settings-panel {
  align-items: start;
}

.abuse-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 12px;
  width: min(820px, 100%);
}

.abuse-settings-grid label:not(.settings-toggle) {
  display: grid;
  gap: 6px;
}

.abuse-settings-grid input[type="number"] {
  width: 100%;
}

.abuse-registration-toggle,
.abuse-settings-grid .primary-button {
  grid-column: 1 / -1;
}

.admin-profile-actions {
  align-items: end;
  justify-content: flex-end;
  margin-left: auto;
  flex: 1 1 720px;
  max-width: 840px;
  text-align: left;
}

.admin-profile-actions label {
  display: grid;
  gap: 6px;
  min-width: 180px;
  max-width: 240px;
}

.admin-profile-input {
  width: min(260px, 100%);
}

.settings-toggle {
  display: inline-grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  min-height: 40px;
  padding: 8px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.settings-toggle input {
  width: 18px;
  min-height: 18px;
  padding: 0;
  accent-color: var(--accent);
}

.settings-toggle span {
  margin: 0;
  color: var(--ink);
  font-weight: 800;
}

.admin-login-panel,
.admin-workspace-header,
.analytics-panel,
.user-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.admin-login-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 380px);
  gap: 18px;
  align-items: start;
  margin-bottom: 16px;
}

.admin-workspace-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.admin-analytics-band {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 14px;
}

.analytics-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.analytics-panel h2 {
  margin-bottom: 12px;
}

.analytics-list {
  display: grid;
  gap: 8px;
}

.analytics-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.analytics-row.stacked {
  display: grid;
  align-items: start;
}

.analytics-row span,
.analytics-row small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.analytics-row strong {
  color: var(--accent-dark);
}

.monetization-view {
  display: grid;
  gap: 16px;
}

.monetization-controls-panel,
.monetization-summary-panel {
  margin-bottom: 0;
}

.monetization-controls-panel .premium-admin-controls {
  width: min(820px, 100%);
}

/* Keep the primary form action easy to find when the admin sidebar leaves a
   narrow content column. Spanning the grid prevents it from drifting right. */
.monetization-controls-panel #savePremiumSettingsButton {
  grid-column: 1 / -1;
  justify-self: start;
  width: min(240px, 100%);
}

.monetization-summary-panel {
  border-top: 5px solid var(--teal);
}

.service-email-campaign-panel {
  border-top: 5px solid #2e78b7;
  background: linear-gradient(145deg, #ffffff, #eef8ff);
}

.service-email-campaign-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(130px, 1fr));
  gap: 10px;
  margin: 16px 0;
}

.service-email-campaign-stats article {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid #b9d8ec;
  border-radius: 10px;
}

.service-email-campaign-stats strong {
  color: #185f94;
  font-size: 1.55rem;
}

.service-email-campaign-stats span,
.service-email-campaign-safety {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.45;
}

.service-email-campaign-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.service-email-preview {
  margin-top: 14px;
  border: 1px solid #b9d8ec;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.78);
}

.service-email-preview summary {
  padding: 12px 14px;
  color: #185f94;
  cursor: pointer;
  font-weight: 800;
}

.service-email-preview > div {
  padding: 0 14px 14px;
}

.service-email-preview p {
  margin: 8px 0 0;
  line-height: 1.5;
}

.service-email-campaign-safety {
  margin: 12px 0 0;
}

.service-email-campaign-safety strong {
  color: var(--ink);
}

@media (max-width: 720px) {
  .service-email-campaign-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .service-email-campaign-actions > button {
    width: 100%;
  }
}

.monetization-summary-panel .published-header {
  align-items: flex-start;
}

.monetization-summary-panel .status-line {
  max-width: 860px;
}

.monetization-metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(140px, 1fr));
  gap: 12px;
}

.monetization-metric-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 132px;
  padding: 16px;
  background: linear-gradient(145deg, #fff, #f2f8f5);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.05);
}

.monetization-metric-card > span {
  color: var(--accent-dark);
  font-size: clamp(1.8rem, 3vw, 2.35rem);
  font-weight: 900;
  line-height: 1;
}

.monetization-metric-card strong {
  line-height: 1.25;
}

.monetization-metric-card small {
  color: var(--muted);
  line-height: 1.35;
}

.monetization-metric-card.is-paywall {
  background: linear-gradient(145deg, #fff9e9, #fff3cf);
  border-color: #e6c879;
}

.monetization-metric-card.is-premium,
.monetization-metric-card.is-converted {
  background: linear-gradient(145deg, #effbf8, #dff4ef);
  border-color: #9fd6cb;
}

.monetization-metric-card.is-rate {
  background: linear-gradient(145deg, #fff2f4, #fce1e5);
  border-color: #dfadb5;
}

.monetization-detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.monetization-source-panel,
.monetization-financial-panel,
.monetization-payment-panel,
.monetization-recent-panel {
  grid-column: 1 / -1;
}

.monetization-source-list,
.monetization-recent-list {
  display: grid;
  gap: 10px;
}

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

.monetization-source-row,
.monetization-recent-row {
  min-width: 0;
  padding: 12px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.monetization-source-row header,
.monetization-recent-row,
.monetization-source-row > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.monetization-source-row header {
  margin-bottom: 10px;
}

.monetization-source-row > div {
  align-items: stretch;
  flex-wrap: wrap;
}

.monetization-source-row > div > span {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 0.82rem;
}

.monetization-source-row > div strong {
  color: var(--ink);
  font-size: 1rem;
}

.monetization-recent-row > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.monetization-recent-row span,
.monetization-recent-row time {
  color: var(--muted);
  font-size: 0.84rem;
}

.monetization-recent-row time {
  flex: 0 0 auto;
}

.monetization-financial-summary,
.monetization-payment-ledger {
  display: grid;
  gap: 10px;
}

.monetization-financial-card,
.monetization-payment-row {
  display: grid;
  gap: 12px;
  min-width: 0;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 9px;
}

.monetization-financial-card {
  background: linear-gradient(145deg, #f5fbf9, #e8f5f1);
  border-color: #a9d6cc;
}

.monetization-financial-card header,
.monetization-financial-card > div,
.monetization-payment-heading,
.monetization-payment-values {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.monetization-financial-card > div,
.monetization-payment-values {
  align-items: stretch;
  flex-wrap: wrap;
}

.monetization-financial-card > div > span,
.monetization-payment-values > span {
  display: grid;
  gap: 3px;
  min-width: 135px;
  color: var(--muted);
  font-size: 0.84rem;
}

.monetization-financial-card > div strong,
.monetization-payment-values strong {
  color: var(--ink);
  font-size: 0.96rem;
  overflow-wrap: anywhere;
}

.monetization-financial-card small,
.monetization-payment-heading small {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.monetization-payment-heading > div {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.landing-visit-panel {
  grid-column: 1 / -1;
}

.landing-visit-row {
  display: grid;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.landing-visit-heading,
.landing-visit-groups {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.landing-visit-heading strong {
  color: var(--accent-dark);
}

.landing-visit-groups {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.landing-visit-group {
  display: grid;
  gap: 6px;
}

.landing-visit-group > div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.user-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
}

.admin-user-summary-panel {
  margin-bottom: 14px;
}

.admin-user-summary-panel .published-header {
  margin-bottom: 14px;
}

.admin-user-summary-filters {
  display: grid;
  grid-template-columns: minmax(170px, 0.85fr) repeat(3, minmax(190px, 1fr)) auto;
  align-items: end;
  gap: 10px;
  margin-bottom: 14px;
  padding: 13px;
  background: linear-gradient(135deg, #f4faf8, #fff9ec);
  border: 1px solid rgba(31, 122, 117, 0.2);
  border-radius: 10px;
}

.admin-user-summary-filters label {
  display: grid;
  gap: 5px;
  margin: 0;
}

.admin-user-summary-filters label > span {
  color: #42534b;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.25;
}

.admin-user-summary-filters input,
.admin-user-summary-filters select {
  width: 100%;
  min-height: 42px;
}

.admin-user-summary-filters .secondary-button {
  min-height: 42px;
  white-space: nowrap;
}

.admin-user-summary-filter-help {
  grid-column: 1 / -1;
  margin: 0;
  color: var(--muted);
  font-size: 0.82rem;
}

@media (max-width: 1100px) {
  .admin-user-summary-filters {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-summary-filters .secondary-button {
    justify-self: start;
  }
}

@media (max-width: 620px) {
  .admin-user-summary-filters {
    grid-template-columns: minmax(0, 1fr);
  }
}

.admin-user-summary-table-wrap {
  max-width: 100%;
  overflow-x: auto;
  border: 1px solid rgba(31, 122, 117, 0.22);
  border-radius: 10px;
  background: #fff;
}

.admin-user-summary-table-wrap:focus-visible {
  outline: 3px solid rgba(31, 122, 117, 0.24);
  outline-offset: 3px;
}

.admin-user-summary-table {
  width: 100%;
  min-width: 1120px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.admin-user-summary-table caption {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.admin-user-summary-table th,
.admin-user-summary-table td {
  padding: 12px 14px;
  border-bottom: 1px solid #e4ebe6;
  text-align: left;
  vertical-align: middle;
}

.admin-user-summary-table thead th {
  color: #fff;
  background: linear-gradient(110deg, #24352f, #166f69);
  font-size: 0.78rem;
  letter-spacing: 0.035em;
  text-transform: uppercase;
  white-space: nowrap;
}

.admin-user-summary-table tbody tr:nth-child(even) {
  background: #f6faf8;
}

.admin-user-summary-table tbody tr:hover {
  background: #fff8e8;
}

.admin-user-summary-table .is-numeric {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.admin-user-name-cell strong,
.admin-user-name-cell small {
  display: block;
}

.admin-user-name-cell strong {
  color: var(--ink);
}

.admin-user-name-cell small {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  overflow-wrap: anywhere;
}

.admin-user-tier {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 999px;
  color: #24564f;
  background: #e4f4f1;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-user-tier.is-premium {
  color: #7b1f2a;
  border-color: rgba(179, 38, 59, 0.3);
  background: linear-gradient(135deg, #fff0c7, #ffe2e5);
}

.admin-user-summary-table tfoot th,
.admin-user-summary-table tfoot td {
  color: #17201c;
  background: #eef7f4;
  border-top: 2px solid rgba(31, 122, 117, 0.45);
  border-bottom: 0;
  font-weight: 900;
}

.admin-user-summary-empty {
  padding: 22px !important;
  color: var(--muted);
  text-align: center !important;
}

.active-session-panel {
  margin-bottom: 14px;
}

.active-session-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.active-session-row {
  display: grid;
  grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.active-session-identity,
.active-session-identity h3,
.active-session-identity p {
  min-width: 0;
}

.active-session-identity h3 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.active-session-identity p {
  margin: 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.active-session-meta {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.user-card {
  display: grid;
  gap: 12px;
}

.user-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  color: var(--muted);
  font-size: 0.88rem;
}

.source-panel > div {
  min-width: 0;
}

.status-line {
  margin: 8px 0 0;
  color: var(--muted);
}

.actions {
  display: flex;
  align-items: end;
  gap: 10px;
  flex-wrap: wrap;
}

.field-label,
label span {
  display: block;
  margin-bottom: 5px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.short-input {
  width: 112px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 40px;
  padding: 8px 10px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #c9d3cc;
  border-radius: 6px;
}

textarea {
  resize: vertical;
}

button {
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 700;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid rgba(31, 122, 117, 0.35);
  outline-offset: 2px;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.65;
}

button:disabled:hover {
  transform: none;
}

.primary-button {
  color: #fff;
  background: var(--accent);
  box-shadow: 0 10px 22px rgba(180, 59, 71, 0.18);
}

.primary-button:hover {
  background: var(--accent-dark);
  transform: translateY(-1px);
}

.secondary-button {
  color: var(--ink);
  background: #fff;
  border-color: var(--line);
}

.secondary-button:hover {
  border-color: var(--teal);
}

.danger-button {
  color: #fff;
  background: var(--red);
  border-color: var(--red);
  box-shadow: 0 10px 22px rgba(179, 38, 59, 0.16);
}

.danger-button:hover {
  background: #8d1d2d;
  border-color: #8d1d2d;
  transform: translateY(-1px);
}

.button-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 8px 12px;
  border: 1px solid transparent;
  border-radius: 6px;
  font-weight: 700;
  text-decoration: none;
  transition: background 180ms ease, border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.icon-button {
  width: 40px;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border-color: var(--line);
}

.tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 14px;
  overflow-x: auto;
}

.tab {
  flex: 0 0 auto;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.tab.is-active {
  color: #fff;
  background: var(--teal);
}

.view {
  display: none;
}

.view.is-active {
  display: block;
}

.toolbar {
  display: grid;
  grid-template-columns: minmax(140px, 180px) minmax(180px, 260px) minmax(130px, 160px) minmax(130px, 160px) minmax(220px, 1fr);
  gap: 12px;
  margin-bottom: 14px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-polish-panel,
.bulk-toolbar {
  display: grid;
  gap: 14px;
  margin-bottom: 14px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.05);
}

.review-polish-panel {
  grid-template-columns: minmax(260px, 0.6fr) minmax(0, 1fr);
  align-items: start;
}

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

.coverage-item {
  display: grid;
  gap: 7px;
  min-width: 0;
  padding: 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.coverage-item > div:first-child {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-width: 0;
}

.coverage-item strong,
.coverage-item span,
.coverage-item small {
  min-width: 0;
  overflow-wrap: anywhere;
}

.coverage-item span,
.coverage-item small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.coverage-bar {
  height: 8px;
  overflow: hidden;
  background: #e8eee9;
  border-radius: 999px;
}

.coverage-bar span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--green));
  border-radius: inherit;
}

.bulk-toolbar {
  grid-template-columns: minmax(220px, 1fr) auto;
  align-items: center;
}

.bulk-toolbar strong,
.bulk-toolbar span {
  display: block;
}

.bulk-toolbar span {
  color: var(--muted);
  font-size: 0.9rem;
}

.question-list,
.segment-list,
.audit-list {
  display: grid;
  gap: 12px;
}

.question-card,
.segment-card,
.audit-item,
.taxonomy-item {
  min-width: 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.question-card[data-status="approved"] {
  border-left: 5px solid var(--green);
}

.question-card[data-status="needs_review"],
.question-card[data-status="draft"] {
  border-left: 5px solid var(--gold);
}

.question-card[data-status="rejected"],
.question-card[data-status="retired"] {
  border-left: 5px solid var(--accent);
}

.question-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 10px;
}

.question-title {
  margin-bottom: 8px;
  font-size: 1.02rem;
}

.question-meta,
.source-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.86rem;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 26px;
  padding: 3px 8px;
  color: var(--ink);
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 700;
}

.pill.approved {
  background: #edf8f1;
  border-color: #badbc6;
}

.pill.warning {
  background: var(--gold-soft);
  border-color: #edcf8e;
}

.pill.error {
  background: var(--red-soft);
  border-color: #efb9c0;
}

.options-list {
  display: grid;
  gap: 6px;
  margin: 12px 0;
  padding: 0;
  list-style: none;
}

.options-list li {
  overflow-wrap: anywhere;
  padding: 9px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.options-list li.correct {
  background: var(--teal-soft);
  border-color: #a4d7d0;
  font-weight: 700;
}

.explanation {
  margin: 0 0 12px;
  color: #34423b;
}

.issue-list {
  margin: 10px 0 12px;
  padding: 10px 12px;
  color: #6e1722;
  background: var(--red-soft);
  border: 1px solid #efb9c0;
  border-radius: 6px;
}

.question-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.report-status-current:disabled {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.published-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.segment-card p {
  overflow-wrap: anywhere;
  margin-bottom: 10px;
}

.taxonomy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.taxonomy-item ul {
  margin: 0;
  padding-left: 20px;
}

.audit-item {
  display: grid;
  gap: 4px;
}

.audit-time {
  color: var(--muted);
  font-size: 0.85rem;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  background: var(--surface);
  border: 1px dashed #b7c4bd;
  border-radius: 8px;
  text-align: center;
}

.edit-dialog {
  width: min(900px, calc(100% - 24px));
  max-height: calc(100vh - 40px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.edit-dialog::backdrop {
  background: rgba(23, 32, 28, 0.35);
}

.edit-dialog form {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.admin-password-dialog {
  width: min(560px, calc(100% - 24px));
}

.admin-password-dialog form {
  gap: 16px;
  padding: clamp(18px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98) 50%, rgba(255, 247, 230, 0.98));
}

.admin-password-dialog-header {
  align-items: flex-start;
}

.admin-password-dialog-header h2 {
  margin: 2px 0 6px;
}

.admin-password-dialog .privacy-note {
  margin: 0;
}

.admin-remove-dialog {
  width: min(620px, calc(100% - 24px));
}

.admin-remove-dialog form {
  gap: 16px;
  padding: clamp(18px, 3vw, 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 230, 0.98) 48%, rgba(255, 242, 244, 0.98));
}

.admin-remove-dialog-header {
  align-items: flex-start;
}

.admin-remove-dialog-header h2 {
  margin: 2px 0 6px;
}

.admin-remove-dialog .danger-note {
  margin: 0;
  border-color: rgba(179, 38, 59, 0.35);
  background: rgba(255, 242, 244, 0.86);
  color: #6f1321;
}

.admin-permanent-remove-button {
  background: #6f1321;
  border-color: #6f1321;
}

.admin-permanent-remove-button:hover {
  background: #50101a;
  border-color: #50101a;
}

.dialog-header,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  max-width: min(420px, calc(100% - 40px));
  padding: 12px 14px;
  color: #fff;
  background: #26322d;
  border-radius: 8px;
  box-shadow: var(--shadow);
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 160ms ease, transform 160ms ease;
  pointer-events: none;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.is-hidden {
  display: none !important;
}

html.has-cached-account-session .account-create-button {
  display: none !important;
}

html:not(.auth-ready) .account-create-button {
  display: none !important;
}

html.auth-ready .account-create-button:not(.is-hidden) {
  display: inline-flex;
}

.public-page {
  background: #f4f6f1;
}

.public-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 68px;
  padding: 12px clamp(16px, 4vw, 52px);
  background: #fff;
  border-bottom: 1px solid rgba(215, 223, 217, 0.85);
  box-shadow: 0 10px 30px rgba(23, 32, 28, 0.09);
  backdrop-filter: blur(14px);
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ink);
  font-weight: 800;
  text-decoration: none;
}

.brand-mark img {
  display: block;
  width: 112px;
  height: 56px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.brand-leaf {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 0.95rem;
  letter-spacing: 0;
}

.public-nav {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.public-nav a {
  padding: 9px 11px;
  color: #31423a;
  background: #dceff7;
  border: 1px solid #9ecbde;
  border-radius: 6px;
  box-shadow: 0 7px 16px rgba(41, 105, 132, 0.08);
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  transition: transform 160ms ease, box-shadow 160ms ease, background-color 160ms ease, border-color 160ms ease;
}

.public-nav a:hover {
  background: #cfe8f3;
  border-color: #78b6cf;
  transform: translateY(-3px) scale(1.025);
  box-shadow: 0 12px 24px rgba(41, 105, 132, 0.2);
}

.public-nav a:active {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 6px 12px rgba(41, 105, 132, 0.16);
}

.public-nav a[aria-current="page"] {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 10px 18px rgba(141, 36, 48, 0.18);
}

.public-nav a.discover-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #17201c;
  background: linear-gradient(135deg, #ffe7a3, #aee6df);
  border: 1px solid rgba(200, 138, 18, 0.42);
  box-shadow: 0 12px 22px rgba(200, 138, 18, 0.18);
}

.public-nav a.discover-nav-link::before {
  content: "";
  width: 9px;
  height: 9px;
  background: var(--accent);
  clip-path: polygon(50% 0, 61% 35%, 96% 35%, 67% 55%, 78% 90%, 50% 68%, 22% 90%, 33% 55%, 4% 35%, 39% 35%);
}

.public-nav a.discover-nav-link:hover,
.public-nav a.discover-nav-link[aria-current="page"] {
  color: #fff;
  background: linear-gradient(135deg, #1f8a83, #8d2430);
  border-color: rgba(31, 138, 131, 0.5);
  box-shadow: 0 14px 28px rgba(31, 138, 131, 0.24);
}

.public-nav a.discover-nav-link:hover::before,
.public-nav a.discover-nav-link[aria-current="page"]::before {
  background: #ffe7a3;
}

.public-nav a.live-exam-nav {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #fff;
  background: linear-gradient(135deg, #b3263b, #7a1f2a);
  border-color: #8d2430;
  box-shadow: 0 12px 24px rgba(179, 38, 59, 0.28);
}

.public-nav a.live-exam-nav::before {
  content: "";
  width: 8px;
  height: 8px;
  background: #ffd36b;
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(255, 211, 107, 0.22);
}

.public-nav a.live-exam-nav:hover {
  background: linear-gradient(135deg, #cf3348, #8d2430);
}

.mobile-nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.mobile-nav-toggle svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
}

.account-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  margin-left: auto;
}

.header-share-button {
  position: relative;
  display: inline-grid;
  flex: 0 0 46px;
  place-items: center;
  width: 46px;
  min-width: 46px;
  height: 46px;
  padding: 0;
  color: #fff;
  background-color: #fff;
  background-image: url("/assets/share-icon.png");
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  border: 2px solid #111;
  border-radius: 50%;
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.16),
    0 10px 22px rgba(17, 17, 17, 0.2);
}

.header-share-button:hover {
  color: #fff;
  transform: translateY(-2px);
  box-shadow:
    0 0 0 1px rgba(17, 17, 17, 0.28),
    0 14px 28px rgba(17, 17, 17, 0.24);
}

.header-share-button:focus-visible {
  outline: 3px solid rgba(43, 123, 207, 0.42);
  outline-offset: 3px;
}

.header-share-button svg {
  display: none;
}

.share-dialog {
  width: min(680px, calc(100vw - 32px));
  max-height: min(720px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  color: var(--ink);
  background: #fffaf4;
  border: 1px solid rgba(180, 59, 71, 0.7);
  border-radius: 14px;
  box-shadow: 0 28px 70px rgba(15, 28, 24, 0.34);
}

.share-dialog::backdrop {
  background: rgba(15, 28, 24, 0.7);
  backdrop-filter: blur(3px);
}

.share-dialog-header {
  position: relative;
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr) 46px;
  gap: 18px;
  align-items: center;
  padding: 22px 24px;
  color: #fff;
  background: linear-gradient(110deg, #18201d, #6f202b 62%, #b72f43);
}

.share-dialog-header img {
  width: 108px;
  height: 68px;
  object-fit: contain;
  background: #fff;
  border: 2px solid #121817;
  border-radius: 9px;
}

.share-dialog-header p {
  margin: 0 0 4px;
  color: #aef0e9;
  font-size: 0.78rem;
  font-weight: 800;
}

.share-dialog-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.35rem, 3vw, 2rem);
  line-height: 1.15;
}

.share-dialog-close {
  display: grid;
  place-items: center;
  width: 44px;
  min-width: 44px;
  height: 44px;
  padding: 0;
  color: #fff;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 9px;
  font-size: 1.8rem;
  line-height: 1;
}

.share-dialog-body {
  padding: 24px;
}

.share-dialog-body > p:first-child {
  margin: 0 0 18px;
  color: #111817;
  font-size: 1.05rem;
  font-weight: 900;
}

.share-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.share-option {
  display: grid;
  gap: 8px;
  place-items: center;
  min-width: 0;
  min-height: 96px;
  padding: 12px 8px;
  color: var(--ink);
  background: #fff;
  border: 1px solid #d6e0dc;
  border-radius: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  text-align: center;
  text-decoration: none;
}

.share-option:hover {
  color: var(--ink);
  border-color: #9ecdc7;
  box-shadow: 0 10px 24px rgba(31, 122, 117, 0.12);
  transform: translateY(-2px);
}

.share-option-icon {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: #fff;
  background: #287bce;
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 900;
}

.share-option-copy .share-option-icon {
  background: #a12738;
}

.share-option-whatsapp .share-option-icon {
  background: #168c57;
}

.share-option-facebook .share-option-icon {
  background: #2469c8;
  font-size: 1.45rem;
}

.share-option-linkedin .share-option-icon {
  background: #176aa2;
}

.share-dialog-status {
  min-height: 24px;
  margin: 14px 0 0;
  color: var(--teal);
  font-weight: 800;
  text-align: center;
}

.account-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 136px;
  min-height: 48px;
  padding: 11px 22px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: rgba(141, 36, 48, 0.72);
  box-shadow: 0 14px 28px rgba(180, 59, 71, 0.28);
  font-size: 1.02rem;
  font-weight: 900;
}

.account-create-button:hover,
.account-cta-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #d63a4b, #8d2430);
  transform: translateY(-1px);
  box-shadow: 0 18px 34px rgba(180, 59, 71, 0.34);
}

.logout-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}

.logout-button-icon {
  display: none;
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.account-summary {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-width: 190px;
  padding: 6px 10px 6px 7px;
  color: var(--ink);
  background: var(--teal-soft);
  border: 1px solid #b9ddd8;
  border-radius: 8px;
  text-decoration: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, transform 180ms ease;
}

.account-summary:hover {
  border-color: var(--teal);
  box-shadow: 0 10px 20px rgba(31, 122, 117, 0.12);
  transform: translateY(-1px);
}

.account-summary strong {
  display: block;
  color: var(--ink);
  line-height: 1.1;
}

.account-summary small {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.profile-avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  overflow: hidden;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border: 2px solid rgba(255, 255, 255, 0.85);
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.12);
  font-size: 0.86rem;
  font-weight: 900;
  line-height: 1;
}

.profile-avatar-initials {
  isolation: isolate;
  background:
    radial-gradient(circle at 28% 20%, rgba(255, 255, 255, 0.55), rgba(255, 255, 255, 0) 25%),
    linear-gradient(135deg, #171c19 0%, #651a24 42%, #d71f2d 100%);
  border-color: #111;
  box-shadow:
    inset 0 0 0 2px rgba(255, 255, 255, 0.86),
    0 10px 24px rgba(141, 36, 48, 0.25);
}

.profile-avatar-initials::before {
  position: absolute;
  inset: 12%;
  z-index: -1;
  content: "";
  background-color: rgba(255, 255, 255, 0.52);
  clip-path: polygon(
    50% 0%,
    57% 18%,
    72% 8%,
    69% 27%,
    88% 23%,
    77% 40%,
    100% 46%,
    76% 53%,
    84% 72%,
    62% 65%,
    60% 100%,
    50% 80%,
    40% 100%,
    38% 65%,
    16% 72%,
    24% 53%,
    0% 46%,
    23% 40%,
    12% 23%,
    31% 27%,
    28% 8%,
    43% 18%
  );
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.18));
  transform: rotate(-4deg);
}

.profile-avatar-initials::after {
  position: absolute;
  inset: 0;
  content: "";
  background:
    radial-gradient(circle at 26% 18%, rgba(255, 255, 255, 0.42), rgba(255, 255, 255, 0) 28%),
    radial-gradient(circle at 72% 78%, rgba(0, 0, 0, 0.22), rgba(0, 0, 0, 0) 36%);
  pointer-events: none;
}

.avatar-initials {
  position: relative;
  z-index: 1;
  color: #fff;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.42);
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.practice-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(620px, 1.18fr);
  gap: clamp(16px, 2.6vw, 34px);
  align-items: start;
  min-height: min(760px, calc(100vh - 68px));
  padding: clamp(18px, 4vw, 42px) clamp(12px, 4vw, 46px) clamp(34px, 6vw, 72px);
  overflow: hidden;
  border-bottom: 1px solid rgba(31, 122, 117, 0.14);
}

body.dashboard-route .practice-hero,
body.dashboard-route .public-band,
body.dashboard-route .value-showcase,
body.dashboard-route .pricing-section,
body.dashboard-route .home-how-section,
body.dashboard-route .sample-section {
  display: none;
}

body.result-route .practice-hero,
body.result-route .public-band,
body.result-route .value-showcase,
body.result-route .pricing-section,
body.result-route .home-how-section,
body.result-route .sample-section,
body.result-route .dashboard-shell,
body.result-route .simulator-setup-shell,
body.result-route .test-shell,
body.result-route .completed-shell,
body.result-route .simulator-access-panel {
  display: none !important;
}

body.dashboard-route .dashboard-shell {
  margin-top: 0;
}

body.dashboard-route .simulator-setup-shell,
body.dashboard-route .test-shell,
body.dashboard-route .result-shell,
body.dashboard-route .completed-shell,
body.dashboard-route .simulator-access-panel {
  display: none !important;
}

body.simulator-page .practice-hero,
body.simulator-page .public-band,
body.simulator-page .value-showcase,
body.simulator-page .home-how-section,
body.simulator-page .sample-section,
body.simulator-page .dashboard-shell {
  display: none;
}

body.simulator-page main {
  padding: clamp(8px, 1.6vw, 18px) clamp(22px, 4vw, 46px) clamp(22px, 4vw, 46px);
}

.hero-image,
.hero-overlay {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  object-fit: cover;
  object-position: center;
}

.hero-overlay {
  background:
    linear-gradient(90deg, rgba(249, 250, 246, 0.98) 0%, rgba(249, 250, 246, 0.9) 30%, rgba(249, 250, 246, 0.52) 58%, rgba(249, 250, 246, 0.08) 100%),
    linear-gradient(180deg, rgba(14, 34, 29, 0.08), rgba(14, 34, 29, 0.2));
}

.hero-content {
  position: relative;
  z-index: 1;
  max-width: 610px;
}

.practice-hero .interface-showcase {
  position: relative;
  z-index: 1;
  justify-self: end;
  width: min(900px, 100%);
  align-self: start;
  margin-top: 0;
  backdrop-filter: blur(18px);
}

.hero-kicker {
  display: inline-flex;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: var(--teal);
  background: rgba(233, 246, 244, 0.9);
  border: 1px solid rgba(164, 215, 208, 0.9);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.practice-hero h1 {
  max-width: 590px;
  margin-bottom: 12px;
  color: #14231e;
  font-size: clamp(1.75rem, 3.25vw, 3rem);
  font-weight: 400;
  line-height: 1.08;
}

.hero-copy {
  max-width: 590px;
  margin-bottom: 12px;
  color: #30413a;
  font-size: clamp(0.98rem, 1.45vw, 1.12rem);
}

.hero-feature-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  max-width: 660px;
  margin: 0 0 16px;
  font-family: var(--font-sans);
}

.hero-feature-list div {
  display: grid;
  grid-template-columns: 30px minmax(0, 1fr);
  gap: 9px;
  align-items: center;
  min-height: 42px;
  padding: 6px 10px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(179, 38, 59, 0.2);
  border-radius: 14px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, background 160ms ease;
}

.hero-feature-list div:hover {
  background: linear-gradient(105deg, #eef7ff 0%, #fff8eb 54%, #e5f6f2 100%);
  border-color: rgba(31, 122, 117, 0.44);
  transform: translateY(-3px);
  box-shadow: 0 15px 28px rgba(23, 32, 28, 0.14);
}

.hero-feature-list div:hover span {
  color: #fff;
  background: linear-gradient(135deg, #2378cf, #1556b3);
  border-color: #1556b3;
  box-shadow: 0 5px 12px rgba(21, 86, 179, 0.24);
}

.hero-feature-list div:hover strong {
  color: #0b5558;
}

.hero-feature-list span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #1556b3;
  background: #eef5ff;
  border: 1px solid rgba(21, 86, 179, 0.28);
  border-radius: 50%;
  font-size: 1rem;
  font-weight: 900;
  line-height: 1;
}

.hero-feature-list strong {
  font-family: var(--font-display);
  font-weight: 500;
  color: #1e2c26;
  font-size: clamp(0.84rem, 1vw, 0.93rem);
  line-height: 1.2;
}

.hero-discover-link {
  display: inline;
  padding: 1px 4px 2px;
  color: #8f1f31;
  background: linear-gradient(90deg, #fff0b8, #d8f4ef);
  border-bottom: 2px solid #b5263b;
  border-radius: 4px;
  font-weight: 700;
  text-decoration: none;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

.hero-discover-link:hover {
  color: #651420;
  background: linear-gradient(90deg, #ffe28a, #bcebe3);
}

.hero-discover-link:focus-visible {
  outline: 3px solid rgba(21, 86, 179, 0.35);
  outline-offset: 2px;
}

.hero-actions,
.result-actions,
.test-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.account-cta-button {
  min-width: 230px;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 20px rgba(180, 59, 71, 0.22);
}

.result-dashboard-button,
.result-start-practice-button,
.result-start-simulator-button {
  color: #fff;
  border-color: transparent;
}

.result-dashboard-button:hover,
.result-start-practice-button:hover,
.result-start-simulator-button:hover {
  color: #fff;
}

.result-dashboard-button {
  background: linear-gradient(135deg, var(--accent-dark), #8d2032);
}

.result-start-practice-button {
  background: linear-gradient(135deg, var(--teal), #145e5a);
  box-shadow: 0 10px 20px rgba(31, 122, 117, 0.2);
}

.landing-practice-button {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), #145e5a);
  border-color: transparent;
  box-shadow: 0 12px 24px rgba(31, 122, 117, 0.22);
}

.landing-practice-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #258f88, #104f4b);
}

.landing-study-button {
  color: #183d65;
  background: linear-gradient(135deg, #eef7ff, #dcecff);
  border-color: #93bce8;
  box-shadow: 0 12px 24px rgba(24, 90, 168, 0.18);
  text-decoration: none;
}

.landing-study-button:hover {
  color: #102f51;
  background: linear-gradient(135deg, #e1f0ff, #c9e2fb);
  border-color: #6ba5df;
}

/* Give the primary entry points a clear, tactile lift without affecting
   compact controls elsewhere in the product. */
.hero-actions > .large-button,
.account-create-button,
#loginSubmitButton,
[data-public-signin-submit] {
  transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease, border-color 160ms ease;
}

.hero-actions > .large-button:hover:not(:disabled),
.account-create-button:hover:not(:disabled),
#loginSubmitButton:hover:not(:disabled),
[data-public-signin-submit]:hover:not(:disabled) {
  transform: translateY(-3px) scale(1.02);
  box-shadow: 0 16px 28px rgba(23, 32, 28, 0.22);
}

.hero-actions > .large-button:active:not(:disabled),
.account-create-button:active:not(:disabled),
#loginSubmitButton:active:not(:disabled),
[data-public-signin-submit]:active:not(:disabled) {
  transform: translateY(-1px) scale(1.01);
  box-shadow: 0 8px 16px rgba(23, 32, 28, 0.18);
}

.practice-hero .hero-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  width: 100%;
}

.practice-hero .hero-actions > .landing-study-button,
.practice-hero .hero-actions > .landing-practice-button,
.practice-hero .hero-actions > #startTestButton {
  width: 100%;
  min-width: 0;
  min-height: 68px;
  padding-right: 14px;
  padding-left: 14px;
}

.action-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
}

.action-icon-button::before {
  content: "";
  flex: 0 0 auto;
  width: 32px;
  height: 32px;
  border: 1px solid transparent;
  border-radius: 50%;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 18px;
  box-shadow: 0 5px 12px rgba(23, 32, 28, 0.14);
}

.action-dashboard-icon::before {
  border-color: #8fc1f1;
  background-color: #e2f1ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23185aa8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='7' height='9' x='3' y='3' rx='1'/%3E%3Crect width='7' height='5' x='14' y='3' rx='1'/%3E%3Crect width='7' height='9' x='14' y='12' rx='1'/%3E%3Crect width='7' height='5' x='3' y='16' rx='1'/%3E%3C/svg%3E");
}

.action-practice-icon::before {
  border-color: #efc36b;
  background-color: #fff1c9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a96800' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z'/%3E%3Cpath d='M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z'/%3E%3C/svg%3E");
}

.action-study-icon::before {
  border-color: #8eb8e8;
  background-color: #e5f2ff;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23185aa8' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 19.5A2.5 2.5 0 0 1 6.5 17H20'/%3E%3Cpath d='M6.5 2H20v20H6.5A2.5 2.5 0 0 1 4 19.5v-15A2.5 2.5 0 0 1 6.5 2Z'/%3E%3Cpath d='M9 7h7M9 11h7'/%3E%3C/svg%3E");
}

.action-simulator-icon::before {
  border-color: #77cbc2;
  background-color: #dff7f3;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23087f78' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect width='20' height='14' x='2' y='3' rx='2'/%3E%3Cpath d='m10 8 5 3-5 3z' fill='%23f7c94b' stroke='%23a96800'/%3E%3Cpath d='M8 21h8M12 17v4'/%3E%3C/svg%3E");
}

.large-button {
  min-height: 48px;
  padding: 12px 18px;
  font-size: 1rem;
}

.hero-note {
  max-width: 680px;
  margin: 12px 0 0;
  color: #52625c;
  font-size: 0.9rem;
}

.landing-free-note {
  color: #293832;
  font-size: 1.08rem;
  font-weight: 700;
}

.public-band {
  padding: 18px clamp(16px, 6vw, 72px) 28px;
  background: #17201c;
}

.public-band-header {
  max-width: 1180px;
  margin: 0 auto 14px;
}

.public-band-header .section-kicker {
  color: #a9e5df;
}

.public-band-header h2 {
  margin: 0;
  color: #fff;
  font-size: clamp(1.3rem, 2.6vw, 2rem);
  font-weight: 500;
}

.public-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1px;
  max-width: 1180px;
  margin: 0 auto;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
}

.public-metric {
  min-height: 92px;
  padding: 18px;
  background: #202c27;
}

.public-metric span {
  display: block;
  color: #fff;
  font-size: 2rem;
  font-weight: 850;
  line-height: 1;
}

.public-metric .metric-word {
  font-size: clamp(1.2rem, 2vw, 1.55rem);
  line-height: 1.15;
}

.public-metric p {
  margin: 8px 0 0;
  color: #c9d6d0;
}

.value-showcase {
  display: block;
  padding: clamp(40px, 7vw, 76px) clamp(16px, 6vw, 72px);
  background:
    linear-gradient(135deg, #f8faf7 0%, #ecf6f3 48%, #fff8ea 100%);
  border-top: 1px solid rgba(31, 122, 117, 0.1);
  border-bottom: 1px solid rgba(185, 125, 21, 0.14);
}

.value-content,
.interface-showcase {
  min-width: 0;
}

.value-content {
  max-width: 1180px;
  margin: 0 auto;
}

.value-content h2,
.showcase-header h2 {
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 400;
  line-height: 1.08;
}

.value-intro {
  max-width: 620px;
  color: var(--muted);
  font-size: 1.04rem;
}

@media (min-width: 980px) {
  .value-showcase .value-intro {
    max-width: none;
    white-space: nowrap;
  }
}

.language-highlight {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-top: 22px;
  padding: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--teal) 0%, #267f65 46%, var(--accent) 100%);
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(31, 122, 117, 0.18);
}

.language-highlight span {
  display: block;
  margin-bottom: 4px;
  color: #fff7e6;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.language-highlight strong {
  display: block;
  font-size: clamp(1.1rem, 2vw, 1.45rem);
  font-weight: 700;
  line-height: 1.2;
}

.language-highlight p {
  max-width: 360px;
  margin: 0;
  color: rgba(255, 255, 255, 0.88);
  font-weight: 800;
}

.hero-language-highlight {
  align-items: start;
  flex-direction: column;
  max-width: 610px;
  gap: 6px;
  margin: 0 0 14px;
  padding: 12px 14px;
  background:
    linear-gradient(135deg, #17201c 0%, var(--accent-dark) 56%, var(--accent) 100%);
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.16);
}

.hero-language-highlight strong {
  font-size: clamp(1rem, 1.6vw, 1.22rem);
}

.hero-language-highlight p {
  max-width: none;
  font-size: 0.9rem;
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 22px;
}

.feature-tile {
  min-height: 176px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}

.feature-tile:hover {
  border-color: rgba(31, 122, 117, 0.28);
  box-shadow: 0 18px 34px rgba(23, 32, 28, 0.1);
  transform: translateY(-2px);
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  margin-bottom: 12px;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 900;
}

.feature-tile:nth-child(2) .feature-icon {
  background: var(--accent);
}

.feature-tile:nth-child(3) .feature-icon {
  background: var(--gold);
}

.feature-tile:nth-child(4) .feature-icon {
  background: var(--green);
}

.feature-tile p {
  margin-bottom: 0;
  color: var(--muted);
}

.home-how-section,
.sample-section,
.dashboard-shell {
  padding: clamp(8px, 1vw, 10px) clamp(16px, 6vw, 72px) clamp(40px, 7vw, 76px);
  background: var(--surface);
  border-bottom: 1px solid rgba(31, 122, 117, 0.1);
}

.home-how-section {
  padding-top: clamp(34px, 5vw, 56px);
  background:
    linear-gradient(180deg, rgba(245, 250, 247, 0.9), rgba(255, 255, 255, 0.98));
}

.simulator-access-panel > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.practice-upgrade-card {
  border-color: rgba(141, 36, 48, 0.22);
  background:
    linear-gradient(135deg, #ffffff 0%, #fff7e6 48%, #fff1f2 100%);
}


.simulator-access-panel {
  padding: clamp(8px, 1.6vw, 18px) 0 0;
}

.home-how-section > .section-header,
.home-how-section > .how-steps,
.sample-section > .section-header,
.sample-section > .value-intro,
.sample-question-list,
.dashboard-shell > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.home-how-section > .section-header h2 {
  max-width: 760px;
  font-size: clamp(1.55rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.1;
}

.sample-question-list {
  display: block;
  margin-top: 22px;
}

.sample-question-card,
.dashboard-card {
  min-width: 0;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.sample-question-header {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}

.sample-question-card h3 {
  font-size: 1rem;
  line-height: 1.28;
}

.sample-question-card ul {
  display: grid;
  gap: 7px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.sample-question-card li {
  padding: 8px 10px;
  color: #34423b;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.9rem;
}

.sample-carousel-card {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(118px, auto) minmax(130px, 1fr) auto;
  max-width: 920px;
  min-height: 560px;
  margin: 0 auto;
  padding: clamp(22px, 4vw, 34px);
  overflow: hidden;
  background:
    linear-gradient(135deg, #ffffff 0%, #edf8f6 48%, #fff5df 100%);
  border: 2px solid rgba(31, 122, 117, 0.22);
  box-shadow: 0 24px 60px rgba(23, 32, 28, 0.13);
}

.sample-carousel-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 7px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
}

.sample-carousel-top,
.sample-carousel-controls {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.sample-carousel-card .sample-question-header {
  margin-bottom: 0;
}

.sample-carousel-card .sample-question-header .pill:first-child {
  padding: 10px 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: transparent;
  border-radius: 999px;
  font-size: 1.05rem;
  box-shadow: 0 10px 22px rgba(180, 59, 71, 0.18);
}

.sample-progress-text {
  display: grid;
  place-items: center;
  min-width: 76px;
  min-height: 76px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 50%;
  font-size: 1.25rem;
  font-weight: 900;
  box-shadow: 0 14px 32px rgba(180, 59, 71, 0.22);
}

.sample-carousel-card h3 {
  max-width: 760px;
  margin: 26px 0 20px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.15;
}

.sample-option-list {
  align-self: start;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.sample-carousel-card .sample-option-list li {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 12px;
  align-items: center;
  min-height: 68px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(31, 122, 117, 0.2);
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.sample-option-list li span {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: #fff;
  background: var(--teal);
  border-radius: 50%;
  font-weight: 900;
}

.sample-option-list li:nth-child(2) span {
  background: var(--accent);
}

.sample-option-list li:nth-child(3) span {
  background: var(--gold);
}

.sample-option-list li:nth-child(4) span {
  background: var(--green);
}

.sample-option-list li strong {
  font-size: 1rem;
  font-weight: 700;
}

.sample-carousel-controls {
  align-self: end;
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid rgba(31, 122, 117, 0.16);
}

.sample-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}

.sample-dots span {
  width: 10px;
  height: 10px;
  background: #c7d7d2;
  border-radius: 50%;
}

.sample-dots span.is-active {
  width: 30px;
  background: var(--teal);
  border-radius: 999px;
}

.dashboard-shell {
  background:
    linear-gradient(135deg, #f8faf7 0%, #eef8f6 55%, #fff8ea 100%);
}

.dashboard-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  padding: clamp(14px, 2.4vw, 20px);
  margin-bottom: 18px;
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(23, 32, 28, 0.16);
}

.dashboard-hero h2 {
  max-width: none;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.45rem, 3vw, 2.35rem);
  font-weight: 400;
  line-height: 1.08;
}

.dashboard-hero p {
  max-width: none;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.35;
}

.dashboard-hero .section-kicker {
  color: #aee6df;
}

.dashboard-hero-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.dashboard-hero-actions .button-link {
  text-decoration: none;
}

.dashboard-hero-actions .primary-button {
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
  box-shadow: 0 14px 30px rgba(23, 32, 28, 0.18);
}

.dashboard-hero-actions .primary-button:hover {
  background: #fff7f1;
  border-color: #fff7f1;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 12px;
}

.dashboard-card-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 42px;
  padding-right: 58px;
}

.dashboard-card-label {
  display: block;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
  line-height: 1.25;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}

.dashboard-card-icon {
  display: inline-grid;
  flex: 0 0 42px;
  width: 42px;
  height: 42px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 50%;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.08);
}

.dashboard-card-icon svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.dashboard-card-icon-latest {
  color: #087f78;
  background: #dff7f3;
}

.dashboard-card-icon-best {
  color: #a96800;
  background: #fff0c7;
}

.dashboard-card-icon-attempts {
  color: #185aa8;
  background: #e2efff;
}

.dashboard-card-icon-mistakes {
  color: #aa2638;
  background: #ffe7eb;
}

.dashboard-card strong {
  display: block;
  margin-top: 6px;
  margin-left: 52px;
  color: var(--accent-dark);
  font-size: clamp(1.35rem, 2.2vw, 1.85rem);
  line-height: 1.08;
  overflow-wrap: normal;
  word-break: keep-all;
}

.dashboard-card.clickable-card {
  position: relative;
  cursor: pointer;
  background: #dceff7;
  border-color: #9ecbde;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

.dashboard-card.clickable-card::after {
  content: "Open";
  position: absolute;
  top: 12px;
  right: 12px;
  padding: 3px 8px;
  color: var(--teal);
  background: rgba(31, 122, 117, 0.08);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 900;
  line-height: 1;
  opacity: 0.82;
  text-transform: uppercase;
}

.dashboard-card.clickable-card:hover,
.dashboard-card.clickable-card:focus-visible {
  border-color: rgba(31, 122, 117, 0.38);
  background: #cfe8f3;
  box-shadow: 0 18px 38px rgba(23, 32, 28, 0.12);
  transform: translateY(-2px);
}

.dashboard-card.clickable-card:focus-visible {
  outline: 3px solid rgba(31, 122, 117, 0.28);
  outline-offset: 3px;
}

@media (max-width: 520px) {
  .dashboard-card-heading {
    min-height: 38px;
  }

  .dashboard-card-icon {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .dashboard-card-icon svg {
    width: 21px;
    height: 21px;
  }

  .dashboard-card strong {
    margin-left: 48px;
  }
}

.dashboard-readiness-panel {
  margin-top: 14px;
  padding: clamp(16px, 3vw, 22px);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(31, 122, 117, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(23, 32, 28, 0.07);
}

.readiness-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
}

.readiness-panel-header h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 500;
}

.readiness-score-summary {
  display: flex;
  align-items: stretch;
  justify-content: flex-end;
  gap: 10px;
  flex: 0 0 auto;
}

.readiness-average-score {
  min-width: 150px;
  padding: 12px 14px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(23, 32, 28, 0.07);
}

.readiness-average-score span {
  display: block;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-average-score strong {
  display: block;
  margin-top: 6px;
  color: var(--accent-dark);
  font-size: 1.45rem;
  line-height: 1;
}

.final-readiness-score {
  min-width: 170px;
  padding: 12px 14px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent-dark));
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 12px 24px rgba(31, 122, 117, 0.18);
}

.final-readiness-score span {
  display: block;
  font-size: 0.75rem;
  font-weight: 900;
  text-transform: uppercase;
}

.final-readiness-score strong {
  display: block;
  margin-top: 3px;
  font-size: 2rem;
  line-height: 1;
}

.dashboard-readiness-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.readiness-row,
.readiness-empty {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.readiness-empty {
  grid-column: 1 / -1;
}

.readiness-empty p {
  margin: 5px 0 0;
  color: var(--muted);
}

.readiness-row-main,
.readiness-score-line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.readiness-row h4 {
  margin: 0;
  font-size: 1rem;
}

.readiness-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 700;
}

.readiness-row-main span {
  flex: 0 0 auto;
  padding: 5px 9px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.readiness-score-line {
  margin-top: 12px;
}

.readiness-bar {
  flex: 1 1 auto;
  height: 10px;
  overflow: hidden;
  background: #edf2ef;
  border-radius: 999px;
}

.readiness-bar span {
  display: block;
  height: 100%;
  background: var(--teal);
  border-radius: inherit;
}

.readiness-score-line strong {
  min-width: 48px;
  color: var(--ink);
  text-align: right;
}

.readiness-strong .readiness-row-main span {
  color: var(--green);
  background: var(--green-soft);
}

.readiness-moderate .readiness-row-main span {
  color: #8a5b00;
  background: var(--gold-soft);
}

.readiness-weak .readiness-row-main span {
  color: var(--red);
  background: var(--red-soft);
}

.readiness-strong .readiness-bar span {
  background: var(--green);
}

.readiness-moderate .readiness-bar span {
  background: var(--gold);
}

.readiness-weak .readiness-bar span {
  background: var(--red);
}

.dashboard-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 18px;
}

.dashboard-tab-group {
  display: inline-flex;
  gap: 4px;
  padding: 5px;
  background: rgba(233, 246, 244, 0.86);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 8px;
}

.dashboard-tab-group button {
  min-height: 42px;
  padding: 10px 16px;
  color: #31443d;
  background: transparent;
  border: 0;
  border-radius: 6px;
  font: inherit;
  font-size: 0.96rem;
  font-weight: 900;
  cursor: pointer;
}

.dashboard-tab-group button:hover,
.dashboard-tab-group button.is-active {
  color: #fff;
  background: var(--accent-dark);
  box-shadow: 0 12px 26px rgba(162, 31, 48, 0.18);
}

.weak-area-action-button {
  margin-left: auto;
  min-height: 48px;
  padding: 12px 18px;
  color: #10241f;
  background: linear-gradient(135deg, #f8dd8f, #74d2c8);
  border: 1px solid rgba(31, 122, 117, 0.34);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(31, 122, 117, 0.18);
  font: inherit;
  font-size: 0.98rem;
  font-weight: 900;
  cursor: pointer;
}

.weak-area-action-button:hover {
  background: linear-gradient(135deg, #ffe9a8, #4cbdb2);
  transform: translateY(-1px);
  box-shadow: 0 20px 42px rgba(31, 122, 117, 0.24);
}

.weak-area-action-button.is-unavailable,
.weak-area-action-button.is-unavailable:hover {
  color: #65736e;
  background: #e8eeec;
  border-color: #cbd7d3;
  box-shadow: none;
  cursor: not-allowed;
  transform: none;
  filter: saturate(0.45);
}

.weak-area-unavailable-dialog .dialog-actions {
  justify-content: flex-end;
}

.weak-area-unavailable-dialog .dialog-actions button {
  min-width: 140px;
}

.practice-weak-area-link {
  flex: 0 0 auto;
  white-space: nowrap;
}

.dashboard-history-panel,
.dashboard-mistake-panel {
  margin-top: 16px;
  padding: clamp(16px, 3vw, 22px);
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(31, 122, 117, 0.16);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(23, 32, 28, 0.07);
}

.dashboard-history-panel .section-header,
.dashboard-mistake-panel .section-header {
  margin-bottom: 12px;
}

.mistake-topic-filter {
  display: grid;
  gap: 5px;
  min-width: min(260px, 100%);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mistake-topic-filter select {
  min-height: 40px;
  padding: 8px 36px 8px 12px;
  color: #17201c;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(31, 122, 117, 0.22);
  border-radius: 8px;
  font: inherit;
  font-size: 0.92rem;
  font-weight: 800;
  text-transform: none;
}

.mistake-topic-filter select:disabled {
  opacity: 0.72;
}

.dashboard-mistake-tools {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.mistake-weak-area-button {
  margin-left: 0;
  min-height: 44px;
  padding: 10px 16px;
  white-space: nowrap;
}

.history-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.history-filter button {
  min-height: 38px;
  padding: 8px 12px;
  color: #31443d;
  background: rgba(233, 246, 244, 0.9);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 999px;
  font: inherit;
  font-size: 0.88rem;
  font-weight: 900;
  cursor: pointer;
}

.history-filter button:hover,
.history-filter button.is-active {
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
  box-shadow: 0 10px 22px rgba(162, 31, 48, 0.16);
}

.dashboard-history-panel h3,
.dashboard-mistake-panel h3 {
  margin: 0;
  font-size: clamp(1.25rem, 2.4vw, 1.7rem);
  font-weight: 500;
}

.dashboard-history-list,
.dashboard-mistake-list {
  display: grid;
  gap: 10px;
}

.history-row,
.history-empty {
  display: grid;
  grid-template-columns: 92px minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.history-empty {
  display: block;
}

.history-empty p {
  margin: 5px 0 0;
  color: var(--muted);
}

.mistake-row {
  display: grid;
  gap: 10px;
  padding: 15px;
  background:
    linear-gradient(135deg, #ffffff 0%, #f8faf7 58%, #fff5f6 100%);
  border: 1px solid rgba(179, 38, 59, 0.18);
  border-radius: 8px;
}

.mistake-row-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mistake-row h4 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
}

.mistake-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.mistake-answer-grid p {
  margin: 0;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mistake-answer-grid span {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.mistake-answer-grid strong {
  color: var(--ink);
}

.mistake-explanation {
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.history-score {
  display: grid;
  place-items: center;
  min-height: 64px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
}

.history-score strong {
  font-size: 1.3rem;
  line-height: 1;
}

.history-score span {
  font-size: 0.78rem;
  font-weight: 800;
}

.history-main h4 {
  margin: 0 0 4px;
  font-size: 1rem;
}

.history-main p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.history-main div {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.simulator-setup-shell {
  padding: clamp(8px, 1vw, 10px) clamp(16px, 6vw, 72px) clamp(34px, 6vw, 64px);
  background:
    linear-gradient(135deg, #ffffff 0%, #eef8f6 52%, #fff8ea 100%);
  border-bottom: 1px solid rgba(31, 122, 117, 0.14);
}

.simulator-setup-shell > * {
  max-width: 1180px;
  margin-left: auto;
  margin-right: auto;
}

.setup-topbar,
.setup-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.setup-topbar {
  display: none;
}

.setup-topbar h2 {
  font-size: clamp(1.8rem, 3.6vw, 3rem);
  font-weight: 400;
}

.compact-step-counter {
  justify-content: flex-end;
  margin-bottom: 10px;
}

.compact-step-counter > div {
  display: none;
}

.setup-progress {
  height: 8px;
  margin-top: 0;
  overflow: hidden;
  background: rgba(31, 122, 117, 0.12);
  border-radius: 999px;
}

.setup-progress span {
  display: block;
  width: 14%;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--accent));
  border-radius: inherit;
  transition: width 220ms ease;
}

.setup-panel {
  --setup-panel-padding: clamp(20px, 4vw, 34px);
  --setup-panel-icon-left: clamp(16px, 3vw, 28px);
  position: relative;
  display: none;
  margin-top: 24px;
  padding: var(--setup-panel-padding) var(--setup-panel-padding) var(--setup-panel-padding) clamp(76px, 8vw, 96px);
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 18px 40px rgba(23, 32, 28, 0.08);
}

.setup-panel.is-active {
  display: block;
}

.setup-panel h3 {
  max-width: min(100%, 780px);
  margin-top: 0;
  margin-bottom: 10px;
  font-size: clamp(1.35rem, 2.6vw, 2rem);
  font-weight: 500;
  line-height: 1.2;
}

.setup-step-intro {
  max-width: min(100%, 920px);
  margin: 0 0 18px;
  color: #17201c;
  font-size: 1rem;
  line-height: 1.45;
}

.setup-panel-controls {
  position: absolute;
  top: var(--setup-panel-padding);
  right: var(--setup-panel-padding);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
  margin: 0;
  z-index: 2;
}

.setup-step-counter-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.setup-panel-controls #setupStepCounter {
  min-height: 44px;
  padding: 9px 16px;
  color: #174f68;
  background: #d7edf7;
  border: 1px solid #91c4da;
  border-radius: 999px;
  box-shadow: 0 12px 26px rgba(41, 105, 132, 0.14);
  font-size: clamp(1rem, 1.5vw, 1.2rem);
  font-weight: 900;
  letter-spacing: 0;
}

.setup-actions {
  margin-top: 18px;
}

.setup-actions-top {
  justify-content: flex-end;
  margin-top: 0;
}

.setup-panel-controls .setup-actions {
  margin-top: 0;
}

.setup-stage-icon {
  --icon-accent: var(--red);
  --icon-accent-dark: var(--red-dark);
  --icon-soft: #fff1f3;
  position: absolute;
  top: var(--setup-panel-padding);
  left: var(--setup-panel-icon-left);
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: var(--icon-accent-dark);
  background: var(--icon-soft);
  border: 2px solid color-mix(in srgb, var(--icon-accent) 42%, #ffffff);
  border-radius: 50%;
  box-shadow: none;
}

.setup-stage-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.1;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.setup-panel-controls .setup-stage-icon-mobile {
  display: none;
}

.setup-stage-icon-welcome,
.setup-stage-icon-startTest {
  --icon-accent: #b3263b;
  --icon-accent-dark: #8f1f30;
  --icon-soft: #ffe8ec;
}

.setup-stage-icon-privacyTerms,
.setup-stage-icon-rules {
  --icon-accent: #1f7a75;
  --icon-accent-dark: #0f4f4b;
  --icon-soft: #e2f4f2;
}

.setup-stage-icon-mockSignIn,
.setup-stage-icon-identityConfirm,
.setup-stage-icon-faceCheck,
.setup-stage-icon-facePhoto {
  --icon-accent: #1e64c8;
  --icon-accent-dark: #184b92;
  --icon-soft: #e8f1ff;
}

.setup-stage-icon-emailLink {
  --icon-accent: #c47a00;
  --icon-accent-dark: #865100;
  --icon-soft: #fff3d8;
}

.setup-stage-icon-camera,
.setup-stage-icon-lightingCheck,
.setup-stage-icon-mockId {
  --icon-accent: #d1452f;
  --icon-accent-dark: #9b2f20;
  --icon-soft: #ffece7;
}

.setup-choice-actions {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 18px;
  padding: 14px;
  background: var(--teal-soft);
  border: 1px solid #a9dcd7;
  border-radius: 8px;
}

.setup-choice-actions p {
  flex: 1 1 260px;
  margin: 0;
  color: var(--muted);
  font-size: 0.92rem;
  font-weight: 700;
}

.simulator-benefit-heading {
  margin: 22px 0 0;
  color: #17201c;
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 2vw, 1.35rem);
}

.simulator-benefit-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.simulator-benefit-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  min-height: 122px;
  padding: 16px;
  background: linear-gradient(145deg, #fff, #f6fbfa);
  border: 1px solid #c9dfda;
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.08);
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease, background 180ms ease;
}

.simulator-benefit-card:hover {
  background: linear-gradient(145deg, #fffdf7, #e8f7f4);
  border-color: rgba(31, 122, 117, 0.55);
  transform: translateY(-3px);
  box-shadow: 0 16px 30px rgba(23, 32, 28, 0.14);
}

.simulator-benefit-icon {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  color: #1556b3;
  background: #eaf3ff;
  border: 1px solid #b8d3f2;
  border-radius: 13px;
  box-shadow: 0 6px 14px rgba(21, 86, 179, 0.12);
}

.simulator-benefit-card:nth-child(2) .simulator-benefit-icon {
  color: #8d2430;
  background: #fff0f2;
  border-color: #edc3ca;
}

.simulator-benefit-card:nth-child(3) .simulator-benefit-icon {
  color: #9a6400;
  background: #fff5da;
  border-color: #efd58c;
}

.simulator-benefit-card:nth-child(4) .simulator-benefit-icon {
  color: #126f6a;
  background: #e4f6f3;
  border-color: #a9dcd7;
}

.simulator-benefit-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.simulator-benefit-card strong {
  display: block;
  margin: 1px 0 5px;
  color: #17201c;
  font-family: var(--font-display);
  font-size: 1rem;
}

.simulator-benefit-card p {
  margin: 0;
  color: #52625a;
  font-size: 0.9rem;
  line-height: 1.45;
}

@media (max-width: 720px) {
  .simulator-benefit-grid {
    grid-template-columns: 1fr;
  }

  .simulator-benefit-card {
    min-height: 0;
  }
}

.consent-list,
.check-list {
  display: grid;
  align-content: start;
  align-self: start;
  grid-auto-rows: max-content;
  gap: 6px;
  margin-top: 12px;
}

.consent-list label,
.check-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.check-item {
  align-items: flex-start;
  min-height: 0;
  padding: 7px 10px;
  line-height: 1.3;
  font-weight: 800;
}

.check-item.good {
  color: #0f4f4b;
  background: #eef8f6;
  border-color: #a9dcd7;
}

.check-item.warning {
  color: #6d4b12;
  background: #fff7e6;
  border-color: #ead19e;
}

.check-item.neutral {
  color: var(--muted);
}

.check-icon {
  display: inline-grid;
  flex: 0 0 22px;
  width: 22px;
  height: 22px;
  place-items: center;
  color: var(--muted);
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.8rem;
  font-weight: 900;
  line-height: 1;
}

.check-item.good .check-icon {
  color: #ffffff;
  background: var(--teal);
  border-color: var(--teal);
}

.check-item.warning .check-icon {
  color: #ffffff;
  background: #c47a00;
  border-color: #c47a00;
}

.consent-list .consent-select-all {
  color: #17201c;
  background: linear-gradient(135deg, #eef8f6, #fff7e6);
  border-color: rgba(31, 122, 117, 0.28);
  font-weight: 900;
}

.consent-list input {
  width: auto;
  min-height: auto;
  margin-top: 0;
}

.mock-detail-grid,
.camera-setup-grid,
.mock-id-layout,
.mock-link-panel,
.mock-email-card {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
  gap: 16px;
  margin-top: 18px;
}

.mock-link-panel,
.mock-email-card {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mock-email-card {
  grid-template-columns: minmax(0, 1fr);
}

.mock-detail-grid + .privacy-note,
.camera-setup-grid + .privacy-note,
.mock-id-layout + .privacy-note,
.mock-link-panel + .privacy-note,
.mock-email-card + .privacy-note {
  margin-top: 12px;
}

.mock-id-layout {
  grid-template-columns: minmax(280px, 1.15fr) minmax(260px, 0.85fr);
}

.mock-id-camera-panel {
  display: grid;
  gap: 12px;
}

.mock-id-camera-tips {
  padding: 12px 14px 12px 32px;
  color: #4f5f59;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(238, 248, 246, 0.88));
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 8px;
  font-size: 0.95rem;
}

.id-position-example {
  margin: 0 0 14px;
  padding: 10px;
  background: #fff;
  border: 1px solid rgba(31, 122, 117, 0.16);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.08);
}

.id-position-example img {
  display: block;
  width: 100%;
  max-height: 320px;
  object-fit: cover;
  object-position: center;
  border-radius: 7px;
}

.id-position-example figcaption {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.3;
}

[data-setup-step="camera"] .camera-setup-grid,
[data-setup-step="lightingCheck"] .camera-setup-grid,
[data-setup-step="faceCheck"] .camera-setup-grid,
[data-setup-step="facePhoto"] .camera-setup-grid,
[data-setup-step="mockId"] .mock-id-layout {
  grid-template-columns: minmax(320px, 640px) minmax(260px, 1fr);
  align-items: start;
}

.mock-detail-grid div,
.practice-detail-field,
.camera-status-panel,
.mock-id-guidance {
  padding: 18px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mock-detail-grid span,
.practice-detail-field span,
.mock-link-panel span,
.mock-email-card span {
  display: block;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 800;
  text-transform: uppercase;
}

.mock-detail-grid strong,
.mock-link-panel strong,
.mock-email-card strong {
  display: block;
  margin-top: 8px;
  font-size: 1.4rem;
}

.practice-detail-field {
  display: grid;
  gap: 8px;
}

.practice-detail-field input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 1.05rem;
  font-weight: 800;
}

.practice-detail-field input.is-invalid {
  background: var(--red-soft);
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(179, 38, 59, 0.12);
}

.practice-detail-field small {
  color: var(--muted);
  font-weight: 700;
}

.detail-validation-note {
  margin: 12px 0 0;
  padding: 10px 12px;
  color: #1d5d58;
  background: var(--teal-soft);
  border: 1px solid #a9dcd7;
  border-radius: 8px;
  font-size: 0.92rem;
  font-weight: 700;
}

.detail-validation-note.is-error {
  color: #7a1421;
  background: var(--red-soft);
  border-color: var(--red-line);
}

.camera-live-box {
  position: relative;
  min-height: 280px;
  overflow: hidden;
  background: #101a17;
  border: 1px solid rgba(23, 32, 28, 0.2);
  border-radius: 8px;
}

[data-setup-step="camera"] .camera-live-box,
[data-setup-step="lightingCheck"] .camera-live-box,
[data-setup-step="faceCheck"] .camera-live-box,
[data-setup-step="facePhoto"] .camera-live-box,
[data-setup-step="mockId"] .camera-live-box {
  width: min(100%, 640px);
  min-height: 0;
  aspect-ratio: 4 / 3;
}

.camera-live-box video {
  display: block;
  width: 100%;
  height: 100%;
  min-height: 280px;
  object-fit: cover;
  transform: scaleX(-1);
}

[data-setup-step="camera"] .camera-live-box video,
[data-setup-step="lightingCheck"] .camera-live-box video,
[data-setup-step="faceCheck"] .camera-live-box video,
[data-setup-step="facePhoto"] .camera-live-box video,
[data-setup-step="mockId"] .camera-live-box video {
  min-height: 0;
}

#cameraPlaceholder,
.face-frame {
  position: absolute;
  inset: 18px;
  display: grid;
  place-items: center;
  color: #d8e5df;
  border: 2px dashed rgba(255, 255, 255, 0.38);
  border-radius: 8px;
  text-align: center;
}

.face-frame {
  pointer-events: none;
  border-color: rgba(255, 255, 255, 0.72);
}

.camera-status-panel {
  display: flex;
  align-items: start;
  flex-direction: column;
  gap: 10px;
}

.camera-feedback-option {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  color: #17201c;
  background: linear-gradient(135deg, #eef8f6, #fff7e6);
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 8px;
  font-weight: 900;
}

.camera-feedback-option input {
  width: auto;
  min-height: auto;
}

.camera-skip-note {
  margin: 0;
  padding: 10px 12px;
  color: #6d4b12;
  background: var(--gold-soft);
  border: 1px solid #ead19e;
  border-radius: 8px;
  font-size: 0.9rem;
  font-weight: 700;
}

.mock-id-guidance {
  align-self: start;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(238, 248, 246, 0.98));
}

.mock-id-guidance h4 {
  margin: 0 0 12px;
  color: var(--teal-dark);
  font-size: 1.05rem;
  font-weight: 900;
}

.rules-list,
.mock-id-layout ul {
  display: grid;
  gap: 9px;
  margin: 0;
  padding-left: 20px;
}

.environment-monitor-badge {
  justify-self: end;
  padding: 8px 10px;
  color: #0f4f4b;
  background: #e3f3f1;
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 800;
}

.environment-report {
  margin-top: 18px;
  padding: clamp(18px, 4vw, 28px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(23, 32, 28, 0.08);
}

.environment-report-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  margin-top: 16px;
}

.environment-report-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.environment-report-item.warning {
  background: var(--gold-soft);
  border-color: #edcf8e;
}

.environment-report-item.good {
  background: var(--green-soft);
  border-color: var(--green-line);
}

.environment-report-item.neutral {
  background: #eef6ff;
  border-color: #9fc8ee;
}

.environment-icon {
  width: 34px;
  height: 34px;
  color: #1f7a75;
  background: #e8f6f4;
}

.environment-report-item.warning .environment-icon {
  color: #8a5a09;
  background: #fff1c8;
}

.environment-report-item.good .environment-icon {
  color: #1f7a4f;
  background: #e7f6ee;
}

.environment-report-item.neutral .environment-icon {
  color: #145da0;
  background: #dceeff;
}

.environment-report .section-kicker {
  font-size: 1rem;
}

.environment-report h2 {
  font-size: clamp(1.7rem, 3vw, 2.25rem);
}

.environment-report-title {
  display: block;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 900;
  text-transform: uppercase;
}

.environment-report-message {
  margin-top: 7px;
  margin-bottom: 0;
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.35;
}

.environment-report-time {
  display: block;
  margin-top: 10px;
  padding-top: 9px;
  color: #6d4b12;
  border-top: 1px solid rgba(196, 122, 0, 0.22);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  text-transform: none;
}

.environment-report-time-note,
.environment-time-row {
  display: block;
}

.environment-report-time-note {
  margin-bottom: 8px;
  color: var(--muted);
  font-weight: 700;
}

.environment-time-row {
  padding: 8px 0;
}

.environment-time-row + .environment-time-row {
  margin-top: 6px;
  border-top: 1px solid rgba(196, 122, 0, 0.18);
}

.environment-time-row span {
  display: block;
}

.environment-time-row span:first-child {
  margin-bottom: 3px;
  color: #17201c;
  font-weight: 900;
}

.environment-timeline {
  margin-top: 18px;
}

.environment-timeline-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(280px, 0.75fr);
  gap: 14px;
}

.environment-timeline-card,
.environment-timeline-empty {
  padding: 16px;
  background: linear-gradient(135deg, #ffffff 0%, #f8faf7 100%);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.environment-timeline-card h3 {
  margin: 4px 0 12px;
  font-size: 1.15rem;
}

.environment-event-list {
  display: grid;
  gap: 10px;
}

.environment-event-row,
.environment-timeline-empty,
.environment-recommendation-list li {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: start;
  gap: 10px;
}

.environment-event-row {
  padding: 12px;
  background: var(--gold-soft);
  border: 1px solid #edcf8e;
  border-radius: 8px;
}

.environment-event-time {
  min-width: 52px;
  padding: 5px 8px;
  color: #ffffff;
  background: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 900;
  text-align: center;
}

.environment-event-row strong,
.environment-timeline-empty strong {
  display: block;
  margin-bottom: 4px;
}

.environment-event-row p,
.environment-event-row small,
.environment-timeline-empty p {
  display: block;
  margin: 0;
  color: var(--muted);
  line-height: 1.35;
}

.environment-event-row small + small {
  margin-top: 4px;
}

.environment-recommendation-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.environment-recommendation-list li {
  grid-template-columns: auto minmax(0, 1fr);
  padding: 12px;
  background: #eef8f7;
  border: 1px solid rgba(31, 122, 117, 0.2);
  border-radius: 8px;
  font-weight: 700;
}

.interface-showcase {
  align-self: start;
  padding: clamp(16px, 3vw, 24px);
  background:
    linear-gradient(145deg, #17201c 0%, #203a35 54%, #5e2530 100%);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  box-shadow: 0 28px 70px rgba(23, 32, 28, 0.24);
}

.showcase-header {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
  color: #fff;
}

.showcase-header .section-kicker {
  color: #91d6d1;
}

.showcase-dots {
  display: flex;
  gap: 7px;
  padding-top: 6px;
}

.showcase-dot {
  width: 11px;
  height: 11px;
  min-height: 0;
  padding: 0;
  background: rgba(255, 255, 255, 0.32);
  border: 0;
  border-radius: 50%;
}

.showcase-dot.is-active {
  width: 28px;
  background: #fff;
  border-radius: 999px;
}

.showcase-frame {
  position: relative;
  min-height: 540px;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(247, 250, 247, 0.92));
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 8px;
}

.practice-hero .showcase-frame {
  min-height: clamp(390px, 42vw, 500px);
}

.showcase-frame::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  width: 100%;
  height: 3px;
  background: linear-gradient(90deg, var(--teal), var(--gold), var(--accent));
  transform-origin: left center;
  animation: showcaseProgress 3.6s linear infinite;
}

.interface-showcase:hover .showcase-frame::after,
.interface-showcase:focus-within .showcase-frame::after {
  animation-play-state: paused;
}

.showcase-slide {
  position: absolute;
  inset: 0;
  display: grid;
  align-content: stretch;
  padding: clamp(16px, 3vw, 22px);
  opacity: 0;
  transform: translateX(18px);
  pointer-events: none;
  transition: opacity 360ms ease, transform 360ms ease;
}

.showcase-slide.is-active {
  opacity: 1;
  transform: translateX(0);
  pointer-events: auto;
}

.screenshot-card {
  display: grid;
  grid-template-rows: minmax(0, 1fr);
  gap: 0;
  height: 100%;
  margin: 0;
}

.screenshot-window {
  position: relative;
  min-height: 0;
  overflow: hidden;
  background: #f8faf7;
  border: 1px solid rgba(23, 32, 28, 0.12);
  border-radius: 8px;
  box-shadow: 0 20px 44px rgba(23, 32, 28, 0.18);
}

.screenshot-window::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.28);
}

.screenshot-window img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: top center;
}

/* Keep the complete result report visible, including its lowest recommendation. */
.showcase-slide[data-showcase-slide="8"] .screenshot-window {
  display: flex;
  align-items: center;
  justify-content: center;
}

.showcase-slide[data-showcase-slide="8"] .screenshot-window img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-position: center;
}

.screenshot-card figcaption {
  display: grid;
  gap: 6px;
  padding: 16px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(215, 223, 217, 0.9);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(23, 32, 28, 0.08);
}

.screenshot-card figcaption span {
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.screenshot-card figcaption strong {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.25;
}

.practice-hero .showcase-header h2 {
  font-size: clamp(1.35rem, 2vw, 1.9rem);
}

.practice-hero .showcase-slide {
  padding: clamp(12px, 2vw, 18px);
}

.practice-hero .screenshot-card {
  gap: 0;
}

.practice-hero .screenshot-card figcaption {
  padding: 14px;
}

@keyframes showcaseProgress {
  from {
    transform: scaleX(0);
  }

  to {
    transform: scaleX(1);
  }
}

.mock-browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mock-browser-bar span {
  width: 9px;
  height: 9px;
  background: #d6ddd8;
  border-radius: 50%;
}

.mock-browser-bar span:first-child {
  background: var(--accent);
}

.mock-browser-bar span:nth-child(2) {
  background: var(--gold);
}

.mock-browser-bar span:nth-child(3) {
  background: var(--green);
}

.mock-browser-bar strong {
  margin-left: 6px;
  color: var(--muted);
  font-size: 0.88rem;
}

.mock-stepper {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.mock-stepper span {
  min-height: 70px;
  padding: 12px;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-size: 0.86rem;
  font-weight: 800;
}

.mock-stepper .is-complete {
  color: #276845;
  background: var(--green-soft);
  border-color: var(--green-line);
}

.mock-stepper .is-active {
  color: #fff;
  background: var(--teal);
  border-color: var(--teal);
}

.camera-preview {
  display: grid;
  grid-template-columns: 148px minmax(0, 1fr);
  gap: 16px;
  align-items: center;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.camera-face {
  aspect-ratio: 1;
  background:
    radial-gradient(circle at 50% 37%, #f7d6bd 0 15%, transparent 16%),
    radial-gradient(circle at 50% 76%, #315348 0 25%, transparent 26%),
    linear-gradient(135deg, #dff0ec, #f8fbf8);
  border: 8px solid #ecf2ee;
  border-radius: 50%;
  box-shadow: inset 0 0 0 2px #b7d9d4;
}

.camera-preview p,
.mock-review-row p {
  margin-bottom: 0;
  color: var(--muted);
}

.mock-test-top {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mock-test-top p {
  margin-bottom: 4px;
  color: var(--teal);
  font-weight: 800;
  text-transform: uppercase;
}

.mock-test-top strong {
  align-self: start;
  min-width: 92px;
  padding: 10px;
  color: #fff;
  background: var(--accent);
  border-radius: 8px;
  font-size: 1.35rem;
  text-align: center;
}

.mock-options {
  display: grid;
  gap: 10px;
}

.mock-options span {
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 800;
}

.mock-options .is-selected {
  border-color: var(--teal);
  box-shadow: inset 4px 0 0 var(--teal);
}

.mock-review-row {
  display: grid;
  grid-template-columns: 112px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.mock-badge {
  padding: 7px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-align: center;
  text-transform: uppercase;
}

.mock-badge.is-correct {
  color: var(--green);
  background: var(--green-soft);
}

.mock-badge.is-incorrect {
  color: var(--red);
  background: var(--red-soft);
}

.mock-score-card {
  display: grid;
  justify-items: center;
  gap: 5px;
  padding: 28px 18px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent-dark));
  border-radius: 8px;
}

.mock-score-card p,
.mock-score-card span {
  margin: 0;
  font-weight: 800;
}

.mock-score-card strong {
  font-size: clamp(3.2rem, 8vw, 5rem);
  line-height: 1;
}

.mock-progress-list {
  display: grid;
  gap: 10px;
}

.mock-progress-list span {
  padding: 13px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--muted);
  font-weight: 800;
}

.test-shell,
.result-shell,
.completed-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 52px;
}

.test-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 14px;
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.test-status-bar h2 {
  margin-bottom: 0;
  font-size: 1.35rem;
}

.test-status-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-left: auto;
}

.mobile-test-status-actions {
  display: none;
}

.return-welcome-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex: 0 0 auto;
  min-height: 42px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-color: rgba(141, 36, 48, 0.72);
  box-shadow: 0 10px 20px rgba(180, 59, 71, 0.2);
  white-space: nowrap;
}

.return-welcome-button .button-icon {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.return-welcome-button:hover {
  color: #fff;
  background: linear-gradient(135deg, #d63a4b, #8d2430);
}

.test-camera-preview {
  position: relative;
  width: 100%;
  margin-top: 16px;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background:
    linear-gradient(135deg, #17201c, #30413a);
  border: 1px solid rgba(31, 122, 117, 0.24);
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(23, 32, 28, 0.08);
}

.test-camera-preview video {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scaleX(-1);
}

.test-camera-preview span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 10px;
  color: #d9eee9;
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1.25;
  text-align: center;
}

.timer-box {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-width: 120px;
  padding: 10px 14px;
  color: #fff;
  background: #26322d;
  border-radius: 8px;
  text-align: center;
}

.timer-icon {
  flex: 0 0 auto;
  width: 25px;
  height: 25px;
  color: #c9e9e4;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.timer-box span {
  display: block;
  font-size: 1.45rem;
  font-weight: 850;
  line-height: 1.1;
}

.timer-box small {
  color: #c9d6d0;
  font-size: 0.76rem;
  text-transform: uppercase;
}

.test-layout {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  gap: 14px;
}

.question-map,
.active-question,
.result-hero,
.insight-panel,
.answer-review,
.completed-shell {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.question-map {
  align-self: start;
  padding: 16px;
}

.question-map-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 8px;
}

.map-button {
  width: 100%;
  min-height: 42px;
  padding: 0;
  color: #34423b;
  background: #f2f5f1;
  border-color: #d5ded8;
}

.map-button.is-current {
  color: #fff;
  background: var(--teal);
}

.map-button.is-answered {
  border-color: #9ccdbd;
  box-shadow: inset 0 -3px 0 #2e7d4f;
}

.active-question {
  display: flex;
  flex-direction: column;
  min-height: 520px;
  padding: clamp(18px, 4vw, 34px);
}

.active-question .test-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(31, 122, 117, 0.12);
}

.active-question .test-controls button {
  min-width: 118px;
}

.question-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}

.active-question h2 {
  max-width: 880px;
  margin-bottom: 12px;
  font-size: clamp(1.35rem, 3vw, 2.15rem);
  line-height: 1.2;
}

.simulator-question-report-action {
  display: flex;
  justify-content: flex-end;
  min-height: 34px;
  margin-bottom: 12px;
}

.simulator-report-question-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  color: var(--muted);
  background: #eef8fb;
  border: 1px solid #b9dce5;
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.2;
}

.simulator-report-question-button:hover,
.simulator-report-question-button:focus-visible {
  color: var(--accent-dark);
  background: #dff2f7;
  border-color: #7dbfce;
  box-shadow: none;
  transform: none;
}

.simulator-report-question-icon {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.answer-options {
  display: grid;
  gap: 10px;
  margin-bottom: 24px;
}

.active-question .answer-options {
  flex: 1 1 auto;
}

.answer-option {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 58px;
  padding: 16px;
  background: #f8faf7;
  border: 1px solid #d7dfd9;
  border-radius: 8px;
  cursor: pointer;
}

.answer-option:hover {
  background: var(--teal-soft);
  border-color: #91cbc3;
}

.answer-option.is-selected {
  background:
    linear-gradient(90deg, rgba(31, 122, 117, 0.18), rgba(233, 246, 244, 0.98));
  border: 2px solid var(--teal);
  box-shadow:
    0 0 0 4px rgba(31, 122, 117, 0.14),
    inset 6px 0 0 var(--teal);
}

.answer-option.is-selected span {
  color: #10261f;
  font-weight: 850;
}

.answer-option input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--teal);
}

.answer-option span {
  min-width: 0;
  color: var(--ink);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.submit-button {
  margin-left: auto;
}

.result-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 168px;
  gap: clamp(16px, 3vw, 28px);
  align-items: center;
  margin-bottom: 14px;
  padding: clamp(18px, 3vw, 28px);
  background:
    radial-gradient(circle at 82% 24%, rgba(248, 221, 143, 0.28), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 251, 0.96));
  box-shadow: 0 18px 42px rgba(23, 32, 28, 0.07);
}

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

.result-hero h2 {
  margin-bottom: 8px;
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 400;
}

.result-hero #resultMessage {
  max-width: 760px;
  margin-bottom: 16px;
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.45;
}

.result-attempt-meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(112px, 1fr));
  gap: 10px;
  max-width: 820px;
  margin: 16px 0 18px;
}

.result-attempt-meta div {
  padding: 10px 12px;
  background: linear-gradient(135deg, #f8faf7, #fff7e6);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 10px;
}

.result-attempt-meta dt {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  line-height: 1.15;
  text-transform: uppercase;
}

.result-attempt-meta dd {
  margin: 0;
  color: var(--ink);
  font-size: 0.96rem;
  font-weight: 800;
  line-height: 1.2;
}

.result-hero .result-actions {
  gap: 8px;
}

.result-hero .result-actions button {
  min-height: 42px;
  padding: 9px 14px;
}

.result-illustration {
  display: grid;
  place-items: center;
  width: 128px;
  height: 128px;
  justify-self: end;
  border-radius: 50%;
  background: linear-gradient(135deg, #e8f6f4, #fff7e6);
  border: 1px solid rgba(31, 122, 117, 0.18);
  box-shadow: 0 18px 42px rgba(23, 32, 28, 0.1);
}

.result-illustration svg {
  width: 92px;
  height: 92px;
  fill: none;
  stroke: #1f7a75;
  stroke-width: 4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.result-illustration.result-good {
  background: linear-gradient(135deg, #e7f6ee, #fff7d5);
}

.result-illustration.result-good svg {
  stroke: #1f7a4f;
}

.result-illustration.result-practice {
  background: linear-gradient(135deg, #fff2d8, #fff7ef);
}

.result-illustration.result-practice svg {
  stroke: var(--accent-dark);
}

.score-display {
  display: flex;
  align-items: baseline;
  justify-content: center;
  min-width: 0;
  min-height: 118px;
  padding: 18px 16px;
  color: #fff;
  background:
    linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 8px;
  box-shadow: 0 14px 30px rgba(179, 38, 59, 0.22);
}

.result-good .score-display {
  background: linear-gradient(135deg, #1f7a4f, #0e5f3a);
  box-shadow: 0 14px 30px rgba(31, 122, 79, 0.22);
}

.result-steady .score-display {
  background: linear-gradient(135deg, #1f7a75, #174f4b);
  box-shadow: 0 14px 30px rgba(31, 122, 117, 0.22);
}

.score-display span:first-child {
  font-size: 3.15rem;
  font-weight: 900;
  line-height: 0.9;
}

.score-display span:last-child {
  font-size: 1.08rem;
  font-weight: 800;
}

.insight-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.insight-panel {
  min-height: 210px;
  padding: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 251, 0.94));
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.06);
}

.insight-panel h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  font-size: 1.15rem;
}

.panel-title-icon,
.area-icon,
.coach-action-icon,
.environment-icon {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
}

.panel-title-icon {
  width: 38px;
  height: 38px;
}

.strong-panel .panel-title-icon {
  color: #1f7a4f;
  background: #e7f6ee;
}

.review-panel .panel-title-icon {
  color: #9a2031;
  background: #fff0f2;
}

.coach-panel .panel-title-icon {
  color: #8a5a09;
  background: #fff1c8;
}

.panel-title-icon svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.insight-list {
  display: grid;
  gap: 8px;
  font-size: 1.15rem;
  line-height: 1.35;
}

.area-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 12px;
  background: rgba(255, 255, 255, 0.76);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.area-topic {
  flex: 1;
  min-width: 0;
}

.area-icon {
  width: 34px;
  height: 34px;
  color: #1f7a75;
  background: #e8f6f4;
}

.area-icon svg,
.coach-action-icon svg,
.environment-icon svg {
  width: 19px;
  height: 19px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.area-strong .area-icon {
  color: #1f7a4f;
  background: #e7f6ee;
}

.area-review .area-icon {
  color: #9a2031;
  background: #fff0f2;
}

.area-empty {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px dashed rgba(31, 122, 117, 0.18);
  border-radius: 8px;
}

.area-empty p {
  margin: 0;
}

.coach-panel {
  background: #fff7e6;
  border-color: #edcf8e;
  font-size: 1.15rem;
  line-height: 1.35;
}

.coach-headline {
  margin-bottom: 8px;
  color: #6b430c;
  font-weight: 850;
}

.coach-panel ul {
  display: grid;
  gap: 9px;
  margin: 12px 0 0;
  padding-left: 0;
  list-style: none;
}

.coach-panel li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

.coach-action-icon {
  width: 30px;
  height: 30px;
  color: #8a5a09;
  background: #fff1c8;
}

.muted-copy {
  color: var(--muted);
}

.answer-review {
  padding: clamp(18px, 4vw, 28px);
}

.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.review-list {
  display: grid;
  gap: 12px;
}

.review-item {
  padding: 16px;
  background: #fafbf8;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
}

.review-item.is-correct {
  border-left-color: var(--green);
}

.review-item.is-incorrect {
  border-left-color: var(--accent);
}

.review-heading {
  display: grid;
  grid-template-columns: 14px minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  margin-bottom: 12px;
}

.result-dot {
  width: 12px;
  height: 12px;
  margin-top: 5px;
  background: var(--accent);
  border-radius: 50%;
}

.is-correct .result-dot {
  background: var(--green);
}

.review-number {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
  text-transform: uppercase;
}

.review-answer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 12px;
}

.review-answer-grid div {
  min-width: 0;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.review-status {
  align-self: start;
  min-width: 84px;
  padding: 5px 9px;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
}

.review-status.answer-correct {
  color: var(--green);
  background: var(--green-soft);
}

.review-status.answer-incorrect {
  color: var(--red);
  background: var(--red-soft);
}

.review-answer-grid .review-answer-card {
  position: relative;
  background: #fff;
}

.review-answer-grid .answer-correct {
  background: var(--green-soft);
  border-color: var(--green-line);
  box-shadow: inset 4px 0 0 var(--green);
}

.review-answer-grid .answer-correct span {
  color: #276845;
}

.review-answer-grid .answer-incorrect {
  background: var(--red-soft);
  border-color: var(--red-line);
  box-shadow: inset 4px 0 0 var(--red);
}

.review-answer-grid .answer-incorrect span {
  color: var(--red);
}

.review-answer-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
}

.review-answer-grid .review-answer-text {
  margin: 0;
  color: var(--ink);
  font-weight: 400;
  overflow-wrap: anywhere;
}

.completed-shell {
  padding: clamp(22px, 4vw, 34px);
}

.completed-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.confirm-dialog,
.account-dialog,
.contact-dialog,
.contact-success-dialog,
.question-report-dialog {
  width: min(520px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  max-height: calc(100dvh - 24px);
  padding: 0;
  overflow: auto;
  border: 2px solid rgba(23, 32, 28, 0.82);
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(23, 32, 28, 0.28);
}

.account-dialog {
  width: min(840px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  font-family: var(--font-sans);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 230, 0.96) 46%, rgba(255, 241, 242, 0.98) 100%);
  scrollbar-width: thin;
  scrollbar-color: rgba(86, 93, 89, 0.78) transparent;
}

.account-dialog::-webkit-scrollbar {
  width: 11px;
}

.account-dialog::-webkit-scrollbar-track {
  margin-block: 10px;
  background: transparent;
  border-radius: 999px;
}

.account-dialog::-webkit-scrollbar-thumb {
  min-height: 42px;
  background: linear-gradient(180deg, rgba(112, 120, 115, 0.88), rgba(72, 81, 76, 0.88));
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

.account-dialog::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(72, 126, 120, 0.94), rgba(91, 32, 40, 0.9));
  background-clip: padding-box;
}

.account-dialog::-webkit-scrollbar-button,
.account-dialog::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

.profile-dialog {
  width: min(820px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
}

.confirm-dialog::backdrop,
.account-dialog::backdrop,
.contact-dialog::backdrop,
.contact-success-dialog::backdrop,
.question-report-dialog::backdrop {
  background: rgba(23, 32, 28, 0.58);
}

.confirm-dialog form,
.account-dialog form,
.contact-dialog form,
.question-report-dialog form {
  display: grid;
  gap: 16px;
  padding: clamp(18px, 3vw, 28px);
}

.signout-dialog {
  width: min(680px, calc(100% - 24px));
  max-width: calc(100vw - 24px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 230, 0.96) 52%, rgba(255, 241, 242, 0.98));
}

.signout-dialog form {
  gap: 0;
}

.signout-dialog .account-dialog-header {
  margin-bottom: 0;
}

.signout-dialog-body {
  display: grid;
  gap: 16px;
  padding-top: clamp(16px, 2.4vw, 24px);
}

.signout-dialog-body p {
  margin: 0;
  color: #17201c;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.45;
}

.practice-unchecked-answer-dialog .dialog-actions {
  display: flex;
  justify-content: flex-end;
}

.practice-unchecked-answer-dialog .dialog-actions button {
  min-width: min(100%, 250px);
}

.inactivity-countdown-copy {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 18px;
  border: 1px solid rgba(159, 33, 52, 0.42);
  border-radius: 14px;
  color: #17201c;
  font-size: 1.08rem;
  font-weight: 800;
  background: rgba(255, 252, 244, 0.98);
}

.inactivity-countdown-copy strong {
  flex: 0 0 auto;
  min-width: 76px;
  padding: 8px 12px;
  border-radius: 999px;
  color: #fff;
  text-align: center;
  background: linear-gradient(135deg, var(--teal), var(--red));
  box-shadow: 0 14px 34px rgba(188, 54, 70, 0.18);
}

.question-report-dialog {
  width: min(680px, calc(100% - 24px));
  font-family: var(--font-sans);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 230, 0.96) 52%, rgba(255, 241, 242, 0.98));
}

.question-report-form,
.question-report-dialog form {
  gap: 0;
}

.question-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: calc(clamp(18px, 3vw, 28px) * -1) calc(clamp(18px, 3vw, 28px) * -1) 0;
  padding: clamp(14px, 2.4vw, 22px) clamp(18px, 3vw, 28px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
}

.question-report-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.question-report-logo {
  flex: 0 0 auto;
  width: 88px;
  height: 56px;
  object-fit: contain;
  filter: drop-shadow(0 12px 22px rgba(0, 0, 0, 0.18));
}

.question-report-header h2 {
  margin: 0 0 4px;
  color: #fff;
}

.question-report-header p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.question-report-header .section-kicker {
  color: #aee6df;
}

.question-report-body {
  display: grid;
  gap: 12px;
  padding-top: 18px;
}

.question-report-body > p {
  margin: 0;
  color: var(--muted);
}

.question-report-body blockquote {
  margin: 0;
  padding: 12px 14px;
  color: #17201c;
  background: rgba(31, 122, 117, 0.08);
  border: 1px solid rgba(31, 122, 117, 0.22);
  border-left: 5px solid var(--teal);
  border-radius: 8px;
  font-weight: 400;
  line-height: 1.45;
}

.question-report-body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
  font-weight: 400;
}

.question-report-body textarea::placeholder {
  font-weight: 400;
}

.question-report-body textarea {
  width: 100%;
  min-height: 120px;
  resize: vertical;
}

.question-report-actions {
  margin-top: 2px;
}

.setup-warning-list {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 12px 14px 12px 34px;
  color: #6b3d00;
  background: #fff7e8;
  border: 1px solid #f3c36f;
  border-radius: 8px;
}

.contact-dialog {
  width: min(720px, calc(100% - 24px));
}

.contact-popup-form .dialog-header {
  align-items: center;
  margin: calc(clamp(18px, 3vw, 28px) * -1) calc(clamp(18px, 3vw, 28px) * -1) 0;
  padding: clamp(14px, 2.4vw, 22px) clamp(18px, 3vw, 28px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
}

.contact-dialog-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.contact-popup-form .dialog-header h2 {
  margin-bottom: 4px;
  color: #fff;
}

.contact-popup-form .dialog-header p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
}

.contact-success-dialog {
  width: min(520px, calc(100% - 24px));
}

.contact-success-form {
  position: relative;
  justify-items: center;
  gap: 10px;
  padding: clamp(28px, 5vw, 42px);
  text-align: center;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(247, 252, 250, 0.98) 48%, rgba(255, 244, 245, 0.98));
  border-radius: 16px;
}

.contact-success-close {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 40px;
  min-height: 40px;
  color: var(--muted);
  background: transparent;
  border: 0;
  box-shadow: none;
}

.contact-success-close:hover {
  color: var(--accent-dark);
  background: rgba(179, 38, 59, 0.08);
}

.contact-success-logo {
  width: 122px;
  height: 70px;
  margin-bottom: 8px;
  filter: drop-shadow(0 14px 26px rgba(141, 36, 48, 0.2));
}

.contact-success-form h2 {
  margin: 0 0 8px;
  color: #292f7d;
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 4vw, 2rem);
  line-height: 1.1;
}

.contact-success-form p {
  max-width: 380px;
  margin: 0;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.42;
}

.contact-success-button {
  min-width: 150px;
  margin-top: 12px;
}

.account-dialog-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin: -28px -28px 0;
  padding: clamp(10px, 1.8vw, 16px) clamp(18px, 3vw, 28px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
  border-bottom: 1px solid rgba(255, 255, 255, 0.18);
}

.account-dialog-brand {
  display: flex;
  align-items: center;
  gap: 16px;
}

.account-dialog-logo {
  flex: 0 0 auto;
  width: 92px;
  height: 52px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 8px;
}

.account-dialog-header h2 {
  margin-bottom: 4px;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, 2.1vw, 1.55rem);
  line-height: 1.15;
}

.account-dialog-header p:last-child {
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  line-height: 1.25;
}

.account-dialog-header .section-kicker {
  margin-bottom: 4px;
  color: #aee6df;
}

.close-button {
  flex: 0 0 auto;
  width: 42px;
  min-height: 42px;
  color: #fff;
  background: rgba(179, 38, 59, 0.96);
  border: 2px solid rgba(255, 255, 255, 0.72);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(85, 11, 22, 0.28);
  font-size: 1.2rem;
  font-weight: 900;
}

.close-button:hover {
  background: #8d2430;
  transform: translateY(-1px);
}

.account-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 6px;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(179, 38, 59, 0.24);
  border-radius: 8px;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.56);
}

.account-tab {
  width: 100%;
  min-height: 38px;
  color: var(--muted);
  background: transparent;
  border-color: transparent;
}

.account-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  box-shadow: 0 10px 24px rgba(179, 38, 59, 0.24);
}

.account-panel {
  display: none;
}

.account-panel.is-active {
  display: grid;
  gap: 14px;
  padding: 2px;
}

/* Authentication-only styling. The shared account header and the separate
   profile dialog intentionally keep their existing presentation. */
#accountForm .account-tabs {
  gap: 10px;
  padding: 8px;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.94), rgba(232, 246, 244, 0.72) 52%, rgba(255, 241, 210, 0.72));
  border-color: rgba(31, 122, 117, 0.2);
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(23, 32, 28, 0.08), inset 0 0 0 1px rgba(255, 255, 255, 0.72);
}

#accountForm .account-tab {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 11px;
  font-size: 0.96rem;
  font-weight: 850;
  transition: color 170ms ease, background 170ms ease, border-color 170ms ease, box-shadow 170ms ease, transform 170ms ease;
}

#accountForm .account-tab:hover:not(.is-active) {
  color: #17201c;
  background: rgba(255, 255, 255, 0.88);
  border-color: rgba(31, 122, 117, 0.18);
  box-shadow: 0 10px 22px rgba(23, 32, 28, 0.08);
  transform: translateY(-2px);
}

.account-tab-icon {
  display: inline-grid;
  flex: 0 0 auto;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #0e7f78;
  background: linear-gradient(135deg, #e2f8f5, #dceeff);
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 10px;
  box-shadow: 0 8px 18px rgba(31, 122, 117, 0.12);
  transition: color 170ms ease, background 170ms ease, border-color 170ms ease, transform 170ms ease;
}

.account-tab[data-account-mode="login"] .account-tab-icon {
  color: #9b5f00;
  background: linear-gradient(135deg, #fff6d9, #ffe8bd);
  border-color: rgba(193, 124, 0, 0.3);
  box-shadow: 0 8px 18px rgba(193, 124, 0, 0.12);
}

.account-tab[data-account-mode="reset"] .account-tab-icon {
  color: #873461;
  background: linear-gradient(135deg, #f8e9ff, #ffe5ed);
  border-color: rgba(135, 52, 97, 0.25);
  box-shadow: 0 8px 18px rgba(135, 52, 97, 0.12);
}

.account-tab-icon svg,
.auth-panel-intro-icon svg {
  width: 20px;
  height: 20px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

#accountForm .account-tab.is-active .account-tab-icon {
  color: #9f2134;
  background: rgba(255, 255, 255, 0.94);
  border-color: rgba(255, 255, 255, 0.84);
  box-shadow: 0 8px 18px rgba(85, 11, 22, 0.2);
  transform: scale(1.04);
}

#accountForm .account-panel[data-account-panel="register"].is-active,
#accountForm .account-panel[data-account-panel="login"].is-active,
#accountForm .account-panel[data-account-panel="reset"].is-active {
  gap: 16px;
  padding: clamp(14px, 2.2vw, 19px);
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 16px;
  box-shadow: 0 18px 42px rgba(23, 32, 28, 0.09), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  animation: auth-panel-enter 180ms ease both;
}

#accountForm .account-panel[data-account-panel="login"].is-active {
  border-color: rgba(206, 142, 31, 0.22);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 250, 235, 0.78));
}

#accountForm .account-panel[data-account-panel="reset"].is-active {
  border-color: rgba(135, 52, 97, 0.2);
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.86), rgba(255, 244, 248, 0.78));
}

@keyframes auth-panel-enter {
  from {
    opacity: 0;
    transform: translateY(5px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.auth-panel-intro {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 13px;
  align-items: center;
  padding: 12px 14px;
  color: #15332f;
  background: linear-gradient(120deg, #e9f8f5, #f3fbff);
  border: 1px solid rgba(31, 122, 117, 0.22);
  border-radius: 13px;
}

.auth-panel-intro-login {
  color: #513b11;
  background: linear-gradient(120deg, #fff7dd, #fffaf0);
  border-color: rgba(206, 142, 31, 0.28);
}

.auth-panel-intro-reset {
  color: #57233f;
  background: linear-gradient(120deg, #f9edff, #fff0f4);
  border-color: rgba(135, 52, 97, 0.24);
}

.auth-panel-intro-icon {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #087a72;
  background: linear-gradient(135deg, #ffffff, #dff5f1);
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 14px;
  box-shadow: 0 10px 22px rgba(31, 122, 117, 0.14);
}

.auth-panel-intro-login .auth-panel-intro-icon {
  color: #a56400;
  background: linear-gradient(135deg, #ffffff, #ffe9b9);
  border-color: rgba(206, 142, 31, 0.32);
  box-shadow: 0 10px 22px rgba(206, 142, 31, 0.14);
}

.auth-panel-intro-reset .auth-panel-intro-icon {
  color: #873461;
  background: linear-gradient(135deg, #ffffff, #f7dfea);
  border-color: rgba(135, 52, 97, 0.28);
  box-shadow: 0 10px 22px rgba(135, 52, 97, 0.13);
}

.auth-panel-intro-icon svg {
  width: 25px;
  height: 25px;
}

.auth-panel-intro > div {
  min-width: 0;
}

.auth-panel-kicker {
  display: block;
  margin-bottom: 2px;
  color: currentColor;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.075em;
  text-transform: uppercase;
  opacity: 0.82;
}

.auth-panel-intro strong {
  display: block;
  color: #17201c;
  font-size: 1rem;
  line-height: 1.3;
}

.auth-panel-intro p {
  margin: 3px 0 0;
  color: #52635b;
  font-size: 0.86rem;
  line-height: 1.4;
}

#accountForm .field-grid label {
  gap: 7px;
}

#accountForm .field-grid label > span:first-child {
  color: #43574e;
  font-weight: 850;
  transition: color 150ms ease;
}

#accountForm .field-grid label:focus-within > span:first-child {
  color: #0e7f78;
}

#accountForm .field-grid label > input,
#accountForm .field-grid label > select,
#accountForm .password-field {
  border-radius: 11px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9), 0 6px 14px rgba(23, 32, 28, 0.045);
}

#accountForm .field-grid label > input:focus,
#accountForm .field-grid label > select:focus,
#accountForm .password-field:focus-within {
  border-color: rgba(31, 122, 117, 0.52);
  box-shadow: 0 0 0 3px rgba(31, 122, 117, 0.12), 0 9px 20px rgba(23, 32, 28, 0.07);
}

#accountForm .terms-check {
  border-radius: 12px;
  background: linear-gradient(135deg, #fff, #fff9f3);
}

#accountForm #resetRequestPanel,
#accountForm #resetConfirmPanel {
  display: grid;
  gap: 14px;
}

#accountForm #resetRequestPanel.is-hidden,
#accountForm #resetConfirmPanel.is-hidden {
  display: none;
}

#registerSubmitButton,
#loginSubmitButton,
#requestResetButton,
#confirmResetButton {
  min-height: 48px;
  border-radius: 12px;
  background: linear-gradient(105deg, #992b3d, #c23e50 55%, #a82b3e);
  box-shadow: 0 14px 28px rgba(179, 38, 59, 0.23);
  transition: transform 160ms ease, box-shadow 160ms ease, filter 160ms ease;
}

#registerSubmitButton:hover:not(:disabled),
#loginSubmitButton:hover:not(:disabled),
#requestResetButton:hover:not(:disabled),
#confirmResetButton:hover:not(:disabled) {
  filter: saturate(1.08) brightness(1.02);
  box-shadow: 0 18px 34px rgba(179, 38, 59, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 640px) {
  #accountForm .account-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  #accountForm .account-tab {
    flex-direction: column;
    gap: 4px;
    min-height: 68px;
    padding: 6px 3px;
    font-size: 0.74rem;
    line-height: 1.15;
  }

  .account-tab-icon {
    width: 29px;
    height: 29px;
    border-radius: 9px;
  }

  .account-tab-icon svg {
    width: 18px;
    height: 18px;
  }

  #accountForm .account-panel[data-account-panel="register"].is-active,
  #accountForm .account-panel[data-account-panel="login"].is-active,
  #accountForm .account-panel[data-account-panel="reset"].is-active {
    padding: 12px;
    border-radius: 13px;
  }

  .auth-panel-intro {
    grid-template-columns: 40px minmax(0, 1fr);
    gap: 10px;
    padding: 10px;
  }

  .auth-panel-intro-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
  }

  .auth-panel-intro-icon svg {
    width: 22px;
    height: 22px;
  }

  .auth-panel-intro p {
    font-size: 0.8rem;
  }
}

.profile-panel {
  display: grid;
  gap: 8px;
  padding: 2px;
}

.profile-dialog form {
  gap: 10px;
  padding-bottom: 14px;
}

.profile-dialog .account-status:empty {
  min-height: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.field-grid.one-column {
  grid-template-columns: 1fr;
}

.field-grid .field-span-full {
  grid-column: 1 / -1;
}

.privacy-note {
  margin: 0;
  padding: 10px 12px;
  color: #5a4930;
  background: var(--gold-soft);
  border: 1px solid #ead19e;
  border-radius: 8px;
  font-size: 0.92rem;
}

.privacy-note + .privacy-note {
  margin-top: 12px;
}

.privacy-note + p,
p + .privacy-note {
  margin-top: 12px;
}

.terms-check {
  display: grid;
  grid-template-columns: 22px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px;
  color: #26322d;
  background: #fff;
  border: 1px solid rgba(179, 38, 59, 0.28);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.registration-verification-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: stretch;
  margin: 14px 0;
}

.registration-verification-row .terms-check {
  align-items: center;
  margin: 0;
}

.registration-turnstile {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 0;
  min-height: 65px;
}

@media (max-width: 720px) {
  .registration-verification-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .registration-turnstile {
    justify-content: center;
  }
}

.registration-turnstile.is-hidden {
  display: none;
  min-height: 0;
}

.terms-check input {
  width: 20px;
  min-height: 20px;
  margin-top: 2px;
  accent-color: var(--accent);
}

.profile-editor {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr);
  gap: 14px;
  align-items: start;
}

.profile-avatar-column {
  display: grid;
  gap: 8px;
  justify-items: center;
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(179, 38, 59, 0.18);
  border-radius: 8px;
}

.profile-avatar-preview .profile-avatar {
  width: 115px;
  height: 115px;
  border-width: 4px;
  font-size: 2rem;
}

.profile-tier-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  width: 100%;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  color: var(--muted);
  background: #f2f8f7;
  border: 1px solid rgba(31, 122, 117, 0.2);
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 800;
}

.profile-tier-badge {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 4px 10px;
  color: #24564f;
  background: #dcefeb;
  border: 1px solid rgba(31, 122, 117, 0.28);
  border-radius: 999px;
  font-size: 0.76rem;
  letter-spacing: 0.02em;
  line-height: 1;
  text-transform: uppercase;
}

.profile-tier-badge.is-premium {
  color: #7b1f2a;
  background: linear-gradient(135deg, #fff0c7, #ffe2e5);
  border-color: rgba(179, 38, 59, 0.3);
  box-shadow: 0 5px 14px rgba(179, 38, 59, 0.12);
}

.profile-premium-expiry {
  grid-column: 1 / -1;
  justify-self: center;
  color: #7b1f2a;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1.3;
  text-align: center;
  white-space: nowrap;
}

.profile-upload-button {
  width: 100%;
  cursor: pointer;
}

.profile-default-picture-button {
  width: 100%;
  min-height: 42px;
  box-shadow: none;
}

.profile-default-picture-button:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.profile-upload-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  opacity: 0;
  pointer-events: none;
}

.profile-avatar-column > button {
  width: 100%;
}

#profileEmail[readonly] {
  color: var(--muted);
  background: #eef3ef;
  cursor: not-allowed;
}

.profile-password-box {
  padding: 12px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid rgba(31, 122, 117, 0.18);
  border-radius: 8px;
}

.profile-password-box .section-kicker {
  margin-bottom: 8px;
}

.profile-password-grid label:first-child {
  grid-column: 1 / -1;
}

.password-field {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  min-height: 52px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
}

.password-field:focus-within {
  border-color: rgba(31, 122, 117, 0.46);
  box-shadow: 0 0 0 3px rgba(31, 122, 117, 0.12);
}

.password-field input {
  min-height: 50px;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.password-field input:focus {
  outline: 0;
  box-shadow: none;
}

.password-toggle {
  min-height: 34px;
  margin-right: 8px;
  padding: 7px 12px;
  color: var(--red-dark);
  background: rgba(184, 55, 70, 0.08);
  border: 1px solid rgba(184, 55, 70, 0.28);
  border-radius: 7px;
  box-shadow: none;
  font-size: 0.84rem;
  font-weight: 900;
}

.password-toggle:hover {
  color: var(--red-dark);
  background: rgba(184, 55, 70, 0.16);
  border-color: rgba(184, 55, 70, 0.46);
  transform: none;
}

/* Profile settings uses distinct, colorful cards so photo, personal details,
   and account security remain easy to scan without losing the site theme. */
.profile-dialog {
  border: 1px solid rgba(141, 36, 48, 0.7);
  background:
    radial-gradient(circle at 10% 35%, rgba(255, 217, 130, 0.22), transparent 28%),
    radial-gradient(circle at 92% 80%, rgba(179, 38, 59, 0.1), transparent 28%),
    linear-gradient(145deg, #fffdf9, #fff8eb 54%, #fff4f6);
  box-shadow: 0 32px 90px rgba(23, 32, 28, 0.34);
}

.profile-dialog .profile-dialog-header {
  position: relative;
  overflow: hidden;
  padding-top: 10px;
  padding-bottom: 10px;
  background:
    radial-gradient(circle at 72% 0%, rgba(255, 209, 107, 0.24), transparent 30%),
    linear-gradient(110deg, #17231f 0%, #5a2528 50%, #b3263b 100%);
  box-shadow: 0 12px 26px rgba(80, 25, 31, 0.22);
}

.profile-dialog .profile-dialog-header::before {
  position: absolute;
  right: 92px;
  bottom: -42px;
  width: 118px;
  height: 118px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 50%;
  content: "";
}

.profile-dialog .profile-dialog-header > * {
  position: relative;
  z-index: 1;
}

.profile-dialog .profile-dialog-header .section-kicker {
  color: #9ff1e8;
  letter-spacing: 0.06em;
}

.profile-dialog .profile-dialog-header .account-dialog-logo {
  width: 82px;
  height: 46px;
  padding: 4px;
  border: 2px solid rgba(255, 255, 255, 0.84);
  background: #fff;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22);
}

.profile-panel {
  gap: 10px;
}

.profile-editor {
  grid-template-columns: 200px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
}

.profile-avatar-column,
.profile-details-card,
.profile-password-box {
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(23, 32, 28, 0.08);
}

.profile-avatar-column {
  position: relative;
  overflow: hidden;
  gap: 7px;
  padding: 11px;
  background:
    radial-gradient(circle at 50% 23%, rgba(255, 218, 132, 0.4), transparent 31%),
    linear-gradient(155deg, #fffdf9 0%, #fff3df 52%, #fff0f2 100%);
  border: 1px solid rgba(185, 125, 21, 0.3);
}

.profile-avatar-column::after {
  position: absolute;
  top: -48px;
  right: -48px;
  width: 115px;
  height: 115px;
  border-radius: 50%;
  background: rgba(179, 38, 59, 0.08);
  content: "";
  pointer-events: none;
}

.profile-photo-heading,
.profile-card-heading {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
}

.profile-photo-heading {
  position: relative;
  z-index: 1;
  color: var(--ink);
}

.profile-photo-heading > span:last-child,
.profile-card-heading > span:last-child {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.profile-photo-heading strong,
.profile-card-heading > span:last-child > strong {
  color: var(--ink);
  font-size: 0.92rem;
}

.profile-photo-heading small,
.profile-card-heading small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1.35;
}

.profile-section-icon {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 2px solid rgba(255, 255, 255, 0.9);
  border-radius: 13px;
  color: #fff;
  box-shadow: 0 8px 18px rgba(23, 32, 28, 0.16);
}

.profile-section-icon svg,
.profile-button-icon svg,
.profile-input-label svg,
.profile-save-button svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.profile-section-icon svg {
  width: 20px;
  height: 20px;
}

.profile-section-icon-photo {
  background: linear-gradient(135deg, #d78909, #f06c3b);
}

.profile-section-icon-details {
  background: linear-gradient(135deg, #087d77, #20b6ac);
}

.profile-section-icon-security {
  background: linear-gradient(135deg, #9b2b47, #7952b8);
}

.profile-avatar-preview {
  position: relative;
  z-index: 1;
  padding: 4px;
  border-radius: 50%;
  background: linear-gradient(135deg, #f1b32d, #b3263b 58%, #1f7a75);
  box-shadow: 0 10px 22px rgba(117, 31, 43, 0.22);
}

.profile-avatar-preview .profile-avatar {
  width: 94px;
  height: 94px;
  border-color: #fff;
  font-size: 1.7rem;
  box-shadow: inset 0 0 0 3px #141c18;
}

.profile-tier-summary {
  position: relative;
  z-index: 1;
  gap: 6px;
  padding: 7px 8px;
  border-color: rgba(31, 122, 117, 0.28);
  border-radius: 11px;
  background: linear-gradient(135deg, rgba(232, 248, 244, 0.98), rgba(255, 248, 229, 0.96));
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.7);
}

.profile-tier-label {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.profile-tier-label > span {
  color: #d78909;
  font-size: 0.78rem;
}

.profile-tier-badge {
  min-height: 24px;
  padding: 3px 8px;
  font-size: 0.7rem;
}

.profile-premium-expiry {
  font-size: 0.6rem;
}

.profile-tier-badge.is-premium {
  border-color: rgba(179, 38, 59, 0.38);
  background: linear-gradient(135deg, #fff0b9, #ffd8df);
  box-shadow: 0 6px 16px rgba(179, 38, 59, 0.18);
}

.profile-upload-button,
.profile-default-picture-button {
  display: inline-flex;
  position: relative;
  z-index: 1;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 6px 8px;
  border-radius: 10px;
  font-size: 0.76rem;
  white-space: nowrap;
}

.profile-upload-button {
  color: #111;
  background: rgba(255, 255, 255, 0.9);
  border-color: rgba(179, 38, 59, 0.24);
  box-shadow: 0 8px 18px rgba(117, 31, 43, 0.1);
}

.profile-upload-button:hover {
  color: #111;
  background: #fff4e5;
  border-color: rgba(179, 38, 59, 0.42);
}

.profile-avatar-column .profile-upload-button,
.profile-avatar-column .profile-upload-button:hover {
  color: #111;
}

.profile-default-picture-button {
  color: #111;
  background: rgba(255, 255, 255, 0.8);
  border-color: rgba(179, 38, 59, 0.24);
}

.profile-default-picture-button:disabled {
  color: #111;
  opacity: 0.72;
}

.profile-button-icon {
  display: grid;
  place-items: center;
}

.profile-button-icon svg {
  width: 16px;
  height: 16px;
}

.profile-details-card,
.profile-password-box {
  padding: 12px;
  background: rgba(255, 255, 255, 0.9);
}

.profile-details-card {
  min-width: 0;
  border: 1px solid rgba(31, 122, 117, 0.25);
  background:
    radial-gradient(circle at 100% 0%, rgba(31, 122, 117, 0.1), transparent 30%),
    rgba(255, 255, 255, 0.92);
}

.profile-card-heading {
  margin-bottom: 9px;
}

.profile-card-heading .section-kicker {
  margin: 0;
  color: var(--teal);
  font-size: 0.72rem;
}

.profile-details-grid {
  gap: 10px;
}

.profile-dialog .field-grid label {
  gap: 5px;
}

.profile-input-label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #42534c;
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-input-label svg {
  width: 17px;
  height: 17px;
  color: var(--teal);
}

.profile-details-grid input {
  min-height: 44px;
  border-color: rgba(31, 122, 117, 0.26);
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 5px 14px rgba(23, 32, 28, 0.045);
}

.profile-details-grid input:not([readonly]):hover {
  border-color: rgba(31, 122, 117, 0.5);
}

#profileEmail[readonly] {
  color: #46625a;
  background: linear-gradient(135deg, #edf7f4, #f6fbf9);
}

.profile-password-box {
  border: 1px solid rgba(121, 82, 184, 0.24);
  background:
    radial-gradient(circle at 0% 100%, rgba(121, 82, 184, 0.08), transparent 28%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.96), rgba(255, 248, 244, 0.95));
}

.profile-password-box .profile-card-heading .section-kicker {
  color: #8a3158;
}

.profile-password-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.profile-password-grid label:first-child {
  grid-column: auto;
}

.profile-password-grid > label > span:first-child {
  color: #4d5d57;
  font-size: 0.84rem;
  font-weight: 800;
}

.profile-password-box .password-field {
  min-height: 44px;
  border-color: rgba(121, 82, 184, 0.22);
  border-radius: 10px;
  box-shadow: 0 5px 14px rgba(23, 32, 28, 0.04);
}

.profile-password-box .password-field input {
  min-height: 42px;
}

.profile-password-box .password-field:focus-within {
  border-color: rgba(121, 82, 184, 0.52);
  box-shadow: 0 0 0 3px rgba(121, 82, 184, 0.12);
}

.profile-password-box .password-toggle {
  min-height: 30px;
  margin-right: 6px;
  padding: 5px 9px;
  color: #7b2748;
  background: linear-gradient(135deg, #fff2f4, #f3edff);
  border-color: rgba(155, 43, 71, 0.25);
}

.profile-save-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  border: 1px solid rgba(117, 23, 38, 0.68);
  border-radius: 11px;
  background: linear-gradient(105deg, #92293a, #c23e50 55%, #a82b3e);
  box-shadow: 0 14px 28px rgba(179, 38, 59, 0.24);
}

.profile-save-button svg {
  width: 18px;
  height: 18px;
}

.profile-save-button:hover {
  background: linear-gradient(105deg, #7f2232, #b53346 55%, #922438);
  box-shadow: 0 17px 32px rgba(179, 38, 59, 0.3);
  transform: translateY(-2px);
}

@media (max-width: 720px) {
  .profile-editor {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-avatar-column {
    padding: 11px;
  }

  .profile-details-card,
  .profile-password-box {
    padding: 12px;
  }

  .profile-password-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  .profile-dialog .profile-dialog-header::before {
    display: none;
  }
}

.account-switch-copy {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 0.98rem;
  font-weight: 700;
  text-align: center;
}

.account-switch-copy button {
  min-height: auto;
  padding: 0;
  color: var(--accent-dark);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font: inherit;
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-switch-copy button:hover {
  color: var(--accent);
  transform: none;
}

.account-switch-copy a {
  color: var(--accent-dark);
  font-weight: 900;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.terms-check span {
  font-weight: 700;
}

.full-button {
  width: 100%;
}

.verification-box {
  display: grid;
  gap: 10px;
  padding: 14px;
  background: #fbfcfa;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.verification-box h3 {
  margin-bottom: 0;
}

.verification-box a {
  display: block;
  padding: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 6px;
  font-size: 0.92rem;
}

.account-status {
  min-height: 22px;
  margin: 0;
  color: var(--accent-dark);
  font-weight: 700;
}

.account-status.is-success {
  padding: 12px 14px;
  color: #17633f;
  background: #edf9f2;
  border: 1px solid #8bc9a8;
  border-radius: 8px;
}

.registration-validation-overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  padding: 16px;
  overflow: auto;
  background: rgba(23, 32, 28, 0.58);
  place-items: center;
}

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

.registration-validation-popup {
  width: min(540px, 100%);
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.99), rgba(255, 247, 230, 0.98) 55%, rgba(255, 241, 242, 0.99));
  border: 2px solid rgba(23, 32, 28, 0.88);
  border-radius: 14px;
  box-shadow: 0 28px 80px rgba(23, 32, 28, 0.3);
}

.registration-validation-popup .account-dialog-header {
  margin: 0;
  padding: 16px 18px;
}

.registration-validation-popup .account-dialog-header h2 {
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.registration-validation-body {
  display: grid;
  gap: 14px;
  padding: 16px 18px 18px;
}

.registration-validation-list {
  display: grid;
  gap: 7px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.registration-validation-list li {
  position: relative;
  padding: 9px 12px 9px 39px;
  color: #671622;
  background: #fff2f3;
  border: 1px solid #dfa0a9;
  border-radius: 7px;
  font-weight: 700;
  line-height: 1.35;
}

.registration-validation-list li::before {
  content: "!";
  position: absolute;
  top: 50%;
  left: 11px;
  display: grid;
  width: 20px;
  height: 20px;
  color: #fff;
  background: #a32236;
  border-radius: 50%;
  place-items: center;
  font-size: 0.78rem;
  transform: translateY(-50%);
}

.registration-success-message {
  position: relative;
  margin: 0;
  padding: 15px 16px 15px 54px;
  color: #173f35;
  background: #edf9f5;
  border: 1px solid #83c9b5;
  border-radius: 8px;
  font-size: 1.02rem;
  font-weight: 700;
  line-height: 1.5;
}

.registration-success-message::before {
  content: "\2713";
  position: absolute;
  top: 50%;
  left: 15px;
  display: grid;
  width: 28px;
  height: 28px;
  color: #fff;
  background: #218b70;
  border-radius: 50%;
  place-items: center;
  font-size: 1.05rem;
  transform: translateY(-50%);
}

.registration-validation-overlay[data-popup-mode="delivery-error"] .registration-success-message {
  color: #671622;
  background: #fff2f3;
  border-color: #dfa0a9;
}

.registration-validation-overlay[data-popup-mode="delivery-error"] .registration-success-message::before {
  content: "!";
  background: #a32236;
}

.registration-validation-body .primary-button {
  justify-self: end;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 28px clamp(16px, 6vw, 72px);
  color: #d9e3dc;
  background: #17201c;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.site-footer p {
  max-width: 560px;
  margin: 10px 0 0;
  color: #c9d6d0;
  font-size: 0.95rem;
}

.site-footer .footer-copyright {
  margin-top: 6px;
  color: #aebdb6;
  font-size: 0.86rem;
}

.footer-brand {
  display: inline-flex;
  width: 112px;
  padding: 4px;
  background: #fff;
  border-radius: 8px;
}

.footer-brand img {
  display: block;
  width: 100%;
  height: auto;
}

.footer-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-links a {
  padding: 8px 10px;
  color: #fff;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.footer-links a:hover,
.footer-links a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.1);
}

.content-page {
  padding: clamp(8px, 1vw, 10px) clamp(16px, 6vw, 72px) clamp(34px, 6vw, 70px);
}

.content-hero {
  max-width: 900px;
  margin: 0 auto 26px;
}

.how-page .content-hero,
.faq-page .content-hero,
.privacy-page .content-hero,
.terms-page .content-hero,
.contact-page .content-hero,
.discover-page .content-hero {
  max-width: 1180px;
  margin-bottom: 22px;
  padding: clamp(14px, 2.4vw, 20px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(23, 32, 28, 0.16);
}

.content-hero h1 {
  max-width: 780px;
  margin-bottom: 14px;
  font-size: clamp(2rem, 5vw, 4rem);
  font-weight: 400;
}

.how-page .content-hero h1,
.privacy-page .content-hero h1,
.terms-page .content-hero h1,
.contact-page .content-hero h1,
.discover-page .content-hero h1 {
  max-width: 100%;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.how-page .content-hero h1,
.faq-page .content-hero h1,
.privacy-page .content-hero h1,
.terms-page .content-hero h1,
.contact-page .content-hero h1,
.discover-page .content-hero h1 {
  color: #fff;
}

.faq-page .content-hero h1 {
  max-width: 100%;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.discover-page .content-hero h1 {
  max-width: 100%;
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.content-hero p:not(.section-kicker) {
  max-width: 760px;
  color: var(--muted);
  font-size: 1.05rem;
}

.how-page .content-hero .section-kicker,
.faq-page .content-hero .section-kicker,
.privacy-page .content-hero .section-kicker,
.terms-page .content-hero .section-kicker,
.contact-page .content-hero .section-kicker,
.discover-page .content-hero .section-kicker {
  color: #aee6df;
}

.how-page .content-hero p:not(.section-kicker),
.faq-page .content-hero p:not(.section-kicker),
.privacy-page .content-hero p:not(.section-kicker),
.terms-page .content-hero p:not(.section-kicker),
.contact-page .content-hero p:not(.section-kicker),
.discover-page .content-hero p:not(.section-kicker) {
  max-width: none;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.35;
}

.discover-content {
  background:
    radial-gradient(circle at top left, rgba(174, 230, 223, 0.26), transparent 32rem),
    linear-gradient(180deg, #f4f6f1 0%, #fffaf0 100%);
}

.discover-source-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto 18px;
  padding: clamp(16px, 2.2vw, 22px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 244, 0.72));
  border: 1px solid rgba(143, 207, 198, 0.8);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(23, 32, 28, 0.08);
}

.discover-source-panel h2 {
  margin: 0 0 8px;
  font-size: clamp(1.35rem, 2.2vw, 1.8rem);
  font-weight: 500;
}

.discover-source-panel p:not(.section-kicker) {
  margin: 0;
  color: var(--muted);
}

.discover-source-actions,
.discover-reader-actions,
.discover-next-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.discover-source-actions > .reader-shortcut,
.discover-source-actions > .button-link {
  width: 172px;
  height: 48px;
  min-height: 48px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  line-height: 1.1;
}

.reader-shortcut {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 0 22px;
  color: #fff;
  background: linear-gradient(135deg, #177f82, #b5273d);
  border: 1px solid rgba(181, 39, 61, 0.72);
  border-radius: 7px;
  box-shadow: 0 12px 24px rgba(181, 39, 61, 0.2);
  font-weight: 800;
}

.reader-shortcut.is-reading,
.reader-shortcut.is-reading:disabled {
  color: #fff;
  background: #177f82;
  border-color: #12696c;
  box-shadow: none;
  cursor: default;
  opacity: 1;
}

.reader-shortcut:disabled:not(.is-reading) {
  cursor: not-allowed;
  opacity: 0.58;
  box-shadow: none;
}

.discover-reader-actions {
  flex-wrap: nowrap;
  scroll-margin-top: 96px;
}

.discover-reader-option {
  display: grid;
  gap: 4px;
  min-width: 126px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.discover-reader-option select {
  min-height: 42px;
  padding: 8px 30px 8px 10px;
  color: #17201c;
  background-color: #f7faf8;
  border: 1px solid rgba(31, 138, 131, 0.28);
  border-radius: 7px;
  font-size: 0.9rem;
  font-weight: 700;
  text-transform: none;
}

.reader-icon-button {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 48px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  color: #fff;
  border: 1px solid transparent;
  border-radius: 50%;
  box-shadow: 0 12px 24px rgba(23, 32, 28, 0.12);
}

.reader-icon-button svg {
  width: 23px;
  height: 23px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.15;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.bookmark-reader-button {
  background: linear-gradient(135deg, #c88a12, #8d2430);
}

.bookmark-reader-button.is-selected {
  background: linear-gradient(135deg, #1f8a83, #0f615c);
}

.read-reader-button {
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
}

.pause-reader-button {
  background: linear-gradient(135deg, #365f91, #1f8a83);
}

.stop-reader-button {
  background: linear-gradient(135deg, #17201c, #8d2430);
}

.reader-icon-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 16px 30px rgba(23, 32, 28, 0.18);
}

.reader-icon-button:disabled:not(.is-reading) {
  cursor: not-allowed;
  filter: saturate(0.45);
  opacity: 0.52;
  box-shadow: none;
}

.reader-icon-button:disabled:hover {
  transform: none;
  box-shadow: none;
}

.reader-icon-button::after {
  content: attr(data-tooltip);
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 9px);
  min-width: max-content;
  padding: 6px 9px;
  color: #fff;
  background: #17201c;
  border-radius: 6px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.18);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px);
  transition: opacity 140ms ease, transform 140ms ease;
}

.reader-icon-button::before {
  content: "";
  position: absolute;
  z-index: 5;
  left: 50%;
  bottom: calc(100% + 4px);
  width: 9px;
  height: 9px;
  background: #17201c;
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 4px) rotate(45deg);
  transition: opacity 140ms ease, transform 140ms ease;
}

.reader-icon-button:hover::after,
.reader-icon-button:hover::before,
.reader-icon-button:focus-visible::after,
.reader-icon-button:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.reader-icon-button:focus-visible::before {
  transform: translate(-50%, 0) rotate(45deg);
}

.discover-layout {
  display: grid;
  grid-template-columns: minmax(240px, 0.32fr) minmax(0, 1fr);
  gap: 18px;
  max-width: 1180px;
  margin: 0 auto;
  align-items: start;
}

.discover-sidebar {
  display: grid;
  gap: 14px;
  position: sticky;
  top: 92px;
}

.discover-sidebar-card,
.discover-reader-card,
.discover-study-card {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 249, 0.94));
  border: 1px solid rgba(215, 223, 217, 0.95);
  border-radius: 12px;
  box-shadow: 0 16px 34px rgba(23, 32, 28, 0.08);
}

.discover-sidebar-card {
  padding: 14px;
}

.discover-section-nav,
.discover-bookmarks {
  display: grid;
  gap: 8px;
}

.discover-section-nav a,
.discover-bookmarks a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: center;
  padding: 10px;
  color: #17201c;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid rgba(215, 223, 217, 0.95);
  border-radius: 10px;
  font-weight: 400;
  text-decoration: none;
}

.discover-section-nav a span {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
}

.discover-bookmarks a .bookmark-link-icon {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent-dark);
  background: linear-gradient(135deg, #fff7e6, #e9f6f4);
  border: 1px solid rgba(200, 138, 18, 0.34);
  border-radius: 50%;
}

.bookmark-link-icon svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discover-section-nav a:hover,
.discover-bookmarks a:hover,
.discover-section-nav a[aria-current="page"] {
  border-color: rgba(180, 59, 71, 0.55);
  background: #fff4f3;
}

.discover-section-nav a[aria-current="page"] span {
  background: linear-gradient(135deg, var(--teal), var(--accent));
}

.discover-bookmarks p,
.discover-meta-card p {
  margin: 0 0 8px;
  color: var(--muted);
  font-size: 0.95rem;
}

.discover-reader-card {
  padding: clamp(18px, 3vw, 28px);
}

.discover-reader-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-bottom: 22px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(215, 223, 217, 0.95);
}

.discover-breadcrumb {
  color: var(--muted);
  font-weight: 800;
}

.discover-reader-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 18px;
  align-items: start;
  margin-bottom: 18px;
}

.discover-section-icon {
  --section-color: var(--accent);
  display: inline-grid;
  place-items: center;
  width: 76px;
  height: 76px;
  color: var(--section-color);
  background:
    radial-gradient(circle at 30% 20%, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.9)),
    color-mix(in srgb, var(--section-color) 12%, white);
  border: 1px solid color-mix(in srgb, var(--section-color) 38%, white);
  border-radius: 20px;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--section-color) 22%, transparent);
}

.discover-section-icon svg {
  width: 38px;
  height: 38px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.discover-reader-heading h2 {
  margin-bottom: 10px;
  font-size: clamp(2rem, 4vw, 3.4rem);
  font-weight: 400;
  line-height: 1.05;
}

.discover-reader-heading p:not(.section-kicker) {
  max-width: none;
  color: var(--muted);
  font-size: 1.08rem;
}

.discover-official-section-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  width: fit-content;
  margin-top: 0.7rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid #9fcbd0;
  border-radius: 6px;
  background: #e9f7f7;
  color: #126f73;
  font-weight: 700;
  line-height: 1.2;
  text-decoration: none;
}

.discover-official-section-link:hover,
.discover-official-section-link:focus-visible {
  border-color: #126f73;
  background: #d9f1f1;
  color: #0b5558;
}

.discover-notes-official-link {
  margin-top: 18px;
}

.discover-reader-status {
  min-height: 42px;
  margin-bottom: 16px;
  padding: 10px 12px;
  color: #5a4930;
  background: var(--gold-soft);
  border: 1px solid #ead19e;
  border-radius: 10px;
  font-weight: 700;
}

.discover-reader-status:empty {
  display: none;
}

.discover-study-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-bottom: 14px;
}

.discover-study-card {
  padding: clamp(16px, 2.2vw, 20px);
}

.discover-key-card {
  background: linear-gradient(135deg, #fff7e8, #fff, #eaf7f5);
  border-color: rgba(200, 138, 18, 0.42);
}

.discover-study-card .section-kicker {
  margin-bottom: 5px;
}

.discover-study-card h3 {
  margin-bottom: 12px;
  font-size: 1.2rem;
  font-weight: 800;
}

.discover-study-card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.discover-study-card li {
  position: relative;
  padding-left: 32px;
  color: var(--muted);
}

.discover-study-card li::before {
  content: "";
  position: absolute;
  top: 0.15rem;
  left: 0;
  width: 20px;
  height: 20px;
  background:
    radial-gradient(circle at center, var(--teal) 0 36%, transparent 38%),
    #e8f6f4;
  border: 1px solid rgba(31, 138, 131, 0.4);
  border-radius: 50%;
}

.discover-wide-card p {
  margin: 0 0 10px;
  color: var(--muted);
}

.discover-card-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.discover-facts-section,
.discover-checkpoint-card {
  margin-top: 14px;
}

.discover-facts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.discover-fact-card {
  min-width: 0;
  padding: 14px;
  background: linear-gradient(145deg, #fff, #f1f8f6);
  border: 1px solid rgba(31, 138, 131, 0.24);
  border-radius: 8px;
}

.discover-fact-card > span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 4px 8px;
  color: #8d2430;
  background: #fff0f1;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.discover-fact-card h4 {
  margin: 0 0 7px;
  font-size: 1.02rem;
}

.discover-fact-card p {
  margin: 0;
  font-size: 0.94rem;
}

.discover-checkpoint-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
  padding: 0;
  counter-reset: discover-checkpoint;
  list-style: none;
}

.discover-checkpoint-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 13px;
  color: #17201c;
  background: #fff;
  border: 1px solid rgba(180, 59, 71, 0.18);
  border-radius: 8px;
  counter-increment: discover-checkpoint;
}

.discover-checkpoint-list li::before {
  content: counter(discover-checkpoint);
  position: static;
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent));
  border: 0;
  border-radius: 50%;
  font-size: 0.78rem;
  font-weight: 800;
}

.discover-section-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 14px;
  padding: clamp(18px, 2.5vw, 24px);
  color: #fff;
  background: linear-gradient(110deg, #17201c, #4b2226 64%, #8d2430);
  border-radius: 10px;
}

.discover-section-actions h3,
.discover-section-actions p {
  margin: 0;
}

.discover-section-actions .section-kicker {
  color: #aef0ea;
  margin-bottom: 5px;
}

.discover-section-actions > div > p:last-child {
  color: rgba(255, 255, 255, 0.82);
}

.discover-section-action-buttons {
  display: flex;
  gap: 10px;
  flex-shrink: 0;
}

.discover-section-actions .secondary-button {
  color: #17201c;
  background: #fff;
}

[data-reader-block] {
  transition: background-color 180ms ease, box-shadow 180ms ease;
}

[data-reader-block].is-reading-aloud {
  background-color: #fff8df;
  box-shadow: 0 0 0 3px rgba(200, 138, 18, 0.24), 0 16px 34px rgba(23, 32, 28, 0.08);
}

.discover-next-row {
  justify-content: flex-end;
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid rgba(215, 223, 217, 0.95);
}

.discover-reader-actions .reader-icon-button.is-reading,
.discover-reader-actions .reader-icon-button.is-reading:disabled {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent-dark));
  border-color: rgba(31, 138, 131, 0.65);
  box-shadow: 0 14px 28px rgba(31, 138, 131, 0.22);
  cursor: not-allowed;
  opacity: 1;
}

.discover-next-row .is-disabled {
  opacity: 0.48;
  pointer-events: none;
}

.policy-layout {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  max-width: 1100px;
  margin: 0 auto;
}

.policy-card,
.contact-form,
.contact-panel {
  padding: clamp(18px, 3vw, 24px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(23, 32, 28, 0.06);
}

.policy-card ul,
.contact-panel ul {
  margin: 10px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.policy-card li,
.contact-panel li {
  margin-bottom: 8px;
}

.privacy-page .policy-layout,
.terms-page .policy-layout,
.contact-page .contact-layout {
  max-width: 1180px;
}

.privacy-page .policy-card,
.terms-page .policy-card,
.contact-page .contact-form,
.contact-page .contact-panel {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 249, 0.94));
  border-color: rgba(215, 223, 217, 0.95);
  box-shadow: 0 16px 34px rgba(23, 32, 28, 0.08);
}

.privacy-page .policy-card:nth-child(even),
.terms-page .policy-card:nth-child(even) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 244, 0.72));
}

.privacy-page .policy-card h2,
.terms-page .policy-card h2,
.contact-page .contact-panel h2 {
  color: #17201c;
  font-weight: 500;
}

.how-steps {
  position: relative;
  display: grid;
  gap: 16px;
  max-width: 1180px;
  margin: 0 auto;
}

.how-steps::before {
  content: "";
  position: absolute;
  top: 62px;
  bottom: 82px;
  left: 52px;
  width: 3px;
  background: linear-gradient(180deg, var(--accent), var(--teal), var(--gold));
  border-radius: 999px;
}

.how-step {
  position: relative;
  display: grid;
  grid-template-columns: 104px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
  padding: clamp(16px, 3vw, 22px);
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(249, 252, 249, 0.94));
  border: 1px solid rgba(215, 223, 217, 0.95);
  border-radius: 8px;
  box-shadow: 0 16px 34px rgba(23, 32, 28, 0.08);
}

.how-step:nth-child(even) {
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(233, 246, 244, 0.72));
}

.how-step-media {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 104px;
  height: 104px;
  background: #fff;
  border: 2px solid rgba(23, 32, 28, 0.08);
  border-radius: 8px;
  box-shadow: 0 12px 28px rgba(23, 32, 28, 0.09);
}

.how-step-media img {
  display: block;
  width: 82px;
  height: 82px;
}

.how-step-content span {
  display: inline-flex;
  margin-bottom: 8px;
  padding: 5px 10px;
  color: #fff;
  background: var(--accent-dark);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.how-step-content h2 {
  margin-bottom: 8px;
  font-size: clamp(1.35rem, 2.5vw, 2rem);
  font-weight: 500;
}

.how-step-content p {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 1rem;
}

.how-preview-note {
  margin-top: 4px;
  padding: 16px 18px;
  color: #5a4930;
  background: var(--gold-soft);
  border: 1px solid #ead19e;
  border-radius: 8px;
  font-weight: 700;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(300px, 0.6fr);
  gap: 18px;
  max-width: 1100px;
  margin: 0 auto;
}

.contact-form {
  display: grid;
  gap: 14px;
}

.contact-page #contactMessage {
  min-height: 158px;
}

.contact-panel {
  align-self: start;
}

.contact-note {
  margin-top: 18px;
  padding: 14px;
  background: var(--teal-soft);
  border: 1px solid #b9ddd8;
  border-radius: 8px;
}

.contact-note p {
  margin-bottom: 0;
  color: var(--muted);
}

.contact-support-email {
  color: var(--teal);
  font-weight: 800;
  overflow-wrap: anywhere;
}

.contact-support-email:hover,
.contact-support-email:focus-visible {
  color: var(--red);
}

.contact-email-note .contact-email-privacy {
  margin-top: 10px;
  font-size: 0.9rem;
  line-height: 1.5;
}

.contact-safety-notices {
  display: grid;
  gap: 10px;
}

.contact-safety-card {
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 13px 15px;
  border: 1px solid;
  border-radius: 14px;
  box-shadow: 0 8px 20px rgba(23, 32, 28, 0.07);
}

.contact-safety-card-identity {
  color: #155f78;
  background: linear-gradient(135deg, #f0f9ff, #e8f6f4);
  border-color: #a8d8e6;
}

.contact-safety-card-payment {
  color: #8f3c22;
  background: linear-gradient(135deg, #fff8e9, #fff1ec);
  border-color: #efc28e;
}

.contact-safety-icon {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #fff;
  box-shadow: 0 8px 16px rgba(23, 32, 28, 0.14);
}

.contact-safety-card-identity .contact-safety-icon {
  background: linear-gradient(145deg, #168c9a, #1765a3);
}

.contact-safety-card-payment .contact-safety-icon {
  background: linear-gradient(145deg, #e58b18, #bd3d4d);
}

.contact-safety-icon svg {
  width: 25px;
  height: 25px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.contact-safety-copy {
  display: grid;
  gap: 3px;
  line-height: 1.45;
}

.contact-safety-copy strong {
  color: #17201c;
  font-size: 0.96rem;
}

.contact-safety-copy > span {
  color: #4e5d55;
  font-size: 0.9rem;
}

.faq-list {
  display: grid;
  gap: 12px;
  max-width: 1180px;
  margin: 0 auto;
}

.faq-item {
  overflow: hidden;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(215, 223, 217, 0.96);
  border-radius: 8px;
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.07);
}

.faq-item[open] {
  border-color: rgba(31, 122, 117, 0.28);
  box-shadow: 0 18px 42px rgba(23, 32, 28, 0.1);
}

.faq-item summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px;
  gap: 16px;
  align-items: center;
  padding: 20px clamp(18px, 3vw, 26px);
  color: #11241e;
  cursor: pointer;
  list-style: none;
}

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

.faq-item summary span {
  font-size: clamp(1.08rem, 2vw, 1.35rem);
  font-weight: 800;
  line-height: 1.25;
}

.faq-item summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  color: var(--accent-dark);
  background: var(--red-soft);
  border: 1px solid var(--red-line);
  border-radius: 50%;
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
}

.faq-item[open] summary {
  background: linear-gradient(135deg, rgba(233, 246, 244, 0.82), rgba(255, 247, 230, 0.64));
}

.faq-item[open] summary::after {
  content: "-";
  color: #fff;
  background: var(--accent-dark);
  border-color: var(--accent-dark);
}

.faq-item div {
  padding: 0 clamp(18px, 3vw, 26px) 22px;
}

.faq-item p {
  max-width: none;
  margin-bottom: 10px;
  color: var(--muted);
}

.faq-item p:last-child {
  margin-bottom: 0;
}

.faq-source-note {
  max-width: 980px;
  margin: 18px auto 0;
  padding: clamp(18px, 3vw, 24px);
  background: #17201c;
  border-radius: 8px;
  color: #fff;
  box-shadow: 0 18px 42px rgba(23, 32, 28, 0.14);
}

.faq-source-note h2 {
  color: #fff;
}

.faq-source-note p {
  color: rgba(255, 255, 255, 0.8);
}

.faq-source-note div {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}

.faq-source-note a {
  padding: 9px 11px;
  color: #17201c;
  background: #fff;
  border-radius: 6px;
  font-weight: 800;
  text-decoration: none;
}

.faq-source-note a:hover {
  background: var(--gold-soft);
}

@media (max-width: 1120px) {
  .practice-hero {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .practice-hero .interface-showcase {
    justify-self: stretch;
    width: 100%;
    margin-top: 12px;
  }

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

.dashboard-chart-panel,
.practice-mode-panel {
  width: 100%;
  max-width: 1180px;
  margin: 28px auto;
  padding: 22px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(23, 32, 28, 0.08);
}

.practice-page-shell {
  padding: clamp(8px, 1vw, 10px) clamp(16px, 6vw, 72px) clamp(46px, 7vw, 78px);
  background:
    linear-gradient(135deg, #f8faf7 0%, #eef8f6 55%, #fff8ea 100%);
}

.practice-page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  width: min(1180px, 100%);
  margin: 0 auto 18px;
  padding: clamp(14px, 2.4vw, 20px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(23, 32, 28, 0.16);
}

.dashboard-hero > div:first-child,
.practice-page-hero > div:first-child,
.simulator-page-hero > div:first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.practice-page-hero h1 {
  max-width: none;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  line-height: 1.08;
}

.practice-page-hero p {
  max-width: none;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.98rem;
  line-height: 1.35;
}

.practice-page-hero .section-kicker {
  color: #aee6df;
}

.practice-page-hero .primary-button {
  flex: 0 0 auto;
  background: #fff;
  color: var(--accent-dark);
  border-color: #fff;
  text-decoration: none;
}

.simulator-page-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 18px;
  padding: clamp(14px, 2.4vw, 20px);
  color: #fff;
  background:
    linear-gradient(135deg, rgba(23, 32, 28, 0.98), rgba(141, 36, 48, 0.9)),
    var(--ink);
  border-radius: 16px;
  box-shadow: 0 22px 54px rgba(23, 32, 28, 0.16);
}

.simulator-page-hero h1 {
  max-width: none;
  margin-bottom: 8px;
  color: #fff;
  font-size: clamp(1.35rem, 2.4vw, 2.05rem);
  font-weight: 400;
  line-height: 1.08;
}

.simulator-page-hero p {
  max-width: none;
  margin-bottom: 0;
  color: rgba(255, 255, 255, 0.84);
  font-size: 0.98rem;
  line-height: 1.35;
}

.simulator-page-hero .section-kicker {
  color: #aee6df;
}

.simulator-page-hero .secondary-button {
  flex: 0 0 auto;
  color: #fff;
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.52);
  text-decoration: none;
}

.dashboard-chart-grid {
  display: grid;
  grid-template-columns: 1fr 220px 1.4fr;
  gap: 16px;
  margin-top: 16px;
}

.chart-card {
  min-height: 170px;
  padding: 18px;
  background: linear-gradient(180deg, #ffffff 0%, #f8faf7 100%);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.chart-card h4,
.practice-card h4 {
  margin: 0 0 16px;
  font-size: 1rem;
}

.score-trend-chart {
  position: relative;
  display: flex;
  align-items: end;
  gap: 12px;
  min-height: 168px;
  padding: 20px 12px 10px;
  background:
    linear-gradient(180deg, rgba(31, 122, 117, 0.05), rgba(31, 122, 117, 0)),
    var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 12px;
}

.score-pass-line {
  position: absolute;
  right: 10px;
  left: 10px;
  bottom: calc(10px + (108px * 0.75));
  border-top: 1px dashed rgba(31, 122, 117, 0.52);
}

.score-pass-line span {
  position: absolute;
  top: -10px;
  right: 0;
  padding: 1px 7px;
  color: var(--teal);
  background: var(--surface-2);
  font-size: 0.72rem;
  font-weight: 900;
}

.score-trend-item {
  position: relative;
  z-index: 1;
  display: grid;
  flex: 1;
  gap: 6px;
  justify-items: center;
  min-width: 46px;
}

.score-trend-item strong {
  color: var(--ink);
  font-size: 0.86rem;
  line-height: 1;
}

.score-trend-track {
  display: flex;
  align-items: end;
  width: 100%;
  max-width: 46px;
  height: 108px;
  padding: 3px;
  background: #fff;
  border: 1px solid rgba(215, 223, 217, 0.9);
  border-radius: 999px;
}

.score-trend-track span {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, var(--accent) 0%, var(--accent-dark) 100%);
  border-radius: 999px;
}

.score-trend-item.is-pass .score-trend-track span {
  background: linear-gradient(180deg, var(--teal) 0%, #125f5a 100%);
}

.score-trend-item small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.practice-stat-ring {
  --accuracy: 0%;
  display: grid;
  place-items: center;
  width: 132px;
  height: 132px;
  margin: 0 auto;
  text-align: center;
  background:
    radial-gradient(circle at center, #fff 0 56%, transparent 57%),
    conic-gradient(var(--teal) var(--accuracy), #dce5df 0);
  border-radius: 50%;
}

.practice-stat-ring strong {
  display: block;
  font-size: 1.3rem;
}

.practice-stat-ring span {
  display: block;
  color: var(--muted);
  font-size: 0.82rem;
}

.topic-chart-row {
  display: grid;
  grid-template-columns: minmax(130px, 1fr) minmax(120px, 1.3fr) 46px;
  align-items: center;
  gap: 10px;
  margin: 10px 0;
  font-size: 0.92rem;
}

.practice-controls {
  display: grid;
  grid-template-columns: 1fr 180px 150px auto auto;
  gap: 12px;
  align-items: end;
  margin: 18px 0;
}

.practice-controls .weak-area-action-button {
  margin-left: 0;
}

.practice-controls label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

.practice-question-area {
  margin-top: 16px;
}

.practice-card {
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(31, 122, 117, 0.08), transparent 36%),
    #ffffff;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.practice-card-top {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 12px;
}

.practice-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  min-height: 52px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--line);
}

.practice-card-header .practice-card-top {
  flex: 1;
  margin-bottom: 0;
}

.practice-mode-badge {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 7px 13px;
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent-dark));
  border-radius: 999px;
  box-shadow: 0 12px 24px rgba(31, 122, 117, 0.18);
  font-size: 0.84rem;
  font-weight: 900;
  letter-spacing: 0;
}

.practice-mode-badge.is-weak-area {
  color: #10241f;
  background: linear-gradient(135deg, #f8dd8f, #74d2c8);
  box-shadow: 0 12px 26px rgba(196, 126, 16, 0.16);
}

.weak-area-coverage-warning {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 14px 0 0;
  padding: 11px 13px;
  color: #694300;
  background: #fff7e6;
  border: 1px solid #e8bf68;
  border-radius: 10px;
}

.weak-area-coverage-warning p {
  margin: 0;
  line-height: 1.45;
}

.weak-area-coverage-icon {
  display: inline-grid;
  flex: 0 0 24px;
  width: 24px;
  height: 24px;
  place-items: center;
  color: #fff;
  background: #bd7600;
  border-radius: 50%;
  font-size: 0.82rem;
  font-weight: 800;
}

.practice-question-text {
  margin-top: 16px;
  margin-bottom: 18px;
  font-size: clamp(1.35rem, 2.2vw, 2rem);
  line-height: 1.22;
  font-weight: 700;
}

.practice-question-map {
  display: grid;
  gap: 10px;
  margin: 14px 0;
  padding: 12px;
  background: linear-gradient(135deg, rgba(255, 247, 230, 0.82), rgba(232, 246, 244, 0.7));
  border: 1px solid rgba(31, 122, 117, 0.16);
  border-radius: 14px;
}

.practice-question-map-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.85rem;
  font-weight: 800;
}

.practice-question-map-header span {
  color: var(--accent-dark);
}

.practice-question-map-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(38px, 1fr));
  gap: 8px;
}

.practice-question-map-grid button {
  min-height: 38px;
  padding: 0;
  color: #31423a;
  background: #fff;
  border: 1px solid #d5ded8;
  border-radius: 10px;
  font-weight: 900;
}

.practice-question-map-grid button.is-unanswered {
  color: #8a5a09;
  background: #fff7e6;
  border-color: #e8bc62;
  box-shadow: inset 0 -3px 0 #d4900c;
}

.practice-question-map-grid button.is-answered {
  color: #1f6d48;
  background: #e7f6ee;
  border-color: #9ccdbd;
  box-shadow: inset 0 -3px 0 #2e7d4f;
}

.practice-question-map-grid button.is-current {
  color: #fff;
  background: linear-gradient(135deg, var(--teal), var(--accent-dark));
  border-color: transparent;
  box-shadow: 0 10px 22px rgba(31, 122, 117, 0.22);
}

.practice-options {
  display: grid;
  gap: 10px;
  margin: 14px 0;
}

.practice-options button {
  width: 100%;
  padding: 12px 14px;
  color: var(--ink);
  text-align: left;
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 12px;
  cursor: pointer;
}

.practice-options button.is-selected {
  color: #10261f;
  background:
    linear-gradient(90deg, rgba(31, 122, 117, 0.2), rgba(233, 246, 244, 0.98));
  border: 2px solid var(--teal);
  box-shadow:
    0 0 0 4px rgba(31, 122, 117, 0.14),
    inset 6px 0 0 var(--teal);
  font-weight: 850;
}

.practice-options button.is-correct {
  color: #174b30;
  background: var(--green-soft);
  border-color: var(--green-line);
}

.practice-options button.is-wrong {
  color: #7f1d2d;
  background: var(--red-soft);
  border-color: var(--red-line);
}

.practice-answer-action {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}

.practice-answer-note {
  min-height: 1.2em;
  color: var(--accent-dark);
  font-weight: 850;
}

.practice-answer-note:empty {
  display: none;
}

.practice-feedback {
  position: relative;
  display: grid;
  gap: 8px;
  margin: 14px 0;
  padding: 14px 14px 18px;
  border-radius: 12px;
}

.practice-feedback p {
  margin: 0;
}

.practice-feedback.is-correct {
  background: var(--green-soft);
  border: 1px solid var(--green-line);
}

.practice-feedback.is-wrong {
  background: var(--red-soft);
  border: 1px solid var(--red-line);
}

.report-question-link {
  justify-self: end;
  min-height: auto;
  padding: 0;
  color: var(--muted);
  background: transparent;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  font-size: 0.78rem;
  font-weight: 800;
  line-height: 1.2;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.report-question-link:hover {
  color: var(--accent-dark);
  background: transparent;
  box-shadow: none;
  transform: none;
}

.practice-question-report-action {
  display: flex;
  justify-content: flex-end;
  min-height: 20px;
  margin-top: -10px;
}

.practice-question-report-mobile {
  display: none;
}

.practice-report-card {
  display: grid;
  gap: 18px;
}

.practice-report-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.practice-report-top h3 {
  margin-bottom: 6px;
  font-size: clamp(1.45rem, 3vw, 2.2rem);
}

.practice-report-top p {
  margin-bottom: 0;
  color: var(--muted);
}

.practice-report-score {
  min-width: 142px;
  padding: 16px;
  color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent-dark));
  border-radius: 14px;
  text-align: center;
  box-shadow: 0 18px 34px rgba(179, 38, 59, 0.2);
}

.practice-report-score strong,
.practice-report-score span {
  display: block;
}

.practice-report-score strong {
  font-size: 2rem;
  line-height: 1;
}

.practice-report-score span {
  margin-top: 6px;
  color: rgba(255, 255, 255, 0.82);
  font-weight: 800;
}

.practice-report-summary,
.practice-review-list {
  display: grid;
  gap: 12px;
}

.practice-review-item {
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
}

.practice-review-item.is-correct {
  border-color: var(--green-line);
  box-shadow: inset 5px 0 0 var(--green);
}

.practice-review-item.is-incorrect {
  border-color: var(--red-line);
  box-shadow: inset 5px 0 0 var(--red);
}

.practice-review-item h4 {
  margin: 10px 0 12px;
  font-size: 1.02rem;
  font-weight: 400;
}

.practice-review-item p {
  margin-bottom: 0;
  color: var(--muted);
}

.practice-nav {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 14px;
}

.practice-nav-top {
  flex: 0 0 auto;
  justify-content: flex-end;
  margin-top: 0;
}

.practice-nav-top button {
  min-width: 112px;
}

.compact-button {
  min-height: 34px;
  padding: 6px 12px;
  font-size: 0.9rem;
}

.report-card {
  border-left: 5px solid var(--gold);
}

@media (max-width: 980px) {
  .abuse-settings-grid {
    grid-template-columns: 1fr;
  }

  .app-header,
  .source-panel {
    align-items: start;
    flex-direction: column;
  }

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

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

  .admin-login-panel,
  .analytics-layout,
  .monetization-detail-grid,
  .review-polish-panel,
  .bulk-toolbar,
  .user-detail-grid,
  .active-session-row {
    grid-template-columns: 1fr;
  }

  .active-session-meta {
    justify-content: flex-start;
  }

  .admin-analytics-band {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-visit-groups {
    grid-template-columns: 1fr;
  }

  .taxonomy-grid {
    grid-template-columns: 1fr;
  }

  .coverage-list {
    grid-template-columns: 1fr;
  }

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

  .monetization-source-panel,
  .monetization-financial-panel,
  .monetization-payment-panel,
  .monetization-recent-panel {
    grid-column: auto;
  }

  .monetization-source-list {
    grid-template-columns: 1fr;
  }

  .dashboard-chart-grid,
  .environment-timeline-grid,
  .practice-controls {
    grid-template-columns: 1fr;
  }

  .readiness-panel-header,
  .readiness-score-summary {
    align-items: stretch;
    flex-direction: column;
  }

  .readiness-average-score,
  .final-readiness-score {
    width: 100%;
  }

  .score-trend-chart {
    overflow-x: auto;
  }

  .score-trend-item {
    min-width: 54px;
  }

  .topic-chart-row {
    grid-template-columns: 1fr;
  }

  .practice-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .simulator-page-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-page-hero .primary-button,
  .simulator-page-hero .secondary-button {
    width: 100%;
  }

  .practice-report-top {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-card-header {
    flex-direction: column;
    align-items: stretch;
  }

  .practice-nav-top {
    justify-content: space-between;
  }

  .practice-nav-top button {
    flex: 1;
    min-width: 0;
  }

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

  .practice-report-score {
    width: 100%;
  }

  .practice-hero {
    min-height: auto;
  }

  .hero-overlay {
    background:
      linear-gradient(90deg, rgba(249, 250, 246, 0.97) 0%, rgba(249, 250, 246, 0.9) 52%, rgba(249, 250, 246, 0.35) 100%),
      linear-gradient(180deg, rgba(14, 34, 29, 0.08), rgba(14, 34, 29, 0.2));
  }

  .public-metrics,
  .insight-grid,
  .sample-question-list,
  .dashboard-grid,
  .dashboard-readiness-list,
  .discover-layout,
  .discover-study-grid,
  .mock-detail-grid,
  .camera-setup-grid,
  .mock-id-layout,
  .mock-link-panel,
  .mock-email-card {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .dashboard-hero {
    align-items: start;
    flex-direction: column;
  }

  .history-row {
    grid-template-columns: 86px minmax(0, 1fr);
  }

  .mistake-answer-grid {
    grid-template-columns: 1fr;
  }

  .history-row button {
    grid-column: 1 / -1;
    justify-self: start;
  }

  .sample-option-list {
    grid-template-columns: 1fr;
  }

  .sample-carousel-card {
    min-height: 620px;
  }

  .test-status-bar {
    grid-template-columns: 1fr;
  }

  .test-camera-preview {
    max-width: 320px;
  }

  .public-header {
    flex-wrap: wrap;
  }

  .discover-sidebar {
    position: static;
  }

  .discover-source-panel,
  .discover-reader-top {
    align-items: stretch;
    flex-direction: column;
  }

  .site-footer,
  .contact-layout {
    align-items: start;
    flex-direction: column;
    grid-template-columns: 1fr;
  }

  .policy-layout {
    grid-template-columns: 1fr;
  }

  .how-steps::before {
    left: 38px;
  }

  .how-step {
    grid-template-columns: 76px minmax(0, 1fr);
    gap: 14px;
  }

  .how-step-media {
    width: 76px;
    height: 76px;
  }

  .how-step-media img {
    width: 58px;
    height: 58px;
  }

  .account-actions {
    width: 100%;
    justify-content: flex-start;
    margin-left: 0;
  }

  .test-layout {
    grid-template-columns: 1fr;
  }

  .question-map-grid {
    grid-template-columns: repeat(10, minmax(36px, 1fr));
  }

  .result-hero {
    grid-template-columns: 1fr;
  }

  .result-attempt-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .score-display {
    width: min(100%, 180px);
  }
}

@media (max-width: 640px) {
  .monetization-metric-grid {
    grid-template-columns: 1fr;
  }

  .monetization-metric-card {
    min-height: 0;
  }

  .monetization-recent-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .monetization-financial-card header,
  .monetization-payment-heading {
    align-items: flex-start;
  }

  .monetization-payment-values {
    display: grid;
    grid-template-columns: 1fr;
  }

  .practice-question-report-desktop {
    display: none;
  }

  .practice-question-report-mobile {
    display: flex;
    margin-top: 8px;
  }

  .confirm-dialog,
  .account-dialog,
  .contact-dialog,
  .contact-success-dialog,
  .question-report-dialog {
    width: calc(100vw - 20px);
    max-width: calc(100vw - 20px);
    max-height: calc(100dvh - 20px);
    margin: auto;
    border-radius: 16px;
  }

  .confirm-dialog form,
  .account-dialog form,
  .contact-dialog form,
  .question-report-dialog form {
    padding: 14px;
  }

  .account-dialog-header {
    align-items: center;
    gap: 10px;
    margin: -14px -14px 0;
    padding: 12px;
  }

  .account-dialog-brand {
    min-width: 0;
    gap: 10px;
  }

  .account-dialog-logo {
    width: 72px;
    height: 40px;
  }

  .account-dialog-header h2 {
    font-size: 1.15rem;
  }

  .account-dialog-header p:last-child {
    font-size: 0.88rem;
  }

  .close-button {
    width: 38px;
    min-height: 38px;
  }

  .dialog-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    width: 100%;
  }

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

  .signout-dialog-body {
    gap: 14px;
  }

  .app-header,
  .app-shell {
    padding-left: 16px;
    padding-right: 16px;
  }

  h1 {
    font-size: 1.55rem;
  }

  .practice-hero h1 {
    font-size: clamp(2.18rem, 7vw, 2.45rem);
    line-height: 1.05;
  }

  .summary-band,
  .toolbar,
  .bulk-toolbar,
  .review-polish-panel,
  .coverage-list,
  .admin-analytics-band,
  .form-grid,
  .result-attempt-meta {
    grid-template-columns: 1fr;
  }

  .admin-workspace-header {
    align-items: stretch;
    flex-direction: column;
  }

  .question-header,
  .published-header {
    flex-direction: column;
    align-items: start;
  }

  .public-header {
    position: sticky;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 10px 12px;
    width: 100%;
    max-width: 100%;
    padding: 10px 12px 8px;
    overflow-x: clip;
  }

  .brand-mark img {
    width: 82px;
    height: 41px;
  }

  .mobile-nav-toggle {
    display: none;
  }

  .public-nav {
    display: grid;
    grid-column: 1 / -1;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    order: 4;
    width: 100%;
    min-width: 0;
    max-width: 100%;
    gap: 7px;
    margin-top: 2px;
    padding: 7px;
    overflow: visible;
    background: rgba(248, 251, 249, 0.98);
    border: 1px solid rgba(215, 223, 217, 0.86);
    border-radius: 14px;
    box-shadow: 0 14px 28px rgba(23, 32, 28, 0.1);
  }

  .public-nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 6px;
    text-align: center;
    white-space: normal;
    background: #dceff7;
    border: 1px solid #9ecbde;
    border-radius: 10px;
    font-size: clamp(0.72rem, 2.7vw, 0.82rem);
    line-height: 1.12;
    box-shadow: 0 8px 18px rgba(41, 105, 132, 0.08);
  }

  .public-nav a[aria-current="page"] {
    box-shadow: 0 10px 22px rgba(141, 36, 48, 0.24);
  }

  .public-nav a.discover-nav-link {
    grid-column: 1 / -1;
    min-height: 40px;
    margin-top: 1px;
    border-radius: 12px;
    font-size: 0.86rem;
  }

  .account-actions {
    align-items: center;
    flex-direction: row;
    justify-self: end;
    align-self: center;
    order: 2;
    width: auto;
    min-width: 0;
    max-width: calc(100vw - 112px);
    margin-left: auto;
  }

  .header-share-button {
    flex-basis: 38px;
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .header-share-button svg {
    width: 19px;
    height: 19px;
  }

  .share-dialog {
    width: min(94vw, 560px);
    max-height: calc(100dvh - 20px);
    border-radius: 11px;
  }

  .share-dialog-header {
    grid-template-columns: 76px minmax(0, 1fr) 40px;
    gap: 10px;
    padding: 14px;
  }

  .share-dialog-header img {
    width: 74px;
    height: 50px;
  }

  .share-dialog-header h2 {
    font-size: 1.18rem;
  }

  .share-dialog-close {
    width: 38px;
    min-width: 38px;
    height: 38px;
  }

  .share-dialog-body {
    padding: 16px;
  }

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

  .share-option {
    min-height: 78px;
  }

  .account-actions button,
  .account-summary {
    width: auto;
  }

  .account-summary {
    grid-template-columns: 30px minmax(0, 1fr);
    gap: 7px;
    min-width: 0;
    max-width: min(224px, calc(100vw - 168px));
    padding: 5px 8px 5px 5px;
    border-radius: 999px;
  }

  .account-summary strong {
    overflow: visible;
    font-size: 0.75rem;
    line-height: 1.05;
    white-space: normal;
  }

  .account-summary small {
    display: none;
  }

  .account-summary .profile-avatar {
    width: 30px;
    height: 30px;
    font-size: 0.72rem;
  }

  .logout-button {
    width: 40px;
    min-height: 36px;
    padding: 7px;
    color: #fff;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-color: rgba(141, 36, 48, 0.72);
    border-radius: 999px;
    box-shadow: 0 10px 20px rgba(180, 59, 71, 0.2);
  }

  .logout-button-icon {
    display: block;
  }

  .logout-button-text {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
  }

  .account-create-button {
    min-height: 40px;
    padding: 8px 15px;
    border-radius: 999px;
    font-size: 0.9rem;
  }

  .dashboard-hero-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: start;
    width: 100%;
    gap: 10px;
  }

  .dashboard-hero-actions .primary-button {
    width: 100%;
    min-width: 0;
    min-height: 52px;
    height: 100%;
    padding: 10px;
  }

  .dashboard-actions,
  .dashboard-tab-group,
  .weak-area-action-button {
    width: 100%;
  }

  .weak-area-action-button {
    margin-left: 0;
  }

  .site-footer {
    align-items: start;
    flex-direction: column;
  }

  .footer-links {
    justify-content: flex-start;
  }

  .footer-links a {
    width: 100%;
  }

  .practice-hero {
    min-height: auto;
    gap: 18px;
    padding-top: 24px;
    padding-bottom: 32px;
  }

  .hero-image {
    object-position: 64% center;
  }

  .hero-overlay {
    background:
      linear-gradient(180deg, rgba(249, 250, 246, 0.99) 0%, rgba(249, 250, 246, 0.94) 50%, rgba(249, 250, 246, 0.55) 100%);
  }

  .hero-actions,
  .result-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .practice-hero .hero-actions {
    display: flex;
    width: 100%;
  }

  .practice-hero .hero-actions > .button-link,
  .practice-hero .hero-actions > button {
    width: 100%;
  }

  .hero-feature-list {
    grid-template-columns: 1fr;
  }

  .hero-actions button,
  .result-actions button,
  .discover-source-actions a,
  .discover-next-row a {
    width: 100%;
  }

  .result-hero {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
  }

  .result-copy {
    grid-column: 1 / -1;
  }

  .result-hero .result-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }

  .result-hero .result-actions button {
    width: 100%;
    min-width: 0;
  }

  .result-illustration {
    width: 108px;
    height: 108px;
    justify-self: center;
  }

  .result-illustration svg {
    width: 76px;
    height: 76px;
  }

  .score-display {
    width: 100%;
    min-height: 104px;
    justify-self: stretch;
  }

  .active-question .test-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    justify-content: stretch;
  }

  .active-question .test-controls button {
    width: 100%;
    min-width: 0;
  }

  .public-metrics,
  .insight-grid,
  .discover-layout,
  .discover-study-grid,
  .review-answer-grid,
  .field-grid,
  .account-tabs,
  .feature-grid,
  .sample-question-list,
  .dashboard-grid,
  .dashboard-readiness-list,
  .mock-detail-grid,
  .camera-setup-grid,
  .mock-id-layout,
  .mock-link-panel,
  .mock-email-card,
  .environment-report-list,
  .mock-stepper {
    grid-template-columns: 1fr;
  }

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

  .discover-reader-top,
  .discover-source-actions,
  .discover-next-row {
    align-items: stretch;
    flex-direction: column;
  }

  .discover-reader-actions {
    justify-content: flex-start;
    scroll-margin-top: 130px;
    flex-wrap: wrap;
  }

  .discover-reader-option {
    flex: 1 1 135px;
  }

  .discover-facts-grid,
  .discover-checkpoint-list {
    grid-template-columns: 1fr;
  }

  .discover-section-actions,
  .discover-section-action-buttons {
    align-items: stretch;
    flex-direction: column;
  }

  .discover-section-action-buttons a {
    width: 100%;
  }

  .discover-source-actions .reader-shortcut,
  .discover-source-actions > .button-link {
    width: 100%;
  }

  [data-setup-step="camera"] .camera-setup-grid,
  [data-setup-step="lightingCheck"] .camera-setup-grid,
  [data-setup-step="faceCheck"] .camera-setup-grid,
  [data-setup-step="facePhoto"] .camera-setup-grid,
  [data-setup-step="mockId"] .mock-id-layout {
    grid-template-columns: 1fr;
  }

  .setup-topbar,
  .setup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .setup-actions-top {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: 100%;
  }

  .setup-panel-controls {
    position: static;
    align-items: stretch;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 18px;
    margin-left: 0;
  }

  .setup-step-counter-row {
    justify-content: center;
    width: 100%;
  }

  .setup-panel-controls #setupStepCounter {
    align-self: auto;
  }

  .setup-actions button {
    width: 100%;
  }

  .setup-panel {
    padding-left: clamp(20px, 4vw, 34px);
  }

  .setup-panel > .setup-stage-icon {
    display: none;
  }

  .setup-panel-controls .setup-stage-icon-mobile {
    position: static;
    display: grid;
    flex: 0 0 auto;
    width: 44px;
    height: 44px;
    margin: 0;
  }

  [data-setup-step="welcome"].setup-panel.is-active {
    display: flex;
    flex-direction: column;
  }

  [data-setup-step="welcome"] .setup-panel-controls {
    order: 1;
  }

  [data-setup-step="welcome"] h3 {
    order: 2;
  }

  [data-setup-step="welcome"] h3 + p {
    order: 3;
  }

  [data-setup-step="welcome"] .setup-choice-actions {
    order: 4;
    margin: 4px 0 16px;
  }

  [data-setup-step="welcome"] .simulator-benefit-heading {
    order: 5;
  }

  [data-setup-step="welcome"] .simulator-benefit-grid {
    order: 6;
  }

  [data-setup-step="welcome"] .privacy-note {
    order: 7;
  }

  .value-showcase {
    padding-top: 34px;
    padding-bottom: 34px;
  }

  .language-highlight {
    align-items: start;
    flex-direction: column;
  }

  .sample-carousel-top,
  .sample-carousel-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .sample-carousel-card {
    display: block;
    min-height: auto;
  }

  .sample-progress-text {
    align-self: start;
  }

  .camera-preview,
  .mock-test-top,
  .mock-review-row {
    grid-template-columns: 1fr;
  }

  .mock-test-top {
    flex-direction: column;
  }

  .interface-showcase {
    padding: 12px;
    border-radius: 10px;
  }

  .showcase-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 10px;
    margin-bottom: 10px;
  }

  .showcase-header h2 {
    font-size: 1.28rem;
  }

  .showcase-dots {
    gap: 5px;
    max-width: 100%;
    padding: 0 0 2px;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .showcase-dots::-webkit-scrollbar {
    display: none;
  }

  .showcase-dot {
    flex: 0 0 auto;
    width: 9px;
    height: 9px;
  }

  .showcase-dot.is-active {
    width: 24px;
  }

  .showcase-frame {
    min-height: 0;
    aspect-ratio: 16 / 12.2;
  }

  .practice-hero .showcase-frame {
    min-height: 0;
  }

  .showcase-slide {
    padding: 7px;
  }

  .screenshot-card {
    gap: 12px;
  }

  .screenshot-window {
    min-height: 0;
    height: 100%;
  }

  .practice-hero .screenshot-window {
    min-height: 0;
  }

  .practice-hero .screenshot-window img {
    object-fit: contain;
    object-position: top center;
  }

  .screenshot-card figcaption {
    padding: 12px;
  }

  .mock-stepper span {
    min-height: 54px;
    padding: 10px;
  }

  .camera-preview {
    gap: 10px;
    padding: 12px;
  }

  .camera-face {
    width: min(112px, 100%);
  }

  .test-status-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .test-status-actions {
    align-items: stretch;
    flex-direction: column;
    margin-left: 0;
  }

  .test-status-bar .test-status-actions {
    display: none;
  }

  .mobile-test-status-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid rgba(31, 122, 117, 0.12);
  }

  .mobile-test-status-actions .return-welcome-button,
  .mobile-test-status-actions .timer-box {
    width: 100%;
    min-width: 0;
  }

  .timer-box {
    width: 100%;
  }

  .test-camera-preview {
    width: 100%;
    max-width: none;
    margin-top: 12px;
  }

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

  .active-question {
    min-height: auto;
  }

  .submit-button {
    margin-left: 0;
  }

  .section-header {
    align-items: start;
    flex-direction: column;
  }

  .practice-weak-area-link {
    width: 100%;
    margin-left: 0;
  }

  .review-heading {
    grid-template-columns: 14px minmax(0, 1fr);
  }

  .review-status {
    grid-column: 2;
    justify-self: start;
  }
}

/* Keep account creation compact enough to fit common laptop and phone-height
   viewports without removing fields or weakening registration validation. */
#accountDialog.account-dialog {
  width: min(760px, calc(100% - 24px));
  overflow: hidden;
}

#accountDialog #accountForm {
  --account-dialog-inline-padding: clamp(18px, 3vw, 28px);
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  max-height: calc(100dvh - 28px);
  overflow: hidden;
}

#accountDialog .account-dialog-scroll-body {
  display: grid;
  gap: 16px;
  min-height: 0;
  margin-right: calc(var(--account-dialog-inline-padding) * -1);
  padding-top: 16px;
  padding-right: var(--account-dialog-inline-padding);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(86, 93, 89, 0.78) transparent;
}

#accountDialog .account-dialog-scroll-body::-webkit-scrollbar {
  width: 11px;
}

#accountDialog .account-dialog-scroll-body::-webkit-scrollbar-track {
  margin-block: 10px;
  background: transparent;
  border-radius: 999px;
}

#accountDialog .account-dialog-scroll-body::-webkit-scrollbar-thumb {
  min-height: 42px;
  background: linear-gradient(180deg, rgba(112, 120, 115, 0.88), rgba(72, 81, 76, 0.88));
  background-clip: padding-box;
  border: 2px solid transparent;
  border-radius: 999px;
}

#accountDialog .account-dialog-scroll-body::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(72, 126, 120, 0.94), rgba(91, 32, 40, 0.9));
  background-clip: padding-box;
}

#accountDialog .account-dialog-scroll-body::-webkit-scrollbar-button,
#accountDialog .account-dialog-scroll-body::-webkit-scrollbar-corner {
  display: none;
  width: 0;
  height: 0;
  background: transparent;
}

#accountForm .account-status:empty {
  display: none;
  min-height: 0;
}

@media (max-width: 980px) {
  #accountForm {
    gap: 6px;
    padding-bottom: 14px;
  }

  #accountForm .account-tabs {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 6px;
    padding: 6px;
  }

  #accountForm .account-tab {
    min-width: 0;
    min-height: 38px;
    padding: 4px 6px;
    font-size: 0.82rem;
  }

  #accountForm .account-panel[data-account-panel="register"].is-active {
    gap: 4px;
    padding: 8px 10px;
  }

  #registerPanel .auth-panel-intro {
    grid-template-columns: 38px minmax(0, 1fr);
    gap: 9px;
    padding: 8px 10px;
  }

  #registerPanel .auth-panel-intro-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
  }

  #registerPanel .auth-panel-intro-icon svg {
    width: 21px;
    height: 21px;
  }

  #registerPanel .auth-panel-intro p {
    display: none;
  }

  #registerPanel .field-grid {
    gap: 3px 10px;
  }

  #registerPanel .field-grid label {
    margin: 0;
  }

  #registerPanel .field-grid label > span:first-child {
    margin-bottom: 1px;
    font-size: 0.72rem;
    line-height: 1.12;
  }

  #registerPanel .field-grid label > input,
  #registerPanel .field-grid label > select {
    height: 34px;
    min-height: 34px;
    padding: 4px 9px;
    font-size: 0.9rem;
    line-height: 1.15;
  }

  #registerPanel .registration-verification-row {
    align-items: center;
    gap: 0;
    margin: 0;
  }

  #registerPanel .terms-check {
    align-self: center;
    grid-template-columns: 17px minmax(0, 1fr);
    gap: 6px;
    min-height: 26px;
    padding: 1px 7px;
    border-radius: 7px;
    box-shadow: none;
    font-size: 0.76rem;
    line-height: 1.05;
  }

  #registerPanel .terms-check input {
    width: 16px;
    height: 16px;
    min-height: 16px;
    margin: 0;
  }

  #registerPanel .terms-check span {
    margin: 0;
    line-height: 1.05;
  }

  #registerPanel #registerSubmitButton {
    min-height: 40px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  #registerPanel .account-switch-copy {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.15;
  }
}

@media (max-width: 640px) {
  #accountDialog.account-dialog {
    width: calc(100vw - 12px);
    max-width: calc(100vw - 12px);
    max-height: calc(100dvh - 12px);
  }

  #accountDialog #accountForm {
    --account-dialog-inline-padding: 14px;
    max-height: calc(100dvh - 16px);
  }

  #accountDialog .account-dialog-scroll-body {
    gap: 10px;
    padding-top: 10px;
    padding-right: var(--account-dialog-inline-padding);
  }

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

  #accountForm .account-tab {
    flex-direction: column;
    gap: 2px;
    min-height: 53px;
    padding: 4px 2px;
    font-size: 0.7rem;
  }

  #accountForm .account-tab-icon {
    width: 25px;
    height: 25px;
    border-radius: 8px;
  }

  #accountForm .account-tab-icon svg {
    width: 16px;
    height: 16px;
  }

  #accountForm #registerPanel .field-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #accountForm #registerPanel .field-span-full {
    grid-column: 1 / -1;
  }

  #registerPanel .registration-turnstile {
    min-height: 0;
  }
}

@media (max-width: 350px) {
  #accountForm #registerPanel .field-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-height: 820px) and (min-width: 641px) {
  #accountForm .account-panel[data-account-panel="register"].is-active {
    gap: 3px;
    padding-top: 7px;
    padding-bottom: 7px;
  }

  #registerPanel .auth-panel-intro {
    display: none;
  }

  #registerPanel .registration-verification-row {
    margin: 0;
  }
}

/* This row must stay compact at every browser width, including desktop pages
   viewed with browser zoom where mobile breakpoints may not be active. */
#accountForm #registerPanel.account-panel.is-active {
  gap: 5px;
}

#accountForm #registerPanel .registration-verification-row {
  align-items: center;
  gap: 12px;
  margin: 0;
}

#accountForm #registerPanel .terms-check {
  align-self: center;
  grid-template-columns: 18px minmax(0, 1fr);
  gap: 12px;
  width: 100%;
  min-width: 0;
  height: 38px;
  min-height: 38px;
  margin: 0;
  padding: 6px 14px;
  box-sizing: border-box;
  overflow: hidden;
  border-radius: 6px;
  box-shadow: none;
  font-size: 0.76rem;
  line-height: 1;
}

#accountForm #registerPanel .terms-check input {
  width: 17px;
  height: 17px;
  min-height: 17px;
  margin: 0;
}

#accountForm #registerPanel .terms-check span {
  margin: 0;
  font-size: inherit;
  line-height: 1;
  white-space: nowrap;
}

@media (max-width: 640px) {
  #accountForm #registerPanel.account-panel.is-active {
    gap: 9px;
    padding: 11px;
  }

  #accountForm #registerPanel .field-grid {
    gap: 9px 8px;
  }

  #accountForm #registerPanel .field-grid label > span:first-child {
    margin-bottom: 3px;
    font-size: 0.76rem;
  }

  #accountForm #registerPanel .field-grid label > input,
  #accountForm #registerPanel .field-grid label > select {
    height: 38px;
    min-height: 38px;
    padding: 6px 9px;
  }

  #accountForm #registerPanel .registration-verification-row {
    margin: 2px 0;
  }

  #accountForm #registerPanel #registerSubmitButton {
    min-height: 44px;
    margin-top: 1px;
  }

  #accountForm #registerPanel .account-switch-copy {
    margin-top: 2px;
  }
}
