:root {
  --bg: #f5f6fa;
  --surface: #ffffff;
  --surface-2: #f1f3f8;
  --surface-3: #e8ebf3;
  --border: #e3e6ef;
  --border-strong: #cfd4e2;
  --text: #121826;
  --text-muted: #5f6a82;
  --accent: #2f5f95;
  --accent-2: #3d7ea6;
  --accent-weak: #e8eff7;
  --green: #12805c;
  --green-weak: #e4f6ee;
  --red: #c8324a;
  --red-weak: #fde9ed;
  --amber: #a86a08;
  --amber-weak: #fcf1dc;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(18, 24, 38, 0.05), 0 4px 14px rgba(18, 24, 38, 0.04);
  --shadow-lg: 0 10px 30px rgba(18, 24, 38, 0.12), 0 2px 6px rgba(18, 24, 38, 0.06);
  --ring: 0 0 0 3px rgba(47, 95, 149, 0.24);
  --series-1: #2a78d6;
  --series-2: #eb6834;
  --series-3: #1baf7a;
  --series-4: #eda100;
  --series-5: #e87ba4;
  --series-6: #008300;
  --series-7: #4a3aa7;
  --series-8: #e34948;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0a0c11;
    --surface: #11141b;
    --surface-2: #171b24;
    --surface-3: #202533;
    --border: #232837;
    --border-strong: #333a4d;
    --text: #e8eaf1;
    --text-muted: #96a0b8;
    --accent: #7aa9dc;
    --accent-2: #5fb0c9;
    --accent-weak: #15263a;
    --green: #4cd0a0;
    --green-weak: #10322a;
    --red: #f2758c;
    --red-weak: #3a1721;
    --amber: #e6b155;
    --amber-weak: #3a2e12;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.5), 0 4px 16px rgba(0, 0, 0, 0.28);
    --shadow-lg: 0 14px 40px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
    --ring: 0 0 0 3px rgba(122, 169, 220, 0.3);
    --series-1: #3987e5;
    --series-2: #d95926;
    --series-3: #199e70;
    --series-4: #c98500;
    --series-5: #d55181;
    --series-6: #008300;
    --series-7: #9085e9;
    --series-8: #e66767;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14px;
  line-height: 1.5;
}

a { color: inherit; }

.app-shell {
  display: flex;
  min-height: 100vh;
}

/* PIN lock: hides the whole page behind a PIN prompt (see public/js/pinlock.js) */
body.pg-locked .app-shell { display: none; }
.pg-lock { display: none; position: fixed; inset: 0; z-index: 200; background: var(--bg); align-items: center; justify-content: center; padding: 16px; }
body.pg-locked .pg-lock { display: flex; }
.pg-lock-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow-lg); padding: 28px 26px; width: 100%; max-width: 320px; text-align: center; }
.pg-lock-box h2 { margin: 0 0 6px; font-size: 19px; letter-spacing: -0.02em; }
.pg-lock-box p { margin: 0 0 16px; color: var(--text-muted); font-size: 13.5px; }
.pg-lock-box form { display: flex; gap: 8px; }
.pg-lock-box input { flex: 1; min-width: 0; border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text); border-radius: 10px; padding: 10px 12px; font-size: 16px; letter-spacing: 0.1em; text-align: center; }
.pg-lock-err { margin-top: 12px; color: var(--red); font-size: 13px; }

.sidebar {
  width: 220px;
  flex-shrink: 0;
  background: var(--surface);
  border-right: 1px solid var(--border);
  padding: 20px 12px;
  position: sticky;
  top: 0;
  height: 100vh;
}

.brand {
  font-weight: 700;
  font-size: 16px;
  padding: 0 10px 20px;
  letter-spacing: -0.01em;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: 8px;
  color: var(--text-muted);
  text-decoration: none;
  font-weight: 500;
  margin-bottom: 2px;
}

.nav-link:hover { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--accent-weak); color: var(--accent); }

.main {
  flex: 1;
  padding: 28px 36px 60px;
  max-width: 1180px;
}

.page-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 22px;
  flex-wrap: wrap;
  gap: 10px;
}

.page-header h1 { margin: 0; font-size: 22px; letter-spacing: -0.01em; }
.page-header .subtitle { color: var(--text-muted); font-size: 13px; margin-top: 4px; }

.grid {
  display: grid;
  gap: 16px;
}

.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr 1fr; }
  .sidebar { width: 68px; }
  .brand span.full, .nav-link span.label { display: none; }
  .main { padding: 20px; }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  box-shadow: var(--shadow);
}

.stat-tile .stat-label {
  color: var(--text-muted);
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 6px;
}

.stat-tile .stat-value {
  font-size: 24px;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.stat-tile .stat-sub {
  font-size: 12px;
  color: var(--text-muted);
  margin-top: 4px;
}

.section-title {
  font-size: 14px;
  font-weight: 700;
  margin: 28px 0 12px;
}

table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; color: var(--text-muted); font-weight: 600; font-size: 11px; text-transform: uppercase; letter-spacing: 0.03em; padding: 8px 10px; border-bottom: 1px solid var(--border); }
td { padding: 9px 10px; border-bottom: 1px solid var(--border); font-variant-numeric: tabular-nums; }
tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 100px;
  font-size: 11px;
  font-weight: 600;
}

.badge.green { background: var(--green-weak); color: var(--green); }
.badge.red { background: var(--red-weak); color: var(--red); }
.badge.amber { background: var(--amber-weak); color: var(--amber); }
.badge.muted { background: var(--surface-2); color: var(--text-muted); }

.empty-state {
  color: var(--text-muted);
  text-align: center;
  padding: 40px 20px;
  font-size: 13px;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--accent);
  color: white;
  border: none;
  padding: 8px 14px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
}

.btn:hover { opacity: 0.9; }
.btn.secondary { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); }

input, select, textarea {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
  font-family: inherit;
}

.form-row { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 18px; }
.form-row label { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); }

.alert-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--border);
  margin-bottom: 8px;
}

.alert-item.unread { border-color: var(--accent); background: var(--accent-weak); }

.calendar-month { margin-bottom: 30px; }
.calendar-month h3 { font-size: 13px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.03em; margin: 0 0 10px; }

.event-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; }
.event-row:hover { background: var(--surface-2); }
.event-date { width: 90px; flex-shrink: 0; color: var(--text-muted); font-variant-numeric: tabular-nums; font-size: 12px; }
.event-symbol { width: 60px; flex-shrink: 0; font-weight: 700; }

.category-bar { display: flex; height: 8px; border-radius: 100px; overflow: hidden; background: var(--surface-2); margin: 10px 0; }
.category-bar .seg { height: 100%; }
.category-bar .seg + .seg { margin-left: 2px; }

.category-legend { display: flex; flex-wrap: wrap; gap: 10px 16px; font-size: 12px; }
.category-legend .item { display: flex; align-items: center; gap: 6px; }
.category-legend .swatch { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.category-legend .amount { color: var(--text-muted); }

.expense-row { display: flex; align-items: center; gap: 12px; padding: 8px 10px; border-radius: 8px; }
.expense-row:hover { background: var(--surface-2); }
.expense-row .cat-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; }
.expense-row .exp-date { width: 90px; color: var(--text-muted); font-size: 12px; flex-shrink: 0; }
.expense-row .exp-category { width: 110px; flex-shrink: 0; }
.expense-row .exp-note { flex: 1; color: var(--text-muted); }
.expense-row .exp-amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.expense-row .del-btn { background: none; border: none; color: var(--text-muted); cursor: pointer; font-size: 14px; }
.expense-row .del-btn:hover { color: var(--red); }

.sync-note { color: var(--text-muted); font-size: 12px; }

.logo-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  overflow: hidden;
  background: var(--surface-2);
  flex-shrink: 0;
  vertical-align: middle;
}
.logo-fallback {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--text-muted);
}
.logo-img {
  position: relative;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: white;
}
.ticker-cell { display: flex; align-items: center; gap: 8px; }

