:root {
  --bg: #06111a;
  --bg-soft: #0a1a26;
  --panel: #0d1e2a;
  --panel-2: #112839;
  --line: #1d3a4d;
  --line-soft: rgba(148, 163, 184, 0.16);
  --text: #e8f1f5;
  --muted: #93a9b8;
  --accent: #2dd4bf;
  --accent-2: #38bdf8;
  --green: #34d399;
  --red: #fb7185;
  --amber: #fbbf24;
  --radius: 18px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.32);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background:
    radial-gradient(circle at 12% 0%, rgba(45, 212, 191, 0.12), transparent 34%),
    radial-gradient(circle at 88% 12%, rgba(56, 189, 248, 0.1), transparent 32%),
    linear-gradient(180deg, var(--bg) 0%, var(--bg-soft) 100%);
  font-family: "Segoe UI", Inter, system-ui, -apple-system, BlinkMacSystemFont, Arial, sans-serif;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.wrap {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  border-bottom: 1px solid var(--line-soft);
  background: rgba(6, 17, 26, 0.88);
  backdrop-filter: blur(14px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 74px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: #04141b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 900;
  letter-spacing: -0.04em;
}

.brand-copy {
  display: flex;
  flex-direction: column;
  line-height: 1.1;
}

.brand-copy strong {
  font-size: 1.06rem;
}

.brand-copy small {
  color: var(--muted);
  font-size: 0.72rem;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 26px;
  color: var(--muted);
  font-size: 0.92rem;
}

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

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #04141b;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  font-weight: 750;
  transition: transform 0.16s ease, box-shadow 0.16s ease, opacity 0.16s ease;
}

.button:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 28px rgba(45, 212, 191, 0.2);
}

.button-small {
  padding: 9px 15px;
  font-size: 0.86rem;
}

.button-tiny {
  padding: 6px 11px;
  font-size: 0.78rem;
}

.button-full {
  width: 100%;
}

.button-secondary {
  color: var(--text);
  border-color: var(--line);
  background: rgba(255, 255, 255, 0.04);
}

.button-ghost {
  color: var(--muted);
  border-color: var(--line);
  background: transparent;
}

.button.buy {
  background: linear-gradient(135deg, var(--green), #22c55e);
}

.button.sell {
  color: #fff;
  background: linear-gradient(135deg, var(--red), #f43f5e);
}

.hero {
  display: grid;
  grid-template-columns: 1.25fr 0.75fr;
  align-items: center;
  gap: 54px;
  padding-top: 72px;
  padding-bottom: 52px;
}

.eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.hero h1 {
  max-width: 680px;
  margin: 0;
  font-size: clamp(2.5rem, 5.4vw, 4.25rem);
  line-height: 1.04;
  letter-spacing: -0.045em;
}

.hero h1 span {
  color: var(--accent);
}

.hero-lead {
  max-width: 620px;
  margin: 22px 0 0;
  color: var(--muted);
  font-size: 1.06rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 28px;
}

.hero-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 9px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 0.84rem;
}

.hero-meta .dot {
  color: var(--accent);
}

.hero-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: 24px;
  background: linear-gradient(155deg, rgba(17, 40, 57, 0.95), rgba(9, 23, 33, 0.95));
  box-shadow: var(--shadow);
}

.hero-card-top {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
}

.pulse {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(52, 211, 153, 0.12);
}

.hero-score {
  display: flex;
  align-items: baseline;
  gap: 12px;
  margin: 22px 0 18px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line-soft);
}

.hero-score strong {
  font-size: 3.2rem;
  line-height: 1;
  letter-spacing: -0.05em;
}

.hero-score span {
  color: var(--muted);
}

.hero-card-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  color: var(--muted);
  font-size: 0.9rem;
}

.hero-card-row strong {
  color: var(--text);
  font-weight: 650;
}

