/* ==========================================================================
   Aptitude Tests - front website stylesheet
   prefix: .at-
   ========================================================================== */

/*
	---------- Fonts ----------
	Inter is the interface font and comes from Google Fonts (the <link> lives in
	include/header.php). Lato and Poppins stay as the offline fallback so the
	site still reads correctly if that request is blocked or slow.
*/
@font-face { font-family: "Lato"; src: url("fonts/lato-300.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/lato-400.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/lato-700.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Lato"; src: url("fonts/lato-900.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-light.woff2") format("woff2"); font-weight: 300; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-normal.woff2") format("woff2"); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-bold.woff2") format("woff2"); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: "Poppins"; src: url("fonts/poppins-extra-bold.woff2") format("woff2"); font-weight: 800; font-style: normal; font-display: swap; }

/* ==========================================================================
   Tokens

   The brand is a deep examination-hall navy with a gold highlight, and a
   royal blue for anything the visitor can press. Navy and gold is what
   serious academic brands use, and it leaves every other colour free for
   the subjects themselves: each test keeps its own tone (rose for MDCAT,
   sky for ECAT ...) and those tones are what make the pages colourful,
   rather than one loud brand colour shouting on every panel.

   Dark navy carries the big moments - the hero, the page heads, the stats
   band, the call to action and the footer - and everything between them
   stays white, so the site reads as rich and not as heavy.
   ========================================================================== */
