:root {
  --screen-bg: #fbfaf8;
  --ink: #1a1a1a;
  --ink-soft: #4a4a4a;
  --rule: #dcdad5;
  --surface: #f1f0ed;
  --surface-hover: #e9e8e4;
  --input-bg: #ffffff;
  --overlay: rgba(0, 0, 0, 0.5);
  --accent-positive: #2f8f5b;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
  --sans: "Plus Jakarta Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --nav-height: 56px;
}

:root[data-theme="dark"] {
  --screen-bg: #16151a;
  --ink: #f0efe9;
  --ink-soft: #a8a6a0;
  --rule: #35333a;
  --surface: #211f26;
  --surface-hover: #2b2932;
  --input-bg: #211f26;
  --overlay: rgba(0, 0, 0, 0.65);
  --accent-positive: #4bb37c;
}

.site-nav {
  align-items: center;
  background: color-mix(in srgb, var(--screen-bg) 94%, transparent);
  border-top: 1px solid var(--rule);
  bottom: 0;
  display: flex;
  gap: 2px;
  justify-content: center;
  left: 0;
  min-height: var(--nav-height);
  padding: 6px 12px env(safe-area-inset-bottom, 0px);
  position: fixed;
  right: 0;
  z-index: 20;
}

.has-site-nav {
  padding-bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px));
}

.site-nav-link {
  border-radius: 999px;
  color: var(--ink-soft);
  flex: 1;
  font-size: 12px;
  min-width: 0;
  overflow: hidden;
  padding: 8px 6px;
  text-align: center;
  text-overflow: ellipsis;
  text-decoration: none;
  white-space: nowrap;
}

.site-nav-link:hover,
.site-nav-link.active {
  background: var(--surface);
  color: var(--ink);
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

html, body {
  height: 100%;
}

body {
  margin: 0;
  background: var(--screen-bg);
  background-image:
    radial-gradient(ellipse at 50% -10%, color-mix(in srgb, var(--ink) 4%, transparent), transparent 60%),
    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.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.035'/%3E%3C/svg%3E");
  background-attachment: fixed;
  font-family: var(--sans);
  min-height: 100vh;
}

.stage {
  width: 100%;
  min-height: 100vh;
}

.screen {
  position: relative;
  width: 100%;
  min-height: 100vh;
  background: var(--screen-bg);
  display: flex;
  flex-direction: column;
}

/* Content */
.content {
  flex: 1;
  width: 100%;
  max-width: 420px;
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: clamp(56px, 10vh, 96px) 24px 48px;
}

.logo {
  display: inline-block;
  height: 72px;
  aspect-ratio: 2218 / 3820;
  background-color: currentColor;
  mask: url("assets/logo.svg") center / contain no-repeat;
  -webkit-mask: url("assets/logo.svg") center / contain no-repeat;
  margin-bottom: 28px;
}

.headline {
  font-family: var(--serif);
  font-weight: 700;
  font-size: 38px;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 22px;
  letter-spacing: -0.3px;
}

.landing-heading {
  margin-bottom: 10px;
}

.landing-subheading {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 22px;
  font-weight: 500;
  line-height: 1.25;
  margin: 0 0 18px;
}

.subtext {
  font-family: var(--sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink-soft);
  max-width: 300px;
  margin: 0 0 32px;
}

.cta {
  font-family: var(--sans);
  font-size: 14.5px;
  font-weight: 500;
  color: var(--screen-bg);
  background: var(--ink);
  border: none;
  border-radius: 999px;
  padding: 15px 28px;
  cursor: pointer;
  transition: transform 0.15s ease, opacity 0.15s ease;
}

.cta:hover {
  opacity: 0.85;
}

.cta:active {
  transform: scale(0.97);
}

.cta:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

/* Footer */
.screen-footer {
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding-bottom: 10px;
}

.auth-link {
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 4px;
  margin-bottom: 40px;
}

.auth-link:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  .cta {
    transition: none;
  }
}

