:root {
  color-scheme: light;
  --ink: #1d1d1f;
  --ink-soft: #6e6e73;
  --paper: #f5f5f7;
  --paper-strong: #ffffff;
  --sand: #e8e8ed;
  --teal: #1d1d1f;
  --teal-dark: #6e6e73;
  --sun: #f5f5f7;
  --coral: #3a3a3a;
  --mint: #d2d2d7;
  --sky: #bdbdbd;
  --line: rgba(29, 29, 31, 0.14);
  --accent: #0071e3;
  --accent-strong: #0077ed;
  --shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
  --shadow-soft: 0 10px 24px rgba(0, 0, 0, 0.08);
  --glass: rgba(255, 255, 255, 0.88);
  --radius: 18px;
  --max-width: 1200px;
}

html {
  scroll-behavior: smooth;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Manrope", "Helvetica Neue", "Helvetica", "Segoe UI", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, #f7f7f9 0%, #ffffff 45%, #f5f5f7 100%);
  min-height: 100vh;
  line-height: 1.6;
  overflow-x: hidden;
}

body.modal-open {
  overflow: hidden;
}

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

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

.atmosphere {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 10% 10%, rgba(0, 113, 227, 0.18), transparent 55%),
    radial-gradient(circle at 80% 12%, rgba(0, 0, 0, 0.05), transparent 60%),
    radial-gradient(circle at 70% 70%, rgba(0, 113, 227, 0.08), transparent 60%),
    radial-gradient(circle at 20% 85%, rgba(0, 0, 0, 0.04), transparent 55%);
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
  animation: drift 22s ease-in-out infinite alternate;
  opacity: 0.45;
}

.orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(16px);
  opacity: 0.18;
  mix-blend-mode: normal;
  background: radial-gradient(circle at 30% 30%, rgba(0, 113, 227, 0.35), rgba(255, 255, 255, 0));
  animation: float 16s ease-in-out infinite;
}

.orb-1 {
  width: 220px;
  height: 220px;
  top: 12%;
  left: 6%;
  background: radial-gradient(circle at 30% 30%, rgba(0, 113, 227, 0.25), rgba(255, 255, 255, 0));
  animation-duration: 18s;
}

.orb-2 {
  width: 320px;
  height: 320px;
  bottom: 12%;
  right: 8%;
  background: radial-gradient(circle at 40% 40%, rgba(0, 113, 227, 0.2), rgba(255, 255, 255, 0));
  animation-duration: 20s;
  animation-delay: -6s;
}

.orb-3 {
  width: 180px;
  height: 180px;
  top: 55%;
  right: 28%;
  background: radial-gradient(circle at 35% 35%, rgba(0, 113, 227, 0.18), rgba(255, 255, 255, 0));
  animation-duration: 16s;
  animation-delay: -3s;
}

.noise {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.02;
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.8' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.25'/%3E%3C/svg%3E");
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 2rem;
  padding: 1.2rem 6vw;
  background: rgba(255, 255, 255, 0.72);
  border-bottom: 1px solid rgba(29, 29, 31, 0.08);
  backdrop-filter: saturate(180%) blur(18px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.06);
}

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

.brand-mark {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: linear-gradient(180deg, #1d1d1f, #3a3a3a);
  color: #ffffff;
  font-weight: 700;
}

.brand-name {
  font-weight: 600;
  margin: 0;
}

.brand-tag {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.topnav {
  display: flex;
  gap: 1.5rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.topnav a {
  position: relative;
}

.topnav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--accent), rgba(0, 113, 227, 0.2));
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.2s ease;
}

.topnav a:hover::after {
  transform: scaleX(1);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  flex-wrap: wrap;
}

body:not([data-auth="ready"]) [data-auth-only] {
  display: none;
}

body[data-auth="ready"] [data-auth-only] {
  display: inline-flex;
}

body[data-auth="ready"] [data-guest-only] {
  display: none;
}

body[data-page="home"][data-auth="locked"] .dashboard {
  display: none;
}

