:root {
  /* Logo-aligned */
  --navy: #06284b;
  --navy-deep: #041c36;
  --maroon: #870000;
  --cream: #f0f0f0;

  /* Light product theme (try-out) — paper body, dark text; navy reserved for chrome + accents */
  --bg: #f3efe8;
  --bg-alt: #ebe6dc;
  --surface: #fffdf9;
  --ink: #0c1220;
  --muted: #5c6570;
  --line: #d4cfc4;
  --line-strong: #c4bdb0;

  --display: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --wrap: min(1120px, calc(100% - 2.5rem));
  --radius: 16px;
  --shadow: 0 12px 28px rgba(12, 18, 32, 0.08);
  --shadow-shot: 0 8px 24px rgba(0, 0, 0, 0.18);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-font-smoothing: antialiased;
}

body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: var(--navy);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--maroon);
}

.skip-link {
  position: absolute;
  left: 1rem;
  top: -3rem;
  background: var(--navy);
  color: var(--cream);
  padding: 0.5rem 0.75rem;
  border-radius: 8px;
  z-index: 100;
}

.skip-link:focus {
  top: 1rem;
}

.wrap {
  width: var(--wrap);
  margin-inline: auto;
}

/* Slim navy chrome — keeps cream lockup readable without a full-bleed briefing-room page */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--navy);
  border-bottom: 1px solid color-mix(in oklab, var(--cream) 12%, transparent);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.brand-lockup {
  height: 36px;
  width: auto;
}

.medal {
  flex-shrink: 0;
}

