/* Ali Tutors. Design idea: "ink and highlighter", a top student's revision notes.
   Warm paper, deep ink, a yellow highlighter on what matters, red-pen ticks like a teacher's marking.
   Fonts are self-hosted (OFL, see fonts/OFL.txt). No JavaScript needed for any of this. */

@font-face { font-family: 'Fraunces'; src: url('fonts/fraunces-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-400.woff2') format('woff2'); font-weight: 400; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }
@font-face { font-family: 'Figtree'; src: url('fonts/figtree-700.woff2') format('woff2'); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: 'Caveat'; src: url('fonts/caveat-600.woff2') format('woff2'); font-weight: 600; font-style: normal; font-display: swap; }

:root {
  --paper: #FBF8F2;
  --paper-2: #F3EDE2;
  --card: #FFFFFF;
  --ink: #1C1B33;        /* headings, buttons, dark sections */
  --ink-deep: #13122A;   /* footer */
  --text: #3E3D52;       /* body copy: 9.9:1 on paper */
  --muted: #67667A;      /* captions: 5.3:1 on paper */
  --line: #E5DDCF;
  --line-2: #D6CBB8;
  --hl: #FFE07A;         /* highlighter: backgrounds only, never text on paper */
  --hl-2: #FFD447;
  --pen: #C2382A;        /* red pen: ticks, notes, marking. 5.1:1 on paper */
  --rule: #CFDDEE;       /* exercise-book blue lines */
  --on-ink: #F1F0F7;
  --on-ink-2: #B9B8CC;   /* 8.6:1 on ink */

  --display: 'Fraunces', Georgia, 'Times New Roman', serif;
  --body: 'Figtree', -apple-system, BlinkMacSystemFont, 'Segoe UI', Helvetica, Arial, sans-serif;
  --hand: 'Caveat', 'Segoe Print', 'Bradley Hand', cursive;

  --maxw: 1120px;
  --gutter: 24px;
  --r: 16px;
  --r-sm: 10px;

  --tick: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M3.5 13.2c2.4 1.3 4.3 3.3 5.6 5.8C11.6 12.2 15.8 7 20.8 3.8' fill='none' stroke='%23C2382A' stroke-width='2.7' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  --cross: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5.5 5.8c4.5 3.9 8.6 8.2 12.6 12.6M18.2 5.2C13.9 9.4 9.6 13.9 5.4 18.6' fill='none' stroke='%23C2382A' stroke-width='2.6' stroke-linecap='round'/%3E%3C/svg%3E");
  --circle: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 120 50' preserveAspectRatio='none'%3E%3Cpath d='M16 31C11 15 41 5 67 6c29 1 49 9 47 22-2 14-34 18-61 17C27 44 8 38 9 27c1-8 13-15 31-18' fill='none' stroke='%23C2382A' stroke-width='2.4' stroke-linecap='round'/%3E%3C/svg%3E");
  --plus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 6v12M6 12h12' stroke='%231C1B33' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  --minus: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 12h12' stroke='%231C1B33' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 92px; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
body {
  margin: 0; background: var(--paper); color: var(--text);
  font: 400 17px/1.65 var(--body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
h1, h2, h3, h4 { font-family: var(--display); font-weight: 600; color: var(--ink); margin: 0; text-wrap: balance; }
h1 { font-size: clamp(38px, 4.6vw, 60px); line-height: 1.05; letter-spacing: -0.025em; }
h2 { font-size: clamp(30px, 3.5vw, 44px); line-height: 1.1; letter-spacing: -0.02em; }
h3 { font-size: 21px; line-height: 1.25; letter-spacing: -0.01em; }
p { margin: 0 0 1em; text-wrap: pretty; }
a { color: var(--ink); text-decoration-thickness: 1.5px; text-underline-offset: 3px; }
strong, b { color: var(--ink); font-weight: 700; }
::selection { background: var(--hl); color: var(--ink); }

/* The highlighter: a marker stroke across the lower part of the words */
mark {
  color: inherit; background-color: transparent;
  background-image: linear-gradient(100deg, rgba(255,224,122,0) .5%, rgba(255,224,122,1) 2%, rgba(255,224,122,.85) 7%, rgba(255,224,122,.75) 90%, rgba(255,224,122,1) 96%, rgba(255,224,122,0) 99.5%);
  background-repeat: no-repeat; background-size: 100% .6em; background-position: 0 85%;
  padding: 0 .08em; -webkit-box-decoration-break: clone; box-decoration-break: clone;
}

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.cta-band :focus-visible, .footer :focus-visible { outline-color: var(--hl); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.skip {
  position: absolute; left: 12px; top: -80px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: 12px 18px; border-radius: var(--r-sm);
  font-weight: 700; text-decoration: none;
}
.skip:focus { top: 12px; }

.wrap { max-width: var(--maxw); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.narrow { max-width: 720px; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
@media (max-width: 600px) { :root { --gutter: 20px; } body { font-size: 16.5px; } }

/* ---------- Buttons and links ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 13px 24px; border: 2px solid transparent; border-radius: var(--r-sm);
  font: 700 16px/1.2 var(--body); text-decoration: none; text-align: center; cursor: pointer;
  transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease, color .15s ease;
}
.btn-primary { background: var(--ink); color: var(--paper); box-shadow: 4px 4px 0 var(--hl-2); }
.btn-primary:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 var(--hl-2); }
.btn-primary:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--hl-2); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }
.btn-light { background: var(--hl); color: var(--ink); box-shadow: 4px 4px 0 rgba(255,255,255,.22); }
.btn-light:hover { transform: translate(-2px, -2px); box-shadow: 6px 6px 0 rgba(255,255,255,.3); }
.btn-light:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 rgba(255,255,255,.3); }
.btn-outline-light { color: var(--paper); border-color: rgba(251,248,242,.5); }
.btn-outline-light:hover { border-color: var(--paper); background: rgba(255,255,255,.06); }
.btn-sm { min-height: 44px; padding: 9px 18px; font-size: 15px; }
.btn-primary.btn-sm { box-shadow: 3px 3px 0 var(--hl-2); }
.btn-primary.btn-sm:hover { box-shadow: 5px 5px 0 var(--hl-2); }
@media (prefers-reduced-motion: reduce) { .btn { transition: none; } .btn:hover, .btn:active { transform: none; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 0;
  font-weight: 700; color: var(--ink); text-decoration: none;
  background: linear-gradient(var(--hl), var(--hl)) no-repeat 0 80% / 0 .5em;
  transition: background-size .2s ease;
}
.link-arrow::after { content: '\2192'; content: '\2192' / ''; transition: transform .15s ease; }
.link-arrow:hover { background-size: 100% .5em; }
.link-arrow:hover::after { transform: translateX(3px); }
.text-link {
  color: var(--ink); font-weight: 600; text-decoration: underline;
  text-decoration-color: var(--hl-2); text-decoration-thickness: 3px; text-underline-offset: 3px;
}
.text-link:hover { text-decoration-color: var(--ink); }

/* ---------- Header ---------- */
.nav {
  position: sticky; top: 0; z-index: 30;
  background: rgba(251,248,242,.92);
  -webkit-backdrop-filter: saturate(150%) blur(10px); backdrop-filter: saturate(150%) blur(10px);
  border-bottom: 1px solid var(--line);
}
.nav-bar { display: flex; align-items: center; gap: 12px; min-height: 72px; }
.brand {
  display: inline-flex; align-items: center; gap: 11px;
  font: 600 21px/1 var(--display); letter-spacing: -0.01em; color: var(--ink); text-decoration: none;
}
.brand img { width: 34px; height: 34px; }
.nav-links { display: none; margin-left: auto; }
.nav-links ul { display: flex; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: block; padding: 10px 14px; border-radius: 8px;
  font-weight: 600; font-size: 15.5px; color: var(--ink); text-decoration: none;
}
.nav-links a:hover { background: var(--paper-2); }
.nav-links a[aria-current="page"] {
  background-image: linear-gradient(var(--hl), var(--hl)); background-repeat: no-repeat;
  background-size: calc(100% - 28px) .45em; background-position: 14px 72%;
}
.nav-cta { margin-left: auto; }

.menu summary {
  list-style: none; width: 44px; height: 44px; display: grid; place-items: center;
  cursor: pointer; border-radius: 8px;
}
.menu summary::-webkit-details-marker { display: none; }
.menu summary:hover { background: var(--paper-2); }
.bars, .bars::before, .bars::after { display: block; width: 20px; height: 2px; background: var(--ink); border-radius: 2px; }
.bars { position: relative; }
.bars::before, .bars::after { content: ''; position: absolute; left: 0; transition: transform .15s ease; }
.bars::before { top: -6px; }
.bars::after { top: 6px; }
.menu[open] .bars { background: transparent; }
.menu[open] .bars::before { top: 0; transform: rotate(45deg); }
.menu[open] .bars::after { top: 0; transform: rotate(-45deg); }
.menu-panel {
  position: absolute; left: 0; right: 0; top: 100%;
  background: var(--paper); border-bottom: 1px solid var(--line);
  box-shadow: 0 24px 40px -24px rgba(28,27,51,.4);
  padding: 6px var(--gutter) 18px;
}
.menu-panel a {
  display: block; padding: 15px 2px; border-bottom: 1px solid var(--line);
  font: 600 22px/1.2 var(--display); color: var(--ink); text-decoration: none;
}
.menu-panel a:last-child { border-bottom: 0; }
.menu-panel a[aria-current="page"] mark, .menu-panel a[aria-current="page"] { text-decoration: underline; text-decoration-color: var(--hl-2); text-decoration-thickness: 4px; }
@media (min-width: 900px) {
  .nav-links { display: block; }
  .menu { display: none; }
  .nav-cta { margin-left: 10px; }
}

/* ---------- Section scaffolding ---------- */
.section { padding: clamp(56px, 7.5vw, 96px) 0; }
.alt { background: var(--paper-2); }
.section-head { max-width: 680px; margin-bottom: clamp(32px, 4vw, 52px); }
.section-head.split {
  max-width: none; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 16px 64px; align-items: end;
}
.section-head h2 + .section-sub, h2 + .section-sub { margin-top: 16px; }
@media (max-width: 760px) { .section-head.split { grid-template-columns: 1fr; } }
.section-sub { margin: 0; font-size: 18px; line-height: 1.6; color: var(--text); max-width: 54ch; }
.prose p { color: var(--text); max-width: 62ch; }
.prose p:last-child { margin-bottom: 0; }

/* Handwritten margin note, in red pen, above a heading */
.kicker {
  display: inline-block; margin: 0 0 10px;
  font: 600 26px/1 var(--hand); color: var(--pen); letter-spacing: 0;
  transform: rotate(-2deg); transform-origin: left center;
}
.cta-band .kicker { color: var(--hl); }

/* Ticks and checklists: red-pen ticks, aligned to the text edge */
.ticks, .check-list, .lose-list { list-style: none; margin: 0; padding: 0; }
.ticks li, .check-list li, .lose-list li { position: relative; padding-left: 32px; }
.ticks li::before, .check-list li::before, .lose-list li::before {
  content: ''; position: absolute; left: 0; width: 22px; height: 22px;
  background: var(--tick) no-repeat center / contain;
}
.ticks { display: flex; flex-wrap: wrap; gap: 10px 28px; font-size: 15.5px; font-weight: 600; color: var(--ink); }
.ticks li::before { top: 0; }
.check-list li { padding-top: 7px; padding-bottom: 7px; color: var(--text); }
.check-list li::before { top: 9px; }
.check-list a { color: var(--ink); font-weight: 600; text-decoration-color: var(--line-2); }
.check-list a:hover { text-decoration-color: var(--ink); }

/* ---------- Home hero ---------- */
.hero { padding: clamp(36px, 5vw, 72px) 0 clamp(48px, 6vw, 88px); overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) clamp(280px, 29vw, 380px); gap: clamp(48px, 6vw, 88px); align-items: center; }
.eyebrow { display: flex; align-items: center; gap: 10px; margin: 0 0 22px; font-weight: 600; font-size: 15.5px; color: var(--text); }
.eyebrow::before { content: ''; width: 22px; height: 22px; flex: none; background: var(--tick) no-repeat center / contain; }
.hero h1 { margin-bottom: 24px; }
.lede { font-size: clamp(18px, 1.45vw, 20px); line-height: 1.6; color: var(--text); max-width: 33em; margin: 0 0 34px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 16px 30px; }
.hero .ticks { margin-top: 34px; }
.hero-id, .season-pill { display: none; }

.hero-visual { position: relative; justify-self: end; width: 100%; max-width: 380px; margin-right: 12px; }
.portrait { margin: 0; }
.portrait img {
  width: 100%; height: auto; aspect-ratio: 1 / 1; object-fit: cover;
  background: var(--card); border: 10px solid var(--card); border-radius: 6px;
  box-shadow: 0 2px 0 var(--line), 0 34px 60px -34px rgba(28,27,51,.55);
}
.sticky {
  position: absolute; left: -48px; bottom: 34px; width: 172px; margin: 0;
  padding: 18px 16px 20px; background: var(--hl); color: var(--ink);
  font: 600 25px/1.05 var(--hand); text-align: center;
  transform: rotate(-5deg); box-shadow: 0 14px 22px -12px rgba(28,27,51,.4);
}
.sticky::before {
  content: ''; position: absolute; top: -11px; left: 50%; width: 70px; height: 22px;
  transform: translateX(-50%) rotate(3deg);
  background: rgba(255,255,255,.6); box-shadow: 0 1px 2px rgba(28,27,51,.08);
}
.hand-note {
  position: absolute; right: -12px; top: -54px; margin: 0;
  display: flex; align-items: flex-start; gap: 0;
  font: 600 28px/1 var(--hand); color: var(--pen); transform: rotate(5deg);
}
.hand-note svg { margin: 14px 0 0 -4px; transform: scaleX(-1) rotate(-12deg); }

@media (max-width: 860px) {
  .hero { padding-top: 28px; }
  /* Phone: avatar and name on one row, so the headline and button stay above the fold */
  .hero-grid { grid-template-columns: 72px minmax(0, 1fr); gap: 0 16px; align-items: center; }
  .hero-copy { display: contents; }
  .hero-copy > * { grid-column: 1 / -1; }
  .hero-visual { grid-column: 1; grid-row: 1; max-width: 72px; margin: 0 0 20px; justify-self: start; }
  .portrait img { border-width: 3px; border-color: var(--hl-2); border-radius: 50%; box-shadow: none; }
  .sticky, .hand-note, .eyebrow { display: none; }
  .hero-copy > .hero-id { display: block; grid-column: 2; grid-row: 1; margin-bottom: 20px; line-height: 1.3; }
  .hero-id strong { display: block; font: 600 21px/1.2 var(--display); }
  .hero-id span { font-size: 14.5px; color: var(--muted); }
  .hero-copy > .season-pill {
    display: block; justify-self: start; margin: 0 0 18px; padding: 6px 14px 7px;
    background: var(--hl); color: var(--ink); font: 600 21px/1 var(--hand); transform: rotate(-1.5deg);
  }
  .lede { margin-bottom: 28px; }
  .hero .cta-row .btn { flex: 1 1 100%; }
  .hero .ticks { margin-top: 26px; }
}

/* ---------- Results slip ---------- */
.proof-grid { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 48px 88px; align-items: center; }
.proof-copy .section-sub { margin: 16px 0 20px; }
.slip {
  position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 6px;
  padding: 26px 32px 18px; transform: rotate(.6deg);
  box-shadow: 0 2px 0 var(--line), 0 30px 50px -34px rgba(28,27,51,.45);
}
.slip-head {
  display: flex; justify-content: space-between; gap: 16px; padding-bottom: 14px; border-bottom: 2px solid var(--ink);
  font: 700 12.5px/1 var(--body); letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.slip table { width: 100%; border-collapse: collapse; }
.slip th, .slip td { padding: 16px 0; border-bottom: 1px dashed var(--line-2); text-align: left; vertical-align: middle; }
.slip tr:last-child th, .slip tr:last-child td { border-bottom: 0; }
.slip th { font: 600 17px/1.3 var(--body); color: var(--ink); }
.slip th small { display: block; margin-top: 2px; font-size: 14px; font-weight: 400; color: var(--muted); }
.slip .grade { width: 96px; text-align: center; font: 600 30px/1 var(--display); color: var(--ink); white-space: nowrap; }
.slip .detail { width: 34%; text-align: right; font-size: 15.5px; color: var(--text); }
.circled { position: relative; display: inline-block; padding: 2px 6px; font-weight: 700; color: var(--ink); }
.circled::after { content: ''; position: absolute; inset: -10px -13px -9px -11px; background: var(--circle) no-repeat center / 100% 100%; pointer-events: none; }
.slip-note {
  position: absolute; right: 22px; top: -40px; margin: 0;
  font: 600 27px/1 var(--hand); color: var(--pen); transform: rotate(-4deg);
}
.slip-wrap { margin-top: 30px; }
.slip-simple .grade { width: auto; text-align: right; }
@media (max-width: 860px) {
  .proof-grid { grid-template-columns: 1fr; gap: 56px; }
  .slip { transform: none; padding: 22px 20px 12px; }
  .slip .grade { width: 70px; font-size: 26px; }
  .slip-note { top: -36px; right: 14px; font-size: 25px; }
}

/* ---------- Quotes ---------- */
.quotes { display: grid; grid-template-columns: 1fr 1fr; gap: 40px 72px; }
.quote { margin: 0; display: flex; flex-direction: column; }
.quote::before { content: '\201C'; content: '\201C' / ''; height: 40px; font: 600 92px/.8 var(--display); color: var(--pen); }
.quote blockquote { margin: 10px 0 26px; }
.quote blockquote p { margin: 0; font-size: clamp(18px, 1.6vw, 20px); line-height: 1.62; color: var(--ink); }
.quote figcaption { margin-top: auto; display: flex; align-items: center; gap: 14px; font-size: 15px; line-height: 1.4; color: var(--muted); }
.quote figcaption b { display: block; font-size: 16px; color: var(--ink); }
.avatar {
  flex: none; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--ink); color: var(--hl); font: 600 20px/1 var(--display);
}
.quote-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 30px 26px; }
.quote-card::before { height: 34px; font-size: 80px; }
.quote-card blockquote p { font-size: 18px; }
@media (max-width: 760px) { .quotes { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- Subject index (a prospectus contents page) ---------- */
.index { border-top: 2px solid var(--ink); }
.index-group { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 0 40px; padding: 26px 0; border-bottom: 1px solid var(--line-2); }
.index-label h3 { margin: 12px 0 4px; font-size: 22px; }
.index-label p { margin: 0; font-size: 15px; font-weight: 600; color: var(--muted); }
.index-list { list-style: none; margin: 0; padding: 0; }
.index-list li + li { border-top: 1px solid var(--line); }
.row-link {
  display: grid; grid-template-columns: minmax(0, 17em) minmax(0, 1fr) 24px; gap: 4px 32px; align-items: center;
  margin: 0 -14px; padding: 16px 14px; border-radius: var(--r-sm);
  color: var(--text); text-decoration: none; transition: background-color .15s ease;
}
.row-link:hover { background: rgba(255,224,122,.5); }
.row-name { font: 600 20px/1.3 var(--display); letter-spacing: -0.01em; color: var(--ink); }
.row-desc { font-size: 15.5px; line-height: 1.5; color: var(--muted); }
.row-go { justify-self: end; font-weight: 700; color: var(--ink); }
.row-go::after { content: '\2192'; content: '\2192' / ''; display: inline-block; transition: transform .15s ease; }
.row-link:hover .row-go::after { transform: translateX(4px); }
.index-compact .row-desc { display: none; }
.index-compact .row-link { grid-template-columns: minmax(0, 1fr) 24px; }
@media (max-width: 860px) {
  .index-group { grid-template-columns: 1fr; padding: 22px 0 14px; }
  .index-label { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 4px; }
  .index-label h3 { margin: 0; }
  .row-link { grid-template-columns: minmax(0, 1fr) 24px; gap: 2px 16px; }
  .row-name { grid-column: 1; }
  .row-desc { grid-column: 1; grid-row: 2; }
  .row-go { grid-column: 2; grid-row: 1 / span 2; }
}

/* ---------- Pricing ---------- */
.tiers { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.tier { display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 34px; }
.tier-label { margin: 0 0 18px; font-size: 24px; }
.tier-price { margin: 0; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 12px; }
.tier-price .amount { font: 600 64px/1 var(--display); letter-spacing: -0.035em; color: var(--ink); }
.tier-price .unit { font-size: 16px; color: var(--muted); }
.tier-per { margin: 10px 0 22px; padding-bottom: 22px; border-bottom: 1px dashed var(--line-2); font-size: 15.5px; color: var(--muted); }
.tier .check-list { margin-bottom: 28px; }
.tier-actions { margin-top: auto; display: flex; flex-direction: column; align-items: flex-start; gap: 14px; }
.tier-actions .btn { width: 100%; }
.tier-actions .text-link { font-size: 15.5px; }
.fine { margin: 26px 0 0; font-size: 16px; color: var(--text); display: flex; flex-wrap: wrap; align-items: center; gap: 4px 16px; }
.note {
  margin: 0 0 28px; padding: 18px 22px; background: var(--card); border: 1px solid var(--line);
  border-left: 4px solid var(--hl-2); border-radius: var(--r-sm); font-size: 16px; color: var(--text);
}
@media (max-width: 760px) { .tiers { grid-template-columns: 1fr; } .tier { padding: 28px 24px; } .tier-price .amount { font-size: 56px; } }

/* ---------- How it works ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.step { position: relative; padding-top: 84px; }
.step .n { position: absolute; top: 0; left: 0; z-index: 0; font: 600 64px/1 var(--display); color: var(--ink); }
.step .n::after {
  content: ''; position: absolute; z-index: -1; left: -6px; right: -10px; bottom: 6px; height: .32em;
  background: var(--hl); border-radius: 3px; transform: rotate(-3deg);
}
.step:not(:last-child)::after {
  content: ''; position: absolute; top: 34px; left: 64px; right: -28px;
  border-top: 2px dashed var(--line-2);
}
.step h3 { margin: 0 0 8px; font: 700 19px/1.3 var(--body); letter-spacing: 0; }
.step p { margin: 0; font-size: 16px; color: var(--text); }
@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: 32px; }
  .step { padding: 0 0 0 76px; min-height: 56px; }
  .step .n { font-size: 52px; }
  .step:not(:last-child)::after { display: none; }
}

/* ---------- FAQ ---------- */
.faq-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 40px 88px; align-items: start; }
.faq-aside { position: sticky; top: 108px; }
.faq-aside .section-sub { margin: 16px 0 22px; }
.faq-list { border-top: 2px solid var(--ink); max-width: 860px; }
.faq-item { border-bottom: 1px solid var(--line-2); }
.faq-item summary {
  display: flex; align-items: center; justify-content: space-between; gap: 20px;
  padding: 22px 2px; cursor: pointer; list-style: none;
  font: 600 18px/1.4 var(--body); color: var(--ink);
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: ''; flex: none; width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--ink); background: var(--plus) no-repeat center / 16px;
  transition: background-color .15s ease;
}
.faq-item summary:hover::after { background-color: var(--hl); }
.faq-item[open] summary::after { background-image: var(--minus); background-color: var(--hl); }
.faq-item .answer { padding: 0 52px 24px 2px; max-width: 66ch; }
.faq-item .answer p { margin: 0 0 10px; font-size: 16.5px; color: var(--text); }
.faq-item .answer p:last-child { margin-bottom: 0; }
.faq-item .answer a { font-weight: 600; text-decoration-color: var(--hl-2); text-decoration-thickness: 3px; }
@media (max-width: 860px) {
  .faq-grid { grid-template-columns: 1fr; }
  .faq-aside { position: static; }
  .faq-item .answer { padding-right: 2px; }
}

/* ---------- Closing call to action (dark) ---------- */
.cta-band { background: var(--ink); color: var(--on-ink); padding: clamp(64px, 8vw, 104px) 0; }
.cta-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: 36px 72px; align-items: center; }
.cta-band h2 { color: var(--paper); font-size: clamp(32px, 4vw, 50px); margin-bottom: 16px; }
.cta-band p { margin: 0; max-width: 42ch; font-size: 18px; color: var(--on-ink-2); }
.cta-actions { display: flex; flex-direction: column; align-items: flex-start; gap: 24px; }
.cta-contacts { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 26px; }
.cta-contacts a { color: var(--paper); font-weight: 600; text-decoration-color: rgba(255,224,122,.75); text-decoration-thickness: 2px; }
.cta-contacts a:hover { text-decoration-color: var(--hl); }
@media (max-width: 860px) {
  .cta-grid { grid-template-columns: 1fr; }
  .cta-actions .btn { width: 100%; }
}

/* ---------- Inner pages ---------- */
.crumbs { padding: 22px 0 0; font-size: 14px; color: var(--muted); }
.crumbs a { color: inherit; text-decoration-color: var(--line-2); }
.crumbs a:hover { color: var(--ink); text-decoration-color: var(--ink); }
.crumbs span[aria-hidden] { margin: 0 8px; }
.page-hero { padding: 26px 0 clamp(44px, 5.5vw, 76px); }
.page-hero-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 64px; align-items: start; }
.page-hero h1 { margin-bottom: 20px; font-size: clamp(36px, 4.8vw, 58px); }
.page-hero .ticks { margin-top: 30px; }
@media (max-width: 860px) {
  .page-hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .page-hero .cta-row .btn { flex: 1 1 100%; }
}

/* At-a-glance card: a page from an exercise book */
.glance {
  position: relative; background-color: var(--card); border: 1px solid var(--line); border-radius: 6px;
  background-image: linear-gradient(90deg, transparent 46px, rgba(194,56,42,.5) 46px, rgba(194,56,42,.5) 48px, transparent 48px);
  padding: 6px 24px 10px 66px; box-shadow: 0 2px 0 var(--line), 0 30px 50px -36px rgba(28,27,51,.45);
}
.glance h2 { margin: 0; padding: 18px 0 10px; font: 600 27px/1 var(--hand); letter-spacing: 0; color: var(--pen); }
.glance dl { margin: 0; }
.glance .row { display: flex; justify-content: space-between; align-items: baseline; gap: 18px; padding: 12px 0; border-top: 1px solid var(--rule); }
.glance dt { font-size: 14.5px; color: var(--muted); }
.glance dd { margin: 0; text-align: right; font-weight: 700; font-size: 15.5px; color: var(--ink); }

.topics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.topics.n4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.topic { background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: 28px 28px 22px; }
.topic h3 { margin: 0 0 12px; font-size: 21px; }
.topic .check-list li { font-size: 16px; }
@media (max-width: 900px) { .topics { grid-template-columns: 1fr 1fr; } }
@media (max-width: 640px) { .topics, .topics.n4 { grid-template-columns: 1fr; } }

.two-col { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px 88px; align-items: start; }
.two-col h2 { margin-bottom: 20px; }
@media (max-width: 860px) { .two-col { grid-template-columns: 1fr; gap: 56px; } }
.lose-list li { padding-top: 14px; padding-bottom: 14px; border-top: 1px solid var(--line-2); color: var(--text); }
.lose-list li:last-child { border-bottom: 1px solid var(--line-2); }
.lose-list li::before { top: 16px; width: 20px; height: 20px; background-image: var(--cross); }

.pricebar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 28px 56px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--r); padding: clamp(28px, 4vw, 44px);
}
.pricebar > div:first-child { flex: 1 1 380px; }
.pricebar .kicker { margin-bottom: 6px; }
.pricebar-sub { margin: 10px 0 0; font-size: 16px; color: var(--text); max-width: 46ch; }
.pricebar .actions { flex: 0 0 auto; display: flex; flex-wrap: wrap; gap: 14px; }
@media (max-width: 600px) { .pricebar .actions, .pricebar .btn { width: 100%; } }

.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line); border-radius: var(--r); }
table.rates { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 16px; }
table.rates th, table.rates td { padding: 16px 22px; text-align: left; border-bottom: 1px solid var(--line); }
table.rates tbody tr:last-child td { border-bottom: 0; }
table.rates tbody tr:hover td { background: rgba(255,224,122,.28); }
table.rates th { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); background: var(--paper); }
table.rates td:first-child a { font-weight: 700; text-decoration-color: var(--line-2); }
table.rates td:first-child a:hover { text-decoration-color: var(--ink); }
table.rates .num { white-space: nowrap; font-weight: 600; color: var(--ink); }

