/* skesters UI (night 2026-10-20): one stylesheet for skesters.com (blue) and
   mansmilulis.skesters.com (green). Source: web-shared/; copies in each site's
   assets folder are made by scripts/web/sync-shared-ui.mjs (never edit a copy).
   Tokens: docs/design/skesters-site/00-LASI-MANI.md (contrast-checked by
   scripts/web/test-skesters-site.mjs S3; changes logged in docs/design/skesters-site/tokens.md).
   CSP: no inline styles anywhere -- every look is a class here. */

:root,
[data-theme="blue"] {
  --hero: #15335A;
  --hero-deep: #24497A;
  --on-hero: #F2F5FA;
  --hero-sub: #C9D8EC;
  --accent: #9CC3F0;
  --on-accent: #0B1E38;
  --page: #F2F5FA;
  --tint: #DCE5F2;
  --tint-ink: #24497A;
  --muted: #526074;
  --card-alt: #E4EAF4;
  --card-alt-ink: #3C4A5E;
  --link: #24497A;
  --link-hover: #15335A;
  --line: #D3DCEA;
}
[data-theme="green"] {
  --hero: #174A35;
  --hero-deep: #2F5E49;
  --on-hero: #F3F5F0;
  --hero-sub: #CFE0D5;
  --accent: #9FD3B4;
  --on-accent: #0F2E21;
  --page: #F3F5F0;
  --tint: #DCE6DE;
  --tint-ink: #2F5E49;
  --muted: #55625A;
  --card-alt: #E6EDE7;
  --card-alt-ink: #3F4A43;
  --link: #2F5E49;
  --link-hover: #174A35;
  --line: #CCD9CF;
}
:root {
  --ink: #1B1F1C;
  --card: #FFFFFF;
  --warn-bg: #FFF1C2;
  --warn-ink: #4A3800;
  --shadow: 0 1px 2px rgba(0, 0, 0, 0.08);
  --r-card: 28px;
  --r-pill: 28px;
  --r-hero: 48px;
  --max: 1160px;
  --gutter: 24px;
  --focus: var(--hero-deep);
  --font: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
@media (max-width: 640px) {
  :root { --gutter: 16px; }
}

/* ---- base ---- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  overflow-wrap: break-word;
}
img { max-width: 100%; height: auto; }
a { color: var(--link); }
a:hover { color: var(--link-hover); }
h1, h2, h3 { line-height: 1.15; letter-spacing: -0.01em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 8px; top: -64px; z-index: 50;
  padding: 12px 18px; border-radius: var(--r-pill);
  background: var(--card); color: var(--link); font-weight: 700; text-decoration: none;
}
.skip-link:focus { top: 8px; }

/* ---- top band: the header (.top) and the first block of <main> (.top.top-end,
   rounded bottom) share one background, so the h1 stays inside <main> ---- */
.top {
  background: var(--hero);
  color: var(--on-hero);
  --focus: var(--accent);
}
.top-end { border-radius: 0 0 var(--r-hero) var(--r-hero); }
.top a { color: var(--on-hero); }
.site-header {
  position: relative; z-index: 20;
  display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; justify-content: space-between;
  padding-top: 20px; padding-bottom: 8px;
}
.logo {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font-weight: 800; font-size: 20px; text-decoration: none;
}
.logo-dot { color: var(--accent); }
.logo img { width: 36px; height: 36px; border-radius: 10px; }

/* main navigation: without JS every item is a plain link and the list is
   shown (stacked on a phone); with JS (html.js) the two section titles become
   disclosure buttons and the phone list opens from the menu button */
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-list { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
/* the panels are placed against the header (.site-header), not their item: a wrapped
   nav row at 860-1100 px would push an item-anchored panel off the left edge */
.nav-item { position: static; }
.nav-link {
  display: inline-flex; align-items: center; gap: 6px; min-height: 44px;
  padding: 0 16px; border: 0; border-radius: 22px; background: none;
  color: var(--on-hero); font: inherit; font-size: 15px; font-weight: 600;
  text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.12); color: var(--on-hero); }
.nav-link[aria-expanded="true"] { background: rgba(255, 255, 255, 0.18); }
.nav-link[aria-current="page"], .nav-link[aria-current="true"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.nav-link--cta { background: var(--on-hero); color: var(--hero); font-weight: 700; }
.top .nav-link--cta { color: var(--hero); }
.nav-link--cta:hover { background: var(--hero-sub); color: var(--hero); }
.nav-link svg { width: 14px; height: 14px; transition: transform 120ms ease; }
.nav-link[aria-expanded="true"] svg { transform: rotate(180deg); }
.nav-toggle, .menu-button { display: none; }
/* stronger than .btn (which comes later): no dead print button without JS */
html:not(.js) .print-btn { display: none; }
.js .nav-toggle { display: inline-flex; }
.js .nav-fallback { display: none; }
.dropdown {
  position: absolute; top: calc(100% - 4px); right: var(--gutter); z-index: 30;
  width: min(560px, calc(100vw - 2 * var(--gutter)));
  padding: 20px; border-radius: 24px;
  background: var(--card); color: var(--ink);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
  animation: drop-in 140ms ease-out;
  --focus: var(--hero-deep);
}
.dropdown[hidden] { display: none; }
.dropdown a, .dropdown .dropdown-note {
  display: flex; flex-direction: column; gap: 6px;
  padding: 18px; border-radius: 16px; background: var(--page);
  color: var(--ink); text-decoration: none;
}
.top .dropdown a { color: var(--ink); }
.dropdown a:hover { background: var(--tint); color: var(--ink); }
.dropdown-title { font-size: 20px; font-weight: 800; }
.dropdown-desc { font-size: 14px; line-height: 1.45; color: var(--muted); }
.top .dropdown a.dropdown-wide {
  grid-column: span 2; flex-direction: row; justify-content: space-between;
  padding: 14px 18px; background: none; color: var(--link); font-weight: 700; font-size: 15px;
}
.top .dropdown a.dropdown-wide:hover { background: var(--page); color: var(--link-hover); }
.dropdown-note .badge { align-self: flex-start; }
@keyframes drop-in { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .js .menu-button {
    display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 16px;
    border: 1.5px solid rgba(255, 255, 255, 0.55); border-radius: 22px; background: none;
    color: var(--on-hero); font: inherit; font-weight: 700; cursor: pointer;
  }
  .main-nav { flex: 1 1 100%; }
  .nav-list { flex-direction: column; align-items: stretch; }
  .js .main-nav:not([data-open]) { display: none; }
  .nav-link { width: 100%; justify-content: space-between; }
  .nav-link--cta { justify-content: center; margin-top: 6px; }
  .dropdown {
    position: static; width: auto; margin: 6px 0 4px;
    grid-template-columns: 1fr; box-shadow: none; animation: none;
  }
  .top .dropdown a.dropdown-wide { grid-column: auto; }
}

/* ---- hero ---- */
.hero {
  display: flex; flex-wrap: wrap; gap: 48px; align-items: center;
  padding-top: 56px; padding-bottom: 88px;
}
.hero-text { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.hero h1 {
  margin: 0; font-size: clamp(38px, 7vw, 64px); line-height: 1.05; font-weight: 800;
  letter-spacing: -0.02em; text-wrap: balance;
}
.lead { margin: 0; max-width: 560px; font-size: clamp(18px, 2.4vw, 20px); line-height: 1.55; color: var(--hero-sub); }
.hero-art { flex: 0 1 360px; display: flex; justify-content: center; }
.mascot-circle {
  width: min(320px, 70vw); aspect-ratio: 1; border-radius: 50%;
  background: var(--hero-deep);
  box-shadow: 0 0 0 24px rgba(255, 255, 255, 0.06), 0 0 0 48px rgba(255, 255, 255, 0.03);
  display: flex; align-items: center; justify-content: center;
}
/* width / height attributes keep the box (no layout shift); the circle scales the picture */
.mascot-circle img { width: auto; height: 76%; }
.page-head { padding-top: 24px; padding-bottom: 64px; display: flex; flex-direction: column; gap: 16px; }
.page-head h1 { margin: 0; font-size: clamp(34px, 6vw, 56px); line-height: 1.05; font-weight: 800; letter-spacing: -0.02em; }
.page-head .lead { max-width: 620px; }
.page-head--low { padding-bottom: 40px; }
.page-head--low h1 { font-size: clamp(28px, 5vw, 40px); }
main:focus { outline: none; }
.crumbs { font-size: 14px; color: var(--hero-sub); }
.top .crumbs a { color: var(--hero-sub); }

/* ---- buttons, badges, chips ---- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 24px; border-radius: var(--r-pill); border: 1.5px solid transparent;
  font: inherit; font-size: 16px; font-weight: 700; text-decoration: none; cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease;
}
.btn--primary, .top .btn--primary { background: var(--accent); color: var(--on-accent); font-weight: 800; }
.btn--primary:hover, .top .btn--primary:hover { background: var(--on-hero); color: var(--on-accent); }
.btn--ghost { border-color: rgba(255, 255, 255, 0.55); color: var(--on-hero); background: none; }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.12); color: var(--on-hero); }
.btn--solid { background: var(--hero); color: var(--on-hero); }
.btn--solid:hover { background: var(--hero-deep); color: var(--on-hero); }
.badge {
  display: inline-block; padding: 6px 12px; border-radius: 14px;
  background: var(--tint); color: var(--tint-ink); font-size: 13px; font-weight: 700;
}
.badge--sample { background: var(--warn-bg); color: var(--warn-ink); }
.eyebrow { font-size: 13px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--tint-ink); }
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  padding: 8px 14px; border-radius: 16px; background: var(--card); border: 1px solid var(--line);
  font-size: 14px; font-weight: 600; color: var(--card-alt-ink);
}

/* ---- sections and cards ---- */
main { display: block; }
.section { padding-top: 64px; padding-bottom: 24px; display: flex; flex-direction: column; gap: 24px; }
.section--tight { padding-top: 24px; }
.section-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; justify-content: space-between; }
.section-head h2, .section > h2 { margin: 0; font-size: clamp(30px, 4.5vw, 40px); font-weight: 800; letter-spacing: -0.02em; }
.section-head p { margin: 0; color: var(--muted); }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(300px, 100%), 1fr)); gap: 20px; }
.grid--narrow { grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 14px; }
/* material cards: a lone card keeps its column width (auto-fill, not auto-fit) */
.grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); }
@media (min-width: 700px) { .span-2 { grid-column: span 2; } }
.card {
  padding: 28px; border-radius: var(--r-card); background: var(--card); box-shadow: var(--shadow);
  display: flex; flex-direction: column; gap: 10px; color: var(--ink); min-width: 0;
}
.card h2, .card h3 { margin: 0; font-size: 22px; line-height: 1.2; font-weight: 800; }
.card p { margin: 0; color: var(--muted); }
a.card { text-decoration: none; }
a.card:hover { box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); color: var(--ink); }
.card--dark { background: var(--hero); color: var(--on-hero); box-shadow: none; gap: 18px; --focus: var(--accent); }
.card--dark p { color: var(--hero-sub); }
a.card--dark:hover { color: var(--on-hero); }
.card--dark .eyebrow { color: var(--accent); }
.card--dark h3 { font-size: 26px; }
.subcard { padding: 20px; border-radius: 20px; background: var(--hero-deep); display: flex; flex-direction: column; gap: 6px; }
.subcard-title { font-size: 17px; font-weight: 800; }
.subcard p { color: var(--hero-sub); font-size: 15px; line-height: 1.5; }
.card--alt { background: var(--card-alt); box-shadow: none; }
.card--alt p { color: var(--card-alt-ink); }
.card--alt .soon-label { font-size: 13px; font-weight: 700; color: var(--card-alt-ink); }
.app-card { flex-direction: row; flex-wrap: wrap; gap: 24px; align-items: center; }
.app-card-text { flex: 1 1 260px; min-width: 0; display: flex; flex-direction: column; gap: 10px; }
.app-card .badge { align-self: flex-start; }
.app-card h3 { font-size: 28px; }
.app-shot {
  flex: none; width: 180px; height: auto; border-radius: 20px; background: var(--tint);
  border: 1px solid var(--line); box-shadow: var(--shadow);
}
.strip {
  padding: 18px 24px; border-radius: 20px; background: var(--tint);
  display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between;
}
.strip p { margin: 0; color: var(--on-accent); }
.strip-links { display: flex; flex-wrap: wrap; gap: 8px; }
.mini-btn {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 14px;
  background: var(--card); color: var(--link); font-weight: 700; font-size: 14px; text-decoration: none;
}
.note { padding: 20px 24px; border-radius: 18px; background: var(--card-alt); color: var(--card-alt-ink); font-size: 15px; }
.note p { margin: 0; color: var(--card-alt-ink); }

