/* =========================================================
   FinLens — a warm, editorial financial-analysis workspace
   ========================================================= */

:root {
  --paper: #f4f0e7;
  --paper-deep: #ebe5d8;
  --card: #fffdf8;
  --card-soft: #faf6ed;
  --ink: #14211c;
  --ink-2: #33443c;
  --muted: #6e776f;
  --muted-2: #929a91;
  --line: #ded7c8;
  --line-soft: #ebe5d9;
  --forest: #17352d;
  --forest-2: #21463b;
  --forest-3: #2d5a4b;
  --cream: #f7f2e6;
  --gold: #c99b52;
  --gold-deep: #a8782f;
  --gold-soft: #f2e4c8;
  --green: #1f7a5a;
  --green-soft: #e4f0e9;
  --red: #c45543;
  --red-soft: #f7e6e2;
  --amber: #a97521;
  --amber-soft: #f8eeda;
  --blue: #3d6b9e;
  --blue-soft: #e6edf6;
  --shadow: 0 1px 2px rgba(20, 33, 28, 0.04), 0 18px 42px -30px rgba(20, 33, 28, 0.45);
  --shadow-lift: 0 2px 4px rgba(20, 33, 28, 0.04), 0 24px 55px -32px rgba(20, 33, 28, 0.5);
  --radius: 22px;
  --radius-sm: 15px;
  --sidebar: 250px;
  --serif: Georgia, "Times New Roman", "Songti SC", serif;
  --sans: "Segoe UI", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", sans-serif;
  --mono: "Cascadia Code", "SFMono-Regular", Consolas, "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background:
    radial-gradient(circle at 85% -12%, rgba(201, 155, 82, 0.16), transparent 34rem),
    radial-gradient(circle at 16% 30%, rgba(23, 53, 45, 0.035), transparent 30rem),
    var(--paper);
  font-family: var(--sans);
  font-size: 14px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 999;
  opacity: 0.32;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 180 180' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.92' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.16'/%3E%3C/svg%3E");
  mix-blend-mode: multiply;
}

body.modal-open,
body.nav-open {
  overflow: hidden;
}

::selection {
  background: var(--gold-soft);
  color: var(--forest);
}

button,
input,
select {
  font: inherit;
}

button {
  color: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

svg {
  display: block;
}

[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
  border-radius: 6px;
}

.skip-link {
  position: fixed;
  top: -80px;
  left: 16px;
  z-index: 1000;
  padding: 10px 16px;
  border-radius: 8px;
  background: var(--forest);
  color: var(--cream);
  text-decoration: none;
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 12px;
}

/* ---------- shell ---------- */

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 26px 16px 18px;
  border-right: 1px solid var(--line-soft);
  background: rgba(247, 243, 234, 0.78);
  backdrop-filter: blur(16px);
  z-index: 30;
}

.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 0 10px 26px;
  color: var(--forest);
  text-decoration: none;
}

.brand-mark {
  width: 38px;
  height: 38px;
  color: var(--gold-deep);
  flex: 0 0 auto;
}

.brand-mark svg {
  width: 100%;
  height: 100%;
}

.brand-type {
  display: flex;
  flex-direction: column;
  line-height: 1;
}

.brand-type strong {
  font-size: 20px;
  font-weight: 750;
  letter-spacing: 0.08em;
}

.brand-type small {
  margin-top: 6px;
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.24em;
  color: var(--muted);
}

.nav-label {
  padding: 0 12px 8px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  color: var(--muted-2);
  text-transform: uppercase;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 11px;
  background: transparent;
  color: var(--ink-2);
  font-size: 13px;
  font-weight: 520;
  text-align: left;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.78;
}

.nav-item em {
  margin-left: auto;
  font-family: var(--mono);
  font-size: 9px;
  font-style: normal;
  letter-spacing: 0.04em;
  color: var(--muted-2);
  opacity: 0;
  transition: opacity 0.18s ease;
}

.nav-item:hover {
  background: rgba(255, 253, 248, 0.72);
  color: var(--forest);
}

.nav-item:hover em,
.nav-item.is-active em {
  opacity: 1;
}

.nav-item.is-active {
  background: var(--forest);
  color: var(--cream);
  box-shadow: 0 8px 20px -14px rgba(23, 53, 45, 0.9);
}

.nav-item.is-active em {
  color: rgba(247, 242, 230, 0.5);
}

.nav-item.is-active svg {
  opacity: 1;
  color: var(--gold);
}

.sidebar-spacer {
  flex: 1;
  min-height: 28px;
}

.side-quote {
  position: relative;
  margin: 0 4px 14px;
  padding: 17px 16px 15px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 15px;
  background:
    linear-gradient(145deg, rgba(255, 253, 248, 0.9), rgba(244, 235, 220, 0.72));
}

.side-quote::after {
  content: "";
  position: absolute;
  right: -24px;
  bottom: -34px;
  width: 92px;
  height: 92px;
  border: 1px solid rgba(201, 155, 82, 0.26);
  border-radius: 50%;
}

.side-quote-mark {
  display: block;
  height: 16px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 30px;
  line-height: 1;
}

.side-quote p {
  margin: 4px 0 8px;
  color: var(--forest);
  font-family: var(--serif);
  font-size: 15px;
  line-height: 1.55;
  letter-spacing: 0.02em;
}

.side-quote small {
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.08em;
}

.side-data {
  display: flex;
  align-items: center;
  gap: 8px;
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  font-size: 11px;
  cursor: pointer;
  text-align: left;
}

.side-data:hover {
  background: rgba(255, 253, 248, 0.6);
  color: var(--forest);
}

.side-data svg {
  width: 13px;
  height: 13px;
  margin-left: auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 4px rgba(31, 122, 90, 0.1);
}

.workspace {
  min-width: 0;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* ---------- topbar ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  height: 72px;
  padding: 0 34px;
  border-bottom: 1px solid rgba(222, 215, 200, 0.7);
  background: rgba(244, 240, 231, 0.83);
  backdrop-filter: blur(18px);
}

.topbar-left,
.topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.company-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 5px 8px 5px 5px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  cursor: pointer;
  text-align: left;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.company-switch:hover {
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.7);
}

.company-monogram {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border-radius: 10px;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  background: var(--gold);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.18);
}

.company-switch-text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.company-switch-text small {
  color: var(--muted-2);
  font-size: 9px;
  letter-spacing: 0.09em;
}

.company-switch-text strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 13.5px;
  font-weight: 650;
}

.company-switch .chev {
  width: 14px;
  height: 14px;
  margin-left: 2px;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
  stroke-linecap: round;
}

.topbar-divider {
  width: 1px;
  height: 20px;
  margin: 0 4px;
  background: var(--line);
}

.topbar-context {
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.04em;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.mode-toggle {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink-2);
  font-size: 11.5px;
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.mode-toggle:hover {
  background: var(--card);
  border-color: #cfc5b3;
}

.switch-track {
  position: relative;
  width: 27px;
  height: 16px;
  border-radius: 99px;
  background: #cfc7b8;
  transition: background 0.22s ease;
}

.switch-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 3px rgba(20, 33, 28, 0.25);
  transition: transform 0.22s cubic-bezier(0.2, 0.8, 0.2, 1);
}

body.beginner .switch-track {
  background: var(--green);
}

body.beginner .switch-thumb {
  transform: translateX(11px);
}

.search-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 136px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--muted);
  font-size: 11.5px;
  cursor: pointer;
}

.search-trigger:hover {
  border-color: #cfc5b3;
  background: var(--card);
  color: var(--ink);
}

.search-trigger svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.search-trigger kbd {
  margin-left: auto;
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: var(--paper);
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
}

.icon-button {
  display: grid;
  place-items: center;
  width: 35px;
  height: 35px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.58);
  color: var(--ink-2);
  cursor: pointer;
}

.icon-button:hover {
  background: var(--card);
  border-color: #cfc5b3;
}

