/* Contractor Ally — design preview
   Tokens come from the open-book exam itself: navy blueprint ink, highlighter yellow,
   and the colored index tabs candidates stick on their reference books. */

@font-face {
  font-family: "Archivo";
  src: url("../fonts/archivo-latin-variable.woff2") format("woff2-variations");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-variable.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Serif 4";
  src: url("../fonts/source-serif-4-latin-variable-italic.woff2") format("woff2-variations");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --ink: #13243a;          /* blueprint navy: text, primary buttons */
  --ink-soft: #2b3f58;
  --steel: #556677;        /* secondary text */
  --rule: #d3dbe2;         /* hairlines */
  --board: #edf1f4;        /* cool drafting-board grey for section bands */
  --paper: #ffffff;
  --marker: #ffe14d;       /* highlighter */
  --marker-soft: rgba(255, 225, 77, 0.6);
  --tab-blue: #2e6bd9;
  --tab-red: #d23f3a;
  --tab-green: #1f8a52;
  --tab-orange: #c86f12;

  --sans: "Archivo", "Helvetica Neue", Arial, sans-serif;
  --serif: "Source Serif 4", Georgia, "Times New Roman", serif;

  --step--1: 0.875rem;
  --step-0: 1rem;
  --step-1: 1.25rem;
  --step-2: 1.5625rem;
  --step-3: 1.953rem;
  --step-4: 2.441rem;
  --step-5: clamp(2.5rem, 5.6vw, 4.2rem);

  --measure: 34rem;
  --gutter: clamp(1.25rem, 4vw, 3rem);
  --max: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--sans);
  font-stretch: 100%;
  font-size: var(--step-0);
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
}
img, svg { display: block; max-width: 100%; }
a { color: var(--tab-blue); text-underline-offset: 0.18em; }
a:hover { color: var(--ink); }
:focus-visible { outline: 3px solid var(--tab-blue); outline-offset: 3px; border-radius: 4px; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3 { font-family: var(--sans); font-stretch: 118%; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }
h1 { font-size: var(--step-5); font-weight: 800; }
h2 { font-size: var(--step-4); font-weight: 760; }
h3 { font-size: var(--step-1); font-weight: 700; font-stretch: 108%; }
p { margin: 0; }
.lede { font-size: var(--step-1); line-height: 1.5; color: var(--ink-soft); max-width: var(--measure); }
.section-intro { max-width: 40rem; display: grid; gap: 0.9rem; margin-bottom: 2.5rem; }
.section-intro p { color: var(--steel); font-size: 1.0625rem; }

/* Highlighter: the only decoration on the site, and it always means "this is the line in the book". */
mark, .hl {
  color: inherit;
  background: linear-gradient(transparent 12%, var(--marker-soft) 12%, var(--marker-soft) 88%, transparent 88%);
  padding: 0 0.12em;
  border-radius: 2px;
}

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 650 1rem/1 var(--sans); font-stretch: 108%;
  padding: 0.95rem 1.35rem; border-radius: 6px; border: 2px solid var(--ink);
  background: var(--ink); color: #fff; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--ink-soft); border-color: var(--ink-soft); color: #fff; }
.btn.secondary { background: transparent; color: var(--ink); }
.btn.secondary:hover { background: var(--board); color: var(--ink); }

/* Header */
.site-header { border-bottom: 1px solid var(--rule); background: var(--paper); }
.site-header .wrap { display: flex; align-items: center; gap: 2rem; min-height: 4.5rem; }
.logo { display: inline-flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--ink); font-weight: 800; font-stretch: 122%; font-size: 1.15rem; letter-spacing: -0.01em; }
.logo-mark { width: 1.6rem; height: 1.9rem; position: relative; }
.logo-mark::before { content: ""; position: absolute; inset: 0 0.45rem 0 0; background: var(--ink); border-radius: 3px 1px 1px 3px; }
.logo-mark::after { content: ""; position: absolute; right: 0; top: 0.35rem; width: 0.62rem; height: 0.8rem; background: var(--marker); border-radius: 0 3px 3px 0; }
.nav { display: flex; gap: 1.5rem; margin-left: auto; }
.nav a { color: var(--ink); text-decoration: none; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.site-header .btn { padding: 0.7rem 1rem; }
@media (max-width: 54rem) { .nav { display: none; } .site-header .btn { margin-left: auto; } }
.show-sm { display: none; }
.logo { white-space: nowrap; }
@media (max-width: 30rem) { .hide-sm { display: none; } .show-sm { display: inline; } .site-header .wrap { gap: 1rem; } }

.preview-note { background: var(--ink); color: #d9e2ec; font-size: var(--step--1); text-align: center; padding: 0.45rem 1rem; }

/* Hero */
.hero { padding: clamp(3rem, 7vw, 6rem) 0 clamp(3.5rem, 7vw, 6rem); }
.hero .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 5vw, 4.5rem); align-items: center; }
.hero-copy { display: grid; gap: 1.5rem; }
.hero h1 { max-width: 11ch; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.5rem; }
.hero-facts { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; color: var(--steel); font-size: var(--step--1); padding: 0; margin: 0; list-style: none; }
.hero-facts li { display: flex; align-items: center; gap: 0.45rem; }
.hero-facts li::before { content: ""; width: 0.55rem; height: 0.75rem; border-radius: 0 2px 2px 0; background: var(--tab-blue); }
.hero-facts li:nth-child(2)::before { background: var(--tab-green); }
.hero-facts li:nth-child(3)::before { background: var(--tab-orange); }
@media (max-width: 60rem) { .hero .wrap { grid-template-columns: 1fr; } .hero h1 { max-width: 14ch; } }

