@import url('https://fonts.googleapis.com/css2?family=DM+Mono:wght@400;500&family=Manrope:wght@400;500;600;700&display=swap');

:root {
  color-scheme: light dark;
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-2: #e8eef0;
  --ink: #10181c;
  --muted: #45545c;
  --line: #bdcbd0;
  --blue: #006fe6;
  --blue-soft: #d8eaff;
  --amber: #a86400;
  --amber-soft: #ffebbf;
  --signal: #0b8a72;
  --shadow: 0 18px 50px rgba(20, 42, 52, .09);
  --max: 1180px;
  /* consistent corner scale */
  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --ease: cubic-bezier(.32, .72, 0, 1);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #080d10;
    --surface: #10171b;
    --surface-2: #172126;
    --ink: #f1f6f7;
    --muted: #a8b6bb;
    --line: #2c3a40;
    --blue: #5cb0ff;
    --blue-soft: #102d45;
    --amber: #ffc568;
    --amber-soft: #3a2b13;
    --signal: #53d8bb;
    --shadow: 0 20px 60px rgba(0, 0, 0, .3);
  }
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 82px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Manrope, ui-sans-serif, system-ui, sans-serif;
  line-height: 1.58;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button, input { font: inherit; }
.wrap { width: min(var(--max), calc(100% - 40px)); margin: 0 auto; }
.mono { font-family: "DM Mono", ui-monospace, monospace; }

/* ---------- nav ---------- */
.topnav {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 65%, transparent);
}
.topnav .wrap {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.02em; text-decoration: none; font-size: 1.08rem; }
.brand img { width: 36px; height: 36px; border-radius: 9px; display: block; }
.brand .dot { color: var(--blue); }
.burger { display: none; }
.edition { color: var(--muted); font-size: .78rem; white-space: nowrap; }
.navlinks { display: flex; align-items: center; gap: 6px; }
.navlinks a {
  text-decoration: none;
  color: var(--muted);
  padding: 9px 11px;
  border-radius: 8px;
  font-size: .86rem;
  font-weight: 600;
  transition: color .18s var(--ease), background .18s var(--ease);
}
.navlinks a:hover, .navlinks a:focus-visible { color: var(--ink); background: var(--surface-2); outline: none; }
.navlinks a[aria-current="page"] { color: var(--ink); background: var(--surface-2); }

/* ---------- hero ---------- */
.hero { padding: clamp(64px, 9vw, 118px) 0 58px; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1.25fr .75fr; gap: clamp(38px, 7vw, 90px); align-items: center; }
.kicker {
  margin: 0 0 22px;
  color: var(--blue);
  font: 500 .78rem/1.4 "DM Mono", monospace;
  letter-spacing: .06em;
}
h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(2.5rem, 6vw, 5.8rem);
  line-height: .98;
  letter-spacing: -.055em;
  font-weight: 650;
}
.hero-copy > p:not(.kicker) { max-width: 720px; color: var(--muted); font-size: clamp(1.04rem, 1.6vw, 1.25rem); margin: 26px 0 32px; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border-radius: var(--r-sm);
  text-decoration: none;
  font-weight: 700;
  font-size: .9rem;
  border: 1px solid var(--line);
  background: var(--surface);
  transition: transform .18s var(--ease), box-shadow .18s var(--ease);
}
.button.primary { color: #fff; background: #0675df; border-color: #0675df; }
.button:hover, .button:focus-visible { transform: translateY(-1px); box-shadow: var(--shadow); outline: none; }

.rail-visual {
  min-height: 410px;
  position: relative;
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow);
  border-radius: var(--r-lg);
  overflow: hidden;
}
.rail-visual::before {
  content: "";
  position: absolute; inset: 0;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 42px 42px;
  opacity: .22;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hub {
  position: absolute;
  width: 78px; height: 78px;
  border-radius: 50%;
  display: grid; place-items: center;
  font: 500 .66rem/1.25 "DM Mono", monospace;
  text-align: center;
  letter-spacing: .02em;
  z-index: 2;
  box-shadow: 0 10px 30px rgba(0,0,0,.16);
}
.hub-ai { left: 7%; top: 36%; color: #fff; background: #0675df; }
.hub-pay { right: 9%; top: 13%; color: var(--ink); background: var(--amber-soft); border: 1px solid var(--amber); }
.hub-stock { right: 15%; bottom: 9%; color: var(--ink); background: var(--surface); border: 1px solid var(--signal); }
.visual-label { position: absolute; left: 22px; bottom: 18px; color: var(--muted); font-size: .72rem; z-index: 3; }

/* ---------- signal band ---------- */
.signal-band { border-block: 1px solid var(--line); background: var(--surface); }
.signal-head { padding: 24px 0 18px; display: flex; align-items: baseline; justify-content: space-between; gap: 20px; }
.signal-head h2 { margin: 0; font-size: 1rem; letter-spacing: -.01em; }
.signal-head p { margin: 0; color: var(--muted); font-size: .75rem; }
.stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--line); }
.stat { padding: 28px 24px 30px; border-right: 1px solid var(--line); }
.stat:first-child { padding-left: 0; }
.stat:last-child { border-right: 0; }
.value { display: block; color: var(--blue); font: 500 clamp(1.75rem, 3vw, 3rem)/1 "DM Mono", monospace; letter-spacing: -.06em; }
.stat strong { display: block; margin-top: 13px; font-size: .92rem; line-height: 1.35; }
.source { display: block; color: var(--muted); margin-top: 8px; font: 400 .68rem/1.4 "DM Mono", monospace; }

