/* ============================================================================
 * Suunta.ai Landing v2 — Product Surfaces (LIGHT mock frames, 2026-05-21)
 * ----------------------------------------------------------------------------
 * V2.3-uudistus: Mockit ovat nyt LIGHT-themalla (matchaa sovelluksen oletus
 * theme:a). Surfaces-section pysyy DARK-anchorina, mutta light-framet loistavat
 * sen päällä (Stripe-tyyli).
 *
 * Sisältö on FIKTIIVINEN (käyttäjäpäätös) — ei kopioita sovelluksen
 * screenshoteista. Visuaalinen kieli (komponentit, värit, hierarkia) on
 * autenttinen.
 *
 * Komponentit:
 *   .v2-surface              — base light browser frame
 *   .v2-surface__chrome      — title bar + traffic lights + URL
 *   .v2-surface__sidebar     — sovelluksen sidebar-rail (Hero-mock vain)
 *   .v2-surface__body        — content area
 *   .v2-surface__inner-tabs  — sovelluksen sisäiset tabit
 *   .v2-surface__stat-grid   — stat-tile-rivi
 *   .v2-surface__tile        — yksittäinen stat-tile
 *   .v2-surface__donut       — SVG donut chart
 *   .v2-surface__progress    — progress bar (color-variants)
 *   .v2-surface__ai-card     — Suunta noticed -kortti (amber-tinted)
 *   .v2-surface__bubble      — chat bubble (user / AI)
 *   .v2-surface__goal-card   — kvartaali-tavoite kortti (KR-rivit)
 *   .v2-surface__chip        — suggestion chip
 *   .v2-surface__big-text    — hero-tekstit (chat empty state)
 * ============================================================================ */

/* ════════════════════════════════════════════════════════════════════════
 * Section-level layout (header + intro)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surfaces__head {
  text-align: center;
  max-width: 760px;
  margin-inline: auto;
  margin-bottom: var(--space-12);
}

.v2-surfaces__head h2 { margin-top: var(--space-4); }
.v2-surfaces__head .lead { margin-top: var(--space-6); }

/* ─── Editorial-intro: kerrostuma-figuuri + teesi (2026-06-04) ────────
 * kerrostuma = pinotut tasot = "one living system". VASEN figuuri ankkuroi
 * väitteen, OIKEA teksti. Mobile: figuuri päällä keskitettynä, teksti alla. */
.v2-surfaces__intro {
  display: grid;
  grid-template-columns: 1fr;
  justify-items: center;
  gap: var(--space-8);
  margin-bottom: var(--space-16);
}

@media (min-width: 1024px) {
  /* Keskitetty lockup: teksti + figuuri lähekkäin, ryhmä keskitettynä
     (2026-06-04 korjaus: 1fr-sarake venytti tekstin reunaan ja jätti ison
     raon keskelle). Figuuri OIKEALLA, teksti vasen-tasattu. */
  .v2-surfaces__intro {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: var(--space-12);
    max-width: 920px;
    margin-inline: auto;
  }

  .v2-surfaces__intro .v2-surfaces__head {
    text-align: left;
    margin: 0;
    max-width: 560px;
  }

  .v2-surfaces__intro .v2-surfaces__fig {
    flex-shrink: 0;
  }
}

/* ─── kerrostuma-figuuri ──────────────────────────────────────────────
 * DARK: sf-pinnat baked-dark antavat 3D-muodon, reunat = currentColor
 * (light-slate, stroke-opacity 0.5), ylälaatan upotettu merkki → emerald. */
.v2-surfaces__fig {
  width: 100%;
  max-width: 200px;
  justify-self: center;
  /* currentColor ajaa reunaviivat — vaalea slate tummaa taustaa vasten */
  color: rgba(255, 255, 255, 0.42);
}

@media (min-width: 1024px) {
  .v2-surfaces__fig {
    max-width: 240px;
  }
}

.v2-surfaces__fig svg path:not([class]) {
  fill: var(--emerald-500);
  fill-opacity: 0.18;
  stroke: var(--emerald-400);
  stroke-opacity: 0.95;
}

/* ════════════════════════════════════════════════════════════════════════
 * Light browser frame — base
 * ════════════════════════════════════════════════════════════════════════ */

/* Yksi accent kaikkialla — emerald. V3 polish (käyttäjäpäätös):
   ei per-surface accent-värejä, pidetään mockit yhtenäisen elegantteina.
   Dataviz-värit (donut-segments: Ready/InProgress/Selected/Unexplored)
   säilyvät statusmerkityksinä — niillä on oma kategoria, ei surface-väri. */