/* notices: draft legal text, sample material */
.notice {
  padding: 12px 18px; border-radius: 14px; background: var(--warn-bg); color: var(--warn-ink);
  font-weight: 700; font-size: 15px;
}
.notice p { margin: 0; }

/* ---- materials ---- */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.tab {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 24px;
  border: 1.5px solid rgba(255, 255, 255, 0.55); color: var(--on-hero); font-weight: 700; text-decoration: none;
}
.top .tab[aria-current="page"] { background: var(--accent); border-color: var(--accent); color: var(--on-accent); font-weight: 800; }
.tab:hover { background: rgba(255, 255, 255, 0.12); }
.topic-links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.topic-links a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 16px; border-radius: 20px;
  background: var(--card); border: 1px solid var(--line); color: var(--ink); font-size: 14px; font-weight: 600; text-decoration: none;
}
.topic-links a:hover { border-color: var(--link); }
.material-card { padding: 24px; border-radius: 22px; gap: 12px; }
.material-card h3 { font-size: 19px; line-height: 1.25; }
.material-card .badges { display: flex; flex-wrap: wrap; gap: 6px; }
.material-meta { font-size: 14px; color: var(--muted); }
.preview {
  height: 120px; border-radius: 14px; background: var(--card-alt);
  display: flex; flex-direction: column; justify-content: center; gap: 10px; padding: 0 22%;
}
.preview span { display: block; height: 6px; border-radius: 3px; background: var(--line); }
.preview span:nth-child(2) { width: 80%; }
.preview span:nth-child(3) { width: 60%; }

