:root {
  --page-bg: #070d16;
  --panel: rgba(24, 35, 51, 0.88);
  --panel-line: rgba(255, 255, 255, 0.065);
  --text: #f7f7f4;
  --muted: #9ba5b3;
  --gold: #dfad4f;
  --gold-light: #f0ca6f;
  --gold-dark: #a56f18;
  --field: rgba(19, 29, 43, 0.78);
  --field-line: rgba(195, 203, 216, 0.13);
  --error: #ff7f73;
  --toggle-bg: rgba(18, 27, 40, 0.62);
}

[data-theme="light"] {
  --page-bg: #f8f3e8;
  --panel: rgba(255, 252, 245, 0.92);
  --panel-line: rgba(74, 62, 42, 0.12);
  --text: #191c21;
  --muted: #676f7b;
  --gold: #c88a25;
  --gold-light: #d9a84d;
  --gold-dark: #8f611b;
  --field: rgba(255, 255, 255, 0.86);
  --field-line: rgba(70, 60, 43, 0.16);
  --error: #bd4438;
  --toggle-bg: rgba(255, 255, 255, 0.76);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html {
  min-height: 100%;
}

body {
  min-height: 100vh;
  margin: 0;
  color: var(--text);
  font-family: "Inter", Arial, sans-serif;
  background:
    radial-gradient(circle at 35% 46%, rgba(42, 60, 87, 0.2), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(31, 46, 68, 0.2), transparent 24%),
    linear-gradient(135deg, #050a12 0%, var(--page-bg) 54%, #09111d 100%);
}

[data-theme="light"] body {
  background:
    radial-gradient(circle at 34% 44%, rgba(216, 168, 77, 0.14), transparent 28%),
    radial-gradient(circle at 82% 20%, rgba(65, 63, 58, 0.08), transparent 24%),
    linear-gradient(135deg, #fffaf0 0%, var(--page-bg) 54%, #efe4d0 100%);
}

button,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

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

.auth-screen {
  position: relative;
  display: grid;
  grid-template-columns: 500px 420px;
  align-items: center;
  min-height: 100vh;
  width: min(100%, 1000px);
  margin: 0 auto;
  gap: 42px;
  padding: 42px 26px;
}

.theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 28px;
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 6px 9px;
  background: var(--toggle-bg);
  color: var(--text);
  box-shadow: 0 12px 34px rgba(0, 0, 0, 0.16);
}

.theme-label {
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 700;
}

.toggle-track {
  position: relative;
  width: 42px;
  height: 22px;
  border-radius: 999px;
  background: rgba(223, 173, 79, 0.25);
}

.toggle-track span {
  position: absolute;
  top: 4px;
  left: 4px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--gold-light);
  transition: transform 180ms ease;
}

[data-theme="light"] .toggle-track span {
  transform: translateX(20px);
}

.brand-side {
  position: relative;
  display: grid;
  min-height: 430px;
  place-items: center;
}

.brand-lockup {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  text-align: center;
}

.book-icon {
  display: inline-flex;
  width: 70px;
  height: 50px;
  gap: 4px;
  margin-bottom: 14px;
  filter: drop-shadow(0 10px 16px rgba(231, 183, 90, 0.2));
}

.book-icon span {
  width: 33px;
  border: 3px solid var(--gold-light);
  border-radius: 4px 16px 5px 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  transform: skewY(8deg);
}

.book-icon span:last-child {
  border-radius: 16px 4px 4px 5px;
  transform: skewY(-8deg);
}

.brand-lockup h1 {
  margin: 0;
  color: var(--gold-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: clamp(2.8rem, 5.5vw, 4.05rem);
  font-weight: 700;
  line-height: 0.95;
  letter-spacing: 0;
  text-transform: uppercase;
  text-shadow: 0 10px 28px rgba(231, 183, 90, 0.14);
}

.brand-lockup p {
  margin: 15px 0 0;
  color: var(--gold-light);
  font-size: clamp(0.8rem, 1.8vw, 0.96rem);
  letter-spacing: 0.29em;
}

.pattern {
  position: absolute;
  inset: 80px 40px 38px 220px;
  opacity: 0.12;
  background-image:
    radial-gradient(circle at 18px 16px, transparent 0 8px, rgba(255, 255, 255, 0.36) 9px 10px, transparent 11px),
    radial-gradient(circle at 54px 56px, transparent 0 7px, rgba(255, 255, 255, 0.32) 8px 9px, transparent 10px),
    radial-gradient(circle at 90px 24px, transparent 0 6px, rgba(255, 255, 255, 0.3) 7px 8px, transparent 9px);
  background-size: 82px 82px;
}

.form-card {
  width: 100%;
  padding: 30px 32px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 22px 62px rgba(0, 0, 0, 0.31);
}

[data-theme="light"] .form-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), var(--panel));
  box-shadow: 0 22px 62px rgba(87, 70, 42, 0.14);
}

.form-heading {
  margin-bottom: 22px;
  text-align: center;
}

.form-heading h2 {
  margin: 0 0 8px;
  font-size: 1.42rem;
  font-weight: 700;
  letter-spacing: 0;
}

.form-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
}

.signup-form {
  display: grid;
  gap: 12px;
}

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

label {
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 600;
}

input {
  width: 100%;
  min-height: 43px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 0 14px;
  outline: none;
  background: var(--field);
  color: var(--text);
}

input::placeholder {
  color: rgba(168, 176, 188, 0.78);
}

input:focus {
  border-color: rgba(231, 183, 90, 0.62);
  box-shadow: 0 0 0 3px rgba(231, 183, 90, 0.1);
}

textarea,
select {
  width: 100%;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 12px 14px;
  outline: none;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

textarea:focus,
select:focus {
  border-color: rgba(231, 183, 90, 0.62);
  box-shadow: 0 0 0 3px rgba(231, 183, 90, 0.1);
}

.admin-form {
  display: grid;
  gap: 12px;
}

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

.expertise-picker {
  display: grid;
  gap: 10px;
  min-width: 0;
  margin: 0;
  border: 0;
  padding: 0;
}

.expertise-picker legend {
  margin: 0 0 2px;
  padding: 0;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
}

.field-message {
  min-height: 11px;
  color: var(--error);
  font-size: 0.7rem;
}

.primary-button {
  width: 100%;
  min-height: 43px;
  border: 0;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-weight: 700;
}

.social-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
}

.social-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 39px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: rgba(18, 27, 40, 0.44);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 600;
}

[data-theme="light"] .social-button {
  background: rgba(255, 255, 255, 0.62);
}

.social-button span {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  background: var(--gold);
  color: #17120b;
  font-weight: 800;
}

.signin-note {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

.form-tools {
  display: flex;
  justify-content: flex-end;
  margin-top: -5px;
}

.form-status {
  min-height: 18px;
  margin: 0;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.35;
  text-align: center;
}

.form-status[data-type="success"] {
  color: #7dd69b;
}

[data-theme="light"] .form-status[data-type="success"] {
  color: #257a43;
}

.form-status[data-type="error"] {
  color: var(--error);
}

.link-button {
  border: 0;
  padding: 0;
  background: none;
  color: color-mix(in srgb, var(--text), var(--gold-light) 38%);
  font-size: inherit;
  text-decoration: none;
}

@media (max-width: 820px) {
  .auth-screen {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .brand-side {
    min-height: 230px;
  }

  .form-card {
    width: min(100%, 420px);
    margin: 0 auto;
  }
}

@media (max-width: 480px) {
  .auth-screen {
    padding: 28px 16px;
  }

  .form-card {
    padding: 24px;
  }

  .social-row {
    grid-template-columns: 1fr;
  }
}

.app-shell {
  min-height: 100vh;
  padding: 22px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  width: min(100%, 1120px);
  margin: 0 auto;
  padding: 14px 16px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.86), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.22);
}

[data-theme="light"] .topbar,
[data-theme="light"] .study-panel,
[data-theme="light"] .score-panel,
[data-theme="light"] .stat-card,
[data-theme="light"] .exam-card,
[data-theme="light"] .quiz-card,
[data-theme="light"] .result-card,
[data-theme="light"] .ranking-table {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.86), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.12);
}

.app-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--gold-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1.18rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.mini-book {
  width: 26px;
  height: 22px;
  border: 2px solid var(--gold-light);
  border-radius: 4px 12px 5px 4px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold-dark));
  transform: skewY(8deg);
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.main-nav a {
  border-radius: 7px;
  padding: 9px 11px;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
}

.main-nav a.active,
.main-nav a:hover {
  background: rgba(223, 173, 79, 0.13);
  color: var(--gold-light);
}

.theme-toggle.compact {
  margin-top: 0;
}

.workspace {
  width: min(100%, 1120px);
  margin: 26px auto 0;
}

.dashboard-hero,
.page-heading,
.quiz-header,
.result-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
}

.dashboard-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 260px;
  align-items: center;
  gap: 28px;
  padding: 42px;
}

.eyebrow {
  margin: 0 0 10px;
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.dashboard-hero h1,
.page-heading h1,
.quiz-header h1 {
  max-width: 720px;
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.5rem);
  line-height: 1.02;
}