.v2-surface {
  --surface-accent: #10b981;
  --surface-accent-soft: rgba(16, 185, 129, 0.10);
  --surface-accent-rim: rgba(16, 185, 129, 0.30);
  --surface-accent-text: #34d399;
  --surface-accent-halo: rgba(16, 185, 129, 0.10);

  position: relative;
  background: #0d1420;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 12px;
  overflow: hidden;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.06) inset,
    0 0 60px -20px var(--surface-accent-halo),
    0 30px 60px -20px rgba(0, 0, 0, 0.56),
    0 12px 24px -10px rgba(0, 0, 0, 0.29);
  color: rgba(255, 255, 255, 0.92);
  transition: box-shadow var(--transition-hover);
}

/* HUOM: .v2-surface--home/strategy/execution/chat/notes -modifierit
   säilyvät HTML:ssä mutta EI enää määritellä per-color override:ja täällä.
   Modifierit toimivat semanttisina hooks:ena jos tulevaisuudessa tarvitaan
   per-panel adjustment. Defaultti = emerald. */

/* Light catcher rim — top edge */
.v2-surface::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.10) 50%,
    transparent
  );
  pointer-events: none;
  z-index: 1;
}

/* Chrome */
.v2-surface__chrome {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: #121b29;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-surface__dots {
  display: flex;
  gap: 6px;
}

.v2-surface__dots span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 0.5px rgba(0, 0, 0, 0.15);
}

