:root {
  --ink: #13231d;
  --muted: #65716c;
  --line: #d8dedb;
  --surface: #ffffff;
  --soft: #f3f6f4;
  --green: #0b6846;
  --green-strong: #075038;
  --blue: #245fae;
  --gold: #c48b17;
  --red: #a23c3c;
  --shadow: 0 14px 34px rgba(24, 48, 39, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--surface);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 16px;
  line-height: 1.5;
  letter-spacing: 0;
}

a {
  color: inherit;
}

button,
input {
  font: inherit;
  letter-spacing: 0;
}

button,
.button {
  min-height: 44px;
}

.app-shell {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
}

.app-header {
  position: sticky;
  z-index: 20;
  top: 0;
  border-bottom: 1px solid rgba(216, 222, 219, 0.85);
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(14px);
}

.app-header__inner {
  display: flex;
  min-height: 68px;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--green-strong);
  font-weight: 800;
  text-decoration: none;
}

.brand__mark {
  display: block;
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  border-radius: 50%;
  object-fit: contain;
  box-shadow: 0 5px 13px rgba(6, 74, 56, 0.16);
}

.app-header__actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.plan-badge {
  padding: 5px 9px;
  border: 1px solid #b6d5c8;
  border-radius: 4px;
  color: var(--green-strong);
  background: #ebf6f1;
  font-size: 0.75rem;
  font-weight: 800;
}

.plan-badge.is-pro {
  border-color: #d3a12f;
  color: #493400;
  background: #f8d985;
}

.whatsapp-float {
  position: fixed;
  z-index: 45;
  right: 22px;
  bottom: 22px;
  display: grid;
  width: 60px;
  height: 60px;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.96);
  border-radius: 50%;
  background: #20c968;
  color: #ffffff;
  text-decoration: none;
  box-shadow: 0 12px 30px rgba(10, 94, 48, 0.3);
  transition: transform 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.whatsapp-float:hover,
.whatsapp-float:focus-visible {
  transform: translateY(-2px) scale(1.03);
  background: #159a50;
  box-shadow: 0 16px 34px rgba(10, 94, 48, 0.38);
}

.whatsapp-float:focus-visible {
  outline: 3px solid rgba(36, 95, 174, 0.35);
  outline-offset: 3px;
}

.whatsapp-float__icon {
  display: block;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.whatsapp-float__label {
  position: absolute;
  right: calc(100% + 10px);
  padding: 8px 11px;
  border: 1px solid rgba(17, 32, 27, 0.1);
  border-radius: 9px;
  background: #ffffff;
  color: #24463a;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
  box-shadow: 0 9px 22px rgba(17, 32, 27, 0.13);
}

.is-hidden {
  display: none !important;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 11px 16px;
  border: 1px solid transparent;
  border-radius: 6px;
  cursor: pointer;
  font-weight: 750;
  text-align: center;
  text-decoration: none;
}

.button--small {
  min-height: 38px;
  padding: 8px 13px;
  font-size: 0.9rem;
}

.button--primary {
  color: #fff;
  background: var(--green);
}

.button--primary:hover {
  background: var(--green-strong);
}

.button--quiet {
  border-color: #b9c5c0;
  color: var(--green-strong);
  background: #fff;
}

.button--accent {
  color: #14221d;
  background: #f4c65d;
}

.app-band {
  padding: 58px 0;
  border-bottom: 1px solid #e6ebe8;
}

.app-band--intro {
  padding-top: 48px;
  background:
    linear-gradient(120deg, rgba(236, 247, 241, 0.92), rgba(248, 249, 248, 0.96)),
    #f7f9f8;
}

.app-band--muted {
  background: var(--soft);
}

.app-band--pro {
  color: #fff;
  background: #132b22;
}

.page-heading,
.section-heading,
.tool-layout,
.pro-layout {
  display: grid;
  align-items: start;
  gap: 28px;
}

.page-heading {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
}

.section-heading {
  grid-template-columns: minmax(0, 1fr) minmax(260px, 430px);
  margin-bottom: 26px;
}

.section-heading > p {
  margin-top: 28px;
  color: var(--muted);
}

.tool-layout {
  grid-template-columns: minmax(0, 0.85fr) minmax(340px, 1.15fr);
}

.pro-layout {
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, 0.9fr) auto;
  align-items: center;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.78rem;
  font-weight: 850;
  text-transform: uppercase;
}

.app-band--pro .eyebrow {
  color: #86dfba;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  max-width: 700px;
  margin-bottom: 12px;
  font-size: clamp(2.7rem, 4vw, 3.2rem);
  line-height: 1.04;
}

h2 {
  margin-bottom: 10px;
  font-size: clamp(1.75rem, 2.6vw, 2.15rem);
  line-height: 1.12;
}

