:root {
  --bg: #090a0f;
  --bg-2: #0f1118;
  --card: #11141d;
  --card-2: #151a25;
  --border: #23293a;
  --text: #f4f7ff;
  --muted: #9ea7bf;
  --accent: #a9643f;
  --accent-hover: #935536;
  --green: #59d499;
  --radius: 16px;
  --shadow: 0 20px 55px rgba(0, 0, 0, 0.42);
  --page-max: 1060px;
  --page-pad: 20px;
  --text-muted: var(--muted);
  --bg-card: var(--card);
  --bg-input: #0f1522;
  --radius-sm: 12px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--text);
  font-family: Inter, "Segoe UI", system-ui, -apple-system, sans-serif;
  background: radial-gradient(1000px 500px at 70% -120px, rgba(169, 100, 63, 0.2) 0%, transparent 60%),
    radial-gradient(700px 400px at 0% 0%, rgba(147, 85, 54, 0.18) 0%, transparent 65%), var(--bg);
  overflow-x: hidden;
}

.page {
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 28px var(--page-pad) 60px;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 40px;
  gap: 14px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: inherit;
  text-decoration: none;
}

.topnav {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
}

.topnav-link {
  color: #b7c2e4;
  text-decoration: none;
  font-size: 13px;
  padding: 6px 10px;
  border: 1px solid transparent;
  border-radius: 999px;
  transition: 0.15s ease;
}

.topnav-link:hover {
  color: #dbe4ff;
  border-color: #35425d;
  background: #101622;
}

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

.small {
  font-size: 12px;
}

.kicker {
  color: #c58e68;
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 700;
  margin: 0 0 12px;
}

.hero {
  position: relative;
  background: linear-gradient(180deg, rgba(169, 100, 63, 0.13), rgba(17, 20, 29, 0.85)), var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  box-shadow: var(--shadow);
  padding: 34px 28px;
  overflow: hidden;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto -120px -130px auto;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(169, 100, 63, 0.24), transparent 65%);
  pointer-events: none;
}

.hero.hero-split {
  background: none;
  border: 0;
  border-radius: 0;
  box-shadow: none;
  padding: 0;
  overflow: visible;
  display: grid;
  grid-template-columns: minmax(0, 0.72fr) minmax(0, 1.28fr);
  gap: 56px;
  align-items: center;
  min-height: calc(100svh - 112px);
}

.hero.hero-split::after {
  display: none;
}

.hero-copy {
  min-width: 0;
}

h1 {
  margin: 0 0 10px;
  font-size: clamp(32px, 6vw, 58px);
  line-height: 1.04;
  max-width: 720px;
  letter-spacing: -0.02em;
}

p {
  margin: 0 0 12px;
  line-height: 1.55;
}

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

.hero-preview {
  margin-top: 0;
  position: relative;
  z-index: 1;
  justify-self: stretch;
  width: 100%;
  max-width: none;
  --hero-bleed: max(0px, calc((100dvw - var(--page-max)) / 2 + var(--page-pad)));
  margin-right: calc(-1 * var(--hero-bleed));
}

.hero-preview-label {
  margin: 0 0 10px;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.preview-shell {
  border: 1px solid #2f374c;
  border-radius: 14px;
  overflow: hidden;
  background: #0b0f19;
  box-shadow: 0 18px 38px rgba(0, 0, 0, 0.38);
  margin-left: auto;
  width: min(760px, calc(100% + var(--hero-bleed)));
  max-width: 760px;
  transform: none;
}

.preview-shell-topbar {
  height: 34px;
  border-bottom: 1px solid #2f374c;
  background: #0f1421;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 12px;
}

.preview-shell-topbar span {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #45506c;
}

.preview-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  max-height: 620px;
  display: block;
  background: #080b12;
  object-fit: cover;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 12px;
  padding: 11px 16px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: 0.15s ease;
}

.btn-primary {
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #8f532f);
  box-shadow: 0 10px 24px rgba(169, 100, 63, 0.32);
}

.btn-primary:hover {
  background: linear-gradient(145deg, #bb7b54, var(--accent-hover));
  transform: translateY(-1px);
}

.btn-secondary {
  background: var(--card-2);
  border-color: var(--border);
  color: var(--text);
}

.btn-secondary:hover {
  border-color: #37425e;
  background: #1a2030;
}

.card {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(255, 255, 255, 0)), var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}