.v2-surface__dots span:nth-child(1) { background: #ff5f57; }
.v2-surface__dots span:nth-child(2) { background: #febc2e; }
.v2-surface__dots span:nth-child(3) { background: #28c840; }

.v2-surface__url {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  height: 24px;
  padding: 0 var(--space-3);
  background: #0d1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 6px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  max-width: 320px;
  margin-inline: auto;
  font-variant-numeric: tabular-nums;
}

.v2-surface__url i {
  font-size: 10px;
  color: rgba(52, 211, 153, 0.90);
}

.v2-surface__actions {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  color: rgba(255, 255, 255, 0.42);
  font-size: 12px;
}

/* Body — sisältöalue.
   V3 polish: tiiviimpi padding + pienempi min-height jotta mock-selain
   ei dominoi pystysuunnassa. Aikaisempi min-height: 360px aiheutti ison
   "raon" lyhyemmillä paneeleilla (Chat, Home). */
.v2-surface__body {
  padding: var(--space-5);
  min-height: 280px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

/* Hero-mock-erikoismuoto: sidebar + content rinnakkain */
.v2-surface__shell {
  display: grid;
  grid-template-columns: 56px 1fr;
  min-height: 300px;
}

/* ════════════════════════════════════════════════════════════════════════
 * Sidebar rail — vain Hero-mock käyttää
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__sidebar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: var(--space-4) 0;
  background: #121b29;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-surface__sidebar-logo {
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: rgba(16, 185, 129, 0.12);
  border-radius: 8px;
  color: var(--emerald-700, #34d399);
  font-weight: var(--weight-medium);
  font-size: 12px;
  margin-bottom: var(--space-3);
}

.v2-surface__sidebar-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  color: rgba(255, 255, 255, 0.48);
  font-size: 14px;
  transition: background var(--transition), color var(--transition);
}

.v2-surface__sidebar-icon.is-active {
  background: rgba(16, 185, 129, 0.12);
  color: var(--emerald-700, #34d399);
}

.v2-surface__sidebar-sep {
  width: 24px;
  height: 1px;
  background: rgba(255, 255, 255, 0.09);
  margin-block: var(--space-2);
}

/* ════════════════════════════════════════════════════════════════════════
 * Greeting + eyebrow block
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.v2-surface__eyebrow i {
  color: rgba(255, 255, 255, 0.42);
  font-size: 0.875em;
}

.v2-surface__greeting {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.v2-surface__title {
  font-size: 24px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.15;
}

.v2-surface__subtitle {
  font-size: 13px;
  color: rgba(255, 255, 255, 0.62);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════
 * Stat tiles — 4-5 stat-rivi
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__stat-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-3);
}

@media (min-width: 640px) {
  .v2-surface__stat-grid--4 { grid-template-columns: repeat(4, 1fr); }
  .v2-surface__stat-grid--5 { grid-template-columns: repeat(5, 1fr); }
}

.v2-surface__tile {
  padding: var(--space-3);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.v2-surface__tile-label {
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.v2-surface__tile-label i {
  font-size: 0.875em;
  color: rgba(255, 255, 255, 0.42);
}

.v2-surface__tile-value {
  font-size: 22px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
}

.v2-surface__tile-unit {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.48);
}

/* ════════════════════════════════════════════════════════════════════════
 * Snapshot card — strategy snapshot (Hero + Home)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__snapshot {
  padding: var(--space-4);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  display: flex;
  flex-direction: column;
  gap: var(--space-4);
}

.v2-surface__snapshot-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-3);
}

.v2-surface__snapshot-title {
  font-size: 11px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.62);
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.v2-surface__snapshot-title i {
  color: var(--surface-accent);
  font-size: 0.875em;
}

.v2-surface__snapshot-meta {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.48);
}

.v2-surface__snapshot-hero {
  display: flex;
  align-items: baseline;
  gap: var(--space-3);
}

.v2-surface__snapshot-num {
  font-size: 28px;
  font-weight: var(--weight-medium);
  letter-spacing: -0.02em;
  color: rgba(255, 255, 255, 0.92);
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.v2-surface__snapshot-desc {
  font-size: 12px;
  color: rgba(255, 255, 255, 0.62);
  line-height: 1.4;
}

.v2-surface__bars {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.v2-surface__bar-row {
  display: grid;
  grid-template-columns: 1fr 60px 36px;
  align-items: center;
  gap: var(--space-3);
  font-size: 12px;
}

.v2-surface__bar-label {
  color: rgba(255, 255, 255, 0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-surface__bar {
  position: relative;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.v2-surface__bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--surface-accent);
  border-radius: var(--radius-full);
  transition: width 720ms cubic-bezier(0.16, 1, 0.3, 1);   /* §5 breath: täyttyy 0→target */
}

/* Color variants — explicit semantic colors riippumatta surface:n omasta accent:sta */
.v2-surface__bar-fill--emerald  { background: #10b981; }
.v2-surface__bar-fill--gold     { background: #eab308; }
.v2-surface__bar-fill--rose     { background: #f43f5e; }
.v2-surface__bar-fill--lavender { background: #8b5cf6; }
.v2-surface__bar-fill--indigo   { background: #6366f1; }
.v2-surface__bar-fill--teal     { background: #14b8a6; }
.v2-surface__bar-fill--cyan     { background: #06b6d4; }
.v2-surface__bar-fill--blue     { background: #3b82f6; }

.v2-surface__bar-pct {
  font-variant-numeric: tabular-nums;
  text-align: right;
  color: rgba(255, 255, 255, 0.62);
}

/* ════════════════════════════════════════════════════════════════════════
 * AI tip / nudge card — Suunta noticed
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__ai-card {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: linear-gradient(
    90deg,
    rgba(234, 179, 8, 0.10),
    rgba(234, 179, 8, 0.04) 60%,
    transparent
  );
  border-left: 2px solid #eab308;
  border-radius: 6px;
}

/* AI-card accent-variant käyttää --surface-accent (per surface) */
.v2-surface__ai-card--accent {
  background: linear-gradient(
    90deg,
    var(--surface-accent-soft),
    var(--surface-accent-soft) 8%,
    transparent
  );
  border-left-color: var(--surface-accent);
}

.v2-surface__ai-card i {
  color: #eab308;
  font-size: 14px;
  margin-top: 2px;
  flex-shrink: 0;
}

.v2-surface__ai-card--accent i { color: var(--surface-accent); }

.v2-surface__ai-label {
  display: block;
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
  margin-bottom: 2px;
}

.v2-surface__ai-card--accent .v2-surface__ai-label { color: var(--surface-accent-text); }

.v2-surface__ai-card p {
  font-size: 13px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.80);
  margin: 0;
}

/* ════════════════════════════════════════════════════════════════════════
 * Inner-tabs (sovelluksen sisäiset tabit)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__inner-tabs {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: var(--space-2);
}

.v2-surface__inner-tab {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) 0;
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.58);
  letter-spacing: var(--tracking-tight);
  background: none;
  border: 0;
  cursor: default;
}

.v2-surface__inner-tab i { font-size: 10px; }

.v2-surface__inner-tab.is-active {
  color: rgba(255, 255, 255, 0.92);
}

.v2-surface__inner-tab.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 2px;
  background: var(--surface-accent);
  border-radius: 1px;
}

.v2-surface__inner-tab-badge {
  font-size: 8px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--surface-accent-text);
  background: var(--surface-accent-soft);
  padding: 1px 5px;
  border-radius: 3px;
}

/* ════════════════════════════════════════════════════════════════════════
 * Strategy donut — V3 canonical pattern (conic-gradient + hole)
 *
 * Matchaa sovelluksen Strategy Home -donut:in toteutusta (CSS conic, EI SVG).
 * Ref: app/static/js/pages/strategy/strategy-home.js + DATA-VIZ.md §"Donut".
 *
 * Semanttinen korjaus: aiempi "28% EXPLORED" oli väärä. Numerot ovat
 * 22 + 12 + 31 + 45 = 110, ja explored = 22+12+31 = 65 = 59%. Center-luku
 * näyttää nyt 59% explored — vastaa todellisuutta.
 *
 * Värit (matchaa STYLEGUIDE accent-text-* tokens):
 *   Ready       — emerald (#10b981 / accent-text-emerald)
 *   In progress — gold    (#f59e0b / accent-text-gold)
 *   Selected    — indigo  (#6366f1 / accent-text-indigo)
 *   Unexplored  — slate   (rgba(148, 163, 184,0.20))
 *
 * Toteutus: yksi <div> jolla conic-gradient + sisempi "hole" -div joka
 * peittää keskikohdan ja näyttää center-luvun + label.
 *
 * Animaatio: scale + rotate reveal (kuten sovelluksen donut).
 * Legend: stagger 80ms per rivi, "big-number-first" hierarkia.
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__donut-row {
  display: grid;
  grid-template-columns: 132px 1fr;
  gap: var(--space-6);
  align-items: center;
  padding: var(--space-3) 0;
}

/* Donut — conic-gradient + hole pattern */
.v2-surface__strategy-donut {
  position: relative;
  width: 132px;
  height: 132px;
  border-radius: 50%;
  flex-shrink: 0;
  background: conic-gradient(
    from -90deg,
    #10b981 0% var(--ready-end, 20%),
    #f59e0b var(--ready-end, 20%) var(--progress-end, 31%),
    #6366f1 var(--progress-end, 31%) var(--selected-end, 59%),
    rgba(148, 163, 184, 0.22) var(--selected-end, 59%) 100%
  );
  /* Reveal animation — scale + rotate sovelluksen tyyliin */
  opacity: 0;
  transform: scale(0.78) rotate(-120deg);
  transition:
    opacity 500ms ease 200ms,
    transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1) 200ms;
}

/* Panel-aktivointi triggeröi reveal */
.v2-surfaces-panel.is-active .v2-surface__strategy-donut,
[data-animate].is-visible .v2-surface__strategy-donut {
  opacity: 1;
  transform: scale(1) rotate(0deg);
}

/* Hole — sisempi valkoinen ympyrä joka muodostaa donut-renkaan */
.v2-surface__strategy-donut__hole {
  position: absolute;
  inset: 21px;                                     /* = donut-renkaan paksuus ~21px */
  border-radius: 50%;
  background: #0d1420;
  box-shadow:
    inset 0 2px 10px rgba(0, 0, 0, 0.1),
    inset 0 1px 4px rgba(0, 0, 0, 0.06);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}

/* Center number — iso bold, tabular */
.v2-surface__strategy-donut__num {
  color: rgba(255, 255, 255, 0.92);
  font-size: 28px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: baseline;
}

.v2-surface__strategy-donut__num small {
  color: rgba(255, 255, 255, 0.52);
  font-size: 14px;
  font-weight: 500;
  margin-left: 2px;
}

/* Center label — UPPERCASE eyebrow alimmaisena */
.v2-surface__strategy-donut__label {
  margin-top: 5px;
  color: rgba(255, 255, 255, 0.58);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

/* ─── Legend — "big-number-first" hierarkia ──────────────────────────── *
 * Pattern: numero ISO oikealla, label + desc vasemmalla.
 * Sovelluksen Strategy Home -tyyli.
 */
.v2-surface__strategy-legend {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.v2-surface__strategy-legend-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: var(--space-4);
  align-items: baseline;
  padding: 6px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  /* Staggered reveal — kunkin rivin :nth-child indeksi delays */
  opacity: 0;
  transform: translateY(4px);
  transition:
    opacity 360ms ease,
    transform 360ms cubic-bezier(0.4, 0, 0.2, 1);
}

.v2-surface__strategy-legend-row:last-child { border-bottom: 0; }

.v2-surfaces-panel.is-active .v2-surface__strategy-legend-row:nth-child(1) { opacity: 1; transform: none; transition-delay: 400ms; }
.v2-surfaces-panel.is-active .v2-surface__strategy-legend-row:nth-child(2) { opacity: 1; transform: none; transition-delay: 480ms; }
.v2-surfaces-panel.is-active .v2-surface__strategy-legend-row:nth-child(3) { opacity: 1; transform: none; transition-delay: 560ms; }
.v2-surfaces-panel.is-active .v2-surface__strategy-legend-row:nth-child(4) { opacity: 1; transform: none; transition-delay: 640ms; }

/* Left side: label + desc */
.v2-surface__strategy-legend-label {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.v2-surface__strategy-legend-title {
  font-size: 12px;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.90);
  letter-spacing: -0.01em;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

/* Color dot vasemalla labelin yhteydessä — segmenttiä matchaava */
.v2-surface__strategy-legend-title::before {
  content: '';
  width: 7px;
  height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.v2-surface__strategy-legend-row--emerald .v2-surface__strategy-legend-title::before { background: #10b981; }
.v2-surface__strategy-legend-row--gold    .v2-surface__strategy-legend-title::before { background: #f59e0b; }
.v2-surface__strategy-legend-row--indigo  .v2-surface__strategy-legend-title::before { background: #6366f1; }
.v2-surface__strategy-legend-row--slate   .v2-surface__strategy-legend-title::before { background: rgba(148, 163, 184, 0.60); }

.v2-surface__strategy-legend-desc {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.52);
  margin-left: 13px;             /* line up with title after color-dot offset */
  letter-spacing: 0.005em;
}

/* Right side: big number — tabular, accent-colored */
.v2-surface__strategy-legend-count {
  font-size: 20px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.02em;
  line-height: 1;
  text-align: right;
}

.v2-surface__strategy-legend-row--emerald .v2-surface__strategy-legend-count { color: #34d399; }
.v2-surface__strategy-legend-row--gold    .v2-surface__strategy-legend-count { color: #fbbf24; }
.v2-surface__strategy-legend-row--indigo  .v2-surface__strategy-legend-count { color: #818cf8; } /* indigo-400: 700 jäi dark-muunnoksesta, 2.06-kontrasti */
.v2-surface__strategy-legend-row--slate   .v2-surface__strategy-legend-count { color: rgba(255, 255, 255, 0.52); }

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  .v2-surface__strategy-donut,
  .v2-surface__strategy-legend-row {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  /* §5 breath: palkit eivät animoidu reduced-motion -tilassa (JS ei myöskään
     primeä niitä 0:aan → inline-target-leveys näkyy heti, ei jää 0:aan). */
  .v2-surface__bar-fill,
  .v2-surface__big-bar-fill {
    transition: none !important;
  }
}

/* ════════════════════════════════════════════════════════════════════════
 * Progress big bar (Execution)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__big-bar {
  height: 6px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.v2-surface__big-bar-fill {
  height: 100%;
  background: var(--accent);
  border-radius: var(--radius-full);
  transition: width 720ms cubic-bezier(0.16, 1, 0.3, 1);   /* §5 breath: täyttyy 0→target */
}

/* ════════════════════════════════════════════════════════════════════════
 * Goal card (Execution kvartaali-tavoite)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__goal {
  padding: var(--space-4);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-left: 2px solid #eab308;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

.v2-surface__goal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.v2-surface__goal-badge {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
}

.v2-surface__goal-badge::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #eab308;
}

.v2-surface__goal-pct {
  font-size: 18px;
  font-weight: var(--weight-medium);
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
}

.v2-surface__goal-title {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
}

.v2-surface__goal-krs {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-surface__goal-kr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  font-size: 12px;
}

.v2-surface__goal-kr-label {
  color: rgba(255, 255, 255, 0.70);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.v2-surface__goal-kr-value {
  font-variant-numeric: tabular-nums;
  color: #fbbf24;
  font-weight: var(--weight-medium);
  font-size: 11px;
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.v2-surface__goal-kr-value::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #eab308;
}

/* ════════════════════════════════════════════════════════════════════════
 * Chat — empty state & bubbles
 * ════════════════════════════════════════════════════════════════════════ */

/* ════════════════════════════════════════════════════════════════════════
 * Chat empty-state — V3 premium-minimalistinen rebuild
 *
 * Premium-design: kevyt typografia, hillitty input (hairline + soft focus,
 * ei aggressive glow-rim), yhtenäinen chip-layout, tasapainoinen spacing.
 * Linear/Cron-tyyli: ei mitään ylimääräistä.
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__chat-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--space-5);
  padding: var(--space-6) var(--space-4) var(--space-5);
  text-align: center;
}

/* Hero text — kevyempi, elegantti */
.v2-surface__chat-hero {
  font-size: 20px;
  font-weight: 500;                     /* medium (oli "weight-medium" = sama mutta varmistettu) */
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: rgba(255, 255, 255, 0.92);
  max-width: 380px;
  margin: 0;
}

.v2-surface__chat-hero .text-accent {
  color: #34d399;
  font-weight: 500;
}

/* Input — sovelluksen Chat input matchaa.
   - Pyöreä + nappi laatikkomaisella borderilla vasemmalla (ei pelkkä icon)
   - Placeholder keskemmällä
   - Pyöreä send-nappi oikealla (neutraalin harmaa)
   - Input on PILL-muoto (radius 12px)
   - Subtle emerald glow ympärillä — Suunta brand mutta ei dominoiva */
.v2-surface__chat-input {
  width: 100%;
  max-width: 460px;
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px 6px 6px var(--space-2);
  background: #0d1420;
  border: 1px solid rgba(16, 185, 129, 0.25);
  border-radius: 12px;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.04);
  transition: border-color var(--transition-hover), box-shadow var(--transition-hover);
}

.v2-surface__chat-input:hover {
  border-color: rgba(16, 185, 129, 0.40);
  box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.06);
}

/* + nappi — pyöreä laatikkomainen nappi, ei pelkkä icon */
.v2-surface__chat-input-plus {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.62);
  font-size: 13px;
  flex-shrink: 0;
  transition: border-color var(--transition-hover), background var(--transition-hover), color var(--transition-hover);
}

.v2-surface__chat-input-plus:hover {
  border-color: rgba(255, 255, 255, 0.18);
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.88);
}

.v2-surface__chat-input-placeholder {
  flex: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.52);
  text-align: left;
  letter-spacing: -0.005em;
  padding-inline: var(--space-2);
}

/* Send button — pyöreä emerald-soft (matchaa sovelluksen send-icon:ia).
   Sovelluksessa send on AINA emerald koska se on primary action. Hairline
   border + emerald fill + valkoinen arrow. */
.v2-surface__chat-input-send {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  border: 0;
  background: #10b981;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #0d1420;
  font-size: 13px;
  flex-shrink: 0;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  box-shadow: 0 2px 6px rgba(16, 185, 129, 0.30);
  transition: background var(--transition-hover), box-shadow var(--transition-hover);
}

.v2-surface__chat-input-send:hover {
  background: #34d399;
  box-shadow: 0 4px 10px rgba(16, 185, 129, 0.40);
}

/* Controls-rivi: Vastaustyyli + Auto -valitsijat input:n alapuolella.
   Sovelluksen pattern — antaa "advanced control" -tunteen ilman häiriötä. */
.v2-surface__chat-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-3);
}

.v2-surface__chat-control {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: 6px var(--space-3);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-full);
  font-family: inherit;
  font-size: 12px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: -0.005em;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color var(--transition-hover), color var(--transition-hover), background var(--transition-hover);
}

.v2-surface__chat-control:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
  background: rgba(255, 255, 255, 0.04);
}

.v2-surface__chat-control i:first-child {
  font-size: 10px;
  color: rgba(255, 255, 255, 0.58);
}

.v2-surface__chat-control i:last-child {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.48);
  margin-left: 2px;
}

/* ─── Prompt suggestion chips — yhtenäinen, elegantti ──────────────── */
.v2-surface__chips {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: var(--space-2);
  width: 100%;
  max-width: 440px;
}

/* Chip-suggestion = pyöreä hairline-painike, vasen alignment, ei näytä
   kuin "tag" vaan kuin "valinta lista". Linear-tyyli. */
.v2-surface__chip {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  padding: 10px var(--space-4);
  background: #0d1420;
  border: 1px solid rgba(255, 255, 255, 0.09);
  border-radius: 10px;
  font-family: inherit;
  font-size: 13px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.82);
  letter-spacing: -0.005em;
  text-align: left;
  line-height: 1.4;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition:
    border-color var(--transition-hover),
    background var(--transition-hover),
    color var(--transition-hover),
    transform var(--transition-hover);
}

.v2-surface__chip i {
  color: rgba(255, 255, 255, 0.42);
  font-size: 11px;
  flex-shrink: 0;
}

.v2-surface__chip:hover {
  border-color: rgba(255, 255, 255, 0.16);
  background: #121b29;
  color: rgba(255, 255, 255, 0.95);
  transform: translateY(-1px);
}

.v2-surface__chip:hover i {
  color: var(--surface-accent-text);
}

.v2-surface__chip i {
  color: var(--accent);
  font-size: 10px;
}

/* Chat bubbles (käytetään myös Languages-osiossa) */
.v2-surface__bubble {
  padding: var(--space-3) var(--space-4);
  border-radius: 10px;
  font-size: 13px;
  line-height: 1.5;
  max-width: 85%;
}

.v2-surface__bubble--user {
  background: var(--accent);
  color: var(--text-on-accent);              /* AINA tumma — golden rule */
  margin-left: auto;
  border-bottom-right-radius: 4px;
}

.v2-surface__bubble--ai {
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.86);
  border-bottom-left-radius: 4px;
}

.v2-surface__chat {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}

/* ════════════════════════════════════════════════════════════════════════
 * Notes — workspace items (mini table + link card)
 * ════════════════════════════════════════════════════════════════════════ */

.v2-surface__notes-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: 11px;
  color: rgba(255, 255, 255, 0.52);
}

.v2-surface__notes-input {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-3) var(--space-4);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  font-size: 12px;
  color: rgba(255, 255, 255, 0.48);
}

.v2-surface__notes-toggle {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  padding-bottom: var(--space-2);
}

.v2-surface__notes-toggle-item {
  position: relative;
  padding: var(--space-1) 0;
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: var(--tracking-tight);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.v2-surface__notes-toggle-item i { font-size: 8px; }

.v2-surface__notes-toggle-item.is-active {
  color: var(--accent-text);
}

.v2-surface__notes-toggle-item.is-active::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  bottom: -3px;
  height: 1px;
  background: var(--accent);
}

.v2-surface__notes-section-title {
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.52);
}

.v2-surface__notes-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-3);
}