.hero-copy,
.page-heading p,
.result-card p {
  max-width: 620px;
  color: var(--muted);
  line-height: 1.7;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

.action-row.center {
  justify-content: center;
}

.primary-button.inline,
.secondary-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: auto;
  min-width: 142px;
  min-height: 43px;
  padding: 0 18px;
  text-decoration: none;
}

.secondary-button {
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: rgba(18, 27, 40, 0.44);
  color: var(--text);
  font-weight: 700;
}

[data-theme="light"] .secondary-button {
  background: rgba(255, 255, 255, 0.62);
}

.score-panel,
.study-panel,
.stat-card,
.exam-card,
.quiz-card,
.ranking-table {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
}

.score-panel {
  padding: 24px;
}

.score-panel strong {
  display: block;
  margin: 8px 0 3px;
  color: var(--gold-light);
  font-size: 3.2rem;
  line-height: 1;
}

.panel-kicker,
.score-panel span,
.stat-card span,
.stat-card p,
.exam-card p,
.rank-row span,
.question-meta span {
  color: var(--muted);
  font-size: 0.82rem;
}

.progress-line {
  height: 8px;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 139, 156, 0.18);
}

.progress-line span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.progress-line.large {
  height: 12px;
  width: min(100%, 460px);
  margin: 26px auto 0;
}

.stat-grid,
.exam-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.stat-card,
.exam-card,
.study-panel,
.quiz-card {
  padding: 22px;
}

.stat-card strong {
  display: block;
  margin: 10px 0 4px;
  color: var(--text);
  font-size: 2rem;
}

.stat-card p,
.exam-card p {
  margin: 0;
  line-height: 1.5;
}

.content-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(280px, 0.6fr);
  gap: 16px;
  margin-top: 16px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 16px;
}

.section-heading h2 {
  margin: 0;
  font-size: 1rem;
}

.section-heading a {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 700;
  text-decoration: none;
}

.practice-list {
  display: grid;
  gap: 10px;
}

.practice-list a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 14px;
  color: var(--text);
  text-decoration: none;
}

.practice-list strong {
  color: var(--gold-light);
  white-space: nowrap;
}

.focus-list {
  display: grid;
  gap: 12px;
  margin: 0;
  padding-left: 20px;
  color: var(--muted);
  line-height: 1.55;
}

.page-heading {
  padding: 34px;
}

.rankings-filter {
  display: grid;
  grid-template-columns: repeat(2, minmax(180px, 240px));
  gap: 10px;
  margin-top: 18px;
}

.rankings-filter > div { display: grid; gap: 7px; }

.rankings-filter select {
  min-height: 40px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 0 10px;
  background: var(--field);
  color: var(--text);
  font: inherit;
}

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

.exam-card {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
}

.exam-card h2 {
  margin: 12px 0 8px;
  font-size: 1.24rem;
}

.exam-badge {
  display: inline-grid;
  min-height: 24px;
  place-items: center;
  border-radius: 999px;
  padding: 0 10px;
  background: rgba(223, 173, 79, 0.14);
  color: var(--gold-light);
  font-size: 0.7rem;
  font-weight: 800;
}

.quiz-workspace {
  max-width: 900px;
}

.exam-portal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 250px;
  align-items: center;
  gap: 24px;
  padding: 34px;
  border-bottom: 1px solid var(--panel-line);
}

.exam-portal-hero h1 { margin: 0; font-size: 2.35rem; }
.exam-portal-hero p:not(.eyebrow) { max-width: 620px; color: var(--muted); line-height: 1.6; }
.hero-action-row {
  margin-top: 24px;
}

.hero-quiz-button {
  min-width: 220px;
  min-height: 56px;
  justify-content: center;
  padding: 0 32px;
  font-size: 1.02rem;
}

.exam-level-card { display: grid; gap: 6px; padding: 22px; border: 1px solid var(--panel-line); border-radius: 8px; background: var(--panel); }
.exam-level-card span, .exam-level-card small { color: var(--muted); font-size: .82rem; }
.exam-level-card strong { color: var(--gold-light); font-size: 3.5rem; line-height: 1; }
.exam-progress-stats { margin-top: 0; }
.exam-hub-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.exam-hub-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 158px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  padding: 18px;
  color: var(--text);
  text-decoration: none;
}

[data-theme="light"] .exam-hub-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.82));
  box-shadow: 0 18px 46px rgba(87, 70, 42, 0.1);
}

.exam-hub-card.primary {
  border-color: rgba(44, 129, 125, 0.46);
}

.exam-hub-card span {
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.exam-hub-card strong {
  font-size: 1.16rem;
  line-height: 1.25;
}

.exam-hub-card small {
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.exam-hub-card .compact-link {
  align-self: end;
  justify-self: start;
  margin-top: 4px;
}

.syllabus-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: 16px;
}

.syllabus-summary article,
.syllabus-toolbar,
.syllabus-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
}

[data-theme="light"] .syllabus-summary article,
[data-theme="light"] .syllabus-toolbar,
[data-theme="light"] .syllabus-card {
  background: rgba(255, 255, 255, 0.92);
  box-shadow: 0 18px 42px rgba(87, 70, 42, 0.08);
}

.syllabus-summary article {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.syllabus-summary span,
.syllabus-card-head span,
.syllabus-card-head small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: uppercase;
}

.syllabus-summary strong {
  color: var(--gold-light);
  font-size: 1.35rem;
  line-height: 1.15;
}

.syllabus-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 16px;
  padding: 16px;
}

.syllabus-toolbar div {
  display: grid;
  gap: 4px;
}

.syllabus-toolbar span,
.syllabus-card p {
  color: var(--muted);
  line-height: 1.55;
}

.syllabus-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

.syllabus-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.syllabus-card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.syllabus-card-head span {
  color: var(--gold-light);
}

.syllabus-card h2 {
  margin: 0;
  font-size: 1.24rem;
}

.syllabus-card p {
  margin: 0;
  font-size: 0.92rem;
}

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

.topic-list label {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 8px 10px;
  font-size: 0.88rem;
}

.topic-list input {
  accent-color: var(--gold-light);
  flex: 0 0 auto;
}

.topic-list span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.syllabus-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 2px;
}

.syllabus-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  align-items: start;
  gap: 16px;
  margin-top: 16px;
}

.syllabus-article {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  padding: 26px;
}

[data-theme="light"] .syllabus-article {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 18px 42px rgba(87, 70, 42, 0.08);
}

.syllabus-article h2 {
  margin: 26px 0 10px;
  font-size: 1.32rem;
}

.syllabus-article h2:first-child {
  margin-top: 0;
}

.syllabus-article p {
  margin: 0 0 16px;
  color: var(--text);
  font-size: 1rem;
  line-height: 1.78;
}

.syllabus-article ul {
  margin: 0 0 18px 20px;
  padding: 0;
}

.syllabus-article li {
  margin-bottom: 8px;
  line-height: 1.68;
}

.syllabus-article p:last-child {
  margin-bottom: 0;
}

.syllabus-options {
  display: grid;
  gap: 12px;
}

.level-rules { margin-top: 16px; }
.rule-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.rule-grid p { display: grid; gap: 6px; margin: 0; padding: 14px; border: 1px solid var(--field-line); border-radius: 7px; }
.rule-grid strong { color: var(--gold-light); font-size: 1.3rem; }
.rule-grid span { color: var(--muted); font-size: .82rem; line-height: 1.35; }

.quiz-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 20px;
  padding: 28px;
}

.quiz-meter {
  display: grid;
  gap: 7px;
  min-width: 220px;
}

.quiz-timer {
  color: var(--gold-light);
  font-size: 1.08rem;
  font-variant-numeric: tabular-nums;
}

.quiz-card {
  margin-top: 16px;
}

.question-meta {
  display: flex;
  gap: 8px;
  margin-bottom: 16px;
}

.question-meta span {
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 6px 10px;
}

.quiz-card h2 {
  margin: 0 0 20px;
  font-size: clamp(1.35rem, 2.4vw, 2rem);
  line-height: 1.28;
}

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

.option-button {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 58px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 12px;
  background: var(--field);
  color: var(--text);
  text-align: left;
}

.option-button span {
  display: grid;
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 50%;
  background: rgba(223, 173, 79, 0.16);
  color: var(--gold-light);
  font-weight: 800;
}

.option-button.selected {
  border-color: rgba(231, 183, 90, 0.72);
  box-shadow: 0 0 0 3px rgba(231, 183, 90, 0.1);
}

.option-button.correct {
  border-color: rgba(104, 211, 145, 0.92);
  background: rgba(52, 145, 92, 0.2);
}

.option-button.incorrect {
  border-color: rgba(255, 113, 101, 0.9);
  background: rgba(184, 62, 54, 0.2);
}

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

.quiz-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 18px;
}

.quiz-saving-overlay {
  position: fixed;
  inset: 0;
  z-index: 30;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 13, 22, 0.58);
  backdrop-filter: blur(6px);
}

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

.quiz-saving-panel {
  display: grid;
  justify-items: center;
  width: min(100%, 360px);
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 30px 26px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.96), rgba(18, 28, 42, 0.94));
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.32);
  text-align: center;
}

