:root {
  color-scheme: light;
  /* The skillUP Centre logo colours: navy for words and buttons, mint green for highlights. */
  --bg: #f4f8f7;
  --surface: #ffffff;
  --ink: #131a2e;
  --muted: #5b6478;
  --line: #dde5e6;
  --primary: #1b2a52;
  --primary-dark: #111c3a;
  --primary-soft: #e2f6ef;
  --mint: #5fd4b1;
  --accent: #0c7a5e; /* the mint, darkened so small text is readable on white */
  --ok: #166534;
  --ok-soft: #e7f6ec;
  --bad: #b42318;
  --bad-soft: #fdecea;
  --warn-soft: #fff4d6;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(19, 26, 46, 0.06), 0 4px 16px rgba(19, 26, 46, 0.05);
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Geist", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.55;
}

h1,
h2,
h3,
h4,
h5 {
  line-height: 1.25;
  margin: 0 0 0.5rem;
}

h1 {
  font-size: clamp(1.5rem, 4vw, 2rem);
}

h2 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 0.75rem;
}

a {
  color: var(--primary);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.875rem;
}

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

.container {
  width: 100%;
  max-width: 1040px;
  margin: 0 auto;
  padding: 0 16px;
}

.narrow {
  max-width: 620px;
  margin-left: auto;
  margin-right: auto;
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid transparent;
  border-radius: 10px;
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.btn-primary {
  background: var(--primary);
  color: #fff;
}

.btn-primary:hover:not(:disabled) {
  background: var(--primary-dark);
}

.btn-ghost {
  background: var(--surface);
  border-color: var(--line);
  color: var(--ink);
}

.btn-ghost:hover:not(:disabled) {
  border-color: var(--primary);
  color: var(--primary);
}

.btn-sm {
  min-height: 36px;
  padding: 0 14px;
  font-size: 0.9rem;
}

.btn-lg {
  min-height: 50px;
  padding: 0 24px;
  font-size: 1.05rem;
}

.link-button {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  color: var(--muted);
  cursor: pointer;
}

:focus-visible {
  outline: 3px solid #5fd4b1;
  outline-offset: 2px;
}

/* ---------- Site chrome ---------- */

.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  background: var(--surface);
  border-bottom: 3px solid var(--mint);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 60px;
  gap: 12px;
}

.logo {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  text-decoration: none;
  letter-spacing: -0.02em;
}

.logo span {
  color: var(--accent);
}

/* The skillUP Centre mark with "IELTS" in place of "Centre": navy words, green circle, cursor. */
.logo-svg {
  display: block;
  height: 52px;
  width: auto;
  overflow: visible;
}

.logo-svg text {
  font-family: inherit;
  font-weight: 800;
  font-size: 25px;
  letter-spacing: -0.03em;
  fill: #1b2a52;
}

.logo-svg .logo-dot {
  fill: #5fd4b1;
  transform-box: fill-box;
  transform-origin: center;
  animation: logo-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) both;
}

.logo-svg .logo-ring {
  fill: none;
  stroke: #5fd4b1;
  stroke-width: 2;
  opacity: 0;
  transform-box: fill-box;
  transform-origin: center;
  animation: logo-ring 5s 1.6s ease-out infinite;
}

.logo-svg .logo-ielts {
  animation: logo-rise 0.5s 0.25s ease-out both;
}