.v2-surface__note {
  padding: var(--space-3);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}

.v2-surface__note-title {
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.3;
}

.v2-surface__note-table {
  display: grid;
  grid-template-columns: 1fr 60px 50px 50px;
  gap: 4px 6px;
  font-size: 9px;
}

.v2-surface__note-table-h {
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
  padding-bottom: 4px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.v2-surface__note-table-c {
  color: rgba(255, 255, 255, 0.70);
  font-variant-numeric: tabular-nums;
  padding-block: 2px;
}

.v2-surface__note-link {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.52);
}

.v2-surface__note-link i { font-size: 0.875em; }

.v2-surface__note-meta {
  font-size: 9px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.42);
  margin-top: auto;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

/* ════════════════════════════════════════════════════════════════════════
 * V2.5 — Sovelluksen styleguiden mukaiset uudet komponentit
 * ════════════════════════════════════════════════════════════════════════ */

/* ─── Status pill (Riskissä / On track / Kesken) ──────────────────────── */
.v2-surface__status-pill {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1);
  padding: 2px var(--space-2);
  border-radius: var(--radius-full);
  font-size: 10px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.v2-surface__status-pill--risk {
  background: rgba(245, 158, 11, 0.12);
  color: #fbbf24;
}

.v2-surface__status-pill--track {
  background: rgba(16, 185, 129, 0.12);
  color: #34d399;
}

