* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
::selection { background: var(--accent); color: var(--ink-on-accent); }
.glow {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(ellipse 70% 55% at 18% 8%, var(--glow), transparent 60%);
}
main {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(1.5rem, 4vw, 4rem) clamp(1.25rem, 6vw, 6rem);
  max-width: 1400px;
  margin: 0 auto;
}
.wordmark {
  font-family: var(--mono);
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
}
.wordmark span { color: var(--accent); }
.center { max-width: 40rem; }
h1 {
  font-size: clamp(2.5rem, 7vw, 4.5rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.05;
  padding-bottom: 0.1em;
  color: var(--ink);
}
h1 em {
  font-style: italic;
  color: var(--accent);
  line-height: 1.1;
}
.sub {
  margin-top: 1.25rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--mut);
  max-width: 34rem;
}
footer {
  display: flex;
  align-items: baseline;
  gap: 1.5rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  color: var(--mut);
  border-top: 1px solid var(--line);
  padding-top: 1.25rem;
}
footer a {
  color: var(--ink2);
  text-decoration: none;
  border-bottom: 1px solid var(--line);
  padding-bottom: 1px;
  transition: color 0.25s ease, border-color 0.25s ease;
}
footer a:hover { color: var(--accent); border-color: var(--accent); }
.reveal { opacity: 0; transform: translateY(14px); }
@media (prefers-reduced-motion: no-preference) {
  .reveal { animation: rise 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
  .reveal:nth-child(2) { animation-delay: 0.12s; }
  .reveal:nth-child(3) { animation-delay: 0.24s; }
  @keyframes rise {
    to { opacity: 1; transform: translateY(0); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; }
}

/* ── 站點骨架（Phase 1.5）：頂部導航 + 內頁 + segmented 切換 ── */
.topnav {
  position: relative;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.25rem clamp(1.25rem, 6vw, 6rem);
  max-width: 1400px;
  margin: 0 auto;
  border-bottom: 1px solid var(--line);
}
.topnav .wordmark { text-decoration: none; }
.navlinks {
  display: flex;
  gap: 1.25rem;
  font-family: var(--mono);
  font-size: 0.85rem;
}
.navlinks a {
  color: var(--mut);
  text-decoration: none;
  transition: color 0.2s ease;
}
.navlinks a:hover, .navlinks a[aria-current="page"] { color: var(--accent); }
.page {
  position: relative;
  max-width: 1400px;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1.25rem, 6vw, 6rem) 4rem;
  min-height: 60vh;
}
.page h1 {
  font-size: clamp(1.9rem, 4.5vw, 3rem);
}
.lede { margin-top: 0.75rem; color: var(--mut); max-width: 40rem; line-height: 1.6; }
.placeholder-note {
  margin: 1.5rem 0 0;
  padding: 0.75rem 1rem;
  border: 1px dashed var(--line);
  border-radius: 10px;
  color: var(--mut);
  font-family: var(--mono);
  font-size: 0.8rem;
}
/* segmented 產品切換（非下拉） */
.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 2rem;
}
.tabs button {
  font-family: var(--mono);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink2);
  background: transparent;
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 0.5rem 1.1rem;
  cursor: pointer;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}
.tabs button:hover { color: var(--accent); border-color: var(--accent); }
.tabs button[aria-selected="true"] {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--ink-on-accent);
}
.panel { display: none; margin-top: 2rem; max-width: 44rem; }
.panel.active { display: block; }
.panel h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.panel .oneliner { margin-top: 0.5rem; color: var(--ink2); line-height: 1.6; }
.panel ul { margin: 1.25rem 0 0 1.1rem; color: var(--mut); line-height: 1.9; }
.chip {
  display: inline-block;
  margin-top: 1.25rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.7rem;
}

