/* The new page at /uusi/ (docs/superpowers/specs/2026-11-12-web-uusi-design.md). The colours come from the theme (themes.js). */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(fonts/inter-400.ttf) format('truetype'); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(fonts/inter-600.ttf) format('truetype'); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(fonts/inter-700.ttf) format('truetype'); }

/* The Perus theme. The theme chosen (lib.js applyTheme) writes its own values over these, light and dark, in a <style>
   of its own; without a fixed light or dark the browser decides. --danger is the same in every theme. */
:root {
  --bg: #f4f5fa; --rail: #ffffff; --card: #ffffff; --soft: #eceef4; --line: #e3e5ec; --text: #14161d; --muted: #5d6375;
  /* The edge of a panel: a step darker than --line, which is nearly the background's colour in the light theme. */
  --edge: #d3d6df;
  --ok: #1e8f6a; --ok-text: #ffffff; --danger: #c8323f; --accent: #1f6f82; --accent-text: #ffffff;
  --accent-soft: #e1eef1; --accent-soft-text: #11181b; --badge: #eceef4; --badge-text: #14161d; --nav: #e1eef1; --nav-text: #1a5f70;
  color-scheme: light;
}
:root[data-theme="dark"] {
  --bg: #101116; --rail: #1c1f29; --card: #1c1f29; --soft: #272d3b; --line: #272d3b; --edge: #272d3b; --text: #eceef4; --muted: #9aa0b2;
  --ok: #35c99a; --ok-text: #062a33; --danger: #ef6474; --accent: #5bb8cc; --accent-text: #062a33;
  --accent-soft: #23313a; --accent-soft-text: #e9f0f2; --badge: #272d3b; --badge-text: #eceef4; --nav: #23313a; --nav-text: #e9f0f2;
  color-scheme: dark;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #101116; --rail: #1c1f29; --card: #1c1f29; --soft: #272d3b; --line: #272d3b; --edge: #272d3b; --text: #eceef4; --muted: #9aa0b2;
    --ok: #35c99a; --ok-text: #062a33; --danger: #ef6474; --accent: #5bb8cc; --accent-text: #062a33;
    --accent-soft: #23313a; --accent-soft-text: #e9f0f2; --badge: #272d3b; --badge-text: #eceef4; --nav: #23313a; --nav-text: #e9f0f2;
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { margin: 0; }
body { background: var(--bg); color: var(--text); font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h2 { margin: 0 0 12px; font-size: 17px; font-weight: 600; }
h3 { margin: 16px 0 6px; font-size: 15px; font-weight: 600; }
p { margin: 8px 0; }
.muted { color: var(--muted); font-size: 13px; }
.loading { padding: 48px; color: var(--muted); text-align: center; }
.icon { width: 22px; height: 22px; flex: none; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

/* ---------- shell: the petrol side bar, the title and tabs (design canvas: Web: Koti) ---------- */
.shell { display: grid; grid-template-columns: 248px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; z-index: 20; align-self: start; overflow: hidden; display: flex; flex-direction: column; gap: 28px; height: 100vh; padding: 28px 16px 20px; background: #14505e; color: #ffffff; }
.side::before { content: ""; position: absolute; right: -120px; top: -110px; width: 260px; height: 260px; border-radius: 80px; background: rgb(255 255 255 / .06); transform: rotate(14deg); pointer-events: none; }
.side::after { content: ""; position: absolute; left: -90px; bottom: -110px; width: 240px; height: 240px; border-radius: 50%; background: rgb(0 0 0 / .12); pointer-events: none; }
.side > * { position: relative; z-index: 1; }
.side a { color: inherit; text-decoration: none; }
.side-logo { display: flex; align-items: center; gap: 12px; padding: 0 8px; font-size: 1.375rem; font-weight: 700; }
.side-logo .mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 13px; background: #ffffff; color: #14505e; }
.side-logo .icon { width: 24px; height: 24px; stroke-width: 2.2; }
.side-links { display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.side-links a { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 16px; border-radius: 24px; font-size: 1rem; font-weight: 600; white-space: nowrap; }
.side-links a:hover { background: rgb(255 255 255 / .09); }
.side-links a.on { background: rgb(255 255 255 / .16); font-weight: 700; }
.side-foot { display: flex; flex-direction: column; gap: 8px; margin-top: auto; }
.side-old { display: flex; align-items: center; gap: 10px; padding: 6px 12px; border-radius: 16px; color: #d3e8ed !important; font-size: .875rem; font-weight: 600; }
.side-old .icon { width: 18px; height: 18px; }
.side-old:hover { background: rgb(255 255 255 / .09); }
.side-user { display: flex; align-items: center; gap: 12px; padding: 0 4px 0 8px; }
.side-avatar { display: grid; flex: none; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: rgb(255 255 255 / .16); font-weight: 700; }
.side-name { flex: 1; min-width: 0; overflow: hidden; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.side-out { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: none; color: inherit; cursor: pointer; }
.side-out:hover { background: rgb(255 255 255 / .12); }
.side :focus-visible { outline-color: #ffffff; }
.main { min-width: 0; }
/* The content is in the middle and at most 1120 px wide; the program editor's three columns may take more. */
.page { max-width: 1120px; margin: 0 auto; padding: clamp(1.25rem, 3vw, 3rem); }
.page:has(.editor-cols) { max-width: 1880px; }
.top { margin-bottom: 24px; }
.top h1 { margin: 0; font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.tabs { display: flex; gap: 28px; margin-top: 12px; overflow-x: auto; border-bottom: 1px solid var(--line); }
.tabs a { padding: 10px 0 9px; border-bottom: 2px solid transparent; color: var(--muted); font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; }
.tabs a:hover { color: var(--text); }
.tabs a.on { border-bottom-color: var(--accent); color: var(--accent); }
.content { padding: 0; }

/* ---------- cards, buttons, forms ---------- */
.card { padding: 18px; background: var(--card); border: 1.5px solid var(--edge); border-radius: 20px; }
/* A group of fields with no look of its own; disabled, it shows someone else's item as it is. */
fieldset.plain { min-width: 0; margin: 0; padding: 0; border: 0; }
fieldset.plain:disabled { opacity: .75; }
.card.flush { padding: 0; overflow: hidden; }
.card.raised { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-text); }
.card-head { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 14px; }
.card-head h2 { margin: 0; }
.card-head.pad { margin: 0; padding: 16px 18px 10px; }
.stack > * + * { margin-top: 16px; }
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 16px; align-items: start; }
.row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; font-weight: 600; text-decoration: none; white-space: nowrap; cursor: pointer; }
.btn:hover { background: var(--soft); }
.btn .icon { width: 18px; height: 18px; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.danger { color: var(--danger); }
.btn.small { padding: 4px 10px; font-size: 13px; }
.btn.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent-soft-text); }
.btn:disabled { opacity: .45; cursor: default; }
label { display: block; margin: 12px 0 4px; color: var(--muted); font-size: 13px; }
label.check { display: flex; align-items: center; gap: 8px; margin: 10px 0; color: var(--text); font-size: 15px; }
.checks { display: flex; flex-wrap: wrap; gap: 4px 16px; }
input, select, textarea { max-width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; }
input[type=text], input[type=email], input[type=password], input[type=search], textarea { width: 100%; }
input[type=number] { width: 80px; }
input[type=color] { width: 46px; height: 36px; padding: 2px; }
input[type=checkbox] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
textarea { min-height: 70px; resize: vertical; }
#toast { position: fixed; left: 50%; bottom: 20px; z-index: 30; display: none; max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 12px; background: var(--text); color: var(--bg); transform: translateX(-50%); }
#toast.err { background: var(--danger); color: #fff; }

/* ---------- list and details ---------- */
.split { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 20px; align-items: start; }
.pane-list { position: sticky; top: 16px; max-height: calc(100vh - 32px); padding: 0; overflow-y: auto; }
.back { display: none !important; }
.list-tools { display: grid; gap: 10px; padding: 14px; border-bottom: 1px solid var(--line); }
.search { position: relative; }
.search .icon { position: absolute; top: 50%; left: 10px; width: 18px; height: 18px; color: var(--muted); transform: translateY(-50%); pointer-events: none; }
.search input { padding-left: 36px; }
.item { display: flex; align-items: center; gap: 10px; padding: 0 14px; border-bottom: 1px solid var(--line); }
.items > .item:last-child { border-bottom: 0; }
.item:hover { background: var(--soft); }
.item.on { background: var(--accent-soft); box-shadow: inset 3px 0 0 var(--accent); }
.item .text { flex: 1; min-width: 0; padding: 12px 0; color: inherit; text-decoration: none; }
.item .name { display: block; font-weight: 600; overflow-wrap: anywhere; }
.item.on .name { color: var(--accent); }
.item .sub { display: block; color: var(--muted); font-size: 13px; }
.list-foot { margin: 0; padding: 12px 14px; border-top: 1px solid var(--line); }
.dot { flex: none; width: 12px; height: 12px; border-radius: 4px; }
.ok-mark { display: inline-flex; flex: none; width: 22px; color: var(--ok); }
.archived { opacity: .55; }
.handle { padding: 8px 4px; color: var(--muted); font-size: 20px; line-height: 1; cursor: grab; touch-action: none; user-select: none; -webkit-user-select: none; }
.handle:hover { color: var(--text); }
.dragging { opacity: .65; outline: 2px dashed var(--accent); outline-offset: -2px; }
.dragging .handle { cursor: grabbing; }

/* ---------- program and exercise editors (as on the old page) ---------- */
.pe { margin-top: 8px; padding: 2px 6px; border: 1px solid var(--line); border-left-width: 8px; border-radius: 10px; }
.pe.open { padding-bottom: 10px; }
.pe .head { display: flex; align-items: center; gap: 2px; }
.pe-title { display: flex; flex: 1; flex-wrap: wrap; align-items: center; gap: 8px; min-width: 0; padding: 8px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; }
.pe-title:hover { background: var(--soft); }
.pe-body { padding: 4px 6px 0; }
.chev { width: 16px; color: var(--muted); }
.set { display: inline-flex; align-items: center; gap: 4px; margin: 6px 10px 0 0; }
.set input { width: 64px; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.media-item { padding: 10px; }
.media-item img, .media-item video { display: block; width: 100%; height: 220px; object-fit: contain; background: #000; border-radius: 8px; }
.pick { display: flex; flex-wrap: wrap; gap: 8px; }
.pick label { width: 92px; margin: 0; padding: 4px; border: 2px solid var(--line); border-radius: 10px; color: var(--text); font-size: 11px; text-align: center; cursor: pointer; }
.pick label.on { border-color: var(--accent); }
.pick img { display: block; width: 80px; height: 100px; object-fit: cover; border-radius: 6px; }
.pick input { display: none; }
.scroll-x { overflow-x: auto; }
.cardio-table input[type=text] { min-width: 150px; }
.cardio-table textarea { min-width: 220px; min-height: 54px; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { color: var(--muted); font-size: 13px; font-weight: 600; }
.setval { display: inline-block; margin-right: 12px; white-space: nowrap; }
.state-done { color: var(--ok); }
.state-skipped, .state-pending { color: var(--muted); }

/* ---------- calendar and the timeline of a workout ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-head { padding: 2px 0 4px; color: var(--muted); font-size: 13px; font-weight: 600; text-align: center; }
.cal-day { display: flex; flex-direction: column; gap: 3px; min-height: 76px; padding: 6px; border: 1.5px solid var(--edge); border-radius: 10px; color: var(--text); text-decoration: none; }
.cal-day:hover { background: var(--soft); }
.cal-day .num { font-weight: 600; font-variant-numeric: tabular-nums; }
.cal-day.out { border-color: transparent; }
.cal-day.out .num { color: var(--muted); font-weight: 400; opacity: .6; }
.cal-day.today .num { color: var(--accent); text-decoration: underline; text-underline-offset: 3px; }
.cal-day.has { background: var(--accent-soft); border-color: transparent; color: var(--accent-soft-text); }
.cal-day.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.cal-pill { overflow: hidden; padding: 1px 6px; border-radius: 6px; background: var(--accent); color: var(--accent-text); font-size: 12px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.icon-btn { padding: 4px 6px !important; }
.icon-btn.flip .icon { transform: scaleX(-1); }
.timeline { margin-top: 18px; }
.timeline h3 { margin: 0 0 4px; font-size: 16px; }
.timeline > .muted { margin: 0 0 12px; }
.strip { position: relative; height: 26px; margin-bottom: 26px; border-radius: 8px; background: var(--soft); }
.strip .seg { position: absolute; top: 3px; bottom: 3px; min-width: 3px; border-radius: 3px; background: var(--accent); }
.strip .seg.c1 { opacity: .55; }
.strip-ends { position: absolute; top: 30px; right: 0; left: 0; display: flex; justify-content: space-between; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }
table.times td { font-variant-numeric: tabular-nums; white-space: nowrap; }
table.times tr.first td { border-top: 2px solid var(--line); }
table.times tbody tr:first-child td { border-top: 0; }

/* ---------- numbers and charts ---------- */
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; }
.tile { padding: 11.5px 13.5px; border: 1.5px solid var(--edge); border-radius: 12px; background: var(--card); color: var(--text); font: inherit; text-align: left; }
button.tile { cursor: pointer; }
button.tile:hover { background: var(--soft); }
.tile.on { padding: 11px 13px; border: 2px solid var(--accent); }
.tile .k { color: var(--muted); font-size: 13px; }
.tile.on .k { color: var(--accent); }
.tile .v { margin-top: 2px; font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.segmented { display: inline-flex; overflow: hidden; border: 1px solid var(--line); border-radius: 10px; }
.segmented button { padding: 6px 12px; border: 0; background: none; color: var(--muted); font: inherit; font-weight: 600; cursor: pointer; }
.segmented button + button { border-left: 1px solid var(--line); }
.segmented button.on { background: var(--accent-soft); color: var(--accent-soft-text); }
.chart-head { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 22px 0 10px; }
.chart-head strong { font-size: 16px; font-weight: 600; }
.pill { padding: 2px 8px; border-radius: 8px; background: var(--soft); font-size: 13px; font-weight: 600; }
.chart-box { width: 100%; }
.chart { display: block; overflow: visible; }
.chart .grid { stroke: var(--line); stroke-width: 1; }
.chart text { fill: var(--muted); font-family: inherit; font-size: 12px; font-variant-numeric: tabular-nums; }
.chart .bar { fill: var(--accent); }
.chart .bar:hover { opacity: .8; }
.chart .line { fill: none; stroke: var(--accent); stroke-width: 2.5; stroke-linejoin: round; }
.chart .pt { fill: var(--accent); }
.record { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.record:last-child { border-bottom: 0; }

/* ---------- home (design canvas: Web: Koti) ---------- */
.eyebrow { color: var(--accent); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.home { display: flex; flex-direction: column; gap: 24px; font-variant-numeric: tabular-nums; }
.home-head { display: flex; flex-direction: column; gap: 2px; }
.home-head .date { color: var(--muted); font-size: 1rem; font-weight: 600; }
.home-head h1 { margin: 0; font-size: clamp(2rem, 3.5vw, 2.75rem); line-height: 1.1; font-weight: 700; letter-spacing: -0.01em; }
/* Two columns that stack when there is no room: the program and the numbers, the latest workout and the other programs. */
.home-cols { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 24px; }
.home-main { display: flex; flex: 2 1 520px; flex-direction: column; gap: 24px; min-width: 0; }
.home-side { display: flex; flex: 1 1 320px; flex-direction: column; gap: 24px; min-width: 0; }
.home-eyebrow { margin: 0; color: var(--muted); font-size: .8125rem; font-weight: 700; letter-spacing: .08em; }
.home-card { display: flex; flex-direction: column; gap: 16px; padding: 24px; border-radius: 28px; background: var(--card); }
.home-card.listed { gap: 8px; padding: 24px 12px 12px; }
.home-card-head { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.home-card.listed .home-card-head { padding: 0 12px; }
.home-card-head a { font-size: .9375rem; font-weight: 700; }
/* The program in turn: light petrol, its colour as a dot and its movements as a bar. */
.home-next { position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 14px; padding: 28px; border-radius: 28px; background: var(--accent-soft); color: var(--accent-soft-text); }
.home-next::before { content: ""; position: absolute; right: -70px; top: -80px; width: 240px; height: 240px; border-radius: 72px; background: color-mix(in srgb, var(--accent) 10%, transparent); transform: rotate(14deg); pointer-events: none; }
.home-next > * { position: relative; }
.home-next .home-eyebrow { color: inherit; }
.home-next .name { display: flex; align-items: center; gap: 12px; font-size: 2rem; line-height: 1.15; font-weight: 700; overflow-wrap: anywhere; }
.home-next .meta { font-size: 1rem; font-weight: 600; }
.home-dot { display: inline-block; flex: none; width: 14px; height: 14px; border-radius: 50%; }
.home-moves { display: flex; gap: 4px; max-width: 520px; }
.home-moves span { height: 10px; border: 1px solid color-mix(in srgb, currentColor 25%, transparent); border-radius: 999px; }
.home-next .go { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 6px; font-size: .9375rem; font-weight: 500; }
.home-btn { display: inline-flex; align-items: center; height: 52px; padding: 0 28px; border: 0; border-radius: 26px; background: var(--accent); color: var(--accent-text); font: inherit; font-size: 1rem; font-weight: 700; text-decoration: none; cursor: pointer; }
.home-btn:hover { filter: brightness(1.08); }
.home-stats { display: flex; flex-wrap: wrap; gap: 20px 32px; }
.home-stats > div { display: flex; flex: 1 1 auto; flex-direction: column; gap: 2px; min-width: 0; }
.home-stats .v { font-size: clamp(1.75rem, 3vw, 2.5rem); line-height: 1.1; font-weight: 700; white-space: nowrap; }
.home-stats .k { color: var(--muted); font-size: .9375rem; font-weight: 500; }
.home-bars { display: flex; align-items: flex-end; gap: 12px; height: 200px; }
.home-bar { display: flex; flex: 1; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; min-width: 0; }
.home-bar .n { min-height: 18px; font-size: .9375rem; font-weight: 700; }
.home-bar .b { width: 100%; max-width: 56px; border-radius: 12px 12px 4px 4px; background: var(--accent); }
.home-bar.zero .b { background: var(--line); }
.home-bar.now .b { background: color-mix(in srgb, var(--accent) 55%, var(--text)); }
.home-bar.now.zero .b { background: var(--line); }
.home-bar .l { color: var(--muted); font-size: .8125rem; font-weight: 500; white-space: nowrap; }
.home-bar.now .l { color: var(--text); font-weight: 700; }
.home-row { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 12px; border-radius: 20px; color: var(--text); text-decoration: none; }
.home-row:hover { background: var(--soft); }
.home-row .text { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.home-row strong { font-size: 1rem; font-weight: 700; overflow-wrap: anywhere; }
.home-row .text > span { color: var(--muted); font-size: .875rem; font-weight: 500; }
.home-row > .icon { width: 18px; height: 18px; color: var(--muted); }
.home-check { display: grid; flex: none; place-items: center; width: 36px; height: 36px; border-radius: 50%; background: color-mix(in srgb, var(--ok) 16%, transparent); color: var(--ok); }
.home-check .icon { width: 18px; height: 18px; stroke-width: 3; }
.home-check.part { background: var(--soft); }

/* ---------- the front page of the closed beta: the brand panel | the form, the footer under them
   (design canvas: Aloitussivu: suljettu testivaihe). One light look whatever the theme: a visitor has no settings yet. ---------- */
.auth-page {
  --bg: #f3f4f9; --card: #ffffff; --soft: #eceef4; --line: #c9cfda; --edge: #c9cfda; --text: #131820; --muted: #4e5a66;
  --accent: #1f6f82; --accent-text: #ffffff; --accent-soft: #d9eef2; --accent-soft-text: #0b2f38; --danger: #c8323f; color-scheme: light;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 24px; min-height: 100vh;
  padding: clamp(1rem, 3vw, 2.5rem); background: var(--bg); color: var(--text);
}
.auth { display: flex; flex-wrap: wrap; width: 100%; max-width: 1180px; overflow: hidden; border-radius: 32px; background: var(--card); box-shadow: 0 24px 60px rgb(19 24 32 / .12); }
.auth-brand { position: relative; overflow: hidden; flex: 1.1 1 460px; min-width: 0; display: flex; flex-direction: column; justify-content: space-between; gap: 2.5rem;
  padding: clamp(1.5rem, 4vw, 3.5rem); background: #14505e; color: #ffffff; }
.auth-logo .beta { display: flex; align-items: center; height: 26px; padding: 0 10px; border-radius: 8px; background: #f2b84b; color: #3d2900; font-size: .8125rem; font-weight: 700; letter-spacing: .06em; }
.auth-notice { display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 18px; background: var(--accent-soft); color: var(--accent-soft-text); }
.auth-notice > div { display: flex; flex: 1 1 200px; flex-direction: column; gap: 2px; font-size: .9375rem; line-height: 1.45; }
.auth-notice strong { font-size: 1rem; }
.notice-btn { display: inline-flex; flex: none; align-items: center; gap: 8px; height: 44px; padding: 0 18px; border: 0; border-radius: 22px; background: #ffffff; color: #14505e; font: inherit; font-size: .9375rem; font-weight: 700; cursor: pointer; }
.notice-btn .icon { width: 18px; height: 18px; }
.notice-btn:hover { background: #f3fafb; }
.auth-notice.alert { align-items: flex-start; background: #fbe4e1; color: #7a1c14; }
.auth-notice.alert > div { gap: 6px; }
.auth-notice.alert .notice-btn { align-self: flex-start; margin-top: 4px; background: #7a1c14; color: #ffffff; }
.auth-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 24px; width: 100%; max-width: 1180px; padding: 0 8px; color: var(--muted); font-size: .875rem; }
.auth-foot nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.foot-link { display: inline-flex; align-items: center; min-height: 44px; padding: 0; border: 0; background: none; color: var(--accent); font: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.foot-link:hover { color: #16535f; }

/* The dialogs of the footer links and the forms (views/info.js). */
.dlg { width: min(640px, calc(100vw - 32px)); max-height: min(86vh, 900px); padding: 0; overflow: hidden; border: 0; border-radius: 28px; background: var(--card); color: var(--text); box-shadow: 0 24px 60px rgb(19 24 32 / .25); }
.dlg[open] { display: flex; flex-direction: column; }
.dlg::backdrop { background: rgb(11 47 56 / .45); }
.dlg-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 20px 20px 12px 28px; border-bottom: 1px solid var(--soft); }
.dlg-head h2 { margin: 0; font-size: 1.5rem; font-weight: 700; }
.dlg-x { display: grid; flex: none; place-items: center; width: 44px; height: 44px; padding: 0; border: 0; border-radius: 22px; background: none; color: var(--muted); cursor: pointer; }
.dlg-x:hover { background: var(--soft); color: var(--text); }
.dlg-body { overflow-y: auto; padding: 16px 28px 28px; }
.dlg-doc { font-size: .9375rem; line-height: 1.6; }
.dlg-doc h2 { margin: 22px 0 4px; font-size: 1.0625rem; }
.dlg-doc p, .dlg-doc li { margin: 6px 0; }
.dlg-doc ul { padding-left: 1.25rem; }
.dlg-doc .muted { margin-top: 0; }
.dlg-facts { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; margin: 16px 0; }
.dlg-facts dt { color: var(--muted); font-weight: 600; }
.dlg-facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
@media (max-width: 479px) { .dlg-facts { grid-template-columns: minmax(0, 1fr); gap: 2px; } .dlg-facts dd { margin-bottom: 8px; } }
.dlg-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.dlg-form { display: flex; flex-direction: column; gap: 1rem; }
.dlg-form textarea { width: 100%; min-height: 96px; padding: 12px 16px; border: 1.5px solid var(--edge); border-radius: 14px; background: var(--card); font-size: 1rem; }
.dlg-form textarea:focus { border-color: var(--accent); outline: 0; }
.dlg-form .auth-field .auth-note { margin-top: -2px; }
.dlg-form .auth-btn { margin-top: 4px; }
.dlg-lead { margin: 0; font-size: .9375rem; line-height: 1.5; }
.dlg-error { margin: 0; padding: 10px 14px; border-radius: 12px; background: #fbe4e1; color: #7a1c14; font-size: .9375rem; }
.dlg-done { display: flex; flex-direction: column; align-items: center; padding: 12px 0; text-align: center; }
.dlg-done .done-mark { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: #dff5ec; color: #176b50; }
.dlg-done .done-mark .icon { width: 28px; height: 28px; stroke-width: 2.6; }
.auth-btn.small { height: 48px; padding: 0 22px; font-size: 1rem; }
.auth-btn.small.ghost { margin-top: 0; }
.auth-btn:disabled { opacity: .6; cursor: default; }
.auth-brand::before { content: ""; position: absolute; right: -90px; top: -90px; width: 320px; height: 320px; border-radius: 96px; background: rgb(255 255 255 / .06); transform: rotate(14deg); }
.auth-brand::after { content: ""; position: absolute; left: -70px; bottom: -110px; width: 280px; height: 280px; border-radius: 50%; background: rgb(0 0 0 / .12); }
.auth-brand > * { position: relative; z-index: 1; }
.auth-logo { display: flex; align-items: center; gap: 12px; font-size: 1.5rem; font-weight: 700; }
.auth-logo .mark { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: #ffffff; color: #14505e; }
.auth-pitch { display: flex; flex-direction: column; gap: 2rem; max-width: 520px; }
.auth-pitch h1 { margin: 0; font-size: clamp(2rem, 4vw, 3.25rem); line-height: 1.08; font-weight: 700; letter-spacing: -0.02em; }
.auth-pitch ul { display: flex; flex-direction: column; gap: 1.25rem; margin: 0; padding: 0; list-style: none; }
.auth-pitch li { display: flex; align-items: flex-start; gap: 14px; }
.auth-pitch .ficon { display: grid; flex: none; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: rgb(255 255 255 / .14); }
.auth-pitch li > span:last-child { display: flex; flex-direction: column; gap: 2px; color: #d3e8ed; font-size: .9375rem; line-height: 1.45; }
.auth-pitch strong { color: #ffffff; font-size: 1.0625rem; font-weight: 700; }
.auth-route { display: flex; align-items: center; gap: 4px; max-width: 520px; height: 18px; }
.auth-route .seg { height: 10px; border-radius: 999px; background: rgb(255 255 255 / .3); }
.auth-route .seg.done { background: #ffffff; }
.auth-route .seg.now { height: 18px; background: linear-gradient(90deg, #ffffff 66%, rgb(255 255 255 / .35) 66%); }
.auth-main { flex: 1 1 400px; min-width: 0; display: flex; align-items: center; justify-content: center; padding: clamp(1.5rem, 4vw, 3.5rem); }
.auth-form { display: flex; flex-direction: column; gap: 1.125rem; width: 100%; max-width: 400px; }
.auth-head { display: flex; flex-direction: column; gap: 6px; }
.auth-head h2 { margin: 0; font-size: 2rem; line-height: 1.15; font-weight: 700; letter-spacing: -0.01em; }
.auth-head p { margin: 0; color: var(--muted); font-size: 1rem; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-field label { margin: 0; color: var(--text); font-size: .9375rem; font-weight: 600; }
.auth-field .label-row { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.auth-field .label-row a { font-size: .875rem; font-weight: 600; }
.auth-field input { width: 100%; height: 52px; padding: 0 16px; border: 1.5px solid var(--edge); border-radius: 14px; background: var(--card); font-size: 1rem; }
.auth-field input:focus { border-color: var(--accent); outline: 0; }
.auth-check { display: flex; align-items: center; gap: 12px; min-height: 44px; margin: 0; color: var(--text); font-size: .9375rem; font-weight: 500; cursor: pointer; }
.auth-check input[type=checkbox] { width: 22px; height: 22px; }
.auth-btn { height: 56px; border: 0; border-radius: 28px; background: var(--accent); color: var(--accent-text); font: inherit; font-size: 1.0625rem; font-weight: 700; cursor: pointer; }
.auth-btn:hover { filter: brightness(1.08); }
.auth-btn.ghost { margin-top: -0.5rem; border: 1.5px solid var(--edge); background: none; color: var(--text); font-size: 1rem; }
.auth-btn.ghost:hover { background: var(--soft); filter: none; }
.auth-note { margin: 0; color: var(--muted); font-size: .875rem; line-height: 1.5; }
.auth-note.center { text-align: center; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: .875rem; font-weight: 600; }
.auth-or::before, .auth-or::after { content: ""; flex: 1; height: 1px; background: var(--line); }
/* A phone: the panel shrinks to the name and the promise above the form. */
@media (max-width: 759px) {
  .auth-brand { flex-basis: 100%; gap: 1.25rem; padding: 1.5rem; }
  .auth-pitch ul, .auth-route { display: none; }
  .auth-pitch h1 { font-size: 1.5rem; }
  .auth-main { align-items: flex-start; padding: 1.5rem 1.25rem 2rem; }
  .auth-page { justify-content: flex-start; padding: 12px; }
  .auth { border-radius: 24px; }
  .auth-notice { flex-wrap: wrap; }
  .dlg-head { padding: 16px 12px 10px 20px; }
  .dlg-body { padding: 14px 20px 24px; }
}

/* ---------- narrow screens: the side bar above the page, one pane at a time ---------- */
@media (max-width: 759px) {
  .shell { grid-template-columns: minmax(0, 1fr); }
  .side { position: static; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; height: auto; padding: 14px 16px 10px; }
  .side::before, .side::after { display: none; }
  .side-logo { padding: 0; font-size: 1.25rem; }
  .side-logo .mark { width: 36px; height: 36px; border-radius: 12px; }
  .side-foot { grid-column: 2; grid-row: 1; margin: 0; }
  .side-old, .side-name { display: none; }
  .side-user { padding: 0; gap: 4px; }
  .side-links { grid-column: 1 / -1; flex-direction: row; gap: 4px; margin: 0 -16px; padding: 0 16px 4px; overflow-x: auto; scrollbar-width: none; }
  .side-links a { flex: none; height: 40px; padding: 0 14px; border-radius: 20px; font-size: .9375rem; }
  .side-links a .icon { width: 18px; height: 18px; }
  .page { padding: 16px 16px 40px; }
  .top { margin-bottom: 16px; }
  .tabs { gap: 20px; }
  .cal { gap: 4px; }
  .cal-day { align-items: center; min-height: 52px; padding: 5px 2px; }
  .cal-pill { width: 8px; height: 8px; padding: 0; border-radius: 50%; color: transparent; font-size: 0; }
  .split { grid-template-columns: minmax(0, 1fr); }
  .split.has-detail > .pane-list, .split:not(.has-detail) > .pane-detail { display: none; }
  .pane-list { position: static; max-height: none; }
  .back { display: inline-flex !important; margin-bottom: 12px; }
}

/* "Continue with Google" at the top of the login: Google draws the button in its own frame. */
.google-login { display: flex; flex-direction: column; gap: 1.25rem; }
.google-login .gbtn { display: flex; justify-content: center; min-height: 44px; }
.google-login .auth-note { margin-top: -0.5rem; }
.google-login[hidden] { display: none; }
.color-grid { display: flex; flex-direction: column; gap: 6px; }
.color-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.color-row input[type="color"] { flex: none; width: 56px; height: 40px; padding: 2px; border: 1px solid var(--line); border-radius: 8px; background: none; cursor: pointer; }
h2.with-dot { display: flex; align-items: center; gap: 10px; }

.swatch-btn { width: 28px; height: 28px; padding: 0; border: 1px solid rgba(0, 0, 0, .15); border-radius: 50%; cursor: pointer; }
.swatch-btn[aria-pressed="true"] { outline: 3px solid var(--text); outline-offset: 2px; }
.palettes { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }
.btn.palette { flex-direction: column; align-items: flex-start; gap: 6px; }
.palette-dots { display: flex; flex-wrap: wrap; gap: 3px; }
.palette-ui { display: flex; width: 100%; height: 10px; border-radius: 5px; overflow: hidden; border: 1px solid rgba(0, 0, 0, .12); }
.palette-ui span { flex: 1; }
.palette-dots .dot { width: 12px; height: 12px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .12); }

/* ---------- dragging (dnd.js): grips, ghost, places, "Kumoa" ---------- */
.grip { display: grid; flex: none; place-items: center; width: 22px; height: 30px; color: var(--muted); cursor: grab; touch-action: none; }
.grip svg { width: 12px; height: 18px; }
.dnd-source { opacity: .35; }
.dnd-ghost { position: fixed; left: 0; top: 0; z-index: 1000; display: flex; align-items: center; gap: 10px; padding: 10px 12px 10px 8px; border: 1.5px solid var(--accent); border-radius: 10px; background: var(--card); color: var(--text); font-weight: 600; box-shadow: 0 14px 30px rgba(0, 0, 0, .22); pointer-events: none; }
.dnd-ghost small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
.dnd-ghost .tag { display: none; margin-left: auto; color: var(--danger); font-size: 12px; }
.dnd-ghost.removing { border-color: var(--danger); background: color-mix(in srgb, var(--danger) 12%, var(--card)); }
.dnd-ghost.removing .tag { display: block; }
.dnd-ghost.denied { border-color: var(--danger); }
body.is-dragging, body.is-dragging * { cursor: grabbing !important; user-select: none; }
.flash { animation: dnd-flash 1s ease-out; }
@keyframes dnd-flash { from { background: color-mix(in srgb, var(--accent) 25%, var(--card)); } }
#undo-toast { position: fixed; left: 50%; bottom: calc(20px + env(safe-area-inset-bottom, 0px)); z-index: 1100; display: flex; align-items: center; gap: 14px; max-width: calc(100vw - 32px); padding: 10px 12px 10px 16px; border-radius: 12px; background: var(--text); color: var(--bg); opacity: 0; transform: translate(-50%, 20px); transition: .2s; pointer-events: none; }
#undo-toast.show { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
#undo-toast button { padding: 4px; border: 0; background: none; color: inherit; font: inherit; font-weight: 700; text-decoration: underline; cursor: pointer; }
.x { display: grid; flex: none; place-items: center; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 8px; background: none; color: var(--muted); cursor: pointer; }
.x .icon { width: 16px; height: 16px; }
.x:hover { background: color-mix(in srgb, var(--danger) 14%, transparent); color: var(--danger); }
.segmented { display: flex; gap: 3px; padding: 3px; border-radius: 10px; background: var(--soft); }
.segmented button { display: inline-flex; flex: 1; align-items: center; justify-content: center; gap: 6px; padding: 7px 8px; border: 0; border-radius: 8px; background: none; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--text); box-shadow: 0 1px 2px rgba(0, 0, 0, .1); }
.segmented .count { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

/* An empty place: dashed; marching ants while something that fits it is dragged, or after a click waits for a pick. */
.slot { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 10px 14px; border: 1.5px dashed color-mix(in srgb, var(--muted) 55%, transparent); border-radius: 10px; background: var(--soft); color: var(--muted); cursor: pointer; user-select: none; transition: background-color .15s; }
.slot.add { justify-content: center; min-height: 50px; }
.slot .icon { flex: none; width: 18px; height: 18px; }
.slot strong { display: block; color: var(--text); font-weight: 600; opacity: .75; }
.slot small { display: block; font-size: 12.5px; }
.slot:hover { background: var(--accent-soft); }
.is-dragging .armed .slot, .slot.pending, .is-dragging .pt-card .slot {
  border-color: transparent; background-color: var(--accent-soft); color: var(--accent);
  background-image: linear-gradient(90deg, var(--accent) 55%, transparent 0), linear-gradient(90deg, var(--accent) 55%, transparent 0), linear-gradient(0deg, var(--accent) 55%, transparent 0), linear-gradient(0deg, var(--accent) 55%, transparent 0);
  background-repeat: repeat-x, repeat-x, repeat-y, repeat-y; background-size: 12px 2px, 12px 2px, 2px 12px, 2px 12px;
  background-position: 0 0, 0 100%, 0 0, 100% 0; background-origin: border-box; animation: ants .7s linear infinite;
}
.is-dragging .armed .slot strong, .slot.pending strong { color: var(--accent); opacity: 1; }
@keyframes ants { to { background-position: 12px 0, -12px 100%, 0 -12px, 100% 12px; } }
.over .slot, .over > .brow.slotted { background-color: color-mix(in srgb, var(--accent) 22%, var(--card)); }
.deny .slot, .deny .brow, .pt-card.deny { box-shadow: 0 0 0 2px var(--danger); }
.indicator { position: absolute; left: 0; right: 0; display: none; height: 3px; border-radius: 2px; background: var(--accent); pointer-events: none; }
.indicator::before { content: ""; position: absolute; left: -4px; top: -3px; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); }
.drop-remove { position: absolute; inset: 0; z-index: 2; display: none; place-items: center; padding: 20px; border: 2px dashed var(--danger); border-radius: 14px; background: color-mix(in srgb, var(--danger) 10%, var(--card)); color: var(--danger); font-weight: 600; text-align: center; }
body[data-dragsrc=program] .bank .drop-remove, body[data-dragsrc=client] .client-pool .drop-remove { display: grid; }

/* ---------- the program editor: details | structure + bank ---------- */
.pane-detail { min-width: 0; container: detail / inline-size; }
/* The program editor has three columns of its own, so its page may be wider than the others. */
.content:has(.editor-cols) { max-width: 1880px; }
.editor-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; align-items: start; }
.builder-wrap { min-width: 0; container: builder / inline-size; }
@container detail (min-width: 1080px) { .editor-cols { grid-template-columns: minmax(300px, 360px) minmax(0, 1fr); } }
.share-clients { margin: 6px 0 0; padding: 4px 14px 2px; border: 1px solid var(--line); border-radius: 10px; }
.share-clients legend { padding: 0 6px; color: var(--muted); font-size: 13px; }
.builder { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; align-items: start; }
@container builder (min-width: 640px) { .builder { grid-template-columns: minmax(0, 1.3fr) minmax(250px, 1fr); } }
.zone { margin-top: 16px; }
.zone h3 { margin: 0 0 8px; color: var(--muted); font-size: 13px; font-weight: 600; }
.zone-list { position: relative; display: flex; flex-direction: column; gap: 8px; }
.brow { padding: 6px 8px 6px 4px; border: 1px solid var(--line); border-left: 6px solid var(--ex, var(--line)); border-radius: 10px; background: var(--card); cursor: grab; user-select: none; }
.brow.slotted { border-color: transparent; border-left-color: var(--accent); background: var(--accent-soft); color: var(--accent-soft-text); }
.brow.open { cursor: default; }
.brow-head { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; min-height: 44px; }
.brow .num { flex: none; width: 20px; color: var(--muted); text-align: center; font-variant-numeric: tabular-nums; }
.rname { flex: 1 1 140px; min-width: 0; font-weight: 600; overflow-wrap: break-word; }
.bank-item .rname, .client-row .rname { flex-basis: 0; }
.rname small { display: block; color: var(--muted); font-size: 12.5px; font-weight: 400; }
button.rname { padding: 4px 6px; border: 0; border-radius: 8px; background: none; color: inherit; font: inherit; font-weight: 600; text-align: left; cursor: pointer; }
button.rname:hover { background: var(--soft); }
.dose { display: inline-flex; flex: none; align-items: center; gap: 4px; padding: 3px 8px; border-radius: 6px; background: var(--bg); color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.dose input { width: 58px; padding: 3px 6px; font-size: 13px; }
label.dose { margin: 0; }
.brow .x { margin-left: auto; opacity: 0; }
.brow:hover .x, .brow:focus-within .x, .brow:focus .x { opacity: 1; }
@media (hover: none) { .brow .x { opacity: 1; } }
.brow .pe-body { padding: 4px 6px 6px 36px; cursor: default; }
.hint { margin: 16px 0 0; }
.bank { position: sticky; top: 16px; }
.bank h2 { margin: 0; }
.bank-sub { min-height: 19px; margin: 4px 0 12px; }
.bank-sub.pend { color: var(--accent); font-weight: 600; }
.bank .segmented { margin-bottom: 10px; }
.bank .search { margin-bottom: 10px; }
.bank-list { display: flex; flex-direction: column; gap: 6px; max-height: calc(100vh - 240px); margin: 0; padding: 0 2px 0 0; overflow: auto; list-style: none; }
.bank-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px 8px 6px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; text-align: left; cursor: grab; user-select: none; }
.bank-item:hover { border-color: var(--accent); }
.bank-item .in { color: var(--accent); font-size: 12px; white-space: nowrap; }
.bank-item .plus { display: grid; color: var(--muted); }
.bank-item .plus .icon { width: 16px; height: 16px; }
.bank-list .empty { padding: 10px 4px; }
@container builder (max-width: 639px) { .bank { position: static; } }

/* ---------- Asiakkaat: users | trainers ---------- */
.client-user { cursor: grab; }
.client-user .text { padding: 10px 0; }
.small-select { flex: none; width: auto; padding: 4px 8px; font-size: 13px; }
.pt-board { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; align-items: start; }
.pt-card.over { box-shadow: 0 0 0 2px var(--accent); }
.pt-clients { display: flex; flex-direction: column; gap: 8px; }
.client-row { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 4px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-soft-text); cursor: grab; user-select: none; }
@media (prefers-reduced-motion: reduce) { .is-dragging .armed .slot, .slot.pending, .is-dragging .pt-card .slot, .flash { animation: none; } #undo-toast { transition: none; } }

/* ---------- the new-item button at the top of a list, and the empty state ---------- */
.list-new { padding: 14px 14px 0; }
.list-new + .list-tools { padding-top: 12px; }
.btn-new { display: flex; align-items: center; justify-content: center; gap: 8px; width: 100%; padding: 11px 14px; border: 0; border-radius: 10px; background: var(--accent); color: var(--accent-text); font: inherit; font-weight: 700; cursor: pointer; }
.btn-new:hover { filter: brightness(1.08); }
.btn-new .icon { flex: none; width: 18px; height: 18px; }
.btn-new kbd { margin-left: auto; padding: 3px 7px; border-radius: 5px; background: color-mix(in srgb, var(--accent-text) 18%, transparent); font: 600 11.5px/1 Inter, system-ui, sans-serif; }
@media (hover: none) { .btn-new kbd { display: none; } }
kbd { padding: 3px 6px; border: 1px solid var(--line); border-radius: 5px; background: var(--soft); font: 600 12px/1 Inter, system-ui, sans-serif; }
.empty-state { display: flex; flex-direction: column; align-items: center; padding: 56px 32px; text-align: center; }
.empty-state .empty-icon { display: grid; place-items: center; width: 56px; height: 56px; margin-bottom: 18px; border-radius: 14px; background: var(--soft); }
.empty-state .empty-icon .icon { width: 26px; height: 26px; }
.empty-state h2 { margin: 0 0 6px; font-size: 20px; }
.empty-state > p { max-width: 42ch; margin: 0 0 22px; color: var(--muted); }
.empty-state .btn-new { width: auto; padding: 13px 22px; font-size: 15px; }
.empty-state .alt { margin: 14px 0 0; }

.estimate { display: grid; gap: 2px; margin: 12px 0 4px; padding: 10px 12px; border-radius: 10px; background: var(--accent-soft); }

/* index.html's text before the script has loaded (and for readers without scripts). */
.static-intro { max-width: 640px; margin: 64px auto; padding: 0 16px; line-height: 1.6; }
.static-intro h1 { margin: 0 0 12px; color: var(--accent); font-size: 2rem; }

/* Käyttäjät > Viestit: the page's form messages. */
.msg-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 12px; }
.msg-time { margin-left: auto; }
.msg-kind.invite { background: var(--accent-soft); color: var(--accent-soft-text); }
.msg-text { white-space: pre-wrap; overflow-wrap: anywhere; }
.msg-meta { margin: 4px 0 0; }
.msg.done { opacity: .7; }