.autocomplete-wrap { position: relative; display: inline-block; }
.autocomplete-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 260px;
  max-height: 280px;
  overflow-y: auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  z-index: 20;
}
.autocomplete-item { display: flex; gap: 10px; align-items: baseline; padding: 8px 12px; cursor: pointer; }
.autocomplete-item:hover, .autocomplete-item.active { background: var(--surface-2); }
.autocomplete-item .ac-symbol { font-weight: 700; flex-shrink: 0; }
.autocomplete-item .ac-name { color: var(--text-muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.search-hero {
  display: flex;
  gap: 10px;
  margin-bottom: 24px;
}
.search-hero input { flex: 1; font-size: 16px; padding: 12px 14px; }

.kv-block { display: flex; flex-direction: column; gap: 6px; }
.kv-row { display: flex; gap: 10px; font-size: 13px; }
.kv-row .kv-label { color: var(--text-muted); min-width: 140px; flex-shrink: 0; }
.kv-row .kv-value { flex: 1; }

.quote-header { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.quote-header .price { font-size: 28px; font-weight: 700; }
.quote-header .meta { color: var(--text-muted); font-size: 12px; }

.next-report-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  background: var(--accent-weak);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin-bottom: 20px;
}
.next-report-hero .label { font-size: 12px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.next-report-hero .date { font-size: 22px; font-weight: 700; color: var(--accent); }

.cd { display: flex; gap: 10px; align-items: flex-end; }
.cd-unit { display: flex; flex-direction: column; align-items: center; min-width: 38px; }
.cd-num { font-size: 20px; font-weight: 700; font-variant-numeric: tabular-nums; line-height: 1.1; }
.cd-label { font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; color: var(--text-muted); }
.cd-now { font-weight: 700; color: var(--accent); }
.cd-big .cd-num { font-size: 26px; }
.cd-big .cd-unit { min-width: 52px; }

.cd-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 4px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.cd-row:last-child { border-bottom: none; }
.cd-row .cd-title { font-weight: 600; }

.news-item { display: flex; gap: 12px; align-items: baseline; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.news-item:last-child { border-bottom: none; }
.news-item a { text-decoration: none; flex: 1; }
.news-item a:hover { text-decoration: underline; }
.news-item .news-meta { color: var(--text-muted); font-size: 12px; flex-shrink: 0; text-align: right; }
.news-tabs { display: flex; gap: 8px; margin-bottom: 8px; }

.banner {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  border-radius: var(--radius);
  margin-bottom: 20px;
  font-size: 13px;
}
.banner.warn { background: var(--amber-weak); border: 1px solid var(--amber); color: var(--amber); }
.banner.good { background: var(--green-weak); border: 1px solid var(--green); color: var(--green); }
.banner a { text-decoration: underline; }

.fin-table { font-size: 12px; }
.fin-table th, .fin-table td { padding: 5px 9px; white-space: nowrap; }
.fin-table td.neg { color: var(--red); }
.fin-table .section-row td { background: var(--surface-2); padding-top: 8px; }
tr.click { cursor: pointer; }
.insight { padding: 10px 12px; border-radius: 8px; border-left: 4px solid var(--border); margin-bottom: 8px; background: var(--surface-2); }
.insight.good { border-left-color: var(--green); }
.insight.warn { border-left-color: var(--amber); }
.insight.bad { border-left-color: var(--red); }
.insight.info { border-left-color: var(--accent); }
.insight-title { font-weight: 600; }
.insight-text { color: var(--text-muted); font-size: 12px; margin-top: 2px; }
details summary { cursor: pointer; }

.drop-zone { border: 2px dashed var(--border); border-radius: var(--radius); padding: 18px; text-align: center; margin-top: 8px; transition: background 0.15s, border-color 0.15s; }
.drop-zone.over { background: var(--accent-weak); border-color: var(--accent); }
.import-box textarea { width: 100%; min-height: 150px; font-family: ui-monospace, Consolas, monospace; font-size: 12px; }

/* ---- family tree (Business Map) ---- */
ul.tree { list-style: none; margin: 4px 0 0; padding-left: 0; }
ul.tree ul.tree { padding-left: 22px; border-left: 1px solid var(--border); margin-left: 8px; }
ul.tree li { margin: 3px 0; }
ul.tree summary { cursor: pointer; padding: 4px 2px; list-style: none; }
ul.tree summary::-webkit-details-marker { display: none; }
ul.tree summary::before { content: "▸"; display: inline-block; width: 16px; color: var(--text-muted); }
ul.tree details[open] > summary::before { content: "▾"; }
ul.tree .leaf { padding: 4px 2px 4px 16px; }
.chip { display: inline-block; font-size: 11px; padding: 1px 7px; border-radius: 999px; background: var(--surface-2); color: var(--text-muted); margin-left: 4px; white-space: nowrap; }
.chip.own { background: var(--green-weak); color: var(--green); font-weight: 600; }
.chip.muted { opacity: 0.6; }

/* =====================================================================================
   v2 - refined look: typography, frame (sidebar + top bar), components, Iceland hub
   ===================================================================================== */
html { -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; scroll-behavior: smooth; }
body { font-family: "Inter", -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; font-size: 14px; letter-spacing: -0.003em; font-feature-settings: "cv11", "ss01"; }
::selection { background: var(--accent-weak); color: var(--accent); }
* { scrollbar-width: thin; scrollbar-color: var(--border-strong) transparent; }
:focus-visible { outline: none; box-shadow: var(--ring); border-radius: 8px; }
code { background: var(--surface-2); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; font-size: 12px; }

/* ---- sidebar ---- */
.sidebar { width: 232px; padding: 18px 12px 24px; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; padding: 4px 10px 18px; font-weight: 700; font-size: 15px; letter-spacing: -0.02em; }
.brand-mark { width: 26px; height: 26px; border-radius: 8px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 2px 8px rgba(76, 95, 215, 0.35); position: relative; flex-shrink: 0; }
.brand-mark::after { content: ""; position: absolute; inset: 7px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, 0.9); }
.nav-group { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.09em; color: var(--text-muted); opacity: 0.75; padding: 14px 12px 6px; }
.nav-link { position: relative; gap: 11px; padding: 8px 12px; border-radius: 9px; font-size: 13.5px; margin-bottom: 1px; transition: background 0.12s, color 0.12s; }
.nav-icon { width: 17px; height: 17px; flex-shrink: 0; opacity: 0.85; }
.nav-link.active { background: var(--accent-weak); color: var(--accent); font-weight: 600; }
.nav-link.active::before { content: ""; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }

/* ---- main frame + top bar ---- */
.main { padding: 0 40px 72px; max-width: 1320px; min-width: 0; }
.topbar { position: sticky; top: 0; z-index: 40; display: flex; align-items: center; gap: 14px; margin: 0 -40px 14px; padding: 14px 40px; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.omni { position: relative; flex: 1; max-width: 640px; }
.omni > svg { position: absolute; left: 13px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--text-muted); pointer-events: none; }
.omni input { width: 100%; padding: 10px 40px 10px 38px; border-radius: 12px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow); font-size: 13.5px; transition: border-color 0.12s, box-shadow 0.12s; }
.omni input:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.omni kbd { position: absolute; right: 11px; top: 50%; transform: translateY(-50%); font: 600 11px "Inter", sans-serif; color: var(--text-muted); border: 1px solid var(--border-strong); border-bottom-width: 2px; border-radius: 6px; padding: 0 6px; background: var(--surface-2); pointer-events: none; }
.omni-panel { position: absolute; top: calc(100% + 8px); left: 0; right: 0; max-height: 68vh; overflow-y: auto; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; z-index: 60; }
.omni-group, .auto-panel .omni-group { font-size: 10.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); padding: 10px 10px 4px; }
.omni-item { display: flex; align-items: baseline; gap: 10px; padding: 8px 10px; border-radius: 9px; text-decoration: none; }
.omni-item.active, .omni-item:hover { background: var(--surface-2); }
.omni-main { font-weight: 600; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-sub { color: var(--text-muted); font-size: 12px; flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.omni-tag { font-size: 10.5px; font-weight: 600; color: var(--accent); background: var(--accent-weak); padding: 1px 8px; border-radius: 99px; white-space: nowrap; }
.omni-more { color: var(--accent); margin-top: 4px; border-top: 1px solid var(--border); border-radius: 0 0 9px 9px; }
.omni-panel[hidden], .auto-panel[hidden] { display: none; }

.auto-wrap { position: relative; margin-left: auto; }
.auto-pill { display: inline-flex; align-items: center; gap: 8px; background: var(--surface); border: 1px solid var(--border); color: var(--text-muted); border-radius: 99px; padding: 7px 13px; font: 500 12px "Inter", sans-serif; cursor: pointer; box-shadow: var(--shadow); }
.auto-pill:hover { color: var(--text); border-color: var(--border-strong); }
.auto-pill.bad { color: var(--red); border-color: var(--red); }
.auto-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); flex-shrink: 0; animation: pulse 2.4s infinite; }
.auto-dot.bad, .auto-pill.bad .auto-dot { background: var(--red); animation: none; }
.auto-dot.busy, .auto-pill.busy .auto-dot { background: var(--amber); }
.auto-dot.idle { background: var(--border-strong); animation: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(18, 128, 92, 0.45); } 70% { box-shadow: 0 0 0 7px rgba(18, 128, 92, 0); } 100% { box-shadow: 0 0 0 0 rgba(18, 128, 92, 0); } }
.auto-panel { position: absolute; right: 0; top: calc(100% + 8px); width: 440px; max-width: 92vw; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 10px 8px 8px; z-index: 60; }
.auto-head { color: var(--text-muted); font-size: 12px; padding: 4px 10px 6px; }
.auto-row { display: flex; gap: 12px; align-items: flex-start; padding: 8px 10px; border-radius: 9px; }
.auto-row:hover { background: var(--surface-2); }
.auto-row .auto-dot { margin-top: 5px; animation: none; }
.auto-name { font-weight: 600; font-size: 13px; }
.auto-meta { color: var(--text-muted); font-size: 11.5px; margin-top: 1px; }

/* ---- page header, cards, tiles ---- */
.page-header { margin: 8px 0 24px; align-items: flex-end; }
.page-header h1 { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; }
.page-header .subtitle { font-size: 13.5px; max-width: 760px; margin-top: 6px; }
.card { border-radius: var(--radius); padding: 18px 20px; transition: box-shadow 0.15s, border-color 0.15s; }
.card.hoverable { cursor: pointer; }
.card.hoverable:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.stat-tile { position: relative; overflow: hidden; }
.stat-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: linear-gradient(var(--accent), var(--accent-2)); opacity: 0.85; }
.stat-tile .stat-label { font-size: 11px; font-weight: 600; letter-spacing: 0.07em; }
.stat-tile .stat-value { font-size: 27px; letter-spacing: -0.03em; }
.section-title { font-size: 15px; font-weight: 650; letter-spacing: -0.015em; margin: 34px 0 14px; display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.section-title .sync-note { font-weight: 400; }

/* ---- tables ---- */
table { font-size: 13px; }
th { font-size: 10.5px; letter-spacing: 0.07em; padding: 10px 12px; }
td { padding: 10px 12px; }

/* ---- buttons, inputs, badges ---- */
.btn { padding: 8px 15px; border-radius: 10px; font-family: inherit; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: 0 1px 2px rgba(47, 95, 149, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.18); transition: transform 0.08s, filter 0.12s, box-shadow 0.12s; text-decoration: none; }
.btn:hover { opacity: 1; filter: brightness(1.07); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: 0.55; cursor: default; filter: none; }
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); box-shadow: 0 1px 1px rgba(18, 24, 38, 0.04); }
.btn.secondary:hover { background: var(--surface-2); filter: none; }
.btn.sm { padding: 4px 10px; font-size: 12px; border-radius: 8px; }
input, select, textarea { border-radius: 10px; padding: 9px 12px; font-family: inherit; transition: border-color 0.12s, box-shadow 0.12s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: var(--ring); }
.search-hero input { font-size: 15px; padding: 13px 16px; border-radius: 12px; box-shadow: var(--shadow); }
.badge { font-size: 10.5px; padding: 2px 9px; letter-spacing: 0.01em; }
.chip { font-weight: 500; }
.insight { border-radius: 10px; }
.news-tabs .btn { border-radius: 99px; padding: 6px 14px; }