.page-heading p,
.tool-layout > div > p,
.pro-layout p {
  max-width: 720px;
  color: var(--muted);
}

.app-band--pro p {
  color: #cbd8d3;
}

.base-status {
  padding: 18px 20px;
  border: 1px solid #cbd8d2;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.82);
  box-shadow: var(--shadow);
}

.base-status span,
.base-status strong,
.base-status small {
  display: block;
}

.base-status span {
  color: var(--muted);
  font-size: 0.8rem;
}

.base-status strong {
  margin: 3px 0;
  font-size: 1.18rem;
}

.base-status small {
  color: var(--muted);
}

.summary-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 34px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.summary-strip > div {
  padding: 20px 22px;
  border-right: 1px solid var(--line);
}

.summary-strip > div:last-child {
  border-right: 0;
}

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

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

.summary-strip strong {
  margin: 2px 0;
  font-size: 1.65rem;
}

.summary-strip small {
  color: var(--muted);
}

.segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 4px;
  max-width: 680px;
  margin-bottom: 18px;
  padding: 4px;
  border-radius: 8px;
  background: #edf1ef;
}

.segmented button {
  min-height: 42px;
  padding: 8px 12px;
  border: 0;
  border-radius: 5px;
  color: #4c5b55;
  background: transparent;
  cursor: pointer;
  font-weight: 700;
}

.segmented button.is-active {
  color: var(--green-strong);
  background: #fff;
  box-shadow: 0 1px 5px rgba(25, 48, 40, 0.1);
}

.ranking-panel,
.performance-table {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.ranking-row {
  display: grid;
  grid-template-columns: 62px minmax(180px, 1.5fr) minmax(100px, 0.65fr) minmax(130px, 0.75fr) 42px;
  align-items: center;
  gap: 18px;
  min-height: 82px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e9e7;
}

.ranking-row:last-child {
  border-bottom: 0;
}

.rank-position {
  color: var(--green);
  font-size: 1.25rem;
  font-weight: 850;
}

.asset-identity,
.ticker-card__identity {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 12px;
}

.asset-name,
.ticker-card__identity > div {
  min-width: 0;
}

.asset-logo {
  position: relative;
  display: inline-flex;
  width: 40px;
  height: 40px;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid #d9e2de;
  border-radius: 9px;
  background: #f3f7f5;
  color: var(--green-strong);
  box-shadow: 0 2px 7px rgba(17, 32, 27, 0.08);
}

.asset-logo--compact {
  width: 28px;
  height: 28px;
  flex-basis: 28px;
  border-radius: 7px;
}

.asset-logo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  padding: 4px;
  object-fit: contain;
  background: transparent;
  opacity: 0;
}

.asset-logo.has-image img {
  background: #fff;
  opacity: 1;
}

.asset-logo.has-image.asset-logo--dark-backdrop img {
  background: var(--green-strong);
}

.asset-logo__fallback {
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: -0.03em;
}

.asset-logo.has-image .asset-logo__fallback {
  visibility: hidden;
}

.asset-name strong,
.asset-name small,
.metric strong,
.metric small {
  display: block;
}

.asset-name strong {
  font-size: 1.1rem;
}

.asset-name small,
.metric small {
  overflow: hidden;
  color: var(--muted);
  text-overflow: ellipsis;
  white-space: nowrap;
}

.metric strong {
  font-size: 1rem;
}

.watch-button {
  width: 40px;
  height: 40px;
  border: 1px solid #c8d1cd;
  border-radius: 6px;
  color: var(--green);
  background: #fff;
  cursor: pointer;
  font-size: 1.15rem;
}

.watch-button.is-active {
  color: #fff;
  background: var(--green);
}

.section-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 18px;
}

.ticker-tool {
  margin-top: 24px;
}

.ticker-tool label {
  display: block;
  margin-bottom: 7px;
  font-weight: 750;
}

.ticker-tool > div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
}

.ticker-tool input {
  width: 100%;
  min-height: 48px;
  padding: 10px 13px;
  border: 1px solid #b9c4bf;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.ticker-tool input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(11, 104, 70, 0.12);
}

.ticker-tool small {
  display: block;
  margin-top: 7px;
  color: var(--muted);
}

.ticker-result {
  min-height: 250px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.empty-state {
  display: flex;
  min-height: 110px;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  padding: 24px;
  color: var(--muted);
}

.ticker-card {
  padding: 24px;
}

.ticker-card__head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding-bottom: 18px;
  border-bottom: 1px solid var(--line);
}

.ticker-card__head h3 {
  margin-bottom: 2px;
  font-size: 1.65rem;
}

.ticker-card__head p {
  color: var(--muted);
}

.score-badge {
  min-width: 72px;
  padding: 8px 10px;
  border-radius: 6px;
  color: #fff;
  background: var(--green);
  text-align: center;
}

.score-badge span,
.score-badge strong {
  display: block;
}