/* ---------- content sections ---------- */
section.content { padding: clamp(74px, 9vw, 118px) 0; border-bottom: 1px solid var(--line); }
.section-grid { display: grid; grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr); gap: clamp(36px, 8vw, 120px); }
.section-id { position: sticky; top: 92px; align-self: start; }
.section-id span { color: var(--blue); font: 500 .72rem "DM Mono", monospace; }
.section-id h2 { margin: 12px 0 0; font-size: clamp(1.55rem, 2.3vw, 2.35rem); line-height: 1.08; letter-spacing: -.035em; }
.lede { margin: 0 0 34px; font-size: clamp(1.25rem, 2.2vw, 1.8rem); line-height: 1.35; letter-spacing: -.025em; max-width: 860px; }
.prose { max-width: 820px; }
.prose p { color: var(--muted); font-size: 1.02rem; }
.prose strong { color: var(--ink); }
.thesis {
  margin: 38px 0;
  padding: 26px 30px;
  background: var(--amber-soft);
  border-left: 3px solid var(--amber);
  border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink);
  font-size: clamp(1.18rem, 2vw, 1.55rem);
  line-height: 1.4;
  font-weight: 650;
}
.installment { display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start; padding: 25px 0; border-block: 1px solid var(--line); }
.installment .num { color: var(--blue); font: 500 1.1rem "DM Mono", monospace; }
.installment h3 { margin: 0 0 8px; font-size: 1.15rem; }
.installment p { margin: 0; color: var(--muted); }

