@import url('https://fonts.googleapis.com/css2?family=Barlow+Condensed:wght@600;700&family=Inter:wght@400;500;600;700&display=swap');

:root {
  --ink: #14181F;
  --ink-2: #4A5261;
  --ink-3: #6B7383;
  --line: #E3E6EB;
  --bg: #F6F7F9;
  --card: #FFFFFF;
  --brand: #F97316;
  --brand-dark: #C2570C;
  --brand-soft: #FFF1E6;
  --navy: #0D1117;
  --ok: #157F3B;
  --ok-soft: #E7F6EC;
  --bad: #B42318;
  --bad-soft: #FDECEA;
  --radius: 12px;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}
a { color: var(--brand-dark); }
img { max-width: 100%; }

/* Header */
.topbar { background: var(--navy); color: #fff; }
.topbar .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; }
.brand { display: flex; align-items: center; gap: 10px; color: #fff; text-decoration: none; }
.brand .sq { width: 34px; height: 34px; border-radius: 8px; background: var(--brand); display: grid; place-items: center; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 16px; }
.brand .name { font-family: 'Barlow Condensed', sans-serif; font-size: 26px; font-weight: 700; letter-spacing: .5px; }
.brand .name span { color: var(--brand); }
.lang-toggle { display: flex; border: 1px solid #39414F; border-radius: 999px; overflow: hidden; }
.lang-toggle button { background: transparent; color: #C9D1D9; border: 0; padding: 6px 12px; font: 600 13px Inter, sans-serif; cursor: pointer; }
.lang-toggle button[aria-pressed="true"] { background: var(--brand); color: #fff; }

.wrap { max-width: 980px; margin: 0 auto; padding-left: 20px; padding-right: 20px; }
.narrow { max-width: 640px; }
main { padding: 32px 0 64px; }

h1, h2, h3 { line-height: 1.25; margin: 0 0 12px; }
h1 { font-size: 32px; letter-spacing: -.3px; }
h2 { font-size: 23px; }
h3 { font-size: 18px; }
p { margin: 0 0 14px; }
.muted { color: var(--ink-3); }
.small { font-size: 14px; }
.center { text-align: center; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; }
.card + .card { margin-top: 16px; }
.player > .card + .card, .layout-buy > .card + .card { margin-top: 0; }
.stack > * + * { margin-top: 16px; }
.grid { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); }

.hero { background: var(--navy); color: #fff; padding: 40px 0 44px; }
.hero h1 { font-family: 'Barlow Condensed', sans-serif; font-size: 44px; letter-spacing: .3px; }
.hero p { color: #C9D1D9; max-width: 640px; font-size: 18px; }
.eyebrow { text-transform: uppercase; letter-spacing: 1px; font-size: 12px; font-weight: 700; color: var(--brand); }

.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; background: #EEF0F3; color: var(--ink-2); }
.pill.ok { background: var(--ok-soft); color: var(--ok); }
.pill.brand { background: var(--brand-soft); color: var(--brand-dark); }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0 0; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 20px; border-radius: 10px; border: 1px solid transparent; font: 600 16px Inter, sans-serif; cursor: pointer; text-decoration: none; background: var(--brand); color: #fff; min-height: 48px; }
.btn:hover { background: var(--brand-dark); }
.btn.secondary { background: #fff; color: var(--ink); border-color: var(--line); }
.btn.secondary:hover { border-color: var(--ink-3); }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }

label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.field { margin-bottom: 16px; }
.hint { font-size: 13px; color: var(--ink-3); margin-top: 4px; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=password], select {
  width: 100%; padding: 12px 14px; font: 16px Inter, sans-serif; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
input:focus, select:focus, .btn:focus-visible { outline: 3px solid #FDBA74; outline-offset: 1px; }

.notice { border-radius: 10px; padding: 12px 14px; font-size: 15px; }
.notice.ok { background: var(--ok-soft); color: var(--ok); }
.notice.bad { background: var(--bad-soft); color: var(--bad); }
.notice.info { background: var(--brand-soft); color: #7A3606; }
.hidden { display: none !important; }

table.data { width: 100%; border-collapse: collapse; font-size: 15px; }
table.data th, table.data td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th { font-size: 13px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); }
.code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; letter-spacing: 1px; }

/* Price box */
.layout-buy { display: grid; gap: 16px; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); align-items: start; }
.buy { position: sticky; top: 16px; }
.price { font-size: 40px; font-weight: 700; }
.price small { font-size: 16px; color: var(--ink-3); font-weight: 500; }
.choice { display: flex; gap: 8px; margin: 12px 0 16px; }
.choice button { flex: 1; padding: 10px; border-radius: 10px; border: 1px solid var(--line); background: #fff; font: 600 15px Inter, sans-serif; cursor: pointer; }
.choice button[aria-pressed="true"] { border-color: var(--brand); background: var(--brand-soft); color: var(--brand-dark); }
ul.checks { list-style: none; padding: 0; margin: 0; }
ul.checks li { padding-left: 28px; position: relative; margin-bottom: 8px; }
ul.checks li::before { content: '✓'; position: absolute; left: 4px; color: var(--ok); font-weight: 700; }

/* Course player */
.player { display: grid; grid-template-columns: 260px 1fr; gap: 24px; align-items: start; }
.toc { position: sticky; top: 16px; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li button { width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 12px; border-radius: 8px; font: 500 15px Inter, sans-serif; color: var(--ink-2); cursor: pointer; display: flex; gap: 10px; align-items: flex-start; }
.toc li button:hover { background: #EEF0F3; }
.toc li button[aria-current="true"] { background: var(--brand-soft); color: var(--brand-dark); font-weight: 600; }
.toc .dot { flex: none; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--line); margin-top: 2px; display: grid; place-items: center; font-size: 12px; }
.toc .done .dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.toc li button[disabled] { opacity: .5; cursor: not-allowed; }
.progressbar { height: 8px; background: #E7E9ED; border-radius: 999px; overflow: hidden; margin: 8px 0 16px; }
.progressbar > div { height: 100%; background: var(--brand); width: 0; transition: width .3s; }

.lesson h2 { font-size: 26px; }
.lesson table { width: 100%; border-collapse: collapse; margin: 8px 0 18px; font-size: 15px; }
.lesson th, .lesson td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.lesson th { background: #F2F3F5; }
.lesson ul, .lesson ol { padding-left: 24px; margin: 0 0 16px; }
.lesson li { margin-bottom: 6px; }
.lesson-nav { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; flex-wrap: wrap; }

.question { padding: 18px 0; border-bottom: 1px solid var(--line); }
.question:last-child { border-bottom: 0; }
.question .qtext { font-weight: 600; margin-bottom: 10px; }
.option { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; margin-bottom: 8px; cursor: pointer; background: #fff; }
.option:hover { border-color: var(--ink-3); }
.option input { margin-top: 5px; accent-color: var(--brand); }
.option.checked { border-color: var(--brand); background: var(--brand-soft); }

footer.site { border-top: 1px solid var(--line); padding: 24px 0 40px; font-size: 14px; color: var(--ink-3); }
footer.site a { color: var(--ink-2); }

@media (max-width: 800px) {
  .player { grid-template-columns: 1fr; }
  .toc { position: static; }
  h1 { font-size: 27px; }
  .hero h1 { font-size: 36px; }
  .card { padding: 18px; }
  .buy { position: static; }
  .layout-buy { grid-template-columns: 1fr; }
}

/* Certificate */
.cert-page { background: #fff; }
.certificate { max-width: 900px; margin: 24px auto; background: #fff; border: 10px solid var(--navy); outline: 2px solid var(--brand); outline-offset: -18px; padding: 48px 56px; text-align: center; }
.certificate .title { font-family: 'Barlow Condensed', sans-serif; font-size: 40px; letter-spacing: 1px; text-transform: uppercase; margin-bottom: 4px; }
.certificate .who { font-size: 34px; font-weight: 700; margin: 18px 0 4px; border-bottom: 2px solid var(--line); display: inline-block; padding: 0 24px 6px; }
.certificate .course { font-size: 20px; font-weight: 600; margin: 14px 0 6px; }
.certificate .line { color: var(--ink-2); max-width: 640px; margin: 0 auto 16px; }
.certificate .meta { display: flex; justify-content: center; gap: 32px; flex-wrap: wrap; margin-top: 24px; font-size: 15px; }
.certificate .meta div span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .5px; color: var(--ink-3); }
.certificate .second { margin-top: 18px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; color: var(--ink-2); }
.certificate .verify { margin-top: 20px; font-size: 13px; color: var(--ink-3); }
@media print {
  .no-print { display: none !important; }
  body, .cert-page { background: #fff; }
  .certificate { margin: 0 auto; page-break-inside: avoid; }
  @page { size: landscape; margin: 12mm; }
}