.score-badge span {
  font-size: 0.7rem;
  text-transform: uppercase;
}

.score-badge strong {
  font-size: 1.35rem;
}

.ticker-facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin: 18px 0;
}

.ticker-facts div {
  padding: 12px;
  border-left: 3px solid #c7d7d0;
  background: #f7f9f8;
}

.ticker-facts span,
.ticker-facts strong {
  display: block;
}

.ticker-facts span {
  color: var(--muted);
  font-size: 0.75rem;
}

.performance-row {
  display: grid;
  grid-template-columns: minmax(170px, 1fr) repeat(3, minmax(110px, 0.72fr)) minmax(170px, 0.9fr);
  align-items: center;
  gap: 15px;
  min-height: 82px;
  padding: 14px 18px;
  border-bottom: 1px solid #e5e9e7;
}

.performance-row:last-child {
  border-bottom: 0;
}

.performance-row strong,
.performance-row small,
.performance-row span {
  display: block;
}

.performance-row small,
.performance-row span {
  color: var(--muted);
}

.comparison {
  padding: 7px 9px;
  border-radius: 5px;
  font-size: 0.88rem;
  font-weight: 750;
}

.comparison--positive {
  color: #075439;
  background: #e5f4ec;
}

.comparison--negative {
  color: #8b3030;
  background: #f9eaea;
}

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

.feature-list li {
  position: relative;
  padding-left: 20px;
  color: #dae5e0;
}

.feature-list li::before {
  position: absolute;
  left: 0;
  color: #75d6ae;
  content: "✓";
}

.app-footer {
  padding: 28px 0 90px;
  color: #5e6d67;
  background: #f4f6f5;
  font-size: 0.86rem;
}

.app-footer .app-shell {
  display: flex;
  justify-content: space-between;
  gap: 30px;
}

.app-footer p {
  max-width: 760px;
  margin: 0;
}

.app-footer nav {
  display: flex;
  gap: 16px;
}

.mobile-nav {
  display: none;
}

.account-dialog {
  width: min(620px, calc(100% - 28px));
  max-height: min(820px, calc(100dvh - 32px));
  padding: 0;
  overflow: auto;
  border: 1px solid #cbd6d1;
  border-radius: 8px;
  color: var(--ink);
  background: #fff;
  box-shadow: 0 24px 80px rgba(12, 35, 26, 0.28);
}

.account-dialog::backdrop {
  background: rgba(10, 27, 21, 0.58);
  backdrop-filter: blur(3px);
}

.account-dialog__head {
  position: sticky;
  z-index: 2;
  top: 0;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px 16px;
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.98);
}

.account-dialog__head h2 {
  margin: 0;
  font-size: 1.65rem;
}

.icon-button {
  display: inline-grid;
  width: 42px;
  min-height: 42px;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
  cursor: pointer;
  font-size: 1.5rem;
  line-height: 1;
}

.account-status {
  display: none;
  margin: 16px 24px 0;
  padding: 11px 13px;
  border: 1px solid #bed2c9;
  border-radius: 6px;
  color: #25473a;
  background: #edf7f2;
  font-size: 0.9rem;
}

.account-status.is-visible {
  display: block;
}

.account-status.is-warning {
  border-color: #e4c782;
  color: #604811;
  background: #fff8e7;
}

.account-status.is-success {
  border-color: #8dc6ad;
  color: #075038;
  background: #e8f8f0;
}

.account-step {
  padding: 22px 24px 26px;
}

form.account-step {
  display: grid;
  gap: 12px;
}

.account-step > p {
  color: var(--muted);
}

.account-step label {
  font-weight: 750;
}

.account-step input {
  width: 100%;
  min-height: 48px;
  padding: 10px 12px;
  border: 1px solid #bfcac5;
  border-radius: 6px;
  color: var(--ink);
  background: #fff;
}

.account-step input:focus {
  border-color: var(--green);
  outline: 3px solid rgba(11, 104, 70, 0.14);
}

.account-step small {
  color: var(--muted);
}

.text-button {
  min-height: 36px;
  padding: 4px 0;
  border: 0;
  color: var(--green);
  background: transparent;
  cursor: pointer;
  font-weight: 750;
  text-align: left;
  text-decoration: underline;
}

.account-summary {
  display: grid;
  grid-template-columns: 1.4fr 0.7fr 1fr;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 7px;
}

.account-summary > div {
  min-width: 0;
  padding: 14px;
  border-right: 1px solid var(--line);
}

.account-summary > div:last-child {
  border-right: 0;
}

.account-summary span,
.account-summary strong {
  display: block;
}

.account-summary span {
  color: var(--muted);
  font-size: 0.78rem;
}

.account-summary strong {
  overflow: hidden;
  margin-top: 2px;
  text-overflow: ellipsis;
}

