:root {
  --background: #17191e;
  --panel: #20232a;
  --panel-raised: #272a32;
  --cream: #f6f0e6;
  --muted: #bcb9bd;
  --gold: #edd09b;
  --line: #383b43;
  --green: #a0c5ab;
  --dark: #252017;
  --button-edge: #535761;
  --focus-ring: #f7d5a0;
  --ease-out: cubic-bezier(.22, .72, .22, 1);
}


/* Tokens consumed by the vendored Open Props button base. */
:root {
  --surface-1: #17191e;
  --surface-2: #22252d;
  --surface-3: #272a32;
  --link: #edd09b;
  --border-size-1: 1px;
  --border-size-2: 1.7px;
  --radius-2: 10px;
  --size-2: 6px;
  --size-relative-6: .92em;
  --size-relative-7: 1.18em;
  --font-weight-7: 700;
  --shadow-1: 0 1px 2px #08080b30;
  --shadow-2: 0 3px 8px #08080b38;
  --ease-3: var(--ease-out);
  --ease-4: var(--ease-out);
}

:where(button, .btn) {
  --_text: var(--cream);
  --_icon-color: currentColor;
  text-shadow: none;
}

:where(button, .btn) > svg,
:where(button, .btn) .button-icon > svg {
  flex: 0 0 auto;
  width: 1em;
  height: 1em;
}