.hero-card-note {
  margin: 18px 0 0;
  padding-top: 14px;
  border-top: 1px solid var(--line-soft);
  color: var(--muted);
  font-size: 0.8rem;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 13px;
  padding: 15px 18px;
  border: 1px solid rgba(251, 191, 36, 0.28);
  border-radius: 14px;
  background: rgba(251, 191, 36, 0.07);
  color: #fde68a;
  font-size: 0.9rem;
}

.notice p {
  margin: 0;
}

.notice-icon {
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(251, 191, 36, 0.2);
  font-weight: 800;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-top: 16px;
}

.feature-strip article {
  padding: 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.feature-strip strong,
.feature-strip span {
  display: block;
}

.feature-strip strong {
  margin-bottom: 6px;
  font-size: 0.95rem;
}

.feature-strip span {
  color: var(--muted);
  font-size: 0.84rem;
}

.section {
  margin-top: 68px;
  scroll-margin-top: 92px;
}

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.section-head h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  letter-spacing: -0.03em;
}

.section-head p {
  margin: 8px 0 0;
  color: var(--muted);
}

.section-tag {
  padding: 7px 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.signal-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.signal-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: 100%;
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 16px;
  color: var(--text);
  background: var(--panel);
  text-align: left;
  transition: border-color 0.16s ease, transform 0.16s ease, background 0.16s ease;
}

.signal-card:hover {
  transform: translateY(-2px);
  border-color: rgba(45, 212, 191, 0.5);
}

.signal-card.is-active {
  border-color: var(--accent);
  background: linear-gradient(145deg, rgba(45, 212, 191, 0.12), var(--panel));
  box-shadow: 0 12px 32px rgba(45, 212, 191, 0.1);
}

.signal-top,
.signal-bottom {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.signal-code {
  font-weight: 800;
  letter-spacing: 0.04em;
}

.signal-name {
  color: var(--muted);
  font-size: 0.84rem;
}

.signal-bottom {
  margin-top: 4px;
  font-size: 0.94rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.badge.buy {
  color: #052e21;
  background: var(--green);
}

.badge.hold {
  color: #3b2a04;
  background: var(--amber);
}

.badge.reduce {
  color: #3f0713;
  background: var(--red);
}

.up {
  color: var(--green);
}

.down {
  color: var(--red);
}

.confidence-track {
  height: 5px;
  margin-top: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(148, 163, 184, 0.16);
}

.confidence-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--accent);
}

.confidence-fill.high {
  width: 84%;
}

.confidence-fill.mid {
  width: 60%;
}

.confidence-fill.low {
  width: 42%;
  background: var(--amber);
}

.workbench-grid,
.portfolio-grid {
  display: grid;
  grid-template-columns: 1.35fr 0.65fr;
  gap: 18px;
}

.panel {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(155deg, rgba(13, 30, 42, 0.96), rgba(9, 22, 32, 0.96));
  box-shadow: var(--shadow);
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.panel-head h2,
.trade-panel h2,
.portfolio-panel h2 {
  margin: 0;
  font-size: 1.32rem;
  letter-spacing: -0.02em;
}

.symbol-code {
  color: var(--muted);
  font-size: 0.84rem;
}

.price-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
}

.price-block strong {
  font-size: 1.7rem;
  letter-spacing: -0.03em;
}

.price-block span {
  font-size: 0.86rem;
}

.badge-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 18px 0 12px;
}

.confidence-label {
  color: var(--muted);
  font-size: 0.85rem;
}

.confidence-label strong {
  color: var(--text);
}

.chart-canvas {
  display: block;
  width: 100%;
  height: 260px;
  margin: 8px 0 18px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: rgba(4, 14, 21, 0.55);
}

.indicator-grid,
.level-grid,
.kpi-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
}

.indicator-grid > div,
.level-grid > div,
.kpi-grid > div {
  padding: 12px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.025);
}

.indicator-grid span,
.level-grid span,
.kpi-grid span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
}

.indicator-grid strong,
.level-grid strong,
.kpi-grid strong {
  font-size: 0.98rem;
}