[data-theme="light"] .quiz-saving-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 250, 240, 0.94));
  box-shadow: 0 24px 70px rgba(87, 70, 42, 0.18);
}

.quiz-saving-spinner {
  width: 54px;
  height: 54px;
  border: 5px solid rgba(223, 173, 79, 0.22);
  border-top-color: var(--gold-light);
  border-radius: 50%;
  animation: quizSavingSpin 820ms linear infinite;
}

.quiz-saving-panel strong {
  margin-top: 18px;
  font-size: 1.22rem;
}

.quiz-saving-panel p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

@keyframes quizSavingSpin {
  to {
    transform: rotate(360deg);
  }
}

.result-layout {
  display: grid;
  min-height: calc(100vh - 140px);
  place-items: center;
}

.result-card {
  width: min(100%, 620px);
  padding: 46px;
  text-align: center;
}

.result-card h1 {
  margin: 0;
  color: var(--gold-light);
  font-size: clamp(4rem, 12vw, 7rem);
  line-height: 0.95;
}

.ranking-table {
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 12px;
}

.rank-row {
  display: grid;
  grid-template-columns: 70px minmax(180px, 1fr) 130px 140px;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 14px;
}

.rank-number {
  color: var(--gold-light) !important;
  font-weight: 800;
}

.home-layout {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 100vh;
  background:
    radial-gradient(circle at 62% 18%, rgba(56, 77, 104, 0.16), transparent 30%),
    linear-gradient(135deg, #070d16 0%, #0a111c 55%, #080d14 100%);
}

[data-theme="light"] .home-layout {
  background:
    radial-gradient(circle at 62% 18%, rgba(216, 168, 77, 0.12), transparent 30%),
    linear-gradient(135deg, #fffaf0 0%, #f8f3e8 58%, #efe4d0 100%);
}

.side-rail {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: 100vh;
  padding: 26px 14px;
  border-right: 1px solid var(--panel-line);
  background: linear-gradient(180deg, rgba(9, 16, 27, 0.96), rgba(13, 22, 35, 0.9));
}

[data-theme="light"] .side-rail {
  background: linear-gradient(180deg, rgba(255, 252, 245, 0.94), rgba(246, 239, 225, 0.9));
}

.rail-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 34px;
  padding: 0 8px;
  color: var(--gold-light);
  font-family: "Cinzel", Georgia, serif;
  font-size: 1rem;
  font-weight: 700;
  text-decoration: none;
  text-transform: uppercase;
}

.rail-mobile-header {
  display: contents;
}

.rail-mobile-actions,
.rail-menu-toggle,
.rail-mobile-avatar {
  display: none;
}

.rail-menu-panel {
  display: contents;
}

.rail-nav {
  display: grid;
  gap: 7px;
}

.rail-nav.account {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--panel-line);
}

.rail-portal-button {
  width: 100%;
  border: 1px solid rgba(223, 173, 79, 0.45);
  border-radius: 6px;
  background: rgba(223, 173, 79, 0.12);
  color: var(--gold-light);
  cursor: pointer;
  font: inherit;
  font-weight: 700;
  padding: 10px 12px;
  text-align: left;
}

.rail-portal-button:hover { background: rgba(223, 173, 79, 0.22); }

.rail-nav [hidden] { display: none !important; }

.rail-nav a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 44px;
  border-radius: 8px;
  padding: 0 12px;
  color: var(--text);
  font-size: 0.86rem;
  text-decoration: none;
}

.rail-nav a span {
  display: grid;
  width: 18px;
  place-items: center;
  color: var(--gold-light);
  font-size: 0.9rem;
}

.rail-nav a.active,
.rail-nav a:hover {
  background: rgba(30, 57, 94, 0.62);
}

[data-theme="light"] .rail-nav a.active,
[data-theme="light"] .rail-nav a:hover {
  background: rgba(223, 173, 79, 0.16);
}

.home-main {
  width: min(100%, 920px);
  padding: 26px 36px 36px;
}

.home-topbar {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  min-height: 54px;
}

.learner-topbar {
  margin-bottom: 4px;
}

.home-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.theme-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  height: 38px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 0 10px;
  background: rgba(223, 173, 79, 0.12);
  color: var(--gold-light);
  cursor: pointer;
  font-size: 0.75rem;
  font-weight: 800;
}

.theme-icon-button:hover {
  background: rgba(223, 173, 79, 0.2);
}

.menu-button,
.icon-button,
.avatar-button {
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: var(--text);
}

.menu-button {
  width: 36px;
  height: 36px;
  color: var(--muted);
  font-size: 1.3rem;
}

.icon-button {
  width: 34px;
  height: 34px;
  color: var(--gold-light);
  font-size: 0.9rem;
}

.avatar-button {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-weight: 800;
}

.avatar-button.has-photo {
  background-position: center;
  background-repeat: no-repeat;
  background-size: cover;
  color: transparent;
}

.account-menu-wrap {
  position: relative;
}

.account-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 20;
  width: 210px;
  overflow: hidden;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.98), rgba(18, 28, 42, 0.98));
  box-shadow: 0 20px 52px rgba(0, 0, 0, 0.34);
}

[data-theme="light"] .account-menu {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.98), rgba(255, 250, 240, 0.98));
  box-shadow: 0 20px 52px rgba(87, 70, 42, 0.16);
}

.account-summary {
  display: grid;
  gap: 4px;
  padding: 14px;
  border-bottom: 1px solid var(--panel-line);
}

.account-summary strong {
  font-size: 0.9rem;
}

.account-summary span {
  color: var(--muted);
  font-size: 0.76rem;
}

.account-menu a {
  display: flex;
  align-items: center;
  min-height: 42px;
  padding: 0 14px;
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 700;
  text-decoration: none;
}

.account-menu a:hover,
.account-menu a:focus {
  background: rgba(223, 173, 79, 0.13);
  color: var(--gold-light);
  outline: none;
}

.home-welcome {
  margin-top: 34px;
}

.simple-home {
  display: grid;
  align-content: start;
}

.simple-hero {
  max-width: min(760px, calc(100% - 170px));
  margin-top: -38px;
}

.simple-hero h1 {
  margin: 0;
  font-size: clamp(2.6rem, 6vw, 5rem);
  line-height: 0.98;
}

.simple-hero p:not(.eyebrow) {
  max-width: 640px;
  margin: 18px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.75;
}

.simple-actions {
  max-width: none;
}

.selection-status {
  display: inline-flex;
  align-items: center;
  min-height: 54px;
  color: var(--muted);
  font-size: 0.9rem;
}

.quiz-promo {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  min-height: 120px;
  margin-top: 16px;
  padding: 22px 28px;
  border: 1px solid rgba(223, 173, 79, 0.24);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(223, 173, 79, 0.13), rgba(44, 109, 159, 0.08)),
    rgba(18, 28, 42, 0.54);
}

[data-theme="light"] .quiz-promo {
  border-color: rgba(210, 154, 58, 0.32);
  background:
    linear-gradient(135deg, rgba(223, 173, 79, 0.18), rgba(44, 109, 159, 0.08)),
    rgba(255, 255, 255, 0.64);
}

.quiz-promo span {
  display: block;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
}

.quiz-promo strong {
  display: block;
  margin-top: 8px;
  color: var(--text);
  font-size: clamp(1.35rem, 3vw, 2.35rem);
  line-height: 1.05;
}

.quiz-promo-button {
  min-width: 190px;
  min-height: 62px;
  font-size: 1rem;
  text-transform: uppercase;
}

.ad-slot {
  display: grid;
  min-height: 90px;
  margin-top: 18px;
  place-items: center;
  overflow: hidden;
}

.ad-slot iframe,
.ad-slot ins {
  max-width: 100%;
}

.home-top-ad {
  margin-top: 12px;
}

.share-strip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 10px 12px;
  background: rgba(223, 173, 79, 0.08);
}

.share-strip > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 900;
  text-transform: uppercase;
}

.share-strip div {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.share-strip a,
.share-strip button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0 11px;
  background: var(--field);
  color: var(--gold-light);
  font-size: 0.78rem;
  font-weight: 900;
  text-decoration: none;
}

.public-home-grid,
.public-link-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 20px;
}

.public-home-panel,
.public-link-card {
  display: grid;
  gap: 8px;
  min-height: 148px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 20px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.88), rgba(18, 28, 42, 0.82));
  color: var(--text);
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.18);
}

[data-theme="light"] .public-home-panel,
[data-theme="light"] .public-link-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.84));
  box-shadow: 0 18px 46px rgba(87, 70, 42, 0.1);
}

.public-home-panel span,
.public-link-card span,
.public-link-card small {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.45;
}

.public-home-panel strong,
.public-link-card strong {
  color: var(--text);
  font-size: 1.08rem;
  line-height: 1.25;
}

.public-home-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.public-section,
.learner-dashboard {
  margin-top: 28px;
}

.public-section .section-heading {
  margin-bottom: 0;
}

.public-join-card .action-row {
  justify-content: flex-end;
}

body[data-auth-state="signed-in"] [data-public-join-card] {
  display: none !important;
}

.learner-feed-main {
  width: min(100%, 1120px);
}