.v2-surface__status-pill--draft {
  background: rgba(255, 255, 255, 0.08);
  color: rgba(255, 255, 255, 0.62);
}

.v2-surface__status-pill::before {
  content: '';
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
}

/* ─── Avatar stack (omistajat) ───────────────────────────────────────── */
.v2-surface__avatars {
  display: inline-flex;
  align-items: center;
}

.v2-surface__avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: 2px solid #0d1420;
  background: var(--surface-accent-soft);
  color: var(--surface-accent-text);
  font-size: 9px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.02em;
}

.v2-surface__avatar + .v2-surface__avatar { margin-left: -6px; }

/* Avatar-väri-variantit per omistaja (semantic) */
.v2-surface__avatar--em { background: rgba(16, 185, 129, 0.18); color: #34d399; }
.v2-surface__avatar--in { background: rgba(99, 102, 241, 0.18); color: #4338ca; }
.v2-surface__avatar--tl { background: rgba(20, 184, 166, 0.18); color: #2dd4bf; }
.v2-surface__avatar--rs { background: rgba(244, 63, 94, 0.18);  color: #fb7185; }
.v2-surface__avatar--gd { background: rgba(245, 158, 11, 0.18); color: #fbbf24; }

/* ─── KR-rivi (key result with progress + value) ───────────────────────── */
.v2-surface__kr {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-2) 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  font-size: 12px;
}

.v2-surface__kr:last-child { border-bottom: 0; }

.v2-surface__kr-label {
  color: rgba(255, 255, 255, 0.78);
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
}

.v2-surface__kr-label-text {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v2-surface__kr-bar {
  position: relative;
  flex-shrink: 0;
  width: 60px;
  height: 3px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.v2-surface__kr-bar-fill {
  position: absolute;
  inset: 0 auto 0 0;
  background: var(--surface-accent);
  border-radius: var(--radius-full);
}

.v2-surface__kr-value {
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  font-weight: var(--weight-medium);
  font-size: 11px;
  flex-shrink: 0;
}

/* ─── Goal-card (kvartaali-tavoite) — sovelluksen style ───────────────── */
.v2-surface__goal-v2 {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #121b29;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  position: relative;
  overflow: hidden;
}

/* Accent-stripe ::before (status-color, kuten sovelluksen accent border) */
.v2-surface__goal-v2::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 36%;
  background: #eab308;
  border-radius: 0 2px 2px 0;
}

.v2-surface__goal-v2--track::before { background: #10b981; }

.v2-surface__goal-v2-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
}

.v2-surface__goal-v2-title {
  font-size: 13px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.92);
  line-height: 1.4;
  padding-left: var(--space-2);
}

.v2-surface__goal-v2-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-2);
  border-top: 1px solid rgba(255, 255, 255, 0.07);
  margin-top: var(--space-1);
}

.v2-surface__goal-v2-meta {
  display: inline-flex;
  align-items: center;
  gap: var(--space-3);
  font-size: 10px;
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.04em;
}

.v2-surface__goal-v2-meta i { font-size: 9px; }

/* ─── Composer input (Chat / Notes) ────────────────────────────────────── */
.v2-surface__composer {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding: var(--space-3) var(--space-4);
  background: #0d1420;
  border: 1px solid var(--surface-accent-rim);
  border-radius: 12px;
  box-shadow: 0 0 0 4px var(--surface-accent-soft);
  transition: border-color var(--transition-hover), box-shadow var(--transition-hover);
}

.v2-surface__composer:hover {
  border-color: var(--surface-accent);
  box-shadow: 0 0 0 5px var(--surface-accent-soft);
}

.v2-surface__composer-icon {
  color: rgba(255, 255, 255, 0.48);
  font-size: 13px;
  flex-shrink: 0;
}

.v2-surface__composer-text {
  flex: 1;
  font-size: 13px;
  color: rgba(255, 255, 255, 0.52);
}

.v2-surface__composer-send {
  width: 26px;
  height: 26px;
  border-radius: var(--radius-full);
  background: var(--surface-accent);
  color: #0d1420;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  flex-shrink: 0;
}

/* ─── Context chips row (Chat) — V3 polish ──────────────────────────────
 * Sovelluksen Chat tarjoaa kontekstin AI:lle. Visuaalisesti se on
 * SUBTLE: pieni "Using:" label + 3 chipiä. Käyttäjälle viesti: "tämä on
 * mitä AI tietää, voit lisätä tai poistaa".
 *
 * Premium-design: micro-typografia, hairline-pillit (ei emerald-tinttejä),
 * keskitetty layout. */
.v2-surface__context-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-2);
  flex-wrap: wrap;
  font-size: 11px;
}