/* Auth modal */
.auth-modal {
  position: fixed;
  inset: 0;
  background: var(--overlay);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.auth-modal.hidden {
  display: none;
}

.auth-modal-content {
  background: var(--screen-bg);
  padding: 2rem;
  border-radius: 16px;
  width: 90%;
  max-width: 360px;
  position: relative;
  font-family: var(--sans);
}

.auth-modal-content h2 {
  font-family: var(--serif);
  font-weight: 600;
  color: var(--ink);
  margin: 0 0 1rem;
}

.auth-modal-close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: none;
  border: none;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--ink);
  cursor: pointer;
}

#auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

#auth-form input {
  font-family: var(--sans);
  font-size: 14.5px;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--rule);
  border-radius: 8px;
  background: var(--input-bg);
  color: var(--ink);
}

#auth-form input:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

#auth-google {
  width: 100%;
  background: var(--input-bg);
  color: var(--ink);
  border: 1px solid var(--rule);
}

.auth-error {
  color: #c0392b;
  font-size: 0.85rem;
  margin-top: 0.75rem;
  min-height: 1em;
}

.auth-error.auth-error--info {
  color: var(--accent-positive);
}

/* Strategies */
.welcome-content {
  display: grid;
  gap: 28px;
  justify-items: center;
}

.welcome-content .cta {
  color: var(--screen-bg);
  text-decoration: none;
}

.strategies-page {
  min-height: 100vh;
  background: var(--screen-bg);
  color: var(--ink);
}

.strategies-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 42px 24px 56px;
}

.download-webapp-page {
  min-height: 100vh;
  background: var(--screen-bg);
  color: var(--ink);
}

.download-webapp-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 42px 24px 56px;
  text-align: center;
}

#install-status {
  margin: 0 0 20px;
}

#install-instructions {
  margin-top: 24px;
  text-align: left;
}

#install-instructions h2 {
  font-size: 18px;
  margin: 0 0 12px;
}

#install-instructions ol {
  margin: 0 0 12px;
  padding-left: 24px;
}

#install-instructions li + li {
  margin-top: 8px;
}

#install-note {
  margin: 0 0 16px;
}

#install-link {
  display: block;
  margin: 0 0 12px;
  width: 100%;
}

.strategies-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.strategies-header h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  margin: 0;
}

.close-link {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.strategy-tabs {
  display: flex;
  gap: 8px;
  margin-bottom: 8px;
}

.strategy-tab {
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  background: transparent;
  cursor: pointer;
  font: inherit;
  padding: 10px 20px;
  text-decoration: none;
}

.strategy-tab.active {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--screen-bg);
}

.placeholder-note {
  color: var(--ink-soft);
  font-size: 12px;
  margin: 0 0 28px;
}

#custom-strategy-panel {
  align-items: center;
  display: flex;
  flex-direction: column;
  text-align: center;
}

#custom-strategy-panel p {
  margin: 0 auto;
  max-width: 40ch;
}

#custom-continue-link {
  display: inline-block;
  margin-top: 22px;
  text-decoration: none;
}

.strategy-form {
  display: grid;
  gap: 10px;
}

.field-label,
.strategy-fieldset legend {
  font-size: 13px;
  font-weight: 600;
  margin-top: 10px;
}

.strategy-fieldset {
  border: 0;
  margin: 10px 0 0;
  padding: 0;
}

.strategy-fieldset legend span {
  color: var(--ink-soft);
  font-weight: 400;
}

.select-field {
  appearance: none;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 12px;
  color: var(--ink);
  font: inherit;
  min-height: 48px;
  padding: 0 14px;
  width: 100%;
}

.country-select {
  appearance: auto;
  background: var(--surface);
  color: var(--ink);
}

.country-select option {
  background: var(--surface);
  color: var(--ink);
}

.select-field:focus {
  border-color: var(--ink);
  outline: none;
}

.field-helper {
  color: var(--ink-soft);
  font-size: 12px;
  margin: -5px 0 0;
}

.phone-fields {
  display: flex;
  gap: 8px;
}

.phone-country {
  appearance: auto;
  flex: 0 0 40%;
  min-width: 0;
  padding-left: 10px;
  padding-right: 6px;
}

.phone-national {
  flex: 1;
  min-width: 0;
}

.context-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: -2px;
}

.context-chip {
  background: transparent;
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink-soft);
  cursor: pointer;
  font: inherit;
  font-size: 12px;
  padding: 7px 10px;
}