:root {
  /* the navy the dark sections are built from */
  --at-navy: #0a1a38;
  --at-navy-2: #10284f;
  --at-navy-3: #17386d;

  /* what the visitor presses */
  --at-primary: #1b4fd8;
  --at-primary-dark: #163fae;
  --at-primary-darker: #0a1a38;
  --at-primary-soft: #eef3ff;
  --at-primary-soft-2: #d9e5ff;

  /* the highlight: gold on navy, amber on white */
  --at-accent: #f5a524;
  --at-accent-dark: #d4860c;
  --at-accent-soft: #fff3da;

  --at-success: #15a05f;
  --at-success-soft: #dcf7e8;
  --at-danger: #e11d48;
  --at-danger-soft: #ffe4e9;
  --at-warning: #f5a524;
  --at-warning-soft: #fff3da;

  --at-ink: #0a1a38;
  --at-ink-2: #243350;
  --at-muted: #55637c;
  --at-muted-2: #8d99b0;
  --at-border: #dde5f2;
  /*
     The page itself is a tinted blue-grey, not near-white. White is kept
     for the cards only, so a card reads as a card instead of disappearing
     into a white page - and the site stops looking like a blank sheet.
  */
  --at-bg: #e8eef8;
  --at-bg-2: #dfe7f5;
  --at-surface: #ffffff;

  --at-radius: 24px;
  --at-radius-sm: 12px;
  --at-shadow: 0 2px 10px rgba(10, 26, 56, 0.05);
  --at-shadow-lg: 0 24px 50px -26px rgba(10, 26, 56, 0.45);
  --at-shadow-colour: 0 18px 34px -20px rgba(27, 79, 216, 0.55);

  --at-font: "Inter", "Lato", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --at-font-head: "Inter", "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;

  /*
     The dark sections are not a flat navy and not a two colour gradient
     either: two soft lights sit behind the navy, one gold and one blue,
     which is what stops a large dark block looking like a dead rectangle.
  */
  --at-gradient:
    radial-gradient(1100px 520px at 12% -15%, #1c4a93 0%, transparent 62%),
    radial-gradient(900px 460px at 92% 0%, #2a2f7a 0%, transparent 58%),
    radial-gradient(520px 320px at 88% 78%, rgba(184, 121, 26, 0.55) 0%, transparent 60%),
    linear-gradient(160deg, #0a1a38 0%, #0d2147 55%, #0a1a38 100%);
  --at-gradient-accent: linear-gradient(135deg, #f5a524 0%, #ffcf6b 100%);
  --at-gradient-blue: linear-gradient(135deg, #1b4fd8 0%, #3b82f6 100%);

  /* the faint grid that gives the dark sections a surface */
  --at-grid:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
}

/* ---------- Base ---------- */
html { scroll-behavior: smooth; }
body {
  font-family: var(--at-font);
  font-size: 16px;
  line-height: 1.72;
  color: var(--at-ink-2);
  background: var(--at-bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  /*
	"hidden" here quietly turns the body into a scrolling box, and that
	stops every position:sticky on the site from ever sticking. "clip"
	cuts the same sideways overflow without creating one, so the sticky
	panels work again. The first line is the fallback for older browsers.
  */
  overflow-x: hidden;
  overflow-x: clip;
}
/*
	Inter is a tighter, lower contrast face than Poppins, so the headings run a
	notch smaller, a weight heavier and with negative tracking - that is what
	gives the compact, modern look.
*/
h1, h2, h3, h4, h5, h6 {
  font-family: var(--at-font-head);
  color: var(--at-ink);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}
h1 { font-size: 2.6rem; font-weight: 800; line-height: 1.1; letter-spacing: -0.03em; }
h2 { font-size: 1.75rem; font-weight: 800; line-height: 1.2; letter-spacing: -0.025em; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: -0.015em; }
h4 { font-size: 1.05rem; font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0 0 1rem; }
a { color: var(--at-primary); text-decoration: none; transition: color 0.2s; }
a:hover { color: var(--at-primary-dark); }
img { max-width: 100%; height: auto; }
::selection { background: var(--at-primary); color: #fff; }

.at-container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
.at-container-sm { max-width: 860px; }
.at-section { padding: 88px 0; }
.at-section-tight { padding: 56px 0; }
/*
	The alternate section used to be plain white, which meant most of the
	site was white. It is now a tinted panel with its own soft lights, so
	the white on screen is the cards and little else.
*/
.at-section-alt {
  background:
    radial-gradient(820px 400px at 8% -10%, var(--at-primary-soft-2) 0%, transparent 60%),
    radial-gradient(680px 340px at 96% 106%, var(--at-accent-soft) 0%, transparent 58%),
    var(--at-bg-2);
}
.at-text-center { text-align: center; }
.at-muted { color: var(--at-muted); }
.at-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--at-font-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  /* a c-* class on the eyebrow (or on anything above it) recolours it */
  color: var(--tone-ink, var(--at-primary));
  background: var(--tone-soft, var(--at-primary-soft));
  padding: 6px 14px; border-radius: 100px; margin-bottom: 16px;
  /* in a flex column (the login panel) it would otherwise stretch edge to edge */
  align-self: flex-start;
}
.at-section-head { max-width: 640px; margin: 0 auto 48px; text-align: center; }
.at-section-head h2 { font-size: 2.05rem; }
.at-section-head p { color: var(--at-muted); font-size: 1.0625rem; line-height: 1.72; }

/*
	A section that sits on the page background gets a faint wash so the
	white cards on it have something to sit against, instead of white on
	white for the whole scroll.
*/
.at-section-wash {
  background:
    radial-gradient(900px 430px at 85% -10%, var(--at-primary-soft-2) 0%, transparent 62%),
    radial-gradient(760px 380px at 2% 108%, var(--at-accent-soft) 0%, transparent 60%),
    var(--at-bg);
}

/* ---------- Buttons ---------- */
.at-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.95rem;
  padding: 12px 22px; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; transition: all 0.2s ease; line-height: 1.2; white-space: nowrap;
}
.at-btn i { font-size: 1em; }
.at-btn-primary { background: var(--at-gradient-blue); color: #fff; box-shadow: var(--at-shadow-colour); }
.at-btn-primary:hover { background: var(--at-primary-dark); color: #fff; transform: translateY(-2px); box-shadow: 0 22px 38px -20px rgba(27, 79, 216, 0.75); }
/* gold, for the one action on a page that is worth more than the others */
.at-btn-accent { background: var(--at-gradient-accent); color: #1c1403; box-shadow: 0 14px 28px -16px rgba(245, 165, 36, 0.8); }
.at-btn-accent:hover { background: var(--at-accent-dark); color: #1c1403; transform: translateY(-2px); }
.at-btn-success { background: var(--at-success); color: #fff; }
.at-btn-success:hover { background: #15803d; color: #fff; }
.at-btn-danger { background: var(--at-danger); color: #fff; }
.at-btn-danger:hover { background: #be123c; color: #fff; }
.at-btn-white { background: #fff; color: var(--at-primary); }
.at-btn-white:hover { background: var(--at-primary-soft); color: var(--at-primary-dark); }
.at-btn-ghost { background: transparent; color: var(--at-ink-2); }
.at-btn-ghost:hover { background: var(--at-primary-soft); color: var(--at-primary); }
.at-btn-outline { background: transparent; color: var(--at-primary); border-color: var(--at-primary); }
.at-btn-outline:hover { background: var(--at-primary); color: #fff; }
.at-btn-outline-light { background: rgba(255,255,255,0.08); color: #fff; border-color: rgba(255,255,255,0.4); }
.at-btn-outline-light:hover { background: #fff; color: var(--at-primary); }
.at-btn-lg { padding: 16px 30px; font-size: 1.05rem; border-radius: 14px; }
.at-btn-sm { padding: 8px 14px; font-size: 0.85rem; border-radius: 10px; }
/*
	A full width button has to be allowed to wrap. Buttons never wrap by
	default, which is right for a short label in a row, but a long one in a
	narrow column (the sidebar on a book page) would otherwise run straight
	off the side of the page.
*/
.at-btn-block { width: 100%; white-space: normal; text-align: center; }
.at-btn:disabled, .at-btn.disabled { opacity: 0.5; pointer-events: none; }
/*
	"Continue with Google". Google asks that its button stays white with
	its own four colour mark beside the words, so it is the one button on
	the site that does not take the site's colours.
*/
.at-btn-google { background: #fff; color: #3c4043; border-color: #dadce0; gap: 10px; font-weight: 600; }
.at-btn-google:hover { background: #f7f8f8; color: #3c4043; border-color: #d2d5d9; }
.at-btn-google svg { flex: none; }

/* ==========================================================================
   Emoji icon tiles
   An emoji sitting in a soft pastel square. Used for subjects, chapters and
   feature points, where a colour picture reads faster than a line icon.
   Markup: <span class="at-emoji c-blue">📘</span>
   The colour is a variable, so a tile can also be tinted from PHP with
   style="--at-emoji-bg:#xxx" (the test cards do this with the test's colour).
   ========================================================================== */
.at-emoji {
  flex: 0 0 auto;
  width: 64px; height: 64px;
  border-radius: 18px;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 2rem; line-height: 1;
  background: var(--at-emoji-bg, var(--tone-soft, #f1f5f9));
  /* a ring in the tile's own colour, so the tiles read as coloured objects
     rather than as pale squares that happen to hold an emoji */
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone, #94a3b8) 28%, transparent),
              0 6px 14px -8px color-mix(in srgb, var(--tone, #94a3b8) 70%, transparent);
  /*
  	Pick the colour emoji face first. Without this some Windows installs fall
  	back to a flat black and white glyph.
  */
  font-family: "Apple Color Emoji", "Segoe UI Emoji", "Noto Color Emoji", "Segoe UI Symbol", sans-serif;
  transition: transform 0.2s ease;
}
.at-emoji-xs { width: 42px; height: 42px; border-radius: 12px; font-size: 1.25rem; }
.at-emoji-sm { width: 54px; height: 54px; border-radius: 15px; font-size: 1.7rem; }
.at-emoji-lg { width: 78px; height: 78px; border-radius: 22px; font-size: 2.4rem; }
.at-emoji-plain { background: none; box-shadow: none; }

/*
	---------- Tone palette ----------
	One hue, three values: the soft tile wash, the solid colour for bars and
	rules, and a dark ink that stays readable on the wash. Put a c-* class on
	any element and whatever inside it reads these variables picks up the hue,
	which is how a chapter row, its bar and its emoji all end up matching.
*/
.c-teal    { --tone-soft: #ccfbf1; --tone: #14b8a6; --tone-ink: #0f766e; }
.c-blue    { --tone-soft: #dbeafe; --tone: #3b82f6; --tone-ink: #1d4ed8; }
.c-sky     { --tone-soft: #e0f2fe; --tone: #0ea5e9; --tone-ink: #0369a1; }
.c-emerald { --tone-soft: #d1fae5; --tone: #10b981; --tone-ink: #047857; }
.c-amber   { --tone-soft: #fef3c7; --tone: #f59e0b; --tone-ink: #b45309; }
.c-orange  { --tone-soft: #ffedd5; --tone: #f97316; --tone-ink: #c2410c; }
.c-rose    { --tone-soft: #ffe4e6; --tone: #f43f5e; --tone-ink: #be123c; }
.c-violet  { --tone-soft: #ede9fe; --tone: #8b5cf6; --tone-ink: #6d28d9; }
.c-indigo  { --tone-soft: #e0e7ff; --tone: #6366f1; --tone-ink: #4338ca; }
.c-lime    { --tone-soft: #ecfccb; --tone: #84cc16; --tone-ink: #4d7c0f; }
.c-slate   { --tone-soft: #f1f5f9; --tone: #64748b; --tone-ink: #334155; }
.c-white   { --tone-soft: rgba(255, 255, 255, 0.18); --tone: #ffffff; --tone-ink: #ffffff; }
.at-emoji.c-white { box-shadow: none; }

/* ---------- Navbar ---------- */
.at-navbar {
  position: sticky; top: 0; z-index: 1000;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--at-border);
  transition: box-shadow 0.25s;
}
.at-navbar.is-scrolled { box-shadow: 0 10px 30px -18px rgba(10, 26, 56, 0.35); }
.at-navbar-inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: 24px; }
.at-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--at-ink); }
.at-brand:hover { color: var(--at-ink); }
.at-brand-mark {
  width: 40px; height: 40px; border-radius: 13px; background: var(--at-navy);
  display: inline-flex; align-items: center; justify-content: center; color: var(--at-accent); font-size: 1.15rem;
  box-shadow: 0 10px 18px -10px rgba(10, 26, 56, 0.8);
}
.at-brand-text { font-family: var(--at-font-head); font-weight: 800; font-size: 1.3rem; letter-spacing: -0.02em; }
.at-brand-text span { color: var(--at-primary); }
/* on a navy background the mark flips: gold tile, navy tick */
.at-footer .at-brand-mark, .at-dark .at-brand-mark {
  background: var(--at-gradient-accent); color: var(--at-navy);
}
.at-footer .at-brand-text span { color: var(--at-accent); }

/*
  The logo itself. The file is wide, so it is sized by its height and the
  width follows: 42px in the bar, a little larger in the footer where
  there is room. width/height on the tag keep the row from jumping while
  the picture loads.
*/
.at-brand-img { display: block; height: 42px; width: auto; }
.at-footer .at-brand-img { height: 48px; }
/*
  A logo the admin uploaded is used as it is, and a dark one would vanish
  on the navy footer, so it sits on a small white card instead.
*/
.at-footer .at-brand-img-chip {
  background: #fff; padding: 8px 12px; border-radius: 12px; height: 44px;
  box-shadow: 0 12px 24px -16px rgba(0, 0, 0, 0.7);
}
@media (max-width: 600px){
  .at-brand-img { height: 34px; }
  .at-footer .at-brand-img { height: 40px; }
}
.at-menu { display: flex; align-items: center; gap: 28px; }
.at-menu ul { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; }
.at-menu ul a {
  display: block; padding: 8px 14px; border-radius: 10px;
  font-family: var(--at-font-head); font-weight: 500; font-size: 0.95rem; color: var(--at-ink-2);
}
/* a menu item never breaks in half - "Entry Tests" stays on one line */
.at-menu ul a { position: relative; white-space: nowrap; }
.at-menu ul a:hover { color: var(--at-primary); background: var(--at-primary-soft); }
/*
	The page you are on is marked with a gold rule and a darker ink, never
	with a heavier weight: bold is wider than regular, so the active item
	used to grow and push the rest of the menu onto a second line.
*/
.at-menu ul a.active { color: var(--at-ink); background: transparent; }
.at-menu ul a.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px;
  border-radius: 3px; background: var(--at-gradient-accent);
}
/* --------------------------------------------------------------------------
   A menu item that holds other menu items.

   On a wide screen it is a panel that drops under its heading, on hover or
   on a click; inside the phone drawer the same list simply folds open under
   it. The submenu is a ul inside the menu's own ul, so every rule here is
   written with .at-submenu on the ul itself - otherwise the bar's own
   "ul { display: flex }" wins and the panel comes out sideways.
   -------------------------------------------------------------------------- */
.at-menu ul li.at-has-sub { position: relative; }
.at-sub-toggle {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border: 0; border-radius: 10px; background: none; cursor: pointer;
  font-family: var(--at-font-head); font-weight: 500; font-size: 0.95rem; color: var(--at-ink-2);
  white-space: nowrap; position: relative;
}
.at-sub-toggle:hover,
.at-has-sub:hover > .at-sub-toggle,
.at-has-sub.is-open > .at-sub-toggle { color: var(--at-primary); background: var(--at-primary-soft); }
.at-sub-caret { font-size: 0.6rem; opacity: 0.65; transition: transform 0.2s; }
.at-has-sub:hover .at-sub-caret,
.at-has-sub.is-open .at-sub-caret { transform: rotate(180deg); }
/* the page you are on is marked the same way as any other item */
.at-sub-toggle.active { color: var(--at-ink); }
.at-sub-toggle.active::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 2px; height: 3px;
  border-radius: 3px; background: var(--at-gradient-accent);
}

.at-menu ul.at-submenu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 222px;
  display: flex; flex-direction: column; align-items: stretch; gap: 2px;
  padding: 8px; background: #fff;
  border: 1px solid var(--at-border); border-radius: 16px;
  box-shadow: 0 28px 54px -30px rgba(10, 26, 56, 0.55);
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity 0.18s, transform 0.18s, visibility 0s linear 0.18s;
  z-index: 1250;
}
/* a gap between the heading and the panel would drop it on the way down */
.at-menu ul.at-submenu::before { content: ""; position: absolute; left: 0; right: 0; top: -12px; height: 12px; }
.at-has-sub:hover > ul.at-submenu,
.at-has-sub.is-open > ul.at-submenu {
  opacity: 1; visibility: visible; transform: none;
  transition: opacity 0.18s, transform 0.18s, visibility 0s;
}
.at-menu ul.at-submenu a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: 10px; white-space: nowrap;
}
.at-menu ul.at-submenu a.active { background: var(--at-primary-soft); color: var(--at-primary); }
.at-menu ul.at-submenu a.active::after { display: none; }


.at-menu-actions { display: flex; align-items: center; gap: 8px; }
.at-nav-toggle {
  display: none; width: 44px; height: 44px; border: 0; background: var(--at-primary-soft); border-radius: 12px;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px; cursor: pointer;
}
.at-nav-toggle span { width: 20px; height: 2px; background: var(--at-primary); border-radius: 2px; transition: all 0.25s; }
.at-nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.at-nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.at-nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ==========================================================================
   The dark sections

   Every large navy block on the site - the hero, the inner page heads, the
   stats band, the call to action, the sample reader - is built the same
   way: the lit navy from the tokens, a faint grid over it for surface, and
   gold reserved for the one thing that matters most on that block.
   ========================================================================== */
.at-section-dark,
.at-dark,
.at-hero,
.at-page-head,
.at-article-head,
.at-book-head,
.at-stats-band,
.at-cta {
  position: relative; overflow: hidden;
  background: var(--at-gradient); background-color: var(--at-navy); color: #fff;
}
.at-section-dark::before,
.at-dark::before,
.at-hero::before,
.at-page-head::before,
.at-article-head::before,
.at-book-head::before,
.at-stats-band::before,
.at-cta::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--at-grid); background-size: 54px 54px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
}
.at-section-dark > *,
.at-dark > *,
.at-hero > *,
.at-page-head > *,
.at-article-head > *,
.at-book-head > *,
.at-stats-band > *,
.at-cta > * { position: relative; z-index: 1; }

/*
	Anything written on a navy section: headings go white, body text goes
	to a soft blue-white, and a card that lands on it becomes a glass panel
	rather than a white rectangle punched into the dark.
*/
.at-section-dark h1, .at-section-dark h2, .at-section-dark h3, .at-section-dark h4,
.at-dark h1, .at-dark h2, .at-dark h3, .at-dark h4 { color: #fff; }
.at-section-dark p, .at-dark p { color: rgba(255,255,255,0.72); }
.at-section-dark .at-muted, .at-dark .at-muted { color: rgba(255,255,255,0.6); }
.at-section-dark .at-card, .at-dark .at-card {
  background: rgba(255,255,255,0.055);
  border-color: rgba(255,255,255,0.12);
  box-shadow: none;
  color: rgba(255,255,255,0.78);
}
/* a tinted card on navy keeps its hue, as a wash of its own colour */
.at-section-dark .at-card-tint, .at-dark .at-card-tint {
  background: color-mix(in srgb, var(--tone, #ffffff) 12%, transparent);
  border-color: color-mix(in srgb, var(--tone, #ffffff) 28%, transparent);
}
/* on navy a step number is lit, not darkened, or it disappears */
.at-section-dark .at-step-num, .at-dark .at-step-num {
  background: linear-gradient(145deg,
    color-mix(in srgb, var(--tone, var(--at-primary)) 85%, #fff),
    var(--tone, var(--at-primary)));
  color: #0a1a38;
  box-shadow: 0 14px 26px -12px color-mix(in srgb, var(--tone, var(--at-primary)) 85%, transparent);
}

/* on navy, the first button is gold - it is the brightest thing on screen */
.at-hero .at-btn-primary,
.at-page-head .at-btn-primary,
.at-book-head .at-btn-primary,
.at-cta .at-btn-primary {
  background: var(--at-gradient-accent); color: #1c1403;
  box-shadow: 0 16px 30px -16px rgba(245, 165, 36, 0.8);
}
.at-hero .at-btn-primary:hover,
.at-page-head .at-btn-primary:hover,
.at-book-head .at-btn-primary:hover,
.at-cta .at-btn-primary:hover { background: var(--at-accent-dark); color: #1c1403; }

.at-hero .at-btn-outline,
.at-page-head .at-btn-outline,
.at-book-head .at-btn-outline,
.at-cta .at-btn-outline { color: #fff; border-color: rgba(255,255,255,0.45); background: rgba(255,255,255,0.06); }
.at-hero .at-btn-outline:hover,
.at-page-head .at-btn-outline:hover,
.at-book-head .at-btn-outline:hover,
.at-cta .at-btn-outline:hover { background: #fff; color: var(--at-navy); border-color: #fff; }

/* ==========================================================================
   The site's own photographs.

   One class for every picture the pages are built around, so they all
   behave the same: filling their box, rounded, and never taller than the
   space they were given. A picture that has not been made yet leaves a
   quiet grey panel of exactly the same shape, so nothing jumps when it
   finally arrives.
   ========================================================================== */
.at-art {
  display: block; width: 100%; height: auto;
  object-fit: cover; border-radius: var(--at-radius);
}
.at-art-wait {
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, #eef2f9 0%, #dce6f8 100%);
  color: #bccbe6; font-size: 1.8rem;
}
.at-dark .at-art-wait,
.at-section-dark .at-art-wait,
.at-hero .at-art-wait {
  background: rgba(255, 255, 255, 0.07); color: rgba(255, 255, 255, 0.35);
}

/*
   A photograph behind a navy band. It sits under the words at a low
   opacity, so the headline stays as readable as it was on plain navy; the
   band is unchanged when the picture does not exist yet.
*/
.at-page-head.has-photo::after,
.at-cta.has-photo::after,
.at-hero.has-photo::after {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background-image: var(--art); background-size: cover; background-position: center;
  opacity: 0.3; mix-blend-mode: luminosity;
}
.at-page-head.has-photo::before,
.at-cta.has-photo::before { opacity: 0.6; }

/* the hero's photograph is wide and quiet, so the headline still leads */
.at-hero.has-photo::after { opacity: 0.26; }

/*
   A banner the admin uploaded for one test, or for one kind of test.

   On a phone the band is almost square, so the picture fills it and the
   quiet wash above is exactly right. A wide screen is the opposite: the
   band is a letterbox strip five times wider than it is tall, a 16:9
   photograph loses two thirds of its height to the crop, and at 30% it
   fades into the colour altogether - which is why a picture that looked
   fine on a phone seemed missing on a desktop.

   So on a wide screen the picture is shown for what it is: full strength
   on the right, fading left into the band's own colour, with the heading
   held to its own column so nothing is ever read over a face. The band
   grows a little too, to give the photograph some height back.
*/
@media (min-width: 992px){

  .at-page-head.has-banner { padding: 88px 0; }

  /*
     The heading keeps the left half, as a share rather than a fixed
     width, so the words stop short of the picture on a laptop and on a
     wide monitor alike.
  */
  .at-page-head.has-banner h1,
  .at-page-head.has-banner p { max-width: 52%; }

  .at-page-head.has-banner::after {
    opacity: 0.92;
    mix-blend-mode: normal;
    /* a little above centre: a crop through the middle beheads people */
    background-position: center 28%;
    -webkit-mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.8) 78%, #000 92%);
            mask-image: linear-gradient(90deg, transparent 0%, transparent 44%, rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.8) 78%, #000 92%);
  }

  /* the dotted grid is noise once there is a photograph under it */
  .at-page-head.has-banner::before { opacity: 0.25; }
}

/*
   The strip across the top of a step card. It has to climb out of the
   card's padding to reach the edges, and max-width has to be let go of:
   the site's reset holds every image to 100% of its box, which would stop
   it an inch short on both sides.
*/
.at-step-photo {
  margin: -32px -24px 18px; width: calc(100% + 48px); max-width: none;
  border-radius: 23px 23px 0 0;
}

/* ==========================================================================
   The pictures a test carries besides its banner.

   They are never shown as a gallery: each one takes the place the admin
   gave it - beside the paper pattern, under the sections, or as a wide
   band further down - so the page still reads as a page. The frame is the
   same everywhere, only the shape of the picture changes.
   ========================================================================== */
.at-shot { margin: 0; }
.at-shot img {
  display: block; width: 100%; height: auto; object-fit: cover;
  border-radius: 16px; border: 1px solid var(--at-border); background: var(--at-bg);
}
.at-shot figcaption {
  margin-top: 8px; color: var(--at-muted); font-size: 0.86rem; line-height: 1.5;
}

/* under the sections list, as wide as the column */
.at-shot-wide { margin-top: 22px; }

/* in the right column, under the paper pattern */
.at-shot-side { margin-top: 16px; }

/*
   Beside the WhatsApp invite. The band used to run the whole width with
   an empty half beside it; with a picture there the two share the row and
   both stand to their full height.
*/
.at-group-pair { display: grid; gap: 22px; }
.at-group-pair.is-pair { grid-template-columns: minmax(0, 1fr) minmax(260px, 400px); align-items: stretch; }
.at-group-pair .at-group { height: 100%; }
.at-shot-beside img { height: 100%; min-height: 220px; }
.at-shot-beside { display: flex; flex-direction: column; }

@media (max-width: 900px){
  .at-group-pair.is-pair { grid-template-columns: 1fr; }
  .at-shot-beside img { height: auto; min-height: 0; }
}

/* the band further down: one picture fills the row, two or three share it */
.at-shot-band { padding-top: 0; }
.at-shot-row { display: grid; gap: 18px; }
.at-shot-row.is-of-2 { grid-template-columns: 1fr 1fr; }
.at-shot-row.is-of-3 { grid-template-columns: repeat(3, 1fr); }

@media (max-width: 860px){
  .at-shot-row.is-of-2, .at-shot-row.is-of-3 { grid-template-columns: 1fr; }
}

/* a wide photograph with the words laid over it */
.at-photo-band { position: relative; margin: 0; }
.at-photo-band .at-art {
  border-radius: 0; max-height: 440px;
}
.at-photo-band::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(5, 14, 36, 0.92) 0%, rgba(5, 14, 36, 0.78) 42%, rgba(5, 14, 36, 0.25) 100%);
}
.at-photo-band-say {
  position: absolute; inset: 0; z-index: 1;
  display: flex; flex-direction: column; justify-content: center;
}
.at-photo-band-say > div { max-width: 560px; }
.at-photo-band-say h2 { color: #fff; margin: 10px 0 12px; }
.at-photo-band-say p { color: rgba(255, 255, 255, 0.82); margin: 0 0 18px; }

@media (max-width: 900px) {
  .at-hero-photo { display: none; }
  .at-photo-band .at-art { max-height: 520px; }
  .at-photo-band::after { background: linear-gradient(180deg, rgba(5, 14, 36, 0.55) 0%, rgba(5, 14, 36, 0.92) 55%); }
  .at-photo-band-say { justify-content: flex-end; padding-bottom: 28px; }
}

/*
   The one photograph on the about page. Full width at its own shape it
   swallowed half the screen, so it is held to a band: the width stays,
   the height is capped and the picture crops a little below its middle,
   where the people are.
*/
.at-about-photo { margin: 28px 0 0; }
.at-about-photo .at-art { max-height: 300px; object-position: center 62%; }
.at-about-photo figcaption {
  margin-top: 12px; text-align: center;
  font-size: 0.88rem; color: var(--at-ink-3, #64748b);
}

/* ---------- Hero ---------- */
.at-hero { padding: 92px 0 110px; }
.at-hero-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 56px; align-items: center; position: relative; z-index: 1; }
.at-hero h1 { color: #fff; font-size: 3.2rem; line-height: 1.08; letter-spacing: -0.035em; margin-bottom: 20px; }
/* the one phrase picked out in gold, so the headline has a focus */
.at-hero h1 mark {
  background: none; color: var(--at-accent); font-style: normal;
  background-image: var(--at-gradient-accent);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.at-hero p.lead { font-size: 1.0625rem; line-height: 1.72; color: rgba(255,255,255,0.78); max-width: 540px; margin-bottom: 32px; }
.at-hero-eyebrow {
  background: rgba(245, 165, 36, 0.14); color: var(--at-accent);
  border: 1px solid rgba(245, 165, 36, 0.35);
}
.at-hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-bottom: 40px; }

/* the three numbers under the buttons, each in its own small panel */
.at-hero-stats { display: flex; flex-wrap: wrap; gap: 12px; }
.at-hero-stats div {
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px; padding: 12px 18px; min-width: 112px;
}
.at-hero-stats div strong {
  display: block; font-family: var(--at-font-head); font-size: 1.6rem; font-weight: 800; line-height: 1.1;
  color: #fff;
}
.at-hero-stats div span { font-size: 0.82rem; color: rgba(255,255,255,0.62); }

/* mock question card in hero */
.at-hero-card {
  background: #fff; color: var(--at-ink-2); border-radius: 22px; padding: 26px; box-shadow: var(--at-shadow-lg);
  transform: rotate(-1.5deg); position: relative;
}
.at-hero-card::after {
  content: ""; position: absolute; inset: 14px -14px -14px 14px; border-radius: 22px; background: rgba(255,255,255,0.18); z-index: -1;
}
.at-hero-card-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.at-hero-card-top .pill { font-size: 0.8rem; font-weight: 700; color: var(--at-primary); background: var(--at-primary-soft); padding: 4px 12px; border-radius: 100px; }
.at-hero-card-top .timer { font-family: var(--at-font-head); font-weight: 700; color: var(--at-danger); }
.at-hero-card h4 { margin-bottom: 14px; }
.at-hero-card .opt {
  display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 2px solid var(--at-border); border-radius: 12px; margin-bottom: 8px; font-size: 0.95rem;
}
.at-hero-card .opt b { width: 26px; height: 26px; border-radius: 8px; background: var(--at-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 0.8rem; color: var(--at-muted); }
.at-hero-card .opt.selected { border-color: var(--at-primary); background: var(--at-primary-soft); }
.at-hero-card .opt.selected b { background: var(--at-primary); color: #fff; }
.at-hero-card .progress-line { height: 6px; background: var(--at-bg); border-radius: 100px; margin-top: 16px; overflow: hidden; }
.at-hero-card .progress-line i { display: block; height: 100%; width: 34%; background: var(--at-gradient-blue); border-radius: 100px; }
.at-hero-float {
  position: absolute; z-index: 2; background: #fff; color: var(--at-ink-2); border-radius: 14px; padding: 12px 16px;
  box-shadow: 0 18px 34px -20px rgba(10, 26, 56, 0.8);
  display: flex; align-items: center; gap: 10px; font-size: 0.85rem; font-weight: 700;
}
.at-hero-float i { width: 32px; height: 32px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; }
.at-hero-float.f1 { top: -22px; left: -30px; }
.at-hero-float.f1 i { background: var(--at-success-soft); color: var(--at-success); }
.at-hero-float.f2 { bottom: -18px; right: -20px; }
.at-hero-float.f2 i { background: var(--at-warning-soft); color: var(--at-warning); }
.at-hero-visual { position: relative; }

/* ---------- Test cards ---------- */
.at-grid { display: grid; gap: 24px; }
.at-grid-4 { grid-template-columns: repeat(4, 1fr); }
.at-grid-3 { grid-template-columns: repeat(3, 1fr); }
.at-grid-2 { grid-template-columns: repeat(2, 1fr); }
.at-card {
  background: var(--at-surface); border: 1px solid var(--at-border); border-radius: var(--at-radius); padding: 28px; box-shadow: var(--at-shadow);
}
/* the same card carrying its subject's wash instead of plain white */
.at-card-tint {
  background: color-mix(in srgb, var(--tone-soft, #f1f5f9) 42%, #fff);
  border-color: color-mix(in srgb, var(--tone, #94a3b8) 20%, #fff);
}
.at-test-card {
  position: relative; display: flex; flex-direction: column; gap: 14px; color: var(--at-ink-2);
  overflow: hidden;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
/*
	Each card wears a bar of its own test colour along the top. It is what
	makes a row of cards read as a row of different subjects at a glance,
	and it costs nothing - the colour is already on the card.
*/
.at-test-card::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 5px;
  background: linear-gradient(90deg,
    var(--test-color, var(--at-primary)),
    color-mix(in srgb, var(--test-color, var(--at-primary)) 45%, #fff));
}
.at-test-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 28px 46px -24px color-mix(in srgb, var(--test-color, var(--at-navy)) 55%, transparent);
  border-color: color-mix(in srgb, var(--test-color, var(--at-primary)) 35%, #fff);
  color: var(--at-ink-2);
}
.at-test-icon {
  width: 56px; height: 56px; border-radius: 16px; display: inline-flex; align-items: center; justify-content: center;
  font-size: 1.5rem; color: #fff; background: var(--test-color, var(--at-primary));
  box-shadow: 0 10px 20px -10px var(--test-color, var(--at-primary));
}
/*
	The emoji tile on a test card is tinted from that test's own colour, so each
	test keeps its identity while the tiles all share the soft pastel look.
*/
.at-test-emoji {
  --at-emoji-bg: color-mix(in srgb, var(--test-color, var(--at-primary)) 20%, #fff);
  --tone: var(--test-color, var(--at-primary));
}
.at-test-card:hover .at-test-emoji { transform: translateY(-2px) scale(1.04); }
.at-test-card h3 { margin: 4px 0 0; }
/*
	A long description would make one card tower over the others and break
	the grid, so it is cut at three lines with an ellipsis. The full text is
	still on the test's own page, which is where it belongs.

	It must not grow with the card: a clamped box that flex stretches shows
	as many lines as happen to fit and slices the last one in half, which
	is what a fourth line cut through the middle was. The footer takes the
	spare room instead.
*/
.at-test-card p {
  color: var(--at-muted); font-size: 0.95rem; margin: 0; flex: 0 0 auto;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 3; line-clamp: 3;
  overflow: hidden;
}
.at-test-meta { display: flex; flex-wrap: wrap; gap: 8px 14px; font-size: 0.82rem; color: var(--at-muted); }
.at-test-meta span { display: inline-flex; align-items: center; gap: 6px; }
.at-test-meta i { color: var(--test-color, var(--at-primary)); }
/*
  The bottom row of a test card: the link on the left, and on the right
  how many papers have been sat - a quiet proof, not a headline.
*/
.at-test-foot {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; flex-wrap: wrap;
  margin-top: auto;		/* the card's spare height collects above this row */
}
.at-test-attempts { color: var(--at-success); font-weight: 600; font-size: 0.82rem; display: inline-flex; align-items: center; gap: 6px; }
.at-test-attempts i { color: var(--at-success) !important; }
.at-test-card .at-link-arrow { font-family: var(--at-font-head); font-weight: 600; color: var(--test-color, var(--at-primary)); display: inline-flex; align-items: center; gap: 6px; font-size: 0.92rem; }
.at-test-card:hover .at-link-arrow i { transform: translateX(4px); }
.at-link-arrow i { transition: transform 0.2s; }

/* ==========================================================================
   Hot sale: several books sold together

   One deal gets a wide card of its own, on a navy panel so it reads as an
   offer rather than another book. Two or more share a single row that
   scrolls sideways, so four or five of them still leave the shelf of books
   in sight instead of pushing it off the screen.
   ========================================================================== */
.at-bundle-strip { margin-top: 4px; }
/* a single deal takes the whole row instead of sharing it */
.at-bundle-strip.is-single .at-bundle-grid { display: block; overflow: visible; padding: 0; }
.at-bundle-strip.is-single .at-bundle-grid > * { max-width: none; }

.at-bundle-strip-head { display: flex; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.at-bundle-strip-head h2 { font-size: 1.25rem; margin: 0; color: var(--at-ink); }
.at-bundle-strip-head p { margin: 0; color: var(--at-muted); font-size: 0.9rem; }

/* a little life in the flame */
.at-bundle-fire { display: inline-block; animation: atFlicker 2.6s ease-in-out infinite; }
@keyframes atFlicker {
  0%, 100% { transform: scale(1) rotate(0deg); }
  30%      { transform: scale(1.12) rotate(-6deg); }
  60%      { transform: scale(0.96) rotate(5deg); }
}

/*
  One row, however many deals there are: they grow to share it, and once
  they no longer fit the row scrolls rather than wrapping.
*/
.at-bundle-grid {
  display: flex; gap: 16px; overflow-x: auto; padding: 4px 4px 10px;
  scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  scrollbar-width: thin; scrollbar-color: var(--at-primary-soft-2) transparent;
}
.at-bundle-grid > * { flex: 1 0 430px; max-width: 560px; scroll-snap-align: start; }
/*
	On the test page one or two deals sit in the middle of the band rather
	than against the left edge. "safe" so that a row long enough to scroll
	still begins at its first card instead of hiding it.
*/
.at-bundle-mid { justify-content: center; justify-content: safe center; }
.at-bundle-grid::-webkit-scrollbar { height: 6px; }
.at-bundle-grid::-webkit-scrollbar-thumb { background: var(--at-primary-soft-2); border-radius: 100px; }
.at-bundle-grid::-webkit-scrollbar-track { background: transparent; }

/* ---------- the deal card ---------- */
/*
  The same navy panel whether there is one deal or ten, only smaller when
  they share the row. On a page of white book cards, a dark card reads as
  an offer at a glance.
*/
.at-bundle {
  display: grid; grid-template-columns: 118px 1fr; gap: 18px; align-items: center;
  padding: 20px 22px; color: #e8eefc; position: relative; overflow: hidden; border: 0;
  background:
    radial-gradient(420px 200px at 94% -30%, rgba(245, 165, 36, 0.32) 0%, transparent 62%),
    radial-gradient(360px 200px at 0% 130%, rgba(27, 79, 216, 0.45) 0%, transparent 60%),
    linear-gradient(135deg, #0a1a38 0%, #10284f 58%, #17386d 100%);
  box-shadow: 0 26px 46px -30px rgba(10, 26, 56, 0.8);
}
/* a hairline of the brand across the top */
.at-bundle::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--at-accent), var(--at-primary));
}
/* a slow sheen that crosses the card when the pointer is on it */
.at-bundle::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 42%; left: -60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.16), transparent);
  transform: skewX(-18deg); transition: left 0.75s ease; pointer-events: none;
}
.at-bundle:hover::after { left: 120%; }
.at-bundle:hover { color: #e8eefc; transform: translateY(-4px); box-shadow: 0 34px 56px -30px rgba(10, 26, 56, 0.9); }
.at-bundle > * { position: relative; z-index: 1; }

/* the covers, fanned */
.at-bundle-covers { display: flex; align-items: center; }
.at-bundle-covers img {
  width: 66px; height: 90px; object-fit: cover; border-radius: 8px; display: block;
  box-shadow: 0 16px 26px -14px rgba(0, 0, 0, 0.75); border: 2px solid rgba(255,255,255,0.9);
  margin-left: -36px; transform: rotate(calc(-5deg + var(--i) * 5deg));
  transition: transform 0.35s cubic-bezier(0.22, 1, 0.36, 1);
}
.at-bundle-covers img:first-child { margin-left: 0; }
.at-bundle:hover .at-bundle-covers img { transform: rotate(calc(-9deg + var(--i) * 9deg)) translateY(-3px); }
.at-bundle-covers em {
  font-style: normal; font-weight: 700; font-size: 0.76rem; margin-left: 7px;
  color: var(--at-navy); background: var(--at-accent); border-radius: 100px; padding: 5px 9px;
}

.at-bundle-body { min-width: 0; }
.at-bundle-body h3 {
  font-size: 1.08rem; margin: 9px 0 4px; color: #fff; line-height: 1.35;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
}
.at-bundle-flags { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.at-bundle-badge, .at-bundle-off {
  font-style: normal; font-family: var(--at-font-head); font-weight: 700;
  font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase;
  padding: 5px 10px; border-radius: 100px;
}
.at-bundle-badge { background: var(--at-accent); color: var(--at-navy); }
.at-bundle-off { background: linear-gradient(135deg, #e11d48, #f43f5e); color: #fff; box-shadow: 0 8px 16px -8px rgba(225, 29, 72, 0.9); }
.at-bundle-count { display: block; font-size: 0.84rem; color: rgba(232, 238, 252, 0.72); }
.at-bundle-count b { color: #4ade80; font-weight: 600; }

.at-bundle-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  margin-top: 12px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.14);
}
.at-bundle-price { display: flex; align-items: baseline; gap: 8px; }
.at-bundle-price b { font-family: var(--at-font-head); font-size: 1.45rem; color: #fff; }
.at-bundle-price s { color: rgba(232, 238, 252, 0.5); font-size: 0.86rem; }
.at-bundle-go {
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.84rem; white-space: nowrap;
  color: var(--at-navy); background: var(--at-gradient-accent, var(--at-accent));
  display: inline-flex; align-items: center; gap: 7px; padding: 10px 16px; border-radius: 100px;
  box-shadow: 0 12px 22px -12px rgba(245, 165, 36, 0.9); transition: transform 0.2s;
}
.at-bundle:hover .at-bundle-go { transform: translateY(-1px); }
.at-bundle:hover .at-bundle-go i { transform: translateX(3px); }
.at-bundle-go i { transition: transform 0.2s; }

/* ---------- the lone deal, given the stage ---------- */
/* same panel, more room: bigger covers, the books listed, a larger price */
.at-bundle-solo {
  grid-template-columns: 300px 1fr; gap: 34px; padding: 34px 38px;
  box-shadow: 0 34px 60px -36px rgba(10, 26, 56, 0.85);
}
.at-bundle-solo:hover { box-shadow: 0 40px 70px -36px rgba(10, 26, 56, 0.9); }
.at-bundle-solo::before { height: 4px; }

.at-bundle-solo .at-bundle-covers { justify-content: center; }
.at-bundle-solo .at-bundle-covers img {
  width: 108px; height: 146px; border-radius: 11px; margin-left: -52px; border: 3px solid rgba(255,255,255,0.9);
  box-shadow: 0 22px 36px -18px rgba(0, 0, 0, 0.75);
}
.at-bundle-solo .at-bundle-covers em { font-size: 0.82rem; padding: 6px 11px; }

.at-bundle-solo .at-bundle-body h3 { font-size: 1.7rem; margin: 12px 0 8px; }
.at-bundle-solo .at-bundle-badge { font-size: 0.7rem; }
.at-bundle-say { color: rgba(232, 238, 252, 0.78); font-size: 0.95rem; margin: 0 0 14px; max-width: 54ch; }

.at-bundle-books { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 18px; margin-bottom: 18px; }
.at-bundle-books small {
  font-size: 0.86rem; color: rgba(232, 238, 252, 0.92); display: flex; align-items: flex-start; gap: 8px;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1;
}
.at-bundle-books small i { color: #4ade80; font-size: 0.76rem; margin-top: 4px; }
.at-bundle-more { color: rgba(232, 238, 252, 0.6) !important; font-style: italic; }

.at-bundle-solo .at-bundle-foot { padding-top: 18px; margin-top: 0; justify-content: flex-start; gap: 26px; flex-wrap: wrap; }
.at-bundle-solo .at-bundle-price b { font-size: 2.1rem; }
.at-bundle-solo .at-bundle-price s { font-size: 1rem; }

/* the saving, pinned to the corner like a ribbon */
.at-bundle-ribbon {
  position: absolute; top: 26px; right: -42px; transform: rotate(38deg);
  background: var(--at-success); color: #fff;
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.76rem;
  padding: 7px 46px; box-shadow: 0 10px 20px -10px rgba(0, 0, 0, 0.6);
}

/* the bundle's own page: the books it holds */
.at-bundle-list { display: grid; gap: 12px; }
.at-bundle-item { display: flex; align-items: center; gap: 16px; padding: 14px 18px; color: var(--at-ink-2); }
.at-bundle-item:hover { color: var(--at-ink-2); transform: translateX(4px); }
.at-bundle-item img { width: 56px; height: 76px; object-fit: cover; border-radius: 8px; flex: none; background: var(--at-bg); }
.at-bundle-item > div { flex: 1; min-width: 0; }
.at-bundle-item b { display: block; font-family: var(--at-font-head); font-size: 1rem; color: var(--at-ink); }
.at-bundle-item small { display: block; color: var(--at-muted); font-size: 0.86rem; margin: 2px 0 6px;
  overflow: hidden; display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 1; line-clamp: 1; }
.at-bundle-item-foot { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 0.8rem; }
.at-bundle-item-foot em { font-style: normal; background: var(--at-primary-soft); color: var(--at-primary); border-radius: 100px; padding: 3px 9px; }
.at-bundle-item-foot s { color: var(--at-muted); }
.at-bundle-item > i { color: var(--at-primary); }
.at-bundle-save-line { color: var(--at-success); font-size: 0.9rem; margin: 0 0 14px; }

@media (max-width: 900px) {
  .at-bundle-solo { grid-template-columns: 1fr; gap: 22px; padding: 26px 22px; text-align: center; }
  .at-bundle-solo .at-bundle-covers { justify-content: center; }
  .at-bundle-solo .at-bundle-body h3 { font-size: 1.4rem; }
  .at-bundle-say { margin-left: auto; margin-right: auto; }
  .at-bundle-books { grid-template-columns: 1fr; text-align: left; max-width: 340px; margin-left: auto; margin-right: auto; }
  .at-bundle-solo .at-bundle-flags { justify-content: center; }
  .at-bundle-solo .at-bundle-foot { justify-content: center; }
}
@media (max-width: 600px) {
  .at-bundle-strip { padding: 18px 16px 20px; }
  /* one card fills the phone, the next one peeks in from the right */
  .at-bundle-grid > * { flex: 0 0 86%; }
  .at-bundle { grid-template-columns: 92px 1fr; gap: 12px; padding: 14px; }
  .at-bundle-covers img { width: 54px; height: 72px; margin-left: -30px; }
  .at-bundle-price b { font-size: 1.12rem; }
  .at-bundle-solo { flex: 0 0 100%; max-width: none; }
  .at-bundle-solo .at-bundle-covers img { width: 84px; height: 114px; margin-left: -40px; }
  .at-bundle-solo .at-bundle-price b { font-size: 1.7rem; }
  .at-bundle-ribbon { font-size: 0.68rem; padding: 6px 42px; top: 20px; }
  .at-bundle-item { gap: 12px; padding: 12px 14px; }
}

/* ==========================================================================
   Official links on a test page

   The only block on the site that sends a reader away on purpose, so each
   one says plainly whose website it is and that it opens elsewhere.
   ========================================================================== */
.at-official { display: grid; grid-template-columns: repeat(auto-fit, minmax(330px, 1fr)); gap: 14px; }
.at-official-link {
  display: flex; align-items: flex-start; gap: 14px; padding: 18px 20px; color: var(--at-ink-2);
  border: 1px solid var(--at-border);
}
.at-official-link:hover {
  color: var(--at-ink-2); transform: translateY(-3px);
  border-color: var(--at-primary); box-shadow: 0 22px 36px -26px rgba(10, 26, 56, 0.5);
}
.at-official-icon {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary-soft); color: var(--at-primary); font-size: 1.02rem;
}
.at-official-body { flex: 1; min-width: 0; }
.at-official-body b { display: block; font-family: var(--at-font-head); font-size: 1rem; color: var(--at-ink); line-height: 1.4; }
.at-official-body small { display: block; color: var(--at-muted); font-size: 0.86rem; margin-top: 3px; line-height: 1.55; }
.at-official-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.at-official-foot em {
  font-style: normal; font-family: var(--at-font-head); font-weight: 700;
  font-size: 0.66rem; letter-spacing: 0.05em; text-transform: uppercase;
  background: var(--at-navy); color: var(--at-accent); border-radius: 100px; padding: 4px 10px;
}
.at-official-host { font-size: 0.78rem; color: var(--at-muted); }
.at-official-link > i { color: var(--at-primary); font-size: 0.82rem; margin-top: 4px; }
.at-official-note { text-align: center; color: var(--at-muted); font-size: 0.84rem; margin: 20px 0 0; }

/* ==========================================================================
   A certificate, and the page it lives on
   ========================================================================== */
.at-cert-wrap { display: grid; grid-template-columns: 1fr 360px; gap: 26px; align-items: start; }
.at-cert-paper { margin: 0; border-radius: 20px; overflow: hidden; border: 1px solid var(--at-border); background: #fff; box-shadow: 0 30px 60px -40px rgba(10, 26, 56, 0.6); }
.at-cert-paper img { display: block; width: 100%; height: auto; }

.at-cert-tag {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--at-font-head); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  background: var(--at-accent-soft); color: #b47304; border-radius: 100px; padding: 5px 12px;
}
.at-cert-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 14px 0 16px; }
.at-cert-facts div { background: var(--at-bg); border-radius: 12px; padding: 10px 12px; }
.at-cert-facts span { display: block; font-size: 0.72rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--at-muted); }
.at-cert-facts b { font-family: var(--at-font-head); font-size: 0.92rem; color: var(--at-ink); word-break: break-all; }

.at-cert-linkedin { background: #0a66c2; border-color: #0a66c2; color: #fff; }
.at-cert-linkedin:hover { background: #084e95; border-color: #084e95; color: #fff; }

/* how close the next certificate is, per test */
.at-cert-steps { display: grid; gap: 12px; }
.at-cert-step { border: 1px solid var(--at-border); border-radius: 14px; padding: 12px 15px; background: var(--at-bg); }
.at-cert-step b { font-family: var(--at-font-head); font-size: 0.95rem; color: var(--at-ink); }
.at-cert-bar { height: 8px; border-radius: 999px; background: #fff; border: 1px solid var(--at-border); overflow: hidden; margin: 9px 0 7px; }
.at-cert-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--at-accent), #e08a05); }

/* the badges a student has, on their dashboard */
.at-badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.at-badge-card {
  display: flex; align-items: center; gap: 13px; padding: 14px 16px;
  border: 1px solid var(--at-border); border-radius: 16px; background: #fff;
  color: var(--at-ink-2); transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.at-badge-card:hover { transform: translateY(-3px); border-color: var(--at-primary); box-shadow: 0 20px 34px -26px rgba(10, 26, 56, 0.5); color: var(--at-ink-2); }
.at-badge-card.is-locked { opacity: 0.72; border-style: dashed; background: var(--at-bg); }
.at-badge-medal {
  width: 46px; height: 46px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--at-font-head); font-weight: 800; font-size: 1.02rem;
  background: linear-gradient(135deg, var(--at-primary), #2f6bea); color: #fff;
}
.at-badge-card.is-locked .at-badge-medal { background: #e2e8f0; color: var(--at-muted); }
.at-badge-card b { display: block; font-family: var(--at-font-head); font-size: 0.93rem; color: var(--at-ink); line-height: 1.35; }
.at-badge-card small { font-size: 0.78rem; color: var(--at-muted); }

@media screen and (max-width: 980px) {
  .at-cert-wrap { grid-template-columns: 1fr; }
}

/* ==========================================================================
   Top 10 of the week, on a test page
   ========================================================================== */
/*
	The right hand column: the paper box, then the week's board.

	Only the paper box sticks. It lives in a wrapper that takes the space
	above the board and nothing more, so the box can follow the reader down
	the page but can never slide over the board underneath it.
*/
.at-detail-side { display: flex; flex-direction: column; gap: 22px; align-self: stretch; }

/*
	Only the paper box follows the reader, and only as far as the board.

	The wrapper takes the column's spare room, which is everything above
	the board and nothing more. The box sticks inside it, so it can never
	reach the board, and the board itself never moves.
*/
.at-side-top { flex: 1 1 auto; min-height: 0; }
.at-side-top .at-paper-box { position: sticky; top: 94px; }

.at-board-card h3 { display: flex; align-items: center; gap: 9px; font-size: 1.08rem; margin-bottom: 4px; }
.at-board-card .at-board { margin-top: 14px; }

.at-board { display: grid; gap: 8px; }

.at-board-row {
  display: flex; align-items: center; gap: 11px;
  background: #fff; border: 1px solid var(--at-border); border-radius: 14px;
  padding: 10px 12px; transition: transform 0.16s, box-shadow 0.16s, border-color 0.16s;
}
.at-board-row:hover { transform: translateX(3px); box-shadow: 0 18px 30px -26px rgba(10, 26, 56, 0.55); }

/* the three that matter */
.at-board-row.is-gold   { border-color: #e7b323; background: linear-gradient(100deg, #fffaf0, #fff); }
.at-board-row.is-silver { border-color: #b8c2cf; background: linear-gradient(100deg, #f8fafc, #fff); }
.at-board-row.is-bronze { border-color: #cd8c52; background: linear-gradient(100deg, #fdf7f1, #fff); }
.at-board-row.is-me { border-color: var(--at-primary); box-shadow: 0 0 0 3px var(--at-primary-soft); }

.at-board-place {
  width: 38px; flex: none; display: flex; align-items: center; gap: 4px;
  font-family: var(--at-font-head); font-weight: 800; font-size: 0.95rem; color: var(--at-muted);
}
.at-board-place i { font-size: 1.02rem; }
.at-board-row.is-gold   .at-board-place { color: #c9971a; }
.at-board-row.is-silver .at-board-place { color: #8b97a6; }
.at-board-row.is-bronze .at-board-place { color: #b47340; }

.at-board-face {
  width: 36px; height: 36px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary-soft); color: var(--at-primary);
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.78rem;
}
.at-board-face img { width: 100%; height: 100%; object-fit: cover; }
.at-board-row.is-gold .at-board-face   { background: #fdf1cf; color: #b8860b; }
.at-board-row.is-silver .at-board-face { background: #eef2f7; color: #6b7a8c; }
.at-board-row.is-bronze .at-board-face { background: #f9eade; color: #a8622f; }

.at-board-who { flex: 1; min-width: 0; }
.at-board-who b { display: block; font-family: var(--at-font-head); font-size: 0.92rem; color: var(--at-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-board-who small { font-size: 0.75rem; color: var(--at-muted); }

.at-board-score {
  flex: none; font-family: var(--at-font-head); font-weight: 800; font-size: 1.05rem; color: var(--at-ink);
}

/* nothing sat yet this week */
.at-board-empty { text-align: center; padding: 22px 10px; color: var(--at-muted); }
.at-board-empty i { font-size: 1.6rem; color: var(--at-border); display: block; margin-bottom: 8px; }
.at-board-empty b { display: block; font-family: var(--at-font-head); font-size: 0.95rem; color: var(--at-ink); }
.at-board-empty span { font-size: 0.84rem; }
.at-board-row.is-gold .at-board-score { color: #b8860b; }

/* the standing shown on a student's own result card */
.at-rank { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; border: 1px solid var(--at-primary); background: linear-gradient(135deg, #fff, var(--at-primary-soft)); }
.at-rank-badge {
  width: 58px; height: 58px; border-radius: 18px; flex: none;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  background: var(--at-primary); color: #fff; line-height: 1.1;
}
.at-rank-badge i { font-size: 0.86rem; opacity: 0.85; }
.at-rank-badge b { font-family: var(--at-font-head); font-size: 1.05rem; }
.at-rank-badge.is-top { background: linear-gradient(135deg, #f5a524, #d98306); }
.at-rank-body { flex: 1; min-width: 220px; }
.at-rank-body b { display: block; font-family: var(--at-font-head); font-size: 1.04rem; color: var(--at-ink); }
.at-rank-body p { margin: 3px 0 0; font-size: 0.88rem; line-height: 1.55; }
.at-rank-act { display: flex; gap: 9px; flex-wrap: wrap; }

/* the reader's own line, when they did not make the ten */
.at-board-you {
  display: flex; align-items: center; gap: 11px; margin-top: 8px;
  border: 1px dashed var(--at-primary); border-radius: 14px; padding: 10px 12px;
  background: var(--at-primary-soft);
}
.at-board-note { text-align: center; color: var(--at-muted); font-size: 0.82rem; margin: 14px 0 0; }
.at-board-note i { margin-right: 5px; }

@media screen and (max-width: 520px) {
  .at-board-row, .at-board-you { padding: 10px 11px; gap: 9px; }
  .at-board-place { width: 34px; font-size: 0.9rem; }
  .at-board-face { width: 34px; height: 34px; }
}

/* ==========================================================================
   Exam info on a test page : dates, fee, eligibility and the past papers
   ========================================================================== */
.at-exam-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }

.at-exam-card {
  position: relative; overflow: hidden; padding: 22px 22px 20px;
  border: 1px solid var(--at-border);
  --fact: var(--at-primary); --fact-soft: var(--at-primary-soft);
}
.at-exam-card.tone-gold  { --fact: #c97c04; --fact-soft: #fff3da; }
.at-exam-card.tone-green { --fact: #0f9d58; --fact-soft: #d7f5e5; }
.at-exam-card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 3px; background: var(--fact);
}
.at-exam-icon {
  width: 46px; height: 46px; border-radius: 14px; margin-bottom: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--fact-soft); color: var(--fact); font-size: 1.05rem;
}
.at-exam-label {
  display: block; font-family: var(--at-font-head); font-weight: 700;
  font-size: 0.7rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--at-muted);
}
.at-exam-head {
  display: block; font-family: var(--at-font-head); font-size: 1.32rem; line-height: 1.3;
  color: var(--at-ink); margin-top: 5px;
}
.at-exam-list { list-style: none; margin: 14px 0 0; padding: 0; }
.at-exam-list li {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 0.9rem; color: var(--at-ink-2); line-height: 1.55;
  padding: 7px 0; border-top: 1px dashed var(--at-border);
}
.at-exam-list li:first-child { border-top: 0; padding-top: 4px; }
.at-exam-list li i { color: var(--fact); font-size: 0.74rem; margin-top: 5px; flex: none; }

/* the past papers under the three boxes */
.at-papers { margin-top: 26px; }
.at-papers-head { margin-bottom: 14px; }
.at-papers-head h3 { font-size: 1.18rem; margin: 0 0 3px; }
.at-papers-head h3 i { color: #ef4444; margin-right: 6px; }
.at-papers-head p { color: var(--at-muted); font-size: 0.9rem; margin: 0; }

.at-paper-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 13px; }
.at-paper {
  display: flex; align-items: center; gap: 13px; padding: 15px 18px;
  color: var(--at-ink-2); border: 1px solid var(--at-border);
}
.at-paper:hover {
  color: var(--at-ink-2); transform: translateY(-3px);
  border-color: var(--at-primary); box-shadow: 0 22px 36px -26px rgba(10, 26, 56, 0.5);
}
.at-paper-icon {
  width: 42px; height: 42px; flex: none; border-radius: 13px;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fee2e2; color: #ef4444; font-size: 1.02rem;
}
.at-paper.is-link .at-paper-icon { background: var(--at-primary-soft); color: var(--at-primary); }
.at-paper-body { flex: 1; min-width: 0; }
.at-paper-body b { display: block; font-family: var(--at-font-head); font-size: 0.98rem; color: var(--at-ink); line-height: 1.4; }
.at-paper-body small { display: block; color: var(--at-muted); font-size: 0.82rem; margin-top: 2px; }
.at-paper > i { color: var(--at-primary); font-size: 0.86rem; }

@media screen and (max-width: 640px) {
  .at-exam-card { padding: 18px 16px; }
  .at-exam-head { font-size: 1.16rem; }
}

/* ==========================================================================
   The student's own account page
   ========================================================================== */
.at-account { display: grid; grid-template-columns: 320px 1fr; gap: 24px; align-items: start; }

.at-account-card { text-align: center; position: sticky; top: 94px; }
.at-account-card h3 { margin: 14px 0 2px; font-size: 1.12rem; }
.at-account-card p { color: var(--at-muted); font-size: 0.88rem; margin: 0 0 16px; word-break: break-word; }

.at-account-photo {
  width: 104px; height: 104px; border-radius: 50%; margin: 0 auto; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  background: var(--at-gradient-accent, var(--at-accent)); color: var(--at-navy);
  font-family: var(--at-font-head); font-weight: 800; font-size: 2rem;
  box-shadow: 0 16px 30px -18px rgba(10, 26, 56, 0.7);
}
.at-account-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.at-account-photo em { font-style: normal; }
.at-account-photo-sm { width: 76px; height: 76px; font-size: 1.4rem; margin: 0; flex: none; }

.at-account-facts {
  display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 16px;
  border-top: 1px solid var(--at-border); border-bottom: 1px solid var(--at-border); padding: 14px 0;
}
.at-account-facts strong { display: block; font-family: var(--at-font-head); font-size: 1.3rem; color: var(--at-ink); }
.at-account-facts span { font-size: 0.78rem; color: var(--at-muted); }

/* choosing a picture */
.at-photo-row { display: flex; align-items: center; gap: 18px; margin-bottom: 20px; flex-wrap: wrap; }
.at-photo-row .at-field-note { display: block; margin-top: 8px; }

/* the invite link: read only, with the copy button beside it */
.at-refer { border: 1px solid var(--at-accent); background: linear-gradient(180deg, #fff, var(--at-accent-soft)); }
.at-refer-box { display: flex; gap: 10px; margin: 14px 0 12px; flex-wrap: wrap; }
.at-refer-box input {
  flex: 1; min-width: 220px; padding: 13px 16px; border-radius: 12px;
  border: 1px solid var(--at-border); background: #fff; color: var(--at-ink);
  font-family: var(--at-font-head); font-size: 0.94rem; cursor: pointer;
}
.at-refer-box input:focus { outline: 2px solid var(--at-primary); outline-offset: 1px; }
.at-refer-box .at-btn.is-done { background: var(--at-success); }
.at-refer-share { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }

/* ==========================================================================
   Sharing a result : the sheet on the card, and the public page it opens
   ========================================================================== */
.at-sharesheet {
  position: fixed; inset: 0; z-index: 1400;
  display: flex; align-items: center; justify-content: center; padding: 20px;
  background: rgba(10, 26, 56, 0.55); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.2s;
}
.at-sharesheet.is-open { opacity: 1; }
.at-sharesheet-box {
  width: 100%; max-width: 520px; background: #fff; border-radius: 20px; padding: 24px;
  box-shadow: 0 40px 80px -30px rgba(10, 26, 56, 0.6);
  transform: translateY(14px); transition: transform 0.2s;
}
.at-sharesheet.is-open .at-sharesheet-box { transform: none; }
.at-sharesheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.at-sharesheet-head h3 { margin: 0 0 3px; font-size: 1.16rem; }
.at-sharesheet-head p { margin: 0; font-size: 0.88rem; line-height: 1.55; }
.at-sharesheet-close {
  width: 34px; height: 34px; border-radius: 50%; flex: none; cursor: pointer;
  border: 1px solid var(--at-border); background: #fff; color: var(--at-muted);
}
.at-sharesheet-close:hover { background: var(--at-bg); color: var(--at-ink); }

.at-sharesheet-apps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.at-share-app {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 7px;
  padding: 14px 8px; border-radius: 14px; border: 1px solid var(--at-border);
  font-size: 0.8rem; color: var(--at-ink-2); background: #fff; transition: transform 0.15s, box-shadow 0.15s;
}
.at-share-app i { font-size: 1.24rem; }
.at-share-app:hover { transform: translateY(-2px); box-shadow: 0 16px 28px -20px rgba(10, 26, 56, 0.5); color: var(--at-ink); }
.at-share-app.is-wa i { color: #25d366; }
.at-share-app.is-fb i { color: #1877f2; }
.at-share-app.is-x  i { color: #0f172a; }
.at-share-app.is-in i { color: #0a66c2; }
.at-share-app.is-tg i { color: #29a9eb; }
.at-share-app.is-eye i { color: var(--at-primary); }

/* the call to action at the foot of a shared card */
.at-share-cta { padding: 40px 26px; border: 1px solid var(--at-primary); background: linear-gradient(180deg, #fff, var(--at-primary-soft)); }
.at-share-cta h2 { margin: 12px 0 6px; font-size: 1.5rem; }
.at-share-cta p { max-width: 560px; margin: 0 auto 18px; }
.at-share-cta-icon {
  width: 56px; height: 56px; border-radius: 18px; display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary); color: #fff; font-size: 1.3rem;
}
.at-share-cta-small { margin: 16px 0 0 !important; font-size: 0.8rem; color: var(--at-muted); }

@media screen and (max-width: 520px) {
  .at-sharesheet-box { padding: 18px; border-radius: 16px; }
  .at-sharesheet-apps { grid-template-columns: repeat(2, 1fr); }
}

/* ==========================================================================
   A slider that is really a scrolling row : no library, works without js
   ========================================================================== */
.at-slider { position: relative; }
.at-slider-track {
  /* proximity, not mandatory: mandatory fights the arrows and drags the row back */
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x proximity;
  scroll-behavior: smooth; padding: 4px 2px 6px; margin: 0 -2px;
  scrollbar-width: none; -ms-overflow-style: none;
}
.at-slider-track::-webkit-scrollbar { display: none; }
.at-slide { flex: 0 0 calc((100% - 40px) / 3); scroll-snap-align: start; display: flex; }
.at-slide > * { width: 100%; display: flex; flex-direction: column; }

/*
	A quote inside a slider is a column: the words take whatever room they
	need, the person is pushed to the foot of the card, and every card in
	the row ends up the same height with the names on one line.
*/
.at-slider .at-quote p {
  flex: 1;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 7;
  overflow: hidden; margin-bottom: 0;
}
.at-slider .at-quote-author {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--at-border);
}

/*
	A book or a post inside a slider is a card like any other, but all three
	in a row have to end up the same height, so the body stretches and the
	price line is pushed to the foot.
*/
.at-slider .at-book-card,
.at-slider .at-blog-card { height: 100%; }
.at-slider .at-book-body,
.at-slider .at-blog-body { flex: 1; display: flex; flex-direction: column; }
.at-slider .at-book-body p,
.at-slider .at-blog-body p {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3;
  overflow: hidden;
}
.at-slider .at-book-foot,
.at-slider .at-blog-body .at-link-arrow { margin-top: auto; }

/* a bundle in that row fans its covers out, the way the deals strip does */
/*
	A short shelf does not scroll.

	One or two cards in a scrolling row sit against the left edge with the
	rest of the band empty beside them, so a short shelf is centred instead
	and the arrows and dots are not drawn at all.
*/
.at-shelf-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px; }
.at-shelf-row > .at-book-card { width: 100%; max-width: 330px; }

.at-shelf-bundle .at-book-cover { display: flex; align-items: center; justify-content: center; gap: 0; }
.at-shelf-bundle .at-book-cover img {
  width: 46%; height: auto; border-radius: 8px;
  box-shadow: 0 10px 24px -14px rgba(10, 26, 56, 0.7);
  margin-left: -14%; transform: rotate(calc(var(--i) * 4deg - 4deg));
}
.at-shelf-bundle .at-book-cover img:first-child { margin-left: 0; }

.at-slider-arrow {
  position: absolute; top: 50%; transform: translateY(-50%); z-index: 2;
  width: 44px; height: 44px; border-radius: 50%; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--at-ink); border: 1px solid var(--at-border);
  box-shadow: 0 14px 30px -18px rgba(10, 26, 56, 0.6);
  transition: background 0.16s, color 0.16s, opacity 0.16s;
}
.at-slider-arrow:hover { background: var(--at-primary); color: #fff; border-color: var(--at-primary); }
.at-slider-arrow.prev { left: -18px; }
.at-slider-arrow.next { right: -18px; }
.at-slider-arrow[disabled] { opacity: 0.35; pointer-events: none; }

.at-slider-dots { display: flex; justify-content: center; gap: 7px; margin-top: 16px; }
.at-slider-dots button {
  width: 8px; height: 8px; padding: 0; border: 0; border-radius: 50%; cursor: pointer;
  background: var(--at-border); transition: width 0.2s, background 0.2s;
}
.at-slider-dots button.is-on { width: 26px; border-radius: 100px; background: var(--at-primary); }

@media screen and (max-width: 1100px) {
  .at-slide { flex-basis: calc((100% - 20px) / 2); }
  .at-slider-arrow.prev { left: -6px; }
  .at-slider-arrow.next { right: -6px; }
}
@media screen and (max-width: 720px) {
  .at-slide { flex-basis: 100%; }
  .at-slider-arrow { display: none; }
}

/* ---------- the stories, as the website shows them ---------- */
.at-story-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 20px; align-items: start; }
.at-story-card { padding: 0; overflow: hidden; display: flex; flex-direction: column; }
.at-story-media-box { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; display: block; background: #0a1a38; }
.at-story-embed { position: relative; padding-top: 56.25%; background: #0a1a38; }
.at-story-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.at-story-card-body { padding: 20px 22px 22px; display: flex; flex-direction: column; gap: 9px; flex: 1; }
.at-story-score {
  display: inline-flex; align-items: center; gap: 7px; align-self: flex-start;
  font-family: var(--at-font-head); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: var(--at-accent-soft); color: #b47304; border-radius: 100px; padding: 5px 12px;
}
.at-story-card h3 { margin: 2px 0 0; font-size: 1.08rem; line-height: 1.45; color: var(--at-ink); }
.at-story-card p { margin: 0; font-size: 0.92rem; line-height: 1.68; color: var(--at-ink-2); }
.at-story-thumbs { display: flex; gap: 8px; flex-wrap: wrap; }
.at-story-thumbs img { width: 68px; height: 68px; object-fit: cover; border-radius: 10px; border: 1px solid var(--at-border); }
.at-story-by { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--at-border); display: flex; align-items: center; gap: 11px; }
.at-story-by b { display: block; font-family: var(--at-font-head); font-size: 0.95rem; color: var(--at-ink); }
.at-story-by span { font-size: 0.8rem; color: var(--at-muted); }
.at-story-face {
  width: 42px; height: 42px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary-soft); color: var(--at-primary);
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.86rem;
}
.at-story-face img { width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   The success story a student writes on their own result card
   ========================================================================== */
.at-story { border: 1px solid var(--at-accent); background: linear-gradient(180deg, #fff, var(--at-accent-soft)); }
.at-story-head, .at-story-done { display: flex; align-items: flex-start; gap: 14px; }
.at-story-head h3, .at-story-done h3 { margin: 0 0 4px; font-size: 1.16rem; }
.at-story-head p, .at-story-done > div > p { margin: 0; font-size: 0.92rem; line-height: 1.6; }
.at-story-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-accent); color: #fff; font-size: 1.1rem;
}

/* the folded story form: closed to begin with, opened by the button in its head */
.at-story-toggle { margin-left: auto; align-self: center; flex: none; white-space: nowrap; }
.at-story-body { display: none; }
.at-story-body.is-open { display: block; animation: at-story-open 0.22s ease; }
@keyframes at-story-open { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

.at-story-form { margin-top: 16px; display: grid; gap: 14px; }
.at-story-form textarea { resize: vertical; min-height: 120px; line-height: 1.6; }
.at-story-form input[type="file"] { padding: 11px 14px; background: #fff; cursor: pointer; }
.at-story-media { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.at-story-check {
  display: flex; align-items: flex-start; gap: 10px;
  font-size: 0.88rem; line-height: 1.6; color: var(--at-ink-2);
  background: #fff; border: 1px solid var(--at-border); border-radius: 12px; padding: 12px 14px;
}
.at-story-check input { margin-top: 3px; flex: none; width: 18px; height: 18px; accent-color: var(--at-primary); }
.at-story-check.is-consent { border-color: var(--at-accent); background: #fffdf7; }
.at-story-small { margin: 0; font-size: 0.82rem; color: var(--at-muted); }

.at-story-quote { display: block; margin: 10px 0 4px; font-family: var(--at-font-head); font-size: 1.04rem; color: var(--at-ink); }
.at-story-text { margin: 6px 0 0; font-size: 0.92rem; line-height: 1.65; color: var(--at-ink-2); }
.at-story-shots { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 11px; }
.at-story-shots img { width: 92px; height: 92px; object-fit: cover; border-radius: 12px; border: 1px solid var(--at-border); }

@media screen and (max-width: 640px) {
  .at-story-media { grid-template-columns: 1fr; }
  .at-story-head, .at-story-done { flex-direction: column; gap: 10px; }
  .at-story-toggle { margin-left: 0; }
}

/* the offer in the book's dark banner */
.at-hero-free {
  display: flex; align-items: flex-start; gap: 10px;
  margin: 14px 0 2px; padding: 11px 14px; border-radius: 14px;
  background: rgba(245, 165, 36, 0.14); border: 1px solid rgba(245, 165, 36, 0.45);
  color: #f3f6ff; font-size: 0.9rem; line-height: 1.5;
  transition: background 0.18s, border-color 0.18s;
}
.at-hero-free:hover { background: rgba(245, 165, 36, 0.24); border-color: var(--at-accent); color: #fff; }
.at-hero-free i { color: var(--at-accent); margin-top: 3px; }
.at-hero-free b { color: #fff; }

/* the one liner next to the price */
.at-buy-free {
  display: flex; align-items: flex-start; gap: 9px; margin-top: 12px;
  padding: 11px 12px; border-radius: 12px;
  background: var(--at-accent-soft); border: 1px dashed var(--at-accent);
  font-size: 0.84rem; line-height: 1.5; color: var(--at-ink-2);
}
.at-buy-free:hover { color: var(--at-ink); border-style: solid; }
.at-buy-free i { color: var(--at-accent-dark, #c97c04); margin-top: 2px; }
.at-buy-free b { color: var(--at-ink); }

/* ---------- "or get it free" on a book or a bundle ---------- */
.at-freebox {
  display: flex; align-items: flex-start; gap: 15px; margin-top: 16px;
  border: 1px solid var(--at-accent); background: linear-gradient(135deg, #fff, var(--at-accent-soft));
}
.at-freebox.is-earned { border-color: #16a34a; background: linear-gradient(135deg, #fff, #eafaf0); }
.at-freebox-icon {
  width: 46px; height: 46px; border-radius: 14px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-accent); color: #fff; font-size: 1.1rem;
}
.at-freebox.is-earned .at-freebox-icon { background: #16a34a; }
.at-freebox-body { flex: 1; min-width: 0; }
.at-freebox-body b { display: block; font-family: var(--at-font-head); font-size: 1.02rem; color: var(--at-ink); line-height: 1.4; }
.at-freebox-body p { margin: 4px 0 0; font-size: 0.9rem; color: var(--at-ink-2); line-height: 1.55; }
.at-freebox-bar { height: 8px; border-radius: 999px; background: #fff; border: 1px solid var(--at-border); overflow: hidden; margin: 11px 0 0; }
.at-freebox-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--at-accent), #e08a05); }
.at-freebox-actions { display: flex; gap: 9px; flex-wrap: wrap; margin-top: 12px; }

@media screen and (max-width: 540px) {
  .at-freebox { flex-direction: column; gap: 11px; }
}

/* ---------- the invite reward ---------- */
.at-reward { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--at-accent); }
.at-reward-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; font-size: 0.92rem; color: var(--at-ink-2); }
.at-reward-head b { font-size: 1.05rem; color: var(--at-ink); }
.at-reward-head em { font-style: normal; font-size: 0.8rem; color: var(--at-muted); }

.at-reward-bar { height: 10px; border-radius: 999px; background: #fff; border: 1px solid var(--at-border); overflow: hidden; margin: 9px 0 12px; }
.at-reward-bar i { display: block; height: 100%; background: linear-gradient(90deg, var(--at-accent), #e08a05); transition: width 0.4s; }

.at-reward-dots { display: flex; gap: 8px; margin-bottom: 12px; }
.at-reward-dots span {
  width: 34px; height: 34px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 1px dashed var(--at-border); color: var(--at-muted-2, #94a3b8); font-size: 0.8rem;
}
.at-reward-dots span.is-done { background: var(--at-accent); border: 1px solid var(--at-accent); color: #fff; }

.at-reward-note {
  display: flex; align-items: flex-start; gap: 9px;
  font-size: 0.89rem; line-height: 1.55; color: var(--at-ink-2);
  background: #fff; border: 1px solid var(--at-border); border-radius: 12px; padding: 11px 13px;
}
.at-reward-note i { margin-top: 3px; color: var(--at-primary); }
.at-reward-note.is-good { background: #f0fdf4; border-color: #cdebd8; color: #14532d; }
.at-reward-note.is-good i { color: #16a34a; }
.at-reward-note.is-wait { background: #fff7ed; border-color: #f6ddc0; color: #7c4a06; }
.at-reward-note.is-wait i { color: #ea8a0b; }

.at-reward-friends { margin-top: 14px; display: grid; gap: 6px; }
.at-reward-friend { display: flex; align-items: center; gap: 10px; background: #fff; border: 1px solid var(--at-border); border-radius: 12px; padding: 8px 11px; }
.at-reward-face {
  width: 30px; height: 30px; border-radius: 50%; flex: none; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary-soft); color: var(--at-primary);
  font-family: var(--at-font-head); font-size: 0.72rem; font-weight: 700;
}
.at-reward-face img { width: 100%; height: 100%; object-fit: cover; }
.at-reward-name { flex: 1; min-width: 0; font-size: 0.9rem; color: var(--at-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.at-reward-state { font-size: 0.78rem; color: var(--at-muted); white-space: nowrap; }
.at-reward-state.is-done { color: #16a34a; font-weight: 600; }

/* the student's own picture, wherever they are shown */
.at-avatar-photo { padding: 0; overflow: hidden; }
.at-avatar-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* beside their name on the result card */
.at-result-face {
  width: 26px; height: 26px; border-radius: 50%; object-fit: cover;
  vertical-align: -8px; margin-right: 8px; border: 2px solid rgba(255,255,255,0.75);
}

@media (max-width: 900px) {
  .at-account { grid-template-columns: 1fr; }
  .at-account-card { position: static; }
}

/* ---------- pager under a list of cards ---------- */
.at-pager {
  display: flex; align-items: center; justify-content: center;
  gap: 10px; flex-wrap: wrap; margin-top: 40px;
}
.at-pager-btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 11px 18px; border-radius: 12px;
  border: 1px solid var(--at-border); background: #fff;
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.9rem;
  color: var(--at-ink-2); transition: all 0.2s;
}
.at-pager-btn:hover { border-color: var(--at-primary); color: var(--at-primary); background: var(--at-primary-soft); }
.at-pager-btn.is-off { opacity: 0.4; pointer-events: none; }
.at-pager-nums { display: flex; align-items: center; gap: 6px; }
.at-pager-num {
  min-width: 42px; height: 42px; padding: 0 10px; border-radius: 12px;
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--at-border); background: #fff;
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.9rem;
  color: var(--at-ink-2); transition: all 0.2s;
}
.at-pager-num:hover { border-color: var(--at-primary); color: var(--at-primary); background: var(--at-primary-soft); }
.at-pager-num.is-on { background: var(--at-primary); border-color: var(--at-primary); color: #fff; }
.at-pager-gap { color: var(--at-muted); padding: 0 2px; }
/* "page 2 of 5" beside the count above the cards */
.at-pager-note {
  display: inline-block; margin-left: 10px; padding: 3px 10px; border-radius: 100px;
  background: var(--at-primary-soft); color: var(--at-primary); font-size: 0.78rem; font-weight: 600;
}
@media (max-width: 600px) {
  .at-pager-btn span { display: none; }
  .at-pager-num { min-width: 38px; height: 38px; }
}

/* ---------- How it works ---------- */
.at-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; position: relative; counter-reset: step; }
.at-step { position: relative; padding: 32px 24px 28px; text-align: center; }
.at-step-num {
  width: 56px; height: 56px; border-radius: 18px; margin: 0 auto 18px;
  background: linear-gradient(145deg,
    var(--tone, var(--at-primary)),
    color-mix(in srgb, var(--tone, var(--at-primary)) 60%, #000));
  color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--at-font-head); font-weight: 800; font-size: 1.25rem;
  box-shadow: 0 14px 24px -14px color-mix(in srgb, var(--tone, var(--at-primary)) 90%, transparent);
}
.at-step h4 { margin-bottom: 8px; }
.at-step p { color: var(--at-muted); font-size: 0.93rem; margin: 0; }
/*
	On a navy section that grey is almost the background. Anything written
	inside a dark panel is lifted to a light ink, and it is written here,
	after the panels' own colours, so nothing can quietly override it.
*/
.at-section-dark .at-step p,
.at-section-dark .at-card p,
.at-section-dark .at-card .at-muted,
.at-dark .at-step p,
.at-dark .at-card p,
.at-dark .at-card .at-muted { color: rgba(255, 255, 255, 0.82); }

.at-section-dark .at-step h4,
.at-section-dark .at-card h3,
.at-section-dark .at-card h4,
.at-dark .at-step h4,
.at-dark .at-card h3,
.at-dark .at-card h4 { color: #fff; }

/* ---------- Features ---------- */
.at-feature { display: flex; gap: 18px; align-items: flex-start; }
.at-feature-icon {
  flex: 0 0 52px; width: 52px; height: 52px; border-radius: 15px;
  background: var(--tone-soft, var(--at-primary-soft)); color: var(--tone-ink, var(--at-primary));
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.3rem;
  box-shadow: inset 0 0 0 1.5px color-mix(in srgb, var(--tone, var(--at-primary)) 26%, transparent);
}
.at-feature h4 { margin-bottom: 6px; }
.at-feature p { color: var(--at-muted); font-size: 0.95rem; margin: 0; }
.at-features-split { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; }
.at-features-list { display: grid; gap: 28px; }
.at-result-preview { background: var(--at-surface); border-radius: 22px; padding: 28px; box-shadow: var(--at-shadow-lg); border: 1px solid var(--at-border); }
.at-result-preview .score { display: flex; align-items: center; gap: 22px; margin-bottom: 20px; }
.at-result-preview .score strong { font-family: var(--at-font-head); font-size: 2.4rem; font-weight: 800; color: var(--at-ink); line-height: 1; }
.at-result-preview .score span { color: var(--at-muted); font-size: 0.9rem; }

/* ---------- Stats band ---------- */
.at-stats-band { padding: 64px 0; }
.at-stats-band .at-grid { text-align: center; }
.at-stats-band strong {
  display: block; font-family: var(--at-font-head); font-size: 2.7rem; font-weight: 800;
  background: var(--at-gradient-accent); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.at-stats-band span { color: rgba(255,255,255,0.6); font-size: 0.92rem; }

/* ---------- Testimonials ---------- */
.at-quote { position: relative; }
.at-quote .q-mark { font-size: 2rem; color: var(--at-primary-soft); position: absolute; top: 18px; right: 22px; }
.at-quote p { color: var(--at-ink-2); font-size: 0.98rem; }
.at-quote-author { display: flex; align-items: center; gap: 12px; margin-top: 16px; }
.at-avatar { width: 42px; height: 42px; border-radius: 50%; background: var(--at-gradient-blue); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-family: var(--at-font-head); font-weight: 700; font-size: 0.9rem; }
.at-quote-author strong { display: block; font-size: 0.92rem; color: var(--at-ink); }
.at-quote-author span { font-size: 0.8rem; color: var(--at-muted); }
.at-stars { color: var(--at-warning); font-size: 0.85rem; margin-bottom: 10px; }

/* ---------- CTA band ---------- */
.at-cta {
  border-radius: 28px; padding: 60px 48px; text-align: center;
  box-shadow: var(--at-shadow-lg);
}
.at-cta h2 { color: #fff; font-size: 2rem; }
.at-cta p { color: rgba(255,255,255,0.78); font-size: 1.08rem; max-width: 560px; margin: 0 auto 28px; }

/* ---------- Footer ---------- */
.at-footer {
  background: var(--at-navy); color: #c3cde0; padding: 64px 0 28px;
  position: relative; overflow: hidden;
  /* one gold hairline across the top, so the footer starts rather than just happens */
  border-top: 3px solid transparent;
  border-image: var(--at-gradient-accent) 1;
}
.at-footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; padding-bottom: 40px; border-bottom: 1px solid rgba(255,255,255,0.08); }
.at-footer .at-brand, .at-footer .at-brand:hover { color: #fff; }
.at-footer-brand p { font-size: 0.93rem; color: rgba(255,255,255,0.58); margin: 16px 0 20px; max-width: 320px; }
.at-social { display: flex; gap: 8px; }
.at-social a { width: 38px; height: 38px; border-radius: 10px; background: rgba(255,255,255,0.07); color: #fff; display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s; }
.at-social a:hover { background: var(--at-accent); color: #1c1403; transform: translateY(-2px); }
.at-footer-col h4 { color: var(--at-accent); font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; margin-bottom: 18px; }
.at-footer-col ul { list-style: none; padding: 0; margin: 0; }
.at-footer-col li { margin-bottom: 10px; }
.at-footer-col a { color: rgba(255,255,255,0.62); font-size: 0.95rem; }
.at-footer-col a:hover { color: #fff; }
.at-footer-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding-top: 24px; font-size: 0.85rem; color: rgba(255,255,255,0.48); }
.at-back2top {
  position: fixed; right: 22px; bottom: 22px; width: 46px; height: 46px; border-radius: 14px; background: var(--at-primary); color: #fff;
  display: flex; align-items: center; justify-content: center; font-size: 1.2rem; box-shadow: var(--at-shadow-lg); z-index: 900;
  opacity: 0; visibility: hidden; transform: translateY(12px); transition: all 0.25s;
}
.at-back2top.show { opacity: 1; visibility: visible; transform: none; }
.at-back2top:hover { color: #fff; background: var(--at-primary-dark); }

/* ---------- Inner page head ---------- */
/*
	A page head is a third of the height of the hero, so the warm light that
	works behind a tall hero only reads as a smudge here. These shorter
	blocks keep the blue lights and drop the gold one.
*/
.at-page-head, .at-book-head, .at-section-dark {
  background:
    radial-gradient(900px 420px at 10% -20%, #1c4a93 0%, transparent 60%),
    radial-gradient(760px 380px at 95% 0%, #2a2f7a 0%, transparent 58%),
    linear-gradient(160deg, #0a1a38 0%, #0d2147 60%, #0a1a38 100%);
  background-color: var(--at-navy);
}
.at-page-head { padding: 66px 0; }
.at-page-head h1 { color: #fff; font-size: 2.6rem; margin-bottom: 8px; }
.at-page-head h1 mark {
  background: none; background-image: var(--at-gradient-accent);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
/*
	The line under the title of a page.

	It is given the width of the band rather than a narrow column, and then
	held to two lines: a long description used to run on for four or five
	and push the whole header down the screen.
*/
.at-page-head p {
  color: rgba(255,255,255,0.75); max-width: 980px; margin: 0; font-size: 1.05rem;
  display: -webkit-box; -webkit-box-orient: vertical;
  -webkit-line-clamp: 2; line-clamp: 2;
  overflow: hidden;
}
.at-page-head .at-container { position: relative; z-index: 1; }
.at-breadcrumb { display: flex; gap: 8px; font-size: 0.85rem; color: rgba(255,255,255,0.6); margin-bottom: 14px; }
.at-breadcrumb a { color: #fff; }

/* ---------- Test detail ---------- */
.at-detail-layout { display: grid; grid-template-columns: 1fr 380px; gap: 32px; align-items: start; }
.at-chapter-list { display: grid; gap: 12px; }
/*
	Each row wears its subject's hue: a tinted edge, a matching wash on hover
	and a bar in the same colour. The c-* class on the row sets --tone.
*/
.at-chapter {
  /* minmax(0,…) so a long section name shrinks instead of widening the page */
  display: grid; grid-template-columns: 54px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 16px 20px;
  background: var(--at-surface);
  border: 1px solid var(--at-border);
  border-left: 4px solid var(--tone, var(--at-primary));
  border-radius: 14px;
  transition: background 0.2s, box-shadow 0.2s, transform 0.2s;
}
.at-chapter:hover {
  background: linear-gradient(90deg, var(--tone-soft, var(--at-primary-soft)) 0%, var(--at-surface) 60%);
  box-shadow: 0 10px 24px -16px rgba(15, 23, 42, 0.35);
  transform: translateX(2px);
}
.at-chapter h4 { margin: 0 0 2px; font-size: 1rem; }
.at-chapter small { color: var(--at-muted); }
.at-chapter-right { display: flex; align-items: center; gap: 14px; }
.at-chapter-percent { text-align: right; }
.at-chapter-percent strong { display: block; font-family: var(--at-font-head); font-size: 1.15rem; color: var(--at-ink); }
.at-chapter-percent span { font-size: 0.78rem; color: var(--at-muted); }
.at-chapter-bar { grid-column: 1 / -1; height: 6px; background: var(--at-bg); border-radius: 100px; overflow: hidden; }
.at-chapter-bar i {
  display: block; height: 100%; border-radius: 100px;
  background: linear-gradient(90deg, var(--tone, var(--at-primary)) 0%, color-mix(in srgb, var(--tone, var(--at-primary)) 45%, #fff) 100%);
}

/* ==========================================================================
   Blog
   ========================================================================== */
.at-blog-filter { display: flex; flex-wrap: wrap; gap: 8px; }
.at-blog-filter a {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--at-font-head); font-size: 0.88rem; font-weight: 600;
  color: var(--at-ink-2); background: var(--at-surface);
  border: 1.5px solid var(--at-border); border-radius: 100px; padding: 8px 16px;
  transition: all 0.16s;
}
.at-blog-filter a span {
  font-size: 0.72rem; background: var(--at-bg); color: var(--at-muted);
  padding: 2px 7px; border-radius: 100px;
}
.at-blog-filter a:hover { border-color: var(--at-primary); color: var(--at-primary); }
.at-blog-filter a.is-on { background: var(--at-primary); border-color: var(--at-primary); color: #fff; }
.at-blog-filter a.is-on span { background: rgba(255, 255, 255, 0.22); color: #fff; }

.at-blog-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  color: var(--at-ink-2); transition: transform 0.25s, box-shadow 0.25s;
}
.at-blog-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(15, 23, 42, 0.25); color: var(--at-ink-2); }
/*
  Blog banners are drawn at 1200 by 630 with the headline inside them, so
  the frame is that shape and the picture is fitted, not cropped. A banner
  of any other shape still shows whole, on the soft panel behind it.
*/
.at-blog-thumb { display: block; aspect-ratio: 1200 / 630; background: var(--at-primary-soft); overflow: hidden; }
.at-blog-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.35s; }
.at-blog-card:hover .at-blog-thumb img { transform: scale(1.04); }
.at-blog-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.at-blog-body h3 { margin: 0; font-size: 1.1rem; }
.at-blog-body p {
  margin: 0; flex: 1; color: var(--at-muted); font-size: 0.93rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.at-blog-meta { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8rem; color: var(--at-muted); }
.at-blog-meta i { color: var(--at-primary); }

.at-blog-tag {
  align-self: flex-start;
  font-family: var(--at-font-head); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--at-primary); background: var(--at-primary-soft);
  padding: 5px 12px; border-radius: 100px;
}
.at-blog-tag-light { display: inline-block; margin-bottom: 14px; background: rgba(255, 255, 255, 0.18); color: #fff; }
.at-blog-tag-light:hover { background: rgba(255, 255, 255, 0.3); color: #fff; }

/* ---------- the newest post, leading the listing ---------- */
.at-blog-feature {
  display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 0;
  padding: 0; overflow: hidden; margin-bottom: 26px;
  color: var(--at-ink-2); transition: transform 0.25s, box-shadow 0.25s;
}
.at-blog-feature:hover { transform: translateY(-4px); box-shadow: 0 26px 44px -22px rgba(15, 23, 42, 0.28); color: var(--at-ink-2); }
.at-blog-feature-img { display: block; background: var(--at-primary-soft); overflow: hidden; min-height: 300px; }
.at-blog-feature-img img { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform 0.4s; }
.at-blog-feature:hover .at-blog-feature-img img { transform: scale(1.04); }
.at-blog-feature-body { padding: 38px 40px; display: flex; flex-direction: column; align-items: flex-start; gap: 13px; justify-content: center; }
.at-blog-feature-body h2 { margin: 0; font-size: 1.75rem; }
.at-blog-feature-body p { margin: 0; color: var(--at-muted); font-size: 1rem; line-height: 1.72; }
.at-blog-flag {
  font-family: var(--at-font-head); font-size: 0.7rem; font-weight: 800;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--at-accent-dark); background: var(--at-accent-soft);
  padding: 5px 12px; border-radius: 100px;
}
@media (max-width: 900px) {
  .at-blog-feature { grid-template-columns: 1fr; }
  .at-blog-feature-img { min-height: 0; aspect-ratio: 16 / 9; }
  .at-blog-feature-body { padding: 28px 24px; }
  .at-blog-feature-body h2 { font-size: 1.4rem; }
}

/* ---------- one post ---------- */
.at-read-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 1100; background: transparent; pointer-events: none; }
.at-read-progress i { display: block; height: 100%; width: 0; background: var(--at-gradient-accent); transition: width 0.1s linear; }

/*
	The header takes its colour from the post's category, so a Chemistry
	guide and a Law guide do not open on the same wall of teal. The c-* class
	on the section supplies --tone-ink.
*/
.at-article-head {
  position: relative; overflow: hidden; color: #fff; padding: 52px 0 60px;
  /*
  	A post leads with its own category colour rather than the brand navy,
  	so the blog does not look like one long blue tunnel. The colour is
  	deepened into the navy, not into black, so it still belongs to the site.
  */
  background:
    radial-gradient(800px 380px at 88% -10%, color-mix(in srgb, var(--tone, var(--at-primary)) 55%, transparent) 0%, transparent 62%),
    linear-gradient(135deg,
      var(--tone-ink, var(--at-primary)) 0%,
      color-mix(in srgb, var(--tone-ink, var(--at-primary)) 45%, var(--at-navy)) 100%);
}
.at-article-head::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: var(--at-grid); background-size: 54px 54px;
  mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
  -webkit-mask-image: radial-gradient(120% 100% at 50% 0%, #000 35%, transparent 80%);
}
.at-article-head .at-container { position: relative; z-index: 1; }
.at-article-head h1 { color: #fff; }
.at-article-head-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 48px; align-items: center; }
.at-article-head h1 { font-size: 2.5rem; margin: 14px 0 16px; }
.at-article-standfirst { font-size: 1.1rem; line-height: 1.7; color: rgba(255, 255, 255, 0.9); max-width: 620px; margin: 0 0 24px; }

.at-article-tag {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--at-font-head); font-size: 0.78rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #fff; background: rgba(255, 255, 255, 0.16); backdrop-filter: blur(4px);
  padding: 6px 14px 6px 6px; border-radius: 100px;
}
.at-article-tag:hover { background: rgba(255, 255, 255, 0.28); color: #fff; }

.at-article-byline { display: flex; align-items: center; gap: 12px; color: #fff; }
.at-article-byline b { display: block; font-family: var(--at-font-head); font-size: 0.95rem; }
.at-article-byline small { color: rgba(255, 255, 255, 0.75); font-size: 0.82rem; }
.at-article-avatar {
  width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0;
  background: rgba(255, 255, 255, 0.2); color: #fff;
  display: inline-flex; align-items: center; justify-content: center;
}

.at-article-cover { margin: 0; border-radius: 20px; overflow: hidden; box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.55); }
.at-article-cover img { width: 100%; display: block; aspect-ratio: 16 / 10; object-fit: cover; }

/* ---------- article beside its sidebar ---------- */
.at-article-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.at-article-sticky { position: sticky; top: 94px; display: grid; gap: 16px; }

.at-toc h4,
.at-side-cta h4 { font-size: 1rem; margin: 0 0 12px; }
.at-toc h4 i { color: var(--at-primary); margin-right: 6px; }
.at-toc nav { display: grid; gap: 2px; max-height: 50vh; overflow-y: auto; }
.at-toc a {
  display: block; padding: 7px 12px; border-radius: 9px;
  font-size: 0.89rem; line-height: 1.45; color: var(--at-muted);
  border-left: 3px solid transparent; transition: all 0.15s;
}
.at-toc a:hover { background: var(--at-bg); color: var(--at-ink); }
.at-toc a.lvl-3 { padding-left: 24px; font-size: 0.84rem; }
.at-toc a.is-on { background: var(--at-primary-soft); color: var(--at-primary-dark); border-left-color: var(--at-primary); font-weight: 600; }

.at-side-cta { background: linear-gradient(160deg, #f0fdfa 0%, var(--at-surface) 70%); }
.at-side-cta p { color: var(--at-muted); font-size: 0.9rem; margin: 0 0 16px; }

/* other posts on the same topic, beside the article */
.at-side-related h4 { display: flex; align-items: center; gap: 8px; margin-bottom: 14px; }
.at-side-related > a {
  display: grid; grid-template-columns: 62px 1fr; gap: 12px; align-items: center;
  padding: 9px; margin: 0 -9px; border-radius: 12px; color: var(--at-ink-2); transition: background 0.16s;
}
.at-side-related > a:hover { background: var(--at-bg); color: var(--at-ink-2); }
.at-side-related img { width: 62px; height: 46px; object-fit: cover; border-radius: 9px; display: block; background: var(--at-bg); }
.at-side-related b {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden;
  font-family: var(--at-font-head); font-size: 0.86rem; line-height: 1.4; color: var(--at-ink);
}
.at-side-related small { display: block; font-size: 0.76rem; color: var(--at-muted); margin-top: 3px; }
.at-side-related-all {
  display: block; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--at-border);
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.85rem; color: var(--at-primary);
}
.at-side-related-all:hover i { transform: translateX(3px); }
.at-side-related-all i { transition: transform 0.18s; margin-left: 4px; }

.at-article-topics { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 34px; }
.at-article-topics span { font-family: var(--at-font-head); font-weight: 600; font-size: 0.85rem; color: var(--at-muted); margin-right: 4px; }
.at-article-topics em {
  font-style: normal; font-size: 0.82rem; color: var(--at-ink-2);
  background: var(--at-bg); border: 1px solid var(--at-border);
  padding: 5px 12px; border-radius: 100px;
}

.at-article-foot { margin-top: 30px; }
.at-copy-link {
  width: 40px; height: 40px; border-radius: 50%; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-bg); color: var(--at-ink-2); border: 1px solid var(--at-border);
  transition: all 0.18s;
}
.at-copy-link:hover { background: var(--at-primary); border-color: var(--at-primary); color: #fff; transform: translateY(-2px); }

.at-article-nav { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 34px; }
.at-article-nav a {
  display: block; padding: 18px 22px; border-radius: 16px;
  background: var(--at-surface); border: 1px solid var(--at-border);
  color: var(--at-ink-2); transition: all 0.2s;
}
.at-article-nav a:hover { border-color: var(--at-primary); transform: translateY(-3px); box-shadow: var(--at-shadow); color: var(--at-ink-2); }
.at-article-nav small { display: block; font-size: 0.76rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--at-muted); margin-bottom: 5px; }
.at-article-nav b { font-family: var(--at-font-head); font-size: 0.95rem; color: var(--at-ink); display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
.at-article-nav .next { text-align: right; }

@media (max-width: 1000px) {
  .at-article-grid { grid-template-columns: 1fr; gap: 36px; }
  .at-article-sticky { position: static; grid-template-columns: 1fr 1fr; }
  .at-toc nav { max-height: none; }
}
@media (max-width: 900px) {
  .at-article-head-grid { grid-template-columns: 1fr; gap: 28px; }
  .at-article-head h1 { font-size: 1.9rem; }
  .at-article-sticky { grid-template-columns: 1fr; }
  .at-article-nav { grid-template-columns: 1fr; }
  .at-article-nav .next { text-align: left; }
}

/* the body comes from the editor, so style whatever html it produces */
.at-blog-body-text { font-size: 1.03rem; line-height: 1.85; color: var(--at-ink-2); }
.at-blog-body-text > *:first-child { margin-top: 0; }
.at-blog-body-text h2 { font-size: 1.5rem; margin: 36px 0 14px; }
.at-blog-body-text h3 { font-size: 1.22rem; margin: 30px 0 12px; }
.at-blog-body-text h4 { font-size: 1.05rem; margin: 24px 0 10px; }
.at-blog-body-text p { margin: 0 0 1.15rem; }
.at-blog-body-text ul,
.at-blog-body-text ol { margin: 0 0 1.15rem; padding-left: 24px; }
.at-blog-body-text li { margin-bottom: 8px; }
.at-blog-body-text a { text-decoration: underline; }
.at-blog-body-text img { border-radius: 14px; margin: 10px 0 22px; }
.at-blog-body-text blockquote {
  margin: 24px 0; padding: 16px 22px; border-left: 4px solid var(--at-primary);
  background: var(--at-primary-soft); border-radius: 0 14px 14px 0; color: var(--at-ink-2);
}
.at-blog-body-text table { width: 100%; border-collapse: collapse; margin: 0 0 1.4rem; font-size: 0.95rem; }
.at-blog-body-text th,
.at-blog-body-text td { border: 1px solid var(--at-border); padding: 10px 14px; text-align: left; }
.at-blog-body-text th { background: var(--at-bg); font-family: var(--at-font-head); font-weight: 600; }
.at-blog-body-text hr { border: 0; border-top: 1px solid var(--at-border); margin: 32px 0; }

.at-blog-share {
  display: flex; align-items: center; flex-wrap: wrap; gap: 12px;
  padding-top: 24px; border-top: 1px solid var(--at-border);
}
.at-blog-share span { font-family: var(--at-font-head); font-weight: 600; font-size: 0.9rem; color: var(--at-muted); }
.at-blog-share a {
  width: 40px; height: 40px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-bg); color: var(--at-ink-2); border: 1px solid var(--at-border);
  transition: all 0.18s;
}
.at-blog-share a:hover { background: var(--at-primary); border-color: var(--at-primary); color: #fff; transform: translateY(-2px); }

@media (max-width: 600px) {
  .at-blog-lead { font-size: 1.02rem; }
  .at-blog-body-text { font-size: 0.98rem; }
}

/* ---------- a test the admin is holding back ---------- */
.at-soon-badge {
  display: inline-flex; align-items: center; gap: 6px; vertical-align: middle;
  margin-left: 12px; padding: 6px 14px; border-radius: 100px;
  font-family: var(--at-font-head); font-size: 0.8rem; font-weight: 700;
  letter-spacing: 0.04em; text-transform: uppercase;
  background: rgba(255, 255, 255, 0.2); color: #fff;
  backdrop-filter: blur(4px);
}
.at-soon-box {
  text-align: center; padding: 28px 22px; border-radius: 18px;
  background: var(--at-warning-soft); border: 1px solid #fde68a;
}
.at-soon-box h3 { color: #92400e; }
.at-soon-box p { color: #a16207; font-size: 0.92rem; }
.at-soon-box .at-emoji { margin: 0 auto; }

/* how many marks a section is worth */
.at-marks-pill {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  font-family: var(--at-font-head); font-size: 0.72rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  color: #15803d; background: #dcfce7;
  padding: 6px 12px; border-radius: 100px;
}
.at-paper-box { position: sticky; top: 94px; }
.at-paper-box h3 { display: flex; align-items: center; gap: 10px; }
.at-paper-facts { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin: 20px 0; }
.at-fact { background: var(--tone-soft, var(--at-bg)); border-radius: 12px; padding: 14px; }
.at-fact i { color: var(--tone-ink, var(--at-primary)); }
.at-fact strong { display: block; font-family: var(--at-font-head); font-size: 1.25rem; color: var(--at-ink); }
.at-fact span { font-size: 0.8rem; color: var(--at-muted); }
.at-rules { list-style: none; padding: 0; margin: 0 0 20px; font-size: 0.9rem; color: var(--at-muted); }
/*
	The tick hangs in its own column and the sentence flows as ordinary text.
	As a flex row, every <b> inside the line became a column of its own and
	the sentence came out in pieces.
*/
.at-rules li { position: relative; padding-left: 26px; margin-bottom: 8px; }
.at-rules i { position: absolute; left: 0; top: 4px; color: var(--at-success); }

/* ---------- Auth ---------- */
.at-auth { min-height: calc(100vh - 74px); display: grid; grid-template-columns: 1fr 1fr; }
.at-auth-side { background: var(--at-gradient); color: #fff; padding: 64px; display: flex; flex-direction: column; justify-content: center; position: relative; overflow: hidden; }
.at-auth-side::before { content: ""; position: absolute; width: 460px; height: 460px; border-radius: 50%; background: rgba(255,255,255,0.08); bottom: -200px; right: -160px; }
.at-auth-side h2 { color: #fff; }
.at-auth-side p { color: rgba(255,255,255,0.86); }
.at-auth-side ul { list-style: none; padding: 0; margin: 24px 0 0; }
.at-auth-side li { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; font-size: 1rem; }
.at-auth-side li i { width: 30px; height: 30px; border-radius: 9px; background: rgba(255,255,255,0.15); display: inline-flex; align-items: center; justify-content: center; }
.at-auth-form { display: flex; align-items: center; justify-content: center; padding: 48px 24px; }
.at-auth-form > div { width: 100%; max-width: 420px; }
.at-auth-form h2 { margin-bottom: 6px; }
.at-auth-form .sub { color: var(--at-muted); margin-bottom: 28px; }

/* ---------- Forms ---------- */
.at-field { margin-bottom: 18px; }
.at-field label { display: block; font-family: var(--at-font-head); font-weight: 600; font-size: 0.88rem; margin-bottom: 6px; color: var(--at-ink); }
.at-input, .at-select, .at-textarea {
  width: 100%; padding: 12px 14px; border: 2px solid var(--at-border); border-radius: 12px; background: #fff;
  font-family: var(--at-font); font-size: 0.98rem; color: var(--at-ink-2); transition: border-color 0.2s, box-shadow 0.2s; outline: none;
}
.at-input:focus, .at-select:focus, .at-textarea:focus { border-color: var(--at-primary); box-shadow: 0 0 0 4px rgba(27, 79, 216, 0.14); }
.at-textarea { min-height: 140px; resize: vertical; }
.at-input-icon { position: relative; }
.at-input-icon i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--at-muted-2); }
.at-input-icon .at-input { padding-left: 42px; }
.at-form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.at-check { display: flex; align-items: center; gap: 8px; font-size: 0.9rem; color: var(--at-muted); }
.at-form-foot { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; font-size: 0.9rem; }
/* ==========================================================================
   Plain reading pages - the privacy policy and the terms.

   Nothing but headings, paragraphs and lists, set wide enough to read
   comfortably and spaced so the sections are easy to find again.
   ========================================================================== */
.at-prose h3 { margin: 28px 0 10px; font-size: 1.12rem; color: var(--at-navy); }
.at-prose h3:first-child { margin-top: 0; }
.at-prose p, .at-prose li { color: var(--at-muted); line-height: 1.75; }
.at-prose p { margin: 0 0 12px; }
.at-prose ul { margin: 0 0 12px; padding-left: 20px; }
.at-prose li { margin-bottom: 8px; }
.at-prose b { color: var(--at-ink); }

.at-divider { display: flex; align-items: center; gap: 12px; color: var(--at-muted-2); font-size: 0.8rem; margin: 20px 0; }
.at-divider::before, .at-divider::after { content: ""; flex: 1; height: 1px; background: var(--at-border); }

/* ==========================================================================
   Exam screen
   The whole screen is sized to the viewport so the student never scrolls the
   page; only a very long question scrolls inside its own panel.
   ========================================================================== */
body.at-test-body { background: var(--at-bg); }
body.at-test-body.at-exam-running { overflow: hidden; }

/* ---------- top bar ---------- */
.at-exam-bar {
  position: sticky; top: 0; z-index: 1000;
  background: var(--at-surface);
  border-bottom: 1px solid var(--at-border);
  box-shadow: 0 1px 3px rgba(11, 18, 32, 0.05);
}
.at-exam-bar-inner {
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  height: 72px; padding: 0 24px; max-width: 1440px; margin: 0 auto;
}

.at-exam-brand { display: inline-flex; align-items: center; gap: 11px; color: var(--at-ink); flex-shrink: 0; }
.at-exam-brand:hover { color: var(--at-ink); }
.at-exam-brand .at-brand-mark { width: 38px; height: 38px; border-radius: 11px; font-size: 1.05rem; }
/* the exam bar is tight, so only the logo's icon goes in it */
.at-exam-brand-icon { display: block; width: 40px; height: 40px; object-fit: contain; }
.at-exam-brand-text { display: flex; flex-direction: column; line-height: 1.2; }
.at-exam-brand-text b { font-family: var(--at-font-head); font-weight: 800; font-size: 1.08rem; letter-spacing: -0.02em; }
.at-exam-brand-text b span { color: var(--at-primary); }
.at-exam-brand-text small { font-size: 0.76rem; color: var(--at-muted); }

/* question number the student can type into */
.at-exam-jump {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--at-font-head); font-weight: 600; color: var(--at-ink); font-size: 1rem;
}
.at-exam-jump label { margin: 0; cursor: default; }
.at-exam-jump input {
  width: 74px; height: 42px; text-align: center;
  font-family: var(--at-font-head); font-weight: 800; font-size: 1.15rem; color: var(--at-primary);
  border: 2px solid var(--at-border); border-radius: 11px; background: var(--at-surface);
  outline: none; transition: border-color 0.18s, box-shadow 0.18s;
  -moz-appearance: textfield;
}
.at-exam-jump input::-webkit-outer-spin-button,
.at-exam-jump input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.at-exam-jump input:focus { border-color: var(--at-primary); box-shadow: 0 0 0 4px rgba(27, 79, 216, 0.14); }
.at-exam-jump span { color: var(--at-muted); font-weight: 600; }

.at-exam-actions { display: inline-flex; align-items: center; gap: 12px; flex-shrink: 0; }
.at-timer {
  display: inline-flex; align-items: center; gap: 10px; padding: 9px 16px; border-radius: 12px;
  background: var(--at-primary-soft); color: var(--at-primary);
  font-family: var(--at-font-head); font-weight: 700; font-size: 1.12rem; letter-spacing: 0.04em;
}
.at-timer.warn { background: var(--at-warning-soft); color: #b45309; }
.at-timer.danger { background: var(--at-danger-soft); color: var(--at-danger); animation: at-pulse 1s infinite; }
@keyframes at-pulse { 0%,100% { transform: scale(1); } 50% { transform: scale(1.04); } }

.at-test-progress { height: 3px; background: var(--at-border); }
.at-test-progress i { display: block; height: 100%; width: 0; background: var(--at-gradient-blue); transition: width 0.3s; }

/* ---------- the exam itself ---------- */
/* bar is 72px + 3px progress + 1px border = 76px */
.at-exam-shell {
  display: grid; grid-template-columns: 1fr 280px; gap: 20px;
  height: calc(100vh - 76px);
  max-width: 1440px; margin: 0 auto; padding: 16px 24px;
  align-items: stretch;
}

.at-exam-main {
  background: var(--at-surface); border: 1px solid var(--at-border); border-radius: var(--at-radius);
  box-shadow: var(--at-shadow);
  display: flex; flex-direction: column; overflow: hidden; min-height: 0;
}

/* only this part scrolls, and only when the question is very long */
/*
	The question panel is the only part of the exam that scrolls, so its
	spacing is kept tight: a plain four option question on a laptop screen
	used to run four or five pixels over and show a scrollbar for nothing.
*/
.at-question-body { flex: 1; overflow-y: auto; padding: 22px 30px; min-height: 0; }
.at-question-body::-webkit-scrollbar { width: 8px; }
.at-question-body::-webkit-scrollbar-track { background: transparent; }
.at-question-body::-webkit-scrollbar-thumb { background: var(--at-border); border-radius: 8px; }
.at-question-text {
  font-family: var(--at-font-head); font-size: 1.28rem; font-weight: 600;
  color: var(--at-ink); margin-bottom: 18px; line-height: 1.5;
}
.at-options { display: grid; gap: 9px; }
.at-option {
  display: flex; align-items: center; gap: 14px; padding: 12px 18px;
  border: 2px solid var(--at-border); border-radius: 14px; background: #fff;
  cursor: pointer; transition: all 0.18s; font-size: 1rem; color: var(--at-ink-2); text-align: left; width: 100%;
}
.at-option:hover { border-color: color-mix(in srgb, var(--at-primary) 45%, #fff); background: var(--at-primary-soft); }
.at-option b {
  flex: 0 0 34px; width: 34px; height: 34px; border-radius: 10px; background: var(--at-bg); color: var(--at-muted);
  display: inline-flex; align-items: center; justify-content: center;
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.9rem; transition: all 0.18s;
}
.at-option.selected { border-color: var(--at-primary); background: var(--at-primary-soft); }
.at-option.selected b { background: var(--at-primary); color: #fff; }

/* ---------- written answer box ---------- */
.at-written label {
  display: block; font-family: var(--at-font-head); font-weight: 600;
  font-size: 0.85rem; color: var(--at-muted); margin-bottom: 8px;
}
.at-written textarea {
  width: 100%; resize: vertical; min-height: 180px;
  padding: 16px 18px; font-family: var(--at-font); font-size: 1rem; line-height: 1.7;
  color: var(--at-ink-2); background: #fff;
  border: 2px solid var(--at-border); border-radius: 14px;
  transition: border-color 0.18s, box-shadow 0.18s;
  /* the student must be able to type and select here, whatever the page locks */
  -webkit-user-select: text; user-select: text;
}
.at-written textarea:focus { outline: none; border-color: var(--at-primary); box-shadow: 0 0 0 4px rgba(27, 79, 216, 0.12); }
.at-written-foot {
  display: flex; justify-content: space-between; gap: 10px;
  font-size: 0.8rem; color: var(--at-muted); margin-top: 8px;
}
#atWrittenSaved { color: var(--at-success); font-weight: 600; }
.at-written-note {
  margin: 14px 0 0; font-size: 0.85rem; color: #92400e;
  background: var(--at-warning-soft); border-radius: 12px; padding: 10px 14px;
}

/* ---------- a written question in the answer review ---------- */
.at-review-written .lbl {
  font-family: var(--at-font-head); font-size: 0.78rem; font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; color: var(--at-muted);
  margin: 4px 0 6px;
}
.at-review-written .ans,
.at-review-written .model {
  border-radius: 12px; padding: 12px 15px; font-size: 0.93rem; line-height: 1.75;
}
.at-review-written .ans { background: var(--at-bg); border: 1px solid var(--at-border); border-left: 4px solid var(--at-primary); color: var(--at-ink-2); }
.at-review-written .model { background: #f5f3ff; border: 1px solid #ddd6fe; border-left: 4px solid #8b5cf6; color: #4c1d95; }
.at-review-pending,
.at-review-awarded {
  display: inline-flex; align-items: center; gap: 7px; margin-top: 10px;
  font-family: var(--at-font-head); font-size: 0.82rem; font-weight: 600;
  padding: 7px 14px; border-radius: 100px;
}
.at-review-pending { background: var(--at-warning-soft); color: #92400e; }
.at-review-awarded { background: var(--at-success-soft); color: #15803d; }

/* why the marker gave those marks: a quiet line under the award */
.at-review-why {
  display: flex; align-items: flex-start; gap: 8px; margin-top: 10px;
  padding: 10px 14px; border-radius: 12px;
  background: var(--at-primary-soft); color: var(--at-ink-2);
  font-size: 0.88rem; line-height: 1.6;
}
.at-review-why i { margin-top: 3px; color: var(--at-primary); }

/*
	---------- Exam screen lock ----------
	Makes copying the paper inconvenient: no selecting, no dragging, no
	right click menu. Worth saying plainly - this only stops a casual copy,
	it is not real protection, because every question still reaches the
	browser and anyone who wants the text can get it.
*/
body.at-exam-locked,
body.at-exam-locked .at-question-text,
body.at-exam-locked .at-option {
  -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
  -webkit-touch-callout: none;
}
body.at-exam-locked img { -webkit-user-drag: none; user-drag: none; pointer-events: none; }
/* anything the student is meant to type in stays fully usable */
body.at-exam-locked input,
body.at-exam-locked textarea {
  -webkit-user-select: text; -moz-user-select: text; -ms-user-select: text; user-select: text;
}

/* bottom bar of the question panel, always visible */
.at-exam-nav {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 11px 20px; border-top: 1px solid var(--at-border); background: var(--at-surface); flex-shrink: 0;
}
.at-exam-nav-mid { display: flex; align-items: center; gap: 6px; }

/* quiet secondary actions - clear answer and mark for review */
.at-mini-btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: none; border: 0; padding: 6px 10px; border-radius: 8px;
  color: var(--at-muted-2); font-family: var(--at-font); font-size: 0.82rem; cursor: pointer; transition: all 0.16s;
}
.at-mini-btn:hover { background: var(--at-bg); color: var(--at-muted); }
.at-mini-btn i { font-size: 0.85em; }
#atClearBtn:hover { color: var(--at-danger); }
#atFlagBtn.is-flagged { color: var(--at-accent-dark); background: var(--at-accent-soft); }

/* ---------- right column : live counters ---------- */
.at-exam-side { display: flex; flex-direction: column; gap: 12px; min-height: 0; }
.at-count-tile {
  background: var(--at-surface); border: 1px solid var(--at-border); border-radius: 14px;
  padding: 16px 18px; display: flex; align-items: center; gap: 14px; box-shadow: var(--at-shadow);
}
.at-count-tile i {
  width: 42px; height: 42px; border-radius: 12px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.at-count-tile strong {
  display: block; font-family: var(--at-font-head); font-size: 1.55rem; font-weight: 800;
  color: var(--at-ink); line-height: 1.1;
}
.at-count-tile span { font-size: 0.82rem; color: var(--at-muted); }
.at-count-tile.answered i { background: var(--at-success-soft); color: var(--at-success); }
.at-count-tile.pending i { background: var(--at-bg); color: var(--at-muted-2); }
.at-count-tile.flagged i { background: var(--at-accent-soft); color: var(--at-accent-dark); }
.at-exam-hint {
  margin: auto 0 0; font-size: 0.78rem; color: var(--at-muted-2); line-height: 1.6;
  background: var(--at-surface); border: 1px dashed var(--at-border); border-radius: 12px; padding: 12px 14px;
}
.at-exam-hint b { color: var(--at-muted); }

.at-loading { display: flex; align-items: center; gap: 10px; color: var(--at-muted); padding: 22px 4px; font-size: 0.95rem; }
.at-loading i { color: var(--at-primary); }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .at-exam-shell { grid-template-columns: 1fr 240px; }
}
@media (max-width: 900px) {
  body.at-test-body.at-exam-running { overflow: auto; }
  .at-exam-bar-inner { height: auto; padding: 12px 16px; flex-wrap: wrap; gap: 12px; }
  .at-exam-brand-text small { display: none; }
  .at-exam-shell { grid-template-columns: 1fr; height: auto; padding: 16px; }
  .at-exam-main { min-height: 60vh; }
  .at-exam-side { flex-direction: row; flex-wrap: wrap; }
  .at-count-tile { flex: 1; min-width: 150px; }
  .at-exam-hint { width: 100%; margin: 0; }
}
@media (max-width: 600px) {
  .at-exam-bar-inner { justify-content: space-between; }
  .at-exam-jump { order: 3; width: 100%; justify-content: center; }
  .at-question-body { padding: 20px; }
  .at-question-text { font-size: 1.1rem; }
  .at-exam-nav { flex-wrap: wrap; padding: 12px 14px; }
  .at-exam-nav-mid { order: 3; width: 100%; justify-content: center; }
}


/* test intro (before start) */
.at-test-intro { max-width: 720px; margin: 48px auto; padding: 40px; text-align: center; }
.at-test-intro .at-test-icon,
.at-test-intro .at-emoji { display: flex; margin: 0 auto 16px; width: 78px; height: 78px; font-size: 2.4rem; border-radius: 22px; }
.at-test-intro .at-paper-facts { grid-template-columns: repeat(4, 1fr); text-align: left; }
/* the "before you start" panel on the intro screen */
.at-intro-rules {
  background: var(--at-bg);
  border: 1px solid var(--at-border);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 18px 0 24px;
}
.at-intro-rules h3 {
  font-size: 1.05rem; margin: 0 0 14px;
  display: flex; align-items: center; gap: 9px;
}
.at-intro-rules h3 i { color: var(--at-primary); }
.at-intro-rules .at-rules li { margin-bottom: 10px; line-height: 1.6; }
.at-intro-rules .at-rules li:last-child { margin-bottom: 0; }

.at-generating { display: none; margin: 24px 0; }
.at-generating .bar { height: 8px; background: var(--at-bg); border-radius: 100px; overflow: hidden; }
.at-generating .bar i { display: block; height: 100%; width: 0; background: var(--at-gradient-blue); transition: width 0.4s; }
.at-generating p { font-size: 0.9rem; color: var(--at-muted); margin: 10px 0 0; }

/* modal (submit confirm / time up) */
.at-modal { position: fixed; inset: 0; z-index: 2000; display: none; align-items: center; justify-content: center; padding: 20px; background: rgba(15, 23, 42, 0.55); backdrop-filter: blur(4px); }
.at-modal.show { display: flex; }
.at-modal-box { background: #fff; border-radius: 22px; padding: 36px; max-width: 460px; width: 100%; text-align: center; box-shadow: var(--at-shadow-lg); animation: at-pop 0.25s ease; }
@keyframes at-pop { from { transform: scale(0.94); opacity: 0; } to { transform: none; opacity: 1; } }
.at-modal-icon { width: 68px; height: 68px; border-radius: 20px; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; }
.at-modal-icon.warn { background: var(--at-warning-soft); color: var(--at-warning); }
.at-modal-icon.danger { background: var(--at-danger-soft); color: var(--at-danger); }
.at-modal-box p { color: var(--at-muted); }

/* the chapter icon needs air under it, or the name sits on the badge */
.at-modal-emoji { display: flex; margin: 0 auto 18px; }
.at-modal-title { margin: 0 0 10px; }
.at-modal-actions { display: flex; gap: 10px; justify-content: center; margin-top: 22px; }

/* how many MCQs a chapter practice should hold */
.at-count-picker { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.at-count-picker button {
  min-width: 58px; padding: 10px 14px; cursor: pointer;
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.95rem;
  color: var(--at-ink-2); background: var(--at-surface);
  border: 2px solid var(--at-border); border-radius: 12px;
  transition: all 0.16s;
}
.at-count-picker button:hover { border-color: var(--at-primary); color: var(--at-primary); }
.at-count-picker button.selected { background: var(--at-primary); border-color: var(--at-primary); color: #fff; }

/* the Practice button only shows up when the row is worth practising */
.at-practice-btn { white-space: nowrap; }

/* ---------- Result screen ---------- */
/* the short read under the section chart, where the card would otherwise be empty */
.at-glance { display: grid; gap: 10px; margin-top: 18px; }
.at-glance-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 11px 13px; border-radius: 14px;
  background: var(--at-bg); border: 1px solid var(--at-border);
}
.at-glance-tile i {
  width: 36px; height: 36px; border-radius: 11px; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-surface); color: var(--at-muted); font-size: 0.95rem;
}
.at-glance-tile strong {
  display: block; font-family: var(--at-font-head); font-weight: 700;
  font-size: 0.98rem; color: var(--at-ink); line-height: 1.3;
}
.at-glance-tile span { font-size: 0.82rem; color: var(--at-muted); }
.at-glance-tile.good { background: var(--at-success-soft); border-color: #c6ead3; }
.at-glance-tile.good i { background: #fff; color: var(--at-success); }
.at-glance-tile.work { background: var(--at-warning-soft); border-color: #f3e2bd; }
.at-glance-tile.work i { background: #fff; color: #b45309; }
/* the score while the marker still has the written answers */
.at-score-waiting .at-donut-label strong { font-size: 1.6rem; color: var(--at-muted); }
.at-donut.is-waiting .value { stroke: var(--at-border); stroke-dasharray: 60 1000; animation: at-wait-spin 1.4s linear infinite; transform-origin: 50% 50%; }
@keyframes at-wait-spin { to { transform: rotate(360deg); } }
.at-badge-wait { background: var(--at-warning-soft); color: #92400e; }
.at-btn.is-disabled { opacity: .65; cursor: default; pointer-events: none; }
.at-result-hero { background: var(--at-gradient); color: #fff; padding: 56px 0 120px; }
.at-result-hero h1 { color: #fff; font-size: 2.2rem; }
.at-result-hero p { color: rgba(255,255,255,0.86); margin: 0; }
.at-result-hero .at-container { display: flex; justify-content: space-between; align-items: flex-end; gap: 20px; flex-wrap: wrap; }
.at-result-hero .at-btn-white { box-shadow: var(--at-shadow); }
.at-result-wrap { margin-top: -80px; padding-bottom: 80px; }
.at-result-summary { display: grid; grid-template-columns: 340px 1fr; gap: 24px; margin-bottom: 24px; }
.at-score-card { text-align: center; padding: 32px; }
.at-donut { position: relative; width: 190px; height: 190px; margin: 0 auto 18px; }
.at-donut svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.at-donut circle { fill: none; stroke-width: 14; stroke-linecap: round; }
.at-donut .track { stroke: var(--at-border); }
.at-donut .value { stroke: var(--at-success); stroke-dasharray: 0 1000; transition: stroke-dasharray 1s ease; }
.at-donut.fail .value { stroke: var(--at-danger); }
.at-donut-label { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.at-donut-label strong { font-family: var(--at-font-head); font-size: 2.4rem; font-weight: 800; color: var(--at-ink); line-height: 1; }
.at-donut-label span { font-size: 0.8rem; color: var(--at-muted); margin-top: 4px; }
.at-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 16px; border-radius: 100px; font-family: var(--at-font-head); font-weight: 700; font-size: 0.85rem; }
.at-badge-pass { background: var(--at-success-soft); color: #047857; }
.at-badge-fail { background: var(--at-danger-soft); color: #b91c1c; }
/* the written answers are still with the marker, so there is no verdict yet */
.at-badge-checking { background: var(--at-warning-soft); color: #92400e; }
.at-score-card .marks { margin-top: 14px; color: var(--at-muted); font-size: 0.92rem; }
.at-score-card .marks b { color: var(--at-ink); font-size: 1.1rem; }
.at-stat-tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-bottom: 24px; }
.at-stat-tile { padding: 20px; display: flex; align-items: center; gap: 14px; }
.at-stat-tile i { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; font-size: 1.2rem; }
.at-stat-tile.correct i { background: var(--at-success-soft); color: var(--at-success); }
.at-stat-tile.wrong i { background: var(--at-danger-soft); color: var(--at-danger); }
.at-stat-tile.skipped i { background: var(--at-warning-soft); color: var(--at-warning); }
.at-stat-tile strong { display: block; font-family: var(--at-font-head); font-size: 1.5rem; color: var(--at-ink); line-height: 1.1; }
.at-stat-tile span { font-size: 0.82rem; color: var(--at-muted); }
.at-result-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.at-result-facts div { background: var(--at-bg); border-radius: 12px; padding: 12px 14px; font-size: 0.85rem; color: var(--at-muted); }
.at-result-facts strong { display: block; color: var(--at-ink); font-family: var(--at-font-head); }

/* chapter analysis bars */
.at-chapter-analysis { display: grid; gap: 18px; }
.at-ch-row .head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 8px; font-size: 0.92rem; }
.at-ch-row .head strong { color: var(--at-ink); }
.at-ch-row .head span { color: var(--at-muted); font-size: 0.82rem; }
.at-ch-bar { height: 14px; display: flex; border-radius: 100px; overflow: hidden; background: var(--at-border); }
.at-ch-bar i { display: block; height: 100%; transition: width 0.8s ease; }
.at-ch-bar .c { background: var(--at-success); }
.at-ch-bar .w { background: var(--at-danger); }
.at-ch-bar .s { background: var(--at-warning); }
.at-ch-row .nums { display: flex; gap: 14px; font-size: 0.78rem; color: var(--at-muted); margin-top: 6px; }
.at-ch-row .nums i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 5px; vertical-align: -1px; }
.at-chart-legend { display: flex; gap: 18px; font-size: 0.82rem; color: var(--at-muted); margin-bottom: 18px; }
.at-chart-legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* vertical bar chart */
.at-bars { display: flex; align-items: flex-end; gap: 18px; height: 220px; padding: 0 8px; border-bottom: 2px solid var(--at-border); }
.at-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; position: relative; }
.at-bar-col .bar { width: 100%; max-width: 54px; background: var(--at-gradient-blue); border-radius: 10px 10px 0 0; transition: height 0.8s ease; position: relative; }
.at-bar-col .bar.low { background: linear-gradient(180deg, #f87171, #ef4444); }
.at-bar-col .bar.mid { background: linear-gradient(180deg, #fbbf24, #f59e0b); }
.at-bar-col .bar span { position: absolute; top: -26px; left: 50%; transform: translateX(-50%); font-family: var(--at-font-head); font-weight: 700; font-size: 0.82rem; color: var(--at-ink); }
.at-bar-labels { display: flex; gap: 18px; padding: 10px 8px 0; }
.at-bar-labels span { flex: 1; text-align: center; font-size: 0.75rem; color: var(--at-muted); line-height: 1.3; }

/* wrong answers review */
.at-review-item { padding: 22px 24px; border-left: 4px solid var(--at-danger); margin-bottom: 14px; }
.at-review-item.correct-item { border-left-color: var(--at-success); }
.at-review-item.skipped-item { border-left-color: var(--at-warning); }
.at-review-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; margin-bottom: 12px; }
.at-review-head .qn { font-family: var(--at-font-head); font-weight: 600; color: var(--at-ink); font-size: 1.02rem; }
.at-review-head .qn small { display: block; font-size: 0.76rem; color: var(--at-muted); font-weight: 400; margin-bottom: 4px; }
.at-review-opts { display: grid; gap: 8px; }
.at-review-opt { display: flex; align-items: center; gap: 10px; padding: 9px 14px; border-radius: 10px; border: 1.5px solid var(--at-border); font-size: 0.92rem; }
.at-review-opt b { width: 26px; height: 26px; border-radius: 8px; background: var(--at-bg); display: inline-flex; align-items: center; justify-content: center; font-size: 0.78rem; color: var(--at-muted); flex: 0 0 26px; }
.at-review-opt.is-correct { border-color: var(--at-success); background: var(--at-success-soft); }
.at-review-opt.is-correct b { background: var(--at-success); color: #fff; }
.at-review-opt.is-wrong { border-color: var(--at-danger); background: var(--at-danger-soft); }
.at-review-opt.is-wrong b { background: var(--at-danger); color: #fff; }
.at-review-opt .tag { margin-left: auto; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.06em; }
.at-review-opt.is-correct .tag { color: #047857; }
.at-review-opt.is-wrong .tag { color: #b91c1c; }
.at-review-filter { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.at-review-filter button { border: 2px solid var(--at-border); background: #fff; padding: 7px 14px; border-radius: 100px; font-family: var(--at-font-head); font-weight: 600; font-size: 0.82rem; cursor: pointer; color: var(--at-muted); }
.at-review-filter button.active { background: var(--at-ink); border-color: var(--at-ink); color: #fff; }

/* ---------- Dashboard ---------- */
.at-dash-head { display: flex; align-items: center; gap: 18px; }
.at-dash-head .at-avatar { width: 64px; height: 64px; font-size: 1.3rem; }
.at-table-wrap { overflow-x: auto; }
.at-table { width: 100%; border-collapse: collapse; font-size: 0.93rem; }
.at-table th { text-align: left; font-family: var(--at-font-head); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--at-muted); padding: 12px 14px; border-bottom: 2px solid var(--at-border); }
.at-table td { padding: 14px; border-bottom: 1px solid var(--at-border); vertical-align: middle; }
.at-table tr:last-child td { border-bottom: 0; }
.at-table .sub { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--at-ink); }
.at-table .sub i { width: 32px; height: 32px; border-radius: 9px; color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 0.9rem; }
.at-mini-bar { height: 8px; width: 120px; background: var(--at-border); border-radius: 100px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; }
.at-mini-bar i { display: block; height: 100%; background: var(--at-success); }
.at-mini-bar i.low { background: var(--at-danger); }

/* ---------- Contact / About ---------- */
.at-contact-grid { display: grid; grid-template-columns: 1fr 1.4fr; gap: 32px; align-items: start; }
.at-contact-item { display: flex; gap: 14px; margin-bottom: 22px; }
.at-contact-item i { flex: 0 0 46px; width: 46px; height: 46px; border-radius: 14px; background: var(--at-primary-soft); color: var(--at-primary); display: inline-flex; align-items: center; justify-content: center; font-size: 1.1rem; }
.at-contact-item strong { display: block; color: var(--at-ink); font-family: var(--at-font-head); font-size: 0.95rem; }
.at-contact-item span { color: var(--at-muted); font-size: 0.92rem; }
.at-values { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.at-about-lead { font-size: 1.15rem; color: var(--at-ink-2); }

/* ---------- 404 ---------- */
.at-404 { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; padding: 60px 20px; }
.at-404 .code { font-family: var(--at-font-head); font-size: 7rem; font-weight: 800; line-height: 1; background: var(--at-gradient-blue); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* one time message shown after a redirect */
.at-toast {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%);
  z-index: 2100; max-width: min(560px, calc(100% - 32px));
  display: flex; align-items: flex-start; gap: 10px;
  background: var(--at-ink); color: #fff; padding: 13px 20px; border-radius: 14px;
  box-shadow: 0 18px 40px -18px rgba(11, 18, 32, 0.6); font-size: 0.93rem;
  animation: at-toast-in 0.3s ease;
}
.at-toast i { color: #fca5a5; margin-top: 3px; }
@keyframes at-toast-in { from { opacity: 0; transform: translate(-50%, 12px); } to { opacity: 1; transform: translate(-50%, 0); } }

/* ---------- Chips, empty states, loading ---------- */
.at-test-card-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.at-chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-family: var(--at-font-head); font-size: 0.7rem; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 5px 11px; border-radius: 100px; white-space: nowrap;
}
.at-chip-live {
  background: var(--at-success); color: #fff;
  box-shadow: 0 8px 16px -10px rgba(21, 160, 95, 0.9);
}
.at-chip-live i { font-size: 0.5em; }
.at-chip-soon { background: var(--at-accent-soft); color: #9a6508; border: 1px solid #f3d9a4; }

/* --------------------------------------------------------------------------
   A row of chips that narrows the list under it: the kinds of test.

   It works with the search box rather than instead of it - a card has to
   pass both - and nothing reloads, so the page keeps its place.
   -------------------------------------------------------------------------- */
.at-filter-row {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: -6px 0 26px;
}
.at-filter-chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 9px 16px; border-radius: 100px; cursor: pointer;
  background: #fff; border: 1px solid var(--at-border); color: var(--at-ink-2);
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.9rem;
  transition: border-color 0.18s, color 0.18s, background 0.18s, box-shadow 0.18s;
}
.at-filter-chip em { font-style: normal; }
.at-filter-chip span {
  font-size: 0.74rem; font-weight: 700; padding: 1px 8px; border-radius: 100px;
  background: var(--at-primary-soft); color: var(--at-primary);
}
.at-filter-chip:hover { border-color: var(--at-primary); color: var(--at-primary); }
.at-filter-chip.is-on {
  background: var(--at-primary); border-color: var(--at-primary); color: #fff;
  box-shadow: 0 14px 26px -16px rgba(27, 79, 216, 0.85);
}
.at-filter-chip.is-on span { background: rgba(255, 255, 255, 0.22); color: #fff; }

/* the kinds filed inside the one that is open: a quieter second row */
.at-filter-row.is-sub { margin: -16px 0 26px; padding-left: 2px; }
.at-filter-chip.is-small { padding: 6px 13px; font-size: 0.83rem; font-weight: 600; background: #f8fafc; }
.at-filter-chip.is-small span { font-size: 0.7rem; }

/* --------------------------------------------------------------------------
   The dropdowns above the tests: Class, Province, Uni.

   They are the lists the admin made, and they narrow the grid on the spot.
   A select is used rather than a row of chips because a list may hold a
   dozen options, and twelve chips are a wall rather than a choice.
   -------------------------------------------------------------------------- */
.at-filter-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin: -6px 0 26px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--at-border); border-radius: 16px;
}
.at-filter-label {
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.06em; text-transform: uppercase; color: #94a3b8;
  margin-right: 2px;
}
.at-filter-label i { margin-right: 6px; color: var(--at-primary); }

.at-filter-select { position: relative; display: inline-block; }
.at-filter-select select {
  appearance: none; -webkit-appearance: none;
  padding: 10px 34px 10px 14px; border-radius: 100px; cursor: pointer;
  background: #f8fafc; border: 1px solid var(--at-border); color: var(--at-ink);
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.88rem;
  max-width: 230px; text-overflow: ellipsis;
  transition: border-color 0.18s, background 0.18s, box-shadow 0.18s;
}
.at-filter-select select:hover { border-color: var(--at-primary); }
.at-filter-select select:focus { outline: none; border-color: var(--at-primary); box-shadow: 0 0 0 3px var(--at-primary-soft); }
/*
	The blue belongs to the closed box, not to the list it opens: a chosen
	filter paints the whole dropdown blue, and the browser then paints its
	list the same way, so every option looked chosen. The list is told to
	stay white, and only the one actually chosen is written in blue.
*/
.at-filter-select select option { background: #fff; color: var(--at-ink); font-weight: 500; }
.at-filter-select select option:checked { color: var(--at-primary); font-weight: 700; }

/* an option that would leave nothing is still readable, just clearly spent */
.at-filter-select select option:disabled { color: #b6c2d6; font-weight: 500; }

.at-filter-select i {
  position: absolute; right: 14px; top: 50%; transform: translateY(-50%);
  pointer-events: none; font-size: 0.7rem; color: #94a3b8;
}
/* a dropdown that is actually filtering says so */
.at-filter-select select.is-on {
  background: var(--at-primary); border-color: var(--at-primary); color: #fff;
}

.at-filter-clear {
  margin-left: auto; border: 0; background: none; cursor: pointer;
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.85rem; color: var(--at-primary);
  padding: 8px 10px; border-radius: 100px;
}
.at-filter-clear:hover { background: var(--at-primary-soft); }

@media (max-width: 600px) {
  .at-filter-bar { padding: 12px; }
  .at-filter-select, .at-filter-select select { width: 100%; max-width: none; }
  .at-filter-clear { margin-left: 0; }
}

.at-empty-icon {
  width: 76px; height: 76px; border-radius: 24px; margin: 0 auto 18px;
  background: var(--at-primary-soft); color: var(--at-primary);
  display: flex; align-items: center; justify-content: center; font-size: 1.9rem;
}
.at-loading { display: flex; align-items: center; gap: 10px; color: var(--at-muted); padding: 22px 4px; font-size: 0.95rem; }
.at-loading i { color: var(--at-primary); }

.at-avatar-sm { width: 26px; height: 26px; font-size: 0.7rem; margin-right: 2px; }
.at-menu-actions .at-btn-ghost { padding-left: 10px; }
.at-text-start { text-align: left; }

.at-alert-danger { background: var(--at-danger-soft); color: #9f1239; }
.at-alert-danger a, .at-alert-success a, .at-alert-warn a, .at-alert-info a { color: inherit; text-decoration: underline; }
.at-alert .flex-grow-1 { flex: 1; }

.at-review-exp {
  margin-top: 10px; font-size: 0.88rem; color: var(--at-muted);
  background: var(--at-bg); border-radius: 10px; padding: 9px 13px;
}
.at-review-exp i { color: var(--at-primary); }

/* ---------- Helpers ---------- */
.at-mt-0 { margin-top: 0 !important; }
.at-mb-0 { margin-bottom: 0 !important; }
.at-mb-1 { margin-bottom: 8px !important; }
.at-mb-2 { margin-bottom: 16px !important; }
.at-mb-3 { margin-bottom: 24px !important; }
.at-mb-4 { margin-bottom: 40px !important; }
.at-mt-3 { margin-top: 24px !important; }
.at-mt-4 { margin-top: 40px !important; }
.at-flex { display: flex; align-items: center; gap: 12px; }
.at-flex-between { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.at-alert { padding: 14px 18px; border-radius: 12px; font-size: 0.93rem; display: flex; gap: 10px; align-items: flex-start; margin-bottom: 18px; }
.at-alert-info { background: var(--at-accent-soft); color: #075985; }
.at-alert-warn { background: var(--at-warning-soft); color: #92400e; }
.at-alert-success { background: var(--at-success-soft); color: #065f46; }
.at-fade-up { opacity: 0; transform: translateY(18px); transition: opacity 0.6s ease, transform 0.6s ease; }
.at-fade-up.in { opacity: 1; transform: none; }

/* ==========================================================================
   E-Books
   A book is sold on its cover, its price and one honest paragraph, so the
   cover is given real size and the price is never more than a glance away:
   it sits in the hero, and again in the sticky card beside the text.
   ========================================================================== */

/* on a phone the trail wraps, but a single crumb should never break in half */
.at-breadcrumb { flex-wrap: wrap; }
.at-breadcrumb a { white-space: nowrap; }

/* the three little promises under the listing heading */
.at-head-points { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 18px; }
.at-head-points span { display: inline-flex; align-items: center; gap: 8px; font-size: 0.9rem; color: rgba(255,255,255,0.88); }
.at-head-points i { opacity: 0.8; }

/* ---------- one book in a grid ---------- */
.at-book-card {
  display: flex; flex-direction: column; padding: 0; overflow: hidden;
  color: var(--at-ink-2); transition: transform 0.25s, box-shadow 0.25s;
}
.at-book-card:hover { transform: translateY(-6px); box-shadow: 0 24px 40px -20px rgba(15, 23, 42, 0.25); color: var(--at-ink-2); }

/*
  A book cover is a portrait page, so the frame is one too, and the
  picture is fitted inside rather than filled across: whatever shape the
  admin uploads, the whole cover is on screen with its title readable.
  The dark panel behind it is what fills the corners.
*/
.at-book-cover {
  position: relative; display: block; aspect-ratio: 3 / 4;
  background: linear-gradient(135deg, #0f172a, #334155); overflow: hidden;
}
.at-book-cover img {
  width: 100%; height: 100%; object-fit: contain; display: block;
  padding: 10px; transition: transform 0.35s;
}
.at-book-card:hover .at-book-cover img { transform: scale(1.04); }

.at-book-flag {
  position: absolute; top: 12px; left: 12px; font-style: normal;
  font-family: var(--at-font-head); font-weight: 700; font-size: 0.72rem;
  letter-spacing: 0.06em; text-transform: uppercase;
  padding: 6px 12px; border-radius: 100px; color: #fff;
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, 0.5);
}
.at-flag-free { background: #059669; }
.at-flag-off  { background: #e11d48; }

.at-book-body { display: flex; flex-direction: column; gap: 10px; padding: 22px 24px 24px; flex: 1; }
.at-book-body h3 { margin: 0; font-size: 1.08rem; line-height: 1.4; }
.at-book-body p {
  margin: 0; flex: 1; color: var(--at-muted); font-size: 0.92rem;
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 3; line-clamp: 3; overflow: hidden;
}
.at-book-facts { display: flex; flex-wrap: wrap; gap: 8px 16px; font-size: 0.8rem; color: var(--at-muted); }
.at-book-facts i { color: var(--at-primary); }

.at-book-foot {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  border-top: 1px dashed var(--at-border); padding-top: 14px; margin-top: 2px;
}
.at-book-price { display: inline-flex; align-items: baseline; gap: 8px; }
.at-book-price b { font-family: var(--at-font-head); font-size: 1.12rem; color: var(--at-ink); }
.at-book-price s { font-size: 0.85rem; color: var(--at-muted-2); }
.at-free { color: #059669 !important; }

/* ---------- the detail hero ---------- */
.at-book-head { padding: 56px 0 64px; }
.at-book-head .at-container { position: relative; z-index: 1; }

.at-book-head-grid { display: grid; grid-template-columns: 300px minmax(0, 1fr); gap: 48px; align-items: start; }

.at-book-hero-cover {
  position: relative; margin: 0; border-radius: 18px; overflow: hidden;
  aspect-ratio: 3 / 4; background: rgba(255,255,255,0.1);
  box-shadow: 0 30px 50px -24px rgba(2, 6, 23, 0.65);
}
.at-book-hero-cover img { width: 100%; height: 100%; object-fit: cover; display: block; }

.at-book-kickers { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 16px; }
.at-book-kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--at-font-head); font-size: 0.75rem; font-weight: 600;
  letter-spacing: 0.12em; text-transform: uppercase;
  background: rgba(255,255,255,0.16); color: #fff;
  padding: 6px 14px; border-radius: 100px;
}
.at-book-kicker-link { transition: background 0.18s; }
.at-book-kicker-link:hover { background: rgba(255,255,255,0.3); color: #fff; }
.at-book-hero-body h1 { color: #fff; font-size: 2.3rem; line-height: 1.22; margin-bottom: 12px; }
.at-book-standfirst { color: rgba(255,255,255,0.88); font-size: 1.05rem; line-height: 1.7; margin: 0 0 22px; max-width: 620px; }

.at-book-pricing { display: flex; align-items: baseline; flex-wrap: wrap; gap: 12px; margin-bottom: 22px; }
.at-book-pricing b { font-family: var(--at-font-head); font-size: 2rem; color: #fff; line-height: 1; }
.at-book-pricing b.at-free { color: #6ee7b7 !important; }
.at-book-pricing s { font-size: 1.05rem; color: rgba(255,255,255,0.6); }
.at-book-pricing em {
  font-style: normal; font-family: var(--at-font-head); font-weight: 700; font-size: 0.78rem;
  letter-spacing: 0.06em; background: #e11d48; color: #fff; padding: 5px 11px; border-radius: 100px;
}
.at-book-pricing-note { font-size: 0.9rem; color: rgba(255,255,255,0.78); }

.at-book-points {
  list-style: none; margin: 0 0 26px; padding: 0;
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 22px; max-width: 560px;
}
.at-book-points li { display: flex; align-items: center; gap: 10px; font-size: 0.93rem; color: rgba(255,255,255,0.9); }
.at-book-points i { width: 18px; text-align: center; color: rgba(255,255,255,0.7); }

.at-book-actions { display: flex; flex-wrap: wrap; gap: 12px; }
.at-book-actions .at-btn-primary { background: var(--at-gradient-accent); color: #1c1403; box-shadow: 0 16px 30px -16px rgba(245, 165, 36, 0.8); }
.at-book-actions .at-btn-primary:hover { background: var(--at-accent-dark); color: #1c1403; }
.at-btn.is-disabled,
.at-btn:disabled { opacity: 0.55; pointer-events: none; }

.at-btn-whatsapp { background: #25d366; color: #fff; }
.at-btn-whatsapp:hover { background: #1eb858; color: #fff; }

.at-book-sublinks { display: flex; flex-wrap: wrap; gap: 10px 26px; margin-top: 18px; }
.at-book-sample {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 0.93rem; color: #fff; text-decoration: underline; text-underline-offset: 4px;
}
.at-book-sample:hover { color: var(--at-accent); }

/* the card that sends a reader from the book to its own test */
.at-side-test { border-color: color-mix(in srgb, var(--tone, var(--at-primary)) 30%, #fff); }
.at-side-test .at-btn-primary {
  background: linear-gradient(135deg,
    var(--tone, var(--at-primary)),
    color-mix(in srgb, var(--tone, var(--at-primary)) 65%, #000));
  box-shadow: 0 16px 30px -18px color-mix(in srgb, var(--tone, var(--at-primary)) 90%, transparent);
}
.at-book-assure {
  display: flex; align-items: flex-start; gap: 10px; margin: 20px 0 0;
  font-size: 0.88rem; color: rgba(255,255,255,0.78); max-width: 520px;
}
.at-book-assure i { margin-top: 3px; }

/* ---------- the body of the page ---------- */
.at-book-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.at-book-main .at-section-head { margin-bottom: 26px; }
.at-text-left { text-align: left; margin-left: 0; margin-right: 0; }

/* the sticky card that keeps the price and the buttons in reach */

/*
	---------- the test calendar ----------

	One card per sitting, not a row of a table: the day of the paper torn
	off on the left, the test and how long is left beside it, and the four
	other dates as a little track underneath. The steps already behind the
	candidate are filled in; the ones ahead are hollow, so the sitting reads
	as a journey at a glance.
*/
.at-cal-list { display: grid; gap: 14px; }

.at-cal-card {
  --tone: var(--at-primary);
  display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 20px;
  background: var(--at-surface);
  border: 1px solid var(--at-border);
  border-radius: 18px; padding: 18px 22px 18px 18px;
  box-shadow: 0 14px 30px -26px rgba(15, 23, 42, 0.45);
  transition: transform 0.2s, box-shadow 0.2s, border-color 0.2s;
}
.at-cal-card:hover {
  transform: translateY(-2px); border-color: color-mix(in srgb, var(--tone) 35%, var(--at-border));
  box-shadow: 0 20px 38px -26px rgba(15, 23, 42, 0.5);
}

/* the date block, in the test's own colour */
.at-cal-when {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 16px; padding: 12px 6px; text-align: center;
  background: linear-gradient(160deg,
    color-mix(in srgb, var(--tone) 92%, #000 0%),
    color-mix(in srgb, var(--tone) 70%, #0a1a38 40%));
  color: #fff; box-shadow: 0 12px 24px -16px color-mix(in srgb, var(--tone) 70%, transparent);
}
.at-cal-when b { font-family: var(--at-font-head); font-size: 2rem; line-height: 1; }
.at-cal-when em { font-style: normal; font-weight: 700; font-size: 0.78rem; letter-spacing: 0.1em; margin-top: 4px; }
.at-cal-when small { font-size: 0.7rem; opacity: 0.75; margin-top: 2px; }

.at-cal-body { min-width: 0; }
.at-cal-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.at-cal-test {
  display: inline-flex; align-items: center; gap: 9px;
  font-family: var(--at-font-head); font-weight: 700; font-size: 1.08rem; color: var(--at-ink);
}
.at-cal-test:hover { color: var(--tone); }
.at-cal-test.is-plain { color: var(--at-ink); }
.at-cal-emoji { font-size: 1.15rem; }

.at-cal-soon {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--at-accent-soft, #fff4e0); color: var(--at-accent-dark, #c97c04);
  border-radius: 100px; padding: 4px 12px; font-size: 0.74rem; font-weight: 700; white-space: nowrap;
}
.at-cal-soon.is-now { background: #dcfce7; color: #166534; }

.at-cal-date { margin: 4px 0 14px; color: var(--at-muted); font-size: 0.88rem; }

/*
	The four dates around the paper, as a track.

	A hairline runs behind them so they read left to right as one journey.
	A date already behind the candidate wears a tick; the first one still
	ahead is lit in the test's colour and says how long is left, because
	that is the only one they have to act on today.
*/
.at-cal-track {
  display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px;
  position: relative;
}
.at-cal-track::before {
  content: ""; position: absolute; left: 24px; right: 24px; top: 26px; height: 2px;
  background: repeating-linear-gradient(90deg, var(--at-border) 0 8px, transparent 8px 16px);
  z-index: 0;
}

.at-cal-step {
  position: relative; z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  text-align: center; min-width: 0;
}

/* the dot on the line */
.at-cal-mark {
  width: 36px; height: 36px; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  background: #fff; border: 2px solid var(--at-border);
  color: var(--at-muted-2); font-size: 0.78rem;
  transition: background 0.2s, border-color 0.2s, color 0.2s, transform 0.2s;
}

.at-cal-step-body { display: block; min-width: 0; }
.at-cal-step small {
  display: block; font-size: 0.66rem; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--at-muted-2); font-weight: 700;
}
.at-cal-step b { display: block; font-size: 0.92rem; color: var(--at-ink); font-weight: 700; white-space: nowrap; margin-top: 2px; }
.at-cal-step u { display: block; text-decoration: none; font-size: 0.7rem; color: var(--at-muted-2); margin-top: 1px; }

/* a date that has been and gone */
.at-cal-step.is-done .at-cal-mark {
  background: color-mix(in srgb, var(--tone) 12%, #fff);
  border-color: color-mix(in srgb, var(--tone) 40%, transparent);
  color: var(--tone);
}
.at-cal-step.is-done b { color: var(--at-muted); font-weight: 600; }

/*
	The paper itself, in the middle of the track.

	It is the day everything else is arranged around, so it is drawn solid
	in the test's own colour whether it is behind or ahead - the only step
	that never goes quiet.
*/
.at-cal-step.is-paper .at-cal-mark {
  background: var(--tone); border-color: var(--tone); color: #fff;
}
.at-cal-step.is-paper small { color: var(--tone); }
.at-cal-step.is-paper b { color: var(--at-ink); font-weight: 800; }
.at-cal-step.is-paper.is-done .at-cal-mark { background: color-mix(in srgb, var(--tone) 55%, #fff); border-color: transparent; }

/* the one that is next */
.at-cal-step.is-next .at-cal-mark {
  background: var(--tone); border-color: var(--tone); color: #fff; transform: scale(1.12);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--tone) 16%, transparent);
}
.at-cal-step.is-next b { color: var(--tone); }
.at-cal-step.is-next u { color: var(--tone); font-weight: 700; }

.at-cal-foot-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; flex-wrap: wrap; margin-top: 12px; }
.at-cal-note { font-size: 0.8rem; color: var(--at-muted); }
.at-cal-note i { color: var(--at-accent-dark, #c97c04); }
.at-cal-apply { font-weight: 700; font-size: 0.85rem; }

/* the paper being sat today */
.at-cal-card.is-today { border-color: #16a34a; box-shadow: 0 0 0 4px #dcfce7; }

.at-cal-foot { margin: 16px 0 0; font-size: 0.82rem; color: var(--at-muted-2); text-align: center; }

@media (max-width: 760px) {
  .at-cal-card { grid-template-columns: 68px minmax(0, 1fr); gap: 14px; padding: 14px; }
  .at-cal-when b { font-size: 1.5rem; }
  .at-cal-test { font-size: 1rem; }

  /* the line only makes sense across one row, so it goes on a phone */
  .at-cal-track { grid-template-columns: 1fr 1fr; gap: 14px 10px; }
  .at-cal-track::before { display: none; }
}
@media (max-width: 560px) {
  /*
	A phone gets the four dates stacked, each on its own line with the
	mark beside it: two to a row squeezes "Roll no. slip" onto three
	lines and the date loses its place in the sentence.
  */
  .at-cal-track { grid-template-columns: 1fr; gap: 8px; }
  .at-cal-step {
    flex-direction: row; align-items: center; text-align: left; gap: 12px;
    background: var(--at-bg); border-radius: 12px; padding: 8px 12px;
  }
  .at-cal-step.is-next { background: color-mix(in srgb, var(--tone) 8%, var(--at-bg)); }
  .at-cal-mark { width: 30px; height: 30px; flex: none; }
  .at-cal-step-body { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
  .at-cal-step small { margin-right: auto; }
  .at-cal-step b, .at-cal-step u { margin-top: 0; }
}

/*
	---------- the WhatsApp group of a test ----------

	A green panel at the foot of the page: the icon, the invitation and the
	button, in one line on a desktop and stacked in the middle on a phone.
*/
.at-group-band { padding-top: 0; }
.at-group {
  display: grid; grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: 22px; align-items: center;
  background: linear-gradient(135deg, #0b3d2e 0%, #11694d 55%, #15935f 100%);
  border-radius: 22px; padding: 26px 30px; color: #eafaf2;
  box-shadow: 0 26px 46px -32px rgba(10, 56, 36, 0.9);
}
.at-group-icon {
  width: 64px; height: 64px; border-radius: 20px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, 0.14); color: #fff; font-size: 1.9rem;
}
.at-group-say h3 { color: #fff; margin: 0 0 6px; font-size: 1.3rem; }
.at-group-say p { margin: 0; color: rgba(255, 255, 255, 0.82); font-size: 0.95rem; line-height: 1.6; }
.at-group .at-btn-whatsapp { background: #fff; color: #0b3d2e; border: 0; white-space: nowrap; }
.at-group .at-btn-whatsapp:hover { background: #eafaf2; color: #0b3d2e; }

@media (max-width: 760px) {
  .at-group { grid-template-columns: 1fr; text-align: center; justify-items: center; gap: 16px; padding: 24px 20px; }
  .at-group .at-btn-whatsapp { width: 100%; }
}

/*
	---------- the two buttons under the board ----------

	One opens the rest of the ten, the other opens the week that is over.
	They read as quiet links rather than another call to action, because the
	button that matters in this column is the one that starts the paper.
*/
.at-board-more { margin-top: 10px; }

.at-board-toggle {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; margin-top: 12px; padding: 9px 14px;
  background: var(--at-bg); border: 1px solid var(--at-border); border-radius: 100px;
  color: var(--at-muted); font-family: var(--at-font-head); font-weight: 600; font-size: 0.85rem;
  cursor: pointer; transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.at-board-toggle:hover { background: var(--at-primary-soft); border-color: var(--at-primary-soft-2); color: var(--at-primary); }
.at-board-toggle i { transition: transform 0.2s; font-size: 0.78rem; }
.at-board-toggle.is-open i { transform: rotate(180deg); }
.at-board-toggle.is-ghost { background: transparent; }

/* last week sits behind a line of its own */
.at-board-last { margin-top: 16px; padding-top: 16px; border-top: 1px dashed var(--at-border); }
.at-board-last h4 {
  display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap;
  font-size: 0.95rem; margin: 0 0 10px; color: var(--at-ink);
}
.at-board-last h4 i { color: var(--at-muted-2); font-size: 0.85rem; }
.at-board-last h4 small { font-weight: 500; color: var(--at-muted); font-size: 0.78rem; }

.at-buy-card { display: grid; gap: 10px; }
.at-buy-price { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.at-buy-price b { font-family: var(--at-font-head); font-size: 1.7rem; color: var(--at-ink); line-height: 1; }
.at-buy-price s { font-size: 0.95rem; color: var(--at-muted-2); }

.at-buy-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 8px; }
.at-buy-list li { display: flex; align-items: center; gap: 9px; font-size: 0.88rem; color: var(--at-muted); }
.at-buy-list i { color: #059669; font-size: 0.8rem; }

.at-buy-help {
  display: flex; align-items: center; gap: 12px; margin-top: 6px; padding-top: 14px;
  border-top: 1px solid var(--at-border);
}
.at-buy-help > i { font-size: 1.4rem; color: #25d366; }
.at-buy-help small { display: block; font-size: 0.78rem; color: var(--at-muted); }
.at-buy-help a { font-family: var(--at-font-head); font-weight: 600; font-size: 0.95rem; }

/* the channel sits under the chat line, quieter, because it is one way */
.at-buy-channel {
  display: inline-flex; align-items: center; gap: 8px; margin-top: 10px;
  font-size: 0.85rem; color: var(--at-muted);
}
.at-buy-channel i { color: #25d366; }
.at-buy-channel:hover { color: var(--at-primary); }

/* ---------- questions and answers ---------- */
.at-faq { margin-top: 48px; }
.at-faq-item { border: 1px solid var(--at-border); border-radius: 14px; background: var(--at-surface); margin-bottom: 10px; overflow: hidden; }
.at-faq-item.is-open { border-color: color-mix(in srgb, var(--at-primary) 40%, #fff); box-shadow: var(--at-shadow); }
.at-faq-q {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: none; border: 0; cursor: pointer; text-align: left;
  padding: 18px 22px; font-family: var(--at-font-head); font-weight: 600; font-size: 1rem; color: var(--at-ink);
}
.at-faq-q i { color: var(--at-primary); font-size: 0.85rem; transition: transform 0.25s; flex: none; }
.at-faq-item.is-open .at-faq-q i { transform: rotate(180deg); }
.at-faq-a { display: none; padding: 0 22px 20px; }
.at-faq-item.is-open .at-faq-a { display: block; }
.at-faq-a p { margin: 0; color: var(--at-muted); font-size: 0.95rem; line-height: 1.75; }

/* ---------- the order form ---------- */
.at-order { margin-top: 52px; scroll-margin-top: 90px; }
.at-order-card { padding: 26px; }
.at-order-summary {
  display: flex; align-items: center; gap: 14px; padding: 14px; margin-bottom: 22px;
  background: var(--at-bg); border: 1px solid var(--at-border); border-radius: 14px;
}
.at-order-summary img { width: 44px; height: 58px; object-fit: cover; border-radius: 8px; flex: none; }
.at-order-summary > div { flex: 1; min-width: 0; }
.at-order-summary b { display: block; font-size: 0.96rem; line-height: 1.4; }
.at-order-summary small { color: var(--at-muted); font-size: 0.82rem; }
.at-order-total { font-family: var(--at-font-head); font-weight: 700; font-size: 1.2rem; color: var(--at-ink); white-space: nowrap; }

.at-req { color: #e11d48; }
.at-opt { font-weight: 400; font-size: 0.78rem; color: var(--at-muted-2); }
.at-field-note { display: block; margin-top: 5px; font-size: 0.8rem; color: var(--at-muted); }
.at-order-small { margin: 14px 0 0; font-size: 0.82rem; color: var(--at-muted); text-align: center; }

/* the form is two short steps, not one long wall of fields */
.at-order-step {
  display: flex; align-items: center; gap: 10px; margin: 26px 0 14px;
  font-family: var(--at-font-head); font-weight: 600; font-size: 1rem; color: var(--at-ink);
}
.at-order-step:first-of-type { margin-top: 0; }
.at-order-step span {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--at-primary); color: #fff; font-size: 0.82rem;
}
.at-order-hint { font-size: 0.9rem; color: var(--at-muted); margin: 0 0 14px; line-height: 1.65; }

/* ---------- where to send the money ---------- */
/* one method on screen at a time: tabs on top, its details underneath */
.at-pay-tabs { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.at-pay-tab {
  flex: 1 1 140px; cursor: pointer; text-align: center;
  padding: 13px 18px; border-radius: 100px;
  border: 1.5px solid var(--at-border); background: var(--at-surface);
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.95rem; color: var(--at-muted);
  transition: all 0.18s;
}
.at-pay-tab:hover { border-color: var(--at-primary); color: var(--at-ink); }
.at-pay-tab.is-on {
  background: var(--at-ink); border-color: var(--at-ink); color: #fbbf24;
}

.at-pay-panel {
  display: none; align-items: flex-start; gap: 16px; margin-bottom: 20px;
  padding: 18px; border: 1.5px solid var(--at-border); border-radius: 16px; background: var(--at-bg);
}
.at-pay-panel.is-on { display: flex; }

.at-pay-icon {
  width: 42px; height: 42px; border-radius: 12px; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 1.05rem;
}
.at-pay-rows { flex: 1; min-width: 0; display: grid; gap: 12px; }
.at-pay-row { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 12px; }
.at-pay-row small {
  flex: 0 0 120px; font-size: 0.78rem; color: var(--at-muted);
  text-transform: uppercase; letter-spacing: 0.06em;
}
.at-pay-row b { font-family: var(--at-font-head); font-size: 0.97rem; color: var(--at-ink); }
.at-pay-number { font-size: 1.05rem !important; letter-spacing: 0.03em; word-break: break-all; }

.at-pay-note {
  display: flex; align-items: flex-start; gap: 8px; margin: 2px 0 0;
  font-size: 0.85rem; color: var(--at-muted); line-height: 1.6;
}
.at-pay-note i { margin-top: 3px; color: var(--at-primary); }

.at-pay-copy {
  cursor: pointer; display: inline-flex; align-items: center; gap: 6px;
  padding: 6px 12px; border-radius: 100px; font-size: 0.8rem; font-weight: 600;
  background: var(--at-surface); color: var(--at-ink-2); border: 1px solid var(--at-border);
  transition: all 0.18s;
}
.at-pay-copy:hover { background: var(--at-primary); color: #fff; border-color: var(--at-primary); }
.at-pay-copy.is-done { background: #059669; color: #fff; border-color: #059669; }

/* ---------- the payment screenshot ---------- */
.at-receipt-drop {
  display: flex; flex-direction: column; align-items: center; gap: 6px; cursor: pointer;
  padding: 24px 18px; text-align: center;
  border: 2px dashed var(--at-border); border-radius: 14px; background: var(--at-bg);
  transition: border-color 0.18s, background 0.18s;
}
.at-receipt-drop:hover { border-color: var(--at-primary); }
.at-receipt-drop i { font-size: 1.5rem; color: var(--at-primary); }
.at-receipt-drop b { font-family: var(--at-font-head); font-size: 0.95rem; color: var(--at-ink); word-break: break-all; }
.at-receipt-drop small { font-size: 0.8rem; color: var(--at-muted); max-width: 340px; line-height: 1.55; }
.at-receipt-drop.is-filled { border-style: solid; border-color: #059669; background: #ecfdf5; }
.at-receipt-drop.is-filled i::before { content: "\f15b"; }
.at-receipt-field label:first-child { margin-bottom: 8px; }

.at-order-done { text-align: center; padding: 14px 4px; }
.at-order-done h3 { margin: 14px 0 8px; }
.at-order-done p { color: var(--at-muted); max-width: 440px; margin: 0 auto 20px; line-height: 1.7; }

/* ==========================================================================
   The sample reader
   The pages are canvases drawn by pdf.js, so there is no pdf viewer on the
   page and therefore no download or print button to remove.
   ========================================================================== */
.at-reader-body { background: #1e293b; }

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

.at-reader-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 12px 20px; background: #0f172a; color: #fff;
  box-shadow: 0 10px 24px -18px rgba(0,0,0,0.9);
}
.at-reader-back {
  display: inline-flex; align-items: center; gap: 8px;
  color: rgba(255,255,255,0.8); font-size: 0.9rem; font-weight: 600;
}
.at-reader-back:hover { color: #fff; }

.at-reader-title { flex: 1; min-width: 0; text-align: center; }
.at-reader-title b { display: block; font-family: var(--at-font-head); font-size: 0.98rem; color: #fff; }
.at-reader-title small { font-size: 0.76rem; color: #fbbf24; letter-spacing: 0.08em; text-transform: uppercase; }

.at-reader-tools { display: flex; align-items: center; gap: 8px; }
.at-reader-tools button {
  width: 34px; height: 34px; border-radius: 9px; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.1); color: #fff; border: 0; transition: background 0.18s;
}
.at-reader-tools button:hover { background: rgba(255,255,255,0.22); }
#zoomLabel { font-size: 0.8rem; color: rgba(255,255,255,0.75); min-width: 44px; text-align: center; }

.at-reader-stage { flex: 1; padding: 24px 16px 60px; }
.at-reader-page {
  display: block; margin: 0 auto 18px; max-width: 100%;
  border-radius: 6px; box-shadow: 0 20px 40px -24px rgba(0,0,0,0.9);
  background: #fff;
  /* the pages are pictures: nothing to select, nothing to drag away */
  user-select: none; -webkit-user-select: none; -webkit-user-drag: none; pointer-events: none;
}
.at-reader-loading { text-align: center; color: rgba(255,255,255,0.7); padding: 60px 20px; font-size: 0.95rem; }
.at-reader-loading i { margin-right: 8px; }

.at-reader-end {
  max-width: 480px; margin: 30px auto 0; text-align: center;
  background: var(--at-surface); border-radius: var(--at-radius); padding: 32px 26px;
}
.at-reader-end h3 { margin: 14px 0 8px; }
.at-reader-end p { color: var(--at-muted); margin: 0 0 20px; }
.at-reader-end-actions { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; }

@media (max-width: 700px) {
  .at-reader-title { order: 3; flex: 1 1 100%; text-align: left; }
  .at-reader-buy span { display: none; }
}

/* ==========================================================================
   About : the opening card
   It lifts over the navy head so the page starts on something solid, with
   the live numbers beside the text rather than a wall of prose.
   ========================================================================== */
.at-about-intro { padding: 0 0 64px; }
.at-intro-card {
  display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 0.65fr); gap: 44px;
  background: var(--at-surface); border: 1px solid var(--at-border);
  border-radius: var(--at-radius); padding: 44px;
  box-shadow: 0 30px 60px -36px rgba(10, 26, 56, 0.55);
  margin-top: -54px; position: relative; z-index: 2;
}
.at-intro-text h2 { font-size: 1.85rem; margin-bottom: 16px; }
.at-intro-lead { font-size: 1.08rem; line-height: 1.75; color: var(--at-ink-2); }
.at-intro-text p { color: var(--at-muted); line-height: 1.8; }
.at-intro-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }

.at-intro-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-content: start; }
.at-intro-tile {
  background: color-mix(in srgb, var(--tone-soft, #f1f5f9) 62%, #fff);
  border: 1px solid color-mix(in srgb, var(--tone, #94a3b8) 22%, #fff);
  border-radius: 16px; padding: 16px 14px; text-align: center;
}
.at-intro-tile i { font-size: 1.05rem; color: var(--tone-ink, var(--at-primary)); }
.at-intro-tile strong {
  display: block; font-family: var(--at-font-head); font-weight: 800; font-size: 1.5rem;
  color: var(--at-ink); line-height: 1.2; margin-top: 6px;
}
.at-intro-tile span { font-size: 0.78rem; color: var(--at-muted); }

@media (max-width: 900px) {
  .at-intro-card { grid-template-columns: 1fr; gap: 30px; padding: 32px 24px; margin-top: -40px; }
  .at-intro-text h2 { font-size: 1.5rem; }
}
@media (max-width: 420px) {
  /* the four tiles stay two by two - stacked they would push the page down */
  .at-intro-tile { padding: 13px 10px; }
  .at-intro-tile strong { font-size: 1.3rem; }
  .at-intro-actions .at-btn { width: 100%; }
}

/* ==========================================================================
   The people behind the project
   Two tall panels on a navy section: a photo with a ring in that person's
   own tone, a few hard facts, the write up, then the social row.
   ========================================================================== */
.at-people { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }

.at-person {
  display: flex; flex-direction: column; gap: 20px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: var(--at-radius); padding: 30px;
  position: relative; overflow: hidden;
}
/* a bar of this person's own colour along the top */
.at-person::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 4px;
  background: linear-gradient(90deg, var(--tone, var(--at-accent)), transparent 85%);
}

.at-person-head { display: flex; align-items: center; gap: 18px; }
.at-person-photo {
  flex: 0 0 96px; width: 96px; height: 96px; margin: 0;
  border-radius: 50%; overflow: hidden; background: rgba(255,255,255,0.08);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--tone, var(--at-accent)) 70%, transparent),
              0 18px 32px -18px rgba(0, 0, 0, 0.9);
}
.at-person-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
/* the stand-in when the photo cannot be loaded: the person's initials */
.at-person-photo.is-empty::after {
  content: attr(data-initials);
  display: flex; align-items: center; justify-content: center; width: 100%; height: 100%;
  font-family: var(--at-font-head); font-weight: 800; font-size: 1.9rem; letter-spacing: 0.02em;
  color: var(--tone, var(--at-accent));
  background: color-mix(in srgb, var(--tone, var(--at-accent)) 16%, transparent);
}

.at-person h3 { color: #fff; font-size: 1.35rem; margin: 0 0 4px; }
.at-person-role {
  display: inline-block; font-family: var(--at-font-head); font-size: 0.74rem; font-weight: 700;
  letter-spacing: 0.1em; text-transform: uppercase;
  color: var(--tone, var(--at-accent));
}
.at-person-tagline { color: rgba(255,255,255,0.72); font-size: 0.93rem; margin: 8px 0 0; line-height: 1.6; }

.at-person-facts { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.at-person-facts li {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.88rem; color: rgba(255,255,255,0.82);
  background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.09);
  border-radius: 12px; padding: 9px 14px;
}
.at-person-facts i { width: 18px; text-align: center; color: var(--tone, var(--at-accent)); }

.at-person-bio { flex: 1; }
.at-person-bio p { color: rgba(255,255,255,0.7); font-size: 0.95rem; line-height: 1.75; margin: 0 0 12px; }
.at-person-bio p:last-child { margin-bottom: 0; }

.at-person-foot {
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 14px;
  padding-top: 18px; border-top: 1px solid rgba(255,255,255,0.1);
}
.at-person-social { display: flex; gap: 8px; }
.at-person-social a {
  width: 38px; height: 38px; border-radius: 11px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255,255,255,0.07); color: #fff; font-size: 0.95rem;
  transition: all 0.2s;
}
.at-person-social a:hover {
  background: var(--tone, var(--at-accent)); color: var(--at-navy); transform: translateY(-2px);
}
.at-person-site {
  display: inline-flex; align-items: center; gap: 7px;
  font-family: var(--at-font-head); font-weight: 600; font-size: 0.88rem;
  color: var(--tone, var(--at-accent));
}
.at-person-site i { font-size: 0.75em; }

@media (max-width: 900px) {
  .at-people { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .at-person { padding: 24px 20px; }
  .at-person-head { flex-direction: column; align-items: flex-start; }
  .at-person-foot { flex-direction: column; align-items: flex-start; }
}

/* ---------- the help strip under the listing ---------- */
.at-help-strip { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.at-help-strip > div { flex: 1; min-width: 260px; }
.at-help-strip h3 { margin: 0 0 6px; font-size: 1.2rem; }
.at-help-strip p { color: var(--at-muted); font-size: 0.95rem; }

@media (max-width: 1000px) {
  .at-book-grid { grid-template-columns: 1fr; gap: 36px; }
  .at-book-side .at-article-sticky { position: static; grid-template-columns: 1fr 1fr; }
}
@media (max-width: 900px) {
  .at-book-head-grid { grid-template-columns: 1fr; gap: 28px; }
  .at-book-hero-cover { max-width: 240px; aspect-ratio: 3 / 4; }
  .at-book-hero-body h1 { font-size: 1.8rem; }
  .at-book-side .at-article-sticky { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .at-book-points { grid-template-columns: 1fr; }
  .at-pay-tab { flex: 1 1 100%; }
  .at-pay-panel { flex-direction: column; }
  .at-pay-row small { flex: 1 1 100%; }
  .at-book-actions .at-btn { width: 100%; }
  .at-order-card { padding: 20px 16px; }
  .at-help-strip { flex-direction: column; align-items: flex-start; }
  .at-help-strip .at-btn { width: 100%; }
}

/* ---------- Responsive ---------- */

/*
	The navbar is the one row that cannot be allowed to wrap: seven links and
	two buttons need about 1200px of window. Between 1200 and 1150 the gaps
	tighten, and below that the row is put away behind the menu button - which
	is far better than links stacking two lines high.
*/
@media (max-width: 1280px) {
  .at-menu { gap: 14px; }
  .at-menu ul { gap: 2px; }
  .at-menu ul a { padding: 8px 10px; font-size: 0.92rem; }
  .at-menu-actions { gap: 6px; }
  .at-menu-actions .at-btn { padding: 10px 14px; font-size: 0.88rem; }
}
/*
	The phone menu is a drawer, not a flap under the bar.

	It sits off screen to the right and slides over the page, with the page
	dimmed behind it. The rows are full width with an icon each, the way a
	phone app does it, and they arrive one after another so the panel feels
	like it opened rather than appeared.
*/
@media (max-width: 1150px) {

  .at-nav-toggle { display: flex; }

  /*
	The bar's frosted glass has to go on a phone. A backdrop filter makes
	the bar the containing block for anything fixed inside it, which would
	pin the drawer to the 74 pixels of the bar instead of the screen. The
	bar keeps its own z-index too, so while the drawer is out it has to
	rise above the dim, taking the drawer with it.
  */
  .at-navbar { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.at-nav-open .at-navbar { z-index: 1300; }

  .at-menu {
    position: fixed; top: 0; right: 0; bottom: 0;
    width: min(340px, 86vw);
    display: flex; flex-direction: column; align-items: stretch; gap: 0;
    padding: 0 0 24px;
    background: #fff;
    border-bottom: 0;
    box-shadow: -34px 0 70px -34px rgba(10, 26, 56, 0.55);
    z-index: 1200;
    overflow-y: auto; overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    transform: translateX(102%);
    visibility: hidden;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s linear 0.42s;
  }
  .at-menu.open {
    transform: none; visibility: visible;
    transition: transform 0.42s cubic-bezier(0.22, 1, 0.36, 1), visibility 0s;
  }

  /* the drawer's own header: logo on the left, a way out on the right */
  .at-menu-head {
    display: flex; align-items: center; justify-content: space-between; gap: 12px;
    padding: 16px 18px; border-bottom: 1px solid var(--at-border);
    position: sticky; top: 0; background: #fff; z-index: 2;
  }
  .at-menu-logo { height: 32px; width: auto; display: block; }
  .at-menu-close {
    width: 38px; height: 38px; flex: none; border: 0; border-radius: 12px; cursor: pointer;
    background: var(--at-primary-soft); color: var(--at-primary); font-size: 1.05rem;
    display: inline-flex; align-items: center; justify-content: center;
    transition: background 0.2s, color 0.2s;
  }
  .at-menu-close:hover { background: var(--at-primary); color: #fff; }

  .at-menu ul { flex-direction: column; align-items: stretch; gap: 2px; padding: 14px 12px 6px; }
  .at-menu ul a {
    display: flex; align-items: center; gap: 12px;
    padding: 13px 14px; font-size: 1rem; border-radius: 12px;
  }
  .at-menu ul a i { width: 20px; text-align: center; font-size: 0.95rem; color: var(--at-primary); opacity: 0.85; }
  .at-menu ul a.active { background: var(--at-primary-soft); color: var(--at-primary); }
  .at-menu ul a.active i { opacity: 1; }
  .at-menu ul a.active::after { display: none; }

  /*
	In the drawer there is nowhere for a panel to hang, so the list folds
	open under its heading instead - and only on a tap, because hover on a
	touch screen would leave it stuck open.
  */
  .at-sub-toggle { width: 100%; padding: 13px 14px; font-size: 1rem; border-radius: 12px; }
  .at-sub-toggle > i:not(.at-sub-caret) { width: 20px; text-align: center; font-size: 0.95rem; color: var(--at-primary); opacity: 0.85; }
  .at-sub-toggle > span { flex: 1; text-align: left; }
  .at-sub-toggle.active { background: var(--at-primary-soft); color: var(--at-primary); }
  .at-sub-toggle.active::after { display: none; }
  .at-sub-caret { margin-left: auto; }

  .at-menu ul.at-submenu {
    position: static; display: none; min-width: 0;
    padding: 2px 0 6px 16px; gap: 2px;
    background: none; border: 0; border-radius: 0; box-shadow: none;
    opacity: 1; visibility: visible; transform: none; transition: none;
  }
  .at-menu ul.at-submenu::before { display: none; }
  .at-has-sub:hover > ul.at-submenu { display: none; }
  .at-has-sub.is-open > ul.at-submenu { display: flex; }
  .at-menu ul.at-submenu a { padding: 11px 14px; font-size: 0.97rem; border-radius: 12px; }

  .at-menu-actions {
    flex-direction: column; gap: 10px; padding: 14px 18px 0;
    margin-top: auto; border-top: 1px solid var(--at-border); padding-top: 18px;
  }
  .at-menu-actions .at-btn { width: 100%; padding: 13px 22px; font-size: 0.97rem; justify-content: center; }

  /* each row arrives a moment after the one above it */
  .at-menu.open > ul > li, .at-menu.open .at-menu-actions { animation: atNavRowIn 0.42s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .at-menu.open ul li:nth-child(1) { animation-delay: 0.08s; }
  .at-menu.open ul li:nth-child(2) { animation-delay: 0.12s; }
  .at-menu.open ul li:nth-child(3) { animation-delay: 0.16s; }
  .at-menu.open ul li:nth-child(4) { animation-delay: 0.20s; }
  .at-menu.open ul li:nth-child(5) { animation-delay: 0.24s; }
  .at-menu.open ul li:nth-child(6) { animation-delay: 0.28s; }
  .at-menu.open ul li:nth-child(7) { animation-delay: 0.32s; }
  .at-menu.open .at-menu-actions { animation-delay: 0.36s; }
}

@keyframes atNavRowIn {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: none; }
}

/* the page behind the drawer */
.at-nav-backdrop {
  position: fixed; inset: 0; z-index: 1150;
  background: rgba(10, 26, 56, 0.5);
  -webkit-backdrop-filter: blur(3px); backdrop-filter: blur(3px);
  opacity: 0; transition: opacity 0.35s;
}
.at-nav-backdrop.show { opacity: 1; }
/* while the drawer is open the page underneath stays put */
body.at-nav-open { overflow: hidden; }

@media (min-width: 1151px) {
  .at-menu-head { display: none; }
  .at-menu ul a i { display: none; }
  /*
	The links sit in the middle of the bar: the menu takes the whole space
	between the logo and the buttons, and its list is centred inside it.
  */
  .at-menu { flex: 1; }
  .at-menu > ul { margin-left: auto; margin-right: auto; }
  /* the heading in the bar goes without its icon, the panel under it keeps them */
  .at-sub-toggle > i:not(.at-sub-caret) { display: none; }
  .at-menu ul.at-submenu a i {
    display: inline-block; width: 18px; text-align: center;
    font-size: 0.9rem; color: var(--at-primary); opacity: 0.85;
  }
  .at-nav-backdrop { display: none; }
}

@media (max-width: 1100px) {
  .at-grid-4 { grid-template-columns: repeat(3, 1fr); }
  .at-steps { grid-template-columns: repeat(2, 1fr); }
  .at-footer-grid { grid-template-columns: 1fr 1fr; }
  .at-hero h1 { font-size: 2.8rem; }
}
@media (max-width: 900px) {
  h1 { font-size: 2.1rem; }
  h2 { font-size: 1.55rem; }
  .at-section { padding: 64px 0; }
  .at-hero { padding: 64px 0 80px; }
  .at-hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .at-hero-visual { max-width: 460px; margin: 0 auto; }
  .at-grid-4, .at-grid-3 { grid-template-columns: repeat(2, 1fr); }
  .at-features-split { grid-template-columns: 1fr; gap: 40px; }
  .at-detail-layout { grid-template-columns: 1fr; }
  .at-paper-box { position: static; }
  /* stacked, so there is nothing to stick to */
  .at-side-top .at-paper-box { position: static; }
  .at-auth { grid-template-columns: 1fr; }
  .at-auth-side { display: none; }
  .at-result-summary { grid-template-columns: 1fr; }
  .at-contact-grid { grid-template-columns: 1fr; }
  .at-values { grid-template-columns: 1fr; }
  .at-test-intro .at-paper-facts { grid-template-columns: 1fr 1fr; }

  /* the drawer rules live in the 1150px block above, which still applies here */
}
@media (max-width: 600px) {
  .at-grid-4, .at-grid-3, .at-grid-2 { grid-template-columns: 1fr; }
  /* the three hero numbers stay on one line on a phone */
  .at-hero-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .at-hero-stats div { min-width: 0; padding: 10px 12px; }
  .at-hero-stats div strong { font-size: 1.3rem; }
  .at-hero-stats div span { font-size: 0.72rem; }
  .at-steps { grid-template-columns: 1fr; }
  .at-footer-grid { grid-template-columns: 1fr; }
  .at-hero h1 { font-size: 2.2rem; }
  .at-hero-float { display: none; }
  .at-form-row { grid-template-columns: 1fr; }
  .at-stat-tiles, .at-result-facts { grid-template-columns: 1fr; }
  .at-cta { padding: 40px 24px; }
  .at-paper-facts { grid-template-columns: 1fr 1fr; }
  .at-test-intro .at-paper-facts { grid-template-columns: 1fr 1fr; }
  .at-bars { gap: 8px; }
  .at-bar-labels { gap: 8px; }

  /* the marks pill and the percent need the full width on a phone */
  .at-chapter { grid-template-columns: 54px minmax(0, 1fr); gap: 12px 14px; }
  .at-chapter-right { grid-column: 1 / -1; justify-content: space-between; }
  .at-chapter-percent { display: flex; align-items: baseline; gap: 6px; }
  .at-chapter-percent strong { font-size: 1rem; }
}

/* ---------- Print (result card as PDF via browser) ---------- */
@media print {
  .at-navbar, .at-footer, .at-back2top, .at-no-print, .at-review-filter { display: none !important; }
  body { background: #fff; }
  .at-result-hero { padding: 24px 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .at-result-wrap { margin-top: 0; }
  .at-card { box-shadow: none; break-inside: avoid; }
  .at-review-item { break-inside: avoid; }
  .at-ch-bar i, .at-bar-col .bar, .at-donut .value { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