.nav {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.nav a {
  text-decoration: none;
  color: color-mix(in oklab, var(--cream) 82%, transparent);
  font-size: 0.95rem;
  font-weight: 500;
}

.nav a:hover {
  color: var(--cream);
}

.nav-cta {
  padding: 0.45rem 0.85rem;
  border-radius: 999px;
  background: var(--cream);
  color: var(--navy) !important;
}

.nav-cta:hover {
  background: #fff;
  color: var(--navy) !important;
}

.hero {
  padding: 4.25rem 0 3.75rem;
}

.hero-inner {
  max-width: 40rem;
}

.eyebrow {
  margin: 0 0 0.75rem;
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  font-family: var(--display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 500;
  margin: 0 0 0.85rem;
  text-wrap: balance;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3rem);
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
}

h3 {
  font-family: var(--sans);
  font-size: 1.05rem;
  font-weight: 600;
}

.lede {
  font-size: 1.125rem;
  color: var(--muted);
  max-width: 36rem;
  margin: 0 0 1rem;
  text-wrap: pretty;
}

.stack-line {
  margin: 0 0 1.75rem;
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.02em;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.8rem 1.15rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn:hover {
  transform: translateY(-1px);
}

.btn-primary {
  background: var(--navy);
  color: var(--cream);
}

.btn-primary:hover {
  background: var(--navy-deep);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink);
}

.btn-ghost:hover {
  border-color: var(--navy);
  color: var(--navy);
}

.section {
  padding: 4rem 0;
}

.section-alt {
  background: var(--bg-alt);
  border-block: 1px solid var(--line);
}

.section-intro {
  color: var(--muted);
  max-width: 40rem;
  margin: 0 0 2rem;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.study-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.card,
.study-card,
.about-card,
.contact-panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card {
  padding: 1.35rem 1.4rem 1.5rem;
}

.card p {
  margin: 0;
  color: var(--muted);
}

.study-card {
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.study-shot {
  display: block;
  text-decoration: none;
}

.study-card .shot-frame {
  border: none;
  border-radius: 0;
  box-shadow: none;
  padding: 0.65rem 0.65rem 0;
  background: #1c1c1c;
  /* Same on-screen box for every card shot (source files can differ). */
  aspect-ratio: 400 / 387;
  overflow: hidden;
}

/* Fill the frame; crop overflow (tall shots like Forex Factory). */
.study-card .shot-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.study-body {
  padding: 1.15rem 1.35rem 1.4rem;
  display: grid;
  gap: 0.55rem;
}

.study-body h3 {
  margin: 0;
}

.study-body h3 a {
  color: var(--ink);
  text-decoration: none;
}

.study-body h3 a:hover {
  color: var(--navy);
}

.study-body p {
  margin: 0;
  color: var(--muted);
}

.study-link {
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
}

.study-link:hover {
  color: var(--maroon);
}

.study-page-inner {
  max-width: 52rem;
}

.study-page .lede {
  margin-bottom: 1.75rem;
}

/* Detail pages: show shot at intrinsic size (no upscale blur), cap for large sources */
.shot-frame-lg {
  display: block;
  width: fit-content;
  max-width: min(100%, 1024px);
  margin-bottom: 2rem;
  box-sizing: border-box;
}

.shot-frame-lg img {
  width: auto;
  max-width: 100%;
  height: auto;
}

.study-copy h2 {
  margin-top: 1.75rem;
}

.study-copy h3 {
  margin-top: 1.25rem;
  margin-bottom: 0.5rem;
  font-size: 1.05rem;
}

.study-copy p {
  color: var(--muted);
  max-width: 40rem;
}

/* Study Input Descriptions paste (BEGIN/END study-inputs markers; table class study-inputs) */
.study-inputs-wrap {
  overflow-x: auto;
  margin: 0.75rem 0 1.5rem;
  -webkit-overflow-scrolling: touch;
}

.study-copy table.study-inputs {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}

.study-copy table.study-inputs th,
.study-copy table.study-inputs td {
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

.study-copy table.study-inputs tr:last-child th,
.study-copy table.study-inputs tr:last-child td {
  border-bottom: none;
}

.study-copy table.study-inputs th {
  background: var(--bg-alt);
  color: var(--ink);
  font-weight: 600;
}

.study-copy table.study-inputs th:first-child,
.study-copy table.study-inputs td:first-child {
  text-align: right;
  white-space: nowrap;
  width: 1%;
  color: var(--ink);
}

.study-copy table.study-inputs th:last-child,
.study-copy table.study-inputs td:last-child {
  text-align: left;
  color: var(--muted);
}

.study-copy table.study-inputs td:first-child b {
  font-weight: 600;
}

.study-back {
  margin: 2.5rem 0 0;
}

.study-back a {
  font-weight: 600;
  text-decoration: none;
}

.access-inner {
  max-width: 36rem;
}

.access-panel {
  margin-top: 1.5rem;
  padding: 1.5rem 1.5rem 1.65rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.access-modes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.35rem;
  margin-bottom: 1.15rem;
  padding: 0.3rem;
  background: var(--bg-alt);
  border-radius: 999px;
}

.access-mode {
  appearance: none;
  border: none;
  background: transparent;
  color: var(--muted);
  font: inherit;
  font-weight: 600;
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
}

.access-mode.is-active {
  background: var(--surface);
  color: var(--ink);
  box-shadow: var(--shadow);
}

.access-blurb {
  margin: 0 0 1.25rem;
  color: var(--muted);
}

.access-form {
  display: grid;
  gap: 1rem;
}

.field {
  display: grid;
  gap: 0.35rem;
}

/* `display: grid` would otherwise keep the email row visible when Disable is selected */
.field[hidden] {
  display: none !important;
}

.field-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink);
}

.field-hint {
  font-weight: 400;
  color: var(--muted);
}

.field input[type="text"],
.field input[type="email"],
.field input[type="password"] {
  width: 100%;
  box-sizing: border-box;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  line-height: 1.25;
  min-height: 2.75rem;
}

.field input:focus {
  outline: 2px solid color-mix(in oklab, var(--navy) 35%, transparent);
  outline-offset: 1px;
}

.field-check {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 0.65rem;
  color: var(--muted);
  font-size: 0.92rem;
}

.field-check input {
  margin-top: 0.2rem;
}

.access-form .btn {
  justify-self: start;
  margin-top: 0.25rem;
  cursor: pointer;
  min-width: 11rem;
}

.access-form .btn:disabled {
  opacity: 0.75;
  cursor: wait;
  transform: none;
}

.access-form.is-busy {
  opacity: 0.92;
}

.access-mode:disabled {
  cursor: wait;
  opacity: 0.7;
}

.access-status {
  margin-top: 1rem;
  padding: 0.75rem 0.9rem;
  border-radius: 10px;
  font-size: 0.95rem;
}

.access-status.is-ok {
  background: color-mix(in oklab, var(--navy) 8%, var(--surface));
  color: var(--ink);
  border: 1px solid var(--line);
}

.access-status.is-err {
  background: color-mix(in oklab, var(--maroon) 10%, var(--surface));
  color: var(--ink);
  border: 1px solid color-mix(in oklab, var(--maroon) 35%, var(--line));
}

.access-notes {
  margin: 1.35rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.access-notes li {
  margin-bottom: 0.45rem;
}

.confirm-panel {
  margin-top: 1.5rem;
  padding: 1.75rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.confirm-busy {
  display: grid;
  justify-items: center;
  gap: 1rem;
  color: var(--muted);
}

/* `display: grid` would otherwise override the HTML hidden attribute */
.confirm-busy[hidden],
.confirm-result[hidden] {
  display: none !important;
}

.confirm-spinner {
  width: 2rem;
  height: 2rem;
  border: 3px solid var(--line);
  border-top-color: var(--navy);
  border-radius: 50%;
  animation: confirm-spin 0.8s linear infinite;
}

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

.confirm-result {
  display: grid;
  gap: 1.25rem;
  justify-items: start;
}

.confirm-message {
  margin: 0;
  color: var(--ink);
}

.confirm-message.is-err {
  color: var(--maroon);
}

.access-help {
  margin-top: 2.75rem;
}

.access-help h2 {
  margin: 0 0 1.25rem;
  font-size: 1.35rem;
}

.help-step {
  margin-bottom: 2.25rem;
}

.help-step h3 {
  margin: 0 0 0.5rem;
  font-size: 1.05rem;
}

.help-step p {
  margin: 0 0 1rem;
  color: var(--muted);
}

.help-shot {
  margin-bottom: 0;
}

/* /thanks — attribution click landing */
.thanks-inner {
  max-width: 48rem;
}

.thanks-mark {
  width: auto;
  max-width: min(100%, 252px);
  height: auto;
  margin: 0.25rem 0 1.5rem;
}

.thanks-copy p {
  color: var(--muted);
  max-width: 40rem;
}

.thanks-section-title {
  margin-top: 1.5rem;
  font-size: 1.35rem;
}

.thanks-tiers {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
  align-items: stretch;
}

.thanks-tier {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Product short name is the card title; role is the subtitle */
.thanks-tier > h2 {
  margin: 0 0 0.25rem;
  font-size: clamp(1.45rem, 2.5vw, 1.75rem);
  letter-spacing: -0.02em;
  color: var(--navy);
}

.thanks-tier > h3 {
  margin: 0 0 0.85rem;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--muted);
}

.thanks-tier p,
.thanks-tier li {
  color: var(--muted);
  font-size: 0.95rem;
}

.thanks-tier ul {
  margin: 0.85rem 0 0;
  padding-left: 1.15rem;
  flex: 1;
}

.thanks-tier li {
  margin-bottom: 0.35rem;
}

.thanks-tier-cta {
  align-self: start;
  margin-top: 1.25rem;
  text-align: center;
}

.thanks-tier-foot {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: var(--muted);
  line-height: 1.45;
}

.study-shot-placeholder {
  min-height: 12rem;
  background:
    linear-gradient(135deg, color-mix(in oklab, var(--navy) 12%, var(--bg)), var(--surface));
  border: 1px dashed var(--line);
}

.plus-home-cta {
  margin-top: 1.75rem;
}

.plus-pricing {
  margin: 1.5rem 0 0;
  padding: 1.15rem 1.35rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.plus-pricing-note {
  margin: 0.5rem 0 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* /plus — Get StarPentaPlus */
.plus-inner {
  max-width: 48rem;
}

.plus-copy p {
  color: var(--muted);
  max-width: 40rem;
}

.plus-copy h2,
.plus-notes h2 {
  margin-top: 1.5rem;
  font-size: 1.35rem;
}

.plus-paths {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin: 2rem 0 0;
}

.plus-path {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 1.35rem 1.4rem 1.5rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.plus-path > h2 {
  margin: 0 0 0.65rem;
  font-size: 1.25rem;
}

.plus-path p {
  color: var(--muted);
  font-size: 0.95rem;
  flex: 1;
}

.plus-path-cta {
  align-self: start;
  margin-top: 1.25rem;
}

.plus-path-buy {
  border-color: color-mix(in oklab, var(--navy) 28%, var(--line));
}

.plus-notes ul {
  margin: 0.75rem 0 0;
  padding-left: 1.2rem;
  color: var(--muted);
}

.plus-notes li {
  margin-bottom: 0.4rem;
}

@media (max-width: 720px) {
  .thanks-tiers,
  .plus-paths {
    grid-template-columns: 1fr;
  }
}

.section-intro code,
.legal-list code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.9em;
}

.about-grid {
  display: grid;
  grid-template-columns: 1.25fr 0.85fr;
  gap: 1.5rem;
  align-items: stretch;
}

.about-grid p {
  color: var(--muted);
}

.about-card {
  padding: 1.5rem;
  display: grid;
  gap: 1.25rem;
  align-content: start;
}

.about-card dl {
  margin: 0;
  display: grid;
  gap: 1rem;
}

.about-card dt {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.2rem;
}

.about-card dd {
  margin: 0;
  color: var(--ink);
}

.section-contact {
  padding-bottom: 5rem;
}

.contact-panel {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr;
  gap: 1.5rem;
  padding: 1.75rem;
}

.contact-panel p {
  color: var(--muted);
}

.contact-actions {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 0.75rem;
}

.fineprint {
  margin: 0;
  font-size: 0.9rem;
}

/* For Sierra chart shots on #1c1c1c — keeps the frame from melting into the page */
.shot-frame {
  background: #1c1c1c;
  border: 1px solid var(--line-strong);
  border-radius: calc(var(--radius) - 4px);
  box-shadow: var(--shadow-shot);
  padding: 0.5rem;
  overflow: hidden;
}

.shot-frame img {
  width: 100%;
  height: auto;
  border-radius: 4px;
}

.legal-inner {
  max-width: 42rem;
}

.legal-updated {
  margin: -0.35rem 0 1rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.legal-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.25rem;
  margin: 0 0 2rem;
  padding: 0.85rem 0;
  border-block: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.95rem;
}

.legal-nav a {
  text-decoration: none;
}

.legal-nav a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.legal-list {
  margin: 0 0 1.5rem;
  padding-left: 1.25rem;
  color: var(--muted);
}

.legal-list li {
  margin-bottom: 0.55rem;
}

.legal-list li::marker {
  color: var(--navy);
}

.legal-page h2 {
  margin-top: 1.75rem;
  font-size: 1.15rem;
  font-family: var(--sans);
  font-weight: 600;
}

.legal-page p {
  color: var(--muted);
}

.legal-page .lede {
  color: var(--muted);
}

.legal-contact {
  margin-top: 2rem;
}

.footer-meta a {
  color: var(--muted);
  text-decoration: none;
}

.footer-meta a:hover {
  color: var(--navy);
}

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  padding: 1.5rem 0 2rem;
}

.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.92rem;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand p {
  margin: 0;
}

.medal-footer {
  opacity: 0.95;
}

.footer-meta {
  margin: 0;
}

@media (max-width: 900px) {
  .card-grid,
  .about-grid,
  .contact-panel,
  .study-grid {
    grid-template-columns: 1fr;
  }

  .hero {
    padding-top: 3rem;
  }
}

@media (min-width: 641px) and (max-width: 900px) {
  .study-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  :root {
    --wrap: min(1120px, calc(100% - 1.5rem));
  }

  .nav a:not(.nav-cta) {
    display: none;
  }

  .header-inner {
    padding: 0.75rem 0;
  }

  .brand-lockup {
    height: 32px;
  }
}