body {
  background:
    radial-gradient(ellipse 38rem 27rem at 72% 4rem, #2d2b3b 0, transparent 100%),
    var(--background);
}

.site-header {
  background: #191b23;
  border-color: #ffffff12;
}

.brand-mark {
  border-color: #8a754f;
  background: linear-gradient(150deg, #3c3529, #29282e);
  box-shadow: inset 0 1px #ffffff1c;
}

:is(#language-switch, .language-switch) {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 1px;
  padding: 2px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: var(--panel);
}

:is(#language-switch, .language-switch) button {
  min-width: 43px;
  min-height: 44px;
  padding: 4px 6px;
  border: 1px solid transparent;
  border-radius: 6px;
  background: transparent;
  box-shadow: none;
  color: var(--muted);
  font-size: .73rem;
  line-height: 1;
  font-weight: 700;
}

:is(#language-switch, .language-switch) button[aria-pressed="true"] {
  border-color: #8d7658;
  background: #403637;
  color: var(--gold);
}

:is(#language-switch, .language-switch) button:hover {
  color: var(--cream);
}

.button,
.contents-button,
.icon-button {
  border-radius: 10px;
  transition: background-color 170ms var(--ease-out), border-color 170ms var(--ease-out),
    color 170ms var(--ease-out), box-shadow 170ms var(--ease-out), transform 170ms var(--ease-out);
  touch-action: manipulation;
}

.button:not(.button-secondary, .inline-action, :disabled) {
  background: linear-gradient(180deg, #f7deac, #e6be7d);
  color: #2b2216;
  border-color: #f7daa3;
  box-shadow: inset 0 1px #fff4cc9e, 0 5px 15px #08080b40;
}

.button:not(.button-secondary, .inline-action, :disabled):hover {
  background: linear-gradient(180deg, #fbe8c5, #edc78e);
  box-shadow: inset 0 1px #fff4cc9e, 0 7px 18px #07080d55;
}

.button-primary {
  gap: 16px;
  min-height: 54px;
  padding-inline: 17px 13px;
}

.button-icon,
.button-primary .button-arrow {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 27px;
  height: 27px;
  border: 1px solid currentColor;
  border-radius: 6px;
  font-size: 15px;
  line-height: 1;
}

.button-primary .button-arrow {
  border-color: #63512f52;
  background: #fff5da47;
}

.button-secondary,
.contents-button,
.icon-button {
  color: var(--cream);
  border-color: var(--button-edge);
  background: #272a32;
}

.button-secondary:not(:disabled):hover,
.contents-button:not(:disabled):hover,
.icon-button:not(:disabled):hover {
  color: #fff6e3;
  border-color: #a48d69;
  background: #333139;
}

.button:disabled {
  color: #aeacb4;
  border-color: #474a54;
  background: #292c34;
}

@media (hover: hover) and (pointer: fine) {
  :where(.button, .contents-button, .icon-button):not(:disabled):active {
    transform: translateY(1px);
  }
}

:where(a, button, summary):focus-visible,
#lesson :where(a, button, summary):focus-visible {
  outline: 2px solid var(--focus-ring);
  outline-offset: 4px;
}

.hero {
  padding-block: clamp(46px, 6vw, 84px) clamp(41px, 6vw, 75px);
}

.hero h1 {
  line-height: .91;
}

.hero h1 em {
  color: #efd29f;
}

.hero-description {
  max-width: 38ch;
}

.hero-meta {
  gap: 11px;
  color: #c4c0c1;
  font-size: 13px;
}

.hero-meta i {
  box-shadow: 0 0 0 3px #a0c5ab24;
}

.hero-visual {
  --visual-divider: #ffffff1b;
  min-height: 424px;
  border-color: #5a5361;
  border-radius: 20px;
  background:
    radial-gradient(ellipse at 70% 49%, #59506852 0%, transparent 67%),
    radial-gradient(ellipse at 16% 61%, #594e3d61 0%, transparent 61%),
    linear-gradient(146deg, #34303f, #252832 64%, #242734);
  box-shadow: inset 0 1px #ffffff16, 0 21px 50px #08090e42;
}

.visual-grid {
  background-image: linear-gradient(#e7d5ed0b 1px, transparent 1px), linear-gradient(90deg, #e7d5ed0b 1px, transparent 1px);
  background-size: 34px 34px;
}

.visual-grid::before,
.visual-grid::after {
  background: linear-gradient(90deg, transparent, #88b7dd88, transparent);
  opacity: .36;
}

.visual-tag {
  color: #f1d7a9;
  border-color: #e8c99745;
  border-radius: 5px;
  background: #2b2832;
}

.visual-axis {
  color: #c9bec4;
  border-top-color: var(--visual-divider);
  font-variant-numeric: tabular-nums;
}

.hero-message {
  padding: 16px;
  border-radius: 13px;
  border-color: #a28a686e;
  background: linear-gradient(163deg, #343039, #282a33 76%);
  box-shadow: inset 0 1px #ffffff1b, 0 17px 32px #08090ea0;
}

.hero-message-head {
  border-color: #ffffff1a;
}

.hero-message-icon {
  background: #514335;
  color: #f6d9a2;
}

.hero-message .preview-time,
.hero-message p {
  color: #d3c8cc;
}

.hero-message strong {
  color: #f7dfb2;
  background: #493c31;
  border-color: #b59a72;
  border-radius: 6px;
}

.preview-down {
  color: #f3c5bb;
}

.connect-line {
  background: linear-gradient(90deg, #cfa974, #ffd8a1);
  filter: drop-shadow(0 1px 4px #a97a49bb);
}

.connect-line::before,
.connect-line::after {
  background: #ffd8a1;
}

.hero-phone,
#lesson .pocket-shell,
#lesson .mini-phone.pocket-shell {
  --pocket-bg: #131d34;
  --pocket-panel: #1d2a48;
  --pocket-line: #42557b;
  --pocket-text: #f1f6ff;
  --pocket-muted: #bcc9df;
  --pocket-accent: #7eb9fe;
  --pocket-active: #e0eeff;
  --pocket-green: #86e5b4;
  --pocket-red: #ffb6bd;
  border: 1px solid #526383;
  background: #101a2d;
  box-shadow: inset 0 0 0 3px #1b2542, 0 15px 30px #08091070;
}

.hero-phone {
  background: #111a2e;
  border-radius: 23px;
}

.hero-phone-camera {
  background: #78849f;
  box-shadow: 0 0 0 2px #24314a;
}

.hero-phone-panel,
.hero-phone-screen {
  min-width: 0;
  color: var(--pocket-text);
  background: var(--pocket-bg);
  border-color: var(--pocket-line);
  border-radius: 12px;
}

.hero-phone-kicker {
  color: var(--pocket-muted);
}

.hero-quote {
  border-color: #76a8e8b0;
  border-radius: 6px;
  background: #253a62;
  color: var(--pocket-active);
}

.hero-phone-chart {
  border-color: var(--pocket-line);
  border-radius: 6px;
}

.hero-phone-end {
  color: var(--pocket-muted);
}

.hero-phone-end b {
  color: var(--pocket-active);
}

.hero-phone-bottom {
  border-color: #4a6a9e;
  border-radius: 6px;
  color: var(--pocket-active);
  background: #20365c;
}

.pocket-wordmark {
  display: inline-flex;
  align-items: center;
  gap: .32em;
  flex-shrink: 0;
  color: var(--pocket-text, var(--cream));
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.035em;
  white-space: nowrap;
}

.pocket-logo {
  display: inline-grid;
  place-items: center;
  width: 1.25em;
  height: 1.25em;
  border-radius: .28em;
  background: var(--pocket-accent, #7eb9fe);
  color: #0e2448;
  font-weight: 700;
  letter-spacing: 0;
}

.pocket-account {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 4px 6px;
  border: 1px solid #5072a6;
  border-radius: 5px;
  background: #253a62;
  color: var(--pocket-active, #e0eeff);
  font-size: .84em;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
}

.pocket-demo-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px 9px;
  min-width: 0;
  margin-bottom: 7px;
  color: var(--pocket-muted, var(--muted));
  font-size: .75rem;
  line-height: 1.3;
}

.hero-phone .pocket-demo-row {
  font-size: clamp(8px, 1.25vw, 13px);
}

.chart-note {
  margin: 12px 0 0;
  padding: 8px 12px;
  border: 1px solid #6a604e;
  border-radius: 8px;
  background: #2b2a2f;
  color: #e5d9cb;
  font-size: .84rem;
}

.source-link {
  color: var(--gold);
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: .18em;
  overflow-wrap: anywhere;
}

.source-link:hover {
  color: #f9dfaf;
}

.journey,
.workspaces {
  border-top-color: #f2d4a729;
}

.section-top {
  margin-bottom: 22px;
}

.journey-list {
  gap: 12px;
}

.journey-list li::after {
  width: 12px;
  right: -12px;
  background: #a18b66;
}

.journey-card {
  gap: 16px;
  border-radius: 12px;
  border-color: #484951;
  background: linear-gradient(157deg, #282b33, #22252d);
  box-shadow: inset 0 1px #ffffff0c;
  transition: background-color 170ms var(--ease-out), border-color 170ms var(--ease-out), box-shadow 170ms var(--ease-out);
}

.journey-card:hover,
.journey-card.current {
  border-color: #b6a07b;
  background: #34303a;
  box-shadow: inset 0 1px #ffffff14, 0 6px 18px #08090f31;
}

.journey-card.done {
  border-color: #6d9479;
}

.journey-glyph,
.workspace-icon {
  background: #3b353b;
  border-color: #8d7658;
  border-radius: 7px;
}

.workspace-card {
  border-color: #484951;
  border-radius: 12px;
  box-shadow: inset 0 1px #ffffff0c;
}

dialog {
  border-color: #766b68;
  border-radius: 16px;
}

#lesson {
  --lesson-panel: #22252d;
  --lesson-panel-light: #2a2d35;
  --lesson-line: #484b55;
  --lesson-text: var(--cream);
  --lesson-muted: var(--muted);
  --lesson-gold: var(--gold);
  --lesson-green: var(--green);
  --lesson-red: #ffbbb3;
}

#lesson .lesson-sidebar {
  border: 1px solid var(--lesson-line);
  border-radius: 14px;
  padding: 14px;
  background: #20232b;
  box-shadow: inset 0 1px #ffffff0d;
}

#lesson .progress-caption {
  color: var(--lesson-muted);
  font-size: .8rem;
  line-height: 1.35;
}

#lesson .step-link:is(.current, .active, [aria-current="step"]) {
  border-color: #977e5f;
  background: #373039;
}

#lesson :is(.lesson-card, .chart-frame, .outcome, .completion) {
  border-radius: 14px;
  box-shadow: inset 0 1px #ffffff0e;
}

#lesson .chat-board {
  border-color: #424552;
  border-radius: 11px;
  background: #1b1e26;
}

#lesson .chat-message {
  border-color: #637180;
  border-radius: 10px 10px 10px 3px;
  background: #2c3744;
}

#lesson .phone-head {
  background: #2a2c35;
}

#lesson .phone-chart {
  border-color: #454652;
  background: #1d2029;
}

#lesson .mini-phone.pocket-shell {
  padding: 9px;
  border-radius: 19px;
}

#lesson .pocket-shell .phone-head {
  border-radius: 10px 10px 0 0;
  color: var(--pocket-text);
  background: var(--pocket-panel);
}

#lesson .pocket-shell .phone-head .card-label {
  color: var(--pocket-active);
}