.logo-svg .logo-cursor {
  fill: #1b2a52;
  stroke: #fff;
  stroke-width: 2;
  stroke-linejoin: round;
  paint-order: stroke;
  animation: logo-cursor 0.9s 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.logo:hover .logo-cursor {
  animation: logo-click 0.45s ease-out;
}

@keyframes logo-pop {
  from { transform: scale(0); }
}

@keyframes logo-rise {
  from { opacity: 0; transform: translateY(6px); }
}

@keyframes logo-cursor {
  0% { opacity: 0; transform: translate(26px, 18px); }
  70% { opacity: 1; transform: translate(0, 0); }
  82% { transform: translate(0, 0) scale(0.86); }
  100% { transform: translate(0, 0) scale(1); }
}

@keyframes logo-click {
  40% { transform: translate(-2px, -2px) scale(0.86); }
}

@keyframes logo-ring {
  0% { opacity: 0.7; transform: scale(1); }
  24%, 100% { opacity: 0; transform: scale(1.35); }
}

/* Home page: the headline and the four section cards ease in once. */
.hero > * {
  animation: fade-up 0.55s ease-out both;
}

.hero > :nth-child(2) { animation-delay: 0.08s; }
.hero > :nth-child(3) { animation-delay: 0.16s; }
.hero > :nth-child(4) { animation-delay: 0.24s; }

.grid-4 > .feature {
  animation: fade-up 0.5s ease-out both;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.grid-4 > .feature:nth-child(1) { animation-delay: 0.3s; }
.grid-4 > .feature:nth-child(2) { animation-delay: 0.38s; }
.grid-4 > .feature:nth-child(3) { animation-delay: 0.46s; }
.grid-4 > .feature:nth-child(4) { animation-delay: 0.54s; }

.grid-4 > .feature:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 24px rgba(16, 24, 40, 0.1);
}

@keyframes fade-up {
  from { opacity: 0; transform: translateY(12px); }
}

@media (prefers-reduced-motion: reduce) {
  .logo-svg *,
  .hero > *,
  .grid-4 > .feature {
    animation: none !important;
    transition: none;
  }
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
}

.site-nav a:not(.btn) {
  color: var(--ink);
  text-decoration: none;
  font-weight: 500;
}

.logo {
  flex: 0 0 auto;
}

.site-nav a {
  white-space: nowrap;
}

/* Link back to the main skillUP Centre site. On phones only the house icon shows. */
.site-nav .home-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 600;
}

.site-nav .home-link:hover {
  background: var(--mint);
}

@media (max-width: 360px) {
  .logo-svg {
    height: 36px;
  }

  .site-nav {
    gap: 7px;
    font-size: 0.85rem;
  }

  .site-nav .btn {
    padding: 0 8px;
  }
}

@media (max-width: 560px) {
  .site-nav .home-link {
    padding: 8px;
  }

  .site-nav .home-link span {
    display: none;
  }
}

/* Narrow phones: a smaller logo and tighter links so the header never scrolls sideways. */
@media (max-width: 420px) {
  .logo-svg {
    height: 42px;
  }

  .site-nav {
    gap: 10px;
    font-size: 0.9rem;
  }

  .site-nav .btn {
    padding: 0 10px;
  }

  .hero-actions .btn {
    max-width: 100%;
    white-space: normal;
    padding-top: 10px;
    padding-bottom: 10px;
  }
}

.site-main {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 48px;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 18px 0;
  font-size: 0.8rem;
  color: var(--muted);
}

.page-head {
  margin-bottom: 20px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
  margin-bottom: 20px;
}

/* ---------- Landing ---------- */

.hero {
  padding: 28px 0 36px;
  max-width: 720px;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin-bottom: 10px;
}

.hero h1 {
  font-size: clamp(1.8rem, 6vw, 2.8rem);
  letter-spacing: -0.02em;
}

