:root {
  --ink: #122018;
  --ink-soft: #45564c;
  --cream: #f6f2e8;
  --paper: #fffdf7;
  --line: #e3ddcd;
  --green: #0e7a5f;
  --green-dark: #095c47;
  --green-soft: #e2f2ec;
  --amber: #d98a1f;
  --red: #b33225;
  --shadow: 0 24px 60px rgba(18, 32, 24, 0.12);
  --radius: 18px;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

html {
  scroll-behavior: smooth;
}

body {
  background:
    radial-gradient(900px 500px at 10% -10%, #e8f3ed 0%, transparent 60%),
    radial-gradient(700px 400px at 100% 0%, #f7e9cf 0%, transparent 55%),
    var(--cream);
  color: var(--ink);
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
}

.site {
  width: min(1120px, 100% - 48px);
  margin: 0 auto;
  padding: 24px 0 22px;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 20px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 750;
  letter-spacing: -0.02em;
  text-decoration: none;
  font-size: 17px;
}

.brand .dot {
  width: 13px;
  height: 13px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 0 5px rgba(14, 122, 95, 0.14);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
  font-size: 13.5px;
  font-weight: 600;
}

.site-nav a {
  color: var(--ink-soft);
  text-decoration: none;
}

.site-nav a:hover {
  color: var(--ink);
}

.ghost {
  border: 1px solid var(--line);
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 12px;
  border-radius: 9px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.ghost:hover {
  color: var(--ink);
  border-color: rgba(18, 32, 24, 0.3);
}

.ghost.danger {
  color: var(--red);
  border-color: #eccac4;
}

.ghost.danger:hover {
  color: #8d241a;
  border-color: var(--red);
}

main {
  flex: 1;
}

.hidden {
  display: none !important;
}

.eyebrow {
  margin: 0 0 12px;
  font-size: 11.5px;
  font-weight: 750;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--green);
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.8fr);
  gap: 54px;
  align-items: center;
  padding: 30px 0 64px;
}

.hero h1 {
  margin: 0;
  font-size: clamp(36px, 5vw, 60px);
  line-height: 1.02;
  letter-spacing: -0.04em;
}

.lede {
  margin: 22px 0 0;
  max-width: 48ch;
  color: var(--ink-soft);
  font-size: 17px;
}

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

.primary {
  border: 0;
  border-radius: 11px;
  background: var(--green);
  color: #fff;
  font: inherit;
  font-size: 14.5px;
  font-weight: 650;
  padding: 12px 18px;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s, transform 0.05s;
}

.primary:hover:not(:disabled) {
  background: var(--green-dark);
}

.primary:active:not(:disabled) {
  transform: translateY(1px);
}

.primary:disabled {
  opacity: 0.6;
  cursor: progress;
}

.hero-actions .ghost {
  padding: 12px 18px;
  font-size: 14.5px;
}

.fine {
  margin: 16px 0 0;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.hero-card {
  perspective: 1200px;
}

.mock-window {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
  transform: rotate(-1.2deg);
}

.mock-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 11px 14px;
  background: #f1ecdd;
  border-bottom: 1px solid var(--line);
}

.mock-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #cfc6ae;
}

.mock-title {
  margin-left: auto;
  font-size: 11px;
  font-weight: 700;
  color: var(--ink-soft);
  letter-spacing: 0.04em;
}

.mock-body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.mock-message {
  border-radius: 14px;
  padding: 11px 14px;
  font-size: 13px;
  line-height: 1.45;
  max-width: 92%;
}

.mock-user {
  align-self: flex-end;
  background: var(--green);
  color: #fff;
  border-bottom-right-radius: 4px;
}

.mock-assistant {
  background: #f2efe4;
  border: 1px solid var(--line);
  border-bottom-left-radius: 4px;
}

.mock-composer {
  margin-top: 6px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 11px 13px;
  color: #9a998e;
  font-size: 13px;
  background: #fffefa;
}

.section {
  padding: 18px 0 54px;
}

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

.section h2 {
  margin: 0;
  font-size: clamp(24px, 3vw, 32px);
  letter-spacing: -0.03em;
}

.section-head .muted {
  max-width: 42ch;
  margin: 0;
  font-size: 14px;
}

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

.small {
  font-size: 13px;
}

.platform-hint {
  margin: 0 0 14px;
  font-size: 13.5px;
  color: var(--green-dark);
  font-weight: 600;
}

.download-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}

.download-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 176px;
  position: relative;
}

.download-card.recommended {
  border-color: rgba(14, 122, 95, 0.45);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, 0.1);
}

.download-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 8px;
}

.platform-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-soft);
  color: var(--green-dark);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.download-badge {
  font-size: 10.5px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--green-dark);
  background: var(--green-soft);
  border-radius: 999px;
  padding: 3px 8px;
}

