/* Ehitajate tee 19 korteriühistu – kujundus. Ilma välisfontide ja raamistiketa (kiire laadimine). */

:root {
  --bg: #f4f1ea;
  --surface: #ffffff;
  --surface-2: #faf8f3;
  --ink: #14283c;
  --muted: #566879;
  --line: #e3ddd0;
  --line-2: #cfc7b6;
  --navy: #13304a;
  --navy-2: #1b4466;
  --accent: #e8b932;
  --accent-ink: #2b2000;
  --link: #17598a;
  --btn: #13304a;
  --btn-ink: #ffffff;
  --ok: #1d7549;
  --ok-bg: #e4f3ea;
  --warn: #8f5200;
  --warn-bg: #fdf0d6;
  --bad: #b3261e;
  --bad-bg: #fbe6e4;
  --info: #17598a;
  --info-bg: #e3eff8;
  --r: 14px;
  --sh: 0 1px 2px rgba(20, 40, 60, .06), 0 8px 24px rgba(20, 40, 60, .06);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0c1925;
    --surface: #132638;
    --surface-2: #10212f;
    --ink: #e8eef4;
    --muted: #9db0c2;
    --line: #25405a;
    --line-2: #35546f;
    --link: #8cc4ee;
    --btn: #2f74ab;
    --btn-ink: #ffffff;
    --ok: #6fd3a0;
    --ok-bg: #12382a;
    --warn: #f0c36a;
    --warn-bg: #3a2c0e;
    --bad: #ff9c94;
    --bad-bg: #432020;
    --info: #8cc4ee;
    --info-bg: #14344d;
    --sh: 0 1px 2px rgba(0, 0, 0, .3), 0 8px 24px rgba(0, 0, 0, .25);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 17px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; }