.feed-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: end;
  gap: 22px;
  padding-top: 54px;
}

.feed-hero h1 {
  max-width: 760px;
  margin: 10px 0 14px;
  font-size: clamp(2.2rem, 6vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.feed-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

.feed-focus-card,
.feed-composer,
.feed-card,
.feed-side-panel section {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.86), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .feed-focus-card,
[data-theme="light"] .feed-composer,
[data-theme="light"] .feed-card,
[data-theme="light"] .feed-side-panel section {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(92, 73, 40, 0.1);
}

.feed-focus-card {
  display: grid;
  gap: 8px;
  padding: 18px;
}

.feed-focus-card span,
.feed-type,
.feed-card header span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.feed-focus-card strong {
  font-size: 1.25rem;
}

.feed-focus-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

.feed-composer {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 14px;
}

.feed-composer button {
  min-height: 50px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
  padding: 0 16px;
  text-align: left;
}

.feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 18px;
  margin-top: 18px;
}

.feed-stream {
  display: grid;
  gap: 14px;
}

.feed-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.feed-card header {
  display: flex;
  align-items: center;
  gap: 12px;
}

.feed-avatar {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-weight: 800;
}

.feed-card h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.feed-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.feed-card-accent {
  border-color: rgba(223, 173, 79, 0.42);
}

.feed-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.feed-meta button {
  min-height: 34px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: rgba(223, 173, 79, 0.1);
  color: var(--text);
  padding: 0 12px;
  font-weight: 700;
}

.feed-progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 137, 151, 0.22);
}

.feed-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), var(--gold-light));
}

.feed-side-panel {
  display: grid;
  align-content: start;
  gap: 14px;
}

.feed-side-panel section {
  display: grid;
  gap: 10px;
  padding: 16px;
}

.feed-side-panel h2 {
  margin: 0;
  font-size: 1rem;
}

.feed-side-panel a {
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.feed-side-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

.home-welcome h1 {
  margin: 0;
  font-size: clamp(1.9rem, 4vw, 2.55rem);
  line-height: 1.08;
}

.home-welcome p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 1rem;
}

.home-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
  margin-top: 34px;
}

.home-stats.welcome-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  max-width: none;
}

.home-stats article,
.journey-card,
.quick-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.88), rgba(18, 28, 42, 0.82));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] .home-stats article,
[data-theme="light"] .journey-card,
[data-theme="light"] .quick-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 240, 0.82));
  box-shadow: 0 18px 46px rgba(87, 70, 42, 0.12);
}

.home-stats article {
  min-height: 142px;
  padding: 34px 22px 22px;
}

.home-stats article p {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.home-stats span,
.journey-card p,
.journey-card span,
.quick-card small {
  color: var(--muted);
  font-size: 0.88rem;
}

.home-stats strong {
  display: block;
  margin-top: 8px;
  color: var(--gold-light);
  font-size: 2rem;
  line-height: 1;
}

.kp-earned {
  margin-top: 12px;
  color: var(--gold-light) !important;
  font-weight: 800;
}

.journey-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-top: 28px;
  padding: 28px;
}

.journey-card h2 {
  margin: 0 0 22px;
  font-size: 1.18rem;
}

.journey-card p,
.journey-card span {
  display: block;
  margin: 0;
}

.journey-card strong {
  display: block;
  margin: 5px 0 12px;
  font-size: 1.35rem;
}

.journey-progress {
  position: relative;
  width: min(100%, 460px);
  height: 8px;
  margin-top: 10px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(127, 139, 156, 0.2);
}

.journey-progress span {
  position: absolute;
  inset-block: 0;
}

.journey-progress .complete {
  left: 0;
  width: 62%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
}

.journey-progress .complete.first-time {
  width: 0;
}

.journey-progress .bonus {
  left: 62%;
  width: 13%;
  background: #2c6d9f;
}

.gold-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 156px;
  min-height: 54px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-size: 0.9rem;
  font-weight: 800;
  text-decoration: none;
  box-shadow: 0 14px 28px rgba(211, 153, 47, 0.18);
}

.gold-button.disabled {
  opacity: 0.55;
  pointer-events: auto;
}

.home-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}

.quick-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  padding: 22px 28px;
  color: var(--text);
  text-decoration: none;
}

.exam-choice-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 28px;
}

.exam-choice-card {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 96px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 22px 28px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.88), rgba(18, 28, 42, 0.82));
  color: var(--text);
  text-align: left;
  text-decoration: none;
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] .exam-choice-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 240, 0.82));
  box-shadow: 0 18px 46px rgba(87, 70, 42, 0.12);
}

.exam-choice-card strong,
.exam-choice-card small {
  display: block;
}

.exam-choice-card strong {
  margin-bottom: 6px;
}

.exam-choice-card small {
  color: var(--muted);
  font-size: 0.88rem;
}

.exam-choice-card.selected {
  border-color: rgba(231, 183, 90, 0.72);
  box-shadow: 0 0 0 3px rgba(231, 183, 90, 0.1), 0 18px 46px rgba(0, 0, 0, 0.24);
}

.quick-icon {
  display: grid;
  flex: 0 0 48px;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: rgba(223, 173, 79, 0.16);
  color: var(--gold-light);
  font-size: 1.55rem;
}

.quick-card strong,
.quick-card small {
  display: block;
}

.quick-card strong {
  margin-bottom: 6px;
}

.profile-hero,
.profile-panel {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.88), rgba(18, 28, 42, 0.82));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.24);
}

[data-theme="light"] .profile-hero,
[data-theme="light"] .profile-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), rgba(255, 250, 240, 0.82));
  box-shadow: 0 18px 46px rgba(87, 70, 42, 0.12);
}

.profile-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  margin-top: 34px;
  padding: 28px;
}

.profile-avatar {
  display: grid;
  width: 82px;
  height: 82px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-size: 2rem;
  font-weight: 800;
  box-shadow: 0 16px 30px rgba(211, 153, 47, 0.16);
}

.profile-avatar.has-photo {
  background-position: center;
  background-size: cover;
}

.profile-photo-block {
  display: grid;
  justify-items: center;
  gap: 10px;
}

.photo-upload-button {
  display: inline-flex;
  min-height: 34px;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0 12px;
  background: rgba(223, 173, 79, 0.12);
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 800;
  cursor: pointer;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.profile-hero h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.04;
}

.profile-hero p:not(.eyebrow) {
  max-width: 580px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.profile-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(300px, 0.9fr);
  gap: 18px;
  margin-top: 18px;
}

.profile-grid.lower {
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
}

.profile-grid.lower.single {
  grid-template-columns: 1fr;
}

.profile-panel {
  padding: 24px;
}

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

.profile-edit-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 18px;
  border-top: 1px solid var(--panel-line);
  padding-top: 18px;
}

.profile-edit-form > div { display: grid; gap: 7px; }
.profile-edit-form small { color: var(--muted); font-size: .74rem; line-height: 1.3; }
.profile-edit-actions { display: flex !important; align-items: end; gap: 10px; }
.profile-edit-actions .gold-button, .profile-edit-actions .secondary-button { margin-top: 0; }
.profile-edit-form .form-status { grid-column: 1 / -1; margin: 0; text-align: left; }

.profile-fields-form {
  margin-top: 0;
  border-top: 0;
  padding-top: 0;
}

.profile-fields-form > div:not(.profile-edit-actions) {
  gap: 6px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 13px 14px;
  background: rgba(18, 27, 40, 0.28);
}

[data-theme="light"] .profile-fields-form > div:not(.profile-edit-actions) {
  background: rgba(255, 255, 255, 0.56);
}

.profile-fields-form label {
  color: var(--muted);
  font-size: 0.78rem;
}

.profile-fields-form input,
.profile-fields-form select {
  min-height: auto;
  border: 0;
  border-radius: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  color: var(--text);
  font-size: 1rem;
  font-weight: 700;
}

.profile-fields-form input:disabled,
.profile-fields-form select:disabled {
  cursor: default;
  opacity: 1;
  -webkit-text-fill-color: var(--text);
}

.profile-fields-form:not(.is-editing) .profile-edit-actions,
.profile-fields-form:not(.is-editing) small {
  display: none !important;
}

.profile-fields-form.is-editing > div:not(.profile-edit-actions) {
  border: 0;
  padding: 0;
  background: transparent;
}

.profile-fields-form.is-editing input,
.profile-fields-form.is-editing select {
  min-height: 44px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 0 12px;
  background: rgba(255, 255, 255, 0.04);
  font-weight: 500;
}

[data-theme="light"] .profile-fields-form.is-editing input,
[data-theme="light"] .profile-fields-form.is-editing select {
  background: rgba(255, 255, 255, 0.72);
}

.location-form > div { display: grid; gap: 7px; }
.location-form .form-status { grid-column: 1 / -1; margin: 0; }

.detail-list {
  display: grid;
  gap: 14px;
  margin: 0;
}

.detail-list div,
.setting-list div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 13px 14px;
  background: rgba(18, 27, 40, 0.28);
}

[data-theme="light"] .detail-list div,
[data-theme="light"] .setting-list div {
  background: rgba(255, 255, 255, 0.56);
}

