/* Connect Kabels */
:root {
  --teal: #0b7c82;
  --teal-dark: #075a5f;
  --teal-soft: #e3f4f5;
  --coral: #f07373;
  --red: #c52f2f;
  --red-soft: #fdeaea;
  --green: #0a6b3a;
  --green-soft: #e4f5ec;
  --ink: #16303a;
  --muted: #4a5f68;
  --line: #d5e2e5;
  --bg: #ffffff;
  --bg-alt: #f5f9fa;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(22, 48, 58, .06), 0 6px 18px rgba(22, 48, 58, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); color: var(--ink); background: var(--bg); line-height: 1.65; font-size: 1.0625rem; }
img { max-width: 100%; height: auto; }
a { color: var(--teal-dark); text-underline-offset: 3px; }
a:hover { color: var(--red); }
:focus-visible { outline: 3px solid #f0a000; outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; color: var(--ink); }
h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); margin: .3em 0 .5em; letter-spacing: -.01em; }
h2 { font-size: clamp(1.35rem, 2.6vw, 1.7rem); margin: 1.6em 0 .6em; }
h3 { font-size: 1.15rem; margin: 0 0 .4em; }
h2 small { font-weight: 500; color: var(--muted); font-size: .7em; }
p { margin: 0 0 1em; }
code { background: var(--bg-alt); padding: .1em .35em; border-radius: 4px; }