#lesson .pocket-shell .phone-chart {
  border-color: var(--pocket-line);
  background: var(--pocket-bg);
}

#lesson .pocket-shell .practice-field {
  border-color: var(--pocket-line);
  background: var(--pocket-panel);
  color: var(--pocket-muted);
}

#lesson .pocket-shell .practice-field.done {
  border-color: #62ad88;
}

#lesson .pocket-shell .practice-field.active {
  border-color: var(--pocket-accent);
  background: #253a62;
  box-shadow: inset 0 0 0 1px #7eb9fe30, 0 0 13px #7eb9fe14;
}

#lesson .pocket-shell .practice-field.active strong {
  color: var(--pocket-active);
}

#lesson .field-tabs button,
#lesson .field-options button,
#lesson .signal-fragments.field-options button {
  min-height: 46px;
  border-color: #585c68;
  border-radius: 8px;
  background: #2b2e38;
  color: var(--lesson-text);
}

#lesson .field-tabs button.done:not([aria-pressed="true"]) {
  color: var(--lesson-green);
}

#lesson :is(.field-tabs, .field-options, .signal-fragments.field-options) button:hover {
  border-color: #b9a88c;
  background: #343642;
}

#lesson :is(.field-tabs, .field-options, .signal-fragments.field-options) button:is(.active, .selected, [aria-pressed="true"], [aria-selected="true"], [aria-current="step"]) {
  border-color: var(--lesson-gold);
  background: #45383a;
  color: #ffe5b6;
}