.account-upgrade,
.account-pro {
  margin-top: 18px;
  padding: 18px;
  border: 1px solid #c9d9d2;
  border-radius: 7px;
  background: #f2f8f5;
}

.account-pro {
  border-color: #d7bd73;
  background: #fff9e8;
}

.account-upgrade h3,
.account-pro h3 {
  margin-bottom: 5px;
}

.account-upgrade p,
.account-pro p {
  margin-bottom: 14px;
  color: var(--muted);
}

.plan-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 9px;
  margin-top: 10px;
}

.account-secondary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: 18px;
}

.account-secondary a {
  color: var(--green);
  font-weight: 700;
}

@media (max-width: 840px) {
  .page-heading h1 {
    font-size: 2.7rem;
  }

  .section-heading h2 {
    font-size: 2rem;
  }

  .app-shell {
    width: min(100% - 28px, 680px);
  }

  .page-heading,
  .section-heading,
  .tool-layout,
  .pro-layout {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 5px;
  }

  .section-heading > p {
    margin-top: 0;
  }

  .summary-strip {
    grid-template-columns: 1fr;
  }

  .summary-strip > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .summary-strip > div:last-child {
    border-bottom: 0;
  }

  .ranking-row {
    grid-template-columns: 46px minmax(0, 1fr) 42px;
    gap: 12px;
  }

  .ranking-row .metric {
    grid-column: 2;
  }

  .ranking-row .watch-button {
    grid-row: 1;
    grid-column: 3;
  }

  .performance-row {
    grid-template-columns: 1fr 1fr;
  }

  .performance-row > div:first-child,
  .performance-row .comparison {
    grid-column: 1 / -1;
  }

  .app-footer .app-shell {
    flex-direction: column;
  }

  .account-summary {
    grid-template-columns: 1fr;
  }

  .account-summary > div {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .account-summary > div:last-child {
    border-bottom: 0;
  }
}

@media (max-width: 600px) {
  body {
    padding-bottom: 66px;
  }

  .app-header__inner {
    min-height: 60px;
  }

  .brand__mark {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
  }

  .whatsapp-float {
    right: 14px;
    bottom: calc(80px + env(safe-area-inset-bottom));
    width: 54px;
    height: 54px;
  }

  .whatsapp-float__icon {
    width: 40px;
    height: 40px;
  }

  .whatsapp-float__label {
    display: none;
  }

  .brand span:last-child {
    font-size: 0.94rem;
  }

  .plan-badge {
    display: none;
  }

  .button--small {
    min-height: 36px;
    padding: 7px 11px;
    font-size: 0.82rem;
  }

  .app-header__actions {
    gap: 6px;
  }

  .app-header__actions .button--quiet {
    border: 0;
    padding-right: 5px;
    padding-left: 5px;
  }

  .app-band {
    padding: 40px 0;
  }

  .app-band--intro {
    padding-top: 32px;
  }

  h1 {
    font-size: 2.15rem;
  }

  h2 {
    font-size: 1.7rem;
  }

  .segmented {
    grid-template-columns: repeat(2, 1fr);
    max-width: none;
  }

  .ranking-row {
    padding: 14px;
  }

  .asset-name small,
  .metric small {
    white-space: normal;
  }

  .section-actions,
  .section-actions .button {
    width: 100%;
  }

  .ticker-tool > div {
    grid-template-columns: 1fr;
  }

  .ticker-facts {
    grid-template-columns: 1fr;
  }

  .ticker-card__head {
    align-items: center;
  }

  .app-footer {
    padding-bottom: 30px;
  }

  .app-footer nav {
    flex-wrap: wrap;
  }

  .account-dialog {
    width: calc(100% - 18px);
    max-height: calc(100dvh - 18px);
  }

  .account-dialog__head {
    padding: 18px 17px 14px;
  }

  .account-dialog__head h2 {
    font-size: 1.42rem;
  }

  .account-status {
    margin-right: 17px;
    margin-left: 17px;
  }

  .account-step {
    padding: 18px 17px 22px;
  }

  .plan-actions {
    grid-template-columns: 1fr;
  }

  .account-secondary {
    align-items: flex-start;
    flex-direction: column;
  }

  .mobile-nav {
    position: fixed;
    z-index: 30;
    right: 0;
    bottom: 0;
    left: 0;
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    min-height: 64px;
    border-top: 1px solid #d1d9d5;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: 0 -8px 24px rgba(17, 40, 31, 0.08);
  }

  .mobile-nav a {
    display: flex;
    min-width: 0;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 2px;
    color: #627069;
    font-size: 0.66rem;
    font-weight: 700;
    text-decoration: none;
  }

  .mobile-nav a span {
    color: var(--green);
    font-size: 1rem;
  }

  .mobile-nav a.is-active {
    color: var(--green-strong);
    background: #f0f7f4;
  }
}
