/* elektriplaan.ee — ühine stiil plaanile ja kilbile. Joonis on alati valgel paberil. */
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-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; }
@font-face { font-family: 'Archivo'; font-style: normal; font-weight: 100 900; font-stretch: 62% 125%; font-display: swap; src: url(fonts/archivo-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: 'Spline Sans Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/spline-mono-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; }
@font-face { font-family: 'Spline Sans Mono'; font-style: normal; font-weight: 400 600; font-display: swap; src: url(fonts/spline-mono-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; }

:root {
  color-scheme: light;
  --bg: #EEF0EC;
  --paper: #FFFFFF;
  --ink: #15191E;
  --ink2: #3A424C;
  --muted: #687280;
  --line: #DEE1DC;
  --line2: #C7CCC5;
  --soft: #F6F7F4;
  --volt: #FFC21A;
  --volt-d: #C98F00;
  --volt-s: #FFF4CF;
  --blue: #2563EB;
  --blue-s: #E8EFFE;
  --red: #DC2626;
  --amber: #D97706;
  --green: #15803D;
  --hdr: #11151A;
  --hdr2: #1B2129;
  --f: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --m: 'Spline Sans Mono', ui-monospace, Consolas, monospace;
  --r: 10px;
  --hdr-h: 58px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--f); font-size: 15px; line-height: 1.45; color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: inherit; }
[hidden] { display: none !important; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.ic { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.ic-sm { width: 14px; height: 14px; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 50; background: var(--paper); padding: 8px 12px; border-radius: 8px; }
.skip:focus { left: 8px; }

/* näidise riba */

/* päis */
.hdr { position: sticky; top: 0; z-index: 30; background: var(--hdr); color: #E9ECEF; height: var(--hdr-h); border-bottom: 1px solid #000; }
.hdr__in { height: 100%; display: flex; align-items: center; gap: 18px; padding: 0 16px; max-width: 1600px; margin: 0 auto; }
.logo { display: flex; align-items: center; gap: 10px; text-decoration: none; color: #fff; flex: none; }
/* logo = ainult kiri (founder 2026-11-01: elektriplaan.ee, märgita): „elektri“ valge, „plaan“ kollane, „.ee“ hall */
.logo__txt { font-weight: 850; font-stretch: 112%; letter-spacing: -.015em; font-size: 22px; line-height: 1; white-space: nowrap; }
.logo__txt span { color: var(--volt); }
.logo__txt i { font-style: normal; font-weight: 600; color: #8B95A1; }
.tabs { display: flex; gap: 4px; background: var(--hdr2); padding: 4px; border-radius: 10px; }
.tabs a { text-decoration: none; padding: 6px 14px; border-radius: 7px; font-weight: 650; font-size: 14px; color: #B9C0C8; display: flex; align-items: center; gap: 7px; }
.tabs a:hover { color: #fff; }
.tabs a[aria-current="page"] { background: #fff; color: var(--ink); }
.tabs .nr { font-family: var(--m); font-size: 11px; color: var(--muted); }
.tabs a[aria-current="page"] .nr { color: var(--muted); }
.hdr__act { margin-left: auto; display: flex; gap: 8px; align-items: center; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2); background: var(--paper); color: var(--ink); border-radius: 9px; padding: 8px 14px; font-weight: 650; font-size: 14px; line-height: 1.2; text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .1s; }
.btn:hover { border-color: var(--ink2); }
.btn:active { transform: translateY(1px); }
.btn--volt { background: var(--volt); border-color: var(--volt); color: var(--ink); }
.btn--volt:hover { background: #FFCF3F; border-color: #FFCF3F; }
.btn--dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn--dark:hover { background: #262C33; }
.btn--ghost { background: transparent; border-color: #3A434D; color: #E9ECEF; }
.btn--ghost:hover { border-color: #8A939D; }
.btn--lg { padding: 12px 20px; font-size: 15.5px; border-radius: 11px; }
.btn--sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn--danger { color: var(--red); }
.btn[disabled] { opacity: .45; pointer-events: none; }

/* menüü */
.menu { position: relative; }
.menu__list { position: absolute; right: 0; top: calc(100% + 8px); width: 300px; background: var(--paper); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 40px rgba(10, 14, 20, .22); padding: 6px; z-index: 40; }
.menu__list button { display: grid; gap: 1px; width: 100%; text-align: left; border: 0; background: none; padding: 9px 11px; border-radius: 8px; }
.menu__list button:hover { background: var(--soft); }
.menu__list strong { font-weight: 700; font-size: 14px; display: flex; gap: 8px; align-items: center; }
.menu__list span { font-size: 12.5px; color: var(--muted); }
.menu__list hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }
.menu__list .danger strong { color: var(--red); }
.chip { font-family: var(--m); font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: var(--soft); border: 1px solid var(--line); color: var(--ink2); font-weight: 600; }

/* ---------- plaani rakendus ---------- */
.app { display: grid; grid-template-columns: 208px minmax(0, 1fr) 330px; height: calc(100vh - var(--hdr-h)); height: calc(100dvh - var(--hdr-h)); min-height: 560px; }
/* seadmete menüü: otsing, viimati kasutatud, kategooriad (kokku/lahti), valitud seadme andmed */
.pal { background: var(--paper); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; user-select: none; -webkit-user-select: none; }
.pal__top { padding: 10px 10px 8px; border-bottom: 1px solid var(--line); display: grid; gap: 8px; }
.pal__otsi { display: flex; align-items: center; gap: 7px; border: 1px solid var(--line2); border-radius: 9px; padding: 0 8px; background: var(--soft); color: var(--muted); cursor: text; }
.pal__otsi:focus-within { border-color: var(--ink2); background: #fff; color: var(--ink); }
.pal__otsi input { flex: 1; min-width: 0; border: 0; background: none; padding: 7px 0; font-size: 13.5px; outline: none; user-select: text; }
.pal__otsi input::-webkit-search-cancel-button { cursor: pointer; }
.pal__otsi kbd { font-family: var(--m); font-size: 10px; border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.pal__otsi:focus-within kbd { display: none; }
.pal__viim { display: flex; gap: 4px; flex-wrap: wrap; }
.pal__v { width: 38px; height: 38px; display: grid; place-items: center; border: 1px solid var(--line); background: var(--paper); border-radius: 9px; padding: 0; }
.pal__v:hover { border-color: var(--ink2); }
.pal__v svg { width: 26px; height: 26px; }
.pal__list { flex: 1; min-height: 0; overflow: auto; padding: 2px 10px 14px; }
.pal__list h2 { margin: 0; font-size: inherit; }
.pal__kat { display: flex; align-items: center; gap: 6px; width: 100%; border: 0; background: none; padding: 12px 4px 5px; font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 700; text-align: left; border-radius: 6px; }
.pal__kat:hover { color: var(--ink); }
.pal__kat .ic { transition: transform .15s; }
.pal__kat .n { margin-left: auto; font-family: var(--m); letter-spacing: 0; font-weight: 600; }
.pal__grid { display: grid; gap: 2px; }
.pal__s { position: relative; display: grid; grid-template-columns: 30px minmax(0, 1fr); align-items: center; gap: 9px; width: 100%; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 6px; text-align: left; font-size: 13.2px; font-weight: 550; line-height: 1.2; cursor: grab; }
.pal__s:hover { background: var(--soft); }
.pal__s svg { width: 30px; height: 30px; }
.pal__nm { overflow-wrap: break-word; }
/* mitu tükki plaanil — märk ikooni nurgas */
.pal__n { position: absolute; left: 25px; top: 1px; font-family: var(--m); font-size: 10px; font-weight: 600; line-height: 15px; color: #fff; background: var(--ink2); border-radius: 8px; padding: 0 4px; min-width: 16px; text-align: center; box-shadow: 0 0 0 2px var(--paper); }
.pal__s[aria-pressed="true"], .pal__v[aria-pressed="true"] { background: var(--volt-s); border-color: var(--volt); }
.pal__tyhi { margin: 14px 4px; font-size: 13px; color: var(--muted); }
.pal__info { display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 10px; border-top: 1px solid #F3D57A; background: var(--volt-s); }
.pal__info > svg { width: 40px; height: 40px; background: #fff; border-radius: 9px; border: 1px solid #F3D57A; }
.pal__info b { display: block; font-size: 13.5px; line-height: 1.2; }
.pal__info small { display: block; font-size: 12px; color: var(--ink2); margin-top: 2px; }
.pal__x { border: 0; background: none; padding: 4px; border-radius: 6px; display: grid; place-items: center; color: var(--ink2); }
.pal__x:hover { background: #fff; }
@media (min-width: 901px) {
  .pal section.kinni .pal__grid { display: none; }
  .pal section.kinni .pal__kat .ic { transform: rotate(-90deg); }
  .pal__list.otsing section.kinni .pal__grid { display: grid; }
}
.pal-lohe { position: fixed; left: 0; top: 0; z-index: 70; pointer-events: none; width: 46px; height: 46px; margin: -23px 0 0 -23px; display: grid; place-items: center; background: #fff; border: 1px solid var(--volt); border-radius: 11px; box-shadow: 0 10px 24px rgba(0, 0, 0, .18); }
.pal-lohe svg { width: 34px; height: 34px; }
body.pal-drag, body.pal-drag * { cursor: grabbing !important; user-select: none; }

/* paigutamine: joondusjooned, mõõdud seinte ja nurkadeni, keelatud koht */
.ep-w .juhend { pointer-events: none; }
.ep-w .juh { stroke: #DB2777; stroke-width: 1px; stroke-dasharray: 5 4; vector-effect: non-scaling-stroke; fill: none; }
.ep-w .seinhl { stroke: #2563EB; stroke-width: 5px; stroke-linecap: round; vector-effect: non-scaling-stroke; opacity: .28; }
.ep-w .mt line { stroke: #2563EB; stroke-width: 1px; vector-effect: non-scaling-stroke; }
.ep-w .mt text { font-family: var(--m); font-weight: 600; fill: #1D4ED8; text-anchor: middle; dominant-baseline: central; paint-order: stroke; stroke: #fff; stroke-linejoin: round; }
.ep-w .mt.kesk text { fill: #BE185D; }
.ep-w .dev.ghost.bad :is(line, circle, path, rect, polygon, polyline) { stroke: #DC2626; }
.ep-w .dev.ghost.warn :is(line, circle, path, rect, polygon, polyline) { stroke: #D97706; }
.ep-w .dev.ghost { opacity: .7; }

/* lukk tasulistel nuppudel (näidiskorteriga) */
.lukk { display: none; opacity: .7; }
body.lukus .lukk { display: inline-block; }
.taisv.on { border-color: #2E6B47; color: #B9F5CE; }
.taisv.on svg { color: #4ADE80; }

.stage { position: relative; display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tools { display: flex; align-items: center; gap: 6px; padding: 8px 10px; background: var(--paper); border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.tools::-webkit-scrollbar { display: none; }
.tools .sep { width: 1px; height: 24px; background: var(--line); flex: none; margin: 0 2px; }
.tool { display: inline-flex; align-items: center; gap: 6px; border: 1px solid transparent; background: none; padding: 6px 9px; border-radius: 8px; font-size: 13.5px; font-weight: 600; white-space: nowrap; color: var(--ink2); }
.tool:hover { background: var(--soft); color: var(--ink); }
.tool[aria-pressed="true"] { background: var(--ink); color: #fff; }
.tool--icon { padding: 6px; }
.tool kbd { font-family: var(--m); font-size: 10px; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 0 4px; }
.tool[aria-pressed="true"] kbd { color: #B9C0C8; border-color: #444C55; }
.tool[disabled] { opacity: .35; pointer-events: none; }
.kihid { position: relative; margin-left: auto; }
.kihid .menu__list { width: 230px; padding: 8px; }
.kihid label { display: flex; gap: 9px; align-items: center; padding: 6px 6px; font-size: 13.5px; border-radius: 6px; cursor: pointer; }
.kihid label:hover { background: var(--soft); }
.kihid input { accent-color: var(--ink); width: 16px; height: 16px; }

.canvas { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #E6E8E3; background-image: radial-gradient(circle, #CDD1CB 1px, transparent 1.2px); background-size: 22px 22px; touch-action: none; user-select: none; -webkit-user-select: none; }
.canvas > svg { display: block; width: 100%; height: 100%; }
.canvas:focus { outline: none; }
.canvas.t-vali { cursor: default; }
.canvas.t-vali.over-dev { cursor: pointer; }
.canvas.panning { cursor: grabbing !important; }
.canvas.t-ruum, .canvas.t-nurk, .canvas.t-mootkava, .canvas.t-paiguta { cursor: crosshair; }
.canvas.t-yhenda { cursor: alias; }
.paber { fill: #fff; filter: drop-shadow(0 1px 3px rgba(0, 0, 0, .12)); }
.hint { position: absolute; left: 12px; right: 12px; bottom: 12px; display: flex; justify-content: center; pointer-events: none; }
.hint span { pointer-events: auto; background: rgba(17, 21, 26, .92); color: #fff; padding: 9px 14px; border-radius: 10px; font-size: 13.5px; max-width: 640px; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); }
.hint span b { color: var(--volt); font-weight: 700; }
.hint:empty { display: none; }
.zoom { position: absolute; right: 12px; top: 12px; display: flex; flex-direction: column; background: var(--paper); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; box-shadow: 0 2px 8px rgba(0, 0, 0, .06); }
.zoom button { border: 0; background: none; padding: 8px; display: grid; place-items: center; }
.zoom button + button { border-top: 1px solid var(--line); }
.zoom button:hover { background: var(--soft); }
.scale-lbl { position: absolute; left: 12px; top: 12px; font-family: var(--m); font-size: 11px; background: rgba(255, 255, 255, .9); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; color: var(--ink2); pointer-events: none; }
.loading { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(238, 240, 236, .7); font-weight: 600; z-index: 5; }

.side { background: var(--soft); border-left: 1px solid var(--line); overflow: auto; padding: 12px; display: grid; gap: 12px; align-content: start; }
.card { background: var(--paper); border: 1px solid var(--line); border-radius: 12px; padding: 14px; min-width: 0; }
.card h2 { font-size: 14.5px; margin: 0 0 10px; font-weight: 750; display: flex; align-items: center; gap: 8px; }
.card h2 .chip { margin-left: auto; }
.card h3 { font-size: 13px; margin: 14px 0 6px; font-weight: 700; color: var(--ink2); }
.card p { margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--m); }

.prop-head { display: flex; gap: 10px; align-items: center; margin-bottom: 10px; }
.prop-head svg { width: 40px; height: 40px; flex: none; background: var(--soft); border-radius: 9px; border: 1px solid var(--line); }
.prop-head b { display: block; font-size: 15px; line-height: 1.2; }
.prop-head small { color: var(--muted); font-size: 12.5px; }
.fld { display: grid; gap: 4px; margin-bottom: 10px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
.fld input, .fld select { width: 100%; border: 1px solid var(--line2); border-radius: 8px; padding: 7px 9px; background: #fff; color: var(--ink); font-size: 14px; font-weight: 500; }
.fld input[type="range"] { padding: 0; accent-color: var(--ink); }
.fld .row { display: flex; gap: 8px; align-items: center; }
.fld .row output { font-family: var(--m); color: var(--ink); min-width: 44px; text-align: right; }
.fld2 { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.gchip { display: flex; gap: 10px; align-items: flex-start; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: 10px; margin: 6px 0 10px; }
.gchip .nr { width: 26px; height: 20px; border-radius: 10px; color: #fff; font-family: var(--m); font-weight: 600; font-size: 12px; display: grid; place-items: center; flex: none; margin-top: 1px; }
.gchip b { display: block; font-size: 13.5px; }
.gchip p { margin: 3px 0 0; font-size: 12.5px; color: var(--ink2); }
.links { list-style: none; margin: 4px 0 10px; padding: 0; display: grid; gap: 4px; }
.links li { display: flex; align-items: center; gap: 8px; font-size: 13.5px; background: var(--soft); border-radius: 8px; padding: 5px 6px 5px 10px; }
.links li span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.links button { border: 0; background: none; padding: 3px; border-radius: 6px; color: var(--muted); display: grid; place-items: center; }
.links button:hover { background: #fff; color: var(--red); }
.btns { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 4px; }

.steps { margin: 0; padding: 0; list-style: none; counter-reset: s; display: grid; gap: 8px; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 24px 1fr; gap: 8px; font-size: 13.5px; }
.steps li::before { content: counter(s); width: 22px; height: 22px; border-radius: 50%; background: var(--ink); color: #fff; font-size: 12px; font-weight: 700; display: grid; place-items: center; font-family: var(--m); }
.tip { display: flex; gap: 10px; background: var(--volt-s); border: 1px solid #F3D57A; border-radius: 10px; padding: 10px 12px; font-size: 13.5px; margin-bottom: 12px; }
.tip svg { color: var(--volt-d); margin-top: 1px; }

.glist { list-style: none; margin: 0; padding: 0; display: grid; gap: 2px; }
.glist button { display: grid; grid-template-columns: 30px 1fr auto; gap: 8px; align-items: center; width: 100%; border: 1px solid transparent; background: none; border-radius: 8px; padding: 5px 6px; text-align: left; }
.glist button:hover { background: var(--soft); }
.glist button[aria-pressed="true"] { background: var(--blue-s); border-color: #BFD0FB; }
.glist .nr { height: 20px; border-radius: 10px; color: #fff; font-family: var(--m); font-weight: 600; font-size: 12px; display: grid; place-items: center; }
.glist b { font-size: 13.2px; font-weight: 650; display: block; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist small { color: var(--muted); font-size: 11.5px; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.glist .k { font-family: var(--m); font-size: 11.5px; color: var(--ink2); }

.mlist { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.mlist li > * { display: flex; gap: 8px; align-items: flex-start; width: 100%; border: 0; background: none; text-align: left; padding: 6px; border-radius: 8px; font-size: 13px; }
.mlist button:hover { background: var(--soft); }
.mlist i { width: 8px; height: 8px; border-radius: 50%; flex: none; margin-top: 6px; background: var(--muted); }
.mlist .viga i { background: var(--red); }
.mlist .hoiatus i { background: var(--amber); }

.kilp-cta { display: grid; gap: 10px; text-decoration: none; background: var(--hdr); color: #fff; border-radius: 12px; padding: 14px; border: 1px solid #000; }
.kilp-cta:hover { background: #1A2027; }
.kilp-cta .mini { background: #2A3038; border-radius: 9px; padding: 8px; }
.kilp-cta .mini svg { display: block; width: 100%; height: auto; }
.kilp-cta b { font-size: 15px; display: flex; align-items: center; gap: 8px; }
.kilp-cta b svg { margin-left: auto; color: var(--volt); }
.kilp-cta span { font-size: 13px; color: #B9C0C8; font-family: var(--m); }

dialog.dlg { border: 0; border-radius: 14px; padding: 20px; width: min(420px, calc(100vw - 32px)); box-shadow: 0 30px 70px rgba(0, 0, 0, .35); }
dialog.dlg::backdrop { background: rgba(10, 14, 20, .45); }
dialog.dlg h2 { margin: 0 0 8px; font-size: 18px; }
dialog.dlg .btns { justify-content: flex-end; margin-top: 14px; }

/* täisversiooni aken — padding sisemisel kastil, et taustale klõps (dialog ise) sulgeks */
dialog.dlg--tasu { padding: 0; width: min(430px, calc(100vw - 32px)); max-height: calc(100dvh - 32px); overflow: auto; }
.tasu { position: relative; padding: 24px 22px 20px; }
.tasu h2 { font-size: 20px; font-weight: 800; font-stretch: 108%; padding-right: 28px; }
.tasu p { margin: 0 0 10px; }
.dlg__x { position: absolute; right: 10px; top: 10px; border: 0; background: none; padding: 6px; border-radius: 8px; display: grid; place-items: center; color: var(--muted); }
.dlg__x:hover { background: var(--soft); color: var(--ink); }
.tasu__ic { width: 42px; height: 42px; border-radius: 11px; background: var(--volt); color: var(--ink); display: grid; place-items: center; margin-bottom: 12px; }
.tasu__ic svg { width: 24px; height: 24px; fill: currentColor; }
.tasu__ic--ok { background: #DCFCE7; color: var(--green); }
.tasu__ic--ok svg { fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.tasu__pohjus { color: var(--ink2); }
.tasu__hind { display: flex; align-items: baseline; gap: 6px; margin: 4px 0 12px !important; }
.tasu__hind b { font-size: 34px; font-weight: 850; font-stretch: 110%; letter-spacing: -.01em; line-height: 1; }
.tasu__hind span { color: var(--muted); font-weight: 600; }
.tasu__list { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 6px; font-size: 14px; }
.tasu__list li { display: grid; grid-template-columns: 18px 1fr; gap: 8px; }
.tasu__list li::before { content: ''; width: 16px; height: 16px; margin-top: 2px; background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2315803D' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/14px no-repeat; }
#tasu-vorm { display: grid; gap: 4px; }
#tasu-vorm .btn { width: 100%; }
.tasu__viga { color: var(--red); font-size: 13.5px; font-weight: 600; }
.tasu__oma { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.linkbtn { display: block; margin: 14px auto 0; border: 0; background: none; padding: 4px; font-size: 13.5px; font-weight: 600; color: var(--ink2); text-decoration: underline; text-underline-offset: 3px; }
.linkbtn:hover { color: var(--ink); }
.btns--col { flex-direction: column; align-items: stretch; }
.btns--col .btn { width: 100%; }
.tasu-kast { display: grid; gap: 8px; background: var(--hdr); color: #E9ECEF; border-radius: 10px; padding: 12px; font-size: 13.5px; margin-bottom: 12px; }
.tasu-kast b { color: #fff; }
.tasu-kast .btn { justify-self: start; }
.taisv-rida { display: flex; align-items: center; gap: 8px; font-size: 13.5px; font-weight: 650; margin-bottom: 12px; padding: 6px 6px 6px 10px; background: #F0FDF4; border: 1px solid #BBF7D0; border-radius: 9px; }
.taisv-rida svg { color: var(--green); stroke-width: 3; }
.taisv-rida .btn { margin-left: auto; }

.toast { position: fixed; left: 50%; top: calc(var(--hdr-h) + 46px); transform: translateX(-50%); background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: 14px; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .25); max-width: calc(100vw - 32px); }

/* ---------- kilbi leht ---------- */
.kp { max-width: 1440px; margin: 0 auto; padding: 18px 16px 48px; display: grid; gap: 16px; }
.kp-top { display: flex; gap: 16px 24px; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; }
.kp-top h1 { margin: 0; font-size: clamp(26px, 3.4vw, 38px); font-weight: 850; font-stretch: 112%; letter-spacing: -.01em; line-height: 1.05; }
.kp-top p { margin: 6px 0 0; color: var(--ink2); max-width: 640px; }
.kp-top .act { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.stat { font-size: 13px; display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; border-radius: 8px; background: var(--paper); border: 1px solid var(--line); font-weight: 600; }
.stat i { width: 8px; height: 8px; border-radius: 50%; background: var(--green); }
.stat.vana i { background: var(--amber); }
.stat.puudu i { background: var(--muted); }
.kp-grid { display: grid; grid-template-columns: 360px minmax(0, 1fr); gap: 16px; align-items: start; }
.kp-left { display: grid; gap: 16px; }
.logi { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.logi li { display: grid; grid-template-columns: 20px 1fr; gap: 8px; align-items: start; }
.logi li::before { content: ''; width: 14px; height: 14px; margin-top: 2px; border-radius: 50%; border: 2px solid var(--line2); }
.logi li.ok::before { border-color: var(--green); background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center/9px no-repeat; }
.logi li.kaib::before { border-color: var(--volt-d); border-top-color: transparent; animation: kp-spin .7s linear infinite; }
.logi li.ootel { color: var(--muted); }
@keyframes kp-spin { to { transform: rotate(360deg); } }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: 13.5px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-family: var(--m); text-align: right; font-size: 13px; }
.kv dd b { font-family: var(--f); font-size: 15px; }
.faasid { display: grid; gap: 6px; margin-top: 12px; }
.faasid div { display: grid; grid-template-columns: 26px 1fr 64px; gap: 8px; align-items: center; font-size: 12.5px; font-family: var(--m); }
.faasid span { height: 9px; background: var(--soft); border-radius: 5px; overflow: hidden; border: 1px solid var(--line); }
.faasid span i { display: block; height: 100%; background: var(--ink); border-radius: 5px; transition: width .6s; }
.faasid em { font-style: normal; text-align: right; }
.seg { display: grid; grid-template-columns: 1fr 1fr; background: var(--soft); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 3px; }
.seg button { border: 0; background: none; border-radius: 7px; padding: 7px 6px; font-size: 13px; font-weight: 600; color: var(--ink2); }
.seg button[aria-pressed="true"] { background: var(--paper); color: var(--ink); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }
.sw { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; margin: 10px 0; cursor: pointer; }
.sw input { width: 17px; height: 17px; accent-color: var(--ink); margin-top: 1px; flex: none; }
.sw small { display: block; color: var(--muted); font-size: 12.5px; }

.board { position: relative; }
.board__wrap { background: repeating-linear-gradient(45deg, #F4F5F2 0 12px, #EFF1ED 12px 24px); border-radius: 10px; padding: clamp(10px, 2.4vw, 28px); display: grid; place-items: center; min-height: 380px; border: 1px solid var(--line); }
.board__wrap svg { width: 100%; max-width: 560px; height: auto; display: block; filter: drop-shadow(0 10px 22px rgba(20, 24, 30, .16)); }
.board__tyhi { text-align: center; color: var(--muted); max-width: 360px; }
.board__tyhi svg { width: 96px; height: auto; margin: 0 auto 10px; filter: none; opacity: .5; }
.kmod { cursor: pointer; }
.kmod:hover > rect:nth-of-type(2) { stroke: var(--blue); stroke-width: 1.2; }
.kmod.hl > rect:nth-of-type(2) { stroke: var(--blue); stroke-width: 1.6; }
.kmod .kang { transition: y .18s ease; }
.anim .kmod, .anim .kres { animation: kp-in .42s cubic-bezier(.2, .8, .3, 1.2) both; }
@keyframes kp-in { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: none; } }
.board__info { margin-top: 12px; min-height: 64px; }
.board__info .gchip { margin: 0; }

.tbl-wrap { overflow-x: auto; margin: 0 -14px; padding: 0 14px; }
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; min-width: 760px; }
.tbl th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; padding: 8px 8px; border-bottom: 1px solid var(--line2); white-space: nowrap; }
.tbl td { padding: 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.m { font-family: var(--m); font-size: 12.5px; white-space: nowrap; }
.tbl td.r, .tbl th.r { text-align: right; }
.tbl tr.hl td { background: var(--blue-s); }
.tbl tr.off td { color: var(--muted); }
.tbl tr.off .nr { opacity: .4; }
.tbl .nr { display: inline-grid; place-items: center; min-width: 26px; height: 20px; border-radius: 10px; color: #fff; font-family: var(--m); font-weight: 600; font-size: 12px; }
.tbl small { color: var(--muted); display: block; font-size: 12px; }
.tbl a { font-weight: 600; text-underline-offset: 2px; }
.warn { color: var(--amber); font-weight: 700; }
.skeem { overflow-x: auto; }
.skeem svg { display: block; min-width: 760px; width: 100%; height: auto; }
.mat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 6px 28px; }
.mat-grid h3 { grid-column: 1 / -1; margin: 10px 0 2px; }
.mat-grid h3:first-child { margin-top: 0; }
.mat-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; padding: 5px 0; border-bottom: 1px dashed var(--line); }
.mat-row span:last-child { font-family: var(--m); white-space: nowrap; }

/* ---------- telefon ---------- */
@media (max-width: 1180px) {
  .app { grid-template-columns: 190px minmax(0, 1fr) 290px; }
}
@media (max-width: 980px) {
  .kp-grid { grid-template-columns: minmax(0, 1fr); }
  .kp-left { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
}
@media (max-width: 900px) {
  :root { --hdr-h: 54px; }
  .app { display: flex; flex-direction: column; height: auto; min-height: 0; }
  .stage { order: 1; height: 68vh; height: 68dvh; min-height: 420px; }
  .pal { order: 2; border-right: 0; border-bottom: 1px solid var(--line); }
  .pal__top { grid-template-columns: minmax(150px, 1fr) auto; align-items: center; padding: 8px 12px 6px; border-bottom: 0; }
  .pal__viim { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
  .pal__list { display: flex; gap: 14px; overflow-x: auto; overflow-y: hidden; padding: 0 12px 10px; }
  .pal__list section { flex: none; }
  .pal__kat { padding: 4px 4px 4px; white-space: nowrap; pointer-events: none; }
  .pal__kat .ic { display: none; }
  .pal__grid { grid-auto-flow: column; grid-template-rows: repeat(2, auto); }
  .pal__s { white-space: nowrap; cursor: pointer; }
  .pal__info { display: none; }
  .side { order: 3; border-left: 0; }
  .logo__txt { font-size: 19px; }
  .tabs a { padding: 6px 10px; }
  .tabs .nr { display: none; }
  .hdr__act .btn span { display: none; }
  .hdr__act .btn { padding: 8px 10px; }
}
@media (max-width: 560px) {
  .hdr__in { gap: 10px; padding: 0 12px; }
  .logo__txt { font-size: 16px; letter-spacing: -.01em; }
  .logo__txt span { display: block; }
  .tool span { display: none; }
  .tool kbd { display: none; }
  .tool { padding: 7px; }
  .tool .lukk { margin-left: -4px; }
  .taisv, .hdr__act .btn .ic-sm { display: none !important; }
  .pal__top { grid-template-columns: minmax(0, 1fr); }
  .pal__viim:empty { display: none; }
  .menu__list { position: fixed; left: 12px; right: 12px; top: calc(var(--hdr-h) + 40px); width: auto; }
  .kp { padding: 14px 12px 40px; }
  .board__wrap { min-height: 260px; padding: 8px; }
}
