/* Digitsekk — värvid on äpi enda teemast (app/lib/core/theme/app_colors.dart),
   mitte eraldi veebipalett. Kui äpp muutub, muutub ka see. */
:root {
  --bg: #FBFAF8;
  --surface: #FFFFFF;
  --surface-raised: #F3F0EC;
  --text: #16181C;
  --text-2: #51575E;
  --text-muted: #6B7076;
  --accent: #0D5C50;
  --accent-fill: #53BBAB;
  --border: #E8E4DE;
  --warning: #804900;
  --radius: 10px;
  --measure: 34rem;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101214;
    --surface: #17191C;
    --surface-raised: #1F2226;
    --text: #F2F0ED;
    --text-2: #BEC3C9;
    --text-muted: #949AA1;
    --accent: #7FD4C4;
    --accent-fill: #2E6B61;
    --border: #2A2E33;
    --warning: #E0A44B;
  }
}
:root[data-theme="dark"] {
  --bg: #101214; --surface: #17191C; --surface-raised: #1F2226;
  --text: #F2F0ED; --text-2: #BEC3C9; --text-muted: #949AA1;
  --accent: #7FD4C4; --accent-fill: #2E6B61; --border: #2A2E33;
  --warning: #E0A44B;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 17px/1.65 ui-serif, Georgia, "Times New Roman", serif;
  font-feature-settings: "kern", "liga";
}
h1, h2, h3, nav, .ui {
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, sans-serif;
}
h1, h2, h3 { line-height: 1.2; text-wrap: balance; letter-spacing: -0.015em; }
h1 { font-size: clamp(2rem, 5.5vw, 3rem); margin: 0 0 .6rem; font-weight: 640; }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.75rem); margin: 3rem 0 .75rem; font-weight: 620; }
h3 { font-size: 1.1rem; margin: 2rem 0 .4rem; font-weight: 620; }
p, li { color: var(--text-2); }
p { margin: 0 0 1.1rem; max-width: var(--measure); }
li { margin-bottom: .45rem; }
ul, ol { max-width: var(--measure); padding-left: 1.2rem; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 3px;
}
strong { color: var(--text); font-weight: 620; }
code {
  font: 0.88em ui-monospace, SFMono-Regular, Menlo, monospace;
  background: var(--surface-raised); padding: .1em .35em; border-radius: 4px;
}

.wrap { max-width: 46rem; margin: 0 auto; padding: 0 1.25rem; }

header.site {
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; padding-block: .85rem; flex-wrap: wrap;
}
.brand {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-family: ui-sans-serif, -apple-system, sans-serif;
  font-weight: 660; font-size: 1.08rem; color: var(--text);
  text-decoration: none; letter-spacing: -0.02em;
}
.brand .mark {
  display: inline-grid; place-items: center;
  width: 1.6rem; height: 1.6rem; border-radius: 7px;
  background: var(--accent); color: #fff;
  font-size: .95rem; font-weight: 700; transform: translateY(.18rem);
}
nav.site { display: flex; gap: 1.15rem; font-size: .93rem; flex-wrap: wrap; }
nav.site a { color: var(--text-2); text-decoration: none; }
nav.site a:hover { color: var(--accent); text-decoration: underline; }

main { padding-block: 2.5rem 4rem; }
.lede { font-size: 1.18rem; color: var(--text-2); max-width: 36rem; }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 1.1rem 1.25rem; margin: 1rem 0;
}
.card h3 { margin-top: 0; }
.card p:last-child { margin-bottom: 0; }

.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); margin: 1.5rem 0; }
.grid .card { margin: 0; }

.note {
  border-left: 3px solid var(--accent-fill);
  padding: .1rem 0 .1rem 1rem; margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }

table { border-collapse: collapse; width: 100%; font-size: .95rem; }
.scroll-x { overflow-x: auto; margin: 1.25rem 0; }
th, td { text-align: left; padding: .55rem .7rem; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-family: ui-sans-serif, -apple-system, sans-serif; font-size: .82rem;
     text-transform: uppercase; letter-spacing: .05em; color: var(--text-muted); font-weight: 600; }

.meta { font-size: .9rem; color: var(--text-muted); }

footer.site {
  border-top: 1px solid var(--border); background: var(--surface);
  padding-block: 2rem; font-size: .92rem;
}
footer.site p { color: var(--text-muted); margin-bottom: .5rem; }
footer.site nav { display: flex; gap: 1.1rem; flex-wrap: wrap; margin-bottom: .9rem; }
footer.site nav a { color: var(--text-2); text-decoration: none; }
footer.site nav a:hover { text-decoration: underline; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