.detail-list dt,
.setting-list span,
.profile-stats span {
  color: var(--muted);
  font-size: 0.78rem;
}

.detail-list dd {
  margin: 0;
  color: var(--text);
  font-weight: 700;
}

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

.profile-stats div {
  border: 1px solid var(--field-line);
  border-radius: 7px;
  padding: 15px;
}

.profile-stats strong {
  display: block;
  margin-top: 7px;
  color: var(--gold-light);
  font-size: 1.7rem;
}

.setting-list {
  display: grid;
  gap: 10px;
}

.setting-list strong {
  font-size: 0.95rem;
}

.achievement-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.achievement-list span {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0 14px;
  background: rgba(223, 173, 79, 0.12);
  color: var(--gold-light);
  font-size: 0.84rem;
  font-weight: 800;
}

@media (max-width: 860px) {
  .topbar,
  .dashboard-hero,
  .quiz-header,
  .exam-card {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar,
  .quiz-header,
  .exam-card {
    display: flex;
  }

  .dashboard-hero,
  .content-grid {
    grid-template-columns: 1fr;
  }

  .exam-portal-hero { grid-template-columns: 1fr; }
  .exam-hub-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .syllabus-layout { grid-template-columns: 1fr; }
  .syllabus-grid { grid-template-columns: 1fr; }

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

  .main-nav {
    width: 100%;
    justify-content: space-between;
  }
}

@media (max-width: 620px) {
  .app-shell {
    padding: 14px;
  }

  .dashboard-hero,
  .page-heading,
  .result-card {
    padding: 26px;
  }

  .stat-grid,
    .exam-grid,
    .exam-hub-grid,
    .syllabus-summary,
    .topic-list,
    .option-grid,
    .rule-grid,
    .rankings-filter,
    .two-column-fields {
    grid-template-columns: 1fr;
  }

  .syllabus-toolbar,
  .syllabus-card-head {
    align-items: stretch;
    flex-direction: column;
  }

  .syllabus-toolbar,
  .syllabus-card-head {
    display: flex;
  }

  .rank-row {
    grid-template-columns: 1fr;
  }

  .home-layout {
    grid-template-columns: 1fr;
  }

  .side-rail {
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: auto;
    gap: 12px;
    padding: 14px 16px;
    border-right: 0;
    border-bottom: 1px solid var(--panel-line);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.12);
  }

  .rail-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .rail-brand {
    min-width: 0;
    padding: 0;
  }

  .rail-brand span:last-child {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .rail-mobile-actions {
    display: flex;
    align-items: center;
    flex: 0 0 auto;
    gap: 10px;
  }

  .rail-mobile-avatar {
    display: grid;
    width: 38px;
    height: 38px;
    text-decoration: none;
  }

  .rail-menu-toggle {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    width: 42px;
    height: 38px;
    border: 1px solid var(--field-line);
    border-radius: 7px;
    background: rgba(223, 173, 79, 0.12);
    cursor: pointer;
  }

  .rail-menu-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: var(--gold-light);
  }

  .rail-menu-panel {
    display: none;
    gap: 12px;
    padding-top: 10px;
  }

  .side-rail.is-open .rail-menu-panel {
    display: grid;
  }

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

  .rail-nav.account {
    margin-top: 0;
  }

  .home-main {
    padding: 22px 16px 32px;
  }

  .home-topbar {
    display: none;
  }

  .simple-hero {
    max-width: 100%;
    margin-top: 14px;
  }

  .simple-hero h1 {
    font-size: clamp(2.25rem, 11vw, 3.2rem);
  }

  .simple-hero p:not(.eyebrow) {
    max-width: 100%;
    font-size: 1rem;
    line-height: 1.55;
  }

  .quiz-promo {
    align-items: stretch;
    flex-direction: column;
    min-height: 0;
    gap: 18px;
    margin-top: 16px;
    padding: 20px;
  }

  .quiz-promo-button {
    width: 100%;
  }

  .public-home-grid,
  .public-link-grid {
    grid-template-columns: 1fr;
  }

  .share-strip {
    align-items: center;
    flex-direction: row;
    overflow: hidden;
  }

  .share-strip div {
    display: flex;
    flex-wrap: nowrap;
    justify-content: flex-start;
    min-width: 0;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .share-strip a,
  .share-strip button {
    flex: 0 0 auto;
    justify-content: center;
  }

  .public-join-card .action-row {
    justify-content: stretch;
  }

  .home-stats,
  .home-stats.welcome-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin-top: 24px;
  }

  .home-stats article {
    min-height: 132px;
    padding: 18px 14px;
  }

  .home-stats span {
    font-size: 0.78rem;
    line-height: 1.35;
  }

  .home-stats strong {
    font-size: 1.75rem;
  }

  .home-stats article p {
    font-size: 0.72rem;
    line-height: 1.35;
  }

  .profile-hero,
  .profile-grid,
  .profile-grid.lower {
    grid-template-columns: 1fr;
  }

  .location-form { grid-template-columns: 1fr; }
  .profile-edit-form { grid-template-columns: 1fr; }

  .profile-hero {
    align-items: start;
  }

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

  .quiz-actions,
  .action-row {
    flex-direction: column;
  }

  .primary-button.inline,
  .secondary-button,
  .gold-button {
    width: 100%;
  }
}

@media (max-width: 480px) {
  .rail-nav {
    grid-template-columns: 1fr;
  }

  .home-stats,
  .home-stats.welcome-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .simple-hero {
    max-width: 100%;
    margin-top: 10px;
  }

  .simple-hero h1 {
    font-size: 2.45rem;
  }

  .quiz-promo {
    padding: 18px 16px;
  }

  .quiz-promo strong {
    font-size: 1.45rem;
  }

  .quiz-promo-button {
    min-height: 56px;
  }

  .home-stats article {
    min-height: 124px;
    padding: 16px 12px;
  }

  .home-stats strong {
    font-size: 1.55rem;
  }

  .profile-stats {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .learner-feed-main {
    width: 100%;
  }

  .feed-hero,
  .feed-layout {
    grid-template-columns: 1fr;
  }

  .feed-hero {
    padding-top: 18px;
  }

  .feed-hero h1 {
    font-size: 2.55rem;
  }

  .feed-composer {
    grid-template-columns: 42px minmax(0, 1fr);
  }

  .feed-composer .feed-avatar {
    width: 42px;
    height: 42px;
  }

  .feed-side-panel {
    order: -1;
  }
}

.social-feed-main {
  width: min(100%, 1160px);
}

.social-feed-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: end;
  gap: 24px;
  padding-top: 34px;
}

.social-feed-hero h1 {
  margin: 10px 0 12px;
  font-size: clamp(2.4rem, 6.2vw, 5.1rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.social-feed-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.06rem;
  line-height: 1.7;
}

.social-daily-card,
.social-composer,
.social-card,
.social-side-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.07), transparent 42%),
    linear-gradient(145deg, rgba(23, 35, 52, 0.9), var(--panel));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.17);
}

[data-theme="light"] .social-daily-card,
[data-theme="light"] .social-composer,
[data-theme="light"] .social-card,
[data-theme="light"] .social-side-card {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.3) 42%),
    linear-gradient(145deg, rgba(255, 252, 245, 0.96), rgba(248, 241, 227, 0.92));
  box-shadow: 0 18px 46px rgba(101, 80, 44, 0.11);
}

.social-daily-card {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-color: rgba(56, 143, 137, 0.35);
}

