/* App shell: top bar, left rail, page frame; Aloitus; the pages built in pages.js (Tallennetut, Raportit, Päivitykset, Tiimi,
   Suodattimet, Asetukset, Pikaopas). Every value is a token of base.css. */

/* ================= SHELL ================= */
#app{position:fixed;inset:0;display:grid;grid-template-rows:60px 1fr;grid-template-columns:216px 1fr;opacity:0;transition:opacity .16s ease-out;background:var(--bg-soft);color:var(--ink)}
#app.in{opacity:1}
#app.slim{grid-template-columns:60px 1fr}
#app .topbar{grid-column:1 / -1}
.content{grid-row:2;grid-column:2;display:grid;grid-template-rows:auto minmax(0,1fr);min-height:0;min-width:0}
.content>.period{grid-row:1}.content>.view{grid-row:2}
.view{min-height:0;overflow:hidden;position:relative}

/* ---------- top bar (--g, 60 px): lockup, Kohdehaku, the centred serif title + Yksikkö, + Uusi, the name, the avatar ---------- */
.topbar{display:flex;align-items:center;gap:14px;padding:0 20px;background:var(--g);color:var(--white);border-bottom:1px solid var(--lined);position:relative;z-index:1500}
.topbar .left{display:flex;align-items:center;gap:14px;min-width:0}
.topbar .prod{font-size:13px;color:var(--sage2);padding-left:14px;border-left:1px solid var(--lined-2);line-height:1.3}
.topbar .mid{display:flex;align-items:center;gap:14px;position:absolute;left:50%;transform:translateX(-50%)}
.topbar .mid .crumb{font-family:var(--serif);font-weight:400;font-size:19px;letter-spacing:-.01em;color:var(--white);white-space:nowrap;line-height:1}
.topbar .user{display:flex;align-items:center;gap:12px;font-size:13px;margin-left:auto;position:relative}
.topbar .who{text-align:right;line-height:1.25;white-space:nowrap}
.topbar .who b{display:block;font-weight:500;font-size:13px}
.topbar .who small{display:block;color:var(--g-ink3);font-size:11.5px}
.avatar{width:32px;height:32px;border-radius:var(--r-full);background:var(--sage);color:var(--g);display:grid;place-items:center;font-weight:600;font-size:12px;border:0;cursor:pointer;flex:none}
.unit-sw{position:relative;display:flex;align-items:center}
.unit-cur{display:flex;align-items:center;gap:8px;height:32px;padding:0 10px 0 12px;border:1px solid var(--lined);border-radius:var(--r-s);background:var(--g-hover);font-size:13px;color:var(--white);white-space:nowrap;transition:background var(--t)}
.unit-cur:hover,.unit-cur[aria-expanded="true"]{background:var(--g-on)}
.unit-cur small{color:var(--sage2);font-size:12px}
.unit-cur b{font-weight:500}
.unit-cur svg{width:12px;height:12px;stroke:var(--sage2);fill:none;stroke-width:1.8;flex:none}
.unit-dd{top:calc(100% + 8px);left:0;min-width:220px}
.user-dd{top:calc(100% + 10px);right:0;min-width:220px}
.unit-dd .ol{width:16px;height:16px;flex:none;border-radius:var(--r-xs);background:var(--mint)}
.ui-menu .ws-row{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:38px;padding:0 6px 0 10px;font-size:13.5px}
.ui-menu.chrome .ui-seg{background:var(--g-hover)}
.ui-menu.chrome .ui-seg button{color:var(--g-ink);height:26px;width:auto;min-height:0;padding:0 10px;display:inline-block}
.ui-menu.chrome .ui-seg button.on{background:var(--g-on);color:var(--mint);box-shadow:none}
.topbar .om-wordmark{font-family:var(--sans);font-weight:600;font-size:17px;letter-spacing:-.02em;color:var(--white)}
body.client .topbar .prod{display:none}
.om-lock.client .om-name{font-size:17px;font-weight:600;letter-spacing:-.02em}
/* + Uusi: the one mint button */
.crm-new{position:relative}
.crm-new-dd{top:calc(100% + 10px);right:0;min-width:180px}