.icon-button svg {
  width: 17px;
  height: 17px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.mobile-menu {
  display: none;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: transparent;
  cursor: pointer;
}

.mobile-menu svg {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
}

/* ---------- main ---------- */

.main {
  width: 100%;
  max-width: 1480px;
  margin: 0 auto;
  padding: 28px 34px 64px;
  flex: 1;
}

.loading-shell {
  display: grid;
  place-items: center;
  align-content: center;
  min-height: 60vh;
  gap: 14px;
  color: var(--muted);
  font-size: 12px;
}

.loading-ring {
  width: 28px;
  height: 28px;
  border: 2px solid var(--line);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to { transform: rotate(360deg); }
}

.view-enter {
  animation: viewIn 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

@keyframes viewIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(300px, 0.78fr);
  gap: 34px;
  min-height: 366px;
  padding: 38px 40px 34px;
  overflow: hidden;
  border-radius: 30px;
  color: var(--cream);
  background:
    radial-gradient(circle at 88% 26%, rgba(201, 155, 82, 0.22), transparent 23rem),
    radial-gradient(circle at 8% 120%, rgba(86, 137, 113, 0.25), transparent 27rem),
    linear-gradient(140deg, #1b3d33 0%, #142e27 52%, #10251f 100%);
  box-shadow: 0 30px 65px -42px rgba(20, 33, 28, 0.78), inset 0 0 0 1px rgba(247, 242, 230, 0.06);
}

.hero::before {
  content: "";
  position: absolute;
  top: 50%;
  right: -120px;
  width: 660px;
  height: 660px;
  border-radius: 50%;
  transform: translateY(-50%);
  background: repeating-radial-gradient(
    circle at center,
    transparent 0,
    transparent 43px,
    rgba(201, 155, 82, 0.1) 44px,
    rgba(201, 155, 82, 0.1) 45px
  );
  pointer-events: none;
}

.hero::after {
  content: "";
  position: absolute;
  right: 8%;
  bottom: -30%;
  width: 380px;
  height: 380px;
  border: 1px solid rgba(201, 155, 82, 0.12);
  border-radius: 50%;
  pointer-events: none;
}

.hero-copy {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.eyebrow {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 14px;
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.eyebrow .live-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 0 4px rgba(201, 155, 82, 0.12);
}

.hero-title {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 12px;
  margin: 0;
  color: #fffaf0;
  font-size: clamp(44px, 4.5vw, 67px);
  font-weight: 720;
  line-height: 1.04;
  letter-spacing: -0.055em;
}

.hero-ticker {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-bottom: 7px;
  padding: 4px 8px;
  border: 1px solid rgba(247, 242, 230, 0.18);
  border-radius: 6px;
  color: rgba(247, 242, 230, 0.65);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.06em;
}

.hero-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin-top: 17px;
}

.hero-tag {
  padding: 4px 9px;
  border: 1px solid rgba(247, 242, 230, 0.17);
  border-radius: 99px;
  color: rgba(247, 242, 230, 0.8);
  background: rgba(247, 242, 230, 0.055);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.hero-thesis {
  max-width: 680px;
  margin: 21px 0 0;
  color: rgba(236, 240, 232, 0.75);
  font-size: 15px;
  line-height: 1.85;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 16px;
  margin-top: auto;
  padding-top: 25px;
  color: rgba(247, 242, 230, 0.46);
  font-size: 10.5px;
}

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

.hero-meta svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}

.hero-meta button {
  padding: 0;
  border: 0;
  background: transparent;
  color: rgba(247, 242, 230, 0.55);
  font-size: 10.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.hero-meta button:hover {
  color: var(--gold);
}

.hero-score {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 20px 20px 14px;
  border: 1px solid rgba(247, 242, 230, 0.1);
  border-radius: 22px;
  background: linear-gradient(160deg, rgba(247, 242, 230, 0.07), rgba(247, 242, 230, 0.018));
  backdrop-filter: blur(5px);
}

.score-ring-wrap {
  position: relative;
  width: 168px;
  height: 168px;
}

.score-ring {
  width: 100%;
  height: 100%;
  transform: rotate(-90deg);
}

.score-ring .track {
  fill: none;
  stroke: rgba(247, 242, 230, 0.11);
  stroke-width: 7;
}

.score-ring .progress {
  fill: none;
  stroke: var(--gold);
  stroke-width: 7;
  stroke-linecap: round;
  filter: drop-shadow(0 0 7px rgba(201, 155, 82, 0.38));
  animation: ringDraw 1.1s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes ringDraw {
  from { stroke-dasharray: 0 100; }
}

.score-center {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.score-center small {
  color: rgba(247, 242, 230, 0.48);
  font-size: 9px;
  letter-spacing: 0.12em;
}

.score-center strong {
  margin: 1px 0 0;
  color: #fffaf0;
  font-family: var(--serif);
  font-size: 48px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.04em;
}

.score-center em {
  margin-top: 6px;
  padding: 2px 7px;
  border-radius: 99px;
  color: #182d25;
  background: var(--gold);
  font-size: 9px;
  font-style: normal;
  font-weight: 700;
  letter-spacing: 0.05em;
}

.score-caption {
  margin: 10px 0 3px;
  color: #fffaf0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.03em;
}

.score-rank {
  color: rgba(247, 242, 230, 0.45);
  font-size: 9.5px;
}

.score-dims {
  width: 100%;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid rgba(247, 242, 230, 0.08);
  display: grid;
  gap: 7px;
}

.score-dim {
  display: grid;
  grid-template-columns: 51px 1fr 22px;
  align-items: center;
  gap: 8px;
  color: rgba(247, 242, 230, 0.48);
  font-size: 8.5px;
}

.score-dim-bar {
  height: 3px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(247, 242, 230, 0.1);
}

.score-dim-bar i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--gold);
  opacity: 0.78;
  transform-origin: left;
  animation: barIn 1s 0.25s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes barIn {
  from { transform: scaleX(0); }
}

.score-dim b {
  color: rgba(247, 242, 230, 0.7);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 400;
  text-align: right;
}

/* ---------- KPI cards ---------- */

.kpi-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.kpi-card {
  position: relative;
  min-width: 0;
  padding: 18px 18px 17px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.kpi-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-lift);
}

.kpi-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 18px;
  width: 34px;
  height: 2px;
  border-radius: 0 0 3px 3px;
  background: var(--gold);
  opacity: 0.7;
}

.kpi-label {
  display: flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 10.5px;
  letter-spacing: 0.03em;
}

.kpi-label button {
  display: grid;
  place-items: center;
  width: 14px;
  height: 14px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted-2);
  font-size: 8px;
  cursor: help;
}

.kpi-value {
  display: flex;
  align-items: baseline;
  gap: 5px;
  margin-top: 10px;
  color: var(--ink);
  white-space: nowrap;
}

.kpi-value strong {
  font-family: var(--serif);
  font-size: clamp(24px, 2.1vw, 31px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.035em;
}

.kpi-value span {
  color: var(--muted);
  font-size: 9.5px;
}

.kpi-foot {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 9.5px;
  white-space: nowrap;
}

.delta {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  padding: 1px 5px;
  border-radius: 4px;
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 600;
  letter-spacing: -0.02em;
}

.delta.up {
  color: var(--green);
  background: var(--green-soft);
}

.delta.down {
  color: var(--red);
  background: var(--red-soft);
}

.delta.flat {
  color: var(--muted);
  background: var(--paper-deep);
}

.sparkline {
  position: absolute;
  right: 14px;
  bottom: 14px;
  width: 66px;
  height: 25px;
  opacity: 0.78;
  pointer-events: none;
}

.sparkline path {
  fill: none;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.sparkline circle {
  stroke: var(--card);
  stroke-width: 1.5;
}

/* ---------- sections / cards ---------- */

.section {
  margin-top: 16px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin: 30px 2px 12px;
}

.section-head.compact {
  margin-top: 0;
}

.section-kicker {
  margin: 0 0 4px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.section-title {
  margin: 0;
  color: var(--ink);
  font-size: 19px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.section-sub {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 11.5px;
  line-height: 1.65;
}

.section-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  flex: 0 0 auto;
  padding: 5px 2px;
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font-size: 11px;
  font-weight: 600;
  cursor: pointer;
}

.section-link svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  transition: transform 0.18s ease;
}

.section-link:hover svg {
  transform: translateX(3px);
}

.card {
  min-width: 0;
  padding: 23px 24px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.card.flush {
  padding: 0;
  overflow: hidden;
}

.card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--ink);
  font-size: 14.5px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.card-title .info-dot {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: transparent;
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 500;
  cursor: help;
}

.card-sub {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.6;
}

.card-top-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.legend {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  color: var(--muted);
  font-size: 9px;
}

.legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
}

.legend .line-key {
  width: 11px;
  height: 2px;
  border-radius: 2px;
}

.grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 0.8fr);
  gap: 14px;
}

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

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

/* ---------- insight cards ---------- */

.insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-top: 14px;
}

.insight-card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 172px;
  padding: 18px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.insight-card:hover {
  transform: translateY(-3px);
  border-color: #d3c8b5;
  box-shadow: var(--shadow-lift);
}

.insight-card::after {
  content: "";
  position: absolute;
  right: -34px;
  top: -34px;
  width: 92px;
  height: 92px;
  border: 1px solid currentColor;
  border-radius: 50%;
  opacity: 0.08;
}

