/* octordly.org – site layout around the game (the game: /static/css/octordle.css + /assets/css/game.css) */

/* Nunito (SIL Open Font License 1.1, /fonts/OFL.txt), variable weight 200–1000, self-hosted. No Greek subset exists:
   Greek text uses the system font through the fallback list. */
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-cyrillic-ext.woff2) format('woff2'); unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-cyrillic.woff2) format('woff2'); unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-latin-ext.woff2) format('woff2'); unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 200 1000; font-display: swap; src: url(/fonts/nunito-latin.woff2) format('woff2'); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #f3f5f8;
  --surface: #ffffff;
  --soft: #f3f5f8;
  --ink: #14181f;
  --ink-soft: #55606f;
  --line: rgba(15, 23, 42, .08);
  --line-strong: rgba(15, 23, 42, .16);
  --green: #00ac4a;
  --green-soft: rgba(0, 172, 74, .10);
  --btn: #008a3e;
  --btn-hover: #007535;
  --link: #007f39;
  --t-g: #2e9e5b;
  --t-y: #d4a514;
  --t-x: #8b95a1;
  --t-e: #e9edf3;
  --r-1: 10px;
  --r-2: 14px;
  --r-3: 20px;
  --shadow-1: 0 1px 2px rgba(15, 23, 42, .04), 0 4px 14px rgba(15, 23, 42, .05);
  --shadow-2: 0 10px 30px rgba(15, 23, 42, .10);
  --font: Nunito, system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}