.download-card h3 {
  margin: 0;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.download-meta {
  margin: 0 0 12px;
  font-size: 12px;
  color: var(--ink-soft);
}

.download-button {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9px;
  border: 1px solid rgba(14, 122, 95, 0.35);
  color: var(--green-dark);
  font-size: 13px;
  font-weight: 650;
  padding: 9px 12px;
  text-decoration: none;
  background: rgba(226, 242, 236, 0.55);
}

.download-button:hover {
  background: var(--green-soft);
}

.download-button.disabled {
  color: #8a897e;
  border-color: var(--line);
  background: #f4f1e7;
  cursor: not-allowed;
}

.how-section {
  padding-top: 26px;
  border-top: 1px solid var(--line);
}

.how {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.how li {
  background: rgba(255, 253, 247, 0.7);
  border: 1px solid var(--line);
  border-radius: 15px;
  padding: 20px;
}

.step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 12px;
}

.how strong {
  display: block;
  font-size: 15.5px;
  letter-spacing: -0.01em;
}

.how p {
  margin: 6px 0 0;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.auth-card {
  max-width: 440px;
  margin: 36px auto 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px;
}

.auth-card h2 {
  margin: 0 0 4px;
  font-size: 26px;
}

.tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  background: rgba(18, 32, 24, 0.05);
  border-radius: 12px;
  padding: 4px;
  margin: 22px 0 20px;
}

.tab {
  border: 0;
  background: transparent;
  color: var(--ink-soft);
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  padding: 9px 10px;
  border-radius: 9px;
  cursor: pointer;
}

.tab.active {
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 2px 8px rgba(18, 32, 24, 0.1);
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 14px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--ink);
}

.field input {
  width: 100%;
  border: 1px solid var(--line);
  background: #fffefa;
  color: var(--ink);
  border-radius: 11px;
  padding: 11px 13px;
  font: inherit;
  font-size: 15px;
  font-weight: 400;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.field input:focus {
  border-color: var(--green);
  box-shadow: 0 0 0 3px rgba(14, 122, 95, 0.15);
}

.auth-card .primary,
.token-form .primary {
  width: 100%;
}

.link-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 13.5px;
  font-weight: 650;
  color: var(--green-dark);
  text-decoration: none;
  border: 0;
  border-bottom: 1px solid rgba(14, 122, 95, 0.35);
  padding: 0 0 1px;
  background: transparent;
  cursor: pointer;
}

.link-button:hover {
  color: var(--green);
  border-bottom-color: var(--green);
}

.auth-card .link-button {
  margin-top: 20px;
}

.error {
  margin: 0 0 12px;
  padding: 9px 12px;
  border-radius: 9px;
  background: #fbe9e6;
  color: var(--red);
  font-size: 13.5px;
  font-weight: 500;
}

.notice {
  margin: 14px 0 0;
  padding: 10px 13px;
  border-radius: 9px;
  background: #fff5de;
  border: 1px solid #f2dfb6;
  color: #7a5313;
  font-size: 13px;
}

.dashboard-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: 22px 0 26px;
}

.dashboard-head h1 {
  margin: 0;
  font-size: clamp(30px, 4vw, 42px);
  letter-spacing: -0.035em;
}

.dashboard-head .muted {
  margin: 6px 0 0;
}

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

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(0, 0.85fr);
  gap: 18px;
  align-items: start;
}

.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(18, 32, 24, 0.07);
  padding: 24px;
}

.card h2 {
  margin: 0 0 4px;
  font-size: 21px;
  letter-spacing: -0.02em;
}

.card-head {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.card .muted {
  margin: 0;
}

.token-reveal {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: #edf7f2;
  border: 1px solid rgba(14, 122, 95, 0.3);
}

.token-reveal strong {
  font-size: 14px;
}

.token-reveal p {
  margin: 3px 0 10px;
  font-size: 12.5px;
  color: var(--ink-soft);
}

.token-box {
  display: flex;
  gap: 8px;
  align-items: center;
}

.token-box code {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12.5px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 9px 10px;
  overflow-x: auto;
  white-space: nowrap;
}

.token-form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  align-items: end;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.token-form .field {
  margin-bottom: 0;
}

.token-form .primary {
  width: auto;
  padding: 11px 16px;
}

.token-list {
  list-style: none;
  padding: 0;
  margin: 20px 0 0;
  display: grid;
  gap: 10px;
}

.token-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: 12px 14px;
  background: #fffefa;
}

.token-item strong {
  display: block;
  font-size: 14px;
}

.token-prefix {
  display: block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 12px;
  color: var(--ink-soft);
  margin-top: 2px;
}

.token-meta {
  grid-column: 1;
  font-size: 12px;
  color: var(--ink-soft);
}

.token-item .ghost {
  grid-row: 1 / span 2;
  grid-column: 2;
}

.empty-tokens {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px dashed var(--line);
  border-radius: 11px;
  color: var(--ink-soft);
  font-size: 13.5px;
  text-align: center;
}

.side-card h2 {
  margin-bottom: 12px;
}

.side-card .link-button {
  margin-top: 18px;
}

.mini-steps {
  margin: 0;
  padding-left: 18px;
  display: grid;
  gap: 8px;
  color: var(--ink-soft);
  font-size: 13.5px;
}

.mini-steps li::marker {
  color: var(--green);
  font-weight: 700;
}

.site-footer {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  border-top: 1px solid var(--line);
  padding-top: 18px;
  font-size: 12px;
  color: var(--ink-soft);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(18, 32, 24, 0.07);
  padding: 1px 5px;
  border-radius: 5px;
}

@media (max-width: 920px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 36px;
    padding-top: 12px;
  }

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

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

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

@media (max-width: 620px) {
  .site {
    width: min(100% - 28px, 1120px);
    padding-top: 16px;
  }

  .site-header {
    flex-wrap: wrap;
  }

  .site-nav {
    gap: 10px;
  }

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

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

  .auth-card {
    padding: 22px;
  }

  .dashboard-head {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
  }

  .token-form {
    grid-template-columns: 1fr;
  }

  .token-form .primary {
    width: 100%;
  }

  .token-item {
    grid-template-columns: 1fr;
  }

  .token-item .ghost {
    grid-row: auto;
    grid-column: 1;
    justify-self: start;
  }
}

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