/* ---------- rail (--g2; 216 px open, 60 px folded) ---------- */
.rail{background:var(--g2);color:var(--g-ink);display:flex;flex-direction:column;padding:10px 10px 12px;border-right:1px solid var(--lined);grid-row:2;grid-column:1;position:relative;z-index:1400;min-height:0}
.rail .fold{border:0;background:transparent;color:var(--g-ink3);width:32px;height:30px;border-radius:var(--r-s);display:grid;place-items:center;margin:0 0 4px 2px;padding:0;flex:none}
.rail .fold svg{width:18px;height:18px;display:block;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round}
.rail .fold:hover{background:var(--g-hover);color:var(--white)}
.rail .nav{display:flex;flex-direction:column;gap:2px;margin-top:8px;min-height:0;overflow-y:auto;overflow-x:hidden;scrollbar-width:none}
.rail .nav button{position:relative;display:flex;align-items:center;gap:11px;width:100%;height:36px;flex:none;border:0;background:transparent;color:var(--g-ink);padding:0 10px;border-radius:var(--r-s);font-size:13.5px;font-weight:500;text-align:left;transition:background var(--t),color var(--t)}
.rail .nav button:hover{background:var(--g-hover);color:var(--white)}
.rail .nav button.on{background:var(--g-on);color:var(--mint)}
.rail .nav button.on::before{content:"";position:absolute;left:-10px;top:8px;bottom:8px;width:3px;border-radius:0 var(--r-xs) var(--r-xs) 0;background:var(--mint)}
.rail .nav svg{width:18px;height:18px;flex:none;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.rail .nav svg .kn{fill:var(--g2)}
.rail .nav .cnt{margin-left:auto;font-family:var(--mono);font-size:11px;font-variant-ligatures:none;color:var(--g-ink);background:var(--lined);border-radius:var(--r-full);padding:1px 8px}
.rail .nav .cnt:empty{display:none}
.rail .nav button .dotn{width:7px;height:7px;border-radius:var(--r-full);background:var(--mint);box-shadow:0 0 0 3px var(--mint-halo);margin-left:auto}
.rail .grp{font-size:10.5px;letter-spacing:.08em;color:var(--g-ink3);padding:16px 10px 6px;font-weight:500}
.rail .powered{margin-top:auto;padding:12px 8px 0;border-top:1px solid var(--lined);flex:none}
.rail .powered .mono{display:none}
.rail .powered .mono .om-ico{width:26px;height:26px;display:block;margin:0 auto}
#app.slim .rail .lbl,#app.slim .rail .cnt,#app.slim .rail .grp,#app.slim .rail .nav .dotn{display:none}
#app.slim .rail .grp{display:block;height:17px;padding:0;margin:8px 8px 0;border-top:1px solid var(--lined);font-size:0}
#app.slim .rail .fold{margin:0 auto 4px}
#app.slim .rail .nav{overflow:visible}
#app.slim .rail .nav button{justify-content:center;padding:0}
/* folded: icons only, the names as tooltips at once */
#app.slim .rail .nav button::after{content:attr(title);position:absolute;left:calc(100% + 12px);top:50%;transform:translateY(-50%);background:var(--g3);color:var(--white);border:1px solid var(--lined-2);font-size:12.5px;font-weight:500;padding:5px 9px;border-radius:var(--r-s);white-space:nowrap;box-shadow:var(--sh-chrome);opacity:0;pointer-events:none;z-index:60}
#app.slim .rail .nav button:hover::after,#app.slim .rail .nav button:focus-visible::after{opacity:1}
#app.slim .rail .powered{padding-left:0;padding-right:0}
#app.slim .rail .powered .full{display:none}#app.slim .rail .powered .mono{display:block}

/* ---------- käyttöjakso line: a 36 px strip in the warn tint ---------- */
.period{display:flex;align-items:center;min-height:36px;background:var(--warn-soft);color:var(--warn-ink);font-size:13px;padding:0 32px;border-bottom:1px solid var(--line)}
.period a{color:inherit;font-weight:500;cursor:pointer;margin-left:10px}

/* ---------- page frame: one centred column, max 1 240 px ---------- */
.pg{position:absolute;inset:0;overflow:auto;padding:24px max(32px,calc((100% - 1240px) / 2)) 48px}
.pg h1{font-family:var(--title-font);font-weight:var(--title-weight);font-size:var(--title-size);letter-spacing:var(--title-track);line-height:1.2;margin:0 0 16px}
.pg h2{font-size:15px;font-weight:600;margin:28px 0 12px}
.pg h2.ui-sec:first-of-type{margin-top:8px}
.back{border:0;background:transparent;padding:0;margin:0 0 10px;color:var(--ink3);font-size:12.5px;display:inline-flex;align-items:center;gap:4px;height:22px;flex:none;white-space:nowrap}
.back:hover{color:var(--ink)}
/* ---------- a list page (session 32): the page never scrolls. Header, tabs and toolbar stay put; exactly one region scrolls:
   the table body, the calendar grid, each board column. .pg.fill > (.pg-top, bars) + .pg-body; inside the body every child keeps
   its own height except the scroller (.ui-tw, .ui-scroll), which takes what is left and scrolls. A document page (Asetukset, a
   company, a person) is a plain .pg and scrolls as a page. ---------- */
.pg.fill{display:flex;flex-direction:column;overflow:hidden;padding-bottom:24px}
.pg.fill>*{flex:none}
.pg.fill>.pg-body,.pg-body .pg-body{flex:1 1 auto;min-height:0;min-width:0;display:flex;flex-direction:column}
.pg-body>*{flex:none}
.pg-body>.ui-tw,.pg-body>.ui-scroll,.pg-body>.pg-fit{flex:0 1 auto;min-height:0}
.pg-body>.pg-grow{flex:1 1 auto;min-height:0}
.pg-fit{display:flex;flex-direction:column;min-height:0}
.pg-fit>*{flex:none}
.pg-fit>.ui-tw,.pg-fit>.ui-scroll{flex:0 1 auto;min-height:0}
.ui-scroll{overflow:auto;min-height:0}
/* the page's first row: ‹ Takaisin at the left edge, the tabs, the page's actions right. The topbar already carries the page's name. */
.pg-top{display:flex;align-items:center;gap:20px;min-height:40px;margin:0 0 16px;border-bottom:1px solid var(--line)}
.pg-top>.back{margin:0}
.pg-top>.tabs{flex:1 1 auto;min-width:0;margin:0 0 -1px;border-bottom:0;align-self:flex-end;overflow:hidden}
.pg-top>.pg-sp{flex:1 1 auto}
.pg-top>.ui-ph-act,.pg-top>.pg-act{display:flex;align-items:center;gap:8px;flex:none;position:relative;margin:0 0 4px}
.pg-top.plain{border-bottom:0;margin-bottom:12px}
/* the page title with the page's one main action on the same line */
.ui-ph{display:flex;align-items:center;justify-content:space-between;gap:16px;margin:0 0 14px;min-height:36px}
.ui-ph h1,.ui-ph h2{margin:0}
.ui-ph-act{display:flex;align-items:center;gap:8px;flex:none;position:relative}
.ui-bar{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin:0 0 14px}
.ui-bar-l,.ui-bar-r{display:flex;align-items:center;gap:8px;flex-wrap:wrap;min-width:0}
.ui-bar-l{flex:1}
.ui-bar-r{flex:none;justify-content:flex-end}
.hdrow{display:flex;justify-content:space-between;align-items:center;gap:12px;margin:28px 0 12px}
.hdrow h2{margin:0}
.hdrow .seats{margin-left:auto;font-size:12.5px;color:var(--ink3)}
.two{display:grid;grid-template-columns:1fr 1.4fr;gap:16px;align-items:start}

/* ================= ALOITUS (session 32): a working dashboard on one screen. Row 1 four figures (96 px), row 2 Tulossa beside
   Putki and Muutokset (fills), row 3 Jatka, Tallennetut haut, Tiimi (200 px). The page never scrolls; Tulossa and Muutokset do. ================= */
.al{display:flex;flex-direction:column;gap:16px;overflow:hidden;padding-top:26px;padding-bottom:24px}
.al-hello{display:flex;align-items:baseline;justify-content:space-between;gap:24px;flex:none}
.al-hello h1{font-family:var(--serif);font-weight:400;font-size:28px;letter-spacing:-.015em;line-height:1.15;margin:0}
.al-hello span{color:var(--ink3);font-size:13px;white-space:nowrap}
/* row 1: label with a status dot, the number, one context line; the whole cell is a link */
.al-figs{height:96px}
.al-figs>a{padding:12px 18px 0}
.al-figs>a:focus-visible{outline-offset:-2px}
.al-figs .ui-lbl{line-height:16px}
.al-figs b{font-size:32px;line-height:36px;margin-top:2px}
.al-figs small{display:block;font-size:12.5px;line-height:18px;color:var(--ink2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-row2{display:grid;grid-template-columns:1.55fr 1fr;gap:16px;flex:1 1 0;min-height:0}
.al-row3{display:grid;grid-template-columns:1.4fr 1fr 1fr;gap:16px;flex:none;height:200px;min-height:0}
/* row 2 right: Putki takes what it needs and Muutokset the rest; with fewer than two change rows it is the other way round */
.al-side{display:flex;flex-direction:column;gap:16px;min-height:0;min-width:0}
.al-side>#al-pipe{flex:0 0 auto}
.al-side>#al-feed{flex:1 1 0}
.al-side.few>#al-pipe{flex:1 1 0}
.al-side.few>#al-feed{flex:0 0 auto}
.al-hd{display:flex;align-items:center;gap:12px;min-width:0}
.al-acts{display:flex;align-items:center;gap:14px;flex:none}
.al-acts .lnk:hover{color:var(--acc)}
/* Putki: one bar, shades of one hue in the stage order */
.al-bar{display:flex;gap:2px;height:12px;border-radius:var(--r-sb);overflow:hidden;margin:2px 0 12px}
.al-seg{display:block;height:100%;min-width:4px;flex:0 1 0}
.al-bar i,.al-leg i{background:var(--acc)}
.al-seg-0{opacity:1}.al-seg-1{opacity:.8}.al-seg-2{opacity:.62}.al-seg-3{opacity:.46}.al-seg-4{opacity:.34}.al-seg-5{opacity:.25}.al-seg-6{opacity:.18}.al-seg-7{opacity:.13}
.al-leg{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:0 18px}
.al-leg a{display:flex;align-items:center;gap:8px;min-height:24px;font-size:13px;color:inherit;text-decoration:none;min-width:0;cursor:pointer}
.al-leg a:hover span{color:var(--acc)}
.al-leg i{width:8px;height:8px;border-radius:var(--r-xs);flex:none}
.al-leg span{flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-leg b{font-weight:500;color:var(--ink2);font-variant-numeric:tabular-nums;flex:none}
.al-leg a.zero span,.al-leg a.zero b{color:var(--ink3)}
#al-pipe .ui-card-b{overflow:hidden;padding-bottom:12px}
#al-pipe .ui-empty,#al-feed .ui-empty,.al-row3 .ui-empty,#al-today .ui-empty{padding:4px 0 6px}
.al-row2>*,.al-row3>*{min-height:0;min-width:0}
.al-sub{display:flex;align-items:center;gap:8px;font-size:11px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:var(--ink3);padding:10px 0 2px}
.al-sub:first-child{padding-top:2px}
.al-sub.late{color:var(--bad)}
.al-task{display:flex;align-items:center;gap:12px;padding:5px 0;border-bottom:1px solid var(--line);min-height:44px}
.al-task:last-child{border-bottom:0}
/* an event: a square marker in the calendar's meeting colour, the time in the mono face */
.al-ev{width:18px;flex:none;display:grid;place-items:center}
.al-ev i{width:9px;height:9px;border-radius:var(--r-xs);background:var(--info)}
.al-tm{font-family:var(--mono);font-size:12px;letter-spacing:-.01em;font-variant-ligatures:none;color:var(--ink2);flex:none;min-width:36px}
.al-who{width:22px;height:22px;border-radius:var(--r-full);background:var(--bg-sunk);color:var(--ink2);display:grid;place-items:center;font-size:10px;font-weight:600;flex:none}
.al-tick{width:18px;height:18px;border-radius:var(--r-full);border:1.5px solid var(--line-2);background:var(--bg);flex:none;padding:0;transition:border-color var(--t),background var(--t)}
.al-tick:hover{border-color:var(--mint);background:var(--mint-halo)}
.al-task .t{min-width:0;flex:1;cursor:pointer;color:inherit;text-decoration:none}
.al-task .t b{display:block;font-weight:500;font-size:13.5px;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-task .t small{display:block;color:var(--ink3);font-size:12px;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-task .d{font-size:12.5px;color:var(--ink3);font-variant-numeric:tabular-nums;flex:none;white-space:nowrap}
.al-task .d.late{color:var(--bad);font-weight:500}
.al-task .time{width:18px;flex:none;display:grid;place-items:center;color:var(--info)}
.al-task .time svg{width:16px;height:16px;stroke:currentColor;fill:none;stroke-width:1.6;stroke-linecap:round;stroke-linejoin:round}
.al-foot{font-size:12.5px;color:var(--ink3);padding-top:8px}
.al-row2 .ui-card-b{padding-bottom:8px}
.al-row3 .ui-card-b{overflow:hidden}
.al-foot a{color:var(--ink2);text-decoration:none;font-weight:500;cursor:pointer}
.al-foot a:hover{color:var(--acc)}
.al-chg{display:flex;gap:10px;padding:7px 0;border-bottom:1px solid var(--line);color:inherit;text-decoration:none}
.al-chg .d{margin-left:auto;font-size:12px;color:var(--ink3);font-variant-numeric:tabular-nums;flex:none;padding-top:2px}
.al-chg:last-of-type{border-bottom:0}
.al-chg[data-act],.al-chg[data-en],a.al-chg{cursor:pointer}
.al-chg i{width:7px;height:7px;border-radius:var(--r-full);background:var(--line-2);margin-top:7px;flex:none}
.al-chg i.new{background:var(--mint);box-shadow:0 0 0 3px var(--mint-halo)}
.al-chg div{min-width:0}
.al-chg b{font-weight:500;font-size:13.5px;display:block;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-chg small{color:var(--ink3);font-size:12px;display:block;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* Tallennetut haut: the count, and what the last data refresh added */
.al-n{display:flex;align-items:center;gap:8px;flex:none}
.ui-li .al-n em{font-style:normal;font-size:12px;font-weight:500;color:var(--ok-ink);white-space:nowrap}
.al-act{display:flex;align-items:center;gap:9px;min-height:30px;padding:4px 0;border-bottom:1px solid var(--line);font-size:13px;color:inherit;text-decoration:none}
.al-act:last-child{border-bottom:0}
.al-act[data-crm]{cursor:pointer}
.al-act .a{width:22px;height:22px;border-radius:var(--r-full);background:var(--deep);color:var(--mint);display:grid;place-items:center;font-size:10px;font-weight:600;flex:none}
:root[data-ws="dark"] .al-act .a{box-shadow:0 0 0 1px var(--line-2)}
.al-act span:not(.a){flex:1;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-act small{color:var(--ink3);font-size:12px;flex:none}
/* Jatka: the dark card, the same in both workspaces. It is the style reference of the product. */
.al-hero{position:relative;border-radius:var(--r-m);overflow:hidden;background:var(--deep);color:var(--white);min-height:0;border:1px solid var(--hero-line);box-shadow:var(--hero-sh);display:flex;flex-direction:column;justify-content:space-between;padding:14px 18px 18px;cursor:pointer}
:root[data-ws="dark"] .al-hero{border-color:var(--line-2);box-shadow:none}
#hmap{position:absolute;inset:0;background:var(--map-dark)}
#hmap .maplibregl-canvas{filter:var(--hero-filter)}
#hdots{position:absolute;inset:0;width:100%;height:100%;pointer-events:none}
.al-hero::after{content:"";position:absolute;inset:0;background:var(--hero-veil);pointer-events:none}
.al-hero>.pill,.al-hero>.bot{position:relative;z-index:1}
.al-hero .pill{align-self:flex-start;font-family:var(--mono);font-size:11.5px;font-variant-ligatures:none;background:var(--map-plate);border-radius:var(--r-xs);padding:3px 8px;white-space:nowrap}
.al-hero .go{position:absolute;z-index:1;top:12px;right:14px;width:28px;height:28px;border-radius:var(--r-full);background:var(--mint);color:var(--mint-ink);display:grid;place-items:center}
.al-hero .go svg{width:14px;height:14px;stroke:currentColor;fill:none;stroke-width:2.2;stroke-linecap:round;stroke-linejoin:round}
.al-hero .bot{display:flex;align-items:flex-end;justify-content:space-between;gap:14px}
.al-hero .bot>div:first-child{min-width:0}
.al-hero h2{font-family:var(--serif);font-weight:400;font-size:22px;letter-spacing:-.01em;margin:0;line-height:1.15}
.al-hero p{margin:3px 0 0;color:var(--sage2);font-size:12.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.al-hero .n{text-align:right;line-height:1;flex:none}
.al-hero .n b{font-family:var(--serif);font-weight:300;font-size:46px;letter-spacing:-.02em;font-variant-numeric:tabular-nums}
.al-hero .n small{display:block;font-size:12px;color:var(--sage2);margin-top:3px}
.al-hero .attr{position:absolute;z-index:1;right:18px;bottom:3px;font-size:9.5px;line-height:1;color:var(--map-attr)}
.al-hero .btn{align-self:flex-start;margin-top:8px}
@media (min-height:1000px){.al{gap:20px}.al-task{min-height:48px}}
@media (max-width:1180px){.two{grid-template-columns:1fr}.topbar .mid{position:static;transform:none}.topbar .prod{display:none}}

/* ================= TALLENNETUT ================= */
/* Kohteet on the map: the map left, the same kohde cards as in Haku right; the cards scroll (session 32) */
.sv-split{display:grid;grid-template-columns:minmax(0,1fr) 372px;grid-template-rows:minmax(0,1fr);min-height:0;border:1px solid var(--line);border-radius:var(--r-m);overflow:hidden;background:var(--bg)}
.sv-map{position:relative;min-height:0;min-width:0;background:var(--map-land)}
.sv-list{border-left:1px solid var(--line);min-height:0}
#saved-map{position:absolute;inset:0}
.crm-crit{color:var(--ink3);max-width:360px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}

/* ================= RAPORTIT ================= */
.pg h2.rep-h{margin-top:20px}
.rep-crit{margin:12px 0 0;font-size:13.5px;color:var(--ink2)}
.rep-crit b{font-weight:500;color:var(--ink3);font-size:12px;margin-right:8px}
.rep-auto{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:16px}
.rep-auto .pc{display:flex;flex-direction:column;gap:12px;min-height:132px}
.rep-auto .pc h3{margin:0}
.rep-auto-h{display:flex;align-items:center;justify-content:space-between;gap:12px}
.rep-auto-f{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:auto;font-size:12.5px;color:var(--ink3)}
.own-bar{display:flex;justify-content:flex-end}
@media (max-width:1180px){.rep-auto{grid-template-columns:1fr}}

/* ================= PÄIVITYKSET (session 32): two equal halves; each scrolls inside itself, the page does not ================= */
.pv-two{display:grid!important;grid-template-columns:minmax(0,1fr) minmax(0,1fr);grid-template-rows:minmax(0,1fr);gap:24px}
.pv-half{display:flex;flex-direction:column;min-height:0;min-width:0}
.pv-half>*{flex:none}
.pv-half>.pv-sc{flex:0 1 auto;min-height:0}
.pv-hd{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:28px;margin:0 0 12px}
.pg .pv-hd h2{font-size:15px;font-weight:600;margin:0}
.pv-form{display:flex;flex-direction:column;gap:10px;padding:16px 18px}
.pv-form .btn{align-self:flex-end}
.pv-sub{font-size:12px;font-weight:500;color:var(--ink3);margin:20px 0 2px}
.sugg-it{display:flex;justify-content:space-between;gap:14px;align-items:flex-start;padding:12px 0;border-bottom:1px solid var(--line)}
.sugg-it:last-child{border-bottom:0}
.sugg-it b{font-weight:400;display:block;font-size:13.5px}
.sugg-it small{color:var(--ink3);font-size:12px}
.sugg-it p{margin:8px 0 0;font-size:13.5px;color:var(--ink2);border-left:2px solid var(--acc);padding-left:10px}
/* a release row: unread mark · title and one line · type · date. The mark keeps its 8 px slot when the note is read. */
#upd-feed{background:var(--bg);border:1px solid var(--line);border-radius:var(--r-m);box-shadow:var(--sh-1)}
#upd-feed:has(.pv-none){background:transparent;border:0;box-shadow:none}
.pv-row{display:flex;align-items:center;gap:12px;min-height:60px;padding:10px 18px 10px 16px;border-bottom:1px solid var(--line);color:inherit;text-decoration:none;cursor:pointer;transition:background var(--t)}
.pv-row:last-child{border-bottom:0}
.pv-row:hover{background:var(--bg-soft)}
.pv-row:focus-visible{outline-offset:-2px}
.pv-ping{width:8px;height:8px;border-radius:var(--r-full);flex:none;visibility:hidden}
.pv-row.unread .pv-ping{visibility:visible;background:var(--mint);box-shadow:0 0 0 2px var(--mint-ping)}
.pv-row.unread .pv-ping.go{animation:pv-ping .9s var(--ease) 1}
@keyframes pv-ping{0%{box-shadow:0 0 0 0 var(--mint-ping)}45%{box-shadow:0 0 0 7px var(--mint-ping)}100%{box-shadow:0 0 0 2px var(--mint-ping)}}
.pv-b{flex:1 1 auto;min-width:0}
.pv-b b{display:block;font-size:14px;font-weight:400;line-height:1.35;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-row.unread .pv-b b{font-weight:500}
.pv-b small{display:block;font-size:13px;color:var(--ink2);line-height:1.4;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.pv-row .tag{flex:none}
.pv-d{font-family:var(--mono);font-size:12px;letter-spacing:-.01em;font-variant-ligatures:none;color:var(--ink3);white-space:nowrap;flex:none}
.pv-none{margin:0;padding:4px 0;color:var(--ink3);font-size:13.5px}
/* the note in its dialog: a big moment, the title in the display face */
.modal.pv-note{width:640px;max-height:90vh;overflow:auto;padding:22px 28px 26px}
.pv-m-top{display:flex;align-items:center;gap:12px;margin:0 0 14px}
.pv-m-top .x{margin-left:auto}
.pv-m-top .pv-d{color:var(--ink2)}
.modal.pv-note h3{font-family:var(--serif);font-weight:400;font-size:24px;letter-spacing:-.012em;line-height:1.2;margin:0 0 16px}
.pv-m-img{display:block;width:100%;aspect-ratio:16/9;object-fit:cover;border:1px solid var(--line);border-radius:var(--r-s);margin:0 0 16px;background:var(--bg-sunk)}
.pv-m-b p{margin:0 0 12px;font-size:14px;line-height:1.6;color:var(--ink)}
.pv-m-b p:last-child{margin-bottom:0}
.modal.pv-note .row{margin-top:20px}
@media (max-width:1180px){.pv-two{grid-template-columns:minmax(0,1fr);grid-template-rows:auto minmax(0,1fr)}}

/* ================= TIIMI ================= */
.units{display:grid;grid-template-columns:repeat(auto-fill,minmax(300px,1fr));gap:16px}
.pg-top .seats{font-size:12.5px;color:var(--ink3);white-space:nowrap}
.unitc{display:flex;flex-direction:column;gap:6px;background:var(--bg);border:1px solid var(--line);border-radius:var(--r-m);box-shadow:var(--sh-1);padding:16px 18px}
.unitc.on{border-color:var(--acc)}
.unitc-h{display:flex;align-items:center;justify-content:space-between;gap:10px}
.unitc h3{font-size:15px;font-weight:600}
.unitc .m{color:var(--ink2);font-size:13.5px;margin:0;line-height:1.5}
.unitc .areas{color:var(--ink3);font-size:12.5px;margin:0;line-height:1.5}
.unitc .act{margin-top:auto;padding-top:10px}
.inv-row{display:grid;grid-template-columns:70px minmax(0,1fr);gap:12px;align-items:center;margin:0 0 14px;font-size:13.5px}
.inv-row>span{color:var(--ink3);font-size:12.5px;font-weight:500}
#inv-done p{margin-top:12px}
#inv-link{font-size:12.5px;color:var(--ink2)}

/* ================= SUODATTIMET ================= */
.flt{padding:0 18px;max-width:860px}
.flt-row{display:flex;justify-content:space-between;align-items:center;gap:18px;padding:13px 0;border-bottom:1px solid var(--line)}
.flt-row:last-child{border-bottom:0}
.flt-row b{display:block;font-weight:500;font-size:14px}
.flt-row small{display:block;color:var(--ink3);font-size:12.5px;margin-top:2px;line-height:1.45}
.flt-row.fixed b{color:var(--ink2)}
.flt-q{flex:0 1 320px;min-width:0}
.flt-scroll{max-width:868px;padding-right:8px}
.flt-sec{background:var(--bg);border:1px solid var(--line);border-radius:var(--r-m);box-shadow:var(--sh-1);max-width:860px;margin:0 0 8px}
.flt-sec>summary{list-style:none;display:flex;align-items:center;gap:12px;padding:0 18px;min-height:48px;cursor:pointer;border-radius:var(--r-m)}
.flt-sec>summary::-webkit-details-marker{display:none}
.flt-sec>summary b{font-size:14px;font-weight:600}
.flt-sec>summary span{font-size:12.5px;color:var(--ink3);font-variant-numeric:tabular-nums}
.flt-sec{position:relative}
.flt-sec>summary .chev{margin-left:auto}
.flt-all{position:absolute;right:48px;top:0;height:48px}
.flt-sec>summary .chev{width:14px;height:14px;stroke:var(--ink3);fill:none;stroke-width:1.8;transition:transform var(--t);flex:none}
.flt-sec[open]>summary .chev{transform:rotate(180deg)}
.flt-sec>.flt-b{padding:0 18px;border-top:1px solid var(--line)}
.flt-foot{display:flex;justify-content:space-between;align-items:center;gap:16px;max-width:860px;margin:16px 0 0;padding:12px 18px;background:var(--bg-over);border:1px solid var(--line);border-radius:var(--r-m);box-shadow:var(--sh-2);color:var(--ink2);font-size:13.5px}
.flt-foot .btn{visibility:hidden}
.flt-foot.dirty .btn{visibility:visible}
.flt-row.rule .act{display:flex;gap:2px}
.karki-add{margin:12px 0 0;max-width:360px}
.flt-none{max-width:860px}

/* ================= ASETUKSET: one column of setting rows under section titles ================= */
.set-col{max-width:860px}
.set-col .pc{padding:0 18px}
.set-form{display:grid;grid-template-columns:1fr 1fr;gap:14px 24px;padding:16px 0}
.set-per{margin:0;font-size:12.5px;color:var(--ink3)}
.kmpa{display:flex;align-items:center;gap:10px}
.set-hid .ui-li{cursor:default}
.set-hid .ui-li:hover span{color:inherit}
#aineistot .tbl td{vertical-align:top;height:auto;padding:12px 16px}
.srcs{margin:0;padding:0;list-style:none;font-size:12.5px;color:var(--ink2);line-height:1.6}
@media (max-width:1180px){.set-form{grid-template-columns:1fr}}

/* ================= KOOSTEEN ESIKATSELU: the digest as it will be mailed ================= */
.modal.mail{width:720px;max-width:94vw;max-height:90vh;overflow:auto;padding:0}
.modal.mail .ml-top{display:flex;justify-content:space-between;align-items:center;padding:16px 24px 12px;border-bottom:1px solid var(--line);position:sticky;top:0;background:var(--bg-over);z-index:1}
.modal.mail .ml-top h3{margin:0}
.ml-hd{padding:14px 24px;background:var(--bg-soft);border-bottom:1px solid var(--line);font-size:13px}
.ml-from{display:flex;gap:12px;padding:3px 0}.ml-from span{width:96px;color:var(--ink3)}
.ml-body{padding:20px 24px 24px}
.ml-lead{margin:0 0 18px;font-size:14px;color:var(--ink)}
.ml-s{padding:14px 0 8px;border-top:1px solid var(--line)}
.ml-s h3{font-weight:600;font-size:15px;margin:0 0 2px}
.ml-s .ml-c{margin:0 0 8px;font-size:12.5px;color:var(--ink3)}
.ml-s .ml-m{margin:0 0 8px;font-size:13px;color:var(--ink2)}
.ml-s h4{margin:12px 0 4px;font-size:12px;font-weight:500;color:var(--ink3)}
.ml-s ul,.ml-s ol{margin:0;padding:0 0 0 18px;font-size:13.5px}
.ml-s li{margin:0 0 4px;line-height:1.45}.ml-s li small{display:block;color:var(--ink3);font-size:12px}
.ml-foot{margin:22px 0 0;font-size:12px;color:var(--ink3);line-height:1.5}

/* ================= PIKAOPAS ================= */
.po-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 16px}
.po-unit{font-size:13px;color:var(--ink2)}
.po-step{background:var(--bg);border:1px solid var(--line);border-radius:var(--r-m);box-shadow:var(--sh-1);padding:20px 20px 16px;margin:0 0 16px;max-width:1040px}
.po-t{display:flex;gap:14px;align-items:flex-start;margin-bottom:16px}
.po-n{flex:none;width:28px;height:28px;border-radius:var(--r-full);background:var(--ink);color:var(--bg);display:grid;place-items:center;font-size:13px;font-weight:600;font-variant-numeric:tabular-nums}
.po-t h2{margin:3px 0 4px;font-weight:600;font-size:15px}
.po-t p{margin:0;font-size:14px;line-height:1.5;color:var(--ink2);max-width:70ch}
.po-step img{display:block;width:100%;height:auto;border:1px solid var(--line);border-radius:var(--r-s)}
.po-foot{font-size:12px;color:var(--ink2);margin:6px 0 30px;max-width:1040px}

/* ================= OMAT AINEISTOT (Asetukset → Aineistot; omat.js) ================= */
.oa-head{display:flex;justify-content:space-between;align-items:center;margin:0 0 12px}
.oa-head h3{margin:0;font-weight:600;font-size:15px}
#omat-aineistot{margin:0 0 28px}
.oa-sw{display:inline-block;width:12px;height:12px;border-radius:var(--r-xs);margin-right:8px;vertical-align:-1px}
.oa-sw[data-c="0"],.oa-c[data-c="0"]{background:var(--oa-0)}.oa-sw[data-c="1"],.oa-c[data-c="1"]{background:var(--oa-1)}.oa-sw[data-c="2"],.oa-c[data-c="2"]{background:var(--oa-2)}
.oa-sw[data-c="3"],.oa-c[data-c="3"]{background:var(--oa-3)}.oa-sw[data-c="4"],.oa-c[data-c="4"]{background:var(--oa-4)}.oa-sw[data-c="5"],.oa-c[data-c="5"]{background:var(--oa-5)}
.oa-use{font-size:12px;color:var(--ink2);margin:8px 0 0;text-align:right}
.oa-form .oa-src{margin:4px 0 14px;font-size:13.5px;color:var(--ink2)}
.oa-form .oa-src b{color:var(--ink);font-weight:500}
.oa-err{margin:0 0 12px;padding:8px 10px;border-radius:var(--r-s);background:var(--bad-soft);color:var(--bad-ink);font-size:12.5px}
.oa-bad{margin:0 0 12px;font-size:12px;color:var(--ink2)}
.oa-colors{display:flex;gap:8px;padding:6px 0}
.oa-c{width:26px;height:26px;border-radius:var(--r-full);border:2px solid var(--bg);box-shadow:0 0 0 1px var(--line-2);cursor:pointer;padding:0}
.oa-c.on{box-shadow:0 0 0 2px var(--mint)}
.oa-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 0}
.oa-row h3{margin:0;font-size:13px;font-weight:600}
#omat-body .slider{padding:10px 0 12px;border-bottom:0}