.context-chip:hover,
.context-chip:focus-visible {
  border-color: var(--ink);
  color: var(--ink);
  outline: none;
}

.context-input {
  min-height: 112px;
  padding: 14px;
  resize: vertical;
}

.context-meta {
  display: flex;
  justify-content: space-between;
}

.consent-row {
  align-items: flex-start;
  color: var(--ink-soft);
  display: flex;
  font-size: 13px;
  gap: 9px;
  line-height: 1.45;
  margin-top: 7px;
}

.alert-disclaimer {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 8px;
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.4;
  margin: 0;
  padding: 8px 10px;
}

.consent-row input {
  accent-color: var(--ink);
  flex: 0 0 auto;
  margin-top: 3px;
}

.strategy-cards {
  display: grid;
  gap: 10px;
  margin-top: 8px;
}

.strategy-card {
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 14px;
  padding: 4px 14px 12px;
}

.strategy-card.selected {
  border-color: var(--ink);
}

.strategy-card-toggle {
  align-items: center;
  background: none;
  border: 0;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  padding: 12px 0 8px;
  text-align: left;
  width: 100%;
}

.strategy-card-toggle strong,
.strategy-card-toggle small {
  display: block;
}

.strategy-card-toggle small {
  color: var(--ink-soft);
  font-size: 12px;
  font-weight: 400;
  margin-top: 4px;
}

.strategy-check {
  color: transparent;
  font-size: 20px;
}

.strategy-card.selected .strategy-check {
  color: var(--ink);
}

.strategy-actions {
  display: flex;
  gap: 8px;
}

.secondary-button {
  background: var(--screen-bg);
  border: 1px solid var(--rule);
  border-radius: 999px;
  color: var(--ink);
  cursor: pointer;
  font: inherit;
  padding: 8px 14px;
}

.secondary-button:hover {
  border-color: var(--ink);
}

.strategy-description {
  color: var(--ink-soft);
  font-size: 13px;
  line-height: 1.45;
  margin: 10px 0 0;
}

.strategy-description p {
  margin: 0 0 8px;
}

.strategy-description p:last-child {
  margin-bottom: 0;
}

.strategy-message {
  color: var(--ink-soft);
  font-size: 13px;
  min-height: 18px;
  margin: 10px 0 0;
}

.strategy-message.error {
  color: #c0392b;
}

.done-button {
  margin-top: 8px;
  width: 100%;
}