.insight-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.insight-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--paper);
  color: var(--ink-2);
}

.insight-icon svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.insight-card[data-tone="green"] .insight-icon { color: var(--green); background: var(--green-soft); }
.insight-card[data-tone="red"] .insight-icon { color: var(--red); background: var(--red-soft); }
.insight-card[data-tone="amber"] .insight-icon { color: var(--amber); background: var(--amber-soft); }
.insight-card[data-tone="blue"] .insight-icon { color: var(--blue); background: var(--blue-soft); }

.status-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 7px;
  border-radius: 99px;
  color: var(--ink-2);
  background: var(--paper);
  font-size: 8.5px;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.status-pill::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: currentColor;
}

.status-pill.green { color: var(--green); background: var(--green-soft); }
.status-pill.red { color: var(--red); background: var(--red-soft); }
.status-pill.amber { color: var(--amber); background: var(--amber-soft); }
.status-pill.blue { color: var(--blue); background: var(--blue-soft); }

.insight-title {
  margin: 14px 0 3px;
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.insight-verdict {
  margin: 0;
  color: var(--ink);
  font-size: 17px;
  font-weight: 680;
  line-height: 1.35;
  letter-spacing: -0.02em;
}

.insight-text {
  display: -webkit-box;
  margin: 8px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.65;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
}

.insight-cta {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-top: auto;
  padding-top: 12px;
  color: var(--gold-deep);
  font-size: 9.5px;
  font-weight: 600;
}

.insight-cta svg {
  width: 11px;
  height: 11px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
}

/* ---------- charts ---------- */

.chart-wrap {
  position: relative;
  width: 100%;
  margin-top: 14px;
}

.chart-svg {
  width: 100%;
  height: auto;
  overflow: visible;
}

.chart-svg text {
  font-family: var(--sans);
}

.chart-svg .grid-line {
  stroke: var(--line-soft);
  stroke-width: 1;
  stroke-dasharray: 2 4;
}

.chart-svg .axis-line {
  stroke: var(--line);
  stroke-width: 1;
}

.chart-svg .axis-label {
  fill: var(--muted-2);
  font-size: 9.5px;
  letter-spacing: 0.02em;
}

.chart-svg .axis-label.strong {
  fill: var(--ink-2);
  font-weight: 600;
}

.chart-svg .bar {
  transform-box: fill-box;
  transform-origin: bottom;
  animation: barGrow 0.75s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes barGrow {
  from { transform: scaleY(0); }
}

.chart-svg .line-path {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: lineDraw 1.2s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes lineDraw {
  from { stroke-dasharray: 0 1200; }
}

.chart-svg .area {
  opacity: 0.1;
  animation: fadeIn 1s 0.2s both;
}

@keyframes fadeIn {
  from { opacity: 0; }
}

.chart-svg .point {
  stroke: var(--card);
  stroke-width: 2;
  animation: pointIn 0.35s 0.55s both;
}

@keyframes pointIn {
  from { opacity: 0; transform: scale(0.4); transform-box: fill-box; transform-origin: center; }
}

.chart-svg .data-label {
  fill: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
}

.chart-svg .data-label.muted {
  fill: var(--muted);
  font-weight: 400;
}

.chart-svg .chart-note {
  fill: var(--muted-2);
  font-size: 8.5px;
}

.chart-svg .waterfall-connector {
  stroke: var(--line);
  stroke-width: 1;
  stroke-dasharray: 3 3;
}

.chart-svg .hit {
  fill: transparent;
  cursor: crosshair;
}

.chart-svg .line-key {
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
}

.chart-tooltip {
  position: fixed;
  z-index: 120;
  min-width: 120px;
  max-width: 250px;
  padding: 9px 11px;
  border: 1px solid rgba(247, 242, 230, 0.1);
  border-radius: 9px;
  background: rgba(20, 33, 28, 0.95);
  color: rgba(247, 242, 230, 0.78);
  box-shadow: 0 14px 32px -16px rgba(0, 0, 0, 0.65);
  font-size: 10px;
  line-height: 1.55;
  pointer-events: none;
  backdrop-filter: blur(8px);
}

.chart-tooltip b {
  display: block;
  margin-bottom: 3px;
  color: #fffaf0;
  font-size: 10.5px;
  font-weight: 650;
}

.chart-tooltip .tip-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  white-space: nowrap;
}

.chart-tooltip .tip-row span:last-child {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9.5px;
}

/* ---------- cash / ratio components ---------- */

.cash-hero {
  display: grid;
  grid-template-columns: minmax(0, 0.86fr) minmax(0, 1.14fr);
  gap: 14px;
}

.conversion-panel {
  display: flex;
  flex-direction: column;
}

.ratio-big {
  display: flex;
  align-items: flex-end;
  gap: 7px;
  margin-top: 12px;
}

.ratio-big strong {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 54px;
  font-weight: 400;
  line-height: 0.95;
  letter-spacing: -0.05em;
}

.ratio-big span {
  padding-bottom: 7px;
  color: var(--muted);
  font-size: 11px;
}

.ratio-verdict {
  margin: 12px 0 0;
  color: var(--ink-2);
  font-size: 12px;
  font-weight: 600;
}

.ratio-desc {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.ratio-scale {
  position: relative;
  margin-top: 24px;
  padding-top: 12px;
}

.ratio-scale-track {
  display: flex;
  height: 8px;
  overflow: hidden;
  border-radius: 99px;
}

.ratio-scale-track i {
  height: 100%;
}

.ratio-scale-track .zone-red { width: 30%; background: #e8b9ae; }
.ratio-scale-track .zone-amber { width: 15%; background: #ecd39d; }
.ratio-scale-track .zone-green { width: 15%; background: #9ec9b5; }
.ratio-scale-track .zone-blue { width: 40%; background: #9db9d3; }

.ratio-marker {
  position: absolute;
  top: 4px;
  width: 2px;
  height: 20px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--card);
}

.ratio-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 8px;
  white-space: nowrap;
}

.ratio-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8px;
}

.mini-stat-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 16px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
}

.mini-stat span {
  display: block;
  color: var(--muted-2);
  font-size: 8.5px;
}

.mini-stat strong {
  display: block;
  margin-top: 3px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 400;
  white-space: nowrap;
}

.mini-stat strong small {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8px;
}

.conversion-foot {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
}

.conversion-foot span {
  color: var(--muted-2);
  font-size: 8.5px;
}

.conversion-foot strong {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 8.5px;
  font-weight: 500;
  text-align: right;
}

.positive { color: var(--green) !important; }
.negative { color: var(--red) !important; }
.neutral { color: var(--ink) !important; }

/* ---------- health & flags ---------- */

.health-grid {
  display: grid;
  grid-template-columns: minmax(300px, 0.78fr) minmax(0, 1.22fr);
  gap: 14px;
}

.radar-box {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 250px;
  margin-top: 3px;
}

.radar-svg {
  width: 100%;
  max-width: 330px;
  height: auto;
  overflow: visible;
}

.radar-svg text {
  font-family: var(--sans);
  fill: var(--muted);
  font-size: 9px;
}

.radar-svg .radar-grid {
  fill: none;
  stroke: var(--line);
  stroke-width: 1;
}

.radar-svg .radar-axis {
  stroke: var(--line-soft);
  stroke-width: 1;
}

.radar-svg .radar-score {
  fill: rgba(201, 155, 82, 0.18);
  stroke: var(--gold-deep);
  stroke-width: 1.7;
  stroke-linejoin: round;
}

.radar-svg .radar-avg {
  fill: none;
  stroke: var(--muted-2);
  stroke-width: 1.2;
  stroke-dasharray: 3 3;
}

.radar-svg .radar-dot {
  fill: var(--gold-deep);
  stroke: var(--card);
  stroke-width: 1.5;
}

.score-table {
  display: grid;
  gap: 11px;
  margin-top: 4px;
}

.score-row {
  display: grid;
  grid-template-columns: 74px 1fr 32px;
  align-items: center;
  gap: 10px;
}

.score-row-label {
  color: var(--ink-2);
  font-size: 10.5px;
}

.score-row-label small {
  display: block;
  color: var(--muted-2);
  font-size: 8px;
}

.score-row-track {
  height: 6px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-deep);
}

.score-row-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--gold), #dfb96e);
  transform-origin: left;
  animation: barIn 0.9s 0.1s both;
}

.score-row b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
  text-align: right;
}

.flags-list {
  display: flex;
  flex-direction: column;
  margin-top: 4px;
}

.flag-item {
  display: grid;
  grid-template-columns: 26px 1fr auto;
  align-items: start;
  gap: 10px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line-soft);
}