main {
  position: relative;
  z-index: 1;
  padding: 2.5rem 6vw 5.5rem;
  max-width: var(--max-width);
  margin: 0 auto;
}

.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 3.5rem;
  padding: 2.5rem 0 4rem;
  align-items: center;
  animation: rise 0.9s ease-out both;
}

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

h1,
h2,
h3 {
  font-family: "Manrope", "Helvetica Neue", "Helvetica", "Segoe UI", sans-serif;
  margin: 0 0 1rem;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h1 {
  font-size: clamp(2.8rem, 4.2vw, 4.4rem);
  font-weight: 600;
}

h2 {
  font-size: clamp(2.2rem, 3.2vw, 3.2rem);
  font-weight: 600;
}

h3 {
  font-size: 1.35rem;
  font-weight: 600;
}

.lead {
  font-size: 1.15rem;
  color: var(--ink-soft);
  max-width: 620px;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin: 2rem 0 1.5rem;
}

.strategy-band {
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  overflow: hidden;
  width: fit-content;
  max-width: 100%;
  box-shadow: var(--shadow-soft);
}

.strategy-track {
  display: inline-flex;
  gap: 1.5rem;
  padding: 0.55rem 1.4rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.7rem;
  color: var(--ink-soft);
  animation: ticker 16s linear infinite;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  border: 1px solid transparent;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn-primary {
  background: linear-gradient(180deg, var(--accent-strong), var(--accent));
  color: #ffffff;
  box-shadow: 0 16px 32px rgba(0, 113, 227, 0.25);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 20px 40px rgba(0, 113, 227, 0.3);
}

.btn-ghost {
  border-color: rgba(29, 29, 31, 0.2);
  color: var(--ink);
  background: rgba(255, 255, 255, 0.9);
}

.btn-ghost:hover {
  background: rgba(0, 0, 0, 0.04);
}

.trust {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.trust-title {
  font-weight: 600;
  margin: 0;
}

.trust-text {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.hero-panel {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.product-hero {
  display: grid;
  place-items: center;
  padding: 0.5rem 0;
}

.device {
  position: relative;
  width: min(320px, 80vw);
  aspect-ratio: 9 / 19.5;
}

.device-glow {
  position: absolute;
  inset: -18%;
  background: radial-gradient(circle at 40% 30%, rgba(0, 113, 227, 0.25), transparent 60%);
  filter: blur(24px);
  opacity: 0.7;
  z-index: 0;
}

.device-frame {
  position: relative;
  z-index: 1;
  height: 100%;
  padding: 10px;
  border-radius: 36px;
  background: linear-gradient(180deg, #f5f5f7, #ffffff);
  border: 1px solid #d2d2d7;
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.16);
}

.device-screen {
  position: relative;
  height: 100%;
  border-radius: 28px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background:
    linear-gradient(160deg, rgba(0, 113, 227, 0.16), rgba(255, 255, 255, 0.9) 55%),
    linear-gradient(180deg, #f5f5f7, #ffffff);
  padding: 2.4rem 1.2rem 1.4rem;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
}

.device-notch {
  position: absolute;
  top: 10px;
  left: 50%;
  transform: translateX(-50%);
  width: 38%;
  height: 18px;
  border-radius: 0 0 18px 18px;
  background: #1d1d1f;
  z-index: 2;
  box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 0.2);
}

.screen-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.75rem;
  color: var(--ink-soft);
}

.screen-time {
  font-weight: 600;
  color: var(--ink);
}

.screen-status {
  width: 46px;
  height: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(29, 29, 31, 0.4), rgba(29, 29, 31, 0.15));
}

.screen-content {
  display: grid;
  gap: 0.9rem;
  padding-top: 1rem;
}

.screen-eyebrow {
  margin: 0;
  font-size: 0.65rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.screen-title {
  margin: 0;
  font-size: 1.4rem;
  font-weight: 600;
}

.screen-metrics {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.7rem;
}

.screen-metrics > div {
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 0.7rem;
  display: grid;
  gap: 0.2rem;
}

.screen-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--ink-soft);
}

.screen-value {
  font-size: 1.1rem;
  font-weight: 600;
}

.screen-progress {
  height: 6px;
  border-radius: 999px;
  background: rgba(0, 0, 0, 0.08);
  overflow: hidden;
}

.progress-bar {
  display: block;
  width: 68%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent), rgba(0, 113, 227, 0.6));
}