.lead {
  font-size: 1.1rem;
  color: var(--muted);
  margin: 14px 0 22px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.grid-4 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.feature {
  margin: 0;
}

.feature p:last-child {
  margin: 0;
  font-size: 0.95rem;
}

.step {
  display: inline-grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  margin-bottom: 10px;
}

.price {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}

.price > div:first-child {
  flex: 1 1 280px;
}

.price p {
  margin: 0;
}

.price-tag {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.amount {
  font-size: 2.4rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1;
}

/* ---------- Forms ---------- */

.auth {
  display: flex;
  justify-content: center;
  padding-top: 12px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
}

.form {
  display: flex;
  flex-direction: column;
  gap: 16px;
  margin: 16px 0;
}

.form label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.form input {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #b9c0d0;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.hint {
  font-weight: 400;
  font-size: 0.82rem;
  color: var(--muted);
}

.alert {
  padding: 12px 14px;
  border-radius: 10px;
  font-size: 0.95rem;
}

.alert-error {
  background: var(--bad-soft);
  color: var(--bad);
}

.alert-ok {
  background: var(--ok-soft);
  color: var(--ok);
}

/* ---------- Dashboard ---------- */

.banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  flex-wrap: wrap;
  background: var(--primary-soft);
  border: 1px solid #aee6d5;
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 20px;
}

.banner p {
  margin: 0;
  flex: 1 1 260px;
}

.banner-wait {
  background: var(--warn-soft);
  border-color: #f2d98a;
}

.tests {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 16px;
  margin-bottom: 20px;
}

.test-card {
  margin: 0;
}

.section-list,
.attempts,
.review-list,
.intro-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.section-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.section-list li > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.section-name {
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
}

.tag {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  background: #eef0f5;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 600;
  white-space: nowrap;
  text-transform: capitalize;
}

.tag-free,
.tag-approved {
  background: var(--ok-soft);
  color: var(--ok);
}

.tag-pending {
  background: var(--warn-soft);
  color: #8a5a00;
}

.tag-rejected {
  background: var(--bad-soft);
  color: var(--bad);
}

.attempts li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 6px 16px;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.attempts li > :first-child {
  flex: 1 1 180px;
  overflow-wrap: anywhere;
}

/* ---------- Upgrade / admin ---------- */

.steps {
  margin: 0;
  padding-left: 1.2rem;
}

.steps li {
  margin-bottom: 8px;
}

.bkash-number {
  font-size: 1.15rem;
  color: #c2185b;
  white-space: nowrap;
}

.review-list li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
}

.review-list li > div {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow-wrap: anywhere;
}

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

/* ---------- Result ---------- */

.score-card {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 20px 40px;
}

.score-block {
  display: flex;
  flex-direction: column;
}

.score-big {
  font-size: 2.6rem;
  font-weight: 800;
  line-height: 1;
  color: var(--primary);
}

.score-big small {
  font-size: 1.2rem;
  color: var(--muted);
  font-weight: 600;
}

.score-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-left: auto;
}

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

.review {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.95rem;
}

.review th,
.review td {
  text-align: left;
  padding: 8px 10px;
  border-bottom: 1px solid var(--line);
}

.review th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.row-ok td:last-child {
  color: var(--ok);
  font-weight: 600;
}

.row-bad td:last-child {
  color: var(--bad);
  font-weight: 600;
}

.transcript {
  border-top: 1px solid var(--line);
  padding: 10px 0;
}

.transcript summary {
  cursor: pointer;
  font-weight: 600;
}

.transcript p {
  margin: 10px 0 0;
  font-size: 0.95rem;
}

/* ---------- Test runner ---------- */

.runner-intro {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
}

.intro-card {
  max-width: 560px;
  width: 100%;
  margin: 0;
}

.intro-list {
  margin: 14px 0 20px;
}

.intro-list li {
  padding: 8px 0 8px 26px;
  position: relative;
  border-top: 1px solid var(--line);
}

.intro-list li::before {
  content: "\2022";
  position: absolute;
  left: 8px;
  color: var(--primary);
  font-weight: 700;
}