.social-daily-card span,
.social-card-head span,
.social-card-head small,
.social-pill {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.social-daily-card strong {
  font-size: 1.25rem;
}

.social-daily-card p {
  font-size: 0.9rem;
}

.social-composer {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  margin-top: 24px;
  padding: 14px;
}

.social-avatar {
  display: grid;
  width: 44px;
  height: 44px;
  flex: 0 0 auto;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-weight: 900;
}

.social-avatar.large {
  width: 54px;
  height: 54px;
}

.social-avatar.teal { background: linear-gradient(135deg, #82c8bc, #2c817d); color: #061c1a; }
.social-avatar.amber { background: linear-gradient(135deg, #f2c76e, #c77d1f); color: #201307; }
.social-avatar.violet { background: linear-gradient(135deg, #b9a7ef, #6b59b2); color: #150f28; }

.social-composer-box {
  display: grid;
  gap: 10px;
}

.social-composer-box button {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--muted);
  padding: 0 14px;
  text-align: left;
}

.social-compose-actions,
.social-actions,
.social-score-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.social-compose-actions span,
.social-actions button,
.social-pill {
  min-height: 32px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: rgba(223, 173, 79, 0.1);
  color: var(--text);
  padding: 7px 12px;
  font-weight: 800;
}

.social-actions button {
  cursor: pointer;
}

.social-feed-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  margin-top: 18px;
}

.social-stream,
.social-side-stack {
  display: grid;
  align-content: start;
  gap: 14px;
}

.social-card {
  display: grid;
  gap: 14px;
  padding: 18px;
}

.social-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
}

.social-card-head div:nth-child(2) {
  min-width: 0;
  flex: 1;
}

.social-card h2 {
  margin: 0;
  font-size: 1.45rem;
  letter-spacing: 0;
}

.social-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.social-note-preview,
.article-visual {
  display: grid;
  min-height: 132px;
  gap: 8px;
  border: 1px solid rgba(56, 143, 137, 0.28);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(56, 143, 137, 0.16), transparent 55%),
    linear-gradient(145deg, rgba(223, 173, 79, 0.1), rgba(111, 95, 178, 0.08));
}

.social-note-preview span,
.article-visual span {
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.social-note-preview strong,
.article-visual strong {
  font-size: 1.25rem;
}

.opportunity-card {
  border-color: rgba(199, 125, 31, 0.36);
}

.article-card {
  border-color: rgba(111, 95, 178, 0.34);
}

.article-visual {
  min-height: 150px;
  align-content: end;
  background:
    linear-gradient(135deg, rgba(111, 95, 178, 0.18), transparent 46%),
    linear-gradient(145deg, rgba(44, 129, 125, 0.2), rgba(223, 173, 79, 0.13));
}

.social-score-strip span {
  flex: 1 1 130px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 12px;
  color: var(--muted);
}

.social-score-strip strong {
  display: block;
  color: var(--gold-light);
  font-size: 1.35rem;
}

.social-side-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.social-side-card h2 {
  margin: 0;
  font-size: 1rem;
}

.social-side-card a,
.mood-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
  font-weight: 800;
}

.social-side-card a span,
.mood-row span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(56, 143, 137, 0.18);
  color: #82c8bc;
}

.social-side-card small,
.mood-row small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
}

.mood-row {
  grid-template-columns: 34px minmax(0, 1fr);
}

.mood-row span {
  background: linear-gradient(135deg, #82c8bc, #f2c76e);
}

.social-side-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.6;
}

@media (max-width: 820px) {
  .social-feed-main {
    width: 100%;
  }

  .social-feed-hero,
  .social-feed-layout {
    grid-template-columns: 1fr;
  }

  .social-feed-hero {
    padding-top: 18px;
  }

  .social-feed-hero h1 {
    font-size: 2.65rem;
  }

  .social-side-stack {
    order: -1;
  }
}

@media (max-width: 520px) {
  .social-composer {
    grid-template-columns: 1fr;
  }

  .social-card-head {
    align-items: flex-start;
  }

  .social-card-head small {
    display: none;
  }
}

.community-rail .rail-brand {
  margin-bottom: 4px;
}

.community-nav a {
  min-height: 42px;
}

.community-nav a span {
  border-radius: 50%;
  background: rgba(223, 173, 79, 0.09);
}

.community-menu-main {
  width: min(100%, 1120px);
}

.community-menu-hero {
  padding-top: 42px;
}

.community-menu-hero h1 {
  max-width: 860px;
  margin: 10px 0 14px;
  font-size: clamp(2.3rem, 5.8vw, 4.7rem);
  line-height: 0.98;
  letter-spacing: 0;
}

.community-menu-hero p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  font-size: 1.04rem;
  line-height: 1.7;
}

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

.community-menu-card,
.community-home-preview {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(25, 36, 52, 0.86), var(--panel));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .community-menu-card,
[data-theme="light"] .community-home-preview {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 250, 240, 0.92));
  box-shadow: 0 18px 46px rgba(101, 80, 44, 0.1);
}

.community-menu-card {
  display: grid;
  align-content: start;
  min-height: 178px;
  gap: 10px;
  padding: 16px;
}

.community-menu-card.primary {
  border-color: rgba(56, 143, 137, 0.38);
}

.community-menu-card.quiet {
  opacity: 0.9;
}

.community-menu-card span {
  color: var(--gold-light);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.community-menu-card h2,
.community-home-preview h2 {
  margin: 0;
  font-size: 1.28rem;
  letter-spacing: 0;
}

.community-menu-card p,
.community-home-preview p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.58;
}

.community-home-preview {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
  margin-top: 18px;
  padding: 20px;
}

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

.community-preview-list span {
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: var(--field);
  padding: 11px 12px;
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 800;
}

@media (max-width: 980px) {
  .community-menu-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .community-home-preview {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .community-menu-main {
    width: 100%;
  }

  .community-menu-hero {
    padding-top: 18px;
  }

  .community-menu-hero h1 {
    font-size: 2.45rem;
  }

  .community-menu-grid {
    grid-template-columns: 1fr;
  }
}

.ideal-home-main {
  width: min(100%, 1160px);
}

.ideal-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: end;
  gap: 24px;
  padding-top: 32px;
}

.ideal-hero h1 {
  max-width: 820px;
  margin: 10px 0 12px;
  font-size: clamp(2.5rem, 6.4vw, 5.2rem);
  line-height: 0.96;
  letter-spacing: 0;
}

.ideal-hero p {
  max-width: 720px;
  margin: 0;
  color: var(--muted);
  font-size: 1.07rem;
  line-height: 1.68;
}

.ideal-focus,
.ideal-action-card,
.ideal-panel {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.06), transparent 40%),
    linear-gradient(145deg, rgba(24, 36, 52, 0.9), var(--panel));
  box-shadow: 0 18px 46px rgba(0, 0, 0, 0.16);
}

[data-theme="light"] .ideal-focus,
[data-theme="light"] .ideal-action-card,
[data-theme="light"] .ideal-panel {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.86), rgba(255, 255, 255, 0.24) 42%),
    linear-gradient(145deg, rgba(255, 252, 245, 0.97), rgba(247, 239, 224, 0.92));
  box-shadow: 0 18px 46px rgba(100, 80, 44, 0.1);
}

.ideal-focus {
  display: grid;
  gap: 8px;
  padding: 18px;
  border-color: rgba(56, 143, 137, 0.34);
}

.ideal-focus span,
.ideal-action-card span,
.ideal-visual-panel span {
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.ideal-focus strong {
  font-size: 1.42rem;
}

.ideal-focus p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.55;
}

.ideal-action-strip {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 12px;
  margin-top: 24px;
}

.ideal-action-card {
  display: grid;
  gap: 8px;
  min-height: 128px;
  padding: 16px;
  color: var(--text);
  text-decoration: none;
}

.ideal-action-card.primary {
  border-color: rgba(56, 143, 137, 0.42);
}

.ideal-action-card strong {
  font-size: 1.15rem;
  line-height: 1.25;
}

.ideal-action-card small {
  color: var(--muted);
  line-height: 1.45;
}

.ideal-home-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 310px;
  gap: 18px;
  margin-top: 18px;
}

.ideal-main-column,
.ideal-side-column {
  display: grid;
  align-content: start;
  gap: 14px;
}

.ideal-panel {
  padding: 18px;
}

.ideal-panel h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.ideal-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.62;
}

.ideal-learning-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  gap: 18px;
  align-items: center;
}

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

.ideal-stat-grid span {
  min-height: 82px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  padding: 12px;
  color: var(--muted);
  font-size: 0.82rem;
}

.ideal-stat-grid strong {
  display: block;
  color: var(--gold-light);
  font-size: 1.45rem;
}

.ideal-section-head {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.ideal-section-head a,
.ideal-small-button,
.ideal-visual-panel a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: rgba(223, 173, 79, 0.12);
  color: var(--text);
  padding: 0 12px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.ideal-update-list,
.ideal-circle-list {
  display: grid;
  gap: 8px;
}

.ideal-update-list a {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  color: var(--text);
  padding: 12px;
  text-decoration: none;
}

.ideal-update-list strong {
  font-size: 0.92rem;
}

.ideal-update-list small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.ideal-dot {
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gold-light);
}

.ideal-dot.teal { background: #2c817d; }
.ideal-dot.amber { background: #c77d1f; }
.ideal-dot.violet { background: #6b59b2; }

.ideal-visual-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 18px;
  min-height: 210px;
  border-color: rgba(111, 95, 178, 0.32);
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.2), transparent 45%),
    linear-gradient(145deg, rgba(111, 95, 178, 0.18), rgba(223, 173, 79, 0.11));
}

[data-theme="light"] .ideal-visual-panel {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.14), transparent 45%),
    linear-gradient(145deg, rgba(111, 95, 178, 0.13), rgba(223, 173, 79, 0.12));
}

.ideal-visual-panel h2 {
  max-width: 640px;
  margin: 8px 0 10px;
  font-size: 1.75rem;
}

.ideal-panel.compact {
  display: grid;
  gap: 10px;
}

.ideal-panel.compact h2 {
  font-size: 1.05rem;
}

.ideal-panel.compact.muted {
  border-color: rgba(223, 173, 79, 0.28);
}

.ideal-circle-list a {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: var(--field);
  color: var(--text);
  padding: 10px 11px;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 800;
}

.ideal-circle-list small {
  color: var(--muted);
}

.feed-home-grid {
  align-items: start;
}

.feed-main-column {
  gap: 12px;
}

.feed-tabs {
  position: sticky;
  top: 12px;
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 10px;
  background: rgba(13, 22, 35, 0.88);
  backdrop-filter: blur(12px);
}

[data-theme="light"] .feed-tabs {
  background: rgba(255, 250, 240, 0.9);
}