/* ── Deck 體驗（無外框，內容直接鋪在頁面上） ── */
.tabs { margin-top: 0.5rem; }
.deck-stage { margin-top: 2rem; min-height: 300px; max-width: 44rem; }
.mock { display: none; }
.mock.active { display: block; }
.mock-caption {
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--mut);
  max-width: 44rem;
}
/* Chat mock */
.chat-line { font-family: var(--mono); font-size: 0.85rem; line-height: 1.7; margin-bottom: 0.9rem; }
.chat-line .who { color: var(--accent); font-weight: 700; }
.chat-line p { color: var(--ink2); margin-top: 0.15rem; }
.chat-input {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1.4rem;
  border: 1px solid var(--linef);
  border-radius: 9px;
  padding: 0.55rem 0.8rem;
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--mut);
  background: var(--panel2);
}
.cursor { display: inline-block; width: 8px; height: 1em; background: var(--accent); vertical-align: text-bottom; }
@media (prefers-reduced-motion: no-preference) {
  .cursor { animation: blink 1.1s steps(1) infinite; }
  @keyframes blink { 50% { opacity: 0; } }
}
/* Dashboard mock */
.card-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.8rem; }
@media (max-width: 640px) { .card-grid { grid-template-columns: 1fr; } }
.dcard {
  border: 1px solid var(--linef);
  border-radius: 10px;
  background: var(--panel2);
  padding: 0.9rem 1rem;
}
.dcard .k { font-family: var(--mono); font-size: 0.72rem; color: var(--mut); letter-spacing: 0.05em; }
.dcard .v { margin-top: 0.4rem; font-size: 1.05rem; font-weight: 650; color: var(--ink); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; }
.dot.ok { background: var(--up); }
/* 表格（Tradeboard） */
.tb { width: 100%; border-collapse: collapse; font-family: var(--mono); font-size: 0.84rem; }
.tb th { text-align: left; color: var(--mut); font-weight: 600; padding: 0.5rem 0.6rem; border-bottom: 1px solid var(--line); }
.tb td { padding: 0.55rem 0.6rem; border-bottom: 1px solid var(--linef); color: var(--ink2); }
.tb .num { text-align: right; }
.pos { color: var(--up); }
.neg { color: var(--down); }
/* Polaris / Thea mock */
.steps { display: flex; flex-wrap: wrap; gap: 0.4rem; font-family: var(--mono); font-size: 0.76rem; color: var(--mut); margin-top: 0.9rem; }
.steps span { border: 1px solid var(--linef); border-radius: 999px; padding: 0.22rem 0.65rem; background: var(--panel2); }
.steps span.done { color: var(--accent); border-color: var(--accent); }
.stat-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.8rem; }
@media (max-width: 640px) { .stat-row { grid-template-columns: 1fr; } }
.gauge { margin-top: 1rem; }
.gauge .track { height: 6px; border-radius: 999px; background: var(--linef); overflow: hidden; }
.gauge .fill { height: 100%; width: 68%; border-radius: 999px; background: linear-gradient(90deg, var(--accent-2), var(--accent)); }
.gauge .lbl { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 0.72rem; color: var(--mut); margin-top: 0.4rem; }
/* 模式說明區（視窗下方，跟著切換） */
.mode-info { margin-top: 2rem; max-width: 44rem; }
.mode-info .panel { margin-top: 0; }