#lesson .feedback {
  border-radius: 0 8px 8px 0;
}

#lesson .feedback.success {
  background: #293c3b;
  color: #d8f0dd;
}

#lesson .feedback.error {
  background: #412e36;
  color: #ffd5ce;
}

#lesson .outcome {
  border-color: #637969;
  background: linear-gradient(138deg, #2b3b3b, var(--lesson-panel) 88%);
}

#lesson .completion {
  border-color: #947858;
  background: linear-gradient(140deg, #3e333a, var(--lesson-panel) 80%);
}

#lesson :where(details.help-panel, .transcript) {
  padding: 3px 12px;
  border-radius: 8px;
  background: #20232b;
}

#lesson :where(details.help-panel, .transcript) summary {
  min-height: 44px;
  align-content: center;
  padding-block: 7px;
}

#lesson :where(details.help-panel, .transcript)[open] {
  padding-bottom: 10px;
}

#lesson .chart-frame :where(.chart-stage, .chart-plot, .price-chart) {
  border-radius: 10px;
  background: #1d2029;
}

body:has(#lesson:not([hidden])) .site-header {
  position: sticky;
  z-index: 8;
  top: 0;
}

#lesson :where(button, a, summary, [tabindex]) {
  scroll-margin-top: 90px;
}

@media (max-width: 1000px) {
  .hero-visual {
    min-height: 385px;
  }

  .hero-message {
    padding: 12px;
  }
}

@media (max-width: 750px) {
  .hero {
    padding-block: 37px 29px;
  }

  .hero h1 {
    font-size: clamp(47px, 12.25vw, 80px);
  }

  .hero-visual {
    min-height: 0;
    height: clamp(265px, 81vw, 380px);
    border-radius: 15px;
  }

  .hero-message {
    padding: 9px;
  }

  .hero-phone {
    border-radius: 17px;
  }

  .hero-phone .pocket-account {
    padding-inline: 3px;
  }

  .journey-list {
    gap: 8px;
  }

  .journey-list li::after {
    z-index: auto;
    width: 1px;
    height: 8px;
    left: 24px;
    bottom: -8px;
    right: auto;
  }

  .journey-card {
    gap: 10px;
  }

  .section-top {
    margin-bottom: 15px;
  }
}

@media (max-width: 680px) {
  #lesson .lesson-wrap {
    gap: 19px;
    padding-top: 16px;
  }

  #lesson .lesson-sidebar {
    grid-template-columns: 1fr auto;
    gap: 7px 12px;
    padding: 10px;
  }

  #lesson .lesson-sidebar h2 {
    font: 650 .84rem/1.2 var(--text);
  }

  #lesson .lesson-sidebar progress {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  #lesson .lesson-sidebar nav {
    grid-column: 1 / -1;
    margin: 0;
  }

  #lesson .lesson-sidebar ol {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    width: 100%;
    gap: 4px;
    margin: 0;
  }

  #lesson .step-link {
    min-height: 44px;
    padding: 5px 3px;
  }

  #lesson .step-link :where(span:not(.step-number), small) {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #lesson .step-link .step-number {
    font-size: .76rem;
    font-weight: 700;
    color: currentColor;
  }

  #lesson .step-link.done:not(.current) .step-number::after {
    margin-inline-start: 2px;
    content: "✓" / "";
  }

  #lesson .lesson-nav {
    border-top-color: #565361;
    background: #1e2028;
    box-shadow: 0 -10px 30px #0b0c1473;
  }

  #lesson .lesson-nav :where(button, a) {
    min-height: 48px;
  }

  body:has(#lesson:not([hidden])) .site-footer {
    padding-bottom: calc(66px + env(safe-area-inset-bottom, 0px));
  }

  #lesson .lesson-nav > :last-child {
    min-width: 0;
  }

  #lesson .lesson-body :where(button, a, summary, [tabindex]) {
    scroll-margin-top: 80px;
  }
}