.wrap { width: min(1120px, 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; color: #fff; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
main:focus { outline: none; }

/* Header */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20; }
.header-in { display: flex; align-items: center; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; padding: 10px 0; }
.brand img { display: block; }
.main-nav ul { display: flex; flex-wrap: wrap; gap: 4px 6px; list-style: none; margin: 0; padding: 0; }
.main-nav a { display: block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .98rem; }
.main-nav a:hover { background: var(--teal-soft); color: var(--teal-dark); }
.main-nav a[aria-current="page"] { background: var(--teal); color: #fff; }

/* Breadcrumbs */
.crumbs { padding: 14px 0 0; font-size: .92rem; color: var(--muted); }
.crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.crumbs li + li::before { content: "›"; margin-right: 4px; color: var(--muted); }
.crumbs a { color: var(--teal-dark); }

/* Buttons */
.btn { display: inline-block; background: var(--teal); color: #fff; border: 2px solid var(--teal); padding: 12px 22px; border-radius: 999px; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer; transition: background .15s, transform .1s; }
.btn:hover { background: var(--teal-dark); border-color: var(--teal-dark); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--teal-dark); }
.btn-ghost:hover { background: var(--teal-soft); color: var(--teal-dark); }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin: 1.2em 0; align-items: center; }
.cta-row form { margin: 0; }

/* Hero */
.hero { background: linear-gradient(135deg, var(--teal-soft), #fff 60%); border-bottom: 1px solid var(--line); }
.hero-in { display: grid; gap: 32px; grid-template-columns: 1.3fr 1fr; align-items: center; padding: 48px 0; }
.eyebrow { color: var(--red); font-weight: 700; text-transform: uppercase; letter-spacing: .08em; font-size: .85rem; margin: 0; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 60ch; }
.lead-sm { font-size: 1.1rem; color: var(--muted); max-width: 70ch; }
.ticks { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 22px; padding: 0; margin: 0; color: var(--muted); font-weight: 600; }
.ticks li::before { content: "✔ "; color: var(--teal); }
.hero-card { background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 22px; box-shadow: var(--shadow); }
.hero-card ul { list-style: none; padding: 0; margin: 12px 0; display: grid; gap: 8px; }
.hero-card li { border: 2px solid var(--line); border-radius: 12px; padding: 10px 14px; font-weight: 600; }
.hero-card .hc-ok { border-color: var(--green); background: var(--green-soft); }
.hc-note { color: var(--muted); font-size: .85rem; margin: 0; }

/* Blocks and cards */
.block { padding: 8px 0 20px; }
.block-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; }
.page { padding: 12px 0 56px; }
.cards { list-style: none; padding: 0; margin: 1em 0; display: grid; gap: 18px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.cards-3 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.card h2, .card h3 { margin: 0 0 .4em; font-size: 1.18rem; }
.card p { margin: 0 0 .7em; color: var(--muted); }
.card a { font-weight: 700; }
.meta { font-size: .92rem; color: var(--muted); }
.tag { display: inline-block; font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--teal-dark); margin: 0 0 .4em; }
.tag a { text-decoration: none; }
.steps { list-style: none; counter-reset: s; display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); padding: 0; }
.steps li { counter-increment: s; background: var(--bg-alt); border-radius: var(--radius); padding: 20px; position: relative; }
.steps li::before { content: counter(s); display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 800; margin-bottom: 10px; color: #3b0d0d; }
.steps p { margin: 0; color: var(--muted); }
.note { background: var(--teal-soft); border-left: 5px solid var(--teal); border-radius: 10px; padding: 8px 22px 6px; margin: 1.6em 0; }
.note h2 { margin-top: .6em; }
.alert { background: var(--red-soft); border: 1px solid var(--red); color: #7a1414; border-radius: 10px; padding: 12px 16px; font-weight: 600; }
.hint { color: var(--muted); font-size: .95rem; }
.byline { color: var(--muted); font-size: .95rem; margin-bottom: 1.4em; }
.big { font-size: 1.4rem; font-weight: 700; }

/* Prose / guide */
.prose, .guide { max-width: 820px; }
.prose h2, .guide h2 { margin-top: 1.8em; }
.prose li, .guide li { margin-bottom: .4em; }
.guide .cards, .guide .note { max-width: none; }
.table-wrap { overflow-x: auto; margin: 1.2em 0; border: 1px solid var(--line); border-radius: 12px; }
table { border-collapse: collapse; width: 100%; font-size: .98rem; background: #fff; }
caption { text-align: left; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th { background: var(--teal-soft); font-size: .9rem; white-space: nowrap; }
tbody th { font-weight: 700; }
tr:last-child td, tr:last-child th { border-bottom: 0; }
.vocab td small { color: var(--muted); }
.vocab { min-width: 720px; }
.table-wrap:focus-visible { outline-offset: 0; }

.speak { font: inherit; font-size: .9rem; font-weight: 600; background: #fff; color: var(--teal-dark); border: 2px solid var(--teal); border-radius: 999px; padding: 3px 12px; cursor: pointer; margin-left: 6px; }
.speak:hover { background: var(--teal-soft); }
.speak[hidden] { display: none; }
.audio-note { font-size: .88rem; color: var(--muted); }

/* Quiz setup */
.setup { max-width: 820px; }
fieldset { border: 0; padding: 0; margin: 0 0 1.4em; min-width: 0; }
legend { font-weight: 700; padding: 0; margin-bottom: .6em; font-size: 1.1rem; }
.choices { display: grid; gap: 10px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.choice, .pill { position: relative; }
.choice input, .pill input, .opt input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.choice span { display: block; border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; cursor: pointer; background: #fff; }
.choice small { display: block; color: var(--muted); font-size: .9rem; }
.choice input:checked + span, .pill input:checked + span { border-color: var(--teal); background: var(--teal-soft); box-shadow: inset 0 0 0 1px var(--teal); }
.choice input:focus-visible + span, .pill input:focus-visible + span, .opt input:focus-visible + .letter { outline: 3px solid #f0a000; outline-offset: 2px; }
.pills { display: flex; gap: 10px; flex-wrap: wrap; }
.pill span { display: block; border: 2px solid var(--line); border-radius: 999px; padding: 10px 20px; font-weight: 700; cursor: pointer; background: #fff; }
.row2 { display: grid; gap: 18px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin-bottom: 1.4em; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; }
select { width: 100%; font: inherit; padding: 11px 12px; border: 2px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink); }

/* Quiz question */
.quiz { max-width: 780px; }
.q-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-top: 8px; }
.q-top p { margin: 0; }
progress.bar { display: block; width: 100%; height: 12px; border: 0; border-radius: 999px; background: var(--line); overflow: hidden; -webkit-appearance: none; appearance: none; margin: 8px 0; }
progress.bar::-webkit-progress-bar { background: var(--line); border-radius: 999px; }
progress.bar::-webkit-progress-value { background: var(--teal); border-radius: 999px; }
progress.bar::-moz-progress-bar { background: var(--teal); border-radius: 999px; }
.q-mode { color: var(--muted); font-size: .92rem; font-weight: 600; margin: 0 0 6px; }
.q-form fieldset { margin: 10px 0 0; }
.q-form legend { font-size: clamp(1.25rem, 3vw, 1.6rem); line-height: 1.35; margin-bottom: .8em; }
.term { color: var(--teal-dark); }
.sentence { font-size: 1.35rem; background: var(--bg-alt); border-radius: 12px; padding: 16px 18px; }
.blank { border-bottom: 3px solid var(--red); padding: 0 .6em; color: transparent; user-select: none; }
.pron { color: var(--muted); }
.pron span { font-weight: 700; color: var(--ink); }
.pic { margin: 0 0 1em; text-align: center; }
.emoji { font-size: clamp(5rem, 22vw, 8rem); line-height: 1.1; background: var(--bg-alt); border-radius: 18px; padding: 10px; }
.pic details { text-align: left; margin-top: 8px; color: var(--muted); }
.opts { list-style: none; padding: 0; margin: 0 0 1.2em; display: grid; gap: 10px; }
.opt label { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 2px solid var(--line); border-radius: 12px; cursor: pointer; background: #fff; flex-wrap: wrap; }
.opt label:hover { border-color: var(--teal); }
.letter { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--teal-soft); font-weight: 800; color: var(--teal-dark); }
.opt input:checked + .letter { background: var(--teal); color: #fff; }
.opt:has(input:checked) label { border-color: var(--teal); background: var(--teal-soft); }
.otext { flex: 1 1 200px; }
.otag { font-size: .85rem; font-weight: 700; }
.opt.is-ok label { border-color: var(--green); background: var(--green-soft); }
.opt.is-ok .otag { color: var(--green); }
.opt.is-bad label { border-color: var(--red); background: var(--red-soft); }
.opt.is-bad .otag { color: var(--red); }
.opt.is-ok input:checked + .letter, .opt.is-ok .letter { background: var(--green); color: #fff; }
.opt.is-bad .letter { background: var(--red); color: #fff; }
fieldset:disabled .opt label { cursor: default; }
.feedback { margin-top: 20px; border-radius: 14px; padding: 6px 22px 18px; border: 2px solid; }
.fb-ok { border-color: var(--green); background: var(--green-soft); }
.fb-bad { border-color: var(--red); background: var(--red-soft); }
.feedback h2 { margin: .7em 0 .4em; font-size: 1.4rem; }
.fb-ok h2 { color: var(--green); }
.fb-bad h2 { color: var(--red); }
.explain dt { font-weight: 800; margin-top: .8em; }
.explain dd { margin: .15em 0 0; }
.q-exit { margin-top: 28px; font-size: .95rem; }

/* Result */
.score-box { background: var(--teal-soft); border-radius: 18px; padding: 22px 24px 8px; text-align: center; max-width: 640px; }
.score-num { font-size: 3rem; font-weight: 800; margin: 0; line-height: 1.1; }
.score-num span { color: var(--teal-dark); }
.score-pct { font-weight: 700; margin: 0 0 6px; }
.cat-perf { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; max-width: 700px; }
.cp-head { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-weight: 600; }
.review { list-style: none; padding: 0; display: grid; gap: 12px; }
.review li { border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; background: #fff; }
.review p { margin: 0 0 .3em; }
.review .ex-pt { color: var(--muted); }

/* Footer */
.site-footer { background: var(--ink); color: #dbe7ea; margin-top: 40px; padding: 40px 0 0; }
.site-footer a { color: #fff; }
.site-footer a:hover { color: #ffb3b3; }
.foot-grid { display: grid; gap: 28px; grid-template-columns: 1.4fr 1fr 1fr 1fr; }
.foot-grid h2 { font-size: 1rem; margin: 0 0 .6em; color: #fff; text-transform: uppercase; letter-spacing: .06em; }
.foot-grid ul { list-style: none; margin: 0; padding: 0; }
.foot-grid li { margin-bottom: .35em; }
.foot-grid img { background: #fff; border-radius: 10px; padding: 3px; }
.foot-bottom { border-top: 1px solid rgba(255, 255, 255, .15); margin-top: 28px; padding: 16px 0 24px; font-size: .92rem; }

@media (max-width: 820px) {
  .hero-in { grid-template-columns: 1fr; padding: 32px 0; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .site-header { position: static; }
}
@media (max-width: 520px) {
  body { font-size: 1rem; }
  .foot-grid { grid-template-columns: 1fr; }
  .main-nav a { padding: 7px 10px; }
  .btn { width: 100%; text-align: center; }
  .cta-row { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
@media print {
  .site-header, .site-footer, .skip, .cta-row { display: none; }
}