.feed-tabs button,
.feed-item-actions a,
.feed-item-actions button {
  min-height: 34px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  padding: 0 13px;
  font-size: 0.82rem;
  font-weight: 900;
  text-decoration: none;
}

.feed-tabs button.active,
.feed-item-actions a {
  background: rgba(223, 173, 79, 0.14);
  color: var(--gold-light);
}

.feed-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr);
  gap: 14px;
  padding: 16px;
}

.feed-quiz-item {
  border-color: rgba(56, 143, 137, 0.38);
}

.feed-article-item {
  border-color: rgba(111, 95, 178, 0.34);
}

.feed-item-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--gold-light), var(--gold));
  color: #17120b;
  font-weight: 900;
}

.feed-item-icon.teal { background: linear-gradient(135deg, #82c8bc, #2c817d); color: #061c1a; }
.feed-item-icon.amber { background: linear-gradient(135deg, #f2c76e, #c77d1f); color: #201307; }
.feed-item-icon.violet { background: linear-gradient(135deg, #b9a7ef, #6b59b2); color: #150f28; }

.feed-item-body {
  display: grid;
  gap: 10px;
  min-width: 0;
}

.feed-item-meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.feed-item-meta span {
  color: var(--gold-light);
  font-size: 0.74rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feed-item-meta small {
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.feed-item h2 {
  margin: 0;
  font-size: 1.35rem;
  letter-spacing: 0;
}

.feed-item p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

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

.compact-feed-stats span {
  min-height: 70px;
}

.feed-note-preview,
.feed-cover-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.13), transparent 56%),
    var(--field);
  padding: 14px;
}

.feed-note-preview strong,
.feed-cover-card strong {
  color: var(--text);
}

.feed-note-preview span,
.feed-cover-card span {
  color: var(--muted);
  font-size: 0.82rem;
}

.feed-cover-card {
  min-height: 118px;
  align-content: end;
  background:
    linear-gradient(135deg, rgba(111, 95, 178, 0.16), transparent 48%),
    linear-gradient(145deg, rgba(44, 129, 125, 0.16), rgba(223, 173, 79, 0.11));
}

.feed-cover-card span {
  color: var(--gold-light);
  font-size: 0.76rem;
  font-weight: 900;
  text-transform: uppercase;
}

.feed-cover-card strong {
  font-size: 1.2rem;
}

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

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

.feed-mix-list span {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  border: 1px solid var(--field-line);
  border-radius: 7px;
  background: var(--field);
  padding: 10px 11px;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 800;
}

.feed-mix-list strong {
  color: var(--gold-light);
}

@media (max-width: 960px) {
  .ideal-action-strip,
  .ideal-home-grid,
  .ideal-learning-panel {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 760px) {
  .ideal-home-main {
    width: 100%;
  }

  .ideal-hero {
    grid-template-columns: 1fr;
    padding-top: 18px;
  }

  .ideal-hero h1 {
    font-size: 2.55rem;
  }

  .ideal-update-list a {
    grid-template-columns: 12px minmax(0, 1fr);
  }

  .ideal-update-list small {
    grid-column: 2;
  }

  .ideal-visual-panel {
    grid-template-columns: 1fr;
  }

  .feed-tabs {
    position: static;
  }
}

@media (max-width: 460px) {
  .ideal-stat-grid {
    grid-template-columns: 1fr;
  }

  .feed-item {
    grid-template-columns: 1fr;
  }

  .compact-feed-stats {
    grid-template-columns: 1fr;
  }

  .feed-item-meta {
    align-items: start;
    flex-direction: column;
  }
}

.public-workspace {
  padding-bottom: 42px;
}

.opportunity-board {
  display: grid;
  gap: 12px;
  margin-bottom: 12px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 18px;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(31, 43, 62, 0.88), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .opportunity-board {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.09), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.1);
}

.opportunity-board-head {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 330px);
  align-items: end;
  gap: 18px;
}

.opportunity-board h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1;
}

.opportunity-board p:not(.eyebrow) {
  max-width: 670px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.58;
}

.opportunity-summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.opportunity-summary-grid span {
  min-height: 72px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 10px;
  background: var(--field);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.opportunity-summary-grid strong {
  display: block;
  color: var(--gold-light);
  font-size: 1.65rem;
  line-height: 1.05;
}

.opportunity-filter-bar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(150px, 190px) minmax(150px, 190px) auto auto;
  align-items: end;
  gap: 10px;
  border-top: 1px solid var(--panel-line);
  padding-top: 12px;
}

.opportunity-filter-bar label {
  display: grid;
  gap: 6px;
}

.opportunity-filter-bar label span {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opportunity-filter-bar input,
.opportunity-filter-bar select {
  min-height: 40px;
  padding: 0 12px;
}

.opportunity-filter-bar .gold-button.inline,
.opportunity-filter-bar .secondary-button {
  min-height: 40px;
}

.compact-link {
  min-width: 86px;
  padding: 0 14px;
}

.opportunity-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-bottom: 10px;
  overflow: hidden;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.16), transparent 44%),
    linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
}

[data-theme="light"] .opportunity-hero {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--panel));
}

.opportunity-hero.compact {
  padding: 24px 28px;
}

.opportunity-hero.compact h1 {
  max-width: 720px;
  font-size: clamp(2rem, 4.4vw, 3.55rem);
}

.opportunity-hero-copy p:not(.eyebrow) {
  max-width: 680px;
  margin-bottom: 0;
}

.opportunity-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.opportunity-detail-card {
  display: grid;
  gap: 6px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 12px;
  background: rgba(223, 173, 79, 0.09);
}

.opportunity-detail-card span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
}

.opportunity-detail-card strong {
  color: var(--gold-light);
  font-size: 1.72rem;
  line-height: 1;
}

.opportunity-detail-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
}

.opportunity-detail-board {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 236px;
  align-items: stretch;
  gap: 10px;
  margin-bottom: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.11), transparent 44%),
    linear-gradient(145deg, rgba(31, 43, 62, 0.88), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .opportunity-detail-board {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.08), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.1);
}

.opportunity-detail-copy {
  display: grid;
  align-content: center;
  min-width: 0;
}

.opportunity-detail-board h1 {
  max-width: 780px;
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.55rem);
  line-height: 1.04;
  letter-spacing: 0;
}

.opportunity-detail-board p:not(.eyebrow) {
  max-width: 720px;
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.opportunity-fact-strip {
  grid-column: 1;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.opportunity-fact-strip span {
  display: grid;
  gap: 4px;
  min-height: 52px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--field);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 800;
}

.opportunity-fact-strip strong {
  color: var(--gold-light);
  font-size: 0.68rem;
  text-transform: uppercase;
}

.opportunity-detail-board .opportunity-detail-card {
  grid-column: 2;
  grid-row: 1 / span 2;
  align-content: center;
  background:
    linear-gradient(145deg, rgba(223, 173, 79, 0.13), rgba(44, 129, 125, 0.07));
}

.opportunity-detail-board .opportunity-detail-card strong {
  font-size: 1.72rem;
}

.opportunity-info-panel {
  display: grid;
  align-content: start;
  gap: 6px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  min-height: 104px;
  padding: 12px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.12);
}

[data-theme="light"] .opportunity-info-panel {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.09);
}

.opportunity-info-panel h2 {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.25;
  letter-spacing: 0;
}

.opportunity-info-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.opportunity-count {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0 12px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.opportunity-trust-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 10px;
}

.opportunity-trust-strip span {
  border: 1px solid var(--panel-line);
  border-radius: 999px;
  padding: 7px 11px;
  background: var(--panel);
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.opportunity-list {
  display: grid;
  gap: 10px;
}

.opportunity-card {
  display: grid;
  grid-template-columns: 90px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 14px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.opportunity-card-body {
  display: grid;
  gap: 9px;
  min-width: 0;
}

.opportunity-date-tile {
  display: grid;
  min-height: 72px;
  place-items: center;
  align-content: center;
  border: 1px solid rgba(223, 173, 79, 0.35);
  border-radius: 8px;
  background:
    linear-gradient(145deg, rgba(223, 173, 79, 0.18), rgba(44, 129, 125, 0.1));
  text-align: center;
}

.opportunity-date-tile span {
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opportunity-date-tile strong {
  color: var(--gold-light);
  font-size: 1.35rem;
}

.opportunity-date-tile small {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 900;
}

.opportunity-date-tile.is-urgent,
.opportunity-detail-card.is-urgent {
  border-color: rgba(204, 74, 59, 0.48);
  background: linear-gradient(145deg, rgba(204, 74, 59, 0.12), var(--field));
}

.opportunity-date-tile.is-soon,
.opportunity-detail-card.is-soon {
  border-color: rgba(199, 125, 31, 0.5);
  background: linear-gradient(145deg, rgba(199, 125, 31, 0.14), var(--field));
}

.opportunity-date-tile.is-open,
.opportunity-detail-card.is-open {
  border-color: rgba(44, 129, 125, 0.42);
}

.opportunity-card-actions {
  display: flex;
  justify-content: flex-end;
}

[data-theme="light"] .opportunity-card {
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.88), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.1);
}

.opportunity-card-top,
.opportunity-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.opportunity-card-top > span:last-child,
.opportunity-meta span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.opportunity-card-top .verified-source {
  color: #2c817d;
  font-weight: 900;
}

.opportunity-card h2 {
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.25;
}

.opportunity-card p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.opportunity-primary-meta span {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  background: var(--field);
  padding: 7px 11px;
  color: var(--text);
  font-weight: 900;
}

.opportunity-key-points {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.opportunity-key-points span,
.opportunity-priority-strip article {
  display: grid;
  gap: 4px;
  min-width: 0;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  padding: 9px 10px;
}

.opportunity-key-points strong,
.opportunity-priority-strip span {
  color: var(--gold-light);
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opportunity-key-points span {
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.35;
}

.opportunity-detail {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 270px;
  align-items: end;
  gap: 24px;
}

.opportunity-detail .opportunity-meta.detail {
  margin-top: 18px;
}

.opportunity-detail-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.opportunity-priority-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.opportunity-priority-strip article {
  align-content: start;
}

.opportunity-priority-strip strong {
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.opportunity-priority-strip small {
  color: var(--muted);
  font-weight: 800;
}

.opportunity-detail-grid.refined .action-row {
  margin-top: 4px;
}

.opportunity-after-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(280px, 0.92fr);
  gap: 10px;
  margin-top: 10px;
}

.opportunity-next-panel,
.opportunity-related-panel {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.09), transparent 52%),
    linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .opportunity-next-panel,
[data-theme="light"] .opportunity-related-panel {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.07), transparent 52%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.88), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.08);
}