@media (max-width: 360px) {
  .hero-phone .pocket-wordmark {
    gap: 2px;
  }

  .hero-message .preview-down {
    margin-left: 3px;
  }

  .hero-phone .hero-phone-kicker {
    font-size: 7px;
  }

  .contents-button {
    padding-inline: 7px;
  }
}

@media (prefers-reduced-motion: reduce) {
  :where(.button, .contents-button, .icon-button, .journey-card) {
    transition: none;
  }

  :where(.button, .contents-button, .icon-button):active {
    transform: none;
  }
}

/* Keep the branded preview visually distinct from the lesson controls. */
#lesson .pocket-demo-row {
  padding: 0 4px 5px;
  font-size: .87rem;
}

.pocket-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 5px 9px;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid var(--pocket-line);
  border-radius: 7px 7px 0 0;
  background: var(--pocket-panel);
  color: var(--pocket-text);
  font-size: .72rem;
  line-height: 1.3;
}

.pocket-toolbar > :last-child {
  color: var(--pocket-muted);
  font-size: .86em;
  text-align: right;
}

.hero-phone .pocket-toolbar {
  padding: 5px 6px;
  font-size: clamp(8px, 1.2vw, 12px);
}

#lesson .pocket-tip {
  margin: 9px 0 0;
  padding: 7px 8px;
  color: var(--pocket-muted);
  font-size: .76rem;
}

#lesson .pocket-shell button.practice-field {
  width: 100%;
  min-height: 50px;
  font-family: inherit;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

#lesson .pocket-shell button.practice-field:hover {
  border-color: var(--pocket-accent);
}

#lesson .pocket-shell .field-options {
  margin: 9px 0 0;
}

#lesson .pocket-shell .field-options .choice {
  font-size: .82rem;
}

#lesson .pending-nav {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 6px 11px;
  color: var(--lesson-muted);
  font-size: .82rem;
  line-height: 1.35;
}

#lesson .pending-nav :where(p, small) {
  margin: 0;
  color: inherit;
}

#lesson .pending-nav::before {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--lesson-gold);
  content: "";
}

#lesson .lesson-nav:has(.pending-nav) .pending-nav {
  max-width: 24ch;
  margin-inline-start: auto;
}

.reference-section {
  border-top: 1px solid var(--line);
  padding-block: clamp(24px, 5vw, 48px) clamp(32px, 5vw, 55px);
}

#lesson .reference-section {
  border: 1px solid var(--lesson-line);
  border-radius: 13px;
  background: var(--lesson-panel);
  padding: clamp(15px, 3vw, 25px);
}

.reference-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(242px, 100%), 1fr));
  gap: 14px;
  padding: 0;
  margin: 15px 0 0;
  list-style: none;
}

.reference-card {
  display: grid;
  grid-template-rows: auto 1fr;
  min-width: 0;
  margin: 0;
  border: 1px solid #51545e;
  border-radius: 12px;
  overflow: hidden;
  background: var(--panel);
  box-shadow: inset 0 1px #ffffff15;
}

.reference-card:focus-within {
  border-color: #b19b81;
}

.reference-image {
  display: block;
  width: 100%;
  min-width: 0;
  aspect-ratio: 16 / 10;
  border: 0;
  border-bottom: 1px solid #51545e;
  background: #191b23;
}

img.reference-image,
.reference-image img {
  display: block;
  width: 100%;
  max-height: 21rem;
  object-fit: contain;
}

img.reference-image {
  height: auto;
}

.reference-image img {
  height: 100%;
}

.reference-content {
  display: grid;
  align-content: start;
  justify-items: start;
  gap: 8px;
  padding: 14px;
  min-width: 0;
}

