:root {
  --navy: #071d3b;
  --navy-2: #0e2b52;
  --gold: #c9a14a;
  --gold-2: #f4e7c8;
  --ivory: #fbf8f1;
  --paper: #fffdf8;
  --parchment: #eee4d1;
  --text: #10203d;
  --muted: #667085;
  --line: rgba(7, 29, 59, 0.1);
  --green: #12805c;
  --red: #b5473d;
  --shadow: 0 24px 70px rgba(7, 29, 59, 0.11);
  --radius-lg: 28px;
  --radius-md: 18px;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

html {
  min-height: 100%;
  background: var(--ivory);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  font-family: "Plus Jakarta Sans", system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  background:
    radial-gradient(circle at 92% 8%, rgba(201, 161, 74, 0.18), transparent 26rem),
    radial-gradient(circle at 4% 84%, rgba(238, 228, 209, 0.82), transparent 30rem),
    linear-gradient(135deg, #fffdf8 0%, var(--ivory) 58%, #f6efe2 100%);
}

button,
input {
  font: inherit;
}

.hidden {
  display: none !important;
}

.page-shell {
  width: min(100%, 1220px);
  min-height: 100vh;
  margin: 0 auto;
  padding: 28px 18px 54px;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 38px;
  padding: 14px 16px;
  background: rgba(255, 253, 248, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.74);
  border-radius: 24px;
  box-shadow: 0 18px 55px rgba(7, 29, 59, 0.06);
  backdrop-filter: blur(16px);
}

.wordmark {
  color: var(--navy);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.055em;
  line-height: 1.1;
}

.assessment-label,
.eyebrow {
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.13em;
  text-transform: uppercase;
}

.header-actions,
.action-pair {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.intro {
  max-width: 760px;
  margin-bottom: 30px;
}

.premium-hero {
  display: grid;
  gap: 8px;
  max-width: 820px;
}

h1,
h2,
h3 {
  color: var(--navy);
  font-family: "Sora", system-ui, sans-serif;
  letter-spacing: -0.055em;
  line-height: 1.12;
}

h1 {
  margin: 0 0 12px;
  font-size: clamp(38px, 7vw, 68px);
}

h2,
h3 {
  margin: 0;
}

.intro p,
.muted {
  max-width: 650px;
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.75;
}

.panel,
.form-section,
.demo-banner {
  background: rgba(255, 253, 248, 0.82);
  border: 1px solid rgba(255, 255, 255, 0.78);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
}

.panel,
.form-section {
  padding: 26px;
}

.demo-banner {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
  padding: 13px 15px;
}

.demo-banner span {
  flex: 0 0 auto;
  color: var(--navy);
  background: var(--gold-2);
  border-radius: 999px;
  padding: 5px 11px;
  font-size: 11px;
  font-weight: 800;
}

.demo-banner p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.assessment-form,
.stack {
  display: grid;
  gap: 22px;
}

.section-heading-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

.section-title {
  color: var(--navy);
  font-size: 17px;
  font-weight: 700;
}

.selection-counter {
  margin: 0;
  color: var(--gold);
  font-size: 12px;
  font-weight: 800;
  white-space: nowrap;
}

.fields {
  display: grid;
  gap: 16px;
}

.field {
  display: grid;
  gap: 7px;
}

label {
  color: var(--text);
  font-size: 13px;
  font-weight: 800;
}

input {
  width: 100%;
  min-height: 54px;
  padding: 15px 16px;
  color: var(--text);
  background: #fffaf0;
  border: 1px solid transparent;
  border-radius: 15px;
  outline: none;
  transition: border-color 180ms ease, box-shadow 180ms ease, background 180ms ease;
}

input:focus {
  background: var(--paper);
  border-color: rgba(201, 161, 74, 0.7);
  box-shadow: 0 0 0 4px rgba(201, 161, 74, 0.14);
}

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

.category-card {
  position: relative;
  display: flex;
  min-height: 138px;
  padding: 17px;
  overflow: hidden;
  color: var(--text);
  text-align: left;
  cursor: pointer;
  background: #fffaf0;
  border: 1px solid rgba(7, 29, 59, 0.06);
  border-radius: var(--radius-md);
  transition: transform 180ms ease, border-color 180ms ease, background 180ms ease, box-shadow 180ms ease;
}

.category-card:hover {
  transform: translateY(-2px);
  background: var(--paper);
  box-shadow: 0 16px 30px rgba(7, 29, 59, 0.07);
}

.category-card.selected {
  background: var(--gold-2);
  border-color: rgba(201, 161, 74, 0.68);
  box-shadow: inset 0 0 0 1px rgba(201, 161, 74, 0.42);
}

.category-content {
  display: flex;
  flex-direction: column;
  gap: 7px;
  padding-right: 24px;
}

.category-name {
  color: var(--navy);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 13px;
  font-weight: 700;
  letter-spacing: -0.035em;
  line-height: 1.35;
}

.category-description {
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.45;
}

.check-mark {
  position: absolute;
  top: 13px;
  right: 12px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  color: white;
  background: var(--navy);
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  opacity: 0;
  transform: scale(0.7);
  transition: opacity 180ms ease, transform 180ms ease;
}

.category-card.selected .check-mark {
  opacity: 1;
  transform: scale(1);
}

.test-summary-grid {
  display: grid;
  gap: 12px;
}

.summary-card {
  padding: 17px;
  background: #fffaf0;
  border: 1px solid rgba(7, 29, 59, 0.06);
  border-radius: var(--radius-md);
}

.summary-card strong {
  display: block;
  color: var(--navy);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 13px;
}

.summary-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.action-area {
  display: grid;
  gap: 12px;
  padding-top: 2px;
}

.button,
.start-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 13px 22px;
  color: white;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  background: var(--navy);
  border: 0;
  border-radius: 999px;
  box-shadow: 0 13px 26px rgba(7, 29, 59, 0.2);
  transition: background 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.start-button {
  width: 100%;
  min-height: 58px;
}

.button.secondary {
  color: var(--navy);
  background: white;
  box-shadow: inset 0 0 0 1px var(--line);
}

.button.danger {
  background: var(--red);
}

.button:not(:disabled):hover,
.start-button:not(:disabled):hover {
  background: var(--navy-2);
  box-shadow: 0 18px 32px rgba(7, 29, 59, 0.25);
  transform: translateY(-2px);
}

.button:disabled,
.start-button:disabled {
  cursor: not-allowed;
  background: #c7c9cf;
  box-shadow: none;
}

.timer-caption,
.question-instruction {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.assessment-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: 740px;
  overflow: hidden;
  background: rgba(255, 253, 248, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: var(--shadow);
}

.assessment-sidebar {
  display: grid;
  align-content: start;
  gap: 22px;
  padding: 28px;
  background:
    linear-gradient(180deg, rgba(7, 29, 59, 0.98), rgba(11, 42, 77, 0.96)),
    var(--navy);
  color: white;
}

.assessment-sidebar .wordmark {
  color: white;
}

.assessment-sidebar .assessment-label {
  color: var(--gold);
}

.sidebar-brand {
  display: grid;
  gap: 5px;
  padding-bottom: 8px;
}

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

.side-stat {
  padding: 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
}

.side-stat span,
.sidebar-label {
  display: block;
  color: rgba(255, 255, 255, 0.66);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.side-stat strong {
  display: block;
  margin-top: 5px;
  color: white;
  font-family: "Sora", system-ui, sans-serif;
  font-size: 20px;
}

.sidebar-block {
  display: grid;
  gap: 10px;
}

.sidebar-chips,
.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.sidebar-chip,
.pill,
.timer-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 5px 10px;
  color: var(--navy);
  background: var(--gold-2);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.question-jump-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.jump-button {
  display: grid;
  min-height: 38px;
  place-items: center;
  color: rgba(255, 255, 255, 0.82);
  cursor: pointer;
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 11px;
  font-size: 12px;
  font-weight: 800;
}

.jump-button.active {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
}

.jump-button.answered {
  color: white;
  border-color: rgba(201, 161, 74, 0.8);
}

.assessment-workspace {
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: 18px;
  padding: 28px;
}

.assessment-topline {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.topline-status {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.progress-shell {
  display: grid;
  gap: 10px;
  margin-bottom: 22px;
}

.progress-meta {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.assessment-sidebar .progress-meta {
  color: rgba(255, 255, 255, 0.76);
}

.progress-track {
  height: 10px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.14);
  border-radius: 999px;
}

.assessment-workspace .progress-track {
  background: rgba(7, 29, 59, 0.08);
}

.progress-fill {
  width: 0%;
  height: 100%;
  background: var(--gold);
  border-radius: inherit;
  transition: width 180ms ease;
}

.premium-question-card {
  display: grid;
  align-content: start;
  padding: 30px;
  background: white;
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: 0 18px 48px rgba(7, 29, 59, 0.07);
}

.question-meta-row {
  margin-bottom: 18px;
}

.question-text {
  max-width: 850px;
  margin: 18px 0 12px;
  font-size: clamp(28px, 4vw, 44px);
}

.question-instruction {
  margin-bottom: 18px;
  text-align: left;
}

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

.option-card {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 14px;
  align-items: flex-start;
  padding: 16px;
  cursor: pointer;
  background: #fffaf0;
  border: 1px solid rgba(7, 29, 59, 0.08);
  border-radius: 16px;
  transition: background 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.option-card:hover {
  transform: translateY(-1px);
  background: var(--paper);
  box-shadow: 0 12px 22px rgba(7, 29, 59, 0.05);
}

.option-card:has(input:checked) {
  background: var(--gold-2);
  border-color: rgba(201, 161, 74, 0.75);
}

.option-card.correct-option {
  border-color: rgba(18, 128, 92, 0.45);
}

.option-card.incorrect-option {
  border-color: rgba(181, 71, 61, 0.45);
}

.option-card input {
  width: 20px;
  min-height: 20px;
  margin-top: 3px;
  accent-color: var(--navy);
}

.option-card strong {
  display: block;
  color: var(--navy);
  font-size: 14px;
  line-height: 1.45;
}

.option-card small {
  display: block;
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

.nav-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
}

.thank-you {
  max-width: 760px;
}

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

.stat-card {
  padding: 18px;
  background: #fffaf0;
  border: 1px solid rgba(7, 29, 59, 0.06);
  border-radius: 18px;
}

.stat-card strong {
  display: block;
  color: var(--navy);
  font-family: "Sora", system-ui, sans-serif;
  font-size: 30px;
  letter-spacing: -0.04em;
}

.stat-card span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}

.table-wrap {
  overflow-x: auto;
}

.mobile-submissions {
  display: none;
}

table {
  width: 100%;
  min-width: 760px;
  border-collapse: collapse;
}

th,
td {
  padding: 14px 12px;
  text-align: left;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

th {
  color: var(--navy);
  font-size: 12px;
  font-weight: 800;
}

td {
  color: var(--text);
  font-size: 13px;
}

.search-field {
  margin-bottom: 18px;
}

.answer-list {
  display: grid;
  gap: 18px;
}

.answer-card {
  padding: 18px;
  background: #fffaf0;
  border: 1px solid rgba(7, 29, 59, 0.06);
  border-radius: 18px;
}

.answer-card p {
  margin: 10px 0 14px;
}

.notice {
  margin: 0;
  padding: 13px 15px;
  color: var(--green);
  background: rgba(18, 128, 92, 0.1);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 800;
}

@media (min-width: 650px) {
  .page-shell {
    padding: 36px 36px 64px;
  }

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

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

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

@media (min-width: 900px) {
  .action-area {
    width: min(100%, 520px);
    margin: 0 auto;
  }

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

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

  .assessment-sidebar {
    gap: 16px;
    padding: 20px;
  }

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

@media (max-width: 560px) {
  body {
    font-size: 15px;
  }

  .page-shell {
    padding: 16px 12px 40px;
  }

  .site-header,
  .assessment-topline,
  .demo-banner {
    flex-direction: column;
    align-items: flex-start;
  }

  .site-header {
    gap: 14px;
    margin-bottom: 24px;
    padding: 14px;
  }

  .wordmark {
    font-size: 19px;
  }

  h1 {
    font-size: clamp(30px, 10vw, 42px);
  }

  .intro {
    margin-bottom: 22px;
  }

  .panel,
  .form-section {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .header-actions,
  .header-actions .button,
  .header-actions button {
    width: 100%;
  }

  .header-actions {
    display: grid;
  }

  .demo-banner {
    margin-bottom: 22px;
  }

  .section-heading-row {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .categories {
    grid-template-columns: 1fr;
  }

  .category-card {
    min-height: 112px;
  }

  .assessment-shell {
    border-radius: 24px;
  }

  .assessment-sidebar {
    padding: 18px 14px;
  }

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

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

  .assessment-workspace {
    padding: 14px;
  }

  .topline-status {
    width: 100%;
    justify-content: space-between;
  }

  .premium-question-card {
    padding: 18px 14px;
    border-radius: 20px;
  }

  .question-text {
    font-size: clamp(24px, 7vw, 32px);
  }

  .nav-row {
    position: sticky;
    bottom: 0;
    z-index: 5;
    padding: 12px 0 0;
    background: linear-gradient(transparent, var(--ivory) 28%);
  }

  .nav-row .button {
    flex: 1;
  }

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

  .stat-card {
    padding: 14px;
  }

  .stat-card strong {
    font-size: 24px;
  }

  .table-wrap {
    display: none;
  }

  .mobile-submissions {
    display: grid;
    gap: 12px;
  }

  .submission-card {
    display: grid;
    gap: 12px;
    padding: 15px;
    background: #fffaf0;
    border: 1px solid rgba(7, 29, 59, 0.06);
    border-radius: 16px;
  }

  .submission-card h3 {
    margin: 0;
    font-size: 17px;
  }

  .submission-card p {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
    line-height: 1.5;
  }

  .submission-card dl {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px 12px;
    margin: 0;
  }

  .submission-card dt {
    color: var(--muted);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
  }

  .submission-card dd {
    margin: 2px 0 0;
    color: var(--navy);
    font-size: 13px;
    font-weight: 800;
  }

  .submission-card .button {
    width: 100%;
  }

  .answer-card {
    padding: 14px;
  }

  .answer-card h3 {
    font-size: 16px;
    line-height: 1.35;
  }

  .option-card {
    padding: 12px;
  }

  .option-card strong {
    font-size: 12px;
  }
}

/* --- Additions for the hosted PHP app (login, errors, badges, admin) --- */

.error-box {
  padding: 13px 15px;
  color: var(--red);
  background: rgba(181, 71, 61, 0.09);
  border: 1px solid rgba(181, 71, 61, 0.3);
  border-radius: 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 18px;
}

.field-error {
  color: var(--red);
  font-size: 12px;
  font-weight: 700;
  margin-top: -10px;
}

.badge {
  display: inline-block;
  padding: 4px 11px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
}

.badge-correct {
  color: var(--green);
  background: rgba(18, 128, 92, 0.12);
}

.badge-incorrect {
  color: var(--red);
  background: rgba(181, 71, 61, 0.12);
}

.badge-borderline {
  color: #9a6b0a;
  background: rgba(201, 161, 74, 0.18);
}

.badge-status {
  color: var(--navy);
  background: var(--gold-2);
}

.logout-link {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
}

.logout-link:hover {
  text-decoration: underline;
}

.search-bar {
  display: flex;
  gap: 10px;
  align-items: flex-end;
}

.search-bar .field {
  flex: 1;
}

.toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.toolbar strong {
  color: var(--navy);
}

.login-shell {
  max-width: 440px;
  margin: 60px auto;
}

.timer-pill.warning {
  color: white;
  background: var(--red);
}

.jump-button.current {
  color: var(--navy);
  background: var(--gold);
  border-color: var(--gold);
}