/* The book page: sample question set like a page in a reference book, with an index tab on its edge */
.page-stack { position: relative; padding-right: 5.5rem; }
.page {
  position: relative; background: var(--paper);
  border: 1px solid var(--rule); border-radius: 4px 10px 10px 4px;
  box-shadow: 10px 10px 0 -1px var(--board), 10px 10px 0 0 var(--rule);
  padding: clamp(1.4rem, 3vw, 2.2rem);
}
.page::before { /* binding edge */
  content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px;
  background: linear-gradient(90deg, rgba(19, 36, 58, 0.09), transparent); border-radius: 4px 0 0 4px;
}
.page-meta { display: flex; justify-content: space-between; gap: 1rem; font-size: var(--step--1); color: var(--steel); margin-bottom: 1rem; }
.page-meta strong { color: var(--ink); font-weight: 650; }
.question { font-family: var(--serif); font-size: 1.3rem; line-height: 1.45; font-weight: 450; margin-bottom: 1.25rem; }
.choices { display: grid; gap: 0.55rem; margin: 0; padding: 0; border: 0; }
.choice {
  display: grid; grid-template-columns: 2rem 1fr; align-items: center; gap: 0.6rem; width: 100%;
  text-align: left; font: 500 1rem/1.35 var(--sans); color: var(--ink);
  background: var(--paper); border: 1.5px solid var(--rule); border-radius: 8px; padding: 0.7rem 0.85rem; cursor: pointer;
}
.choice:hover:not([disabled]) { border-color: var(--ink); }
.choice .key { display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--board); font-weight: 700; }
.choice[aria-pressed="true"].is-right { border-color: var(--tab-green); background: #ecf7f1; }
.choice.is-right .key { background: var(--tab-green); color: #fff; }
.choice.is-wrong { border-color: var(--tab-red); background: #fbefef; }
.choice.is-wrong .key { background: var(--tab-red); color: #fff; }
.choice[disabled] { cursor: default; }
.answer { margin-top: 1.25rem; padding-top: 1.1rem; border-top: 1px dashed var(--rule); display: grid; gap: 0.8rem; }
.answer[hidden] { display: none; }
.answer .verdict { font-weight: 700; }
.answer blockquote { margin: 0; font-family: var(--serif); font-size: 1.05rem; line-height: 1.55; color: var(--ink-soft); }
.answer .todo { font-size: var(--step--1); color: var(--steel); }

/* The index tab: our signature. It names the book and the page, the way a real tab would. */
.book-tab {
  position: absolute; right: 0.25rem; top: 4.5rem; width: 5.5rem;
  background: var(--tab-blue); color: #fff; border-radius: 0 10px 10px 0;
  padding: 0.75rem 0.6rem 0.8rem 0.75rem; display: grid; gap: 0.2rem;
  box-shadow: inset 6px 0 0 rgba(0, 0, 0, 0.12);
}
.book-tab .pg { font: 800 1.45rem/1 var(--sans); font-stretch: 100%; white-space: nowrap; }
.book-tab .bk { font-size: 0.72rem; line-height: 1.25; }
.book-tab.is-pending { background: var(--board); color: var(--steel); box-shadow: none; }
.book-tab.is-pending .pg { font-size: 1.1rem; }
@media (prefers-reduced-motion: no-preference) {
  .book-tab { transition: transform 420ms cubic-bezier(.2, .8, .2, 1), background-color 200ms; }
  .book-tab.is-pending { transform: translateX(-1.6rem); }
  .answer mark { background-size: 0% 100%; background-repeat: no-repeat; background-image: linear-gradient(transparent 12%, var(--marker-soft) 12%, var(--marker-soft) 88%, transparent 88%); background-color: transparent; transition: background-size 700ms 250ms ease-out; }
  .answer.is-shown mark { background-size: 100% 100%; }
}
@media (max-width: 30rem) {
  .page-stack { padding-right: 0; padding-top: 3.25rem; }
  .book-tab { top: 0; right: 1.25rem; width: auto; display: flex; align-items: baseline; gap: 0.5rem; border-radius: 10px 10px 0 0; padding: 0.6rem 0.9rem; }
  .book-tab.is-pending { transform: translateY(0.9rem); }
}

/* Sections */
.band { padding: clamp(3.5rem, 8vw, 6rem) 0; }
.band.board { background: var(--board); }
.band.ink { background: var(--ink); color: #fff; }
.band.ink .section-intro p { color: #c9d4df; }

/* Steps: a real sequence, so numbered */
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0; border-top: 2px solid var(--ink); counter-reset: step; }
.steps li { counter-increment: step; padding: 1.25rem 1.25rem 0 0; display: grid; gap: 0.5rem; align-content: start; }
.steps li + li { padding-left: 1.25rem; border-left: 1px solid var(--rule); }
.steps li::before { content: counter(step); font: 800 2.2rem/1 var(--sans); font-stretch: 125%; color: var(--tab-blue); }
.steps p { color: var(--steel); font-size: 0.97rem; }
@media (max-width: 60rem) {
  .steps { grid-template-columns: 1fr; border-top: 0; }
  .steps li, .steps li + li { padding: 1rem 0 1rem 3.25rem; border-left: 0; border-top: 1px solid var(--rule); position: relative; }
  .steps li::before { position: absolute; left: 0; top: 1rem; font-size: 1.8rem; }
}

/* Exam catalog: grouped like tab colors on a shelf of books */
.catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 2rem 2.5rem; }
.catalog section h3 { display: flex; align-items: center; gap: 0.6rem; padding-bottom: 0.6rem; border-bottom: 2px solid var(--ink); margin-bottom: 0.3rem; font-size: 1.05rem; }
.catalog section h3::before { content: ""; width: 0.7rem; height: 1rem; border-radius: 0 3px 3px 0; background: var(--c, var(--tab-blue)); }
.catalog ul { list-style: none; margin: 0; padding: 0; }
.catalog li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.55rem 0; border-bottom: 1px solid var(--rule); }
.catalog li span:last-child { color: var(--steel); font-size: var(--step--1); white-space: nowrap; }
.catalog .featured span:first-child { font-weight: 650; }

/* Daily questions */
.daily { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.daily ul { margin: 1.5rem 0 0; padding-left: 1.1rem; display: grid; gap: 0.5rem; color: var(--ink-soft); }
.notif-stack { display: grid; gap: 0.75rem; max-width: 26rem; justify-self: center; width: 100%; }
.notif { background: rgba(255, 255, 255, 0.92); border: 1px solid var(--rule); border-radius: 18px; padding: 0.85rem 1rem; display: grid; grid-template-columns: 2.4rem 1fr auto; gap: 0.2rem 0.75rem; box-shadow: 0 8px 24px -16px rgba(19, 36, 58, 0.45); }
.notif .app-icon { grid-row: span 2; width: 2.4rem; height: 2.4rem; border-radius: 9px; background: var(--ink); position: relative; }
.notif .app-icon::after { content: ""; position: absolute; right: 0.45rem; top: 0.6rem; width: 0.5rem; height: 0.75rem; background: var(--marker); border-radius: 0 2px 2px 0; }
.notif .when { color: var(--steel); font-size: 0.8rem; }
.notif strong { font-size: 0.92rem; }
.notif p { grid-column: 2 / -1; font-size: 0.92rem; color: var(--ink-soft); }
.notif.later { opacity: 0.7; transform: scale(0.97); }
@media (max-width: 54rem) { .daily { grid-template-columns: 1fr; } }

/* Pricing: a schedule, not a row of identical cards */
.price-table { width: 100%; border-collapse: collapse; }
.price-table th, .price-table td { text-align: left; vertical-align: top; padding: 1.1rem 1rem; border-bottom: 1px solid var(--rule); }
.price-table thead th { font-size: var(--step--1); color: var(--steel); font-weight: 600; border-bottom: 2px solid var(--ink); }
.price-table .plan { font-weight: 750; font-stretch: 112%; font-size: 1.1rem; }
.price-table .price { font: 800 1.6rem/1 var(--sans); font-stretch: 112%; white-space: nowrap; }
.price-table .price small { font-size: 0.85rem; font-weight: 500; color: var(--steel); }
.price-table tr.best { background: linear-gradient(90deg, var(--marker-soft), rgba(255, 225, 77, 0.15)); }
.price-table td:last-child { width: 1%; white-space: nowrap; }
.price-note { margin-top: 1rem; color: var(--steel); font-size: var(--step--1); }
@media (max-width: 46rem) {
  .price-table thead { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; gap: 0.25rem 1rem; padding: 1rem 0.75rem; border-bottom: 1px solid var(--rule); }
  .price-table th, .price-table td { padding: 0; border: 0; }
  .price-table td.includes { grid-column: 1 / -1; color: var(--ink-soft); }
  .price-table td:last-child { grid-column: 1 / -1; width: auto; margin-top: 0.5rem; }
}

/* Pipe */
.pipe { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; }
.pipe h2 { color: #fff; }
.pipe .name-note { color: #c9d4df; max-width: 30rem; }
.band.ink .pipe .slogan { font: 800 var(--step-3)/1 var(--sans); font-stretch: 125%; color: var(--marker); }
.chat { background: #0d1a2b; border: 1px solid #2b3f58; border-radius: 16px; padding: 1.25rem; display: grid; gap: 0.9rem; }
.bubble { max-width: 85%; padding: 0.8rem 1rem; border-radius: 14px; font-size: 0.98rem; line-height: 1.5; }
.bubble.me { justify-self: end; background: var(--tab-blue); color: #fff; border-bottom-right-radius: 4px; }
.bubble.pipe-says { justify-self: start; background: #fff; color: var(--ink); border-bottom-left-radius: 4px; display: grid; gap: 0.6rem; }
.bubble .src { display: inline-flex; align-items: center; gap: 0.5rem; font-size: 0.82rem; color: var(--ink-soft); border-top: 1px solid var(--rule); padding-top: 0.55rem; }
.bubble .src::before { content: ""; flex: none; width: 0.55rem; height: 0.8rem; border-radius: 0 2px 2px 0; background: var(--tab-blue); }
.chat .who { font-size: 0.78rem; color: #8fa2b6; }
.chat .who.right { text-align: right; }
@media (max-width: 54rem) { .pipe { grid-template-columns: 1fr; } }

/* Apps teaser */
.apps-teaser { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; }

/* Footer */
.site-footer { border-top: 1px solid var(--rule); padding: 2.5rem 0 3rem; color: var(--steel); font-size: var(--step--1); }
.site-footer .wrap { display: grid; gap: 0.75rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 1.25rem; }