.screen-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.screen-chip {
  font-size: 0.65rem;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: rgba(255, 255, 255, 0.85);
  color: var(--ink-soft);
}

.panel-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
}

.panel-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 10%, rgba(0, 113, 227, 0.12), transparent 55%);
  opacity: 0.25;
  pointer-events: none;
}

.panel-card,
.workflow-grid article,
.connect-form,
.side-card,
details {
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.panel-card:hover,
.workflow-grid article:hover,
.side-card:hover,
details:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(0, 0, 0, 0.12);
}

.panel-title {
  margin: 0 0 1rem;
  font-weight: 600;
}

.panel-metric {
  display: flex;
  align-items: baseline;
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.metric-value {
  font-size: 2.2rem;
  font-weight: 700;
}

.metric-label {
  color: var(--ink-soft);
}

.panel-steps {
  display: grid;
  gap: 1.1rem;
}

.step-title {
  font-weight: 600;
  margin: 0;
}

.step-text {
  margin: 0.3rem 0 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.panel-highlight {
  padding: 1.4rem;
  background: rgba(0, 113, 227, 0.08);
  border-radius: var(--radius);
  border: 1px solid rgba(0, 113, 227, 0.2);
  font-weight: 600;
}

.section-head {
  max-width: 680px;
  margin-bottom: 2.5rem;
}

.workflow {
  padding: 3rem 0;
  animation: rise 1s ease-out both;
  animation-delay: 0.1s;
}

.workflow-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.5rem;
}

.workflow-grid article {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 1.5rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  min-height: 190px;
}

.signup {
  display: none;
  padding: 3rem 0;
  animation: rise 1s ease-out both;
  animation-delay: 0.2s;
}

.flow {
  display: grid;
  gap: 2rem;
}

.flow-steps {
  list-style: none;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  padding: 0.6rem;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: var(--shadow-soft);
}

.flow-steps li {
  flex: 1 1 160px;
  min-width: 140px;
}

.flow-step {
  width: 100%;
  border-radius: 999px;
  border: 1px solid transparent;
  padding: 0.55rem 0.9rem;
  background: transparent;
  font-weight: 600;
  font-family: inherit;
  text-align: center;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  flex: 1 1 160px;
  color: var(--ink-soft);
}

.flow-step.is-active {
  background: #1d1d1f;
  color: #ffffff;
  border-color: transparent;
  box-shadow: 0 14px 28px rgba(0, 0, 0, 0.18);
}

.flow-step:hover:not(.is-active) {
  background: rgba(0, 0, 0, 0.04);
  color: var(--ink);
}

.flow-panels {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.flow-panel {
  display: none;
}

.flow-panel.is-active {
  display: grid;
  gap: 1.2rem;
}

.flow-form {
  display: grid;
  gap: 1.2rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.flow-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.profiles {
  padding: 3rem 0;
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  align-items: start;
}

.profile-quiz,
.profile-result {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

.profile-quiz form {
  display: grid;
  gap: 1.4rem;
}

.quiz-step {
  border: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.6rem;
}

.quiz-step legend {
  font-weight: 600;
  margin-bottom: 0.3rem;
}

.quiz-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  border-radius: 12px;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.quiz-option:hover {
  transform: translateY(-1px);
  border-color: rgba(29, 29, 31, 0.35);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.08);
}

.quiz-option input {
  accent-color: var(--accent);
}

.profile-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin-top: 0.6rem;
}

.profile-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.12);
  font-weight: 600;
  font-size: 0.8rem;
}

.profile-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
  margin-top: 2rem;
}

.profile-card {
  background: rgba(255, 255, 255, 0.95);
  border-radius: var(--radius);
  padding: 1.4rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.6rem;
}