/* ---- segmented control, tabs ---- */
.seg { display: inline-flex; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: none; background: transparent; color: var(--text-muted); font: 500 12px "Inter", sans-serif; padding: 5px 12px; border-radius: 7px; cursor: pointer; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(18, 24, 38, 0.12); font-weight: 600; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: 6px 0 22px; overflow-x: auto; }
.tabs button { border: none; background: transparent; color: var(--text-muted); font: 500 13.5px "Inter", sans-serif; padding: 10px 14px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button:hover { color: var(--text); }
.tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.tabs .count { font-size: 11px; background: var(--surface-2); border-radius: 99px; padding: 0 7px; margin-left: 5px; color: var(--text-muted); }

/* ---- Iceland hub ---- */
.hit { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; cursor: pointer; }
.hit:hover { background: var(--surface-2); }
.hit-main { flex: 1; min-width: 0; }
.hit-name { font-weight: 600; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 13px; color: white; background: linear-gradient(135deg, #2f5f95, #3d7ea6); flex-shrink: 0; }
.avatar.person { background: linear-gradient(135deg, #eb6834, #f0a04b); border-radius: 50%; }
.avatar.listed { background: linear-gradient(135deg, #b8860b, #e8b923); }
.avatar.lg { width: 52px; height: 52px; font-size: 18px; border-radius: 14px; }
.avatar.person.lg { border-radius: 50%; }
.profile-head { display: flex; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.profile-head h2 { margin: 0; font-size: 24px; letter-spacing: -0.03em; }
.kpi-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-top: 16px; }
.tree-toolbar { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; }
.tree-toolbar label { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-muted); }
#tree-canvas { height: 560px; border: 1px solid var(--border); border-radius: 12px; background: radial-gradient(circle at 1px 1px, var(--border) 1px, transparent 0) 0 0 / 22px 22px, var(--surface); overflow: hidden; }
.legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; font-size: 12px; color: var(--text-muted); }
.legend i { display: inline-block; vertical-align: middle; margin-right: 6px; }
.legend .l-box { width: 14px; height: 10px; border-radius: 3px; background: #3b6fe0; }
.legend .l-person { width: 11px; height: 11px; border-radius: 50%; background: #eb6834; }
.legend .l-own { width: 22px; height: 3px; background: #12805c; }
.legend .l-gov { width: 22px; height: 0; border-top: 2px dashed #7a869f; }
.legend .l-listed { width: 14px; height: 10px; border-radius: 3px; background: #3b6fe0; border: 2px solid #e8b923; box-sizing: border-box; }
.rel-group { margin-bottom: 18px; }
.rel-group h4 { margin: 0 0 6px; font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); }
.pctbar { background: var(--surface-3); border-radius: 99px; height: 6px; overflow: hidden; min-width: 60px; }
.pctbar > div { background: linear-gradient(90deg, var(--accent), var(--accent-2)); height: 100%; border-radius: 99px; }
.callout { display: flex; gap: 12px; align-items: center; background: var(--accent-weak); border: 1px solid var(--border); border-radius: 12px; padding: 12px 16px; font-size: 13px; }

@media (max-width: 900px) {
  .sidebar { width: 66px; padding: 14px 8px; }
  .brand .full, .nav-group, .nav-link .label { display: none; }
  .nav-link { justify-content: center; padding: 10px; }
  .nav-link.active::before { left: -8px; }
  .main { padding: 0 18px 60px; }
  .topbar { margin: 0 -18px 12px; padding: 12px 18px; }
  .auto-pill #auto-text { display: none; }
}

/* ---- org chart (Iceland hub, ownership tree) ---- */
.oc { display: flex; flex-direction: column; gap: 0; }
.oc-section { margin: 0 0 4px; }
.oc-title { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin: 0 0 10px; display: flex; gap: 8px; align-items: center; }
.oc-title .count { background: var(--surface-2); border-radius: 99px; padding: 0 8px; font-size: 11px; letter-spacing: 0; }
.oc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 10px; align-items: start; }
.oc-card { position: relative; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 10px 12px; box-shadow: var(--shadow); }
.oc-card.listed { border-color: #e8b923; box-shadow: 0 0 0 1px rgba(232, 185, 35, 0.35), var(--shadow); }
.oc-card.inactive { border-style: dashed; opacity: 0.72; }
.oc-card .oc-text { flex: 1; min-width: 0; }
.oc-name { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.oc-name a { text-decoration: none; }
.oc-name a:hover { text-decoration: underline; }
.oc-rel { font-size: 11.5px; color: var(--text-muted); }
.oc-eff { font-size: 11px; color: var(--green); font-weight: 600; }
.oc-pct { font-weight: 700; font-size: 16px; letter-spacing: -0.02em; }
.oc-connector { width: 2px; height: 32px; margin: 8px auto; background: linear-gradient(var(--border-strong), var(--accent)); position: relative; }
.oc-connector::after { content: ""; position: absolute; bottom: -2px; left: -4px; border: 5px solid transparent; border-top: 7px solid var(--accent); }
.oc-root { align-self: center; display: flex; gap: 14px; align-items: center; min-width: 320px; max-width: 100%; padding: 16px 22px; border-radius: 16px; color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent-2)); box-shadow: var(--shadow-lg); }
.oc-root-name { font-size: 17px; font-weight: 700; letter-spacing: -0.02em; }
.oc-root-sub { font-size: 12px; opacity: 0.85; margin-top: 2px; }
.oc-root .avatar { background: rgba(255, 255, 255, 0.22); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.oc-more { margin-top: 10px; }
.oc-sub { flex-basis: 100%; margin-top: 2px; }
.oc-sub summary { font-size: 11.5px; color: var(--accent); cursor: pointer; padding: 2px 0; }
.oc-sublist { margin: 6px 0 2px 6px; padding-left: 12px; border-left: 2px solid var(--border); }
.oc-subrow { margin: 5px 0; font-size: 12.5px; }
.oc-subline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.oc-subline .avatar { width: 22px; height: 22px; font-size: 9px; border-radius: 7px; }
.oc-subline .avatar.person { border-radius: 50%; }
.oc-sub .oc-sub { margin-left: 6px; }
.tree-toolbar .seg + .sync-note { margin-left: 4px; }

[hidden] { display: none !important; }
.oc-section { margin: 0 0 22px; }
.oc-name { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; line-height: 1.3; }
.oc-root { margin: 4px auto; }

a.ent { text-decoration: none; font-weight: 500; }
a.ent:hover { text-decoration: underline; color: var(--accent); }

/* ---- Economy dashboard ---- */
.eco-hero { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 18px; }
.eco-hero-main { background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 18px; padding: 26px 30px; box-shadow: var(--shadow-lg); }
.eco-hero-main a { color: #fff; text-decoration: underline; }
.eco-eyebrow { font-size: 11px; letter-spacing: 0.09em; text-transform: uppercase; opacity: 0.8; font-weight: 600; }
.eco-hero-title { font-size: 25px; font-weight: 700; letter-spacing: -0.025em; margin: 8px 0 8px; line-height: 1.22; }
.eco-hero-text { opacity: 0.93; font-size: 13.5px; line-height: 1.6; max-width: 640px; }
.eco-decision { margin-top: 16px; padding-top: 12px; border-top: 1px solid rgba(255, 255, 255, 0.28); font-size: 12.5px; line-height: 1.5; }
.eco-hero-side { display: flex; flex-direction: column; gap: 10px; }
.eco-mini { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--accent); border-radius: 12px; padding: 12px 14px; font-size: 13px; box-shadow: var(--shadow); }
.eco-mini.good { border-left-color: var(--green); }
.eco-mini.warn { border-left-color: var(--amber); }
.eco-mini.bad { border-left-color: var(--red); }
.eco-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(205px, 1fr)); gap: 14px; margin-top: 18px; }
.eco-tile { position: relative; overflow: hidden; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 16px 12px 18px; box-shadow: var(--shadow); cursor: pointer; transition: box-shadow 0.15s, transform 0.15s, border-color 0.15s; }
.eco-tile:hover { box-shadow: var(--shadow-lg); border-color: var(--border-strong); transform: translateY(-1px); }
.eco-tile::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--accent); }
.eco-tile.good::before { background: var(--green); }
.eco-tile.warn::before { background: var(--amber); }
.eco-tile.bad::before { background: var(--red); }
.eco-tile-label { font-size: 11.5px; color: var(--text-muted); font-weight: 600; letter-spacing: 0.01em; }
.eco-tile-value { font-size: 29px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; margin-top: 2px; }
.eco-tile-value span { font-size: 14px; font-weight: 600; color: var(--text-muted); margin-left: 3px; }
.eco-tile-delta { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.eco-tile-delta em { font-style: normal; opacity: 0.75; }
.eco-tile-delta.up { color: var(--text); }
.eco-spark { margin: 8px 0 4px; height: 34px; }
.eco-tile-foot { font-size: 11px; color: var(--text-muted); }
.delta-chip { display: inline-block; font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 99px; background: var(--surface-2); color: var(--text-muted); font-variant-numeric: tabular-nums; }
.delta-chip.up { background: var(--red-weak); color: var(--red); }
.delta-chip.down { background: var(--green-weak); color: var(--green); }
table.heat { border-collapse: separate; border-spacing: 2px; }
table.heat td { border: none; border-radius: 4px; }
table.heat tbody tr:hover { background: transparent; }
.scn-row { margin-bottom: 14px; }
.scn-top { display: flex; justify-content: space-between; font-size: 12.5px; margin-bottom: 4px; }
.scn-row input[type=range] { width: 100%; accent-color: var(--accent); padding: 0; }
.ex-row { display: flex; gap: 10px; align-items: flex-start; padding: 7px 4px; border-bottom: 1px solid var(--border); cursor: pointer; }
.ex-row:hover { background: var(--surface-2); }
.ex-row input { margin-top: 3px; }
.ex-title { font-weight: 600; font-size: 13px; }
#eco-tabs { position: sticky; top: 64px; z-index: 30; background: var(--bg); margin-top: 0; }
@media (max-width: 900px) { .eco-hero { grid-template-columns: 1fr; } }

/* ---- Deep Dive ---- */
.dd-main { max-width: 1320px; }
.dd-search-row { display: flex; gap: 10px; }
.dd-input-wrap { flex: 1; }
.dd-input-wrap input, .dd-input-wrap .autocomplete-wrap { width: 100%; }
.dd-input-wrap input { font-size: 15px; padding: 12px 15px; }
.dd-recent { margin-top: 10px; font-size: 12.5px; display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.dd-recent .chip { text-decoration: none; }
.dd-loading { display: flex; gap: 16px; align-items: center; margin-top: 16px; }
.dd-spin { width: 26px; height: 26px; border: 3px solid var(--border-strong); border-top-color: var(--accent); border-radius: 50%; animation: ddspin 0.9s linear infinite; }
@keyframes ddspin { to { transform: rotate(360deg); } }
.dd-muted { color: var(--text-muted); }
.dd-muted.small, .small { font-size: 12px; }
.pos { color: var(--green); }
.neg { color: var(--red); }
td.num, th.num { text-align: right; white-space: nowrap; }

.dd-hero { margin-top: 18px; }
.dd-hero-main { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 22px 26px; box-shadow: var(--shadow); }
.dd-hero-top { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dd-hero h2 { margin: 2px 0 4px; font-size: 27px; letter-spacing: -0.03em; }
.dd-tick { font-size: 15px; font-weight: 600; color: var(--accent); background: var(--accent-weak); padding: 2px 10px; border-radius: 99px; vertical-align: middle; margin-left: 6px; }
.dd-price { font-size: 20px; font-weight: 650; font-variant-numeric: tabular-nums; }
.dd-price .dd-muted { font-size: 13px; font-weight: 400; margin-left: 10px; }
.dd-eyebrow { font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; font-weight: 600; color: var(--text-muted); }
.dd-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; }
.dd-verdict { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 18px; padding: 16px 20px; border-radius: 14px; background: var(--surface-2); border-left: 5px solid var(--border-strong); }
.dd-verdict.good { background: var(--green-weak); border-left-color: var(--green); }
.dd-verdict.warn { background: var(--amber-weak); border-left-color: var(--amber); }
.dd-verdict.bad { background: var(--red-weak); border-left-color: var(--red); }
.dd-verdict-t { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.dd-verdict-r { display: flex; gap: 26px; flex-wrap: wrap; }
.dd-verdict-r div { display: flex; flex-direction: column; }
.dd-verdict-r span { font-size: 11px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; }
.dd-verdict-r b { font-size: 21px; font-variant-numeric: tabular-nums; }
.dd-caveat { font-size: 12px; color: var(--text-muted); margin-top: 12px; }
.dd-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.dd-tile { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 12px 15px; box-shadow: var(--shadow); border-left: 3px solid var(--accent); }
.dd-tile.good { border-left-color: var(--green); }
.dd-tile-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; }
.dd-tile-v { font-size: 24px; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.dd-tile-s { font-size: 12px; color: var(--text-muted); }

.dd-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin: 20px 0 20px; overflow-x: auto; position: sticky; top: 0; z-index: 30; background: var(--bg); padding-top: 4px; }
.dd-tabs button { border: none; background: transparent; color: var(--text-muted); font: 500 13.5px "Inter", sans-serif; padding: 10px 13px; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.dd-tabs button:hover { color: var(--text); }
.dd-tabs button.on { color: var(--accent); border-bottom-color: var(--accent); font-weight: 600; }
.dd-panel[hidden] { display: none; }
.dd-grid { margin-top: 16px; align-items: start; }
.dd-block { margin-top: 16px; }
.dd-grid .dd-block { margin-top: 0; }
.dd-block-h { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; flex-wrap: wrap; margin-bottom: 10px; }
.dd-block-h h3 { margin: 0; font-size: 15px; font-weight: 650; letter-spacing: -0.01em; }
.dd-chart { position: relative; }
.dd-note { font-size: 12px; color: var(--text-muted); margin: 10px 0 0; line-height: 1.55; }
.dd-tablewrap { overflow-x: auto; }
.dd-table { font-size: 12.5px; }
.dd-table td, .dd-table th { padding: 7px 10px; }
.dd-table .dd-rowh { position: sticky; left: 0; background: var(--surface); min-width: 220px; white-space: nowrap; }
.dd-table tr.dd-bold td { font-weight: 650; }
.dd-table tr.dd-sec td { background: var(--surface-2); font-size: 10.5px; text-transform: uppercase; letter-spacing: 0.07em; font-weight: 700; color: var(--text-muted); padding: 6px 10px; }
.dd-table td.num.pos { color: var(--green); }
.dd-table td.num.neg { color: var(--red); }
.dd-hint { display: inline-block; width: 13px; height: 13px; line-height: 13px; text-align: center; font-size: 9px; border-radius: 50%; background: var(--surface-3); color: var(--text-muted); margin-left: 5px; cursor: help; vertical-align: middle; }
.dd-kv { width: 100%; }
.dd-kv td { padding: 6px 4px; }
.dd-kv td.num { font-weight: 550; }
.dd-hl { background: var(--accent-weak); }
.dd-me td { background: var(--accent-weak); }
.dd-med td { border-top: 2px solid var(--border-strong); font-weight: 600; }
.dd-heat td.yes { background: var(--green-weak); color: var(--green); }
.dd-heat td small { display: block; font-size: 10.5px; opacity: 0.8; font-weight: 400; }
.dd-callout { padding: 11px 15px; border-radius: 10px; background: var(--surface-2); border-left: 4px solid var(--accent); font-size: 13px; margin: 10px 0; line-height: 1.55; }
.dd-callout.good { background: var(--green-weak); border-left-color: var(--green); }
.dd-callout.warn { background: var(--amber-weak); border-left-color: var(--amber); }
.dd-callout.bad { background: var(--red-weak); border-left-color: var(--red); }
.dd-list { margin: 0; padding-left: 18px; }
.dd-list li { margin-bottom: 9px; line-height: 1.5; }
.dd-list li div { color: var(--text-muted); font-size: 12.5px; }
.dd-sev { display: inline-block; font-size: 10px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; padding: 1px 8px; border-radius: 99px; }
.dd-sev.high { background: var(--red-weak); color: var(--red); }
.dd-sev.medium { background: var(--amber-weak); color: var(--amber); }
.dd-sev.low { background: var(--surface-2); color: var(--text-muted); }
.dd-tag { font-size: 10px; text-transform: uppercase; letter-spacing: 0.05em; background: var(--surface-2); padding: 2px 7px; border-radius: 6px; color: var(--text-muted); white-space: nowrap; }
.dd-big { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.dd-score { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.dd-score b { font-size: 34px; letter-spacing: -0.03em; }
.dd-score span { color: var(--text-muted); font-size: 16px; }
.dd-score em { font-style: normal; font-size: 11px; font-weight: 700; text-transform: uppercase; padding: 2px 9px; border-radius: 99px; margin-left: 8px; background: var(--surface-2); }
.dd-score em.strong, .dd-score em.safe { background: var(--green-weak); color: var(--green); }
.dd-score em.weak, .dd-score em.distress { background: var(--red-weak); color: var(--red); }
.dd-score em.grey, .dd-score em.average, .dd-score em.warn { background: var(--amber-weak); color: var(--amber); }

.dd-check { list-style: none; margin: 0; padding: 0; }
.dd-check li { display: flex; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.dd-check li:last-child { border-bottom: none; }
.dd-check li i { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); }
.dd-check li.y i { background: var(--green-weak); color: var(--green); }
.dd-check li.n i { background: var(--red-weak); color: var(--red); }
.dd-check.compact li { padding: 5px 0; }
.dd-lensrow { display: grid; grid-template-columns: 230px 1fr 34px; gap: 4px 10px; align-items: center; padding: 6px 4px; cursor: pointer; border-radius: 8px; }
.dd-lensrow:hover { background: var(--surface-2); }
.dd-lensname { font-size: 12.5px; font-weight: 550; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dd-lensscore { font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.dd-lensverdict { grid-column: 2 / 4; font-size: 11.5px; color: var(--text-muted); margin-top: -3px; }
.dd-bar { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.dd-bar i { display: block; height: 100%; border-radius: 99px; background: var(--accent); }
.dd-bar i.good { background: var(--green); }
.dd-bar i.warn { background: var(--amber); }
.dd-bar i.bad { background: var(--red); }

.dd-lenslist { display: grid; gap: 16px; }
.dd-lens-h { display: flex; justify-content: space-between; gap: 18px; }
.dd-lens-h h3 { margin: 0 0 3px; font-size: 17px; letter-spacing: -0.02em; }
.dd-gauge { text-align: center; min-width: 76px; padding: 6px 10px; border-radius: 12px; background: var(--surface-2); }
.dd-gauge b { display: block; font-size: 26px; line-height: 1.1; }
.dd-gauge span { font-size: 10.5px; color: var(--text-muted); }
.dd-gauge.good { background: var(--green-weak); color: var(--green); }
.dd-gauge.warn { background: var(--amber-weak); color: var(--amber); }
.dd-gauge.bad { background: var(--red-weak); color: var(--red); }
.dd-lens-v { margin: 10px 0 6px; font-weight: 650; font-size: 13.5px; }
.dd-lens-v.good { color: var(--green); }
.dd-lens-v.warn { color: var(--amber); }
.dd-lens-v.bad { color: var(--red); }
.dd-prs { list-style: none; margin: 0; padding: 0; }
.dd-pr { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); font-size: 13px; }
.dd-pr > i { flex: 0 0 22px; height: 22px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-style: normal; font-size: 12px; font-weight: 700; background: var(--surface-2); color: var(--text-muted); }
.dd-pr.pass > i { background: var(--green-weak); color: var(--green); }
.dd-pr.fail > i { background: var(--red-weak); color: var(--red); }
.dd-pr.watch > i { background: var(--amber-weak); color: var(--amber); }
.dd-pr.info > i { background: var(--accent-weak); color: var(--accent); }
.dd-ev { margin-top: 3px; }
.dd-quotes { margin-top: 6px; }
.dd-quotes summary { cursor: pointer; font-size: 12px; color: var(--accent); font-weight: 550; }
blockquote { margin: 8px 0; padding: 8px 14px; border-left: 3px solid var(--accent); background: var(--surface-2); border-radius: 0 8px 8px 0; font-size: 12.5px; line-height: 1.6; }
blockquote cite { display: block; margin-top: 5px; font-size: 11.5px; color: var(--text-muted); font-style: normal; font-weight: 600; }
.dd-askrow { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-top: 10px; }
.dd-askrow input { flex: 1; min-width: 200px; }
.dd-lbl { display: flex; flex-direction: column; gap: 4px; font-size: 12px; color: var(--text-muted); font-weight: 600; }
.dd-lbl textarea, .dd-lbl input { font-weight: 400; color: var(--text); width: 100%; }
textarea { width: 100%; background: var(--surface); color: var(--text); border: 1px solid var(--border-strong); font: inherit; }

.dd-dcf-grid { grid-template-columns: 340px minmax(0, 1fr); align-items: start; }
.dd-weights input { width: 64px; margin-right: 6px; }
.dd-check1 { display: block; font-size: 12.5px; margin: 10px 0; }
.dd-scns { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.dd-scn { background: var(--surface); border: 1px solid var(--border); border-top: 4px solid var(--border-strong); border-radius: 12px; padding: 14px 16px; box-shadow: var(--shadow); }
.dd-scn.good { border-top-color: var(--green); }
.dd-scn.warn { border-top-color: var(--amber); }
.dd-scn.bad { border-top-color: var(--red); }
.dd-scn-v { font-size: 32px; font-weight: 700; letter-spacing: -0.03em; }
.dd-scn-k { display: flex; justify-content: space-between; font-size: 12.5px; padding: 4px 0; border-top: 1px solid var(--border); margin-top: 4px; }
.dd-impact { display: inline-block; width: 70px; height: 6px; background: var(--surface-3); border-radius: 99px; margin-right: 8px; vertical-align: middle; overflow: hidden; }
.dd-impact i { display: block; height: 100%; }
.dd-impact i.neg { background: var(--red); }
.dd-impact i.pos { background: var(--green); }
#dd-risks input { width: 100%; padding: 6px 8px; font-size: 12.5px; }
#dd-risks input.num { text-align: right; width: 90px; }
.dd-narr-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; }
.dd-md { font-size: 14px; line-height: 1.7; max-width: 820px; }
.dd-md h3 { margin: 26px 0 8px; font-size: 19px; letter-spacing: -0.02em; padding-top: 8px; border-top: 1px solid var(--border); }
.dd-md h3:first-child { border-top: none; margin-top: 0; }
.dd-md h4 { margin: 18px 0 6px; font-size: 15px; }
.dd-md code, code { background: var(--surface-2); padding: 1px 6px; border-radius: 5px; font-size: 12.5px; }
.dd-md a { color: var(--accent); }
@media (max-width: 1000px) { .dd-dcf-grid, .dd-narr-grid, .dd-scns { grid-template-columns: 1fr; } .dd-lensrow { grid-template-columns: 120px 1fr 30px; } }

@media print {
  .sidebar, .dd-search, .dd-actions, .dd-tabs, #dd-status, .page-header { display: none !important; }
  body { background: #fff; color: #000; font-size: 11px; }
  .main.dd-main { padding: 0; max-width: none; }
  .dd-panel { display: block !important; page-break-before: always; }
  .dd-panel[hidden] { display: block !important; }
  .card, .dd-hero-main, .dd-tile { box-shadow: none !important; break-inside: avoid; }
  .dd-chart { break-inside: avoid; }
  .dd-tablewrap { overflow: visible; }
}

.dd-table td:first-child { white-space: nowrap; }
.dd-poslink { margin-top: 8px; font-size: 12.5px; font-weight: 600; max-width: 520px; }

/* ---- Life in weeks ---- */
:root { --dot-done: #0b0d12; --dot-future: #c9cedb; --dot-now: #2f5f95; --dot-star: #e0a800; }
@media (prefers-color-scheme: dark) { :root { --dot-done: #f1f3fa; --dot-future: #3a4152; --dot-now: #7aa9dc; --dot-star: #f0c040; } }
.life-main { max-width: 1240px; }
.life-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; margin-bottom: 16px; }
.life-tile { background: var(--surface); border: 1px solid var(--border); border-left: 3px solid var(--accent); border-radius: 12px; padding: 12px 16px; box-shadow: var(--shadow); }
.life-tile-l { font-size: 11px; text-transform: uppercase; letter-spacing: 0.07em; color: var(--text-muted); font-weight: 600; }
.life-tile-v { font-size: 28px; font-weight: 700; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.life-tile-v small { font-size: 13px; font-weight: 500; color: var(--text-muted); letter-spacing: 0; }
.life-tile-s { font-size: 12px; color: var(--text-muted); }
.life-card { padding: 18px 22px 14px; }
.life-toolbar { display: flex; justify-content: space-between; gap: 14px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.life-legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--text-muted); align-items: center; }
.life-legend span { display: inline-flex; align-items: center; gap: 6px; }
.life-legend i.w { width: 11px; height: 11px; display: inline-block; }
.life-gridwrap { --gap: 3px; }
.life-cols { display: grid; grid-template-columns: repeat(52, 1fr); gap: var(--gap); margin: 0 0 4px 34px; font-size: 9px; color: var(--text-muted); text-align: center; height: 12px; }
.life-cols span { overflow: visible; white-space: nowrap; }
.life-body { display: grid; grid-template-columns: 30px 1fr; gap: 4px; }
.life-rows { display: grid; grid-auto-rows: 1fr; gap: var(--gap); font-size: 9px; color: var(--text-muted); text-align: right; }
.life-rows span { display: flex; align-items: center; justify-content: flex-end; }
.life-grid { display: grid; grid-template-columns: repeat(52, 1fr); gap: var(--gap); }
i.w { aspect-ratio: 1; border-radius: 50%; display: block; font-style: normal; box-sizing: border-box; }
.life-grid i.w { cursor: pointer; }
i.w.done { background: var(--dot-done); }
i.w.future { background: transparent; border: 1.3px solid var(--dot-future); }
i.w.now { background: var(--dot-now); animation: lifepulse 1.6s ease-in-out infinite; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--dot-now); }
i.w.star { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3.2px var(--dot-star); }
i.w.note { background-image: radial-gradient(circle, var(--dot-star) 0 22%, transparent 26%); }
i.w.done.note { background-color: var(--dot-done); }
i.w.sel { outline: 2px solid var(--accent); outline-offset: 2px; }
.life-grid i.w:hover { transform: scale(1.5); z-index: 2; position: relative; }
@keyframes lifepulse { 50% { transform: scale(1.35); } }
.life-foot { margin-top: 10px; }
.life-tip { position: fixed; z-index: 100; background: #14171f; color: #fff; padding: 8px 11px; border-radius: 8px; font-size: 12px; line-height: 1.45; pointer-events: none; max-width: 230px; box-shadow: var(--shadow-lg); }
.life-two { margin-top: 16px; align-items: start; }
.life-chip { display: inline-block; font-size: 12px; font-weight: 600; padding: 3px 10px; border-radius: 99px; margin: 0 6px 10px 0; }
.life-chip.star { background: var(--amber-weak); color: var(--amber); }
.life-star { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.life-list { display: grid; gap: 6px; }
.life-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.life-item i { width: 12px; height: 12px; border-radius: 50%; display: inline-block; }
.life-item button { margin-left: auto; }
.life-star-i { color: var(--dot-star); }
.life-form { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; align-items: end; }
.life-form.stack { flex-direction: column; align-items: stretch; max-width: 320px; }
.life-form input[type=color] { padding: 2px; width: 44px; height: 36px; }
@media print {
  .life-toolbar .seg, #life-week-panel, #life-chapters, #life-settings, .life-two { display: none !important; }
  .life-legend { display: flex; }
  i.w.done { background: #000 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  i.w.now { background: #2f5f95 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; animation: none; }
  i.w.future { border-color: #999 !important; }
}

/* ---- Routine, habits, principles ---- */
.ev { display: inline-block; font-size: 10.5px; font-weight: 700; padding: 1px 8px; border-radius: 99px; letter-spacing: 0.02em; }
.ev-strong { background: var(--green-weak); color: var(--green); }
.ev-mod { background: var(--accent-weak); color: var(--accent); }
.ev-weak { background: var(--amber-weak); color: var(--amber); }
.ev-cont { background: var(--red-weak); color: var(--red); }
.orig { display: inline-block; font-size: 10.5px; font-weight: 600; padding: 1px 8px; border-radius: 6px; background: var(--surface-2); color: var(--text-muted); margin-right: 4px; }
.rt-top { display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.rt-datenav { display: flex; gap: 10px; align-items: center; font-size: 16px; }
.rt-summary { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.rt-ring { width: 84px; height: 84px; }
.rt-big { font-size: 22px; font-weight: 700; letter-spacing: -0.02em; }
.rt-times { display: flex; gap: 12px; font-size: 12px; color: var(--text-muted); }
.rt-times label { display: flex; flex-direction: column; gap: 3px; }
.rt-cols { align-items: start; }
.rt-block { margin-bottom: 16px; }
.rt-row { display: flex; gap: 12px; padding: 11px 0; border-top: 1px solid var(--border); }
.rt-row:first-of-type { border-top: none; }
.rt-row.done .rt-title b { text-decoration: line-through; opacity: 0.55; }
.rt-check { position: relative; width: 24px; height: 24px; flex: 0 0 24px; margin-top: 1px; }
.rt-check input { position: absolute; opacity: 0; inset: 0; width: 100%; height: 100%; cursor: pointer; margin: 0; }
.rt-box { display: block; width: 24px; height: 24px; border-radius: 8px; border: 2px solid var(--border-strong); background: var(--surface); transition: all 0.12s; }
.rt-check input:checked + .rt-box { background: var(--green); border-color: var(--green); }
.rt-check input:checked + .rt-box::after { content: "✓"; color: #fff; display: block; text-align: center; font-size: 15px; line-height: 20px; font-weight: 700; }
.rt-row.avoid .rt-check input:checked + .rt-box { background: var(--accent); border-color: var(--accent); }
.rt-dot { display: flex; width: 24px; height: 24px; border-radius: 50%; border: 2px solid var(--border-strong); align-items: center; justify-content: center; font-size: 12px; color: #fff; }
.rt-dot.on { background: var(--green); border-color: var(--green); }
.rt-main { flex: 1; min-width: 0; }
.rt-title { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; }
.rt-time { font-variant-numeric: tabular-nums; font-size: 12px; font-weight: 700; color: var(--accent); background: var(--accent-weak); padding: 1px 7px; border-radius: 6px; }
.rt-dur, .rt-streak { font-size: 11.5px; color: var(--text-muted); }
.rt-core { font-size: 9.5px; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 700; color: var(--accent); border: 1px solid var(--accent); border-radius: 5px; padding: 0 5px; }
.rt-detail { font-size: 12.5px; color: var(--text-muted); margin-top: 2px; line-height: 1.5; }
.rt-whybtn { border: none; background: none; color: var(--accent); font-size: 11.5px; font-weight: 600; cursor: pointer; padding: 3px 0; }
.rt-why { background: var(--surface-2); border-radius: 10px; padding: 8px 12px; margin-top: 4px; font-size: 12.5px; line-height: 1.55; }
.rt-why p { margin: 4px 0; }
.rt-num { display: inline-flex; align-items: center; gap: 8px; margin-top: 4px; }
.rt-num input { width: 90px; padding: 5px 8px; }
.rt-num em { font-style: normal; font-size: 12px; color: var(--text-muted); }
.rt-mood { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 12.5px; margin-bottom: 10px; }
.rt-pill { border: 1px solid var(--border-strong); background: var(--surface); color: var(--text); width: 30px; height: 30px; border-radius: 8px; cursor: pointer; font-weight: 600; }
.rt-pill.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.rt-tl { display: flex; gap: 12px; padding: 10px 0; border-top: 1px solid var(--border); }
.rt-tl:first-of-type { border-top: none; }
.rt-tl .rt-time { align-self: flex-start; margin-top: 2px; }
.rt-form { display: grid; gap: 10px; margin: 12px 0; padding: 14px; background: var(--surface-2); border-radius: 12px; }
.rt-frow { display: flex; gap: 12px; flex-wrap: wrap; align-items: end; }
tr.off { opacity: 0.45; }
.heat { display: grid; grid-template-rows: repeat(7, 1fr); grid-auto-flow: column; gap: 4px; }
.hm { width: 100%; aspect-ratio: 1; border-radius: 4px; background: var(--surface-3); display: block; }
.hm.pad { background: transparent; }
.hm.l1 { background: color-mix(in srgb, var(--green) 25%, var(--surface-3)); }
.hm.l2 { background: color-mix(in srgb, var(--green) 50%, var(--surface-3)); }
.hm.l3 { background: color-mix(in srgb, var(--green) 75%, var(--surface-3)); }
.hm.l4 { background: var(--green); }
.heat { grid-template-columns: repeat(12, 1fr); grid-auto-flow: row; }
.rt-hb { display: grid; gap: 8px; }
.rt-hbrow { display: grid; grid-template-columns: 1.3fr 1fr 44px 40px; gap: 10px; align-items: center; font-size: 12.5px; }
.cm { color: var(--border-strong); font-size: 18px; }
.cm.y { color: var(--accent); }
td.ctr { text-align: center; }
.pr-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 14px; }
.pr-card h3 { margin: 0 0 4px; font-size: 15px; }
.pr-card p { font-size: 13px; line-height: 1.6; margin: 8px 0; }
.pr-head { display: flex; gap: 12px; align-items: flex-start; }
.pr-head > div { flex: 1; }
.pr-num { flex: 0 0 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; }
.pr-num.alt { width: auto; padding: 0 9px; font-size: 12px; background: var(--surface-3); color: var(--text); }
.pr-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.pr-q { font-size: 14px; line-height: 1.65; font-family: Georgia, "Times New Roman", serif; margin: 10px 0; }
.pr-foot { margin-top: 10px; display: grid; gap: 8px; }
.pr-note { min-height: 34px; resize: vertical; font-size: 12.5px; }
.pr-filter { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 12px; }
.pr-filter input { min-width: 220px; }
.pr-filter .seg { flex-wrap: wrap; }
@media (max-width: 700px) { .pr-cols { grid-template-columns: 1fr; } .rt-hbrow { grid-template-columns: 1fr 1fr 40px 36px; } }

.home-life { display: flex; justify-content: space-between; gap: 24px; align-items: center; flex-wrap: wrap; text-decoration: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 20px; margin-bottom: 16px; box-shadow: var(--shadow); color: inherit; }
.home-life[hidden] { display: none; }
.home-life:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); }
.home-life-v { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; }
.home-life-v small { font-size: 12.5px; font-weight: 400; color: var(--text-muted); letter-spacing: 0; }
.home-life-dots { display: flex; gap: 3px; margin-top: 8px; }
.home-life-dots i { width: 9px; height: 9px; border-radius: 50%; border: 1.2px solid var(--dot-future); }
.home-life-dots i.d { background: var(--dot-done); border-color: var(--dot-done); }
.home-life-dots i.n { background: var(--dot-now); border-color: var(--dot-now); }

/* ---- Goals ---- */
.gl-yearnav { display: flex; gap: 8px; align-items: center; }
.gl-yearnav select { padding: 6px 10px; font-weight: 600; }
.gl-two { grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 16px; align-items: start; margin-top: 16px; }
@media (max-width: 1000px) { .gl-two { grid-template-columns: 1fr; } }
.gl-hero { display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: center; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; border-radius: 18px; padding: 22px 28px; box-shadow: var(--shadow-lg); }
.gl-hero .dd-eyebrow { color: rgba(255, 255, 255, 0.8); }
.gl-hero-l { flex: 1; min-width: 280px; }
.gl-theme { width: 100%; background: transparent; border: none; border-bottom: 2px solid rgba(255, 255, 255, 0.45); color: #fff; font-size: 26px; font-weight: 700; letter-spacing: -0.02em; padding: 6px 2px; border-radius: 0; }
.gl-theme::placeholder { color: rgba(255, 255, 255, 0.55); }
.gl-theme:focus { box-shadow: none; border-color: #fff; }
.gl-hero-r { display: flex; gap: 14px; align-items: center; }
.gl-hero-r .rt-ring text { fill: #fff; }
.gl-hero-r .rt-ring circle:first-child { stroke: rgba(255, 255, 255, 0.25); }
.gl-hero-r .rt-ring circle:nth-child(2) { stroke: #fff; }
.gl-hero-r .dd-muted { color: rgba(255, 255, 255, 0.8); }
.gl-dream { margin-top: 12px; padding: 12px 18px; border-left: 4px solid var(--accent-2); background: var(--surface); border-radius: 0 12px 12px 0; box-shadow: var(--shadow); font-size: 14.5px; }
.gl-goal { margin-bottom: 12px; }
.gl-goal.done { opacity: 0.75; }
.gl-goal-h { display: flex; gap: 12px; align-items: flex-start; }
.gl-goal h3 { margin: 0; font-size: 16px; letter-spacing: -0.01em; }
.gl-num { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent-2)); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 700; flex: 0 0 30px; }
.gl-prog { display: flex; align-items: center; gap: 10px; margin: 10px 0 2px; }
.gl-prog .dd-bar { flex: 1; }
.gl-slider { width: 100%; accent-color: var(--accent); padding: 0; height: 18px; }
.gl-qs { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin: 8px 0; }
.gl-q { display: flex; gap: 6px; align-items: flex-start; font-size: 12px; padding: 7px 8px; border: 1px solid var(--border); border-radius: 9px; cursor: pointer; line-height: 1.35; }
.gl-q.cur { border-color: var(--accent); background: var(--accent-weak); }
.gl-q.ok { background: var(--green-weak); border-color: var(--green); }
.gl-q input { margin-top: 2px; }
@media (max-width: 900px) { .gl-qs { grid-template-columns: 1fr 1fr; } }
.gl-qform { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.gl-goal.editing { border-color: var(--accent); }
.gl-goal.editing .dd-lbl { margin-top: 8px; }
.gl-mini { display: flex; flex-direction: column; margin-bottom: 8px; }
.gl-counts { display: flex; gap: 14px; font-weight: 600; margin: 8px 0; }
.gl-hrow { display: flex; gap: 8px; align-items: center; padding: 5px 6px; border-radius: 8px; flex-wrap: wrap; }
.gl-hrow.cur { background: var(--accent-weak); }
.gl-hrow select { flex: 1; min-width: 140px; padding: 5px 8px; font-size: 12.5px; }
.gl-strip { display: flex; flex-wrap: wrap; gap: 4px; }
.gl-strip .w { width: 15px; height: 15px; display: block; }
.gl-kind { display: inline-block; padding: 1px 9px; border-radius: 99px; font-size: 11.5px; font-weight: 600; margin-right: 8px; }

.gl-cal { overflow-x: auto; }
.gl-legend { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 12px; }
.gl-leg { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border: 1px solid var(--border); background: var(--surface); border-radius: 99px; font-size: 12px; cursor: pointer; color: var(--text); }
.gl-leg i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.gl-leg span { color: var(--text-muted); }
.gl-leg.off { opacity: 0.4; }
.cal-grid { display: grid; grid-template-columns: 38px repeat(31, minmax(22px, 1fr)); gap: 3px; min-width: 860px; }
.cm-label { font-size: 11px; font-weight: 700; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; display: flex; align-items: center; }
.cd { aspect-ratio: 1; border-radius: 6px; background: var(--surface-2); font-style: normal; font-size: 10.5px; display: flex; align-items: center; justify-content: center; color: var(--text-muted); cursor: pointer; border: 1px solid transparent; }
.cd.blank { background: transparent; cursor: default; }
.cd.wknd { background: var(--surface-3); }
.cd.past { opacity: 0.6; }
.cd.has { color: #fff; font-weight: 700; opacity: 1; }
.cd.today { outline: 2px solid var(--text); outline-offset: 1px; opacity: 1; }
.cd.sel { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.cd:not(.blank):hover { transform: scale(1.12); position: relative; z-index: 2; }
.gl-ev { display: flex; gap: 8px; align-items: center; padding: 8px 0; border-top: 1px solid var(--border); flex-wrap: wrap; }
.gl-eform { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 12px; }
.gl-eform input, .gl-eform select { padding: 7px 10px; font-size: 13px; }
.gl-advlist { display: grid; gap: 8px; margin: 12px 0; }
.gl-adv { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.gl-adv.done { background: var(--green-weak); }
.gl-adv.skipped { opacity: 0.5; }
.gl-adv.idea { border-style: dashed; }
.gl-adv select { padding: 4px 8px; font-size: 12px; }
.gl-ideas { margin-top: 10px; }
.gl-ideas summary { cursor: pointer; color: var(--accent); font-weight: 600; font-size: 13px; }
.gl-chips { display: flex; gap: 6px; flex-wrap: wrap; margin: 10px 0; }
.gl-chip { border: 1px dashed var(--border-strong); background: var(--surface); color: var(--text); border-radius: 99px; padding: 4px 11px; font-size: 12px; cursor: pointer; }
.gl-chip:hover { border-color: var(--accent); color: var(--accent); }
.gl-wizard { display: grid; grid-template-columns: 200px minmax(0, 1fr); gap: 16px; align-items: start; }
@media (max-width: 900px) { .gl-wizard { grid-template-columns: 1fr; } }
.gl-steps { display: grid; gap: 4px; position: sticky; top: 12px; }
.gl-step { display: flex; gap: 10px; align-items: center; padding: 9px 12px; border: 1px solid var(--border); background: var(--surface); border-radius: 10px; cursor: pointer; text-align: left; color: var(--text); font: 500 13px "Inter", sans-serif; }
.gl-step b { width: 22px; height: 22px; border-radius: 50%; background: var(--surface-3); display: inline-flex; align-items: center; justify-content: center; font-size: 11px; }
.gl-step.on { border-color: var(--accent); background: var(--accent-weak); color: var(--accent); }
.gl-step.on b { background: var(--accent); color: #fff; }
.gl-q1 { margin-top: 14px; }
.gl-areas { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 24px; }
.gl-tasks { margin: 12px 0; }
.gl-task { display: flex; gap: 10px; align-items: center; padding: 9px 4px; border-top: 1px solid var(--border); }
.gl-task.done span { text-decoration: line-through; color: var(--text-muted); }
.gl-task span { flex: 1; }
.gl-goaltag { font-style: normal; font-size: 11px; background: var(--accent-weak); color: var(--accent); padding: 1px 8px; border-radius: 99px; margin-left: 6px; }
.gl-wkrow { display: grid; grid-template-columns: 40px 60px 1fr 40px; gap: 8px; align-items: center; padding: 7px 8px; border-radius: 8px; text-decoration: none; color: inherit; font-size: 12.5px; }
.gl-wkrow.on, .gl-wkrow:hover { background: var(--surface-2); }
.gl-wkrow em { font-style: normal; color: var(--text-muted); text-align: right; }
.gl-qsum { display: grid; gap: 4px; margin-bottom: 10px; font-size: 12.5px; }
.gl-qsum div { display: flex; gap: 10px; }
.gl-qsum b { flex: 0 0 34%; }
.gl-qsum span { flex: 1; color: var(--text-muted); }
.life-body { grid-template-columns: 30px 1fr 140px; }
.life-themes { display: grid; grid-auto-rows: 1fr; gap: var(--gap); font-size: 9px; color: var(--text-muted); }
.life-themes span { display: flex; align-items: center; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.life-themes b { color: var(--accent); margin-right: 4px; }
@media (max-width: 900px) { .life-body { grid-template-columns: 30px 1fr; } .life-themes { display: none; } }
.gl-strip .gw { width: 15px; height: 15px; border-radius: 50%; display: block; box-sizing: border-box; }
.gw.done { background: var(--dot-done); }
.gw.future { border: 1.3px solid var(--dot-future); }
.gw.now { background: var(--dot-now); box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--dot-now); }
.gw.star { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 3.2px var(--dot-star); }
.gw:hover { transform: scale(1.4); }
i.w.fi { box-shadow: 0 0 0 1.5px var(--surface), 0 0 0 4px var(--green) !important; background: var(--green) !important; }


/* =====================================================================================
   THEME SWEEP (dark elegant, majority white) - shared components used by Calendar, Goals,
   Company Search, Deep Dive, Earnings, Performance, Economy, Listed, CFO, Life, Routine,
   Principles and Net worth. Tokens come from theme.css. Rules: square shapes (2-6px radii),
   hairline borders, display numerals, graphite bands with a brass rule, no pastel washes.
   ===================================================================================== */

/* chart / series palette: steel, brass, deep green, slate, muted red, teal, graphite, bronze */
:root {
  --series-1: #1f4e7d;
  --series-2: #b07a1e;
  --series-3: #0d7a59;
  --series-4: #6b7789;
  --series-5: #a9342d;
  --series-6: #2a7f86;
  --series-7: #27313f;
  --series-8: #8a5a2b;
  --dot-now: #1f4e7d;
  --dot-star: #c08a2b;
}
@media (prefers-color-scheme: dark) {
  :root {
    --series-1: #6fa3d8;
    --series-2: #d6a54a;
    --series-3: #3ccf9f;
    --series-4: #8b9bb0;
    --series-5: #e07a70;
    --series-6: #54b4c4;
    --series-7: #c5ccd8;
    --series-8: #b98a56;
    --dot-now: #7fb0e3;
    --dot-star: #d6a54a;
  }
}

/* staggered entrance for tile rows (short, subtle) */
@keyframes tsRise { from { opacity: 0; transform: translateY(7px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) {
  .stat-tile, .eco-tile, .dd-tile, .life-tile, .wl-tile, .eco-mini, .pr-card { animation: tsRise 0.42s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .stat-tile:nth-child(2), .eco-tile:nth-child(2), .dd-tile:nth-child(2), .life-tile:nth-child(2), .wl-tile:nth-child(2), .eco-mini:nth-child(2) { animation-delay: 0.05s; }
  .stat-tile:nth-child(3), .eco-tile:nth-child(3), .dd-tile:nth-child(3), .life-tile:nth-child(3), .wl-tile:nth-child(3), .eco-mini:nth-child(3) { animation-delay: 0.1s; }
  .stat-tile:nth-child(4), .eco-tile:nth-child(4), .dd-tile:nth-child(4), .life-tile:nth-child(4), .wl-tile:nth-child(4), .eco-mini:nth-child(4) { animation-delay: 0.15s; }
  .stat-tile:nth-child(n+5), .eco-tile:nth-child(n+5), .dd-tile:nth-child(n+5), .life-tile:nth-child(n+5), .wl-tile:nth-child(n+5) { animation-delay: 0.2s; }
}

/* ---------- dark graphite bands (Goals theme banner, Economy read) ---------- */
.gl-hero, .eco-hero-main {
  position: relative; isolation: isolate; overflow: hidden;
  background: linear-gradient(135deg, #18212c 0%, #0d1218 72%);
  border-radius: var(--radius); border-bottom: 3px solid var(--brass-hi); color: #eef1f6;
  box-shadow: 0 24px 44px -28px rgba(10, 15, 22, 0.7);
  --text: #eef1f6; --text-muted: #a4afc0; --surface: #1a2330; --surface-2: #202b3a; --border: #2b3645; --border-strong: #3b485b;
  --accent: #8fbbe8; --green: #3ccf9f; --red: #f0857c;
}
.gl-hero { padding: 24px 30px; }
.gl-hero .dd-eyebrow, .eco-eyebrow { color: var(--brass-hi); opacity: 1; letter-spacing: 0.16em; font-weight: 700; }
.gl-theme { font-family: var(--display); text-transform: uppercase; font-size: 32px; font-weight: 700; letter-spacing: 0.03em; border-bottom: 1px solid rgba(255, 255, 255, 0.28); }
.gl-theme:focus { border-color: var(--brass-hi); }
.gl-hero-r .rt-ring circle:nth-child(2) { stroke: var(--brass-hi); }
.gl-hero-r .rt-ring text { fill: #fff; font-family: var(--display); font-weight: 700; }
.gl-hero-r .rt-big { font-family: var(--display); text-transform: uppercase; font-size: 30px; letter-spacing: 0.03em; color: #fff; }
.gl-hero .btn { background: rgba(255, 255, 255, 0.08) !important; border: 1px solid rgba(255, 255, 255, 0.25); box-shadow: none !important; }
.eco-hero { gap: 16px; }
.eco-hero-main { padding: 26px 30px 24px; }
.eco-hero-main a { color: var(--brass-hi); text-decoration-thickness: 1px; }
.eco-hero-title { font-family: var(--display); text-transform: uppercase; font-size: 34px; font-weight: 700; letter-spacing: 0.015em; line-height: 1.08; }
.eco-hero-title, .eco-hero-text { color: #fff; }
.eco-hero-text { color: #c5cedb; opacity: 1; }
.eco-decision { border-top-color: rgba(214, 165, 74, 0.45); color: #d6dde8; }
.eco-mini { border-radius: 4px; border-left: 3px solid var(--brass); font-weight: 600; box-shadow: var(--shadow); }
.eco-mini.good { border-left-color: var(--green); }
.eco-mini.warn { border-left-color: var(--brass); }
.eco-mini.bad { border-left-color: var(--red); }

/* ---------- pills become small rectangular tags ---------- */
.chip, .omni-tag, .tabs .count, .oc-title .count, .delta-chip, .dd-tick, .dd-sev, .dd-score em, .life-chip, .ev, .gl-kind, .gl-leg, .gl-chip, .gl-goaltag { border-radius: 3px; }
.dd-tick { font-family: var(--display); font-weight: 700; font-size: 15px; letter-spacing: 0.08em; padding: 1px 9px; background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); }
.chip { border: 1px solid var(--border); padding: 1px 8px; font-weight: 600; letter-spacing: 0.02em; }
.chip.own { background: transparent; border-color: color-mix(in srgb, var(--green) 45%, transparent); }
a.chip:hover { border-color: var(--text); color: var(--text); }
.gl-leg, .gl-chip { padding: 4px 11px; }
.gl-chip { border-style: solid; }
.gl-chip:hover, .gl-leg:hover { border-color: var(--text); color: var(--text); }
.gl-kind { color: #fff !important; letter-spacing: 0.03em; text-transform: uppercase; font-size: 10.5px; font-weight: 700; padding: 2px 8px; }
.life-chip { text-transform: uppercase; letter-spacing: 0.05em; font-size: 11px; }
.delta-chip { border: 1px solid var(--border); }

/* tinted status labels: hairline + a whisper of colour instead of pastel fills */
.badge.green, .ev-strong, .dd-sev.low.good, .dd-score em.strong, .dd-score em.safe, .delta-chip.down { background: color-mix(in srgb, var(--green) 9%, var(--surface)); color: var(--green); border: 1px solid color-mix(in srgb, var(--green) 38%, transparent); }
.badge.red, .ev-cont, .dd-sev.high, .dd-score em.weak, .dd-score em.distress, .delta-chip.up { background: color-mix(in srgb, var(--red) 9%, var(--surface)); color: var(--red); border: 1px solid color-mix(in srgb, var(--red) 38%, transparent); }
.badge.amber, .ev-weak, .dd-sev.medium, .dd-score em.grey, .dd-score em.average, .dd-score em.warn { background: color-mix(in srgb, var(--brass) 10%, var(--surface)); color: var(--amber); border: 1px solid color-mix(in srgb, var(--brass) 45%, transparent); }
.badge.muted { background: var(--surface-2); color: var(--text-muted); border: 1px solid var(--border); }
.ev-mod, .isr-status.validated_backfilled { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); color: var(--accent); border: 1px solid color-mix(in srgb, var(--accent) 38%, transparent); }
.dd-sev.low { border: 1px solid var(--border); }
.dd-hint, .q-hint { border-radius: 2px; }

/* ---------- surfaces and radii ---------- */
.eco-tile, .dd-tile, .life-tile, .dd-scn, .rt-form { border-radius: var(--radius); }
.dd-verdict, .dd-callout, .dd-gauge, .rt-why, .insight, .gl-adv, .gl-q, .gl-step, .gl-dream, .autocomplete-dropdown { border-radius: 4px; }
.dd-dcf-grid .card, .gl-goal { border-radius: var(--radius); }
.dd-hero-main { border-radius: var(--radius); border-top: 4px solid var(--brass); padding: 24px 28px; box-shadow: var(--shadow-lg); }
.gl-dream { border-left-color: var(--brass); border-radius: 0 4px 4px 0; }
.dd-hero-main h2 { font-family: var(--display); text-transform: uppercase; font-size: 36px; font-weight: 700; letter-spacing: 0.015em; line-height: 1.05; }
.dd-eyebrow { letter-spacing: 0.14em; color: var(--brass); font-weight: 700; }
.dd-price { font-family: var(--display); font-size: 28px; font-weight: 700; letter-spacing: 0.01em; }
.pctbar, .pctbar > div, .dd-bar, .dd-bar i, .dd-impact, .category-bar { border-radius: 1px; }
.pctbar > div { background: var(--accent); }
.dd-bar { height: 6px; }
.dd-bar i { background: var(--accent); }
.dd-check li i, .dd-pr > i { border-radius: 3px; }
.dd-tag, .orig { border-radius: 2px; }
blockquote { border-left: 3px solid var(--brass); border-radius: 0 3px 3px 0; }
code, .dd-md code { border-radius: 3px; }
:focus-visible { border-radius: 3px; }
.callout { border-radius: 4px; }

/* verdict panels: neutral surface, coloured rule, display type - no mint / cream washes */
.dd-verdict { background: var(--surface-2); border: 1px solid var(--border); border-left: 5px solid var(--border-strong); }
.dd-verdict.good { background: var(--surface-2); border-left-color: var(--green); }
.dd-verdict.warn { background: var(--surface-2); border-left-color: var(--brass); }
.dd-verdict.bad { background: var(--surface-2); border-left-color: var(--red); }
.dd-verdict-t { font-family: var(--display); text-transform: uppercase; font-size: 32px; font-weight: 700; letter-spacing: 0.03em; line-height: 1.05; }
.dd-verdict.good .dd-verdict-t { color: var(--green); }
.dd-verdict.warn .dd-verdict-t { color: var(--amber); }
.dd-verdict.bad .dd-verdict-t { color: var(--red); }
.dd-verdict-r span, .dd-tile-l, .life-tile-l { letter-spacing: 0.12em; }
.dd-verdict-r b { font-family: var(--display); font-size: 30px; font-weight: 700; letter-spacing: 0.01em; }
.dd-callout, .insight { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--accent); }
.dd-callout.good, .insight.good { background: var(--surface-2); border-left-color: var(--green); }
.dd-callout.warn, .insight.warn { background: var(--surface-2); border-left-color: var(--brass); }
.dd-callout.bad, .insight.bad { background: var(--surface-2); border-left-color: var(--red); }
.dd-callout.info, .insight.info { border-left-color: var(--accent); }
.dd-gauge { border: 1px solid var(--border); background: var(--surface-2); }
.dd-gauge.good { background: var(--surface-2); border-color: var(--green); }
.dd-gauge.warn { background: var(--surface-2); border-color: var(--brass); }
.dd-gauge.bad { background: var(--surface-2); border-color: var(--red); }
.dd-gauge b { font-family: var(--display); font-size: 32px; font-weight: 700; }
.banner.warn, .banner.good { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--brass); }
.banner.good { border-left-color: var(--green); }
.next-report-hero { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--brass); border-radius: var(--radius); box-shadow: var(--shadow); }
.next-report-hero .label { letter-spacing: 0.14em; font-weight: 600; }
.next-report-hero .date { font-family: var(--display); font-size: 32px; font-weight: 700; color: var(--text); letter-spacing: 0.02em; }
.dd-scn { border-top: 3px solid var(--border-strong); }
.dd-scn-v, .dd-big, .dd-score b { font-family: var(--display); font-weight: 700; letter-spacing: 0.01em; }
.dd-scn-v { font-size: 38px; }
.dd-big { font-size: 40px; }
.dd-score b { font-size: 40px; }
.dd-tile { border-left: 3px solid var(--brass); }
.dd-tile.good { border-left-color: var(--green); }
.dd-tile-v { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: 0.01em; }
.dd-tile-l { font-weight: 700; }
.dd-bar i.warn { background: var(--brass); }
.dd-lensname { font-weight: 600; }
.dd-lens-h h3, .dd-block-h h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 19px; font-weight: 700; }
.dd-lens-h h3 { font-size: 22px; }
.dd-tabs button.on { color: var(--text); border-bottom: 3px solid var(--brass); }
.dd-tabs button { font-weight: 600; letter-spacing: 0.02em; }
.dd-spin { border-top-color: var(--brass); }
.dd-recent .chip { background: var(--surface); }
.dd-search .btn, .dd-search input { min-height: 44px; }
.dd-input-wrap input { font-size: 15px; }
.dd-heat td.yes { background: color-mix(in srgb, var(--green) 14%, var(--surface)); }
.dd-hl, .dd-me td { background: color-mix(in srgb, var(--accent) 8%, var(--surface)); }
.dd-md h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.05em; font-size: 22px; font-weight: 700; }

/* Company Search: wide search field, result panels */
.search-hero .autocomplete-wrap { flex: 1; max-width: 680px; }
.search-hero .autocomplete-wrap input { width: 100%; }
.quote-header .price { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: 0.01em; }
.quote-header h2, .quote-header .sym { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; }
.kv-row .kv-label { letter-spacing: 0.02em; }
.cd-num { font-family: var(--display); font-weight: 700; }

/* ---------- Economy ---------- */
.eco-tile { padding: 14px 16px 12px 18px; }
.eco-tile::before { width: 3px; background: var(--brass); }
.eco-tile.good::before { background: var(--green); }
.eco-tile.warn::before { background: var(--brass); }
.eco-tile.bad::before { background: var(--red); }
.eco-tile:hover { transform: translateY(-2px); border-color: var(--border-strong); }
.eco-tile-label { text-transform: uppercase; letter-spacing: 0.1em; font-size: 10.5px; font-weight: 700; }
.eco-tile-value { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: 0.005em; line-height: 1.05; }
.eco-tile-value span { font-family: "Inter", sans-serif; font-size: 13px; }
.eco-hero-side .eco-mini { padding: 13px 15px; }
#eco-tabs { background: var(--bg); }
table.heat td { border-radius: 2px; }

/* ---------- Life in weeks ---------- */
.life-tile { border-left: 3px solid var(--brass); padding: 12px 16px 13px; }
.life-tile-l { font-weight: 700; }
.life-tile-v { font-family: var(--display); font-size: 40px; font-weight: 700; letter-spacing: 0.005em; line-height: 1.05; }
.life-tile-v small { font-family: "Inter", sans-serif; }
.life-tip { border-radius: 3px; background: #0e1319; border: 1px solid #2b3645; }
i.w.now { animation: none; box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--brass); }
i.w.sel { outline-color: var(--brass); }
.life-grid i.w:hover { transform: scale(1.4); }
.life-chip.star { background: transparent; border: 1px solid var(--brass); color: var(--amber); }

/* ---------- Routine ---------- */
.rt-box { border-radius: 3px; width: 22px; height: 22px; border-width: 1.5px; }
.rt-check { width: 22px; height: 22px; flex-basis: 22px; }
.rt-check input:checked + .rt-box { background: var(--ink); border-color: var(--ink); }
.rt-check input:checked + .rt-box::after { color: var(--brass-hi); font-size: 14px; line-height: 19px; }
.rt-row.avoid .rt-check input:checked + .rt-box { background: var(--ink); border-color: var(--ink); }
@media (prefers-color-scheme: dark) {
  .rt-check input:checked + .rt-box, .rt-row.avoid .rt-check input:checked + .rt-box { background: var(--surface-3); border-color: var(--brass); }
}
.rt-check:hover .rt-box { border-color: var(--text); }
.rt-dot { border-radius: 3px; }
.rt-dot.on { background: var(--ink); border-color: var(--ink); color: var(--brass-hi); }
.rt-time { background: var(--surface-2); color: var(--text); border: 1px solid var(--border); border-radius: 3px; letter-spacing: 0.02em; }
.rt-core { color: var(--brass); border-color: color-mix(in srgb, var(--brass) 70%, transparent); border-radius: 2px; }
.rt-whybtn { color: var(--accent); letter-spacing: 0.03em; text-transform: uppercase; font-size: 10.5px; font-weight: 700; }
.rt-why { background: var(--surface-2); border-left: 2px solid var(--brass); border-radius: 0 3px 3px 0; }
.rt-pill { border-radius: 3px; }
.rt-pill:hover { border-color: var(--text); }
.rt-pill.on { background: var(--ink); border-color: var(--ink); color: var(--brass-hi); }
@media (prefers-color-scheme: dark) { .rt-pill.on { background: var(--surface-3); border-color: var(--brass); color: var(--brass-hi); } }
.rt-big { font-family: var(--display); font-size: 32px; font-weight: 700; letter-spacing: 0.02em; }
.rt-form { border: 1px solid var(--border); border-radius: 4px; }
.rt-datenav { font-family: var(--display); font-size: 22px; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; }
.rt-block .section-title, .rt-block h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 19px; font-weight: 700; }
.hm { border-radius: 2px; }
.hm.l1 { background: color-mix(in srgb, var(--green) 30%, var(--surface-3)); }
.hm.l2 { background: color-mix(in srgb, var(--green) 55%, var(--surface-3)); }
.hm.l3 { background: color-mix(in srgb, var(--green) 80%, var(--surface-3)); }

/* ---------- Principles ---------- */
.pr-num { border-radius: 3px; background: linear-gradient(135deg, #1b2532, #0d1218); color: var(--brass-hi); font-family: var(--display); font-size: 19px; font-weight: 700; letter-spacing: 0.02em; border-bottom: 2px solid var(--brass-hi); }
.pr-num.alt { background: var(--surface-2); color: var(--text); border: 1px solid var(--border-strong); border-bottom: 2px solid var(--brass); font-size: 15px; }
.pr-card { transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.pr-card:hover { border-color: var(--border-strong); box-shadow: var(--shadow-lg); transform: translateY(-2px); }
.pr-card h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 19px; font-weight: 700; line-height: 1.15; }
.pr-q { border-left: 3px solid var(--brass); padding-left: 14px; }
.pr-grid { gap: 16px; }

/* ---------- Goals ---------- */
.gl-num { border-radius: 3px; background: linear-gradient(135deg, #1b2532, #0d1218); color: var(--brass-hi); font-family: var(--display); font-size: 18px; border-bottom: 2px solid var(--brass-hi); }
.gl-goal h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.04em; font-size: 20px; font-weight: 700; }
.gl-q { border-radius: 3px; }
.gl-q.cur { border-color: var(--brass); background: var(--surface-2); }
.gl-q.ok { background: color-mix(in srgb, var(--green) 10%, var(--surface)); }
.gl-hrow.cur { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--brass); }
.gl-step { border-radius: 3px; }
.gl-step.on { border-color: var(--brass); background: var(--surface-2); color: var(--text); font-weight: 600; }
.gl-step.on b { background: var(--ink); color: var(--brass-hi); }
.gl-step b { border-radius: 3px; }
.gl-adv { border-radius: 4px; }
.gl-adv.done { background: color-mix(in srgb, var(--green) 8%, var(--surface)); border-color: color-mix(in srgb, var(--green) 40%, var(--border)); }
.cd { border-radius: 3px; }
.cd.sel { border-color: var(--brass); box-shadow: 0 0 0 2px var(--brass); }
.cd.today { outline-color: var(--brass); }
.cal-grid .cd.has { background-blend-mode: normal; }
.gl-two .card { border-radius: var(--radius); }
.gl-goaltag { background: transparent; border: 1px solid var(--border-strong); color: var(--text-muted); }
.gl-strip .gw { border-radius: 50%; }

/* ---------- misc controls ---------- */
.seg button { font-weight: 600; }
.tabs button.on, .dd-tabs button.on, .q-nav a.on { font-weight: 700; }
.dd-tabs { border-bottom-color: var(--border-strong); }
.tabs .count { border: 1px solid var(--border); }
.page-header .btn:not(.secondary):not(.sm) { min-height: 34px; }
/* primary actions inside dark bands: brass, not steel (theme.css forces steel gradients on .btn) */
.page-header .btn:not(.secondary) { background: linear-gradient(180deg, #e0b25a, #b5822c) !important; color: #1a1206 !important; border: none; box-shadow: 0 8px 18px -12px rgba(224, 178, 90, 0.7) !important; }
.page-header .btn:not(.secondary):hover { filter: brightness(1.08); }
.page-header .btn.secondary { background: rgba(255, 255, 255, 0.07) !important; border: 1px solid rgba(255, 255, 255, 0.26) !important; color: #fff !important; }
.page-header .btn.secondary:hover { background: rgba(255, 255, 255, 0.16) !important; border-color: rgba(255, 255, 255, 0.5) !important; }
.page-header select { color: #fff; background-color: rgba(255, 255, 255, 0.08); }
.page-header select option { color: #0f141b; background: #fff; }
.page-header .gl-yearnav select { font-family: var(--display); font-size: 16px; letter-spacing: 0.05em; font-weight: 700; padding: 5px 10px; }
.btn.sm { border-radius: 3px !important; }
.avatar, .avatar.lg { border-radius: 5px; }
.avatar.person, .avatar.person.lg { border-radius: 5px; background: linear-gradient(135deg, #1b2532, #0d1218); color: var(--brass-hi); }
.avatar.listed { background: linear-gradient(135deg, #a8772a, #d6a54a); color: #1a1206; }
.avatar { background: linear-gradient(135deg, #1f4e7d, #163a5e); }
.legend .l-person { border-radius: 2px; background: #1b2532; }

/* tables: tighter, tabular, quiet hover */
td, th { font-variant-numeric: tabular-nums; }
.dd-table tr.dd-sec td, .q-num .sec td, .wl-group td { letter-spacing: 0.12em; }
tr.click:hover td, tr.q-row:hover td { background: color-mix(in srgb, var(--brass) 7%, transparent); }

/* print stays plain */
@media print { .page-header, .gl-hero, .eco-hero-main { background: none !important; color: #000; box-shadow: none; } }
.gl-theme { font-size: 26px; text-overflow: ellipsis; }
.card > h3, .card > .dd-block-h h3, .card > .rt-top h3 { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.06em; font-size: 19px; font-weight: 700; }
/* card titles written as .stat-label (Economy, CFO, Performance, Company) */
.card:not(.stat-tile) > .stat-label:first-child, .card:not(.stat-tile) > div > .stat-label:first-child { font-family: var(--display); text-transform: uppercase; letter-spacing: 0.07em; font-size: 17px; font-weight: 700; color: var(--text); }
.dd-price .dd-muted { font-family: "Inter", sans-serif; }
/* emoji glyphs in titles are rendered monochrome so they never bring pink / orange into the page */
.rt-title b, .dd-block-h h3, .insight-title, .gl-goal h3, .rt-block h3, .card > h3 { filter: grayscale(1); }
.callout { background: var(--surface-2); border: 1px solid var(--border); border-left: 3px solid var(--brass); border-radius: 4px; }
input[type=radio], input[type=checkbox], input[type=range] { accent-color: var(--accent); }
.rt-block .dd-table td:first-child b { filter: grayscale(1); }