.flag-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.flag-icon {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 7px;
  color: var(--amber);
  background: var(--amber-soft);
}

.flag-icon svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.flag-icon.risk { color: var(--red); background: var(--red-soft); }
.flag-icon.good { color: var(--green); background: var(--green-soft); }

.flag-title {
  margin: 0;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 650;
}

.flag-text {
  margin: 2px 0 0;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.62;
}

.flag-level {
  padding: 2px 5px;
  border-radius: 3px;
  color: var(--amber);
  background: var(--amber-soft);
  font-size: 7.5px;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.flag-level.risk { color: var(--red); background: var(--red-soft); }
.flag-level.good { color: var(--green); background: var(--green-soft); }

/* ---------- three statements strip ---------- */

.statements {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow);
}

.statement-item {
  position: relative;
  padding: 24px 24px 23px;
  border-right: 1px solid var(--line-soft);
}

.statement-item:last-child {
  border-right: 0;
}

.statement-num {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.1em;
}

.statement-title {
  margin: 9px 0 5px;
  color: var(--ink);
  font-size: 18px;
  font-weight: 680;
  letter-spacing: -0.02em;
}

.statement-q {
  margin: 0 0 10px;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

.statement-text {
  margin: 0;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.statement-item svg {
  position: absolute;
  right: 20px;
  bottom: 18px;
  width: 40px;
  height: 40px;
  fill: none;
  stroke: var(--line);
  stroke-width: 1.2;
  opacity: 0.7;
}

.quote-band {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 16px;
  padding: 23px 28px;
  overflow: hidden;
  border-radius: 18px;
  background: var(--forest);
  color: var(--cream);
}

.quote-band::after {
  content: "";
  position: absolute;
  right: 12%;
  top: -60%;
  width: 260px;
  height: 260px;
  border: 1px solid rgba(201, 155, 82, 0.2);
  border-radius: 50%;
}

.quote-band p {
  position: relative;
  z-index: 1;
  margin: 0;
  font-family: var(--serif);
  font-size: 17px;
  letter-spacing: 0.01em;
}

.quote-band small {
  position: relative;
  z-index: 1;
  color: rgba(247, 242, 230, 0.5);
  font-size: 9.5px;
  letter-spacing: 0.06em;
}

/* ---------- view heading (subpages) ---------- */

.view-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin: 2px 2px 18px;
}

.view-intro-copy {
  min-width: 0;
}

.view-intro h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(32px, 3.4vw, 47px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.view-intro h1 span {
  color: var(--muted-2);
  font-weight: 400;
}

.view-intro p {
  max-width: 690px;
  margin: 10px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.75;
}

.view-intro-side {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 0 0 auto;
  padding-bottom: 3px;
}

.mini-company {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px 6px 6px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
  font-size: 10.5px;
}

.mini-company .company-monogram {
  width: 25px;
  height: 25px;
  border-radius: 7px;
  font-size: 10px;
}

.mini-company small {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
}

.mini-company strong {
  font-size: 10px;
  font-weight: 600;
}

/* ---------- metric strip ---------- */

.metric-strip {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.metric-box {
  padding: 16px 17px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
}

.metric-box small {
  display: block;
  color: var(--muted);
  font-size: 9.5px;
}

.metric-box strong {
  display: flex;
  align-items: baseline;
  gap: 4px;
  margin-top: 7px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
  white-space: nowrap;
}

.metric-box strong em {
  color: var(--muted);
  font-family: var(--sans);
  font-size: 8.5px;
  font-style: normal;
}

.metric-box p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 8.5px;
}

/* ---------- data table ---------- */

.table-shell {
  overflow-x: auto;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--card);
  -webkit-overflow-scrolling: touch;
}

.table-scroll-hint {
  display: none;
  margin: 0 0 6px;
  color: var(--muted-2);
  font-size: 8.5px;
  text-align: right;
}

.table-beginner-tip {
  margin: 10px 0 0;
  padding: 12px 14px;
  border: 1px dashed var(--line);
  border-radius: 10px;
  background: rgba(255, 253, 248, 0.55);
  color: var(--muted);
  font-size: 9px;
  line-height: 1.7;
}

.data-table {
  width: 100%;
  min-width: 700px;
  border-collapse: collapse;
  font-size: 10.5px;
}

.data-table th,
.data-table td {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

.data-table th:first-child,
.data-table td:first-child {
  position: sticky;
  left: 0;
  z-index: 1;
  min-width: 112px;
  background: var(--card);
  text-align: left;
  color: var(--ink-2);
  font-weight: 500;
}

.data-table thead th {
  color: var(--muted-2);
  background: var(--card-soft);
  font-size: 8.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.data-table thead th:first-child {
  background: var(--card-soft);
}

.data-table tbody tr:hover td,
.data-table tbody tr:hover td:first-child {
  background: #fbf7ee;
}

.data-table tbody tr:last-child td {
  border-bottom: 0;
}

.data-table td.num {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 9.8px;
  letter-spacing: -0.02em;
}

.data-table td.pos { color: var(--green); }
.data-table td.neg { color: var(--red); }

.table-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 8.5px;
}

.table-note a,
.table-note button {
  border: 0;
  background: transparent;
  color: var(--gold-deep);
  font-size: 8.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

details.table-details {
  margin-top: 14px;
}

details.table-details summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 0;
  color: var(--gold-deep);
  font-size: 10.5px;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

details.table-details summary::-webkit-details-marker {
  display: none;
}

details.table-details summary::before {
  content: "+";
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  border: 1px solid var(--line);
  border-radius: 50%;
  font-family: var(--mono);
  font-size: 9px;
}

details.table-details[open] summary::before {
  content: "−";
}

/* ---------- DuPont / structure ---------- */

.dupont {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1fr) auto minmax(0, 1.08fr);
  align-items: stretch;
  gap: 8px;
  margin-top: 15px;
}

.dupont-factor {
  min-width: 0;
  padding: 15px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card-soft);
}

.dupont-factor small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
  letter-spacing: 0.02em;
}

.dupont-factor strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.03em;
}

.dupont-factor p {
  margin: 6px 0 0;
  color: var(--muted-2);
  font-size: 8.5px;
  line-height: 1.5;
}

.dupont-op {
  display: grid;
  place-items: center;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 17px;
}

.dupont-result {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 16px;
  overflow: hidden;
  border-radius: 12px;
  background: var(--forest);
  color: var(--cream);
}

.dupont-result small {
  color: rgba(247, 242, 230, 0.55);
  font-size: 8.5px;
}

.dupont-result strong {
  margin-top: 5px;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 400;
  line-height: 1;
}

.dupont-result p {
  margin: 5px 0 0;
  color: rgba(247, 242, 230, 0.5);
  font-size: 8px;
}

.dupont-result::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -30px;
  width: 90px;
  height: 90px;
  border: 1px solid rgba(201, 155, 82, 0.25);
  border-radius: 50%;
}

.balance-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

.balance-num {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius-sm);
  background: var(--card);
  box-shadow: var(--shadow);
}

.balance-num small {
  color: var(--muted);
  font-size: 9.5px;
}

.balance-num strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 27px;
  font-weight: 400;
  line-height: 1;
}

.balance-num span {
  display: block;
  margin-top: 6px;
  color: var(--muted-2);
  font-size: 8.5px;
}

/* ---------- compare ---------- */

.compare-picker {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 14px;
}

.compare-chip {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 5px 8px 5px 5px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: var(--card);
  font-size: 10.5px;
}

.compare-chip .company-monogram {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  font-size: 9px;
}

.compare-chip button {
  display: grid;
  place-items: center;
  width: 15px;
  height: 15px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--paper);
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.compare-chip button:hover {
  background: var(--red-soft);
  color: var(--red);
}

.add-company {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 7px 11px;
  border: 1px dashed #c9bfad;
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 10px;
  cursor: pointer;
}

.add-company:hover {
  border-color: var(--gold-deep);
  color: var(--gold-deep);
}

.compare-layout {
  display: grid;
  grid-template-columns: minmax(300px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
}

.compare-radar {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 330px;
}

.compare-radar .radar-svg {
  max-width: 390px;
}

.compare-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-top: 2px;
}

.compare-legend span {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8.5px;
}

.compare-legend i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}

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

.metric-bar-card {
  padding: 13px 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card-soft);
}

.metric-bar-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  color: var(--muted);
  font-size: 8.5px;
}

.metric-bar-head strong {
  color: var(--ink-2);
  font-size: 9px;
  font-weight: 600;
}

.metric-bar-rows {
  display: grid;
  gap: 6px;
  margin-top: 9px;
}