/* Onboarding */
.onboarding-page {
  align-items: center;
  background: var(--screen-bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
}

.onboarding-shell {
  margin: 0 auto;
  max-width: 420px;
  width: 100%;
}

.onboarding-heading {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.3px;
  line-height: 1.15;
  margin: 0 0 28px;
  text-align: center;
}

.plan-options { display: grid; gap: 12px; margin-bottom: 22px; }
.plan-option { align-items: flex-start; background: var(--surface); border: 1px solid var(--rule); border-radius: 14px; cursor: pointer; display: flex; gap: 12px; padding: 16px; }
.plan-option:has(input:checked) { border-color: var(--ink); }
.plan-option input { margin-top: 3px; }
.plan-option-copy { display: grid; gap: 5px; }
.plan-option-name { font-size: 15px; }
.plan-option-price { color: var(--ink); font-size: 14px; font-weight: 600; }
.plan-option-allowance { color: var(--ink-soft); font-size: 13px; }
.plan-option-copy small { color: var(--ink-soft); font-size: 13px; }
.profile-plan { margin: 24px 0; }
.profile-plan h2 { font-family: var(--serif); font-size: 24px; margin: 0 0 14px; }
.profile-plan .cta { margin-top: 4px; }

.upgrade-dialog {
  background: var(--screen-bg);
  border: 1px solid var(--rule);
  border-radius: 18px;
  color: var(--ink);
  max-height: calc(100dvh - 24px);
  max-width: 460px;
  overflow: auto;
  padding: 0;
  width: calc(100% - 24px);
}
.upgrade-dialog::backdrop { background: color-mix(in srgb, var(--ink) 58%, transparent); }
.upgrade-dialog-content { display: grid; gap: 16px; padding: 22px; }
.upgrade-close { align-self: end; background: transparent; border: 0; color: var(--ink-soft); cursor: pointer; font: 28px/1 var(--sans); justify-self: end; padding: 0 2px; }
.upgrade-dialog h2 { font-family: var(--serif); font-size: 27px; margin: -10px 0 0; }
.upgrade-comparison { display: grid; gap: 8px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.upgrade-comparison > div { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; display: grid; gap: 6px; padding: 12px; }
.upgrade-comparison span, .upgrade-payment p, .upgrade-support, .upgrade-status { color: var(--ink-soft); font-size: 13px; line-height: 1.45; margin: 0; overflow-wrap: anywhere; }
.upgrade-payment { background: var(--surface); border: 1px solid var(--rule); border-radius: 12px; display: grid; gap: 12px; padding: 14px; }
.upgrade-paystack { display: block; margin: 0; text-align: center; width: 100%; }
.upgrade-support a { color: var(--ink); overflow-wrap: anywhere; }
.upgrade-status { min-height: 1.2em; }
.upgrade-dialog [hidden] { display: none !important; }
.recurring-coming-soon { color: var(--ink-soft); font-size: 12px; margin: 0 0 12px; text-align: center; }

.avatar-preview {
  background: var(--surface);
  border-radius: 50%;
  height: min(220px, 62vw);
  margin: 0 auto 20px;
  max-height: 220px;
  max-width: 220px;
  overflow: hidden;
  width: min(220px, 62vw);
}

.avatar-render {
  align-items: center;
  display: flex;
  justify-content: center;
}

.avatar-render-image {
  display: block;
  height: 100%;
  object-fit: cover;
  width: 100%;
}

.avatar-render-fallback {
  align-items: center;
  background: var(--ink);
  border-radius: 50%;
  color: var(--screen-bg);
  display: flex;
  font-family: var(--serif);
  font-size: 82px;
  height: 100%;
  justify-content: center;
  line-height: 1;
  width: 100%;
}

.avatar-upload-actions {
  display: flex;
  justify-content: center;
  margin-bottom: 14px;
}

.avatar-file-input {
  height: 1px;
  opacity: 0;
  position: absolute;
  width: 1px;
}

.avatar-skip {
  color: var(--ink-soft);
  display: block;
  font-size: 13px;
  margin-top: 16px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.onboarding-submit {
  margin-top: 0;
  width: 100%;
}

.onboarding-message {
  color: #c0392b;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.onboarding-copy {
  color: var(--ink-soft);
  line-height: 1.5;
  margin: 0 0 18px;
  text-align: center;
}

.contact-number {
  color: var(--ink);
  font-family: var(--serif);
  font-size: clamp(30px, 9vw, 44px);
  font-weight: 600;
  letter-spacing: 0.04em;
  margin: 0 0 28px;
  text-align: center;
}

.save-number-actions {
  display: grid;
  gap: 10px;
}

.save-number-button {
  margin-top: 0;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.copy-status {
  color: var(--ink-soft);
  font-size: 13px;
  min-height: 18px;
  margin: 10px 0 0;
  text-align: center;
}

.profile-region {
  margin: 28px 0 24px;
}

.profile-region h2 {
  font-family: var(--serif);
  font-size: 24px;
  margin: 0 0 14px;
}

.profile-region .cta {
  margin-top: 12px;
  width: 100%;
}

.username-form {
  width: 100%;
}

.username-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  text-align: left;
}

.username-input-wrap {
  align-items: center;
  background: var(--input-bg);
  border: 1px solid var(--rule);
  border-radius: 12px;
  display: flex;
  gap: 2px;
  padding: 0 14px;
}

.username-input-wrap:focus-within {
  border-color: var(--ink);
  outline: 2px solid var(--ink);
  outline-offset: 2px;
}

.username-input-wrap input {
  background: transparent;
  border: 0;
  color: var(--ink);
  flex: 1;
  font: 16px var(--sans);
  min-width: 0;
  outline: 0;
  padding: 15px 0;
}

.username-help {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 10px 0 28px;
}

/* Dashboard */
.dashboard-page {
  min-height: 100vh;
  background: var(--screen-bg);
  color: var(--ink);
}

.dashboard-shell {
  width: 100%;
  max-width: 560px;
  margin: 0 auto;
  padding: 42px 24px 56px;
}

.dashboard-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 28px;
}

.dashboard-header h1 {
  font-family: var(--serif);
  font-size: clamp(30px, 7vw, 40px);
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.avatar-button {
  align-items: center;
  background: var(--ink);
  border: 0;
  border-radius: 50%;
  color: var(--screen-bg);
  cursor: pointer;
  display: flex;
  height: 44px;
  justify-content: center;
  overflow: hidden;
  padding: 0;
  width: 44px;
}

.header-avatar {
  height: 100%;
  width: 100%;
}

.header-avatar .avatar-render-fallback {
  font-size: 18px;
}

/* Profile */
.profile-page {
  background: var(--screen-bg);
  color: var(--ink);
  min-height: 100vh;
}

.profile-shell {
  margin: 0 auto;
  max-width: 420px;
  padding: 42px 24px 56px;
}

.profile-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 38px;
}

.profile-header h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.profile-close {
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
  text-decoration: none;
}

.profile-identity {
  align-items: center;
  display: flex;
  flex-direction: column;
  margin-bottom: 32px;
}

.profile-avatar {
  align-items: center;
  background: var(--surface);
  border-radius: 50%;
  display: flex;
  height: 220px;
  justify-content: center;
  margin-bottom: 16px;
  overflow: hidden;
  width: 220px;
}

.profile-avatar-change {
  margin-bottom: 16px;
}

.profile-username {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0;
}

.profile-email {
  color: var(--ink-soft);
  font-size: 13px;
  margin: 7px 0 0;
}

.profile-subscription-status {
  color: var(--ink);
  font-size: 13px;
  margin-top: 10px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.profile-menu {
  background: var(--surface);
  border-radius: 16px;
  overflow: hidden;
}

.profile-menu-row {
  align-items: center;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--rule);
  color: var(--ink);
  display: flex;
  font: 14px var(--sans);
  justify-content: space-between;
  min-height: 60px;
  padding: 0 18px;
  text-align: left;
  width: 100%;
}

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

.profile-placeholder {
  color: var(--ink-soft);
}

.profile-placeholder small {
  font-size: 12px;
}

.theme-toggle-track {
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 999px;
  display: flex;
  height: 24px;
  padding: 2px;
  transition: background 0.15s ease;
  width: 44px;
}

.theme-toggle-thumb {
  background: var(--ink-soft);
  border-radius: 50%;
  display: block;
  height: 20px;
  transform: translateX(0);
  transition: transform 0.15s ease, background 0.15s ease;
  width: 20px;
}

.profile-menu-row[aria-checked="true"] .theme-toggle-track {
  background: var(--ink);
}

.profile-menu-row[aria-checked="true"] .theme-toggle-thumb {
  background: var(--surface);
  transform: translateX(16px);
}

.profile-logout {
  color: #c0392b;
  cursor: pointer;
}

.profile-message {
  color: #c0392b;
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

/* Subscription */
.subscribe-page {
  align-items: center;
  background: var(--screen-bg);
  color: var(--ink);
  display: flex;
  justify-content: center;
  min-height: 100vh;
  padding: 32px 24px;
}

.subscribe-shell {
  max-width: 420px;
  width: 100%;
}

.subscribe-header {
  align-items: center;
  display: flex;
  justify-content: space-between;
  margin-bottom: 34px;
}

.subscribe-header h1 {
  font-family: var(--serif);
  font-size: 38px;
  font-weight: 600;
  letter-spacing: -0.3px;
  margin: 0;
}

.subscribe-status {
  color: var(--ink);
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 600;
  margin: 0 0 18px;
}

.subscribe-price,
.subscribe-copy {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.55;
  margin: 0 0 18px;
}

.subscribe-price {
  color: var(--ink);
  font-weight: 600;
}

.subscribe-pay {
  display: block;
  text-align: center;
  text-decoration: none;
  width: 100%;
}

.subscribe-message {
  color: var(--accent-positive);
  font-size: 13px;
  min-height: 18px;
  text-align: center;
}

.subscribe-care {
  color: var(--ink);
  display: block;
  font-family: var(--serif);
  font-size: 16px;
  font-style: italic;
  margin-top: 26px;
  text-align: center;
  text-decoration: underline;
  text-underline-offset: 4px;
}

.scan-card,
.stat-card,
.dashboard-action-card {
  background: var(--surface);
  border-radius: 16px;
}

.scan-card {
  display: grid;
  min-height: 274px;
  place-items: center;
}

.scan-ring-wrap {
  height: 220px;
  position: relative;
  width: 220px;
}

.scan-ring {
  height: 100%;
  overflow: visible;
  transform: rotate(-90deg);
  width: 100%;
}

.scan-ring-track,
.scan-ring-progress {
  fill: none;
  stroke-width: 6;
}

.scan-ring-track {
  stroke: #dcdad5;
}

.scan-ring-progress {
  stroke: var(--ink);
  stroke-linecap: round;
}

.scan-countdown {
  align-items: center;
  display: flex;
  flex-direction: column;
  inset: 0;
  justify-content: center;
  position: absolute;
}

.scan-countdown strong {
  font-size: 28px;
  font-weight: 500;
  letter-spacing: 1px;
}

.scan-countdown span {
  color: var(--ink-soft);
  font-size: 12px;
  margin-top: 7px;
}

.scan-percent {
  background: var(--ink);
  border-radius: 999px;
  color: var(--screen-bg);
  font-size: 11px;
  padding: 5px 8px;
  position: absolute;
  right: -9px;
  top: 25px;
}

.dashboard-stats {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 14px;
}

.stat-card {
  min-height: 126px;
  padding: 18px;
}

.stat-value {
  display: block;
  font-family: var(--serif);
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 18px;
}

.stat-label {
  color: var(--ink-soft);
  display: block;
  font-size: 12px;
  line-height: 1.35;
}

.dashboard-actions {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.dashboard-action-card {
  align-items: center;
  color: var(--ink);
  display: flex;
  gap: 16px;
  justify-content: space-between;
  padding: 18px;
  text-decoration: none;
  transition: transform 0.15s ease, background 0.15s ease;
}

.dashboard-action-card:hover {
  background: var(--surface-hover);
  transform: translateY(-1px);
}

.dashboard-action-card strong,
.dashboard-action-card small {
  display: block;
}

.dashboard-action-card strong {
  font-size: 14px;
  margin-bottom: 7px;
}

.dashboard-action-card small {
  color: var(--ink-soft);
  font-size: 12px;
  line-height: 1.45;
}

.action-arrow {
  flex-shrink: 0;
  font-size: 22px;
}

@media (max-width: 420px) {
  .dashboard-shell {
    padding-left: 18px;
    padding-right: 18px;
  }

  .stat-card {
    padding: 14px;
  }
}

/* Price surveillance */
.asset-search-wrap {
  position: relative;
}

.asset-search-wrap .select-field {
  padding-left: 42px;
}

.search-icon {
  fill: none;
  height: 19px;
  left: 14px;
  position: absolute;
  stroke: var(--ink-soft);
  stroke-linecap: round;
  stroke-width: 1.8;
  top: 14px;
  width: 19px;
  z-index: 1;
}

.asset-results {
  display: grid;
  gap: 5px;
  max-height: 238px;
  overflow-y: auto;
}

.asset-results-note {
  color: var(--ink-soft);
  font-size: 12px;
  padding: 2px 14px;
}

.asset-result {
  align-items: center;
  background: var(--surface);
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--ink);
  cursor: pointer;
  display: flex;
  font: inherit;
  justify-content: space-between;
  padding: 11px 14px;
  text-align: left;
}

.asset-result:hover,
.asset-result.selected {
  background: var(--surface-hover);
  border-color: var(--ink);
}

.asset-check {
  color: transparent;
  font-size: 17px;
  font-weight: 600;
}

.asset-result.selected .asset-check {
  color: var(--accent-positive);
}
.chat-page { min-height: calc(100vh - 53px); padding: 24px 16px 32px; }
.chat-shell { margin: 0 auto; max-width: 760px; }
.chat-header { align-items: flex-start; display: flex; justify-content: space-between; gap: 16px; margin-bottom: 18px; }
.chat-header h1 { font-family: var(--serif); font-size: 34px; margin: 0; }
.eyebrow { color: var(--ink-soft); font-size: 11px; letter-spacing: .08em; margin: 0 0 3px; text-transform: uppercase; }
.chat-clear { background: transparent; border: 1px solid var(--rule); border-radius: 999px; color: var(--ink-soft); cursor: pointer; font: inherit; font-size: 12px; padding: 8px 12px; }
.chat-messages { display: flex; flex-direction: column; gap: 10px; min-height: 48vh; padding: 8px 0 18px; }
.chat-bubble { border-radius: 16px; font-size: 14px; line-height: 1.5; max-width: 86%; padding: 11px 14px; white-space: pre-wrap; }
.chat-bubble-user { align-self: flex-end; background: var(--ink); color: var(--screen-bg); }
.chat-bubble-assistant { align-self: flex-start; background: var(--surface); color: var(--ink); }
.chat-options { display: flex; flex-wrap: wrap; gap: 8px; padding-left: 4px; }
.chat-option { background: var(--input-bg); border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); cursor: pointer; font: inherit; font-size: 13px; padding: 9px 13px; }
.chat-option:hover:not(:disabled) { background: var(--surface-hover); }
.chat-option.selected { background: var(--ink); border-color: var(--ink); color: var(--screen-bg); }
.chat-option-continue { margin-left: 4px; }
.chat-option:disabled { cursor: not-allowed; opacity: .5; }
.chat-form { align-items: center; background: var(--screen-bg); border-top: 1px solid var(--rule); bottom: calc(var(--nav-height) + env(safe-area-inset-bottom, 0px)); display: flex; gap: 8px; padding: 14px 0 4px; position: sticky; }
.chat-input { background: var(--input-bg); border: 1px solid var(--rule); border-radius: 999px; color: var(--ink); flex: 1; font: inherit; min-width: 0; padding: 12px 14px; }
.chat-input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; }
.chat-send { padding: 12px 17px; }
.chat-status { color: var(--ink-soft); font-size: 12px; min-height: 1.2em; }
.chat-result-card { background: var(--surface); border: 1px solid var(--rule); border-radius: 16px; padding: 14px; }
.chat-result-card h2 { font-family: var(--serif); font-size: 21px; margin: 0 0 12px; }
.chat-result-card > p { color: var(--ink-soft); font-size: 13px; margin: 0; }
.chat-result-meta { margin-bottom: 12px !important; }
.chat-result-item { border-top: 1px solid var(--rule); padding: 12px 0; }
.chat-result-item h3 { font-size: 15px; margin: 0 0 6px; }
.chat-status-badge { border: 1px solid currentColor; border-radius: 999px; display: inline-block; font-size: 10px; font-weight: 600; letter-spacing: .04em; margin-left: 8px; padding: 3px 7px; vertical-align: middle; }
.chat-status-forming { color: #b7791f; }
.chat-status-formed { color: var(--accent-positive); }
.chat-result-row { display: flex; gap: 10px; justify-content: space-between; padding: 3px 0; }
.chat-result-row strong { color: var(--ink-soft); font-size: 11px; font-weight: 500; }
.chat-result-row span { font-size: 12px; max-width: 70%; overflow-wrap: anywhere; text-align: right; }
.chat-download { color: var(--ink); display: inline-block; font-size: 13px; margin: 8px 0 10px 4px; }
.chat-pair-link { color: var(--ink); font-size: 12px; max-width: 70%; overflow-wrap: anywhere; text-align: right; }
.sr-only { height: 1px; margin: -1px; overflow: hidden; position: absolute; width: 1px; clip: rect(0, 0, 0, 0); }
@media (max-width: 520px) {
  .site-nav { gap: 0; padding-left: 4px; padding-right: 4px; }
  .site-nav-link { font-size: 10px; padding: 7px 2px; }
  .chat-page { padding-left: 12px; padding-right: 12px; }
  .chat-header h1 { font-size: 30px; }
  .chat-bubble { max-width: 94%; }
}