.v2-surface__context-label {
  font-size: 11px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.50);
  letter-spacing: -0.005em;
}

.v2-surface__chip-context {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 22px;
  padding: 0 var(--space-2);
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: var(--radius-full);
  font-size: 11px;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: -0.005em;
  cursor: default;
  transition: border-color var(--transition-hover), color var(--transition-hover);
}

.v2-surface__chip-context:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.92);
}

.v2-surface__chip-context i {
  font-size: 9px;
  color: rgba(255, 255, 255, 0.48);
}

/* ─── Type toggle row (Notes — Muistiinpano / Linkki / Lista / Kysymys) ─ */
.v2-surface__type-row {
  display: flex;
  align-items: center;
  gap: var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}

.v2-surface__type {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.52);
  letter-spacing: 0.02em;
  position: relative;
  padding-bottom: 4px;
}

.v2-surface__type i { font-size: 9px; }

.v2-surface__type.is-active {
  color: var(--surface-accent-text);
}

.v2-surface__type.is-active::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--surface-accent);
}

/* ─── View switcher (Notes — grid / list / search) ────────────────────── */
.v2-surface__view-switcher {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 2px;
  background: rgba(255, 255, 255, 0.06);
  border-radius: var(--radius-md);
}

.v2-surface__view-icon {
  width: 22px;
  height: 22px;
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, 0.48);
  font-size: 10px;
}