.metric-bar-row {
  display: grid;
  grid-template-columns: 44px 1fr 35px;
  align-items: center;
  gap: 6px;
  font-size: 8.5px;
}

.metric-bar-row span:first-child {
  overflow: hidden;
  color: var(--ink-2);
  white-space: nowrap;
  text-overflow: ellipsis;
}

.metric-bar-track {
  height: 4px;
  overflow: hidden;
  border-radius: 99px;
  background: var(--paper-deep);
}

.metric-bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.metric-bar-row b {
  color: var(--ink);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
  text-align: right;
}

.scatter-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 8px;
}

.scatter-legend span {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--muted);
  font-size: 8px;
}

.scatter-legend i {
  width: 6px;
  height: 6px;
  border-radius: 50%;
}

compare-table td:first-child {
  min-width: 82px;
}

.table-currency {
  color: var(--muted-2);
  font-size: 7.5px;
}

/* ---------- valuation ---------- */

.valuation-layout {
  display: grid;
  grid-template-columns: minmax(330px, 0.8fr) minmax(0, 1.2fr);
  gap: 14px;
  align-items: start;
}

.lab-controls {
  position: sticky;
  top: 86px;
}

.lab-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.reset-button {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9px;
  cursor: pointer;
}

.reset-button:hover {
  color: var(--ink);
  background: var(--paper);
}

.scenario-tabs {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 5px;
  margin-top: 14px;
  padding: 3px;
  border-radius: 10px;
  background: var(--paper-deep);
}

.scenario-tab {
  padding: 6px 4px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  cursor: pointer;
}

.scenario-tab.is-active {
  background: var(--card);
  color: var(--ink);
  box-shadow: 0 1px 4px rgba(20, 33, 28, 0.12);
  font-weight: 600;
}

.slider-group {
  margin-top: 18px;
}

.slider-label {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.slider-label span {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 550;
}

.slider-label span small {
  margin-left: 4px;
  color: var(--muted-2);
  font-weight: 400;
  font-size: 8.5px;
}

.slider-value {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 600;
}

.slider-value small {
  color: var(--muted-2);
  font-size: 8px;
  font-weight: 400;
}

input[type="range"] {
  width: 100%;
  height: 20px;
  margin: 8px 0 0;
  appearance: none;
  -webkit-appearance: none;
  background: transparent;
  cursor: pointer;
}

input[type="range"]::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 99px;
  background: linear-gradient(90deg, var(--gold) var(--fill, 50%), var(--paper-deep) var(--fill, 50%));
}

input[type="range"]::-moz-range-track {
  height: 4px;
  border-radius: 99px;
  background: var(--paper-deep);
}

input[type="range"]::-moz-range-progress {
  height: 4px;
  border-radius: 99px;
  background: var(--gold);
}

input[type="range"]::-webkit-slider-thumb {
  width: 14px;
  height: 14px;
  margin-top: -5px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
  appearance: none;
  -webkit-appearance: none;
}

input[type="range"]::-moz-range-thumb {
  width: 10px;
  height: 10px;
  border: 3px solid var(--card);
  border-radius: 50%;
  background: var(--forest);
  box-shadow: 0 0 0 1px var(--forest);
}

.slider-hints {
  display: flex;
  justify-content: space-between;
  margin-top: 2px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.lab-base {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 18px;
  padding-top: 13px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 9px;
}

.lab-base strong {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 500;
}

.valuation-result {
  padding: 0;
  overflow: hidden;
}

.value-hero {
  position: relative;
  padding: 25px 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at 88% 10%, rgba(201, 155, 82, 0.2), transparent 18rem),
    var(--forest);
  color: var(--cream);
}

.value-hero::after {
  content: "";
  position: absolute;
  right: -40px;
  bottom: -95px;
  width: 230px;
  height: 230px;
  border: 1px solid rgba(201, 155, 82, 0.2);
  border-radius: 50%;
}

.value-hero small {
  color: rgba(247, 242, 230, 0.52);
  font-size: 9px;
  letter-spacing: 0.08em;
}

.value-hero .value-big {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: baseline;
  gap: 6px;
  margin-top: 5px;
}

.value-hero .value-big strong {
  color: #fffaf0;
  font-family: var(--serif);
  font-size: clamp(42px, 4.5vw, 61px);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.05em;
}

.value-hero .value-big span {
  color: rgba(247, 242, 230, 0.5);
  font-size: 10px;
}

.value-delta {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 9px;
  padding: 3px 8px;
  border-radius: 99px;
  background: rgba(247, 242, 230, 0.1);
  color: rgba(247, 242, 230, 0.75);
  font-size: 9.5px;
}

.value-delta b {
  color: var(--gold);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 600;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-bottom: 1px solid var(--line-soft);
}

.value-cell {
  padding: 16px 17px;
  border-right: 1px solid var(--line-soft);
}

.value-cell:last-child {
  border-right: 0;
}

.value-cell small {
  display: block;
  color: var(--muted);
  font-size: 8.5px;
}

.value-cell strong {
  display: block;
  margin-top: 5px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1.1;
}

.value-cell p {
  margin: 4px 0 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.5;
}

.lab-insight {
  padding: 16px 20px;
  background: var(--card-soft);
}

.lab-insight p {
  margin: 0;
  color: var(--ink-2);
  font-size: 10.5px;
  line-height: 1.75;
}

.lab-insight b {
  color: var(--gold-deep);
  font-weight: 650;
}

.lab-warning {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin: 12px 20px 18px;
  padding: 10px 11px;
  border-radius: 9px;
  background: var(--amber-soft);
  color: #78551c;
  font-size: 8.5px;
  line-height: 1.6;
}

.lab-warning svg {
  width: 12px;
  height: 12px;
  flex: 0 0 auto;
  margin-top: 2px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
}

.sensitivity {
  margin-top: 14px;
}

.sensitivity table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 9px;
}

.sensitivity th,
.sensitivity td {
  padding: 7px 5px;
  border: 1px solid var(--line-soft);
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sensitivity th {
  color: var(--muted);
  background: var(--card-soft);
  font-weight: 500;
}

.sensitivity td {
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 8.5px;
}

.sensitivity td.hot {
  background: var(--green-soft);
  color: #145a42;
}

.sensitivity td.cold {
  background: var(--red-soft);
  color: #8c3e31;
}

/* ---------- dictionary ---------- */

.dictionary-hero {
  display: grid;
  grid-template-columns: minmax(0, 1.3fr) minmax(260px, 0.7fr);
  gap: 20px;
  align-items: center;
  padding: 30px 34px;
  border-radius: 24px;
  background:
    radial-gradient(circle at 90% 20%, rgba(201, 155, 82, 0.18), transparent 16rem),
    var(--forest);
  color: var(--cream);
}

.dictionary-hero h1 {
  margin: 0;
  color: #fffaf0;
  font-size: clamp(34px, 4vw, 48px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.045em;
}

.dictionary-hero p {
  max-width: 640px;
  margin: 10px 0 0;
  color: rgba(247, 242, 230, 0.62);
  font-size: 12px;
  line-height: 1.8;
}

.dictionary-hero .dict-stat {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
}

.dict-stat div {
  text-align: center;
}

.dict-stat strong {
  display: block;
  color: var(--gold);
  font-family: var(--serif);
  font-size: 36px;
  font-weight: 400;
  line-height: 1;
}

.dict-stat span {
  display: block;
  margin-top: 5px;
  color: rgba(247, 242, 230, 0.48);
  font-size: 8.5px;
}

.dict-stat i {
  width: 1px;
  height: 35px;
  background: rgba(247, 242, 230, 0.12);
}

.dictionary-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 18px 0 12px;
}

.dict-search {
  display: flex;
  align-items: center;
  gap: 8px;
  flex: 1 1 220px;
  max-width: 340px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--card);
}

.dict-search svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.dict-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 11px;
}

.dict-search input::placeholder {
  color: var(--muted-2);
}

.dict-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
}

.filter-chip {
  padding: 6px 10px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 9.5px;
  cursor: pointer;
}

.filter-chip:hover {
  background: var(--card);
  color: var(--ink);
}

.filter-chip.is-active {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--cream);
}

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

.term-card {
  position: relative;
  padding: 17px 18px 16px;
  overflow: hidden;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: var(--card);
  text-align: left;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform 0.18s ease, border-color 0.18s ease;
}

.term-card:hover {
  transform: translateY(-2px);
  border-color: #d3c8b5;
}

.term-card small {
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.08em;
}