.stack {
  margin-top: 72px;
  display: grid;
  gap: 84px;
}

.section-card {
  background: transparent;
  border: 0;
  box-shadow: none;
  padding: 0;
}

.what-grid {
  margin-top: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.what-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f131d;
  padding: 16px;
}

.what-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.roadmap-list {
  margin-top: 10px;
  display: grid;
  gap: 8px;
}

.roadmap-item {
  border: 1px dashed #3b4663;
  border-radius: 10px;
  background: #0f131d;
  padding: 10px 12px;
  color: var(--muted);
}

.chips {
  margin-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.chip {
  border: 1px solid #3b4663;
  border-radius: 999px;
  padding: 6px 10px;
  background: #0f131d;
  color: #d7e0ff;
  font-size: 12px;
}

.ai-marquee-wrap {
  position: relative;
  margin-top: 18px;
  display: grid;
  gap: 12px;
}

.ai-marquee-wrap::before,
.ai-marquee-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  width: 44px;
  z-index: 2;
  pointer-events: none;
}

.ai-marquee-wrap::before {
  left: 0;
  background: linear-gradient(90deg, #090a0f 0%, rgba(9, 10, 15, 0) 100%);
}

.ai-marquee-wrap::after {
  right: 0;
  background: linear-gradient(270deg, #090a0f 0%, rgba(9, 10, 15, 0) 100%);
}

.ai-marquee-row {
  position: relative;
  overflow: hidden;
}

.ai-marquee-track {
  display: inline-flex;
  gap: 10px;
  min-width: max-content;
  animation: ai-marquee 34s linear infinite;
}

.ai-marquee-row-reverse .ai-marquee-track {
  animation-direction: reverse;
  animation-duration: 38s;
}

.ai-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #2f374c;
  border-radius: 999px;
  padding: 8px 12px 8px 8px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.01)), #101522;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.25);
}

.ai-pill-logo {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  background: linear-gradient(145deg, #b8724a, #83503a);
  position: relative;
  overflow: hidden;
  flex-shrink: 0;
}

.ai-pill-logo-img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 999px;
  background: #fff;
  object-fit: contain;
  padding: 4px;
}

