:root {
  color-scheme: dark;
  --bg: #0a141c;
  --surface: #101f29;
  --line: #29404b;
  --ink: #eff7f7;
  --muted: #a6bbc2;
  --accent: #81e3d5;
  font: 16px -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

* { box-sizing: border-box; }
body {
  min-width: 0;
  min-height: 100svh;
  margin: 0;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(ellipse at 6% 18%, #173940 0, transparent 47%),
    radial-gradient(ellipse at 94% 44%, #122833 0, transparent 44%),
    var(--bg);
}

.shell { width: min(1160px, calc(100% - 72px)); margin-inline: auto; }
.site-header {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid var(--line);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: var(--ink);
  text-decoration: none;
  font-size: 1.25rem;
  font-weight: 800;
  letter-spacing: .12em;
  line-height: 1.05;
}
.brand img { width: 42px; height: 42px; border-radius: 10px; }
.brand small { display: block; margin-top: 4px; color: var(--accent); font-size: .52rem; letter-spacing: .29em; }
.site-header nav { display: flex; align-items: center; gap: clamp(12px, 2.8vw, 30px); }
.site-header nav a {
  color: var(--muted);
  font-size: .88rem;
  font-weight: 650;
  text-decoration: none;
}
.site-header nav a:hover { color: var(--ink); }
.site-header .nav-access {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  gap: 9px;
  padding: 0 13px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
}
.nav-access span { color: var(--accent); }

main { flex: 1; }
.landing-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(310px, 1fr);
  grid-template-areas: "intro entry" "preview entry";
  column-gap: clamp(28px, 6.5vw, 92px);
  row-gap: 26px;
  align-items: center;
  padding-block: clamp(44px, 6vw, 78px) 40px;
}
.intro { grid-area: intro; }
.intro h1 {
  max-width: 12em;
  margin: 0;
  font-size: clamp(2.45rem, 5.4vw, 5rem);
  line-height: .99;
  letter-spacing: -.069em;
  font-weight: 770;
  text-wrap: balance;
}
.intro em { color: var(--accent); font-style: normal; }
p { margin: 8px 0 0; color: var(--muted); line-height: 1.55; }
.intro p { max-width: 40ch; margin-top: 19px; font-size: clamp(1rem, 1.4vw, 1.18rem); }

.market-preview {
  grid-area: preview;
  margin: 0;
  overflow: hidden;
  border: 1px solid #2a4852;
  border-radius: 17px;
  background: linear-gradient(155deg, #152d35, #0e1d26 70%);
  box-shadow: 0 15px 45px #030b1254;
}
.preview-heading {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 13px 15px 10px;
}
.preview-heading strong, .preview-heading small { display: block; }
.preview-heading strong { font-size: .85rem; letter-spacing: .04em; }
.preview-heading small { margin-top: 2px; color: var(--muted); font-size: .73rem; }
.asset-symbol {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  border: 1px solid #6b5436;
  border-radius: 9px;
  color: #f3d39c;
  background: #30291e;
  font-size: .78rem;
  font-weight: 750;
}
.preview-label { margin-left: auto; color: #bed0d2; font-size: .7rem; text-align: right; }
.market-chart { display: block; width: 100%; height: clamp(94px, 13vw, 149px); }
.chart-grid { fill: none; stroke: #2c454e; stroke-width: .7; }
.chart-fill { fill: url(#chart-shade); }
.chart-stop-top { stop-color: #68d4bd; stop-opacity: .24; }
.chart-stop-bottom { stop-color: #68d4bd; stop-opacity: 0; }
.chart-trend { fill: none; stroke: #88dbcd; stroke-width: 1.3; opacity: .47; vector-effect: non-scaling-stroke; }
.chart-wick, .chart-candle { fill: none; }
.chart-wick { stroke-width: 1.2; }
.chart-candle { stroke-width: 9; }
.market-chart .up { stroke: #84e0c2; }
.market-chart .down { stroke: #e88894; }
figcaption {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 12px;
  padding: 8px 15px 12px;
  border-top: 1px solid #29414a;
  color: var(--muted);
  font-size: .72rem;
}

.entry {
  grid-area: entry;
  scroll-margin-top: 20px;
  padding: clamp(22px, 3.2vw, 40px);
  border: 1px solid #36535d;
  border-radius: 20px;
  background: linear-gradient(163deg, #172c36 0, var(--surface) 58%);
  box-shadow: 0 20px 65px #020a116b;
}
.entry h1, .entry h2 { margin: 0; font-size: clamp(1.6rem, 2.5vw, 2rem); line-height: 1.12; letter-spacing: -.045em; }
.entry-icon {
  width: 43px;
  height: 43px;
  display: grid;
  place-items: center;
  margin-bottom: 15px;
  border: 1px solid #406965;
  border-radius: 10px;
  background: #1b373c;
  color: var(--accent);
}
.entry-icon svg, .features svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.65;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.entry p { font-size: .93rem; }
.entry label { display: block; margin: 18px 0 6px; font-size: .84rem; font-weight: 650; }
.entry input:not([type="hidden"]), .entry button {
  width: 100%;
  min-height: 46px;
  padding: 10px 13px;
  border-radius: 8px;
  font: inherit;
}
.entry input:not([type="hidden"]) {
  border: 1px solid #48606c;
  color: var(--ink);
  background: #0b1821;
}
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
.entry button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 23px;
  border: 0;
  background: var(--accent);
  color: #10272b;
  font-weight: 780;
  cursor: pointer;
}
.entry button:hover { background: #a6efe4; }
.entry .error, .entry .notice { margin-top: 13px; padding: 9px 12px; border-radius: 8px; }
.error { background: #402632; color: #ffd5dd; }
.notice { background: #203c48; color: #d0f3f1; }
.auth-link { display: inline-block; margin-top: 16px; color: #a7eadf; font-size: .88rem; text-underline-offset: 4px; }
.auth-links { display: flex; flex-wrap: wrap; gap: 0 18px; }
.entry .field-hint { margin-top: 6px; font-size: .82rem; }
#acesso:target { border-color: var(--accent); }

.features {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  margin-bottom: 27px;
  padding-block: 21px;
  border-block: 1px solid var(--line);
  scroll-margin-top: 18px;
}
.features article { display: flex; align-items: flex-start; gap: 10px; }
.features svg { flex: 0 0 21px; color: var(--accent); }
.features h2 { margin: 0; font-size: .95rem; line-height: 1.35; }
.features p { margin-top: 3px; font-size: .83rem; }
.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 6px 16px;
  padding-top: 4px;
  padding-bottom: 23px;
  color: var(--muted);
  font-size: .76rem;
}
.auth-only .landing-only { display: none; }
.auth-only .landing-grid { display: block; width: min(100%, 460px); margin-inline: auto; }

@media (max-width: 760px) {
  .shell { width: min(560px, calc(100% - 36px)); }
  .site-header { min-height: 68px; }
  .landing-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "intro" "entry" "preview";
    gap: 23px;
    padding-block: 31px;
  }
  .intro h1 { font-size: clamp(2.3rem, 8.1vw, 3.4rem); }
  .intro p { margin-top: 12px; }
  .entry-icon { display: none; }
  .features { grid-template-columns: 1fr; gap: 16px; }
}
@media (max-width: 365px) {
  .shell { width: calc(100% - 28px); }
  .site-header .nav-features { display: none; }
  .entry { padding: 19px; }
}
