/* Guided company example, using the site's white and warm gold palette. */
.stocks-mode-switch {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 4px;
  max-width: 100%;
  padding: 4px;
  margin: 0 0 27px;
  background: #f0eee7;
  border: 1px solid var(--line);
  border-radius: 9px;
}
.stocks-mode-switch button {
  min-width: 0;
  padding: 10px 17px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  color: #5d6458;
  font-size: 13px;
  line-height: 1.5;
  overflow-wrap: anywhere;
}
.stocks-mode-switch button[aria-pressed="true"] {
  background: var(--surface);
  border-color: #e0d7c3;
  color: var(--gold-dark);
  box-shadow: 0 2px 6px #24292108;
}
.stocks-mode-switch button:hover { color: var(--gold-dark); }
.stocks-mode-panel[hidden],
.apple-case-panel[hidden],
.apple-case [hidden] { display: none !important; }

.apple-case {
  --apple-copy: #5d6458;
  width: 100%;
  max-width: 1120px;
  min-width: 0;
  margin: 0 auto;
  color: var(--ink);
  overflow-wrap: anywhere;
  scroll-margin-top: 0;
}
.apple-case *, .apple-case *::before, .apple-case *::after { box-sizing: border-box; }
.apple-case-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px 30px;
  margin-bottom: 26px;
}
.apple-case-head > * { min-width: 0; max-width: 100%; }
.apple-case-head h1, .apple-case-head h2 {
  font: normal clamp(30px, 3.2vw, 42px)/1.2 var(--serif);
  letter-spacing: -.9px;
  margin: 0 0 13px;
}
.apple-case-head p {
  max-width: 740px;
  margin: 0;
  font-size: 14px;
  line-height: 1.85;
  color: var(--apple-copy);
}
.apple-brand-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  max-width: 100%;
  padding: 9px 14px;
  border: 1px solid #ddcfb2;
  border-radius: 999px;
  background: #f8f3e8;
  color: var(--gold-dark);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .7px;
  line-height: 1.5;
}
.apple-case .apple-meta {
  display: block;
  margin: 12px 0 0;
  color: var(--apple-copy);
  font-size: 12px;
  line-height: 1.8;
}
.apple-case-nav {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
  margin-bottom: 20px;
}
.apple-tab {
  min-width: 0;
  min-height: 61px;
  padding: 13px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--apple-copy);
  font-size: 13px;
  font-weight: 500;
  line-height: 1.6;
  text-align: left;
  overflow-wrap: anywhere;
  transition: background .2s, border-color .2s;
}
.apple-tab > span { color: var(--gold-dark); }
.apple-tab:hover { border-color: #cbb98f; background: #fcfaf5; }
.apple-tab[aria-current="step"] {
  border-color: #c2a972;
  background: #f5efe1;
  color: var(--ink);
  box-shadow: inset 0 2px 0 var(--gold);
}
.apple-case-panel {
  min-width: 0;
  padding: 32px;
  background: white;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  outline: none;
}
.apple-case-panel h2 {
  font: normal 31px/1.3 var(--serif);
  letter-spacing: -.7px;
  margin: 0 0 17px;
}
.apple-case-panel > p {
  max-width: 930px;
  font-size: 14px;
  line-height: 1.85;
  color: var(--apple-copy);
  margin: 0 0 23px;
}
.apple-case-panel > :last-child { margin-bottom: 0; }
.apple-card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 17px;
  margin: 25px 0;
}
.apple-card {
  min-width: 0;
  padding: 23px;
  border: 1px solid #e8e4d9;
  border-radius: 9px;
  background: #fcfbf8;
}
.apple-card h3 {
  margin: 0 0 12px;
  font-size: 16px;
  line-height: 1.5;
  font-weight: 500;
}
.apple-card p {
  font-size: 13px;
  line-height: 1.85;
  color: var(--apple-copy);
  margin: 0 0 12px;
}
.apple-card p:last-child { margin-bottom: 0; }
.apple-stats-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 24px 0;
}
.apple-stats-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.apple-stat {
  min-width: 0;
  padding: 22px 20px;
  border: 1px solid #e8e2d4;
  border-radius: 9px;
  background: #faf8f2;
}
.apple-stat span, .apple-stat small { display: block; color: var(--apple-copy); }
.apple-stat span { font-size: 12px; line-height: 1.7; margin-bottom: 13px; }
.apple-stat strong {
  display: block;
  font: normal clamp(26px, 2.4vw, 34px)/1.2 var(--serif);
  color: var(--ink);
  letter-spacing: -.7px;
  margin-bottom: 11px;
}
.apple-stat small { font-size: 11px; line-height: 1.75; }
.apple-mix {
  display: flex;
  width: 100%;
  height: 15px;
  margin: 22px 0 13px;
  overflow: hidden;
  border-radius: 5px;
  background: #ede9df;
}
.apple-mix > * { display: block; min-width: 0; height: 100%; background: var(--gold); }
.apple-mix > :nth-child(2) { background: #b69b62; }
.apple-mix > :nth-child(3) { background: #cbb78a; }
.apple-mix > :nth-child(4) { background: #898f7d; }
.apple-mix > :nth-child(5) { background: #b8bdae; }
.apple-mix-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 26px;
  color: var(--apple-copy);
  font-size: 12px;
  line-height: 1.8;
}
.apple-mix-legend > * { min-width: 0; max-width: 100%; }
.apple-mix-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 2px; margin-right: 7px; background: var(--gold); }
.apple-reading {
  min-width: 0;
  padding: 21px 24px;
  margin: 25px 0;
  border: 1px solid #e0d4bb;
  border-left: 3px solid var(--gold);
  border-radius: 8px;
  background: #f8f4ea;
}
.apple-reading strong { display: block; font-size: 14px; font-weight: 600; line-height: 1.7; }
.apple-reading p { margin: 8px 0 0; color: var(--apple-copy); font-size: 13px; line-height: 1.85; }
.apple-table { width: 100%; min-width: 0; max-width: 100%; overflow-x: auto; margin: 23px 0; border: 1px solid var(--line); border-radius: 8px; }
.apple-table { position: relative; }
.apple-table table { border-collapse: collapse; width: 100%; min-width: 490px; text-align: left; }
.apple-table th, .apple-table td { padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 13px; line-height: 1.8; vertical-align: top; }
.apple-table th { background: #f8f6f0; font-weight: 600; color: var(--ink); }
.apple-table td { color: var(--apple-copy); }
.apple-table tbody tr:last-child td { border-bottom: 0; }
.apple-detail { margin: 23px 0; border-top: 1px solid #e4dcc9; }
details.apple-detail { padding: 17px 0; border-bottom: 1px solid #e4dcc9; }
.apple-detail details { padding: 17px 0; border-bottom: 1px solid #e4dcc9; }
.apple-detail summary { cursor: pointer; color: var(--ink); font-size: 14px; font-weight: 500; line-height: 1.8; }
.apple-detail summary::marker { color: var(--gold); }
.apple-detail summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; }
.apple-detail p { color: var(--apple-copy); font-size: 13px; line-height: 1.9; margin: 13px 0 0; }
.apple-detail ul { padding-left: 21px; font-size: 13px; line-height: 1.9; color: var(--apple-copy); }

.apple-scenario {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 28px 36px;
  margin: 26px 0;
}
.apple-scenario > * { min-width: 0; }
.apple-scenario fieldset { min-width: 0; margin: 0; padding: 0; border: 0; }
.apple-control { display: block; min-width: 0; margin-bottom: 24px; font-size: 13px; line-height: 1.8; color: var(--ink); }
.apple-control:last-child { margin-bottom: 0; }
.apple-control label { display: block; font-size: 13px; line-height: 1.8; color: var(--ink); }
.apple-range-label { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 6px 15px; font-size: 13px; line-height: 1.8; }
.apple-range-label output, .apple-range-label strong { color: var(--gold-dark); font-size: 15px; font-weight: 600; }
.apple-control input[type="range"] {
  display: block;
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-width: 0;
  height: 26px;
  margin: 10px 0 4px;
  padding: 0;
  background: transparent;
  accent-color: var(--gold);
  cursor: pointer;
}
.apple-control input[type="range"]::-webkit-slider-runnable-track { height: 4px; background: #e6dfce; border-radius: 6px; }
.apple-control input[type="range"]::-moz-range-track { height: 4px; background: #e6dfce; border-radius: 6px; }
.apple-control input[type="range"]::-webkit-slider-thumb { appearance: none; -webkit-appearance: none; width: 20px; height: 20px; margin-top: -8px; border-radius: 50%; border: 2px solid white; background: var(--gold); box-shadow: 0 0 0 1px #baa575; }
.apple-control input[type="range"]::-moz-range-thumb { width: 16px; height: 16px; border-radius: 50%; border: 2px solid white; background: var(--gold); box-shadow: 0 0 0 1px #baa575; }
.apple-control input[type="range"]:focus-visible { outline: 2px solid var(--gold); outline-offset: 4px; border-radius: 4px; }
.apple-range-limits { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 12px; color: var(--apple-copy); font-size: 11px; line-height: 1.7; }
.apple-control small { display: block; color: var(--apple-copy); font-size: 11px; line-height: 1.8; margin-top: 8px; }
.apple-scenario-results { min-width: 0; padding: 24px; border: 1px solid #dfd2b7; border-radius: 10px; background: linear-gradient(140deg, #f7f2e7, #fdfbf6); }
.apple-scenario-results dl { margin: 0; }
dl.apple-scenario-results { margin: 0; }
dl.apple-scenario-results > div, .apple-scenario-results dl > div { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 8px 18px; padding: 13px 0; border-bottom: 1px solid #e6dfcf; }
.apple-scenario-results dt { color: var(--apple-copy); font-size: 12px; line-height: 1.8; }
.apple-scenario-results dd { margin: 0; color: var(--ink); font-size: 15px; font-weight: 500; line-height: 1.6; text-align: right; }
.apple-scenario-results .apple-scenario-main { padding: 5px 0 20px; margin-bottom: 5px; }
.apple-scenario-main dt { font-size: 13px; }
.apple-scenario-main dd { font: normal clamp(28px, 3vw, 38px)/1.2 var(--serif); color: var(--gold-dark); letter-spacing: -.8px; }
.apple-scenario-main strong, .apple-scenario-main output { font: inherit; }
.apple-scenario-bar { width: 100%; height: 9px; overflow: hidden; margin: 18px 0 11px; border-radius: 5px; background: #e4dfd2; }
.apple-scenario-bar > span { display: block; height: 100%; max-width: 100%; background: var(--gold); border-radius: inherit; transition: width .2s ease; }
.apple-formula { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: center; gap: 10px 17px; margin: 24px 0; padding: 21px; border: 1px solid #e7e1d2; border-radius: 9px; background: #fcfaf5; font: normal 27px/1.6 var(--serif); letter-spacing: -.5px; }
.apple-formula > * { min-width: 0; max-width: 100%; }
.apple-formula small { font: 12px/1.8 var(--sans); color: var(--apple-copy); letter-spacing: 0; }
.apple-formula > div { flex: 1 1 200px; text-align: center; }
.apple-formula small { display: block; margin-bottom: 9px; }
.apple-formula strong { display: block; font: normal 31px/1.3 var(--serif); color: var(--gold-dark); }
.apple-tool-heading { font-size: 18px; font-weight: 500; line-height: 1.6; margin: 26px 0 12px; }
.apple-case-head { justify-content: flex-start; align-items: center; gap: 19px; }
.apple-tab > span { margin-right: 10px; font-size: 11px; }
.apple-price-figure figcaption { font-size: 11px; color: var(--apple-copy); line-height: 1.8; margin-top: 12px; }
.apple-detail ol { font-size: 13px; line-height: 1.9; padding-left: 21px; color: var(--apple-copy); margin: 14px 0; }
.apple-detail a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; }
.apple-example-notes { display: block; font-size: 14px; line-height: 1.8; }
.apple-example-notes textarea { margin-top: 10px; }
.apple-scenario-note { color: var(--apple-copy); font-size: 12px; line-height: 1.85; margin: 17px 0 0; }
.apple-question { margin: 26px 0; padding: 24px; background: #faf9f5; border: 1px solid #e5e0d4; border-radius: 10px; min-width: 0; }
fieldset.apple-question, .apple-question fieldset { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; min-width: 0; }
.apple-question fieldset { border: 0; margin: 0; padding: 0; }
fieldset.apple-question > :not(legend):not(button[data-apple-answer]) { grid-column: 1 / -1; }
.apple-question legend { font-size: 14px; line-height: 1.8; font-weight: 500; color: var(--ink); margin-bottom: 18px; padding: 0; max-width: 100%; }
.apple-question button[data-apple-answer] { min-width: 0; min-height: 46px; padding: 11px 14px; border: 1px solid #dcd7c9; border-radius: 6px; background: white; color: var(--ink); font: 13px/1.7 var(--sans); text-align: center; white-space: normal; overflow-wrap: anywhere; }
.apple-question button[data-apple-answer]:hover { border-color: #bba26e; background: #fcf9f1; }
.apple-question button[data-apple-answer][aria-pressed="true"], .apple-question button[data-apple-answer].is-selected { border-color: var(--gold); background: #f3ebd9; color: var(--gold-dark); }
.apple-answer-feedback { min-width: 0; margin: 17px 0 0; padding: 14px 17px; background: #f2efe6; border-left: 3px solid var(--gold); border-radius: 4px; color: var(--apple-copy); font-size: 13px; line-height: 1.85; }
.apple-answer-feedback p { margin: 0; font: inherit; }
.apple-case .apple-source-line { display: block; color: var(--apple-copy); font-size: 12px; line-height: 1.85; margin: 19px 0; }
.apple-source-line a, .apple-case-footer a { color: var(--gold-dark); text-decoration: underline; text-underline-offset: 3px; overflow-wrap: anywhere; }
.apple-case-controls { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 12px 20px; margin: 24px 0 0; }
.apple-case-controls .button { min-width: 0; max-width: 100%; min-height: 45px; white-space: normal; font-size: 13px; }
.apple-case-controls .button:disabled { opacity: .5; }
.apple-case-footer { color: var(--apple-copy); font-size: 12px; line-height: 1.85; border-top: 1px solid var(--line); margin: 27px 0 0; padding-top: 19px; }
.apple-chart-action { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 17px 26px; margin: 26px 0; padding: 23px 25px; border: 1px solid #e0d4bc; border-radius: 9px; background: #f9f5eb; min-width: 0; }
.apple-chart-action > * { min-width: 0; max-width: 100%; }
.apple-chart-action p { font-size: 13px; color: var(--apple-copy); line-height: 1.85; margin: 0; }
.apple-chart-action .button { font-size: 13px; white-space: normal; }
.apple-example-notes { min-width: 0; margin: 25px 0; }
.apple-example-notes label { display: block; font-size: 14px; line-height: 1.8; font-weight: 500; margin-bottom: 12px; }
.apple-example-notes textarea { display: block; width: 100%; min-width: 0; max-width: 100%; min-height: 132px; resize: vertical; margin: 0; padding: 15px 17px; border: 1px solid #dcd6c7; border-radius: 8px; background: #fff; color: var(--ink); font: 14px/1.85 var(--sans); }
.apple-example-notes textarea::placeholder { color: #747a6e; }
.apple-example-notes textarea:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; }
.apple-example-notes small { display: block; margin-top: 10px; font-size: 12px; line-height: 1.8; color: var(--apple-copy); }
.apple-case-status { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
.apple-case-footer small, .apple-source-line small, .apple-meta small { font-size: inherit; line-height: inherit; }
.apple-price-figure { min-width: 0; margin: 0 0 23px; padding: 20px; border: 1px solid #dfd2b7; border-radius: 10px; background: #fcfaf4; }
.apple-price-figure svg { display: block; width: 100%; max-width: 100%; height: auto; }
.apple-chart-label { font: 20px var(--sans); fill: var(--apple-copy); }
.apple-observation-switch { display: flex; flex-wrap: wrap; gap: 9px; margin: 20px 0 15px; }
.apple-observation-switch button { min-width: 0; max-width: 100%; min-height: 44px; padding: 10px 14px; background: white; border: 1px solid #dcd5c4; border-radius: 6px; color: var(--apple-copy); font-size: 13px; line-height: 1.7; text-align: left; white-space: normal; overflow-wrap: anywhere; }
.apple-observation-switch button:hover { background: #f8f4e9; border-color: #bea571; }
.apple-observation-switch button[aria-pressed="true"] { background: #f3ebd9; color: var(--gold-dark); border-color: var(--gold); }
.apple-price-line { opacity: .2; transition: opacity .2s ease; }
.apple-price-line.is-active { opacity: 1; }
.apple-price-caption { min-height: 54px; margin: 14px 0 0; font-size: 13px; line-height: 1.8; color: var(--apple-copy); }
.apple-number-note { margin: 14px 0 0; font-size: 12px; line-height: 1.8; color: var(--apple-copy); }
html:has(.apple-case) { scroll-behavior: auto; }

@media (max-width: 900px) {
  .apple-stats-grid, .apple-stats-grid:has(> :nth-child(4):last-child) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apple-card-grid { gap: 13px; }
  .apple-card { padding: 20px; }
  .apple-case-panel { padding: 28px; }
  .apple-scenario { gap: 26px; }
}
@media (max-width: 760px) {
  .apple-case-nav { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .apple-card-grid { grid-template-columns: 1fr; }
  .apple-scenario { grid-template-columns: 1fr; }
  .apple-case-panel { padding: 24px; }
  .apple-case-panel h2 { font-size: 28px; }
  .apple-case-head { gap: 15px; }
  fieldset.apple-question, .apple-question fieldset { grid-template-columns: 1fr; }
  .apple-question button[data-apple-answer] { text-align: left; }
  .apple-chart-action { padding: 21px; }
}
@media (max-width: 520px) {
  .apple-formula { flex-direction: column; align-items: center; gap: 7px; }
  .apple-formula > div { flex: 0 0 auto; width: 100%; }
  .apple-formula strong { font-size: 28px; }
  .stocks-mode-switch { display: flex; width: 100%; margin-bottom: 22px; }
  .stocks-mode-switch button { flex: 1 1 100px; padding: 9px 11px; font-size: 12px; }
  .apple-case-head h1, .apple-case-head h2 { font-size: 29px; }
  .apple-case-head p { font-size: 13px; }
  .apple-case-nav { gap: 8px; margin-bottom: 16px; }
  .apple-tab { padding: 12px; font-size: 12px; min-height: 62px; }
  .apple-case-panel { padding: 20px; }
  .apple-case-panel h2 { font-size: 26px; letter-spacing: -.5px; }
  .apple-case-panel > p { font-size: 13px; }
  .apple-stats-grid, .apple-stats-grid:has(> :nth-child(4):last-child) { grid-template-columns: 1fr; gap: 11px; }
  .apple-stat { padding: 20px; }
  .apple-stat strong { font-size: 30px; }
  .apple-card-grid { margin: 22px 0; }
  .apple-reading { padding: 18px; }
  .apple-scenario-results { padding: 20px; }
  .apple-scenario-results dd { font-size: 14px; }
  .apple-scenario-main dd { font-size: 32px; }
  .apple-formula { padding: 17px; gap: 8px 12px; font-size: 24px; }
  .apple-question { padding: 19px; }
  .apple-answer-feedback { padding: 13px 14px; }
  .apple-case-controls .button { flex: 1 1 130px; padding: 11px 13px; }
  .apple-chart-action { padding: 19px; }
  .apple-chart-action .button { width: 100%; }
  .apple-example-notes textarea { padding: 13px; font-size: 13px; }
  .apple-price-figure { padding: 14px; }
  .apple-chart-label { font-size: 32px; }
  .apple-observation-switch button { flex: 1 1 110px; padding: 10px 12px; font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .apple-tab, .apple-scenario-bar > span, .apple-price-line { transition: none; }
}