.v2-surface__view-icon.is-active {
  background: #0d1420;
  color: var(--surface-accent-text);
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* ─── Module card (Strategia — Operations 30% etc.) — V2.6 premium ────── *
 * Sovelluksen "JATKA KESKEN OLEVIA" -korttien tyyli:
 *   - Glass-icon-box patterned ikoni (gradient + border)
 *   - Otsikko (medium 12px) + % oikealla
 *   - Progress-bar isompi (4px) — color matches status
 *   - Hover: subtle lift + border-color
 *   - Light catcher rim ::before (premium-merkki)
 */
.v2-surface__modules {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: var(--space-3);
}

.v2-surface__module {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  padding: var(--space-4);
  background: #0d1420;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.06);
  transition:
    border-color var(--transition-hover),
    box-shadow var(--transition-hover),
    transform var(--transition-hover);
  overflow: hidden;
}

/* Light catcher rim — premium-merkki yläreunaan */
.v2-surface__module::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.10) 50%,
    transparent
  );
  pointer-events: none;
}

.v2-surface__module:hover {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.13);
  transform: translateY(-1px);
}

.v2-surface__module-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  justify-content: space-between;
}

.v2-surface__module-head-left {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  flex: 1;
}

/* Glass-icon-box — emerald-default kaikille moduuleille.
   V3 polish (käyttäjäpäätös): ei per-kategoria-värejä,
   yhtenäinen elegantti tyyli. */