/* ---------- guide accordion (smooth, single-open) ---------- */
.guide-intro { padding: 30px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md); box-shadow: var(--shadow); }
.guide-intro p { margin: 0; color: var(--muted); }
.guide-intro strong { color: var(--ink); }
.steps { margin: 42px 0 0; }
.steps details { border-top: 1px solid var(--line); }
.steps details:last-child { border-bottom: 1px solid var(--line); }
.steps summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: 52px 1fr 30px;
  gap: 12px;
  align-items: center;
  padding: 23px 8px;
  font-weight: 700;
  border-radius: var(--r-sm);
  transition: background .18s var(--ease);
}
.steps summary:hover { background: color-mix(in srgb, var(--surface-2) 55%, transparent); }
.steps summary:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.steps summary::-webkit-details-marker { display: none; }
.steps summary .step { color: var(--blue); font: 500 .75rem "DM Mono", monospace; }
.steps summary .chev {
  width: 28px; height: 28px;
  display: grid; place-items: center;
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--muted);
  transition: transform .32s var(--ease), background .2s var(--ease), color .2s var(--ease), border-color .2s var(--ease);
}
.steps summary .chev svg { display: block; }
.steps details.is-open summary .chev { transform: rotate(45deg); background: var(--blue); border-color: var(--blue); color: #fff; }
.detail-body { overflow: hidden; }
.detail-inner { overflow: hidden; }
.detail-inner > .pad { padding: 4px 40px 28px 64px; color: var(--muted); }
.detail-inner p:first-child { margin-top: 0; }
.risk-list { display: grid; gap: 14px; margin: 6px 0 0; }
.risk-item { display: grid; grid-template-columns: 110px 1fr; gap: 18px; }
.risk-item strong { color: var(--ink); }
.disclaimer { margin-top: 30px; color: var(--muted); font-size: .82rem; }

/* ---------- newsletter brief ---------- */
.brief { background: var(--blue-soft); }
.brief-panel { display: grid; grid-template-columns: 1fr .8fr; gap: 54px; align-items: center; }
.brief h2 { margin: 0 0 16px; font-size: clamp(2rem, 4vw, 4rem); line-height: 1; letter-spacing: -.05em; }
.brief p { color: var(--muted); max-width: 620px; }
.signup-status { border: 1px solid var(--blue); background: var(--surface); padding: 24px; border-radius: var(--r-md); }
.signup-status .mono { color: var(--blue); font-size: .72rem; }
.signup-status strong { display: block; font-size: 1.15rem; margin: 10px 0 6px; }
.signup-status p { margin: 0; font-size: .9rem; }

/* ---------- guide cards ---------- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 40px; }
.card {
  display: flex; flex-direction: column;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: 26px;
  text-decoration: none;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), border-color .2s var(--ease);
}
.card:hover, .card:focus-visible { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue); outline: none; }
.card .tag { color: var(--blue); font: 500 .7rem "DM Mono", monospace; letter-spacing: .04em; }
.card h3 { margin: 12px 0 10px; font-size: 1.18rem; letter-spacing: -.02em; }
.card p { margin: 0; color: var(--muted); font-size: .92rem; flex: 1; }
.card .go { margin-top: 18px; color: var(--blue); font-weight: 700; font-size: .88rem; }

/* ---------- watchlist ---------- */
.watch-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; }
.watch { background: var(--surface); padding: 28px; min-height: 190px; }
.watch .tag { color: var(--blue); font: 500 .7rem "DM Mono", monospace; }
.watch h3 { font-size: 1.25rem; margin: 12px 0 10px; }
.watch p { color: var(--muted); margin: 0; font-size: .92rem; }
.watch .reason { margin-top: 18px; color: var(--ink); }