.reference-content :where(h2, h3, p),
#lesson .reference-content :where(h2, h3, p) {
  margin: 0;
}

.reference-content :where(h2, h3),
#lesson .reference-content :where(h2, h3) {
  font: 650 clamp(1.25rem, 3vw, 1.8rem)/1.05 var(--heading);
}

.reference-content p {
  color: var(--muted);
  font-size: .88rem;
}

.reference-chip {
  display: inline-flex;
  align-items: center;
  max-width: 100%;
  padding: 4px 7px;
  border: 1px solid #796c5c;
  border-radius: 5px;
  background: #37313a;
  color: var(--gold);
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .045em;
  line-height: 1.25;
}

@media (max-width: 680px) {
  #lesson .lesson-nav:has(.pending-nav) {
    gap: 8px;
  }

  #lesson .lesson-nav:has(.pending-nav) .pending-nav {
    max-width: none;
  }

  .reference-gallery {
    gap: 10px;
  }
}

.intent-card,
.product-disclosure {
  border: 1px solid #5b5360;
  border-radius: 12px;
  background: #252730;
}

.intent-card {
  display: grid;
  gap: 6px;
  padding: clamp(14px, 2.4vw, 23px);
}

.intent-card :where(h2, h3, p),
#lesson .intent-card :where(h2, h3, p) {
  margin: 0;
}

.intent-card :where(h2, h3) {
  font: 650 clamp(1.45rem, 3vw, 2rem)/1.1 var(--heading);
}

.intent-card p {
  max-width: 68ch;
  color: var(--muted);
}

#lesson .step-guidance {
  min-width: 0;
  margin: 0 0 18px;
}

#lesson .step-guidance::details-content {
  padding-top: 7px;
}

#lesson .step-guidance > summary {
  min-height: 44px;
  margin-bottom: 6px;
  align-content: center;
  color: var(--lesson-gold);
  font-weight: 700;
}

#lesson .guidance-grid,
#lesson .step-guidance:not(details):has(> .guidance-card) {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

#lesson .guidance-card {
  min-width: 0;
  padding: 11px 12px;
  border: 1px solid #514a53;
  border-radius: 9px;
  background: #272831;
}

#lesson .guidance-card :where(h2, h3, h4, p) {
  margin: 0;
}

#lesson .guidance-card :where(h2, h3, h4, strong) {
  color: var(--lesson-gold);
  font: 700 .82rem/1.25 var(--text);
}

#lesson .guidance-card p {
  color: var(--lesson-muted);
  font-size: .83rem;
  line-height: 1.45;
}

#lesson .guidance-card :where(h2, h3, h4, strong) + p {
  margin-top: 4px;
}

#lesson .step-guidance > .guidance-card + .guidance-card {
  margin-top: 7px;
}

#lesson .completion-recap {
  padding: 14px;
  border: 1px solid #5b6664;
  border-radius: 10px;
  background: #2b3437;
}

#lesson .completion-recap > :first-child {
  margin-top: 0;
}

#lesson .completion-recap > :last-child {
  margin-bottom: 0;
}

#lesson .completion-recap ul {
  margin-block: 8px 0;
  padding-inline-start: 1.1em;
}

#lesson .completion-recap li::marker {
  color: var(--lesson-green);
}

.product-disclosure {
  padding: 11px 13px;
  color: var(--muted);
  font-size: .84rem;
  line-height: 1.45;
}

.product-disclosure p {
  max-width: 68ch;
  margin: 0;
}

.product-disclosure p + p {
  margin-top: 5px;
}

.product-disclosure :where(h2, h3, strong) {
  color: var(--cream);
}

@media (max-width: 680px) {
  #lesson .guidance-grid,
  #lesson .step-guidance:not(details):has(> .guidance-card) {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  #lesson .guidance-card {
    padding: 8px 10px;
  }
}

svg.button-icon {
  display: inline-block;
  width: 1.1em;
  height: 1.1em;
  overflow: visible;
  border: 0;
  border-radius: 0;
  vertical-align: -.16em;
}

.hero-message-icon svg,
.journey-glyph svg,
.workspace-icon svg,
.intent-icon svg {
  width: .95em;
  height: .95em;
}

.pocket-logo:empty::before {
  width: .63em;
  height: .61em;
  border: .12em solid #142953;
  border-radius: .13em .28em .29em .25em;
  transform: rotate(-36deg);
  content: "";
}