body.dark {
  --bg: #12151c;
  --surface: #1c2029;
  --soft: #252a35;
  --ink: #eef1f6;
  --ink-soft: #9aa4b2;
  --line: rgba(255, 255, 255, .08);
  --line-strong: rgba(255, 255, 255, .16);
  --green-soft: rgba(0, 172, 74, .16);
  --link: #3ddc84;
  --t-g: #2f9a58;
  --t-y: #b8920f;
  --t-x: #3a404c;
  --t-e: #262b35;
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .25), 0 4px 14px rgba(0, 0, 0, .18);
  --shadow-2: 0 10px 30px rgba(0, 0, 0, .35);
}

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  text-align: left;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
* { box-sizing: border-box; }
img { max-width: 100%; height: auto; }
a, a:visited { color: var(--link); }
.i { width: 1.1em; height: 1.1em; flex: none; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; vertical-align: -0.15em; }
.wrap { max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.wrap-narrow { max-width: 800px; }
:focus-visible { outline: 3px solid rgba(0, 172, 74, .55); outline-offset: 2px; }

.card { padding: 28px 30px; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-1); }
.btn, .btn:visited { display: inline-flex; align-items: center; gap: 8px; padding: 12px 24px; border-radius: 999px; background: var(--btn); color: #fff; font-size: 17px; font-weight: 800; text-decoration: none; box-shadow: 0 6px 16px rgba(0, 138, 62, .25); transition: background .15s, transform .15s; }
.btn:hover { background: var(--btn-hover); color: #fff; transform: translateY(-1px); }

/* ---------------------------------------------------------------- header */
.site-header { position: relative; z-index: 30; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: 0 1px 10px rgba(15, 23, 42, .04); }
.hdr { display: flex; align-items: center; gap: 14px; max-width: 1140px; height: 60px; margin: 0 auto; padding: 0 14px 0 20px; }
.brand, .brand:visited { display: inline-flex; align-items: center; gap: 2px; color: var(--ink); font-size: 22px; font-weight: 900; letter-spacing: -.01em; line-height: 1; text-decoration: none; white-space: nowrap; }
.brand-o { display: inline-flex; align-items: center; justify-content: center; width: 30px; height: 30px; margin-right: 2px; border-radius: 8px; background: var(--green); color: #fff; font-size: 19px; box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .12); }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 10px; }
.nav a, .nav a:visited { padding: 7px 13px; border: 1px solid transparent; border-radius: 999px; color: var(--ink); font-size: 15px; font-weight: 800; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s; }
.nav a:hover { background: var(--soft); border-color: var(--line); }
.nav a[aria-current="page"] { background: var(--green-soft); color: var(--link); }
.hdr-tools { display: flex; align-items: center; gap: 6px; margin-left: auto; }

/* language menu */
.lang { position: relative; }
.lang > summary { list-style: none; }
.lang > summary::-webkit-details-marker { display: none; }
.lang-btn { display: inline-flex; align-items: center; gap: 6px; height: 38px; padding: 0 10px 0 8px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 800; user-select: none; }
.lang-btn:hover { border-color: var(--line-strong); }
.lang-btn .i { width: 16px; height: 16px; transition: transform .15s; }
.lang[open] .lang-btn .i { transform: rotate(180deg); }
.flag { display: block; flex: none; width: 20px; height: 20px; border-radius: 50%; box-shadow: 0 0 0 1px var(--line); }
.lang-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: min(440px, calc(100vw - 24px)); padding: 14px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-2); }
.lang:not([open]) .lang-pop { display: none; }
.lang-title { margin: 0 4px 10px; color: var(--ink-soft); font-size: 13px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.lang-list { display: grid; grid-template-columns: 1fr 1fr; gap: 2px; margin: 0; padding: 0; list-style: none; }
.lang-item, .lang-item:visited { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--r-1); color: var(--ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.lang-item:hover { background: var(--soft); }
.lang-item.is-current { background: var(--green-soft); color: var(--link); }

.menu-btn { display: none; align-items: center; justify-content: center; width: 40px; height: 40px; padding: 0; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); cursor: pointer; font-size: 21px; }
.menu-btn:hover { border-color: var(--line-strong); }
.menu-btn .i-close { display: none; }
.menu-btn[aria-expanded="true"] .i-open { display: none; }
.menu-btn[aria-expanded="true"] .i-close { display: inline; }
.menu-btn span { display: inline-flex; }

@media (max-width: 1040px) {
  .menu-btn { display: inline-flex; }
  .nav { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 2px; margin: 0; padding: 10px 14px 16px; background: var(--surface); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-2); }
  .nav.open { display: flex; }
  .nav a, .nav a:visited { padding: 12px 14px; border-radius: var(--r-1); font-size: 16px; }
  /* the menu button sits right of the language button: anchor the popup to the header so it stays on screen */
  .lang { position: static; }
  .lang-pop { right: 12px; }
}
@media (max-width: 420px) {
  .hdr { gap: 8px; padding: 0 10px 0 14px; height: 56px; }
  .brand, .brand:visited { font-size: 20px; }
  .brand-o { width: 27px; height: 27px; font-size: 17px; }
  .lang-btn .lang-code { display: none; }
  .lang-list { grid-template-columns: 1fr; }
}

/* ---------------------------------------------------------------- game card (home) */
/* No transform, filter or contain on these boxes: the game keyboard is position: fixed while the boards are visible. */
.game-card { max-width: 1240px; margin: 14px auto 0; border: 1px solid var(--line); border-radius: var(--r-3); background: var(--surface); box-shadow: var(--shadow-1); text-align: center; }
/* as wide as the boards: max 550px below 1200px, the whole card from 1200px (octordle.css puts all 8 boards in one row) */
.game-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; max-width: 582px; margin: 0 auto; padding: 10px 14px 4px; }
@media (min-width: 1200px) { .game-bar { max-width: none; padding: 12px 18px 4px; } }
.game-timer { display: flex; align-items: center; min-height: 36px; }
.game-tools { display: flex; align-items: center; }
@media (max-width: 700px) {
  .game-card { margin: 0; border-width: 0 0 1px; border-radius: 0; box-shadow: none; }
  .game-bar { padding: 6px 8px 0; }
}