.policy { margin: 0; max-width: 880px; border-top: 2px solid var(--ink); }
.policy .row { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 6px 40px; padding: 20px 0; border-bottom: 1px solid var(--line-2); }
.policy dt { font: 600 19px/1.35 var(--display); color: var(--ink); }
.policy dd { margin: 0; color: var(--text); }
@media (max-width: 640px) { .policy .row { grid-template-columns: 1fr; } }

.about-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .75fr); gap: 72px; align-items: center; }
.about-portrait { max-width: 360px; justify-self: end; width: 100%; transform: rotate(1.2deg); }
@media (max-width: 860px) {
  .about-grid { grid-template-columns: 1fr; gap: 40px; }
  .about-portrait { justify-self: start; max-width: 260px; }
  .about-grid .cta-row .btn { flex: 1 1 100%; }
}

.more-subjects .section-head { margin-bottom: 24px; }

/* Simple pages: thank you, privacy, terms, 404 */
.page-simple { padding: clamp(40px, 6vw, 72px) 0 clamp(64px, 9vw, 104px); }
.page-simple h1 { margin: 0 0 14px; font-size: clamp(34px, 4.6vw, 48px); }
.page-simple h2 { margin: 40px 0 10px; font-size: 24px; }
.page-simple p, .page-simple li { font-size: 16.5px; color: var(--text); }
.page-simple ul { padding-left: 22px; }
.page-simple li { margin-bottom: 6px; }
.page-simple li a { display: inline-block; padding: 4px 0; }
.page-simple .updated { margin: 0 0 32px; font-size: 14.5px; color: var(--muted); }
.page-simple .note { margin-top: 28px; }
.badge {
  display: inline-block; margin: 0 0 18px; padding: 6px 14px 7px;
  background: var(--hl); color: var(--ink); font: 600 22px/1 var(--hand); transform: rotate(-1.5deg);
}
.thanks .steps-list { counter-reset: step; list-style: none; margin: 30px 0; padding: 0; }
.thanks .steps-list li { counter-increment: step; position: relative; margin-bottom: 18px; padding: 4px 0 4px 52px; }
.thanks .steps-list li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 36px; height: 36px; border-radius: 50%;
  display: grid; place-items: center; background: var(--ink); color: var(--hl); font: 600 18px/1 var(--display);
}

