:root {
  --ink: #18222e;
  --muted: #5d6875;
  --paper: #f7f8f4;
  --surface: #ffffff;
  --brand: #176b57;
  --brand-dark: #0d493b;
  --accent: #efb544;
  --line: #dce2dc;
  --shadow: 0 12px 35px rgba(24, 34, 46, 0.08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 18px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.65;
}

a { color: var(--brand-dark); text-underline-offset: 0.18em; }
a:hover { color: var(--brand); }

img { max-width: 100%; height: auto; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 20;
  padding: .7rem 1rem;
  color: white;
  background: var(--brand-dark);
}
.skip-link:focus { top: 1rem; }

.site-header {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  min-height: 72px;
  padding: 1rem max(1rem, calc((100vw - 1180px) / 2));
  color: black;
  background-image: url("/im/back_quid.gif");
}

.site-header a { text-decoration: none; }
.brand { font-size: 1.45rem; font-weight: 850; letter-spacing: .08em; }
.brand img { width: 150px; }
.site-header span { font-weight: 600; }

main { width: min(1180px, calc(100% - 2rem)); margin: 0 auto; }

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(180px, .5fr);
  gap: 3rem;
  align-items: center;
  padding: 5rem 0 4rem;
}

.hero img {
  justify-self: center;
  filter: drop-shadow(0 15px 25px rgba(13, 73, 59, .16));
}

h1, h2, h3 { margin-top: 0; line-height: 1.16; text-wrap: balance; }
h1 { max-width: 880px; margin-bottom: 1rem; font-size: clamp(2.15rem, 5vw, 4rem); letter-spacing: -.04em; }
h2 { margin-top: 2.8rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }
h3 { font-size: 1.12rem; }

.eyebrow {
  margin: 0 0 .6rem;
  color: var(--brand);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.lead { max-width: 780px; color: #344250; font-size: clamp(1.08rem, 2vw, 1.3rem); }

.button {
  display: inline-block;
  margin-top: .7rem;
  padding: .72rem 1.1rem;
  border-radius: .45rem;
  color: white;
  background: var(--brand);
  font-weight: 750;
  text-decoration: none;
}
.button:hover { color: white; background: var(--brand-dark); }

.how-it-works, .quiz-intro, .quiz-player, .related, .error-page {
  padding: clamp(1.3rem, 4vw, 3rem);
  border: 1px solid var(--line);
  border-radius: 1rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.steps, .quiz-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.steps p, .quiz-facts div {
  margin: 0;
  padding: 1rem;
  border-left: 4px solid var(--accent);
  background: #f3f7f4;
}

.catalog-section { padding-top: 2.5rem; scroll-margin-top: 1rem; }

.quiz-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.quiz-card {
  display: flex;
  flex-direction: column;
  min-height: 210px;
  padding: 1.25rem;
  border: 1px solid var(--line);
  border-radius: .75rem;
  background: var(--surface);
  box-shadow: 0 5px 20px rgba(24, 34, 46, .04);
}
.quiz-card-image {
  display: grid;
  place-items: center;
  height: 116px;
  margin: -1.25rem -1.25rem 1rem;
  padding: .75rem;
  overflow: hidden;
  border-bottom: 1px solid var(--line);
  border-radius: .75rem .75rem 0 0;
  background: #f3f7f4;
}
.quiz-card-image img {
  height: 90px;
  object-fit: contain;
}
.quiz-card h3 { margin-bottom: .5rem; }
.quiz-card p { margin: 0 0 1rem; color: var(--muted); font-size: .9rem; }
.quiz-card span { margin-top: auto; color: var(--brand); font-size: .75rem; font-weight: 800; text-transform: uppercase; }

.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  padding: 1.5rem 0;
  color: var(--muted);
  font-size: .86rem;
}

.quiz-intro { margin-bottom: 1.5rem; }
.quiz-intro h1 { font-size: clamp(2rem, 5vw, 3.6rem); }

.quiz-facts { margin: 2rem 0; }
.quiz-facts dt { color: var(--muted); font-size: .75rem; font-weight: 800; text-transform: uppercase; }
.quiz-facts dd { margin: .2rem 0 0; font-weight: 700; }

.notice { padding: 1rem; border-radius: .5rem; background: #fff5dd; white-space: pre-line; }
.content-samples { columns: 2; padding-left: 1.2rem; }
.content-samples li { break-inside: avoid; margin-bottom: .45rem; }

.quiz-player { margin-bottom: 1.5rem; scroll-margin-top: 1rem; }
.quiz-player iframe {
  width: 100%;
  min-height: 760px;
  border: 1px solid var(--line);
  border-radius: .5rem;
  background: white;
}

.related { margin-bottom: 3rem; }
.related ul { display: grid; grid-template-columns: repeat(2, 1fr); gap: .6rem 2rem; }

.error-page { max-width: 760px; margin-top: 5rem; text-align: center; }

footer {
  margin-top: 4rem;
  padding: 2rem max(1rem, calc((100vw - 1180px) / 2));
  color: #d7ebe5;
  background: var(--brand-dark);
  font-size: .86rem;
}
footer a { color: white; }

@media (max-width: 850px) {
  :root { font-size: 16px; }
  .hero { grid-template-columns: 1fr; padding: 3rem 0; }
  .hero img { width: 190px; grid-row: 1; }
  .quiz-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .steps, .quiz-facts { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .site-header { align-items: flex-start; flex-direction: column; gap: .1rem; }
  .quiz-grid, .related ul { grid-template-columns: 1fr; }
  .content-samples { columns: 1; }
  .quiz-player iframe { min-height: 680px; }
}