/* ---- prose (legal text, about pages, worksheets) ---- */
.prose { max-width: 720px; line-height: 1.6; }
.prose h2 { font-size: 24px; margin: 36px 0 10px; }
.prose h3 { font-size: 19px; margin: 26px 0 8px; }
.prose p, .prose li { margin: 0 0 12px; }
.prose ul, .prose ol { padding-left: 24px; }
.prose address { font-style: normal; }
.content { padding-top: 40px; padding-bottom: 40px; }

/* worksheets (A4 print view) */
.ws-head { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.ws-meta { color: var(--muted); font-size: 15px; }
.ws-goal { padding: 16px 20px; border-radius: 16px; background: var(--tint); color: var(--on-accent); }
.ws-name { display: flex; flex-wrap: wrap; gap: 24px; margin: 20px 0; }
.ws-name span { flex: 1 1 220px; border-bottom: 1.5px solid var(--ink); padding-bottom: 4px; }
.ws-tasks { padding-left: 0; list-style: none; counter-reset: task; }
.ws-task { counter-increment: task; margin: 0 0 22px; break-inside: avoid; }
.ws-task > p:first-child::before { content: counter(task) ". "; font-weight: 800; }
.ws-task ol, .ws-task ul { margin: 8px 0 0; }
.ws-task li { margin-bottom: 10px; }
.blank { display: inline-block; min-width: 9em; border-bottom: 1.5px solid var(--ink); }
/* a screen reader hears the gap (CSS alt text: nothing shown) */
.blank::before { content: "" / "tukša vieta"; }
.ws-text-roomy { line-height: 2.6; }
.blank--s { min-width: 4em; }
.ws-lines { display: block; height: 2.4em; border-bottom: 1.5px solid var(--ink); }
.ws-table { border-collapse: collapse; width: 100%; margin-top: 8px; overflow-wrap: anywhere; }
.ws-table th, .ws-table td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.ws-table td.blank-cell { height: 2.2em; }
@media (max-width: 480px) {
  .ws-table { font-size: 13px; }
  .ws-table th, .ws-table td { padding: 6px 5px; }
}
.ws-answers { margin-top: 48px; padding-top: 24px; border-top: 2px dashed var(--line); }
.print-tip { color: var(--muted); font-size: 15px; }
.js .print-btn { display: inline-flex; }
.js .print-tip { display: none; }

/* ---- footer ---- */
.site-footer {
  display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between;
  padding-top: 28px; padding-bottom: 48px; font-size: 14px; color: var(--muted);
}
.site-footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 20px; }
.site-footer a { display: inline-block; padding: 10px 0; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}

/* ---- print (A4) ---- */
@page { size: A4; margin: 16mm 15mm; }
@media print {
  body { background: #FFFFFF; color: #000000; font-size: 12pt; }
  /* the header goes; the title block (.top-end, first in <main>) stays, plain */
  .top:not(.top-end), .site-footer, .skip-link, .no-print, .crumbs { display: none !important; }
  .top-end, .top-end a, .top-end .lead { background: none; color: #000000; border-radius: 0; }
  .top-end .tabs, .top-end .actions { display: none; }
  .top-end .page-head { padding: 0 0 8px; }
  .wrap { max-width: none; padding: 0; }
  .content { padding: 0; }
  .prose { max-width: none; }
  a { color: #000000; text-decoration: none; }
  .ws-goal { background: none; border: 1px solid #000000; color: #000000; }
  .ws-answers { break-before: page; border-top: 0; margin-top: 0; padding-top: 0; }
  .ws-table th, .ws-table td { border-color: #000000; }
  .notice { border: 1.5px solid #000000; background: none; color: #000000; }
}