/* ---------- Footer ---------- */
.footer { background: var(--ink-deep); color: var(--on-ink-2); padding: 72px 0 32px; font-size: 15.5px; }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.footer .brand { color: var(--paper); margin-bottom: 16px; }
.footer p { margin: 0 0 10px; max-width: 34ch; }
.footer h2 { margin: 6px 0 10px; font: 700 13px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; color: var(--hl); }
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li a, .footer p a { display: inline-block; padding: 6px 0; color: var(--on-ink); text-decoration: none; }
.footer li a:hover, .footer p a:hover { color: var(--paper); text-decoration: underline; text-decoration-color: var(--hl); }
.footer-bottom { margin-top: 48px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: 14px; color: var(--on-ink-2); }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-grid > :first-child { grid-column: 1 / -1; } }
@media (max-width: 480px) { .footer-grid { grid-template-columns: 1fr; gap: 28px; } }

/* ---------- Print ---------- */
@media print {
  .nav, .skip, .menu, .cta-band, .footer, .cta-row, .pricebar .actions, .tier-actions, .more-subjects, .sticky, .hand-note { display: none !important; }
  *, *::before, *::after { color: #000 !important; box-shadow: none !important; }
  body, .alt, .section, .tier, .topic, .slip, .glance, .quote-card, .pricebar { background: #fff !important; }
  .section, .page-hero, .hero { padding: 12px 0 !important; }
  .tier, .topic, .slip, .glance, .quote-card, .pricebar { border: 1px solid #999 !important; break-inside: avoid; transform: none !important; }
  .faq-item .answer { display: block !important; }
  a { text-decoration: none; }
}