.subhead {
  margin: 22px 0 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.reason-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.reason-list li {
  position: relative;
  padding-left: 18px;
  color: #cbd9e2;
  font-size: 0.88rem;
}

.reason-list li::before {
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
  content: "";
}

.status-chip {
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.74rem;
  white-space: nowrap;
}

.status-chip.local {
  color: #052e21;
  border-color: transparent;
  background: var(--green);
}

.status-chip.fallback {
  color: #3b2a04;
  border-color: transparent;
  background: var(--amber);
}

.explain-text {
  min-height: 132px;
  margin: 20px 0;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  color: #dbe8ef;
  background: rgba(4, 14, 21, 0.5);
  font-size: 0.92rem;
}

.switch-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: var(--muted);
  font-size: 0.86rem;
  cursor: pointer;
}

.switch-row input {
  margin-top: 3px;
  accent-color: var(--accent);
}

.code-block {
  display: grid;
  gap: 7px;
  margin: 16px 0;
  padding: 13px;
  border: 1px solid var(--line-soft);
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.25);
}

.code-block code {
  color: #a5f3fc;
  font-size: 0.8rem;
}

.fine-print {
  margin: 14px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.fine-print code {
  color: #a5f3fc;
}

.field-label {
  display: block;
  margin: 16px 0 6px;
  color: var(--muted);
  font-size: 0.8rem;
}

.trade-panel select,
.trade-panel input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  color: var(--text);
  background: rgba(4, 14, 21, 0.65);
  outline: none;
}

.trade-panel select:focus,
.trade-panel input:focus {
  border-color: var(--accent);
}

.button-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 20px;
}

.form-message {
  min-height: 22px;
  margin: 14px 0 0;
  font-size: 0.84rem;
}

.form-message.success {
  color: var(--green);
}

.form-message.error {
  color: var(--red);
}

.kpi-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 18px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.84rem;
}

th,
td {
  padding: 10px 8px;
  border-bottom: 1px solid var(--line-soft);
  text-align: right;
  white-space: nowrap;
}

th:first-child,
td:first-child {
  text-align: left;
}

th {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.history-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.history-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid var(--line-soft);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.83rem;
}

.history-list li > span:nth-child(2) {
  flex: 1;
}

.history-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.history-dot.buy {
  background: var(--green);
}

.history-dot.sell {
  background: var(--red);
}

.empty {
  color: var(--muted);
  font-style: italic;
}

.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
}

.how-grid article {
  padding: 22px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.025);
}

.how-grid span {
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
}

.how-grid h3 {
  margin: 10px 0 6px;
  font-size: 1.06rem;
}

.how-grid p {
  margin: 0;
  color: var(--muted);
  font-size: 0.87rem;
}

.site-footer {
  margin-top: 76px;
  padding: 30px 0 40px;
  border-top: 1px solid var(--line-soft);
  background: rgba(3, 10, 16, 0.6);
}

.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.footer-inner p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.footer-links {
  display: flex;
  gap: 18px;
  color: var(--muted);
  font-size: 0.86rem;
}

.footer-links a:hover {
  color: var(--accent);
}

.footer-note {
  width: 100%;
}

.noscript {
  padding: 16px;
  color: #fde68a;
  text-align: center;
}

@media (max-width: 980px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
    padding-top: 48px;
  }

  .hero-card {
    max-width: 520px;
  }

  .signal-cards,
  .how-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .workbench-grid,
  .portfolio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 680px) {
  .wrap {
    width: min(100% - 24px, 1180px);
  }

  .nav-links {
    display: none;
  }

  .header-inner {
    min-height: 64px;
  }

  .hero {
    padding-top: 38px;
  }

  .feature-strip,
  .signal-cards,
  .how-grid,
  .indicator-grid,
  .level-grid {
    grid-template-columns: 1fr;
  }

  .section {
    margin-top: 48px;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }

  .panel {
    padding: 18px;
  }

  .kpi-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .price-block strong {
    font-size: 1.35rem;
  }
}