/* ── Introduce 首頁 ── */
.hero-intro { padding-top: clamp(2rem, 6vw, 5rem); max-width: 44rem; }
.hero-intro h1 {
  font-size: clamp(2.4rem, 6.5vw, 4.2rem);
  font-weight: 650;
  letter-spacing: -0.03em;
  line-height: 1.08;
  color: var(--ink);
}
.hero-intro h1 em { font-style: italic; color: var(--accent); line-height: 1.1; }
.cta-row { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.btn-primary, .btn-ghost {
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  border-radius: 999px;
  padding: 0.7rem 1.5rem;
  transition: transform 0.15s ease, opacity 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}
.btn-primary { background: var(--accent); color: var(--ink-on-accent); }
.btn-primary:hover { opacity: 0.9; }
.btn-primary:active, .btn-ghost:active { transform: translateY(1px); }
.btn-ghost { border: 1px solid var(--line); color: var(--ink2); }
.btn-ghost:hover { color: var(--accent); border-color: var(--accent); }
.props { margin-top: clamp(3rem, 8vw, 5rem); max-width: 44rem; display: grid; gap: 1.75rem; }
.props h3 { font-size: 1.15rem; color: var(--ink); }
.props h3 span { color: var(--accent); }
.props p { margin-top: 0.35rem; color: var(--mut); line-height: 1.7; }
.story-sec { margin-top: clamp(3rem, 8vw, 5rem); max-width: 44rem; }
.story-sec h2 { font-size: clamp(1.4rem, 3vw, 2rem); letter-spacing: -0.02em; }
.page footer { margin-top: clamp(3rem, 8vw, 5rem); }

/* ── Introduce 首頁 v2（design pass） ── */
.pulse-wrap { margin-top: clamp(2rem, 5vw, 3.5rem); max-width: 44rem; }
.pulse { width: 100%; height: 64px; display: block; }
.pulse path {
  stroke: var(--accent);
  stroke-width: 2;
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: 0.85;
}
@media (prefers-reduced-motion: no-preference) {
  .pulse path {
    stroke-dasharray: 1400;
    stroke-dashoffset: 1400;
    animation: drawline 2.8s cubic-bezier(0.3, 0, 0.2, 1) 0.5s forwards;
  }
  @keyframes drawline { to { stroke-dashoffset: 0; } }
}
.sec { margin-top: clamp(4rem, 10vw, 6.5rem); }
.sec > h2 {
  font-size: clamp(1.5rem, 3.4vw, 2.2rem);
  letter-spacing: -0.02em;
  color: var(--ink);
}
.sec > .lede { margin-top: 0.6rem; }
/* 自主迴圈：橫向流程 */
.flow { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 1.75rem; font-family: var(--mono); font-size: 0.85rem; }
.flow b {
  font-weight: 600;
  color: var(--ink2);
  border: 1px solid var(--line);
  background: var(--panel);
  border-radius: 999px;
  padding: 0.45rem 1rem;
}
.flow b.hot { color: var(--accent); border-color: var(--accent); }
.flow i { color: var(--mut); font-style: normal; }
.flow-note { margin-top: 1.1rem; color: var(--mut); line-height: 1.7; max-width: 38rem; }
/* 記憶循環：對答案帳本 */
.memory-grid { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(1.5rem, 4vw, 3rem); margin-top: 1.75rem; align-items: start; }
@media (max-width: 820px) { .memory-grid { grid-template-columns: 1fr; } }
.memory-grid .say { color: var(--mut); line-height: 1.8; }
.memory-grid .say strong { color: var(--ink); font-weight: 650; }
.ledger { font-family: var(--mono); font-size: 0.8rem; border-top: 1px solid var(--line); }
.ledger .row { display: grid; grid-template-columns: 5rem 1fr auto; gap: 0.6rem; padding: 0.65rem 0.2rem; border-bottom: 1px solid var(--linef); color: var(--ink2); }
.ledger .row .d { color: var(--mut); }
.ledger .row .ok { color: var(--up); }
.ledger .row .miss { color: var(--down); }
.ledger-cap { margin-top: 0.5rem; font-family: var(--mono); font-size: 0.72rem; color: var(--mut); }
/* 五大頁面 bento */
.bento5 { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0.9rem; margin-top: 1.75rem; }
.bcell {
  grid-column: span 2;
  display: block;
  text-decoration: none;
  border: 1px solid var(--linef);
  background: var(--panel);
  border-radius: 14px;
  padding: 1.2rem 1.25rem 1.35rem;
  transition: transform 0.2s ease, border-color 0.2s ease;
}
.bcell:nth-child(1), .bcell:nth-child(2) { grid-column: span 3; }
.bcell:hover { transform: translateY(-3px); border-color: var(--accent); }
.bcell:active { transform: translateY(-1px); }
.bcell .bk { font-family: var(--mono); font-size: 0.75rem; color: var(--accent); }
.bcell .bt { margin-top: 0.5rem; font-size: 1.1rem; font-weight: 650; color: var(--ink); }
.bcell .bd { margin-top: 0.4rem; font-size: 0.9rem; color: var(--mut); line-height: 1.6; }
.bcell.tint { background: linear-gradient(145deg, var(--panel2), var(--panel)); }
@media (max-width: 820px) { .bento5 { grid-template-columns: 1fr; } .bcell, .bcell:nth-child(-n+2) { grid-column: span 1; } }
/* Daily 導流：全幅陳述 */
.daily-sec { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: clamp(2rem, 5vw, 3rem) 0; }
.daily-sec .big { font-size: clamp(1.3rem, 3vw, 1.9rem); font-weight: 650; color: var(--ink); letter-spacing: -0.02em; max-width: 38rem; }
.daily-sec .big span { color: var(--accent); }
.arrow-link { display: inline-block; margin-top: 1.2rem; font-family: var(--mono); font-size: 0.9rem; color: var(--accent); text-decoration: none; }
.arrow-link:hover { text-decoration: underline; }
/* 尾段 CTA */
.final-cta { text-align: left; max-width: 44rem; }
.final-cta h2 { font-size: clamp(1.7rem, 4vw, 2.6rem); letter-spacing: -0.025em; color: var(--ink); }
.final-cta p { margin-top: 0.7rem; color: var(--mut); line-height: 1.7; max-width: 34rem; }
.disclaimer { font-size: 0.72rem; color: var(--mut); opacity: 0.85; }
/* 進場：scroll reveal */
.srv { opacity: 0; transform: translateY(18px); transition: opacity 0.7s cubic-bezier(0.16,1,0.3,1), transform 0.7s cubic-bezier(0.16,1,0.3,1); }
.srv.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .srv { opacity: 1; transform: none; transition: none; } }