.sound-check {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.volume {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.9rem;
  color: var(--muted);
}

.volume input {
  width: 110px;
  accent-color: var(--primary);
}

.back-link {
  display: block;
  margin-top: 16px;
  font-size: 0.9rem;
}

.intro-card .btn-lg {
  width: 100%;
}

.runner {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.runner-top {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  flex-wrap: wrap;
  padding: 10px 16px;
  background: var(--surface);
  border-bottom: 1px solid var(--line);
}

.runner-title {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.runner-sub {
  font-size: 0.8rem;
  color: var(--muted);
}

.runner-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #eef0f5;
  font-size: 0.88rem;
  font-weight: 600;
  white-space: nowrap;
}

.pill-live {
  background: var(--ok-soft);
  color: var(--ok);
}

.pill-warn {
  background: var(--warn-soft);
  color: #8a5a00;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: currentColor;
  animation: pulse 1.2s ease-in-out infinite;
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dot {
    animation: none;
  }
}

.runner-body {
  flex: 1;
  width: 100%;
  max-width: 820px;
  margin: 0 auto;
  padding: 18px 16px 190px;
}

.part-banner {
  background: var(--primary-soft);
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 18px;
}

.part-banner p {
  margin: 0;
}

.group {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 18px;
}

.group h3 {
  font-size: 1.05rem;
}

.instruction {
  color: var(--muted);
  font-size: 0.95rem;
}

.notes {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  background: #fbfcfe;
}

.notes h4 {
  text-align: center;
  font-size: 1.05rem;
  margin-bottom: 12px;
}

.notes h5 {
  font-size: 0.95rem;
  margin: 14px 0 6px;
}

.note-line {
  margin: 0;
  padding: 7px 0;
  line-height: 2.3;
}

.gap {
  display: inline-flex;
  align-items: center;
  margin: 0 4px;
  border: 1px solid #9aa4bb;
  border-radius: 8px;
  background: #fff;
  vertical-align: middle;
  overflow: hidden;
}

.gap:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #aee6d5;
}

.gap-num {
  padding: 0 8px;
  font-weight: 700;
  font-size: 0.85rem;
  color: var(--primary);
  background: var(--primary-soft);
  align-self: stretch;
  display: flex;
  align-items: center;
}

.gap input {
  width: 132px;
  height: 38px;
  border: 0;
  padding: 0 8px;
  font: inherit;
  font-size: 1rem;
  outline: none;
  background: transparent;
  color: var(--ink);
}

.q-num {
  display: inline-grid;
  place-items: center;
  min-width: 28px;
  height: 28px;
  padding: 0 6px;
  border-radius: 6px;
  background: var(--primary-soft);
  color: var(--primary);
  font-weight: 700;
  font-size: 0.88rem;
  margin-right: 6px;
}

.mcq {
  border: 0;
  padding: 0;
  margin: 0 0 18px;
}

.mcq legend {
  font-weight: 600;
  padding: 0;
  margin-bottom: 8px;
}

.option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 46px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  margin-bottom: 6px;
  cursor: pointer;
}

.option:hover {
  border-color: #9aa4bb;
}

.option-on {
  border-color: var(--primary);
  background: var(--primary-soft);
}

.option input {
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  flex: none;
}

.option-letter {
  font-weight: 700;
}

.match-box {
  list-style: none;
  margin: 0 0 14px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fbfcfe;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 6px 18px;
}

.match-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 8px 0;
  border-top: 1px solid var(--line);
}

.match-row label {
  font-weight: 600;
}

.match-row select {
  min-height: 42px;
  min-width: 96px;
  padding: 0 10px;
  border: 1px solid #9aa4bb;
  border-radius: 8px;
  font: inherit;
  background: #fff;
  color: var(--ink);
}

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

.runner-bottom {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 20;
  display: flex;
  gap: 8px;
  padding: 8px 12px calc(8px + env(safe-area-inset-bottom));
  background: var(--surface);
  border-top: 1px solid var(--line);
  overflow-x: auto;
}

.palette {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  flex: none;
}

.palette-on {
  border-color: var(--primary);
}

.palette-part {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 700;
  font-size: 0.88rem;
  padding: 8px;
  cursor: pointer;
  color: var(--ink);
  white-space: nowrap;
}

.palette-nums {
  display: none;
  gap: 4px;
}

.palette-on .palette-nums {
  display: flex;
}

.num {
  width: 34px;
  height: 34px;
  border: 1px solid #b9c0d0;
  border-radius: 6px;
  background: #fff;
  font: inherit;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  color: var(--ink);
  flex: none;
}