.pocket-wordmark :is(b, em) {
  color: var(--pocket-accent, #7eb9fe);
  font-style: normal;
}

.pocket-directions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin-top: 7px;
}

.pocket-direction {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 38px;
  padding: 4px;
  border: 1px solid #427c69;
  border-radius: 5px;
  background: #1e4b43;
  color: var(--pocket-green);
  font-size: .73rem;
  font-weight: 700;
}

.pocket-direction.down {
  border-color: #a45c6c;
  background: #552c45;
  color: var(--pocket-red);
}

.hero-phone .pocket-direction {
  min-height: 23px;
  font-size: clamp(8px, 1vw, 11px);
}

.pocket-toolbar > span:first-child {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--pocket-text);
  font-size: 1em;
  text-align: start;
}

.hero-phone .hero-quote {
  margin-top: 6px;
}

.hero-visual:has(.hero-phone-screen) .connect-line {
  top: 203px;
}

.hero-visual:has(.hero-phone-screen) .connect-line::before {
  top: auto;
  bottom: 0;
  height: 74px;
}

.hero-visual:has(.hero-phone-screen) .connect-line::after {
  top: auto;
  bottom: 71px;
}

#lesson .pocket-shell .phone-fields > :first-child,
#lesson .pocket-shell .phone-fields > .phone-chart {
  grid-column: 1 / -1;
}

.reference-image:focus-visible {
  position: relative;
  outline-offset: -3px;
}

@media (max-width: 1000px) {
  .hero-visual:has(.hero-phone-screen) .connect-line {
    top: 190px;
  }

  .hero-visual:has(.hero-phone-screen) .connect-line::before {
    height: 62px;
  }

  .hero-visual:has(.hero-phone-screen) .connect-line::after {
    bottom: 59px;
  }
}

@media (max-width: 750px) {
  .hero-visual:has(.hero-phone-screen) .connect-line {
    top: 145px;
  }

  .hero-visual:has(.hero-phone-screen) .connect-line::before {
    height: 39px;
  }

  .hero-visual:has(.hero-phone-screen) .connect-line::after {
    bottom: 36px;
  }
}

#lesson .step-guidance > details {
  margin-top: 7px;
  padding-inline: 10px;
  border: 1px solid #514a53;
  border-radius: 8px;
  background: #252730;
}

#lesson .step-guidance > details summary {
  min-height: 44px;
  align-content: center;
  color: var(--lesson-gold);
  font-size: .85rem;
  font-weight: 650;
  cursor: pointer;
}

#lesson .step-guidance > details ol {
  display: grid;
  gap: 5px;
  max-width: 68ch;
  margin-top: 4px;
  padding-left: 1.4em;
  color: var(--lesson-muted);
  font-size: .87rem;
}

#lesson .step-guidance > details li::marker {
  color: var(--lesson-gold);
}

#lesson .case-lab {
  display: grid;
  align-content: start;
  gap: 12px;
}

#lesson .case-lab :is(h2, h3) {
  margin: 0;
}

#lesson .case-options {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 0;
}

#lesson .case-options button {
  min-height: 44px;
  padding-inline: 12px;
}

#lesson .case-options button[aria-pressed="true"] {
  border-color: var(--lesson-gold);
  background: #45383a;
  color: #ffe5b6;
}

#lesson .case-result {
  --case-line: #5b626e;
  --case-panel: #2d303b;
  --case-accent: #e0d9db;
  min-width: 0;
  display: grid;
  gap: 7px;
  padding: 12px 14px;
  border: 1px solid var(--case-line);
  border-inline-start: 3px solid var(--case-line);
  border-radius: 9px;
  color: var(--case-accent);
  background: var(--case-panel);
}

#lesson .case-result.positive {
  --case-line: #89ad9b;
  --case-panel: #2b3b40;
  --case-accent: #d0eadb;
}

#lesson .case-result.negative {
  --case-line: #ca948e;
  --case-panel: #403239;
  --case-accent: #f4d6d4;
}

#lesson .case-result p {
  margin-block: 0;
  color: inherit;
  font-size: .91rem;
}

#lesson .case-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(128px, 100%), 1fr));
  gap: 6px;
  margin: 0;
}

#lesson .case-metrics > * {
  min-width: 0;
}

#lesson .case-metrics :is(dt, dd) {
  margin: 0;
}