.v2-surface__module-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.18) 0%, rgba(52, 211, 153, 0.10) 100%);
  border: 1px solid rgba(16, 185, 129, 0.35);
  color: #34d399;
}

.v2-surface__module-name {
  font-size: 12px;
  font-weight: var(--weight-medium);
  color: rgba(255, 255, 255, 0.92);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: -0.01em;
}

.v2-surface__module-pct {
  font-size: 13px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.92);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}

.v2-surface__module-bar {
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
}

.v2-surface__module-bar-fill {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width 720ms cubic-bezier(0.16, 1, 0.3, 1);
}

/* Module-foot — pieni eyebrow ("Päivitetty tänään" / Updated today) */
.v2-surface__module-foot {
  font-size: 9px;
  font-weight: var(--weight-medium);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.48);
}

/* ════════════════════════════════════════════════════════════════════════
 * Mobile tightening
 * ════════════════════════════════════════════════════════════════════════ */

@media (max-width: 640px) {
  .v2-surface__url { max-width: 200px; font-size: 11px; }
  .v2-surface__body { padding: var(--space-5) var(--space-4); min-height: 320px; }
  .v2-surface__title { font-size: 20px; }
  .v2-surface__tile-value { font-size: 18px; }
  .v2-surface__shell { grid-template-columns: 48px 1fr; }
  .v2-surface__sidebar { padding: var(--space-3) 0; }
  .v2-surface__sidebar-icon { width: 32px; height: 32px; }
  .v2-surface__donut-row { grid-template-columns: 1fr; gap: var(--space-4); }
  .v2-surface__donut { margin-inline: auto; }
  .v2-surface__notes-grid { grid-template-columns: 1fr; }
}
