:root {
  color-scheme: light;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f8fafb;
  --surface-tint: #eef6f3;
  --ink: #17212b;
  --muted: #64727d;
  --muted-strong: #45535d;
  --line: #dfe7eb;
  --line-strong: #c8d5db;
  --teal: #117a6a;
  --teal-dark: #0b5d51;
  --blue: #336fb8;
  --amber: #b77905;
  --coral: #c64238;
  --rose-soft: #fff0ee;
  --amber-soft: #fff6df;
  --teal-soft: #e9f7f3;
  --shadow: 0 18px 42px rgba(24, 38, 50, 0.08);
  --focus: 0 0 0 3px rgba(51, 111, 184, 0.18);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 10% 0%, rgba(17, 122, 106, 0.08), transparent 32rem),
    linear-gradient(180deg, #f8fbfc 0%, var(--bg) 42rem);
  color: var(--ink);
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

.app-shell {
  display: grid;
  grid-template-columns: 286px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  background: rgba(255, 255, 255, 0.82);
  border-right: 1px solid var(--line);
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 24px 20px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  align-items: center;
  color: inherit;
  display: inline-flex;
  gap: 12px;
  min-width: 240px;
  text-decoration: none;
}

.brand-mark {
  background: var(--ink);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  font-weight: 900;
  height: 42px;
  place-items: center;
  width: 42px;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: var(--muted);
  font-size: 0.82rem;
  margin-top: 2px;
}

.side-nav {
  display: grid;
  gap: 6px;
}

.side-nav a {
  border-radius: 6px;
  color: var(--muted-strong);
  display: flex;
  font-size: 0.9rem;
  font-weight: 900;
  padding: 12px;
  text-decoration: none;
}

.side-nav a:hover,
.side-nav a:focus-visible,
.side-nav a.active {
  background: var(--surface-tint);
  color: var(--teal-dark);
  outline: none;
}

.sidebar-note {
  background: var(--ink);
  border-radius: 8px;
  color: #ffffff;
  margin-top: auto;
  padding: 16px;
}

.sidebar-note span {
  color: #8de0cd;
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.sidebar-note p {
  color: rgba(255, 255, 255, 0.76);
  font-size: 0.9rem;
  line-height: 1.5;
}

.workspace {
  min-width: 0;
  padding: 24px 30px 36px;
}

.view {
  display: grid;
  gap: 18px;
  margin: 0 auto;
  max-width: 1440px;
}

.view[hidden] {
  display: none;
}

.command-band {
  align-items: center;
  background: var(--ink);
  border-radius: 8px;
  color: #ffffff;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1fr) auto;
  overflow: hidden;
  padding: 20px 24px;
  position: relative;
}

.command-band::after {
  background:
    linear-gradient(135deg, rgba(51, 111, 184, 0.28), transparent 48%),
    linear-gradient(315deg, rgba(17, 122, 106, 0.42), transparent 54%);
  content: "";
  inset: 0;
  opacity: 0.82;
  pointer-events: none;
  position: absolute;
}

.command-copy,
.command-actions {
  position: relative;
  z-index: 1;
}

.command-copy {
  max-width: 770px;
}

.eyebrow {
  color: var(--teal);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 7px;
  text-transform: uppercase;
}

.command-band .eyebrow {
  color: #8de0cd;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.05rem, 4.5vw, 4.4rem);
  letter-spacing: 0;
  line-height: 1.02;
  max-width: 920px;
}

.command-band h1 {
  font-size: clamp(1.25rem, 1.8vw, 1.65rem);
  font-weight: 700;
  line-height: 1.25;
  max-width: 640px;
}
.command-band .lead {
  font-size: 0.9rem;
  line-height: 1.45;
  margin-top: 6px;
  max-width: 560px;
}
.command-band .eyebrow {
  font-size: 0.66rem;
  margin: 0 0 4px;
}

h2 {
  font-size: 1.22rem;
  letter-spacing: 0;
  line-height: 1.2;
}

h3 {
  font-size: 1rem;
  letter-spacing: 0;
}

.lead {
  color: rgba(255, 255, 255, 0.78);
  font-size: 1.02rem;
  line-height: 1.55;
  margin-top: 14px;
  max-width: 640px;
}

.command-actions {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
  max-width: 540px;
}

.month-picker,
.field {
  color: var(--muted-strong);
  display: grid;
  font-size: 0.82rem;
  font-weight: 850;
  gap: 7px;
}

.command-band .month-picker {
  color: rgba(255, 255, 255, 0.82);
}

input {
  background: #ffffff;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--ink);
  min-height: 44px;
  padding: 10px 11px;
  width: 100%;
}

input::placeholder {
  color: #9aa8b2;
}

input:hover {
  border-color: var(--line-strong);
}

input:focus {
  border-color: var(--blue);
  box-shadow: var(--focus);
  outline: none;
}

.button {
  align-items: center;
  border: 0;
  border-radius: 7px;
  cursor: pointer;
  display: inline-flex;
  font-weight: 900;
  gap: 7px;
  justify-content: center;
  min-height: 44px;
  padding: 0 15px;
  text-decoration: none;
  white-space: nowrap;
}

.button span {
  font-size: 1.05em;
  line-height: 1;
}

.button.primary {
  background: var(--teal);
  color: #ffffff;
}

.button.primary:hover,
.button.primary:focus-visible {
  background: var(--teal-dark);
  outline: none;
}

.button.ghost {
  background: #edf3f5;
  color: var(--ink);
}

.command-band .button.ghost {
  background: rgba(255, 255, 255, 0.13);
  color: #ffffff;
}

.button.ghost:hover,
.button.ghost:focus-visible {
  background: #dfeaec;
  outline: none;
}

.command-band .button.ghost:hover,
.command-band .button.ghost:focus-visible {
  background: rgba(255, 255, 255, 0.2);
}

.button.danger {
  background: var(--rose-soft);
  color: #9d2d27;
}

.button.danger:hover,
.button.danger:focus-visible {
  background: #ffe1dd;
  outline: none;
}

.full-width {
  width: 100%;
}

.import-button input {
  display: none;
}

.summary-grid,
.insight-grid {
  display: grid;
  gap: 14px;
}

.summary-grid {
  grid-template-columns: 1.2fr repeat(3, 1fr);
}

.insight-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.summary-tile,
.insight-card,
.panel {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.summary-tile {
  display: grid;
  gap: 6px;
  min-height: 132px;
  padding: 19px;
  position: relative;
}

.summary-tile::before {
  background: var(--line);
  border-radius: 99px;
  content: "";
  height: 4px;
  left: 19px;
  position: absolute;
  right: 19px;
  top: 0;
}

.summary-tile.hero-tile::before {
  background: var(--teal);
}

.summary-tile span,
.summary-tile small {
  color: var(--muted);
}

.summary-tile span {
  font-size: 0.86rem;
  font-weight: 850;
}

.summary-tile strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 0.98;
}

.summary-tile small {
  align-self: end;
  font-size: 0.86rem;
  line-height: 1.35;
}

.summary-tile.is-risk::before {
  background: var(--coral);
}

.summary-tile.is-steady::before {
  background: var(--amber);
}

.summary-tile.is-strong::before {
  background: var(--teal);
}

.insight-card {
  min-height: 136px;
  padding: 18px;
}

.insight-kicker {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 10px;
  text-transform: uppercase;
}

.insight-card strong {
  display: block;
  font-size: 1.05rem;
  line-height: 1.25;
}

.insight-card p {
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
  margin-top: 8px;
}

.work-grid {
  align-items: start;
  display: grid;
  gap: 18px;
  grid-template-columns: minmax(0, 1.55fr) minmax(360px, 0.85fr);
}

.panel {
  padding: 20px;
}

.panel-header {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-bottom: 16px;
}

.panel-note {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.45;
  max-width: 430px;
  text-align: right;
}

.calculation-hero {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 26px;
}

.calculation-hero h1 {
  color: var(--ink);
  font-size: clamp(2rem, 4vw, 3.5rem);
  max-width: 840px;
}

.calculation-hero p:not(.eyebrow) {
  color: var(--muted);
  font-size: 1rem;
  line-height: 1.55;
  margin-top: 12px;
  max-width: 760px;
}

.segmented-control {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  display: inline-flex;
  gap: 4px;
  padding: 4px;
}

.segmented-control button {
  background: transparent;
  border: 0;
  border-radius: 6px;
  color: var(--muted-strong);
  cursor: pointer;
  font-size: 0.84rem;
  font-weight: 900;
  min-height: 34px;
  padding: 0 11px;
}

.segmented-control button.active,
.segmented-control button:hover,
.segmented-control button:focus-visible {
  background: #ffffff;
  box-shadow: 0 7px 18px rgba(24, 38, 50, 0.08);
  color: var(--ink);
  outline: none;
}

.legend {
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 12px;
  margin-bottom: 14px;
}

.legend span {
  align-items: center;
  display: inline-flex;
  gap: 6px;
}

.dot {
  border-radius: 99px;
  display: inline-block;
  height: 9px;
  width: 9px;
}

.risk {
  background: var(--coral);
}

.steady {
  background: var(--amber);
}

.strong {
  background: var(--teal);
}

.agent-list {
  display: grid;
  gap: 12px;
}

.agent-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  display: grid;
  gap: 12px 18px;
  grid-template-columns: minmax(210px, 0.8fr) minmax(260px, 1fr);
  padding: 15px;
}

.agent-row:hover {
  border-color: var(--line-strong);
}

.agent-main {
  align-items: center;
  display: flex;
  gap: 12px;
  min-width: 0;
}

.avatar {
  background: var(--surface-tint);
  border: 1px solid #d4e7e1;
  border-radius: 8px;
  color: var(--teal-dark);
  display: grid;
  flex: 0 0 auto;
  font-weight: 950;
  height: 44px;
  place-items: center;
  width: 44px;
}

.agent-main h3,
.agent-main p {
  overflow-wrap: anywhere;
}

.agent-main p {
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.35;
  margin-top: 3px;
}

.score-block {
  display: grid;
  gap: 10px;
}

.score-line {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.score-line strong {
  font-size: 1.6rem;
  line-height: 1;
}

.status-chip {
  align-items: center;
  border-radius: 99px;
  display: inline-flex;
  font-size: 0.8rem;
  font-weight: 950;
  min-height: 28px;
  padding: 0 10px;
}

.status-chip.risk {
  background: var(--rose-soft);
  color: #9d2d27;
}

.status-chip.steady {
  background: var(--amber-soft);
  color: #875600;
}

.status-chip.strong {
  background: var(--teal-soft);
  color: var(--teal-dark);
}

.bar-track {
  background: linear-gradient(
    90deg,
    rgba(198, 66, 56, 0.92) 0%,
    rgba(198, 66, 56, 0.92) 60.8%,
    rgba(183, 121, 5, 0.92) 60.8%,
    rgba(183, 121, 5, 0.92) 78.2%,
    rgba(17, 122, 106, 0.92) 78.2%,
    rgba(17, 122, 106, 0.92) 100%
  );
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px rgba(23, 33, 43, 0.08);
  height: 13px;
  overflow: visible;
  position: relative;
}

.bar-fill {
  background: rgba(255, 255, 255, 0.6);
  border-radius: inherit 0 0 inherit;
  border-right: 3px solid var(--ink);
  height: 100%;
  transition: width 180ms ease;
  width: 0%;
}

.bar-marker {
  background: #ffffff;
  border: 2px solid var(--ink);
  border-radius: 99px;
  box-shadow: 0 5px 12px rgba(23, 33, 43, 0.2);
  height: 21px;
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  width: 21px;
}

.bar-scale {
  color: var(--muted);
  display: grid;
  font-size: 0.71rem;
  font-weight: 850;
  grid-template-columns: 1fr 1fr 1fr;
  line-height: 1.2;
}

.bar-scale span:nth-child(2) {
  text-align: center;
}

.bar-scale span:last-child {
  text-align: right;
}

.agent-action {
  align-self: center;
  color: var(--muted-strong);
  font-size: 0.9rem;
  font-weight: 780;
  grid-column: 1 / -1;
  line-height: 1.45;
}

.metric-strip {
  display: grid;
  gap: 8px;
  grid-column: 1 / -1;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.metric-pill {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  min-height: 62px;
  padding: 10px;
}

.metric-pill span,
.metric-pill small {
  display: block;
}

.metric-pill span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
}

.metric-pill strong {
  display: block;
  margin-top: 3px;
}

.metric-pill.is-risk {
  background: var(--rose-soft);
  border-color: #ffd2cc;
}

.metric-pill.is-strong {
  background: var(--teal-soft);
  border-color: #cceae3;
}

.row-actions {
  display: flex;
  gap: 8px;
  grid-column: 1 / -1;
  justify-content: flex-end;
}

.icon-button {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--muted);
  cursor: pointer;
  font-size: 1.3rem;
  height: 38px;
  line-height: 1;
  width: 38px;
}

.icon-button:hover,
.icon-button:focus-visible {
  border-color: var(--line-strong);
  color: var(--ink);
  outline: none;
}

.agent-form {
  display: grid;
  gap: 14px;
}

.form-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field.full {
  grid-column: 1 / -1;
}

.target-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.target-item {
  background: var(--surface-soft);
  border: 1px solid var(--line);
  border-radius: 8px;
  min-height: 114px;
  padding: 13px;
}

.target-item span {
  color: var(--muted);
  display: block;
  font-size: 0.78rem;
  font-weight: 900;
  margin-bottom: 6px;
}

.target-item strong,
.target-item small {
  display: block;
}

.target-item small {
  color: var(--muted);
  line-height: 1.38;
  margin-top: 6px;
}

.empty-state {
  align-items: center;
  border: 1px dashed var(--line-strong);
  border-radius: 8px;
  color: var(--muted);
  display: grid;
  gap: 10px;
  justify-items: center;
  min-height: 190px;
  padding: 28px;
  text-align: center;
}

.empty-state strong {
  color: var(--ink);
  display: block;
  font-size: 1.05rem;
}

.toast {
  background: var(--ink);
  border-radius: 8px;
  bottom: 18px;
  box-shadow: 0 18px 42px rgba(24, 38, 50, 0.2);
  color: #ffffff;
  font-weight: 850;
  left: 50%;
  opacity: 0;
  padding: 12px 15px;
  pointer-events: none;
  position: fixed;
  transform: translate(-50%, 12px);
  transition: opacity 160ms ease, transform 160ms ease;
  z-index: 20;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

@media (max-width: 1180px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    height: auto;
    padding: 16px 18px;
    position: static;
  }

  .sidebar-note {
    display: none;
  }

  .side-nav {
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid var(--line);
    border-radius: 8px;
    display: flex;
    gap: 4px;
    overflow-x: auto;
    padding: 4px;
  }

  .side-nav a {
    flex: 1 0 auto;
    justify-content: center;
    padding: 9px 12px;
  }

  .workspace {
    padding-top: 18px;
  }

  .command-band,
  .work-grid {
    grid-template-columns: 1fr;
  }

  .command-actions {
    justify-content: flex-start;
    max-width: none;
  }

  .summary-grid,
  .insight-grid,
  .target-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .sidebar {
    align-items: flex-start;
    padding: 16px 18px;
  }

  .brand {
    min-width: 0;
  }

  .side-nav {
    width: 100%;
  }

  .workspace {
    padding: 18px;
  }

  .command-band {
    min-height: 0;
    padding: 22px;
  }

  h1 {
    font-size: 2.15rem;
  }

  .summary-grid,
  .insight-grid,
  .work-grid,
  .target-grid,
  .form-grid,
  .metric-strip {
    grid-template-columns: 1fr;
  }

  .panel-header {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel-note {
    max-width: none;
    text-align: left;
  }

  .agent-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .command-actions,
  .side-nav,
  .segmented-control {
    width: 100%;
  }

  .command-actions .button,
  .month-picker,
  .segmented-control button {
    flex: 1 1 auto;
  }

  .command-actions .button,
  .month-picker,
  .month-picker input {
    width: 100%;
  }

  .segmented-control {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .segmented-control button {
    padding: 0 6px;
  }

  .row-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .row-actions .button {
    width: 100%;
  }
}

/* =========================================================
   MODERNE OVERHALING — premium dashboard-feel
   ========================================================= */

:root {
  --shadow-soft: 0 1px 2px rgba(15, 23, 30, 0.04), 0 4px 12px rgba(15, 23, 30, 0.04);
  --shadow-mid:  0 2px 4px rgba(15, 23, 30, 0.04), 0 10px 28px rgba(15, 23, 30, 0.08);
  --shadow-pop:  0 4px 8px rgba(15, 23, 30, 0.06), 0 22px 56px rgba(15, 23, 30, 0.14);
  --ease:        cubic-bezier(.2, .7, .2, 1);
}

body {
  background:
    radial-gradient(circle at 8% 0%, rgba(17, 122, 106, 0.10), transparent 30rem),
    radial-gradient(circle at 92% 12%, rgba(51, 111, 184, 0.06), transparent 26rem),
    linear-gradient(180deg, #fbfdfd 0%, #f3f6f7 60%, #eef2f4 100%);
}

/* Sidebar — glassmorphism, refined active state */
.sidebar {
  background: rgba(255, 255, 255, 0.74);
  -webkit-backdrop-filter: saturate(150%) blur(18px);
  backdrop-filter: saturate(150%) blur(18px);
  border-right: 1px solid rgba(60, 80, 92, 0.08);
  padding: 28px 18px;
  gap: 30px;
}

.brand {
  padding-left: 8px;
}
.brand-mark {
  background: linear-gradient(135deg, #1c2935 0%, #0e1620 100%);
  height: 44px; width: 44px;
  border-radius: 12px;
  box-shadow:
    0 6px 14px -6px rgba(17, 122, 106, 0.4),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
  font-weight: 800;
  font-size: 1.05rem;
}
.brand strong {
  font-weight: 700;
  letter-spacing: -0.005em;
}
.brand small {
  font-weight: 500;
  letter-spacing: 0.005em;
}

.side-nav { gap: 4px; }
.side-nav a {
  position: relative;
  padding: 11px 14px;
  font-weight: 600;
  font-size: 0.88rem;
  border-radius: 8px;
  transition: all 0.25s var(--ease);
  letter-spacing: -0.003em;
}
.side-nav a:hover {
  background: rgba(17, 122, 106, 0.06);
  color: var(--teal-dark);
}
.side-nav a.active {
  background: linear-gradient(135deg, rgba(17, 122, 106, 0.10) 0%, rgba(17, 122, 106, 0.04) 100%);
  color: var(--teal-dark);
  font-weight: 700;
}
.side-nav a.active::before {
  content: "";
  position: absolute;
  left: 0; top: 50%;
  width: 3px;
  height: 60%;
  background: linear-gradient(180deg, #14a08c 0%, var(--teal-dark) 100%);
  border-radius: 0 3px 3px 0;
  transform: translateY(-50%);
}

.sidebar-note {
  background: linear-gradient(135deg, #1a2531 0%, #0d1620 100%);
  border-radius: 12px;
  padding: 18px;
  box-shadow: 0 12px 28px -16px rgba(0, 0, 0, 0.35);
  position: relative;
  overflow: hidden;
}
.sidebar-note::before {
  content: "";
  position: absolute;
  inset: -1px;
  background: linear-gradient(135deg, rgba(141, 224, 205, 0.20), transparent 60%);
  pointer-events: none;
  z-index: 0;
}
.sidebar-note span,
.sidebar-note p { position: relative; z-index: 1; }
.sidebar-note span {
  font-weight: 700;
  letter-spacing: 0.06em;
  font-size: 0.72rem;
}

/* Workspace rhythm */
.workspace { padding: 28px 36px 40px; }
.view { gap: 22px; }

/* Command band — subtle mesh gradient instead of flat */
.command-band {
  background:
    radial-gradient(800px 200px at 0% 0%, rgba(141, 224, 205, 0.18), transparent 60%),
    radial-gradient(600px 300px at 100% 100%, rgba(51, 111, 184, 0.18), transparent 70%),
    linear-gradient(135deg, #131c25 0%, #0c151c 100%);
  border-radius: 14px;
  padding: 22px 28px;
  box-shadow: 0 18px 48px -28px rgba(11, 22, 34, 0.55);
  position: relative;
}
.command-band::after { display: none; }
.command-band .eyebrow {
  color: #8de0cd;
  font-weight: 700;
  letter-spacing: 0.16em;
}
.command-band h1 {
  font-size: clamp(1.15rem, 1.5vw, 1.5rem);
  font-weight: 700;
  letter-spacing: -0.018em;
  line-height: 1.22;
}
.command-band .lead {
  color: rgba(255, 255, 255, 0.7);
  font-weight: 400;
  font-size: 0.88rem;
}

/* Card system — premium depth */
.summary-tile,
.insight-card,
.panel {
  background: #fff;
  border: 1px solid rgba(60, 80, 92, 0.08);
  border-radius: 14px;
  box-shadow: var(--shadow-soft);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), border-color 0.3s ease;
}
.summary-tile:hover,
.insight-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-mid);
  border-color: rgba(60, 80, 92, 0.14);
}

/* Summary tiles — hero numbers, gradient accent */
.summary-grid { gap: 16px; }
.summary-tile {
  padding: 22px 22px 20px;
  min-height: 130px;
  overflow: hidden;
  position: relative;
}
.summary-tile::before {
  height: 3px;
  border-radius: 0;
  left: 0; right: 0;
  background: linear-gradient(90deg, var(--line) 0%, var(--line-strong) 100%);
}
.summary-tile.hero-tile::before {
  background: linear-gradient(90deg, #14a08c 0%, #1a857a 100%);
}
.summary-tile.is-strong::before {
  background: linear-gradient(90deg, #14a08c 0%, #1a857a 100%);
}
.summary-tile.is-steady::before {
  background: linear-gradient(90deg, #c4a85a 0%, #b77905 100%);
}
.summary-tile.is-risk::before {
  background: linear-gradient(90deg, #d65b4f 0%, #b03a30 100%);
}
.summary-tile span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.summary-tile strong {
  font-size: clamp(2.2rem, 3.8vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1;
  color: var(--ink);
  background: linear-gradient(180deg, var(--ink) 0%, #34434f 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.summary-tile small {
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 500;
}
.summary-tile.hero-tile strong {
  background: linear-gradient(180deg, #14a08c 0%, #0b5d51 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

/* Insight cards — refined */
.insight-grid { gap: 16px; }
.insight-card {
  padding: 22px;
  min-height: 140px;
  position: relative;
  overflow: hidden;
}
.insight-card::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 60px;
  height: 60px;
  background: radial-gradient(circle at 0 0, rgba(17, 122, 106, 0.10), transparent 70%);
  pointer-events: none;
}
.insight-kicker {
  color: var(--teal-dark);
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  margin-bottom: 12px;
}
.insight-card strong {
  font-family: inherit;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.insight-card p {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.55;
}

/* Panels */
.panel {
  padding: 24px;
  border-radius: 14px;
}
.panel-header h2 {
  font-size: 1.18rem;
  font-weight: 700;
  letter-spacing: -0.012em;
}
.panel .eyebrow {
  color: var(--teal-dark);
  font-weight: 700;
  font-size: 0.7rem;
  letter-spacing: 0.14em;
}

/* Calculation/Konklusjon hero — modern centered card */
.calculation-hero {
  background: linear-gradient(135deg, #ffffff 0%, #f4faf8 100%);
  border: 1px solid rgba(60, 80, 92, 0.08);
  border-radius: 14px;
  padding: 32px;
  box-shadow: var(--shadow-soft);
}
.calculation-hero h1 {
  font-size: clamp(1.5rem, 2.4vw, 2.2rem);
  font-weight: 700;
  letter-spacing: -0.018em;
}
.calculation-hero .eyebrow {
  color: var(--teal-dark);
  font-weight: 700;
  letter-spacing: 0.14em;
}
.calculation-hero p:not(.eyebrow) {
  font-size: 0.96rem;
  line-height: 1.6;
}

/* Buttons — refined micro-interactions */
.button {
  border-radius: 10px;
  font-weight: 700;
  letter-spacing: -0.005em;
  transition: all 0.3s var(--ease);
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.button.primary {
  background: linear-gradient(135deg, #14a08c 0%, #0b5d51 100%);
  color: #fff;
  box-shadow: 0 6px 16px -8px rgba(17, 122, 106, 0.5);
}
.button.primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -10px rgba(17, 122, 106, 0.6);
}
.button.ghost {
  background: rgba(255, 255, 255, 0.6);
  border: 1px solid rgba(60, 80, 92, 0.12);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
}
.button.ghost:hover {
  background: #fff;
  border-color: var(--teal-dark);
  color: var(--teal-dark);
}
.command-band .button.ghost {
  background: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.92);
  border-color: rgba(255, 255, 255, 0.16);
}
.command-band .button.ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.30);
}

/* Month picker */
.command-band .month-picker {
  font-weight: 600;
  letter-spacing: 0.04em;
}
.command-band .month-picker input {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 8px;
  font-weight: 600;
  padding: 9px 12px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  color: var(--ink);
}

/* Segmented control — modern toggle */
.segmented-control {
  background: var(--surface-soft);
  border: 1px solid rgba(60, 80, 92, 0.08);
  border-radius: 10px;
  padding: 3px;
}
.segmented-control button {
  border-radius: 7px;
  font-weight: 600;
  letter-spacing: -0.003em;
  transition: all 0.25s var(--ease);
}
.segmented-control button.active {
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04), 0 4px 10px rgba(0, 0, 0, 0.06);
}

/* Legend — refined */
.legend {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--muted);
}
.legend i.dot {
  box-shadow: 0 0 0 2px #fff, 0 0 0 3px rgba(60, 80, 92, 0.08);
}

/* Smooth number reveal */
@keyframes numIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.summary-tile strong {
  animation: numIn 0.6s var(--ease) both;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}