/* ── 內頁 design pass：日報 / 參考 / FAQ / 會員 ── */
.report-head { display: flex; align-items: baseline; gap: 1rem; flex-wrap: wrap; margin-top: 2rem; }
.report-date { font-family: var(--mono); font-size: 0.85rem; color: var(--accent); }
.signals { margin-top: 1.25rem; border-top: 1px solid var(--line); max-width: 44rem; }
.sig { display: grid; grid-template-columns: 1fr auto; gap: 0.8rem; padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--linef); }
.sig .n { color: var(--ink2); }
.sig .s { font-family: var(--mono); font-size: 0.8rem; }
.s.bull { color: var(--up); }
.s.bear { color: var(--down); }
.s.flat { color: var(--mut); }
.verdict { margin-top: 1.75rem; max-width: 44rem; }
.verdict h3 { font-size: 1.1rem; color: var(--ink); }
.verdict p { margin-top: 0.5rem; color: var(--mut); line-height: 1.8; }
/* 參考資訊 */
.ref-sec { margin-top: 2.5rem; max-width: 44rem; }
.ref-sec h2 { font-size: 1.3rem; letter-spacing: -0.015em; color: var(--ink); }
.ref-sec > p { margin-top: 0.6rem; color: var(--mut); line-height: 1.8; }
.ref-list { margin-top: 1rem; border-top: 1px solid var(--line); }
.ref-row { display: grid; grid-template-columns: minmax(7rem, auto) 1fr; gap: 1rem; padding: 0.75rem 0.2rem; border-bottom: 1px solid var(--linef); }
.ref-row .k { font-family: var(--mono); font-size: 0.8rem; color: var(--accent); padding-top: 0.15rem; }
.ref-row .v { color: var(--ink2); line-height: 1.7; }
.ref-row .v small { display: block; color: var(--mut); margin-top: 0.2rem; font-size: 0.85em; }
.notice {
  margin-top: 1rem;
  border-left: 2px solid var(--accent);
  padding: 0.7rem 1rem;
  color: var(--mut);
  line-height: 1.8;
  background: var(--panel);
  border-radius: 0 10px 10px 0;
}
/* FAQ accordion */
.faq-list { margin-top: 2rem; max-width: 44rem; border-top: 1px solid var(--line); }
.faq-list details { border-bottom: 1px solid var(--linef); }
.faq-list summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  padding: 1rem 0.2rem;
  color: var(--ink);
  font-weight: 600;
  transition: color 0.2s ease;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after { content: "+"; font-family: var(--mono); color: var(--mut); transition: transform 0.2s ease; }
.faq-list details[open] summary { color: var(--accent); }
.faq-list details[open] summary::after { content: "−"; color: var(--accent); }
.faq-list summary:hover { color: var(--accent); }
.faq-list .a { padding: 0 0.2rem 1.1rem; color: var(--mut); line-height: 1.8; max-width: 40rem; }
/* 會員專區 */
.member-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: 2rem; }
@media (max-width: 820px) { .member-grid { grid-template-columns: 1fr; } }
.mcard {
  border: 1px solid var(--linef);
  background: var(--panel);
  border-radius: 14px;
  padding: 1.5rem;
}
.mcard h2 { font-size: 1.25rem; color: var(--ink); letter-spacing: -0.015em; }
.mcard > p { margin-top: 0.6rem; color: var(--mut); line-height: 1.75; }
.mcard ul { margin: 0.9rem 0 0 1.1rem; color: var(--mut); line-height: 1.9; }
.gbtn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  margin-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink-on-accent);
  background: var(--accent);
  border: none;
  border-radius: 999px;
  padding: 0.7rem 1.4rem;
  cursor: not-allowed;
  opacity: 0.55;
}
.gbtn-note { margin-top: 0.6rem; font-family: var(--mono); font-size: 0.75rem; color: var(--mut); }
.coin { display: inline-block; width: 1em; height: 1em; border-radius: 50%; background: linear-gradient(145deg, var(--accent-2), var(--accent)); vertical-align: -0.12em; }
.balance { display: flex; align-items: baseline; gap: 0.5rem; margin-top: 1rem; }
.balance .num { font-family: var(--mono); font-size: 2.2rem; font-weight: 700; color: var(--ink); }
.balance .unit { color: var(--mut); font-size: 0.9rem; }
.nav-member { color: var(--accent) !important; }