.ai-pill-logo-fallback {
  position: absolute;
  inset: 0;
  display: inline-grid;
  place-items: center;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.ai-pill-logo.loaded .ai-pill-logo-fallback {
  display: none;
}

.ai-pill-name {
  font-size: 13px;
  color: #dbe4ff;
  white-space: nowrap;
}

@keyframes ai-marquee {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}

.steps {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.step {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f131d;
  padding: 14px 14px;
}

.step strong {
  display: block;
  margin-bottom: 2px;
}

.step-num {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  font-size: 12px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(145deg, var(--accent), #8f532f);
  flex-shrink: 0;
}

.download-list {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.faq-list {
  margin-top: 6px;
  display: grid;
  gap: 10px;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f131d;
  padding: 12px;
}

.faq-item h3 {
  margin: 0 0 6px;
  font-size: 15px;
}

.section-title {
  margin: 0 0 16px;
  font-size: 17px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-title::before {
  content: "⟩";
  color: var(--green);
  font-weight: 900;
}

#features,
#ai-support,
#quick-start,
#docs,
#access-request {
  scroll-margin-top: 84px;
}

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

.doc-card {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f131d;
  padding: 14px;
  text-decoration: none;
  color: inherit;
  display: grid;
  gap: 6px;
  transition: 0.15s ease;
}

.doc-card:hover {
  border-color: #3a4763;
  background: #131929;
}

.doc-snippet-wrap {
  margin-top: 14px;
  display: grid;
  gap: 6px;
}

.doc-snippet {
  display: block;
  border: 1px solid #33405b;
  border-radius: 10px;
  background: #0e1320;
  color: #d8e2ff;
  padding: 10px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  line-height: 1.45;
}

.form {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.interest-options {
  display: grid;
  gap: 8px;
}

.interest-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
}

.interest-option input {
  margin: 0;
}

.input,
.textarea {
  width: 100%;
  background: #0f121b;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}

.input:focus,
.textarea:focus {
  border-color: #9a5a39;
  box-shadow: 0 0 0 3px rgba(169, 100, 63, 0.24);
}

.textarea {
  min-height: 130px;
  margin-top: 10px;
  font: 13px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.status-box {
  margin-top: 14px;
  border: 1px dashed #38415a;
  border-radius: 12px;
  background: #0f131d;
  padding: 12px;
}

.site-footer {
  margin-top: 60px;
  padding: 22px 4px 0;
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-left {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 13px;
}

.footer-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.footer-link {
  color: #b7c2e4;
  text-decoration: none;
  font-size: 13px;
}

.footer-link:hover {
  color: #d8e0fb;
  text-decoration: underline;
}

.footer-donate {
  padding: 8px 12px;
  border-radius: 10px;
  font-size: 12px;
  line-height: 1;
}

.legal-page {
  max-width: 920px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.docs-page {
  max-width: 980px;
  margin: 0 auto;
  padding: 28px 20px 56px;
}

.docs-page .topbar {
  margin-bottom: 26px;
}

.docs-card {
  background: linear-gradient(180deg, rgba(169, 100, 63, 0.1), rgba(17, 20, 29, 0.9)), var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 22px;
  margin-bottom: 16px;
}

.docs-card h1 {
  font-size: clamp(30px, 5vw, 48px);
  margin-bottom: 10px;
}

.docs-card h2 {
  margin: 0 0 10px;
  font-size: 21px;
}

.docs-card h3 {
  margin: 0 0 6px;
  font-size: 16px;
}

.doc-list {
  margin: 8px 0 0 18px;
  padding: 0;
}

.doc-list li {
  margin: 6px 0;
  color: var(--muted);
}

.doc-block {
  border: 1px solid var(--border);
  border-radius: 12px;
  background: #0f131d;
  padding: 14px;
}

.docs-markdown h2 {
  margin-top: 0;
}

.docs-markdown h3 {
  margin-top: 16px;
}

.docs-markdown code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 12px;
  background: #0d1321;
  border: 1px solid #2d3953;
  border-radius: 8px;
  padding: 2px 6px;
}

.doc-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 10px;
  font-size: 13px;
}

.doc-table th,
.doc-table td {
  border: 1px solid #2d3953;
  padding: 8px 10px;
  vertical-align: top;
}

.doc-table th {
  background: #121a2a;
  text-align: left;
  color: #dbe4ff;
}

.doc-table td {
  background: #0e1320;
  color: var(--muted);
}

.legal-card {
  background: linear-gradient(180deg, rgba(169, 100, 63, 0.1), rgba(17, 20, 29, 0.9)), var(--card);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: 24px;
}

.legal-card h1 {
  font-size: clamp(28px, 5vw, 44px);
}

.legal-card h2 {
  margin: 22px 0 8px;
  font-size: 20px;
}

.legal-card ul {
  margin: 8px 0 14px 20px;
  padding: 0;
}

.legal-card li {
  margin: 6px 0;
  color: var(--muted);
}

.legal-meta {
  margin-top: 6px;
  font-size: 12px;
  color: var(--muted);
}

.legal-back {
  margin-top: 18px;
}

/* Help page copy from desktop app */
.docs-help-page {
  max-width: 1240px;
  margin: 0 auto;
}

.help-view {
  height: 100%;
  overflow-y: auto;
  padding: 32px 40px;
}

.help-header {
  margin-bottom: 32px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--border);
}

.help-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  margin: 0 0 8px;
}

.help-subtitle {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0;
}

.help-layout {
  display: grid;
  grid-template-columns: minmax(200px, 220px) minmax(0, 1fr);
  gap: 28px 40px;
  align-items: start;
}

.help-toc-heading {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  margin: 0 0 12px;
}

.help-toc {
  position: sticky;
  top: 12px;
  align-self: start;
  max-height: calc(100vh - 40px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-card);
}

.help-toc-group + .help-toc-group {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

.help-toc-group-label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 8px;
}

.help-toc-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.help-toc-list li + li {
  margin-top: 2px;
}

.help-toc-link {
  display: block;
  font-size: 12px;
  line-height: 1.38;
  color: var(--text-muted);
  text-decoration: none;
  padding: 4px 2px;
  border-radius: 4px;
  margin-left: -2px;
}

.help-toc-link:hover {
  color: var(--accent);
}

.help-sections {
  display: flex;
  flex-direction: column;
  gap: 40px;
  min-width: 0;
}

.help-layout .help-section {
  scroll-margin-top: 20px;
}

.help-section {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.help-section--plan .help-plan-table-wrap {
  overflow-x: auto;
  margin-top: 4px;
}

.help-plan-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.help-plan-table th,
.help-plan-table td {
  border: 1px solid var(--border);
  padding: 8px 10px;
  text-align: left;
  vertical-align: top;
}

.help-plan-table thead {
  background: var(--bg-card);
}

.help-plan-table thead th {
  font-weight: 600;
  color: var(--text);
}

.help-section-title {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
  margin: 0;
}

.help-section-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  background: var(--accent);
  color: #fff;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 700;
  flex-shrink: 0;
}

.help-text {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.7;
  margin: 0;
}

.help-steps {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.help-steps li {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.5;
}

.help-steps--lg {
  padding-left: 20px;
  gap: 8px;
}

.help-steps--lg li {
  font-size: 13.5px;
}

.help-steps--lg li strong {
  color: var(--text);
}

.help-steps--lg li code,
.help-bullets li code,
.help-text code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 12px;
  color: var(--accent);
}

.help-bullets {
  margin: 0 0 16px;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-bullets li {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.help-bullets li strong {
  color: var(--text);
}

.help-tip {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  background: rgba(212, 145, 92, 0.07);
  border: 1px solid rgba(212, 145, 92, 0.25);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}

.help-tip-icon {
  font-size: 11px;
  border: 1px solid currentColor;
  border-radius: 999px;
  width: 16px;
  height: 16px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 1px;
}

.help-subheading {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin: 4px 0 0;
}

.help-subheading--indent {
  margin-top: 12px;
  font-size: 13px;
}

.help-syntax-block {
  margin: 10px 0 14px;
  padding: 12px 14px;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.55;
}

.help-syntax-sample {
  display: inline-block;
  margin-top: 8px;
  font-size: 11.5px;
  word-break: break-word;
  color: var(--accent);
  line-height: 1.45;
}

.help-operator-table-wrap {
  margin-top: 12px;
  margin-bottom: 8px;
}

.help-link-types {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.help-link-type {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.help-link-type-title {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
}

.help-link-type-desc {
  font-size: 12.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

.help-link-type-example {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 11px;
  color: var(--accent);
  background: var(--bg-input);
  border: 1px solid var(--border);
  border-radius: 4px;
  padding: 4px 8px;
  word-break: break-all;
}

.help-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.help-open-folder-btn {
  align-self: flex-start;
  text-decoration: none;
}

@media (max-width: 760px) {
  .hero {
    padding: 24px 18px;
  }
  .hero.hero-split {
    grid-template-columns: 1fr;
    gap: 18px;
    padding: 0;
    min-height: auto;
  }
  .hero.hero-split .hero-preview {
    margin-top: 0;
    justify-self: stretch;
    width: 100%;
    margin-right: 0;
    --hero-bleed: 0px;
  }
  .preview-shell {
    transform: none;
  }
  .what-grid {
    grid-template-columns: 1fr;
  }
  .docs-grid {
    grid-template-columns: 1fr;
  }
  .site-footer {
    align-items: flex-start;
    flex-direction: column;
  }
  .topbar {
    align-items: flex-start;
    flex-direction: column;
    margin-bottom: 28px;
  }
  .topnav {
    justify-content: flex-start;
  }
  .ai-marquee-wrap::before,
  .ai-marquee-wrap::after {
    width: 24px;
  }
  .ai-pill {
    padding: 7px 10px 7px 7px;
  }
  .ai-pill-name {
    font-size: 12px;
  }

  .help-view {
    padding: 24px 20px;
  }

  .help-layout {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .help-toc {
    position: static;
    max-height: none;
  }

  .help-link-types {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .ai-marquee-track {
    animation: none;
  }
}