.term-card h3 {
  margin: 6px 0 0;
  color: var(--ink);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.term-card p {
  display: -webkit-box;
  margin: 6px 0 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
}

.term-card .term-en {
  display: block;
  margin-top: 8px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  letter-spacing: 0.02em;
}

.term-card::after {
  content: "↗";
  position: absolute;
  top: 13px;
  right: 15px;
  color: var(--line);
  font-size: 13px;
  transition: color 0.18s ease, transform 0.18s ease;
}

.term-card:hover::after {
  color: var(--gold-deep);
  transform: translate(2px, -2px);
}

.dict-empty {
  grid-column: 1 / -1;
  padding: 36px;
  border: 1px dashed var(--line);
  border-radius: 14px;
  color: var(--muted);
  text-align: center;
  font-size: 11px;
}

.learning-path {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0;
  margin-top: 18px;
  overflow: hidden;
  border-radius: 16px;
  border: 1px solid var(--line-soft);
  background: var(--card);
}

.learning-step {
  position: relative;
  padding: 20px 22px;
  border-right: 1px solid var(--line-soft);
}

.learning-step:last-child {
  border-right: 0;
}

.learning-step b {
  display: inline-block;
  margin-bottom: 8px;
  padding: 2px 6px;
  border-radius: 4px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-family: var(--mono);
  font-size: 7.5px;
}

.learning-step h4 {
  margin: 0;
  color: var(--ink);
  font-size: 12px;
}

.learning-step p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

/* ---------- footer ---------- */

.site-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  max-width: 1480px;
  width: 100%;
  margin: 0 auto;
  padding: 22px 34px 26px;
  border-top: 1px solid var(--line-soft);
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 8px;
}

.footer-mark {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 7px;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 13px;
}

.footer-brand strong,
.footer-brand small {
  display: block;
  line-height: 1.2;
}

.footer-brand strong {
  color: var(--ink-2);
  font-size: 10px;
  font-weight: 650;
}

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

.footer-note {
  margin: 0;
  color: var(--muted-2);
  font-size: 8.5px;
  text-align: center;
}

.footer-links {
  display: flex;
  gap: 13px;
}

.text-button {
  padding: 0;
  border: 0;
  background: transparent;
  color: var(--muted);
  font-size: 8.5px;
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.text-button:hover {
  color: var(--gold-deep);
}

/* ---------- modal / drawer ---------- */

.overlay {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(13, 26, 21, 0.58);
  backdrop-filter: blur(5px);
  animation: fadeIn 0.18s ease both;
}

.modal-box {
  width: 100%;
  max-width: 760px;
  max-height: 86vh;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--card);
  box-shadow: 0 40px 100px -40px rgba(0, 0, 0, 0.6);
  animation: modalIn 0.24s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes modalIn {
  from { opacity: 0; transform: translateY(12px) scale(0.985); }
}

.modal-box.command {
  display: flex;
  flex-direction: column;
  max-width: 780px;
  overflow: hidden;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 22px 24px 16px;
}

.modal-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.035em;
}

.modal-header p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 10px;
}

.modal-close {
  display: grid;
  place-items: center;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.modal-close:hover {
  background: var(--paper);
  color: var(--ink);
}

.modal-close svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.command-search {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 24px 15px;
  padding: 10px 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-soft);
}

.command-search svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
  fill: none;
  stroke: var(--muted);
  stroke-width: 1.8;
}

.command-search input {
  width: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--ink);
  font-size: 12px;
}

.command-search kbd {
  padding: 1px 5px;
  border: 1px solid var(--line);
  border-radius: 4px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 8px;
}

.command-list {
  min-height: 160px;
  padding: 0 16px 16px;
  overflow-y: auto;
}

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

.company-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.company-option:hover {
  border-color: var(--line);
  background: var(--card-soft);
}

.company-option.is-current {
  border-color: var(--gold);
  background: rgba(201, 155, 82, 0.06);
}

.company-option .company-monogram {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  font-size: 12px;
}

.company-option-text {
  min-width: 0;
  flex: 1;
}

.company-option-text strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 11.5px;
  font-weight: 620;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.company-option-text small {
  display: block;
  margin-top: 2px;
  overflow: hidden;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  white-space: nowrap;
  text-overflow: ellipsis;
}

.company-option-score {
  flex: 0 0 auto;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 18px;
}

.company-option-score small {
  display: block;
  color: var(--muted-2);
  font-family: var(--sans);
  font-size: 6.5px;
  text-align: right;
}

.command-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 24px;
  border-top: 1px solid var(--line-soft);
  background: var(--card-soft);
  color: var(--muted-2);
  font-size: 8.5px;
}

.command-foot kbd {
  padding: 1px 4px;
  border: 1px solid var(--line);
  border-radius: 3px;
  background: var(--card);
  font-family: var(--mono);
  font-size: 7.5px;
}

.modal-content {
  padding: 0 24px 24px;
}

.modal-content h3 {
  margin: 18px 0 6px;
  color: var(--ink);
  font-size: 13px;
}

.modal-content p,
.modal-content li {
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.modal-content ul {
  margin: 5px 0;
  padding-left: 17px;
}

.modal-content a {
  color: var(--gold-deep);
  text-underline-offset: 3px;
}

.source-list {
  display: grid;
  gap: 5px;
  margin: 10px 0 0;
}

.source-list a {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 7px 9px;
  border: 1px solid var(--line-soft);
  border-radius: 7px;
  color: var(--ink-2);
  font-size: 9.5px;
  text-decoration: none;
}

.source-list a:hover {
  background: var(--card-soft);
  border-color: var(--line);
}

.source-list span {
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 7.5px;
  margin-left: auto;
}

.formula-box {
  margin: 12px 0;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--card-soft);
  color: var(--ink-2);
  font-family: var(--mono);
  font-size: 10.5px;
}

.method-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  margin-top: 10px;
}

.method-card {
  padding: 11px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--card-soft);
}

.method-card strong {
  display: flex;
  justify-content: space-between;
  color: var(--ink);
  font-size: 10px;
}

.method-card strong span {
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8px;
}

.method-card p {
  margin: 4px 0 0;
  font-size: 8.5px;
  line-height: 1.6;
}

/* ---------- drawer ---------- */

.drawer-scrim {
  position: fixed;
  inset: 0;
  z-index: 70;
  background: rgba(13, 26, 21, 0.4);
  backdrop-filter: blur(3px);
  animation: fadeIn 0.2s ease both;
}

.term-drawer {
  position: fixed;
  top: 0;
  right: 0;
  z-index: 75;
  width: min(430px, 100vw);
  height: 100vh;
  padding: 28px 28px 40px;
  overflow-y: auto;
  border-left: 1px solid var(--line);
  background: var(--card);
  box-shadow: -30px 0 80px -40px rgba(20, 33, 28, 0.6);
  animation: drawerIn 0.26s cubic-bezier(0.2, 0.8, 0.2, 1) both;
}

@keyframes drawerIn {
  from { transform: translateX(32px); opacity: 0; }
}

.drawer-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 16px;
  border-bottom: 1px solid var(--line-soft);
}