.num-done {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 16px;
  background: rgba(19, 26, 46, 0.55);
}

.modal {
  width: 100%;
  max-width: 420px;
  background: var(--surface);
  border-radius: var(--radius);
  padding: 22px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 16px;
}

@media (max-width: 560px) {
  .site-nav {
    gap: 12px;
  }

  .volume-top {
    display: none;
  }

  .runner-status {
    order: 3;
    width: 100%;
  }

  .gap input {
    width: 112px;
  }

  .score-actions {
    margin-left: 0;
    width: 100%;
  }
}

/* ---------- Calculator ---------- */

.narrow-wide {
  max-width: 820px;
  margin: 0 auto;
}

.segmented {
  display: inline-flex;
  padding: 4px;
  border-radius: 10px;
  background: #eef0f5;
  margin-bottom: 18px;
  max-width: 100%;
}

.segmented button {
  border: 0;
  background: none;
  font: inherit;
  font-weight: 600;
  padding: 8px 14px;
  border-radius: 8px;
  cursor: pointer;
  color: var(--muted);
}

.segmented button.on {
  background: var(--surface);
  color: var(--primary);
  box-shadow: var(--shadow);
}

.calc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-weight: 600;
  font-size: 0.95rem;
}

.calc-input {
  display: flex;
  align-items: center;
  gap: 10px;
}

.calc-input strong {
  margin-left: auto;
  color: var(--primary);
  white-space: nowrap;
}

.calc-field input,
.calc-field select {
  min-height: 46px;
  padding: 0 12px;
  border: 1px solid #b9c0d0;
  border-radius: 10px;
  font: inherit;
  font-size: 1rem;
  background: #fff;
  color: var(--ink);
}

.calc-field input {
  width: 90px;
}

.calc-result {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.charts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
}

.chart-table caption {
  text-align: left;
  font-weight: 700;
  padding-bottom: 6px;
}

/* ---------- Sharing ---------- */

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

.btn-facebook {
  background: #1877f2;
  color: #fff;
}

.btn-whatsapp {
  background: #1a8f4b;
  color: #fff;
}

.share-card {
  text-align: center;
  padding: 36px 24px;
}

.share-band {
  color: var(--primary);
  white-space: nowrap;
}

.intro-note {
  margin: 14px 0 0;
}

@media (max-width: 560px) {
  .nav-extra {
    display: none;
  }
}

/* ---------- Attempts, capacity ---------- */

.alert-info {
  background: var(--primary-soft);
  color: var(--primary-dark);
}

.alert-warn {
  background: var(--warn-soft);
  color: #7a5000;
}

.busy {
  text-align: center;
  margin: 0;
}

.meters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px;
  margin-bottom: 12px;
}