.opportunity-next-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 230px;
  align-items: center;
  gap: 10px;
}

.opportunity-next-panel h2,
.opportunity-related-panel h2 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.25;
}

.opportunity-next-panel p,
.opportunity-related-panel p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.opportunity-check-list,
.opportunity-related-list {
  display: grid;
  gap: 8px;
}

.opportunity-check-list span,
.opportunity-related-list a {
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  padding: 8px 10px;
}

.opportunity-check-list span {
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 800;
}

.opportunity-prep-links a {
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  padding: 10px;
  color: var(--gold-light);
  font-size: 0.86rem;
  font-weight: 900;
  text-decoration: none;
}

.opportunity-hub-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 18px;
  margin-top: 16px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
  padding: 18px;
}

[data-theme="light"] .opportunity-hub-strip {
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 18px 42px rgba(87, 70, 42, 0.08);
}

.opportunity-hub-strip h2 {
  margin: 0;
  font-size: 1.18rem;
}

.opportunity-hub-strip p:not(.eyebrow) {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.opportunity-hub-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.opportunity-hub-actions a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 0 12px;
  background: var(--field);
  color: var(--gold-light);
  font-size: 0.84rem;
  font-weight: 900;
  text-decoration: none;
}

.opportunity-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
}

.opportunity-section-head a {
  color: var(--gold-light);
  font-size: 0.82rem;
  font-weight: 800;
  text-decoration: none;
}

.opportunity-related-list a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  color: var(--text);
  text-decoration: none;
}

.opportunity-related-list span {
  border-radius: 999px;
  background: rgba(223, 173, 79, 0.13);
  color: var(--gold-light);
  padding: 5px 8px;
  font-size: 0.68rem;
  font-weight: 900;
  text-transform: uppercase;
}

.opportunity-related-list strong {
  overflow: hidden;
  font-size: 0.9rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.opportunity-related-list small {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.book-share-main {
  width: min(100%, 1080px);
}

.book-share-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px;
  align-items: end;
  gap: 18px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  padding: 28px;
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.14), transparent 48%),
    linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

[data-theme="light"] .book-share-hero,
[data-theme="light"] .book-offer-form,
[data-theme="light"] .book-share-panel,
[data-theme="light"] .book-shelf-section,
[data-theme="light"] .book-card {
  background:
    linear-gradient(135deg, rgba(44, 129, 125, 0.08), transparent 48%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(87, 70, 42, 0.1);
}

.book-share-hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(2rem, 4.5vw, 3.35rem);
  line-height: 1.02;
}

.book-share-hero p:not(.eyebrow) {
  max-width: 720px;
  margin: 12px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.book-share-score {
  display: grid;
  align-content: center;
  min-height: 150px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 18px;
  background: var(--field);
}

.book-share-score span,
.book-share-score small {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.book-share-score strong {
  color: var(--gold-light);
  font-size: 3.25rem;
  line-height: 1;
}

.book-share-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 14px;
  margin-top: 14px;
}

.book-offer-form,
.book-share-panel,
.book-shelf-section,
.book-card {
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: linear-gradient(145deg, rgba(31, 43, 62, 0.9), var(--panel));
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.14);
}

.book-offer-form,
.book-share-panel,
.book-shelf-section {
  padding: 18px;
}

.book-offer-form {
  display: grid;
  gap: 12px;
}

.book-login-panel {
  align-content: center;
}

.book-login-panel p {
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.book-login-panel .action-row {
  margin-top: 10px;
}

.book-offer-form label {
  display: grid;
  gap: 7px;
}

.book-share-steps {
  display: grid;
  gap: 10px;
}

.book-share-steps article {
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  gap: 6px 10px;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  padding: 12px;
  background: var(--field);
}

.book-share-steps span {
  grid-row: 1 / span 2;
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  background: rgba(223, 173, 79, 0.16);
  color: var(--gold-light);
  font-weight: 900;
}

.book-share-steps strong {
  color: var(--text);
}

.book-share-steps p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.book-shelf-section {
  margin-top: 14px;
}

.book-shelf-toolbar {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.book-shelf-toolbar h2 {
  margin: 0;
  font-size: 1.35rem;
}

.book-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.book-tabs button {
  min-height: 36px;
  border: 1px solid var(--field-line);
  border-radius: 999px;
  padding: 0 12px;
  background: var(--field);
  color: var(--muted);
  font-weight: 800;
}

.book-tabs button.active {
  border-color: rgba(223, 173, 79, 0.4);
  background: rgba(223, 173, 79, 0.15);
  color: var(--gold-light);
}

.book-shelf {
  display: grid;
  gap: 10px;
}

.book-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px;
}

.book-card-top {
  display: flex;
  justify-content: space-between;
  gap: 10px;
}

.book-status {
  border-radius: 999px;
  background: rgba(44, 129, 125, 0.14);
  color: #82c8bc;
  padding: 5px 9px;
  font-size: 0.7rem;
  font-weight: 900;
  text-transform: uppercase;
}

.book-card.is-claimed .book-status {
  background: rgba(223, 173, 79, 0.15);
  color: var(--gold-light);
}

.book-card.is-shared .book-status {
  background: rgba(127, 139, 156, 0.14);
  color: var(--muted);
}

.book-card h3 {
  margin: 8px 0;
  font-size: 1.18rem;
  line-height: 1.25;
}

.book-card p,
.book-card small {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.book-note {
  margin-top: 8px !important;
  border: 1px solid var(--field-line);
  border-radius: 8px;
  background: var(--field);
  padding: 9px 10px;
  color: var(--text) !important;
  font-size: 0.86rem;
}

.book-card-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.opportunity-detail-ad {
  min-height: 96px;
  margin-top: 10px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--panel);
}

.gold-button.inline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 42px;
  border-radius: 7px;
  padding: 0 16px;
  color: #17120b;
  text-decoration: none;
}

@media (max-width: 680px) {
  .opportunity-detail-grid {
    grid-template-columns: 1fr;
  }

  .opportunity-board,
  .opportunity-board-head,
  .opportunity-filter-bar,
  .opportunity-detail-board,
  .opportunity-fact-strip,
  .opportunity-after-grid,
  .opportunity-hub-strip,
  .opportunity-next-panel,
  .opportunity-summary-grid,
  .opportunity-key-points,
  .opportunity-priority-strip {
    grid-template-columns: 1fr;
  }

  .opportunity-detail-board {
    padding: 14px;
  }

  .opportunity-detail-board h1 {
    font-size: 1.9rem;
  }

  .opportunity-detail-board .opportunity-detail-card {
    grid-column: auto;
    grid-row: auto;
  }

  .opportunity-board {
    padding: 14px;
  }

  .opportunity-hero,
  .opportunity-detail,
  .opportunity-card,
  .opportunity-trust-strip {
    grid-template-columns: 1fr;
  }

  .opportunity-hero-actions {
    justify-content: flex-start;
  }

  .opportunity-hub-actions {
    justify-content: flex-start;
  }

  .opportunity-card-actions {
    justify-content: flex-start;
  }

  .opportunity-related-list a {
    grid-template-columns: 1fr;
  }

  .book-share-hero,
  .book-share-grid,
  .book-card {
    grid-template-columns: 1fr;
  }

  .book-share-hero,
  .book-offer-form,
  .book-share-panel,
  .book-shelf-section {
    padding: 14px;
  }

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

  .book-tabs {
    display: grid;
    grid-template-columns: 1fr;
  }

  .book-card-actions {
    justify-content: stretch;
  }

  .book-card-actions .gold-button,
  .book-card-actions .secondary-button {
    width: 100%;
  }
}

@media (min-width: 681px) and (max-width: 1100px) {
  .opportunity-detail-grid,
  .opportunity-priority-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