#lesson .case-metrics dt {
  color: var(--lesson-muted);
  font-size: .78rem;
}

#lesson .case-metrics dd {
  color: var(--lesson-text);
  font-size: .93rem;
  font-variant-numeric: tabular-nums;
  font-weight: 650;
}

#lesson .bot-preview {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  margin-bottom: 2px;
}

#lesson .chat-bot-avatar {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 34px;
  height: 34px;
  border: 1px solid #8d7658;
  border-radius: 9px;
  background: #40363e;
  color: var(--lesson-gold);
  font-size: .83rem;
  font-weight: 700;
}

#lesson .bot-preview :is(p, strong, small) {
  margin: 0;
}

#lesson .bot-subtitle {
  display: block;
  color: var(--lesson-muted);
  font-size: .74rem;
  line-height: 1.3;
}

@media (max-width: 420px) {
  #lesson .case-options button {
    flex: 1 1 auto;
  }
}

#lesson .field-selector {
  position: relative;
  min-width: 0;
  padding-inline-end: 25px;
}

#lesson .field-selector .button-icon {
  position: absolute;
  inset-block-start: 9px;
  inset-inline-end: 8px;
  color: var(--pocket-muted);
  transition: transform 170ms var(--ease-out);
}

#lesson .field-selector[aria-expanded="true"] .button-icon {
  color: var(--pocket-active);
  transform: rotate(180deg);
}

#lesson .field-picker {
  padding: 10px;
  margin-top: 8px;
  border: 1px solid #567bac;
  border-radius: 8px;
  background: #192743;
}

#lesson .field-picker h2 {
  margin-block: 0 6px;
  color: var(--pocket-text);
  font-size: 1.37rem;
}

#lesson .field-picker #field-instruction {
  margin: 0;
  color: var(--pocket-muted);
  font-size: .82rem;
}

#lesson .field-picker .feedback {
  font-size: .82rem;
}

#lesson .chart-empty {
  min-height: 7rem;
  margin: 0;
  padding: 14px;
  align-content: center;
  text-align: center;
  color: var(--pocket-muted, var(--lesson-muted));
  font-size: .83rem;
}

#lesson .case-lab > p:not(.card-label, .chart-note) {
  margin: 0;
  color: var(--lesson-muted);
}

#lesson .case-lab .price-chart {
  overflow: hidden;
  border: 1px solid var(--lesson-line);
  border-radius: 9px;
}

#lesson .completion-recap {
  margin-block: 17px 5px;
}

@media (prefers-reduced-motion: reduce) {
  #lesson .field-selector .button-icon {
    transition: none;
  }
}

.operator-note {
  display: grid;
  gap: 6px;
  min-width: 0;
  padding: 13px 15px;
  border: 1px solid #6485a2;
  border-inline-start: 3px solid #97cdf4;
  border-radius: 9px;
  background: #233953;
  color: #d8e8f5;
  font-size: .86rem;
  line-height: 1.5;
}

.operator-note :where(p, h2, h3) {
  margin: 0;
}

.operator-note :where(h2, h3, strong) {
  color: #f0f8ff;
}

/* Legacy lesson controls still share the accent scheme. */
#lesson .timeline {
  border-top-color: #695a4b;
}

#lesson .review-settings {
  border-top-color: #695a4b;
}

#lesson .inline-action:hover {
  color: #f9dfaf;
}

#lesson .result-icon {
  border-color: #708d7a;
  background: #2d4138;
}

#lesson .feedback:not(.error, .success) {
  border-color: #9d825e;
  background: #352d2c;
}

.hero-quote span,
.footer-brand b,
.contents-icon {
  color: var(--gold);
}

.operator-note .source-link {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: 6px;
  min-height: 44px;
}

.intent-card .operator-note {
  margin-top: 9px;
}

.hero-phone .pocket-wordmark {
  gap: clamp(2px, .4vw, 5px);
}

.hero-phone .pocket-account {
  white-space: nowrap;
}

.hero h1:focus,
#lesson-title:focus {
  outline: none;
}

@media (max-width: 460px) {
  .header-inner {
    gap: 10px;
  }

  .header-actions {
    gap: 5px;
  }

  .header-progress {
    display: none;
  }

  :is(#language-switch, .language-switch) button {
    min-width: 36px;
  }
}

@media (max-width: 380px) {
  .contents-button {
    min-width: 44px;
    padding-inline: 5px;
  }

  .contents-button > span:last-child {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

}