.profile-card ul {
  margin: 0.4rem 0 0;
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.dashboard {
  position: relative;
  margin-top: 3rem;
  padding: 2.5rem;
  border-radius: 32px;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
  overflow: hidden;
}

.dashboard-content {
  display: grid;
  gap: 3rem;
}

.dashboard-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background: rgba(245, 245, 247, 0.92);
  backdrop-filter: blur(8px);
  z-index: 3;
}

.dashboard[data-auth="locked"] .dashboard-content {
  filter: blur(1px) saturate(0.9);
  pointer-events: none;
  user-select: none;
}

.dashboard[data-auth="ready"] .dashboard-overlay {
  display: none;
}

.overlay-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  text-align: center;
  max-width: 420px;
}

.overlay-title {
  margin: 0 0 0.6rem;
  font-weight: 600;
}

.overlay-text {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.modal.is-open {
  display: flex;
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(245, 245, 247, 0.78);
  backdrop-filter: blur(10px);
}

.modal-card {
  position: relative;
  z-index: 1;
  width: min(420px, 92vw);
  background: rgba(255, 255, 255, 0.96);
  border-radius: 22px;
  border: 1px solid var(--line);
  padding: 1.8rem;
  box-shadow: var(--shadow);
  display: grid;
  gap: 1rem;
}

.modal-step {
  display: none;
  gap: 1rem;
}

.modal-card[data-register-step="1"] .modal-step[data-step="1"],
.modal-card[data-register-step="2"] .modal-step[data-step="2"] {
  display: grid;
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.modal-header h3 {
  margin: 0;
}

.modal-close {
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.9);
  border-radius: 999px;
  padding: 0.35rem 0.8rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
}

.modal-close:hover {
  background: rgba(0, 0, 0, 0.04);
}

.account,
.exchanges {
  padding: 2rem 0;
}

.account-overview {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  margin: 1.5rem 0 2rem;
}

.overview-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: var(--radius);
  padding: 1.4rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 0.4rem;
}

.overview-card.main {
  grid-column: span 2;
  background: linear-gradient(140deg, rgba(255, 255, 255, 0.98), rgba(0, 113, 227, 0.08));
}

.overview-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.7rem;
  color: var(--ink-soft);
}

.overview-label {
  margin: 0;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.overview-value {
  margin: 0;
  font-size: 1.1rem;
  font-weight: 600;
}

.overview-text {
  margin: 0;
  color: var(--ink-soft);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.settings-card {
  background: rgba(255, 255, 255, 0.94);
  border-radius: var(--radius);
  padding: 1.6rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
  display: grid;
  gap: 1rem;
}

.settings-card h3 {
  margin: 0;
}

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

.exchange-grid {
  display: grid;
  grid-template-columns: minmax(220px, 260px) 1fr;
  gap: 2rem;
  align-items: start;
}

.exchange-list {
  display: grid;
  gap: 1rem;
}

.exchange-card {
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 1rem;
  background: rgba(255, 255, 255, 0.94);
  text-align: left;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-soft);
}

.exchange-card.is-active {
  border-color: rgba(0, 0, 0, 0.35);
  box-shadow: var(--shadow);
}

.exchange-card:hover {
  transform: translateY(-2px);
}

.exchange-name {
  margin: 0;
  font-weight: 600;
}

.exchange-desc {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.exchange-panel {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
  background: rgba(255, 255, 255, 0.96);
  box-shadow: var(--shadow);
  display: none;
}

.exchange-panel.is-active {
  display: grid;
  gap: 1rem;
}

.exchange-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.7rem;
  border-radius: 999px;
  background: rgba(0, 113, 227, 0.12);
  font-weight: 600;
  font-size: 0.8rem;
}

.exchange-note {
  margin: 0;
  font-weight: 600;
  color: var(--accent);
}

.settings-form.is-linked [data-exchange-keys] {
  display: none;
}

.settings-form.is-linked .flow-actions {
  display: none;
}

.connect {
  padding: 3rem 0;
  animation: rise 1s ease-out both;
  animation-delay: 0.2s;
}

.connect-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
}

