/* ==========================================================================
   jrfnikalo — shared stylesheet
   NTA-inspired palette: deep exam blue, saffron, green.
   Change the tokens in :root to adjust colours site-wide.
   ========================================================================== */

:root {
  --blue:        #1554a5;   /* primary — buttons, links, active states */
  --blue-dark:   #0e3f80;
  --blue-deep:   #0a2b5c;   /* hero, footer */
  --blue-light:  #e6eef9;
  --blue-tint:   #f3f7fd;

  --saffron:       #f47920; /* call-to-action, highlights */
  --saffron-dark:  #d9620d;
  --saffron-light: #fff1e6;

  --green:       #2a9d48;   /* answered / success */
  --green-dark:  #1f7c38;
  --green-light: #e5f5ea;

  --red:         #d6382b;   /* not answered / wrong */
  --red-light:   #fdecea;
  --purple:      #6a3fa0;   /* marked for review */
  --purple-light:#f1ebf9;
  --grey-box:    #dfe3ea;   /* not visited */

  --ink:   #172033;
  --ink-2: #3c4859;
  --ink-3: #6b7686;
  --line:  #e1e6ee;
  --line-2:#cdd5e0;
  --bg:    #f4f6fa;
  --surface: #ffffff;

  --radius:   12px;
  --radius-s: 8px;
  --shadow:   0 1px 2px rgba(10,43,92,.06), 0 12px 32px rgba(10,43,92,.09);
  --shadow-s: 0 1px 2px rgba(10,43,92,.08);
  --maxw: 1160px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  --font-display: "Source Serif 4", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { line-height: 1.22; margin: 0 0 .5em; letter-spacing: -.01em; }
h1, h2 { font-family: var(--font-display); font-weight: 700; }
h1 { font-size: clamp(1.9rem, 1.25rem + 2.6vw, 3rem); }
h2 { font-size: clamp(1.45rem, 1.1rem + 1.2vw, 2.05rem); }
h3 { font-size: 1.1rem; font-weight: 700; }
p  { margin: 0 0 1rem; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 760px; margin: 0 auto; padding: 0 20px; }

/* ---------- tricolour strip + utility bar ---------- */
.tricolour { height: 4px; background: linear-gradient(90deg, #ff9933 0 33.3%, #ffffff 33.3% 66.6%, #138808 66.6% 100%); }
.utility { background: var(--blue-deep); color: #c9d6ea; font-size: .8rem; }
.utility .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; flex-wrap: wrap; }
.utility a { color: #fff; font-weight: 600; }
.utility .dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #4ade80; margin-right: 7px; box-shadow: 0 0 0 3px rgba(74,222,128,.25); }
@media (max-width: 640px) { .utility .hide-sm { display: none; } .utility .wrap { justify-content: center; } }

/* ---------- header ---------- */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; box-shadow: var(--shadow-s); }
.site-header .wrap { display: flex; align-items: center; gap: 20px; height: 80px; }
.logo { display: flex; align-items: center; flex-shrink: 0; }
.logo img { height: 60px; width: auto; }
.logo:hover { text-decoration: none; }

.nav { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.nav a {
  padding: 9px 12px; border-radius: var(--radius-s); color: var(--ink-2);
  font-weight: 600; font-size: .9rem; position: relative; white-space: nowrap;
}
.nav a:hover { background: var(--blue-tint); color: var(--blue); text-decoration: none; }
.nav a.active { color: var(--blue); }
.nav a.active::after { content: ""; position: absolute; left: 12px; right: 12px; bottom: 2px; height: 2px; background: var(--saffron); border-radius: 2px; }
.nav .tag { font-size: .6rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; background: var(--saffron); color: #fff; padding: 2px 6px; border-radius: 4px; margin-left: 5px; vertical-align: 2px; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 1px solid var(--line-2); border-radius: var(--radius-s); padding: 8px 11px; cursor: pointer; font-size: 1.1rem; line-height: 1; color: var(--ink); }

@media (max-width: 1060px) {
  .nav-toggle { display: block; }
  .nav { display: none; position: absolute; top: 80px; left: 0; right: 0; background: var(--surface);
         border-bottom: 1px solid var(--line); flex-direction: column; align-items: stretch; padding: 8px 16px 16px; box-shadow: var(--shadow); }
  .nav.open { display: flex; }
  .nav a { padding: 12px; }
  .nav a.active::after { display: none; }
  .nav a.active { background: var(--blue-tint); }
  .nav .btn { margin-top: 6px; }
}
@media (max-width: 420px) { .site-header .wrap { height: 72px; } .logo img { height: 52px; } .nav { top: 72px; } }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 22px; border-radius: var(--radius-s); font-weight: 700; font-size: .94rem;
  font-family: inherit; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .12s, box-shadow .15s;
}
.btn:hover { text-decoration: none; transform: translateY(-1px); }
.btn:active { transform: translateY(0); }
.btn:disabled { opacity: .5; cursor: not-allowed; transform: none; }

.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); box-shadow: 0 6px 16px rgba(21,84,165,.28); }
.btn-saffron { background: var(--saffron); color: #fff; }
.btn-saffron:hover { background: var(--saffron-dark); box-shadow: 0 6px 18px rgba(244,121,32,.35); }
.btn-green { background: var(--green); color: #fff; }
.btn-green:hover { background: var(--green-dark); }
.btn-ghost { background: var(--surface); color: var(--ink-2); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--blue); color: var(--blue); }
.btn-outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.45); }
.btn-outline-light:hover { background: rgba(255,255,255,.1); border-color: #fff; }
.btn-soon { background: var(--bg); color: var(--ink-3); border: 1px dashed var(--line-2); }
.btn-soon:hover { border-color: var(--saffron); color: var(--saffron-dark); }

.btn-sm { padding: 7px 14px; font-size: .85rem; }
.btn-lg { padding: 14px 28px; font-size: 1rem; }
.btn-block { width: 100%; }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; box-shadow: var(--shadow-s); }
.card-hover { transition: box-shadow .2s, transform .2s, border-color .2s; }
.card-hover:hover { box-shadow: var(--shadow); transform: translateY(-3px); border-color: var(--line-2); }

.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); }