.drawer-category {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-category::before {
  content: "";
  width: 14px;
  height: 1px;
  background: currentColor;
}

.drawer-close {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.drawer-close svg {
  width: 13px;
  height: 13px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
}

.drawer-title {
  margin: 19px 0 0;
  color: var(--ink);
  font-size: 36px;
  font-weight: 720;
  line-height: 1.1;
  letter-spacing: -0.04em;
}

.drawer-en {
  display: block;
  margin-top: 5px;
  color: var(--muted-2);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.06em;
}

.drawer-lead {
  margin: 20px 0 0;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.7;
}

.drawer-current {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-top: 20px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: var(--card-soft);
}

.drawer-current span {
  color: var(--muted);
  font-size: 9.5px;
}

.drawer-current strong {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 25px;
  font-weight: 400;
}

.drawer-block {
  margin-top: 22px;
}

.drawer-block h4 {
  display: flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 6px;
  color: var(--muted);
  font-size: 8.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.drawer-block h4::before {
  content: "";
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: var(--gold);
}

.drawer-block p {
  margin: 0;
  color: var(--ink-2);
  font-size: 11px;
  line-height: 1.85;
}

.drawer-example {
  margin-top: 22px;
  padding: 15px 16px;
  border-left: 2px solid var(--gold);
  background: linear-gradient(90deg, var(--gold-soft), transparent);
}

.drawer-example p {
  margin: 0;
  color: #66512f;
  font-size: 10px;
  line-height: 1.8;
}

.drawer-related {
  display: flex;
  flex-wrap: wrap;
  gap: 5px;
  margin-top: 24px;
}

.drawer-related button {
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 99px;
  background: transparent;
  color: var(--muted);
  font-size: 8.5px;
  cursor: pointer;
}

.drawer-related button:hover {
  color: var(--gold-deep);
  border-color: var(--gold);
}

/* ---------- toast ---------- */

.toast {
  position: fixed;
  left: 50%;
  bottom: 26px;
  z-index: 200;
  padding: 9px 15px;
  border: 1px solid rgba(247, 242, 230, 0.12);
  border-radius: 8px;
  background: rgba(20, 33, 28, 0.94);
  color: var(--cream);
  font-size: 10px;
  box-shadow: 0 12px 30px -14px rgba(0, 0, 0, 0.6);
  transform: translateX(-50%);
  animation: toastIn 0.25s ease both;
}

@keyframes toastIn {
  from { opacity: 0; transform: translate(-50%, 6px); }
}

.noscript {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 30px;
  background: var(--paper);
  color: var(--ink);
}

/* ---------- supporting blocks ---------- */

.chart-caption {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.callout {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  padding: 14px 16px;
  border: 1px solid var(--line-soft);
  border-left: 2px solid var(--gold);
  border-radius: 10px;
  background: linear-gradient(90deg, rgba(242, 228, 200, 0.45), rgba(255, 253, 248, 0));
}

.callout[data-tone="red"] {
  border-left-color: var(--red);
  background: linear-gradient(90deg, rgba(247, 230, 226, 0.65), rgba(255, 253, 248, 0));
}

.callout[data-tone="green"] {
  border-left-color: var(--green);
  background: linear-gradient(90deg, rgba(228, 240, 233, 0.65), rgba(255, 253, 248, 0));
}

.callout-icon {
  display: grid;
  place-items: center;
  width: 21px;
  height: 21px;
  flex: 0 0 auto;
  margin-top: 1px;
  border-radius: 50%;
  color: var(--gold-deep);
  background: var(--gold-soft);
}

.callout[data-tone="red"] .callout-icon { color: var(--red); background: var(--red-soft); }
.callout[data-tone="green"] .callout-icon { color: var(--green); background: var(--green-soft); }

.callout-icon svg {
  width: 11px;
  height: 11px;
}

.callout strong {
  display: block;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 650;
}

.callout p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.75;
}

.quality-list {
  display: grid;
  margin-top: 4px;
}

.quality-row {
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.quality-row:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.quality-row > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.quality-row span {
  color: var(--ink-2);
  font-size: 10.5px;
  font-weight: 550;
}

.quality-row strong {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 21px;
  font-weight: 400;
  line-height: 1;
}

.quality-row p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 9px;
  line-height: 1.65;
}

.explain-list {
  display: grid;
  gap: 3px;
  margin-top: 4px;
}

.explain-item {
  display: grid;
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 11px 0;
  border-bottom: 1px solid var(--line-soft);
}

.explain-item:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.explain-item b {
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 6px;
  color: var(--gold-deep);
  background: var(--gold-soft);
  font-family: var(--mono);
  font-size: 8px;
  font-weight: 500;
}

.explain-item strong {
  display: block;
  color: var(--ink);
  font-size: 10.5px;
  font-weight: 650;
}

.explain-item p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.7;
}

.explain-list.compact .explain-item {
  padding: 9px 0;
}

.safety-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin-top: 17px;
}

.safety-item {
  padding: 11px;
  border: 1px solid var(--line-soft);
  border-radius: 9px;
  background: var(--card-soft);
}

.safety-item span {
  display: block;
  color: var(--muted);
  font-size: 8px;
}

.safety-item strong {
  display: block;
  margin-top: 4px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 400;
  line-height: 1;
}

.safety-item p {
  margin: 5px 0 0;
  color: var(--muted-2);
  font-size: 7.5px;
  line-height: 1.55;
}

.safety-note {
  margin: 14px 0 0;
  padding-top: 11px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.7;
}

.debt-meter {
  margin-top: 13px;
}

.debt-scale {
  position: relative;
  display: flex;
  height: 7px;
  overflow: visible;
  border-radius: 99px;
  background: var(--paper-deep);
}

.debt-scale i {
  height: 100%;
}

.debt-scale i:first-child {
  border-radius: 99px 0 0 99px;
}

.debt-scale i:last-of-type {
  border-radius: 0 99px 99px 0;
}

.debt-low { width: 40%; background: #9ec9b5; }
.debt-mid { width: 20%; background: #ecd39d; }
.debt-high { width: 40%; background: #e8b9ae; }

.debt-marker {
  position: absolute;
  top: -4px;
  width: 2px;
  height: 15px;
  border-radius: 2px;
  background: var(--ink);
  transform: translateX(-50%);
  box-shadow: 0 0 0 3px var(--card);
}

.debt-marker::after {
  content: attr(data-label);
  position: absolute;
  top: -16px;
  left: 50%;
  transform: translateX(-50%);
  padding: 1px 5px;
  border-radius: 3px;
  background: var(--ink);
  color: var(--cream);
  font-family: var(--mono);
  font-size: 7.5px;
  white-space: nowrap;
}

.debt-labels {
  display: flex;
  justify-content: space-between;
  margin-top: 10px;
  color: var(--muted-2);
  font-size: 7.5px;
}

.balance-verdict {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: var(--card-soft);
}

.verdict-score {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex: 0 0 auto;
  border: 1px solid var(--gold);
  border-radius: 50%;
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 25px;
}

.balance-verdict strong {
  display: block;
  color: var(--ink);
  font-size: 12px;
}

.balance-verdict p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 8.5px;
  line-height: 1.65;
}

.balance-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 7px;
  margin-top: 11px;
}

.balance-facts div {
  padding: 9px 10px;
  border-radius: 8px;
  background: var(--paper);
}

.balance-facts span {
  display: block;
  color: var(--muted-2);
  font-size: 7.5px;
}

.balance-facts strong {
  display: block;
  margin-top: 2px;
  color: var(--ink-2);
  font-family: var(--serif);
  font-size: 15px;
  font-weight: 400;
  white-space: nowrap;
}

.table-company {
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.table-company i {
  width: 5px;
  height: 5px;
  border-radius: 50%;
}

.score-mini {
  color: var(--gold-deep);
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 400;
}

.compare-hint {
  color: var(--muted-2);
  font-size: 9px;
}

.company-option:disabled {
  opacity: 0.55;
  cursor: default;
}

.valuation-watch {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}

.valuation-watch > div {
  display: grid;
  grid-template-columns: 58px 64px 1fr;
  align-items: baseline;
  gap: 7px;
  padding: 8px 10px;
  border-radius: 8px;
  background: var(--card-soft);
}

.valuation-watch span {
  color: var(--muted);
  font-size: 8.5px;
}

.valuation-watch strong {
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 10px;
  font-weight: 500;
}

.valuation-watch p {
  margin: 0;
  color: var(--muted-2);
  font-size: 8px;
  line-height: 1.55;
}

.nav-scrim {
  display: none;
}

@media (max-width: 900px) {
  .nav-scrim {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 29;
    background: rgba(13, 26, 21, 0.42);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.24s ease;
  }

  body.nav-open .nav-scrim {
    opacity: 1;
    pointer-events: auto;
  }
}

/* ---------- standalone 404 ---------- */

.nf-shell {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  width: min(760px, calc(100% - 48px));
  min-height: 100vh;
  margin: 0 auto;
  padding: 48px 0;
}

.nf-brand {
  padding: 0 0 40px;
}

.nf-code {
  margin: 0 0 14px;
  color: var(--gold-deep);
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.16em;
}

.nf-shell h1 {
  margin: 0;
  color: var(--ink);
  font-size: clamp(44px, 8vw, 76px);
  font-weight: 720;
  line-height: 1.08;
  letter-spacing: -0.055em;
}

.nf-lead {
  max-width: 560px;
  margin: 20px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.85;
}

.nf-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 28px;
}

.nf-primary,
.nf-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 18px;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  text-decoration: none;
}

.nf-primary {
  background: var(--forest);
  color: var(--cream);
}

.nf-primary:hover {
  background: var(--forest-2);
}

.nf-secondary {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--ink-2);
}

.nf-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-deep);
}

.nf-foot {
  margin: 54px 0 0;
  color: var(--muted-2);
  font-family: var(--serif);
  font-size: 12px;
  font-style: italic;
}

/* ---------- advanced / beginner visibility ---------- */

body.beginner .advanced-only {
  display: none !important;
}

body:not(.beginner) .beginner-only {
  display: none !important;
}

/* ---------- responsive ---------- */