.meter {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.meter-head {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 4px 12px;
  font-size: 0.92rem;
}

.meter-bar {
  height: 10px;
  border-radius: 999px;
  background: #eef0f5;
  overflow: hidden;
}

.meter-bar span {
  display: block;
  height: 100%;
  background: var(--primary);
}

.meter-bar .meter-full {
  background: var(--bad);
}

.subhead {
  margin-top: 20px;
}

.pause-form {
  max-width: 420px;
}

/* ---------- Policy pages, footer ---------- */

.prose h1 {
  margin-bottom: 4px;
}

.prose h2 {
  margin-top: 28px;
}

.prose .card h2 {
  margin-top: 0;
}

.prose ul,
.prose ol {
  padding-left: 1.3rem;
  margin: 0 0 0.9rem;
}

.prose li {
  margin-bottom: 6px;
}

.contact-list {
  list-style: none;
  padding-left: 0 !important;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.site-footer p {
  margin: 0 0 6px;
}

/* ---------- Reading layout ---------- */

.runner-body-wide {
  max-width: 1280px;
}

.reading-layout {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}

.pane-passage {
  position: sticky;
  top: 70px;
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px 20px;
}

.pane-questions {
  max-height: calc(100vh - 170px);
  overflow-y: auto;
  padding-right: 4px;
}

.passage h3 {
  font-size: 1.2rem;
  margin-bottom: 12px;
}

.passage p {
  font-size: 1.02rem;
  line-height: 1.7;
  margin-bottom: 1em;
}

.para-label {
  display: inline-block;
  min-width: 1.4em;
  color: var(--primary);
}

.pane-switch {
  display: none;
}

.box-title {
  font-size: 0.95rem;
  margin-bottom: 8px;
}

@media (max-width: 899px) {
  .pane-switch {
    display: inline-flex;
  }

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

  .pane-passage,
  .pane-questions {
    position: static;
    max-height: none;
    overflow: visible;
  }

  .reading-layout.show-passage .pane-questions,
  .reading-layout.show-questions .pane-passage {
    display: none;
  }
}

/* ---------- Writing ---------- */

.essay {
  width: 100%;
  min-height: 340px;
  padding: 14px;
  border: 1px solid #9aa4bb;
  border-radius: 10px;
  font: inherit;
  font-size: 1.02rem;
  line-height: 1.6;
  color: var(--ink);
  background: #fff;
  resize: vertical;
}

.essay:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px #aee6d5;
}

.word-count {
  margin: 8px 0 0;
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--muted);
}

.word-count-ok {
  color: var(--ok);
}

.chart {
  margin: 14px 0 0;
}

.chart figcaption {
  font-weight: 700;
  font-size: 0.95rem;
  margin-bottom: 8px;
}

.chart svg {
  width: 100%;
  height: auto;
  display: block;
}

.chart-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 16px;
  font-size: 0.88rem;
  margin: 6px 0 12px;
}

.chart-legend i {
  display: inline-block;
  width: 12px;
  height: 12px;
  border-radius: 2px;
  margin-right: 6px;
}

.chart-data th[scope="row"] {
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.95rem;
  color: var(--ink);
}

.score-mid {
  font-size: 1.9rem;
}

.criteria {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 10px;
  margin: 12px 0 16px;
}

.criterion {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
}

.criterion strong {
  font-size: 1.3rem;
  color: var(--primary);
}

.feedback-list {
  padding-left: 1.2rem;
  margin: 0 0 12px;
}

.feedback-list li {
  margin-bottom: 6px;
}

.essay-text {
  white-space: normal;
  line-height: 1.7;
}

.marking-bar {
  margin: 14px 0;
}

.marking-bar span {
  width: 35%;
  animation: marking 1.6s ease-in-out infinite;
}

@keyframes marking {
  0% { margin-left: -35%; }
  100% { margin-left: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .marking-bar span {
    animation: none;
    width: 100%;
    opacity: 0.4;
  }
}

/* ---------- Speaking ---------- */

.speaking-card {
  max-width: 640px;
}

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

.examiner-text {
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.45;
  margin: 6px 0 16px;
}

.cue-card {
  border: 2px solid var(--primary);
  border-radius: 10px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fbfcfe;
}

.cue-card h2 {
  font-size: 1.1rem;
}

.cue-card ul {
  margin: 0;
  padding-left: 1.2rem;
}

.speaking-status {
  margin: 0 0 12px;
}

.pill-rec {
  background: var(--bad-soft);
  color: var(--bad);
}

.mic-meter,
.time-bar {
  margin-bottom: 12px;
}

.mic-meter {
  flex: 1 1 140px;
}

.mic-meter span {
  background: var(--ok);
  width: 0;
  transition: width 0.08s linear;
}

.time-bar span {
  width: 0;
  transition: width 1s linear;
}

.prep-notes {
  min-height: 110px;
  margin-bottom: 12px;
}

.speaking-card .btn-lg {
  width: 100%;
}

.answer-row {
  padding: 12px 0;
  border-top: 1px solid var(--line);
}

.answer-row p {
  margin: 0 0 8px;
}

.answer-row audio {
  width: 100%;
  max-width: 420px;
  height: 40px;
}