/* ---------------------------------------------------------------- page sections */
.site-main { display: block; }
.sec { padding: 22px 0; }
.sec:first-child { padding-top: 28px; }
.sec h2 { margin: 0 0 12px; font-size: 26px; font-weight: 900; line-height: 1.25; letter-spacing: -.01em; }
.sec-title { text-align: center; }
.sec h3 { margin: 0 0 6px; font-size: 18px; font-weight: 800; line-height: 1.3; }
.sec p { margin: 0 0 12px; }
.sec-sub { max-width: 640px; margin: -4px auto 22px !important; color: var(--ink-soft); text-align: center; }
.hero h1 { margin: 0 0 14px; font-size: 36px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.hero h1 .hl { color: var(--green); }
.intro { font-size: 18px; }
.disclaimer { margin: 16px 0 0 !important; padding: 12px 16px; border-radius: var(--r-1); background: var(--soft); color: var(--ink-soft); font-size: 14px; }
.more { margin: 20px 0 0; text-align: center; }
.more-link, .more-link:visited { display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-weight: 800; text-decoration: none; box-shadow: var(--shadow-1); }
.more-link:hover { border-color: var(--green); color: var(--link); }

/* colour guide */
.colors { display: grid; gap: 12px; margin: 6px 0 22px; padding: 0; list-style: none; }
.colors li { display: flex; align-items: center; gap: 14px; }
.colors p { margin: 0; }
.tile { display: inline-flex; flex: none; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 8px; color: #fff; font-size: 22px; font-weight: 900; }
.tile.g { background: var(--t-g); }
.tile.y { background: var(--t-y); text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.tile.x { background: var(--t-x); }
.keys { display: flex; align-items: center; gap: 22px; padding: 18px 20px; border-radius: var(--r-2); background: var(--soft); }
.keys p { margin: 0; }
.key-sample { position: relative; display: grid; flex: none; grid-template-columns: 1fr 1fr; grid-template-rows: repeat(4, 1fr); width: 64px; height: 84px; overflow: hidden; border-radius: 9px; box-shadow: var(--shadow-1); }
.key-sample .g { background: var(--t-g); }
.key-sample .y { background: var(--t-y); }
.key-sample .x { background: var(--t-x); }
.key-sample .e { background: #dde3ea; }
body.dark .key-sample .e { background: #5d6575; }
.key-sample b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; color: var(--ink); font-size: 26px; font-weight: 900; text-shadow: 0 0 3px var(--surface), 0 0 6px var(--surface); }

/* steps */
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; margin: 0; padding: 0; list-style: none; counter-reset: none; }
.step { display: flex; flex-direction: column; overflow: hidden; border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.step .shot { margin: 0; border-bottom: 1px solid var(--line); }
.step .shot img { display: block; width: 100%; }
.step-text { position: relative; padding: 18px 20px 16px 62px; }
.step-n { position: absolute; top: 16px; left: 16px; display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 9px; background: var(--green-soft); color: var(--link); font-weight: 900; }
.step p { margin: 0; color: var(--ink-soft); }

/* features */
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin: 0; padding: 0; list-style: none; }
.feature { padding: 22px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.feature p { margin: 0; color: var(--ink-soft); }
.f-tile { display: inline-flex; align-items: center; justify-content: center; width: 38px; height: 38px; margin-bottom: 12px; border-radius: 10px; color: #fff; font-weight: 900; }
.f-1, .f-4 { background: var(--t-g); }
.f-2, .f-5 { background: var(--t-y); text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.f-3, .f-6 { background: var(--t-x); }
.shots-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 22px; }
.shot { margin: 0; }
.shots-pair .shot { overflow: hidden; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.shots-pair img { display: block; width: 100%; }

/* guide cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.guide, .guide:visited { position: relative; display: flex; flex-direction: column; gap: 6px; height: 100%; padding: 22px 50px 22px 22px; border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); color: var(--ink); text-decoration: none; box-shadow: var(--shadow-1); transition: border-color .15s, box-shadow .15s; }
.guide:hover { border-color: var(--green); box-shadow: var(--shadow-2); }
.guide strong { font-size: 18px; font-weight: 900; line-height: 1.3; }
.guide-kicker { color: var(--link); font-size: 12px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.guide-text { color: var(--ink-soft); font-size: 15px; }
.guide .i { position: absolute; top: 22px; right: 20px; color: var(--green); }

/* FAQ */
.faq { display: grid; gap: 10px; }
.faq-item { border: 1px solid var(--line); border-radius: var(--r-2); background: var(--surface); box-shadow: var(--shadow-1); }
.faq-item summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 20px; cursor: pointer; list-style: none; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary h3 { margin: 0; font-size: 17px; }
.faq-item summary .i { color: var(--ink-soft); transition: transform .15s; }
.faq-item[open] summary .i { transform: rotate(180deg); color: var(--green); }
.faq-a { padding: 0 20px 6px; color: var(--ink-soft); }

/* about */
.about-text p:last-child { margin-bottom: 0; }

/* more games */
.more-games { padding-bottom: 40px; }
.more-games h2 { font-size: 22px; }
.games { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 0; padding: 0; list-style: none; }
.games a, .games a:visited { display: inline-flex; align-items: baseline; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); color: var(--ink); font-size: 14px; text-decoration: none; }
.games a:hover { border-color: var(--green); }
.games strong { font-weight: 800; }
.games span { color: var(--ink-soft); font-size: 13px; }

/* ads */
.ad { display: flex; justify-content: center; max-width: 1140px; margin: 0 auto; padding: 0 20px; }
.ad > div:empty { min-height: 0; }

/* ---------------------------------------------------------------- articles */
.page-hero { padding: 34px 0 20px; }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--ink-soft); font-size: 14px; font-weight: 700; }
.crumbs a, .crumbs a:visited { color: var(--ink-soft); text-decoration: none; }
.crumbs a:hover { color: var(--link); }
.page-hero h1 { margin: 8px 0 10px; font-size: 38px; font-weight: 900; line-height: 1.15; letter-spacing: -.02em; }
.lead { margin: 0; color: var(--ink-soft); font-size: 18px; }
.prose { margin: 12px 0 0; font-size: 17px; line-height: 1.7; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h2 { margin: 36px 0 12px; font-size: 25px; font-weight: 900; line-height: 1.3; letter-spacing: -.01em; }
.prose h3 { margin: 26px 0 8px; font-size: 19px; font-weight: 800; line-height: 1.35; }
.prose p, .prose ul, .prose ol { margin: 0 0 16px; }
.prose li { margin: 0 0 6px; }
.prose li::marker { color: var(--green); font-weight: 800; }
.prose strong { font-weight: 800; }
.prose kbd { padding: 1px 7px; border: 1px solid var(--line-strong); border-bottom-width: 2px; border-radius: 6px; background: var(--soft); font-family: inherit; font-size: .9em; font-weight: 800; }
.prose .note { margin: 0 0 18px; padding: 14px 18px; border-left: 4px solid var(--green); border-radius: var(--r-1); background: var(--green-soft); }
.prose .note > :last-child { margin-bottom: 0; }
.table-wrap { overflow-x: auto; margin: 0 0 18px; border: 1px solid var(--line); border-radius: var(--r-2); }
.prose table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.5; }
.prose th, .prose td { padding: 10px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { background: var(--soft); font-weight: 800; }
.prose tr:last-child td { border-bottom: 0; }
.example { margin: 0 0 18px; padding: 16px 18px; border-radius: var(--r-2); background: var(--soft); }
.example .row { display: flex; gap: 5px; margin: 0 0 6px; }
.example .row span { display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; border-radius: 6px; color: #fff; font-size: 20px; font-weight: 900; text-transform: uppercase; }
.example .row .g { background: var(--t-g); }
.example .row .y { background: var(--t-y); text-shadow: 0 1px 1px rgba(0, 0, 0, .28); }
.example .row .x { background: var(--t-x); }
.example .row .e { background: var(--surface); box-shadow: inset 0 0 0 2px var(--line-strong); color: var(--ink); }
.example .caption { margin: 0; color: var(--ink-soft); font-size: 15px; }
.example .row + .caption { margin-top: 10px; }

.cta { margin: 24px 0 0; padding: 30px 26px; border-radius: var(--r-3); background: linear-gradient(135deg, #00ac4a, #00924a); color: #fff; text-align: center; box-shadow: var(--shadow-2); }
.cta h2 { margin: 0 0 8px; font-size: 24px; font-weight: 900; }
.cta p { margin: 0 auto 18px; max-width: 520px; opacity: .95; }
.cta .btn, .cta .btn:visited { background: #fff; color: #007f39; box-shadow: 0 6px 16px rgba(0, 0, 0, .15); }
.cta .btn:hover { background: #f1fff6; color: #006b30; }
.back { margin: 24px 0 0; }
.related { margin: 30px 0 48px; }
.related h2 { margin: 0 0 12px; font-size: 20px; font-weight: 900; }
.related-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.related-list a, .related-list a:visited { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 18px; border: 1px solid var(--line); border-radius: var(--r-1); background: var(--surface); color: var(--ink); font-weight: 800; text-decoration: none; }
.related-list a:hover { border-color: var(--green); color: var(--link); }

/* contact form (markup and behaviour from /api/feedback/form.js) */
.fb-wrap { margin: 12px 0 0; }
.contact-mail { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-radius: var(--r-1); background: var(--soft); }
[data-feedback-form] { max-width: 100%; margin-top: 24px; text-align: left; }
[data-feedback-form] .fb-row { margin-bottom: 16px; }
[data-feedback-form] label { display: block; margin-bottom: 6px; font-weight: 800; font-size: 14px; }
[data-feedback-form] .fb-input { display: block; width: 100%; padding: 12px 14px; font: inherit; font-size: 15px; line-height: 1.5; color: var(--ink); background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--r-1); outline: 0; }
[data-feedback-form] .fb-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
[data-feedback-form] textarea.fb-input { min-height: 150px; resize: vertical; }
[data-feedback-form] input[type=file].fb-input { padding: 9px 12px; }
[data-feedback-form] .fb-btn { display: inline-block; width: 100%; padding: 13px 20px; font: inherit; font-size: 17px; font-weight: 800; color: #fff; background: var(--btn); border: 0; border-radius: 999px; cursor: pointer; transition: background .15s; }
[data-feedback-form] .fb-btn:hover { background: var(--btn-hover); }
[data-feedback-form] .fb-btn:disabled { opacity: .6; cursor: default; }
[data-feedback-form][data-state=error] [data-feedback-status] { color: #e43f52; }
[data-feedback-form][data-state=sent] [data-feedback-status] { color: var(--link); }
[data-feedback-form] altcha-widget { --altcha-max-width: 100%; display: block; margin-bottom: 16px; }

/* 404 */
.not-found { padding: 48px 0 60px; text-align: center; }
.not-found h1 { margin: 18px 0 10px; font-size: 34px; font-weight: 900; }
.not-found .lead { margin: 0 auto 24px; max-width: 520px; }
.nf-tiles { display: flex; justify-content: center; gap: 6px; margin: 0; }
.nf-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin: 26px 0 0; padding: 0; list-style: none; }
.nf-links a, .nf-links a:visited { display: inline-block; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font-weight: 800; text-decoration: none; }
.nf-links a:hover { border-color: var(--green); }

/* ---------------------------------------------------------------- footer */
.site-footer { margin-top: 20px; padding: 40px 0 28px; border-top: 1px solid var(--line); background: var(--surface); font-size: 15px; }
.foot-top { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.6fr; gap: 28px; }
.foot-brand p { margin: 12px 0 0; max-width: 300px; color: var(--ink-soft); }
.foot-h { position: relative; margin: 4px 0 16px; padding-bottom: 10px; color: var(--ink); font-size: 13px; font-weight: 900; letter-spacing: .08em; text-transform: uppercase; }
.foot-h::after { content: ''; position: absolute; left: 0; bottom: 0; width: 28px; height: 3px; border-radius: 3px; background: var(--green); }
.foot-col ul { margin: 0; padding: 0; list-style: none; }
.foot-col li { margin: 0 0 4px; }
.foot-col a, .foot-col a:visited { display: inline-block; padding: 3px 0; color: var(--ink-soft); font-weight: 700; text-decoration: none; }
.foot-col a:hover, .foot-col a[aria-current] { color: var(--link); }
.foot-langs ul { columns: 2; column-gap: 18px; }
.foot-note { margin: 28px 0 0; padding-top: 20px; border-top: 1px solid var(--line); color: var(--ink-soft); font-size: 14px; }
.foot-bottom { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-top: 14px; }
.foot-copy { margin: 0; color: var(--ink-soft); font-size: 14px; }
.foot-legal { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.foot-legal a, .foot-legal a:visited { display: inline-block; padding: 6px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--soft); color: var(--ink); font-size: 13px; font-weight: 800; text-decoration: none; }
.foot-legal a:hover { border-color: var(--green); color: var(--link); }

/* ---------------------------------------------------------------- tablets and phones */
@media (max-width: 960px) {
  .features { grid-template-columns: 1fr 1fr; }
  .foot-top { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }
  .foot-langs { grid-column: 1 / -1; }
  .foot-langs ul { columns: 3; }
}
@media (max-width: 700px) {
  .wrap, .ad { padding: 0 14px; }
  .card { padding: 22px 18px; border-radius: var(--r-2); }
  .sec { padding: 14px 0; }
  .sec:first-child { padding-top: 18px; }
  .hero h1, .page-hero h1 { font-size: 28px; }
  .sec h2 { font-size: 23px; }
  .intro, .lead { font-size: 17px; }
  .shots-pair, .features, .steps, .cards { grid-template-columns: 1fr; }
  .keys { flex-direction: column; align-items: flex-start; }
  .page-hero { padding: 24px 0 14px; }
  .prose { font-size: 16.5px; }
  .prose h2 { font-size: 22px; }
  .example .row span { width: 36px; height: 36px; font-size: 18px; }
  /* Tables keep readable columns and scroll inside .table-wrap instead of squeezing to one word per line. */
  .prose table { font-size: 14px; line-height: 1.45; }
  .prose th, .prose td { padding: 8px 10px; }
  .prose th { min-width: 6em; }
  .prose th:first-child { min-width: 0; }
  .prose td:first-child { white-space: nowrap; }
  .prose .table-wide table { min-width: 40em; }
  .foot-langs ul { columns: 2; }
  .foot-bottom { flex-direction: column-reverse; align-items: flex-start; }
}