/* ---------- article pages ---------- */
.crumbs { padding: 26px 0 0; font-size: .82rem; color: var(--muted); }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--ink); text-decoration: underline; }
.article-head { padding: 40px 0 54px; max-width: 860px; }
.article-head h1 { font-size: clamp(2.2rem, 5vw, 4.2rem); }
.article-meta { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 22px; color: var(--muted); font: 400 .78rem "DM Mono", monospace; }
.article-body { max-width: 780px; padding-bottom: 30px; }
.article-body h2 { margin: 54px 0 16px; font-size: 1.6rem; letter-spacing: -.03em; }
.article-body h3 { margin: 34px 0 12px; font-size: 1.15rem; }
.article-body p, .article-body li { color: var(--muted); font-size: 1.04rem; }
.article-body strong { color: var(--ink); }
.article-body ul, .article-body ol { padding-left: 22px; }
.article-body li { margin-bottom: 10px; }
.article-body blockquote {
  margin: 34px 0; padding: 22px 26px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 3px solid var(--blue); border-radius: 0 var(--r-sm) var(--r-sm) 0;
  color: var(--ink); font-weight: 600; font-size: 1.1rem; line-height: 1.5;
}
.keyterms { display: grid; gap: 0; margin: 30px 0; border: 1px solid var(--line); border-radius: var(--r-md); overflow: hidden; background: var(--surface); }
.keyterms .term { display: grid; grid-template-columns: 180px 1fr; gap: 20px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.keyterms .term:last-child { border-bottom: 0; }
.keyterms .term strong { color: var(--ink); }
.keyterms .term span { color: var(--muted); font-size: .94rem; }
.related { border-top: 1px solid var(--line); margin-top: 20px; padding: 54px 0 90px; }
.related h2 { font-size: 1.4rem; letter-spacing: -.02em; margin: 0 0 6px; }

/* ---------- about / footer ---------- */
.about-copy { font-size: clamp(1.35rem, 2.6vw, 2.35rem); line-height: 1.4; letter-spacing: -.035em; max-width: 900px; margin: 0; }
a.handle { color: var(--blue); white-space: nowrap; text-decoration: none; font-weight: 700; }
a.handle:hover { text-decoration: underline; }
footer { padding: 32px 0 48px; }
footer .wrap { display: flex; justify-content: space-between; align-items: start; gap: 24px; color: var(--muted); font-size: .78rem; }
.footnav { display: flex; flex-wrap: wrap; gap: 18px; }
.footnav a { text-decoration: none; }
.footnav a:hover { color: var(--ink); }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 820px) {
  .wrap { width: min(100% - 28px, var(--max)); }
  .topnav .wrap { min-height: 60px; }
  .burger {
    display: inline-grid; place-items: center; align-content: center;
    width: 44px; height: 44px; flex: none;
    background: var(--surface); border: 1px solid var(--line); border-radius: 10px;
    cursor: pointer; padding: 0;
  }
  .burger span { display: block; width: 20px; height: 2px; border-radius: 2px; background: var(--ink); transition: transform .28s var(--ease), opacity .18s var(--ease); }
  .burger span + span { margin-top: 5px; }
  .topnav.open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .topnav.open .burger span:nth-child(2) { opacity: 0; }
  .topnav.open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
  .burger:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
  .navlinks {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    padding: 10px 14px 16px;
    background: color-mix(in srgb, var(--surface) 96%, transparent);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line);
    box-shadow: 0 24px 40px rgba(20, 42, 52, .12);
    opacity: 0; transform: translateY(-10px); visibility: hidden; pointer-events: none;
    transition: opacity .28s var(--ease), transform .28s var(--ease), visibility 0s linear .28s;
  }
  .topnav.open .navlinks {
    opacity: 1; transform: none; visibility: visible; pointer-events: auto;
    transition: opacity .28s var(--ease), transform .28s var(--ease);
  }
  .navlinks a { font-size: .95rem; padding: 13px 12px; border-radius: 10px; }
  .hero-grid, .section-grid, .brief-panel { grid-template-columns: 1fr; }
  .hero { padding-top: 54px; }
  .rail-visual { min-height: 320px; }
  .hub { width: 68px; height: 68px; font-size: .6rem; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat { border-bottom: 1px solid var(--line); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(3), .stat:nth-child(4) { border-bottom: 0; }
  .stat:first-child { padding-left: 18px; }
  .section-id { position: static; }
  .section-grid { gap: 30px; }
  .watch-grid { grid-template-columns: 1fr; }
  .keyterms .term { grid-template-columns: 1fr; gap: 6px; }
}
@media (max-width: 520px) {
  h1 { font-size: 2.62rem; }
  .hero { padding-bottom: 44px; }
  .rail-visual { min-height: 280px; }
  .signal-head { align-items: flex-start; flex-direction: column; gap: 4px; }
  .stat { padding: 22px 14px; }
  .value { font-size: 1.72rem; }
  section.content { padding: 64px 0; }
  .steps summary { grid-template-columns: 42px 1fr 30px; }
  .detail-inner > .pad { padding-left: 54px; padding-right: 8px; }
  .risk-item { grid-template-columns: 1fr; gap: 3px; }
  .guide-intro { padding: 22px; }
  .cards { grid-template-columns: 1fr; }
  footer .wrap { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .detail-body { transition: none; }
}