section { padding: 64px 0; }
section.tight { padding: 40px 0; }
.band { background: var(--surface); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.section-head { margin-bottom: 30px; }
.section-head p { color: var(--ink-3); margin: 0; max-width: 62ch; }
.section-head.center { text-align: center; }
.section-head.center p { margin: 0 auto; }
.eyebrow { display: inline-block; font-size: .72rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--saffron-dark); margin-bottom: 8px; }

.page-head { background: linear-gradient(135deg, var(--blue-deep), var(--blue)); color: #fff; padding: 44px 0 40px; }
.page-head h1 { color: #fff; margin-bottom: 8px; }
.page-head p { color: #c9d6ea; margin: 0; max-width: 64ch; }
.page-head .eyebrow { color: #ffb36b; }
.crumbs { font-size: .82rem; color: #a9bcd8; margin-bottom: 10px; }
.crumbs a { color: #dbe6f5; }

/* ---------- pills ---------- */
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 999px; font-size: .74rem; font-weight: 700; letter-spacing: .02em; background: var(--bg); color: var(--ink-2); border: 1px solid var(--line); }
.pill-blue    { background: var(--blue-light); color: var(--blue-dark); border-color: transparent; }
.pill-saffron { background: var(--saffron-light); color: var(--saffron-dark); border-color: transparent; }
.pill-green   { background: var(--green-light); color: var(--green-dark); border-color: transparent; }
.pill-red     { background: var(--red-light); color: var(--red); border-color: transparent; }
.pill-live::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(42,157,72,.2); }

/* ---------- forms ---------- */
label { display: block; font-weight: 650; font-size: .88rem; margin-bottom: 6px; color: var(--ink-2); }
input[type=text], input[type=email], input[type=password], select, textarea {
  width: 100%; padding: 11px 13px; font-family: inherit; font-size: .96rem;
  border: 1px solid var(--line-2); border-radius: var(--radius-s); background: var(--surface); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,84,165,.15); }
.field { margin-bottom: 16px; }
.form-note { font-size: .84rem; color: var(--ink-3); }
.alert { padding: 11px 14px; border-radius: var(--radius-s); font-size: .9rem; margin-bottom: 16px; border: 1px solid transparent; }
.alert-bad  { background: var(--red-light); color: #8f2118; border-color: #f6c6c1; }
.alert-ok   { background: var(--green-light); color: #145c29; border-color: #bfe5ca; }
.alert-info { background: var(--blue-tint); color: var(--blue-dark); border-color: #cbdaf0; }

/* ---------- tables ---------- */
.table-scroll { overflow-x: auto; }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; min-width: 540px; }
table.data th, table.data td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line); }
table.data th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); background: var(--bg); }
table.data tr:last-child td { border-bottom: none; }

/* ---------- plans ---------- */
.plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; align-items: stretch; }
@media (max-width: 900px) { .plans { grid-template-columns: 1fr; max-width: 440px; margin: 0 auto; } }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 28px 24px 24px; display: flex; flex-direction: column; position: relative; transition: transform .2s, box-shadow .2s, border-color .2s; }
.plan:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.plan.popular { border: 2px solid var(--saffron); box-shadow: 0 14px 36px rgba(244,121,32,.15); }
.plan .ribbon { position: absolute; top: -13px; left: 50%; transform: translateX(-50%); background: var(--saffron); color: #fff; font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 5px 13px; border-radius: 999px; white-space: nowrap; }
.plan h3 { font-size: 1.05rem; margin-bottom: 2px; }
.plan .sub { font-size: .85rem; color: var(--ink-3); margin-bottom: 16px; min-height: 2.6em; }
.plan .price { font-family: var(--font-display); font-size: 2.7rem; font-weight: 700; line-height: 1; color: var(--blue-deep); margin-bottom: 4px; }
.plan .price small { font-family: var(--font); font-size: .9rem; font-weight: 600; color: var(--ink-3); }
.plan .validity { font-size: .8rem; color: var(--ink-3); margin-bottom: 18px; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; flex: 1; }
.plan li { display: flex; gap: 10px; align-items: flex-start; font-size: .91rem; color: var(--ink-2); padding: 7px 0; border-bottom: 1px dashed var(--line); }
.plan li:last-child { border-bottom: none; }
.plan li::before { content: "✓"; flex-shrink: 0; width: 19px; height: 19px; border-radius: 50%; background: var(--green-light); color: var(--green-dark); font-size: .7rem; font-weight: 900; display: grid; place-items: center; margin-top: 2px; }
.plan .soon-note { font-size: .78rem; color: var(--ink-3); text-align: center; margin-top: 9px; }

/* ---------- subject cards ---------- */
.subj { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; gap: 15px; align-items: flex-start; transition: transform .2s, box-shadow .2s; }
.subj:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.subj .ico { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; font-size: 1.5rem; flex-shrink: 0; background: var(--blue-tint); }
.subj h3 { font-size: 1rem; margin-bottom: 2px; }
.subj.live { border: 2px solid var(--blue); }
.subj.soon { background: linear-gradient(180deg, #fff, var(--bg)); }
.subj.soon .ico { filter: grayscale(.4); opacity: .85; }

/* ---------- feature tiles ---------- */
.feature { display: flex; gap: 15px; }
.feature .ico { width: 44px; height: 44px; border-radius: 11px; background: var(--blue-light); color: var(--blue); display: grid; place-items: center; font-size: 1.15rem; flex-shrink: 0; }
.feature h3 { font-size: 1rem; margin-bottom: 4px; }
.feature p { font-size: .9rem; color: var(--ink-3); margin: 0; }

/* ---------- FAQ ---------- */
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-s); margin-bottom: 10px; transition: box-shadow .2s; }
.faq details[open] { box-shadow: var(--shadow-s); border-color: var(--line-2); }
.faq summary { cursor: pointer; padding: 16px 18px; font-weight: 650; list-style: none; display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; font-size: 1.3rem; color: var(--blue); font-weight: 400; transition: transform .2s; flex-shrink: 0; }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .a { padding: 0 18px 16px; color: var(--ink-2); font-size: .94rem; }

/* ---------- toast ---------- */
.toast { position: fixed; left: 50%; bottom: 26px; transform: translate(-50%, 20px); background: var(--ink); color: #fff; padding: 13px 20px; border-radius: 10px; font-size: .92rem; font-weight: 500; box-shadow: 0 12px 30px rgba(0,0,0,.25); opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 300; max-width: calc(100% - 32px); text-align: center; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* ---------- reveal on scroll (only when JS is running) ---------- */
html.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
html.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { html.js .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- utilities ---------- */
.muted { color: var(--ink-3); }
.small { font-size: .87rem; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 28px; }
.hidden { display: none !important; }

/* ---------- footer ---------- */
.site-footer { background: var(--blue-deep); color: #a9bcd8; padding: 50px 0 30px; font-size: .9rem; }
.site-footer a { color: #dbe6f5; }
.site-footer h4 { color: #fff; font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; margin-bottom: 13px; }
.footer-grid { display: grid; gap: 30px; grid-template-columns: 1.5fr 1fr 1fr 1fr; }
.footer-grid ul { list-style: none; margin: 0; padding: 0; }
.footer-grid li { margin-bottom: 8px; }
.footer-logo { height: 58px; width: auto; margin-bottom: 14px; }
.footer-bottom { margin-top: 32px; padding-top: 18px; border-top: 1px solid rgba(255,255,255,.12); font-size: .8rem; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
@media (max-width: 820px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(10,25,50,.55); display: grid; place-items: center; z-index: 200; padding: 20px; }
.modal { background: var(--surface); border-radius: var(--radius); padding: 26px; max-width: 470px; width: 100%; box-shadow: var(--shadow); }