a { color: var(--link); text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
h1, h2, h3, h4 { line-height: 1.2; letter-spacing: -.01em; margin: 0 0 .6em; color: var(--ink); }
h1 { font-size: clamp(1.9rem, 1.2rem + 3vw, 3rem); letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 1.8rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
ul, ol { padding-left: 1.3em; margin: 0 0 1em; }
small, .small { font-size: .88rem; }
.muted { color: var(--muted); }
code { background: var(--surface-2); border: 1px solid var(--line); padding: .1em .35em; border-radius: 6px; font-size: .92em; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.skip { position: absolute; left: -999px; top: 0; background: var(--accent); color: var(--accent-ink); padding: .6rem 1rem; z-index: 100; font-weight: 700; }
.skip:focus { left: 0; }
.i { width: 1.15em; height: 1.15em; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -.2em; }
.i.inline { vertical-align: -.25em; }

.wrap { width: min(1160px, 100% - 2rem); margin-inline: auto; }
.wrap--narrow { width: min(820px, 100% - 2rem); }
.wrap--tiny { width: min(460px, 100% - 2rem); }
.section { padding: 2.75rem 0; }
.section--alt { background: var(--surface-2); border-block: 1px solid var(--line); }
.empty { display: flex; gap: .6rem; align-items: center; padding: 1.1rem 1.2rem; background: var(--surface); border: 1px dashed var(--line-2); border-radius: var(--r); color: var(--muted); }

/* ---------- Päis ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--navy); color: #fff; box-shadow: 0 2px 12px rgba(0, 0, 0, .2); }
.bar { display: flex; align-items: center; gap: 1rem; min-height: 68px; }
.brand { display: flex; align-items: center; gap: .7rem; color: #fff; text-decoration: none; margin-right: auto; }
.brand__logo { border-radius: 10px; flex: none; }
.brand__t { display: grid; line-height: 1.15; }
.brand { flex: none; }
.brand__t b { font-size: 1.12rem; letter-spacing: -.01em; white-space: nowrap; }
.brand__t small { font-size: .74rem; opacity: .75; text-transform: uppercase; letter-spacing: .08em; white-space: nowrap; }
.nav ul { display: flex; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav a { display: block; color: #e6eef6; text-decoration: none; padding: .55rem .8rem; border-radius: 9px; font-weight: 550; font-size: .97rem; white-space: nowrap; }
.nav a:hover { background: rgba(255, 255, 255, .1); color: #fff; }
.nav a[aria-current="page"] { background: var(--accent); color: var(--accent-ink); }
.nav { order: 2; }
.lang { order: 3; display: flex; gap: 2px; padding: 3px; border-radius: 10px; background: rgba(255, 255, 255, .1); }
.lang a { color: #e6eef6; text-decoration: none; font-weight: 700; font-size: .82rem; letter-spacing: .06em; padding: .3rem .6rem; border-radius: 7px; }
.lang a:hover { background: rgba(255, 255, 255, .14); color: #fff; }
.lang a[aria-current="true"] { background: var(--accent); color: var(--accent-ink); }
.nav-toggle { order: 4; }
.nav-chk { position: absolute; opacity: 0; width: 1px; height: 1px; }
.nav-toggle { display: none; cursor: pointer; padding: .55rem; border-radius: 10px; color: #fff; }
.nav-toggle .i { width: 1.6rem; height: 1.6rem; }
.nav-toggle__close { display: none; }
.nav-chk:focus-visible + .nav-toggle { outline: 3px solid var(--accent); }

@media (max-width: 1180px) {
  .nav-toggle { display: inline-flex; }
  .nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--navy); border-top: 1px solid rgba(255, 255, 255, .12); padding: .5rem 1rem 1rem; box-shadow: 0 14px 24px rgba(0, 0, 0, .25); }
  .nav-chk:checked ~ .nav { display: block; }
  .nav-chk:checked + .nav-toggle .nav-toggle__open { display: none; }
  .nav-chk:checked + .nav-toggle .nav-toggle__close { display: inline; }
  .nav ul { flex-direction: column; gap: .2rem; }
  .nav a { padding: .8rem .9rem; font-size: 1.05rem; }
}

@media (max-width: 520px) {
  .bar { gap: .5rem; }
  .brand__t small { display: none; }
  .brand__logo { width: 36px; height: 36px; }
  .lang a { padding: .3rem .5rem; }
  .nav-toggle { padding: .45rem; }
}

/* ---------- Hero ---------- */
.hero { background: radial-gradient(700px 320px at 85% -10%, rgba(232, 185, 50, .22), transparent 60%), linear-gradient(165deg, #0e2840 0%, #17405f 62%, #1c4b70 100%); color: #fff; overflow: hidden; }
.hero__in { display: grid; grid-template-columns: 1fr 1.05fr; gap: 2rem; align-items: end; padding-top: 3.2rem; }
.hero__text { padding-bottom: 3.2rem; }
.hero h1 { color: #fff; margin-bottom: .5em; max-width: 14ch; }
.hero .eyebrow { color: var(--accent); }
.hero .lead { color: #d3e0ec; max-width: 34em; }
.hero__visual { align-self: end; margin-bottom: -2px; }
.hero__art { display: block; width: 100%; height: auto; }
.hero__photo { display: block; width: 100%; height: auto; aspect-ratio: 760 / 480; object-fit: cover; border-radius: 16px 16px 0 0; }
.eyebrow { font-size: .82rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin: 0 0 .6rem; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 44em; }
.btns { display: flex; flex-wrap: wrap; gap: .7rem; margin: 0 0 1.2rem; }
.hero .btns { margin-top: 1.6rem; }

@media (max-width: 860px) {
  .hero__in { grid-template-columns: 1fr; padding-top: 2.2rem; gap: 0; }
  .hero__text { padding-bottom: 1.6rem; }
  .hero h1 { max-width: none; }
}

/* ---------- Page head ---------- */
.page-head { background: linear-gradient(165deg, #0e2840 0%, #17405f 100%); color: #fff; padding: 2.6rem 0 2.4rem; }
.page-head h1 { color: #fff; margin-bottom: .3em; }
.page-head .eyebrow { color: var(--accent); }
.page-head .lead { color: #d3e0ec; margin: 0; }

/* ---------- Meelespea ---------- */
.remind { background: var(--accent); color: var(--accent-ink); }
.remind a { color: inherit; font-weight: 700; }
.remind__in { display: flex; align-items: center; gap: 1.1rem; padding: 1rem 0; }
.remind__ic { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border-radius: 50%; background: rgba(43, 32, 0, .12); flex: none; }
.remind__ic .i { width: 1.5rem; height: 1.5rem; }
.remind__t { display: grid; gap: .1rem; flex: 1; line-height: 1.4; }
.remind__t b { font-size: 1.08rem; }
.remind__d { display: grid; text-align: right; line-height: 1.2; flex: none; padding-left: 1rem; border-left: 1px solid rgba(43, 32, 0, .25); }
.remind__d small { opacity: .8; }
.remind__d b { font-size: 1.35rem; }
.remind__d span { font-size: .85rem; font-weight: 600; }
@media (max-width: 760px) {
  .remind__in { flex-wrap: wrap; }
  .remind__d { text-align: left; border-left: 0; padding-left: 0; flex: 1 1 100%; grid-auto-flow: column; justify-content: start; align-items: baseline; gap: .6rem; }
}

/* ---------- Ruudustik ---------- */
.grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 2rem; align-items: start; }
.grid__side { display: grid; gap: 1.2rem; }
@media (max-width: 960px) { .grid { grid-template-columns: 1fr; } }

.sec-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .3rem; }
.sec-head h2 { display: flex; align-items: center; gap: .55rem; margin: 0; }
.sec-head h2 .i { color: var(--link); }
.sec-sub { margin: .2rem 0 1.2rem; }
.grid__main .sec-head:not(:first-child) { margin-top: 2.4rem; margin-bottom: 1rem; }

/* ---------- Kaardid ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.25rem 1.35rem; box-shadow: var(--sh); margin-bottom: 1.2rem; }
.grid__side .card { margin-bottom: 0; }
.card__h { display: flex; align-items: center; gap: .55rem; font-size: 1.15rem; margin: 0 0 .8rem; }
.card__h .i { color: var(--link); }
.card--cta { background: linear-gradient(160deg, var(--navy), var(--navy-2)); color: #fff; border: 0; }
.card--cta .card__h, .card--cta .card__h .i { color: #fff; }
.card--lock { border-top: 4px solid var(--accent); }
.card--success { border-top: 4px solid var(--ok); background: var(--ok-bg); }
.card--note { background: var(--surface-2); box-shadow: none; }
.card--meeting { border-top: 4px solid var(--accent); }
.meeting__date { display: grid; margin: 0 0 .5rem; line-height: 1.25; }
.meeting__date b { font-size: 1.45rem; }
.meeting__date span { color: var(--muted); text-transform: capitalize; }
.meeting__place { display: flex; gap: .4rem; align-items: baseline; }

.quick { list-style: none; padding: 0; margin: 0; display: grid; gap: .45rem; }
.quick a { display: flex; align-items: center; gap: .8rem; padding: .7rem .8rem; border-radius: 11px; text-decoration: none; color: inherit; background: var(--surface-2); border: 1px solid var(--line); transition: transform .12s, border-color .12s; }
.quick a:hover { border-color: var(--link); transform: translateX(2px); }
.quick .i { width: 1.5rem; height: 1.5rem; color: var(--link); }
.quick span { display: grid; line-height: 1.25; }
.quick small { color: var(--muted); }

.people { list-style: none; padding: 0; margin: 0 0 .8rem; display: grid; gap: .9rem; }
.people li { display: grid; line-height: 1.3; }
.people__tel { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; margin-top: .15rem; }
.link-arrow { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; }
.link-arrow:hover { text-decoration: underline; }

.callout { display: flex; gap: .7rem; align-items: flex-start; padding: .85rem 1rem; border-radius: 11px; margin: 1rem 0 0; font-size: .96rem; line-height: 1.45; }
.callout .i { margin-top: .15em; }
.callout--info { background: var(--info-bg); color: var(--ink); }
.callout--info .i { color: var(--info); }
.callout--alert { background: var(--warn-bg); color: var(--ink); }
.callout--alert .i { color: var(--warn); }

.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; margin: 0 0 1.2rem; }
.facts > div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .9rem 1rem; }
.facts dt { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; margin-bottom: .2rem; }
.facts dd { margin: 0; font-weight: 600; }

/* ---------- Teadaanded ---------- */
.chips { display: flex; flex-wrap: wrap; gap: .5rem; margin: 0 0 1.1rem; }
.chip { font: inherit; font-size: .93rem; font-weight: 600; padding: .45rem .95rem; border-radius: 99px; border: 1px solid var(--line-2); background: var(--surface); color: var(--ink); cursor: pointer; }
.chip:hover { border-color: var(--link); }
.chip.is-on { background: var(--navy); border-color: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .chip.is-on { background: var(--btn); border-color: var(--btn); } }

.anns { display: grid; gap: 1rem; }
.ann { --c: var(--info); background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--c); border-radius: var(--r); padding: 1.1rem 1.3rem 1.2rem; box-shadow: var(--sh); }
.ann--oluline { --c: var(--bad); }
.ann--probleem { --c: #d9822b; }
.ann--koosolek { --c: var(--ok); }
.ann--hooldus { --c: #2a8a8a; }
.ann.is-resolved { opacity: .8; }
.ann[hidden] { display: none; }
.ann__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; margin-bottom: .55rem; font-size: .88rem; color: var(--muted); }
.ann__meta time { margin-left: auto; }
.ann__title { margin: 0 0 .4rem; font-size: 1.28rem; }
.badge { display: inline-flex; align-items: center; gap: .35rem; font-size: .8rem; font-weight: 700; padding: .22rem .65rem; border-radius: 99px; background: var(--info-bg); color: var(--info); }
.badge--oluline { background: var(--bad-bg); color: var(--bad); }
.badge--probleem { background: var(--warn-bg); color: var(--warn); }
.badge--koosolek, .badge--ok { background: var(--ok-bg); color: var(--ok); }
.badge--hooldus { background: #dff1f1; color: #176363; }
.badge--pin, .badge--muted { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
@media (prefers-color-scheme: dark) { .badge--hooldus { background: #10383a; color: #7fd3d3; } }

.prose > :last-child { margin-bottom: 0; }
.prose h4 { font-size: 1.05rem; margin: 1em 0 .3em; }
.prose h2 { margin-top: 2em; padding-bottom: .4em; border-bottom: 2px solid var(--line); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose--lead { font-size: 1.08rem; margin-bottom: 1rem; }
.files { list-style: none; padding: 0; margin: .9rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem; }
.file { display: inline-flex; align-items: center; gap: .45rem; padding: .4rem .8rem; border-radius: 9px; border: 1px solid var(--line-2); background: var(--surface-2); color: inherit; text-decoration: none; font-size: .93rem; font-weight: 600; }
.file:hover { border-color: var(--link); }
.file small { color: var(--muted); font-weight: 500; }

/* ---------- Dokumendid ---------- */
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.doc__link { display: flex; align-items: center; gap: .85rem; padding: .75rem .9rem; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); color: inherit; text-decoration: none; }
.doc__link:hover { border-color: var(--link); }
.doc__ic { display: grid; place-items: center; width: 2.4rem; height: 2.4rem; border-radius: 10px; background: var(--info-bg); color: var(--info); flex: none; }
.doc__t { display: grid; line-height: 1.3; flex: 1; min-width: 0; }
.doc__t b { overflow-wrap: anywhere; }
.doc__t small { color: var(--muted); }
.doc__dl { color: var(--muted); }

/* ---------- Kodukord ---------- */
.hl { list-style: none; display: grid; grid-template-columns: repeat(auto-fit, minmax(210px, 1fr)); gap: .9rem; padding: 0; margin: 0 0 2rem; }
.hl li { background: var(--surface); border: 1px solid var(--line); border-top: 4px solid var(--accent); border-radius: 12px; padding: .9rem 1rem; display: grid; gap: .15rem; box-shadow: var(--sh); }
.hl small { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); font-size: .76rem; }
.hl b { font-size: 1.15rem; line-height: 1.25; }
.hl span { color: var(--muted); font-size: .88rem; }
.doc-layout { display: grid; grid-template-columns: 250px minmax(0, 1fr); gap: 2.5rem; align-items: start; }
.toc { position: sticky; top: 88px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.1rem 1.2rem; }
.toc__h { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); margin-bottom: .6rem; }
.toc ol { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .1rem; counter-reset: t; }
.toc li { counter-increment: t; }
.toc a { display: flex; gap: .55rem; text-decoration: none; color: inherit; padding: .4rem .5rem; border-radius: 8px; line-height: 1.3; font-size: .94rem; }
.toc a::before { content: counter(t); font-weight: 800; color: var(--link); min-width: 1ch; }
.toc a:hover { background: var(--surface-2); }
.prose--doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem 1.8rem; box-shadow: var(--sh); }
.prose--doc h2 { font-size: 1.3rem; }
.rule { display: grid; grid-template-columns: 3.4rem minmax(0, 1fr); gap: .4rem; padding: .5rem 0; margin: 0; border-bottom: 1px solid var(--line); }
.rule:last-of-type { border-bottom: 0; }
.rule__n { color: var(--link); font-variant-numeric: tabular-nums; }
.adopted { display: flex; align-items: center; gap: .5rem; margin-top: 1.6rem !important; padding: .8rem 1rem; background: var(--ok-bg); color: var(--ok); border-radius: 11px; font-weight: 600; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 1.2rem; }
  .toc { position: static; }
  .toc ol { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
  .prose--doc { padding: 1.2rem 1.1rem; }
}

/* ---------- Rekonstrueerimine ---------- */
.card--status { border-top: 4px solid var(--accent); }
.status__top { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: .9rem; }
.status__now { display: block; font-size: 1.5rem; line-height: 1.2; }
.status__n { text-align: right; }
.status__n b { font-size: 2.2rem; line-height: 1; color: var(--link); }
.status__n span { color: var(--muted); margin-left: .3rem; }
.status__dec { display: flex; gap: .4rem; align-items: center; margin: .9rem 0 0; }
.bar-progress { width: 100%; height: 12px; border: 0; border-radius: 99px; overflow: hidden; background: var(--line); appearance: none; -webkit-appearance: none; display: block; }
.bar-progress::-webkit-progress-bar { background: var(--line); }
.bar-progress::-webkit-progress-value { background: linear-gradient(90deg, var(--ok), var(--accent)); border-radius: 99px; }
.bar-progress::-moz-progress-bar { background: linear-gradient(90deg, var(--ok), var(--accent)); border-radius: 99px; }
.steps-tl { list-style: none; padding: 0; margin: 0; position: relative; }
.tl { position: relative; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); gap: 1rem; padding-bottom: 1.4rem; }
.tl:not(:last-child)::before { content: ""; position: absolute; left: 1.05rem; top: 2.2rem; bottom: 0; width: 2px; background: var(--line-2); }
.tl__dot { width: 2.2rem; height: 2.2rem; border-radius: 50%; border: 2px solid var(--line-2); background: var(--surface); display: grid; place-items: center; z-index: 1; }
.tl--done .tl__dot { background: var(--ok); border-color: var(--ok); color: #fff; }
.tl--done:not(:last-child)::before { background: var(--ok); }
.tl--doing .tl__dot { border-color: var(--accent); background: var(--accent); box-shadow: 0 0 0 5px rgba(232, 185, 50, .28); }
.tl__body { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: .8rem 1rem; }
.tl--doing .tl__body { border-color: var(--accent); }
.tl__top { display: flex; align-items: center; justify-content: space-between; gap: .8rem; flex-wrap: wrap; margin-bottom: .2rem; }
.tl__body p { margin: 0 0 .3rem; color: var(--muted); }
.pill { display: inline-block; font-size: .76rem; font-weight: 700; padding: .15rem .6rem; border-radius: 99px; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }
.pill--done { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.pill--doing { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.updates { display: grid; gap: 1rem; }
.upd { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1.1rem 1.3rem; box-shadow: var(--sh); }
.upd time { color: var(--muted); font-size: .88rem; font-weight: 600; }
.upd h3 { margin: .15rem 0 .4rem; }

/* ---------- Nupud ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; padding: .7rem 1.15rem; border-radius: 10px; border: 1px solid transparent; font: inherit; font-weight: 650; text-decoration: none; cursor: pointer; line-height: 1.2; transition: transform .1s, filter .1s; }
.btn:hover { filter: brightness(1.08); text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--btn); color: var(--btn-ink); }
.card--cta .btn--primary { background: var(--accent); color: var(--accent-ink); }
.btn--accent { background: var(--accent); color: var(--accent-ink); }
.btn--ghost { background: transparent; border-color: var(--line-2); color: inherit; }
.hero .btn--ghost, .card--cta .btn--ghost { border-color: rgba(255, 255, 255, .45); color: #fff; }
.btn--danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn--sm { padding: .42rem .75rem; font-size: .9rem; }
.btn--lg { padding: .9rem 1.5rem; font-size: 1.08rem; }
.linkbtn { background: none; border: 0; font: inherit; color: var(--link); cursor: pointer; padding: .3rem 0; display: inline-flex; gap: .4rem; align-items: center; text-decoration: underline; text-underline-offset: 3px; }
.lock-row { margin: -.3rem 0 1.2rem; }

/* ---------- Vormid ---------- */
.form { display: grid; gap: 1rem; }
.form--wide { max-width: 860px; }
.form__h { font-size: 1.1rem; margin: .6rem 0 0; }
.field { display: grid; gap: .35rem; }
.field > span { font-weight: 650; font-size: .95rem; display: flex; align-items: center; gap: .4rem; }
.field > span .i { color: var(--link); }
input, select, textarea { font: inherit; color: var(--ink); background: var(--surface); border: 1px solid var(--line-2); border-radius: 10px; padding: .65rem .8rem; min-height: 46px; width: 100%; }
textarea { resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: 3px solid rgba(23, 89, 138, .35); border-color: var(--link); }
input[type="checkbox"] { width: 1.15rem; height: 1.15rem; min-height: 0; margin-top: .25rem; accent-color: var(--btn); }
input[type="file"] { padding: .5rem; background: var(--surface-2); }
.hint { color: var(--muted); font-size: .88rem; }
.row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.row3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
@media (max-width: 640px) { .row2, .row3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: .7rem; align-items: flex-start; cursor: pointer; }
.check span { display: grid; line-height: 1.3; }
.check small { color: var(--muted); }
.checks-col { display: grid; gap: .8rem; margin: 1rem 0; }
.attach { border: 1px dashed var(--line-2); border-radius: 12px; padding: .8rem 1rem 1rem; margin: 1rem 0 0; display: grid; gap: .8rem; }
.attach legend { padding: 0 .4rem; font-weight: 650; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: .8rem 1rem; border-radius: 11px; margin: 0 0 1rem; font-weight: 600; }
.notice--ok { background: var(--ok-bg); color: var(--ok); }
.notice--error { background: var(--bad-bg); color: var(--bad); }
.steps { padding-left: 1.4em; }
.steps li { margin-bottom: .5rem; }

/* ---------- Jalus ---------- */
.site-footer { background: var(--navy); color: #cfdbe7; margin-top: 2rem; }
.site-footer a { color: #fff; }
.foot { display: grid; grid-template-columns: 1.3fr 1.3fr 1fr; gap: 2rem; padding: 2.4rem 0 1.6rem; }
.foot__h { display: block; color: #fff; margin-bottom: .5rem; }
.foot p { margin: 0; }
.plain { list-style: none; padding: 0; margin: 0; display: grid; gap: .3rem; }
.foot__bar { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; padding: 1rem 0 1.4rem; border-top: 1px solid rgba(255, 255, 255, .14); font-size: .9rem; }
@media (max-width: 760px) { .foot { grid-template-columns: 1fr; gap: 1.2rem; } }

/* ---------- Admin ---------- */
body.admin { background: var(--bg); }
.adm-top { display: flex; align-items: center; justify-content: space-between; gap: 1rem; background: var(--navy); color: #fff; padding: .6rem 1.2rem; position: sticky; top: 0; z-index: 40; }
.adm-top__r { display: flex; gap: .6rem; align-items: center; }
.adm-top .btn--ghost { border-color: rgba(255, 255, 255, .4); color: #fff; }
.adm-shell { display: grid; grid-template-columns: 230px minmax(0, 1fr); min-height: calc(100vh - 56px); }
.adm-nav { background: var(--surface); border-right: 1px solid var(--line); padding: 1rem .7rem; position: sticky; top: 56px; align-self: start; height: calc(100vh - 56px); }
.adm-nav ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .2rem; }
.adm-nav a { display: flex; align-items: center; gap: .65rem; padding: .6rem .75rem; border-radius: 9px; color: inherit; text-decoration: none; font-weight: 600; }
.adm-nav a:hover { background: var(--surface-2); }
.adm-nav a[aria-current="page"] { background: var(--navy); color: #fff; }
@media (prefers-color-scheme: dark) { .adm-nav a[aria-current="page"] { background: var(--btn); } }
.adm-nav .count { margin-left: auto; font-style: normal; font-size: .78rem; background: var(--bad); color: #fff; border-radius: 99px; padding: .05rem .5rem; }
.adm-main { padding: 1.6rem clamp(1rem, 3vw, 2.4rem) 3rem; min-width: 0; }
.adm-h1 { font-size: 1.7rem; margin-bottom: 1rem; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 1rem; margin-bottom: 1.3rem; }
.stat { display: grid; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem 1.2rem; text-decoration: none; color: inherit; box-shadow: var(--sh); }
.stat b { font-size: 2.1rem; line-height: 1.1; }
.stat b small { font-size: 1.05rem; color: var(--muted); font-weight: 600; }
.stat span { color: var(--muted); font-size: .92rem; }
.stat:hover { border-color: var(--link); }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: .1rem; }
.checks li { display: flex; align-items: center; gap: .6rem; padding: .5rem .2rem; border-bottom: 1px solid var(--line); }
.checks li:last-child { border-bottom: 0; }
.checks b { margin-left: auto; font-weight: 600; color: var(--muted); text-align: right; overflow-wrap: anywhere; }
.checks .is-ok .i { color: var(--ok); }
.checks .is-bad .i { color: var(--bad); }
.table-wrap { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--sh); margin-bottom: 1.2rem; }
.table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.table th, .table td { padding: .65rem .8rem; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table thead th { background: var(--surface-2); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.table tr:last-child td, .table tr:last-child th { border-bottom: 0; }
.t-act { display: flex; gap: .4rem; justify-content: flex-end; flex-wrap: wrap; }
.t-act form { margin: 0; }
.table--readings input { min-height: 38px; padding: .35rem .5rem; }
.table--readings .num { max-width: 120px; text-align: right; font-variant-numeric: tabular-nums; }
.table--readings tr.is-empty th { color: var(--muted); font-weight: 500; }
.table--readings tr.is-flag { background: var(--warn-bg); }
.table--readings th[scope="row"] { width: 4.5rem; }
.flag { color: var(--warn); }
.toolbar { display: flex; flex-wrap: wrap; gap: .7rem; align-items: flex-end; margin-bottom: 1rem; }
.field--inline { min-width: 220px; }
.tabs { display: flex; gap: .3rem; border-bottom: 2px solid var(--line); margin: 1rem 0 1.4rem; flex-wrap: wrap; }
.tab { padding: .6rem 1rem; text-decoration: none; color: var(--muted); font-weight: 650; border-bottom: 3px solid transparent; margin-bottom: -2px; }
.tab[aria-current="page"] { color: var(--ink); border-color: var(--accent); }
.ph-list { list-style: none; padding: 0; margin: 0 0 1rem; display: grid; gap: .8rem; }
.ph-row { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr) auto; gap: 1rem; align-items: end; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 1rem; }
.ph-row__main, .ph-row__side { display: grid; gap: .6rem; }
.ph-row__act { display: flex; flex-direction: column; gap: .4rem; }
@media (max-width: 860px) { .ph-row { grid-template-columns: 1fr; } .ph-row__act { flex-direction: row; } }
.msgs { display: grid; gap: 1rem; max-width: 820px; }
.msg.is-new { border-left: 5px solid var(--accent); }
.msg__meta { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .5rem; }
.msg__body { white-space: normal; overflow-wrap: anywhere; }
.cards-col { display: grid; gap: 1.2rem; max-width: 860px; }
.cards-col .card { margin: 0; }
.thumb { border-radius: 10px; border: 1px solid var(--line); height: auto; }
@media (max-width: 880px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-nav { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: .5rem; overflow-x: auto; }
  .adm-nav ul { display: flex; }
  .adm-nav a { white-space: nowrap; }
}

/* ---------- Print ---------- */
@media print {
  .site-header, .site-footer, .toc, .remind, .skip, .btn, .hero { display: none !important; }
  body { background: #fff; color: #000; font-size: 11pt; }
  .page-head { background: none; color: #000; padding: 0 0 1rem; }
  .page-head h1, .page-head .lead, .page-head .eyebrow { color: #000; }
  .prose--doc { border: 0; box-shadow: none; padding: 0; }
  .doc-layout { display: block; }
  .hl li { box-shadow: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