.connect-form {
  background: rgba(255, 255, 255, 0.92);
  border-radius: var(--radius);
  padding: 2rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.2rem;
  backdrop-filter: blur(12px);
}

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

.field.full {
  grid-column: 1 / -1;
}

label {
  font-weight: 600;
  font-size: 0.95rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="tel"],
select {
  padding: 0.8rem 0.9rem;
  border-radius: 12px;
  border: 1px solid #d2d2d7;
  font-size: 1rem;
  font-family: inherit;
  background-color: #fff;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input[readonly] {
  background: rgba(245, 245, 247, 0.9);
  color: var(--ink-soft);
}

input:focus,
select:focus {
  outline: 2px solid rgba(0, 113, 227, 0.25);
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(0, 113, 227, 0.12);
}

select {
  appearance: none;
  padding-right: 2.6rem;
  background-image:
    linear-gradient(45deg, transparent 50%, rgba(29, 29, 31, 0.6) 50%),
    linear-gradient(135deg, rgba(29, 29, 31, 0.6) 50%, transparent 50%);
  background-position: calc(100% - 18px) 50%, calc(100% - 12px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
}

.helper,
.form-note {
  margin: 0;
  font-size: 0.9rem;
  color: var(--ink-soft);
}

.helper-title {
  font-weight: 600;
  margin: 0 0 0.4rem;
}

.check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.status {
  grid-column: 1 / -1;
  min-height: 1.5rem;
  font-weight: 600;
}

.status[data-state="success"] {
  color: #1d1d1f;
}

.status[data-state="info"] {
  color: var(--accent);
}

.status[data-state="warning"] {
  color: #b15c00;
}

.status[data-state="error"] {
  color: #c6272f;
}

.connect-side {
  display: grid;
  gap: 1.5rem;
}

.side-card {
  padding: 1.6rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
}

.side-card ul {
  padding-left: 1.2rem;
  margin: 1rem 0 0;
}

.side-card.outline {
  background: transparent;
  border: 1px solid var(--line);
}

.faq {
  padding: 3rem 0 1rem;
  animation: rise 1s ease-out both;
  animation-delay: 0.3s;
}

.faq-grid {
  display: grid;
  gap: 1rem;
  max-width: 760px;
}

details {
  background: rgba(255, 255, 255, 0.95);
  border-radius: 16px;
  padding: 1rem 1.3rem;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-soft);
}

summary {
  font-weight: 600;
  cursor: pointer;
}

.footer {
  text-align: center;
  padding: 2rem 1rem 3rem;
  color: var(--ink-soft);
  border-top: 1px solid rgba(29, 29, 31, 0.08);
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(20px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes drift {
  from {
    transform: translate3d(-10px, -6px, 0);
  }
  to {
    transform: translate3d(12px, 8px, 0);
  }
}

@keyframes float {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
  }
  50% {
    transform: translate3d(12px, -18px, 0) scale(1.05);
  }
}

@keyframes ticker {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

@media (max-width: 860px) {
  .topbar {
    grid-template-columns: 1fr;
    justify-items: start;
  }

  .topnav {
    flex-wrap: wrap;
    gap: 0.6rem;
  }

  .topnav a {
    padding: 0.35rem 0.7rem;
    border-radius: 999px;
    border: 1px solid var(--line);
    background: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
  }

  .topnav a::after {
    display: none;
  }

  .topbar-actions {
    width: 100%;
    justify-content: flex-start;
  }

  main {
    padding: 2rem 6vw 4rem;
  }

  .hero {
    gap: 2rem;
  }

  .dashboard {
    padding: 1.5rem;
  }

  .overview-card.main {
    grid-column: span 1;
  }

  .strategy-track {
    animation-duration: 22s;
  }

  .exchange-grid {
    grid-template-columns: 1fr;
  }

  .device {
    width: min(280px, 90vw);
  }
}

@media (max-width: 600px) {
  .form-grid {
    grid-template-columns: 1fr;
  }

  .modal-card {
    padding: 1.4rem;
  }

  .modal-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

@media (prefers-reduced-motion: reduce) {
  * {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