@media (max-width: 1240px) {
  .hero {
    grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
    padding: 32px;
  }

  .hero-thesis {
    font-size: 14px;
  }

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

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

@media (max-width: 1080px) {
  .grid-2,
  .grid-2.equal,
  .grid-3,
  .cash-hero,
  .health-grid,
  .compare-layout,
  .valuation-layout {
    grid-template-columns: minmax(0, 1fr);
  }

  .lab-controls {
    position: static;
  }

  .metric-strip,
  .balance-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

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

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: 272px;
    height: 100vh;
    transform: translateX(-104%);
    transition: transform 0.26s cubic-bezier(0.2, 0.8, 0.2, 1);
    box-shadow: 20px 0 60px -30px rgba(20, 33, 28, 0.6);
    background: #f7f3ea;
  }

  body.nav-open .sidebar {
    transform: translateX(0);
  }

  .mobile-menu {
    display: grid;
  }

  .brand {
    padding-left: 8px;
  }

  .topbar {
    padding: 0 20px;
  }

  .main {
    padding: 22px 20px 54px;
  }

  .site-footer {
    padding: 20px;
  }

  .hero {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
    padding: 30px;
  }

  .hero-score {
    display: grid;
    grid-template-columns: 150px minmax(0, 1fr);
    align-items: center;
    gap: 18px;
    padding: 18px;
  }

  .score-ring-wrap {
    width: 140px;
    height: 140px;
  }

  .score-center strong {
    font-size: 40px;
  }

  .score-dims {
    margin-top: 0;
    padding-top: 0;
    border-top: 0;
  }

  .hero-meta {
    padding-top: 20px;
  }

  .statements,
  .learning-path {
    grid-template-columns: minmax(0, 1fr);
  }

  .statement-item,
  .learning-step {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .statement-item:last-child,
  .learning-step:last-child {
    border-bottom: 0;
  }

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

  .dupont-op {
    display: none;
  }

  .dupont-result {
    grid-column: 1 / -1;
    margin-top: 2px;
  }

  .dictionary-hero {
    grid-template-columns: minmax(0, 1fr);
    padding: 28px;
  }

  .dictionary-hero .dict-stat {
    justify-content: flex-start;
    gap: 24px;
  }
}

@media (max-width: 720px) {
  .topbar {
    height: 64px;
    padding: 0 14px;
    gap: 8px;
  }

  .topbar-divider,
  .topbar-context,
  .search-trigger span,
  .search-trigger kbd,
  .mode-label {
    display: none;
  }

  .search-trigger {
    min-width: 35px;
    width: 35px;
    padding: 0;
    justify-content: center;
  }

  .mode-toggle {
    padding: 6px 7px;
  }

  .company-switch-text small {
    display: none;
  }

  .company-switch-text strong {
    max-width: 110px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
  }

  .main {
    padding: 16px 14px 46px;
  }

  .hero {
    padding: 24px 21px 22px;
    border-radius: 23px;
  }

  .hero-title {
    font-size: clamp(36px, 11vw, 50px);
  }

  .hero-ticker {
    margin-bottom: 4px;
  }

  .hero-thesis {
    font-size: 12.5px;
    line-height: 1.75;
  }

  .hero-score {
    grid-template-columns: 122px minmax(0, 1fr);
    gap: 12px;
    padding: 14px;
  }

  .score-ring-wrap {
    width: 116px;
    height: 116px;
  }

  .score-center strong {
    font-size: 34px;
  }

  .score-center small,
  .score-rank {
    font-size: 7.5px;
  }

  .score-caption {
    font-size: 10.5px;
  }

  .kpi-grid {
    gap: 8px;
  }

  .kpi-card {
    padding: 14px;
  }

  .kpi-value strong {
    font-size: 24px;
  }

  .sparkline {
    display: none;
  }

  .insight-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
  }

  .insight-card {
    min-height: 0;
    padding: 15px;
  }

  .insight-text {
    -webkit-line-clamp: 2;
  }

  .section-head {
    margin-top: 24px;
  }

  .section-head,
  .view-intro {
    align-items: flex-start;
    flex-direction: column;
    gap: 8px;
  }

  .view-intro h1 {
    font-size: 30px;
    letter-spacing: -0.035em;
  }

  .view-intro-side {
    padding-bottom: 0;
  }

  .card {
    padding: 18px 16px;
    border-radius: 18px;
  }

  .chart-wrap {
    margin-top: 8px;
  }

  .legend {
    gap: 6px;
  }

  .metric-strip,
  .balance-summary {
    gap: 8px;
  }

  .metric-box,
  .balance-num {
    padding: 13px;
  }

  .metric-box strong,
  .balance-num strong {
    font-size: 22px;
  }

  .statements {
    border-radius: 18px;
  }

  .statement-item {
    padding: 20px;
  }

  .quote-band {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 20px;
  }

  .quote-band p {
    font-size: 15px;
  }

  .topbar-actions {
    gap: 6px;
  }

  .icon-button,
  .mobile-menu {
    width: 33px;
    height: 33px;
  }

  .company-monogram {
    width: 31px;
    height: 31px;
  }

  .rating-big {
    font-size: 40px;
  }

  .mini-stat-row {
    gap: 5px;
  }

  .mini-stat strong {
    font-size: 15px;
  }

  .score-row {
    grid-template-columns: 64px 1fr 28px;
  }

  .compare-radar {
    min-height: 260px;
  }

  .metric-bars {
    grid-template-columns: minmax(0, 1fr);
  }

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

  .dictionary-tools {
    align-items: stretch;
  }

  .dict-search {
    max-width: none;
    flex-basis: 100%;
  }

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

  .value-cell {
    border-right: 0;
    border-bottom: 1px solid var(--line-soft);
  }

  .value-cell:last-child {
    border-bottom: 0;
  }

  .site-footer {
    flex-wrap: wrap;
    gap: 10px;
    padding: 18px 14px 24px;
  }

  .footer-note {
    order: 3;
    width: 100%;
    text-align: left;
  }

  .footer-links {
    margin-left: auto;
  }

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

  .overlay {
    padding: 12px;
  }

  .modal-header {
    padding: 18px 18px 12px;
  }

  .command-search {
    margin: 0 18px 12px;
  }

  .command-list {
    padding: 0 10px 12px;
  }

  .term-drawer {
    padding: 22px 20px 32px;
  }

  .drawer-title {
    font-size: 31px;
  }

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

@media (max-width: 440px) {
  .sparkline {
    display: none;
  }

  .hero-score {
    grid-template-columns: minmax(0, 1fr);
    justify-items: center;
    text-align: center;
  }

  .score-dims {
    width: 100%;
    margin-top: 6px;
    padding-top: 10px;
    border-top: 1px solid rgba(247, 242, 230, 0.08);
  }

  .hero-meta {
    gap: 10px;
  }

  .topbar .company-switch-text {
    display: flex;
  }

  .topbar .company-switch-text strong {
    max-width: 92px;
  }

  .topbar .company-switch .chev {
    display: none;
  }

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

  .dupont-op {
    display: none;
  }

  .dupont-result {
    margin-top: 0;
  }
}

@media (max-width: 720px) {
  .table-scroll-hint {
    display: block;
  }

  .chart-svg .axis-label {
    font-size: 11.5px;
  }

  .chart-svg .chart-note {
    font-size: 10px;
  }

  .chart-svg .data-label {
    font-size: 11px;
  }

  .radar-svg text {
    font-size: 10.5px;
  }

  .chart-tooltip {
    font-size: 11px;
  }
}

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

/* ---------- print ---------- */

@media print {
  @page {
    margin: 14mm;
  }

  body {
    background: #fff;
    color: #000;
    font-size: 11px;
  }

  body::before,
  .sidebar,
  .topbar,
  .site-footer,
  .overlay,
  .drawer-scrim,
  .term-drawer,
  .chart-tooltip,
  .toast,
  .no-print,
  .section-link,
  .beginner-only {
    display: none !important;
  }

  .app-shell {
    display: block;
  }

  .workspace,
  .main {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }

  .hero {
    min-height: 0;
    padding: 20px;
    border-radius: 12px;
    background: #17352d !important;
    print-color-adjust: exact;
    -webkit-print-color-adjust: exact;
  }

  .hero-title {
    font-size: 34px;
  }

  .kpi-grid,
  .insight-grid,
  .grid-2,
  .grid-3,
  .health-grid,
  .cash-hero,
  .statements,
  .metric-strip,
  .balance-summary,
  .compare-layout,
  .valuation-layout {
    grid-template-columns: repeat(2, 1fr);
  }

  .card,
  .kpi-card,
  .insight-card,
  .metric-box,
  .balance-num {
    break-inside: avoid;
    box-shadow: none;
    border-color: #ddd;
  }

  .chart-svg {
    max-height: 280px;
  }

  .advanced-only {
    display: block !important;
  }
}
