/* ---------- Tokens ---------- */

:root {
  --paper: #f4eee1;
  --paper-card: #fffdf7;
  --paper-tan: #ece2cc;
  --ink: #26201a;
  --ink-muted: #6b6255;
  --divider: #ddd0b8;
  --accent: #7f6df2;
  --accent-soft: rgba(127, 109, 242, 0.12);
  --button-ink: #241f16;
  --gold: #e8b85c;
  --coral: #e2895c;

  --font-display: "Fraunces", "Iowan Old Style", ui-serif, Georgia, serif;
  --font-ui: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-brand: "Qwitcher Grypen", cursive;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  font-size: 93.75%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  display: block;
}

a {
  color: inherit;
}

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

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

.eyebrow {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ---------- Buttons & pills ---------- */

.btn-ink {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  background: var(--button-ink);
  color: var(--paper);
  font-size: 0.95rem;
  font-weight: 600;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(36, 31, 22, 0.15);
}

.btn-ink:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(36, 31, 22, 0.2);
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.4rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 500;
  background: var(--paper-card);
  border: 1px solid var(--divider);
  color: var(--ink-muted);
  text-decoration: none;
}

.pill--badge {
  background: var(--paper-tan);
  color: var(--ink);
  font-weight: 600;
  font-size: 0.72rem;
}

/* ---------- Nav ---------- */

.nav-wrap {
  position: sticky;
  top: 20px;
  z-index: 30;
  display: flex;
  justify-content: center;
  padding: 0 20px;
}

.nav-pill {
  width: 100%;
  max-width: 860px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 10px 10px 10px 20px;
  border-radius: 999px;
  background: var(--paper-card);
  border: 1px solid var(--divider);
  box-shadow: 0 6px 20px rgba(36, 31, 22, 0.08);
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: var(--font-brand);
  font-size: 1.6rem;
  text-decoration: none;
  color: var(--ink);
}

.nav-brand img {
  height: 24px;
  width: auto;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 22px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.85rem;
  font-weight: 500;
  text-decoration: none;
  color: var(--ink-muted);
}

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

.nav-cta {
  display: inline-flex;
  align-items: center;
  padding: 0.6rem 1.2rem;
  border-radius: 999px;
  background: var(--button-ink);
  color: var(--paper);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
}

@media (max-width: 640px) {
  .nav-links {
    display: none;
  }
}

/* ---------- Hero ---------- */

.hero {
  padding: 64px 0 0;
  text-align: center;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.5rem;
  max-width: 100%;
  text-align: center;
  margin-bottom: 28px;
}

.hero-badge-text {
  min-width: 0;
  white-space: normal;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto 22px;
}

.hero-sub {
  max-width: 46ch;
  margin: 0 auto 32px;
  color: var(--ink-muted);
  font-size: 1.1rem;
}

.hero-caption {
  margin-top: 14px;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.hero-pills {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 36px 0 0;
}

/* Hero visual: screenshot afloat on a painterly gradient wash */

.hero-visual {
  position: relative;
  margin-top: 56px;
  padding: 90px 24px 60px;
  overflow: hidden;
}

.hero-glow {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(closest-side, rgba(127, 109, 242, 0.55), transparent),
    radial-gradient(closest-side, rgba(232, 184, 92, 0.5), transparent),
    radial-gradient(closest-side, rgba(226, 137, 92, 0.4), transparent);
  background-repeat: no-repeat;
  background-size: 60% 60%, 55% 55%, 50% 50%;
  background-position: 18% 30%, 80% 20%, 55% 85%;
  filter: blur(60px) saturate(115%);
  opacity: 0.85;
}

.hero-visual-frame {
  position: relative;
  z-index: 1;
  max-width: 940px;
  margin: 0 auto;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 40px 80px -30px rgba(36, 31, 22, 0.35);
  border: 1px solid rgba(255, 255, 255, 0.5);
}

.hero-visual-frame img {
  width: 100%;
}

/* ---------- Trust line ---------- */

.trust-line {
  padding: 56px 0;
  text-align: center;
}

.trust-line p.eyebrow {
  margin-bottom: 18px;
}

.trust-words {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 14px;
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: var(--ink-muted);
}

.trust-words span.dot {
  color: var(--divider);
  font-size: 1rem;
}

/* ---------- Steps ---------- */

.steps {
  padding: 40px 0 100px;
}

.steps-head {
  text-align: center;
  max-width: 56ch;
  margin: 0 auto 56px;
}

.steps-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4vw, 2.75rem);
  margin-top: 12px;
  letter-spacing: -0.01em;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
}

.step-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.3rem;
  margin-bottom: 8px;
}

.step-card p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 16px;
}

.step-mock {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 22px;
  min-height: 130px;
  display: flex;
  align-items: center;
}

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

/* mini mockups inside step cards, feature-owned vocabulary */

.mini-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mini-chip {
  font-size: 0.78rem;
  font-weight: 500;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--divider);
  color: var(--ink-muted);
  background: var(--paper);
}

.mini-chip--active {
  border-color: var(--accent);
  color: var(--accent);
  background: var(--accent-soft);
  font-weight: 650;
}

.mini-focus-compare {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  width: 100%;
}

.mini-focus-window {
  flex: 1;
  display: flex;
  gap: 4px;
  height: 40px;
  padding: 6px;
  border: 1px solid var(--divider);
  border-radius: 10px;
  background: var(--paper);
}

.mini-focus-window span {
  border-radius: 3px;
  background: var(--divider);
}

.mini-focus-window--before span:nth-child(1) { flex: 0 0 22%; }
.mini-focus-window--before span:nth-child(2) { flex: 1; background: var(--accent-soft); }
.mini-focus-window--before span:nth-child(3) { flex: 0 0 18%; }
.mini-focus-window--after span { flex: 1; background: var(--accent-soft); }

.mini-focus-arrow {
  flex: none;
  width: 14px;
  height: 14px;
  color: var(--ink-muted);
}

/* ---------- Feature deep-dives ---------- */

.deep-dive {
  padding: 60px 0;
}

.deep-dive-inner {
  display: grid;
  grid-template-columns: minmax(0, 0.85fr) minmax(0, 1.15fr);
  gap: 64px;
  align-items: center;
}

.deep-dive:nth-of-type(even) .deep-dive-inner {
  direction: rtl;
}

.deep-dive:nth-of-type(even) .deep-dive-inner > * {
  direction: ltr;
}

.deep-dive h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.9rem, 3.4vw, 2.6rem);
  line-height: 1.15;
  margin: 14px 0 16px;
}

.deep-dive p {
  color: var(--ink-muted);
  font-size: 1.02rem;
  margin-bottom: 20px;
}

.deep-dive-visual {
  position: relative;
  border-radius: 22px;
  padding: 28px;
  background:
    radial-gradient(circle at 25% 20%, rgba(127, 109, 242, 0.35), transparent 55%),
    radial-gradient(circle at 80% 80%, rgba(232, 184, 92, 0.35), transparent 55%),
    var(--paper-tan);
}

.deep-dive-visual .frame {
  border-radius: 14px;
  overflow: hidden;
  box-shadow: 0 30px 60px -25px rgba(36, 31, 22, 0.35);
}

@media (max-width: 860px) {
  .deep-dive-inner,
  .deep-dive:nth-of-type(even) .deep-dive-inner {
    grid-template-columns: 1fr;
    direction: ltr;
  }
}

/* ---------- Closing CTA ---------- */

.closing-cta {
  padding: 40px 0 110px;
  text-align: center;
}

.closing-cta h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2rem, 4.4vw, 3rem);
  max-width: 18ch;
  margin: 0 auto 16px;
  letter-spacing: -0.01em;
}

.closing-cta p {
  color: var(--ink-muted);
  margin-bottom: 30px;
}

/* ---------- Footer ---------- */

.alt-footer {
  border-top: 1px solid var(--divider);
  padding: 32px 0;
}

.alt-footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.alt-footer-inner a {
  text-decoration: none;
  color: var(--ink-muted);
  margin-left: 18px;
}

.alt-footer-inner a:hover {
  color: var(--ink);
}

/* ---------- Inner pages (download / support) ---------- */

.page-header {
  padding: 56px 0 8px;
  text-align: center;
}

.page-header h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.2rem, 4.6vw, 3.2rem);
  letter-spacing: -0.01em;
  margin-bottom: 14px;
}

.page-header p {
  color: var(--ink-muted);
  font-size: 1.05rem;
  max-width: 52ch;
  margin: 0 auto;
}

.page-content {
  padding: 48px 0 120px;
}

/* Download page */

.release-card {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 22px;
  padding: 40px;
  max-width: 620px;
  margin: 0 auto;
  box-shadow: 0 24px 50px -30px rgba(36, 31, 22, 0.25);
}

.release-version {
  display: flex;
  align-items: baseline;
  gap: 0.6rem;
  margin-bottom: 0.4rem;
}

.release-version .version-tag {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
}

.release-version .version-badge {
  font-size: 0.72rem;
  font-weight: 650;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  align-self: center;
}

.release-meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 1.75rem;
}

.release-assets {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.release-asset {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.1rem;
  border: 1px solid var(--divider);
  border-radius: 14px;
  text-decoration: none;
  color: var(--ink);
  background: var(--paper);
}

.release-asset:hover {
  border-color: var(--accent);
}

.release-asset .platform {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 600;
}

.release-asset .platform svg {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.release-asset .filesize {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.release-fallback {
  text-align: center;
  font-size: 0.875rem;
  color: var(--ink-muted);
}

.release-fallback a {
  text-decoration: underline;
}

.release-loading,
.release-error {
  text-align: center;
  color: var(--ink-muted);
  padding: 1rem 0;
}

/* Support page */

.support-form {
  max-width: 560px;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-field {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.form-field[hidden] {
  display: none;
}

.form-field label {
  font-size: 0.875rem;
  font-weight: 600;
}

.form-req {
  color: var(--coral);
}

.form-optional {
  font-weight: 500;
  color: var(--ink-muted);
}

.form-field input,
.form-field textarea,
.form-field select {
  font-family: inherit;
  font-size: 0.95rem;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--divider);
  background: var(--paper-card);
  color: var(--ink);
}

.form-field select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%236b6255' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  padding-right: 2.2rem;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
  outline: none;
  border-color: var(--accent);
}

.form-field input[aria-invalid="true"],
.form-field select:invalid:not(:focus):not([value=""]),
.form-field textarea:invalid:not(:focus):not(:placeholder-shown) {
  border-color: var(--coral);
}

.form-field textarea {
  resize: vertical;
  min-height: 140px;
}

.form-field textarea#steps {
  min-height: 110px;
}

.form-hint {
  margin: 0;
  font-size: 0.78rem;
  color: var(--ink-muted);
}

.form-error {
  margin: 0;
  font-size: 0.82rem;
  color: var(--coral);
  font-weight: 500;
}

.form-error[hidden] {
  display: none;
}

.form-check-label {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
}

.form-check-label input {
  margin-top: 0.2rem;
  width: 1rem;
  height: 1rem;
  flex: none;
  accent-color: var(--accent);
}

.form-honeypot {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  opacity: 0;
  overflow: hidden;
}

.form-note {
  font-size: 0.8rem;
  color: var(--ink-muted);
}

.form-success {
  display: none;
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  color: var(--ink);
  padding: 1rem 1.2rem;
  border-radius: 14px;
  max-width: 560px;
  margin: 0 auto 1.5rem;
}

/* ---------- Pricing modal ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(38, 32, 26, 0.55);
}

.modal-overlay[hidden] {
  display: none;
}

.modal-panel {
  position: relative;
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 22px;
  padding: 44px;
  max-width: 720px;
  width: 100%;
  max-height: 88vh;
  overflow-y: auto;
  box-shadow: 0 40px 80px -30px rgba(36, 31, 22, 0.35);
}

.modal-panel h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin: 0.4rem 0 0.6rem;
}

.modal-sub {
  color: var(--ink-muted);
  max-width: 56ch;
  margin-bottom: 2rem;
}

.modal-close {
  position: absolute;
  top: 20px;
  right: 20px;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--paper);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.modal-close:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.modal-close svg {
  width: 16px;
  height: 16px;
}

.pricing-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.pricing-card {
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 28px;
  background: var(--paper);
}

.pricing-card--pro {
  border-color: var(--accent);
  position: relative;
}

.pricing-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.pricing-card .price {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin-bottom: 1.25rem;
}

.pricing-card--pro .pill--badge {
  position: absolute;
  top: -12px;
  right: 24px;
}

.pricing-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  font-size: 0.9rem;
}

.pricing-features li {
  padding-left: 1.3rem;
  position: relative;
  color: var(--ink);
}

.pricing-features li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

.modal-note {
  margin-top: 1.75rem;
  font-size: 0.85rem;
  color: var(--ink-muted);
  text-align: center;
}

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

  .modal-panel {
    padding: 32px 24px;
  }
}

/* ---------- Theme showcase carousel ---------- */

.showcase {
  padding: 8px 0 40px;
}

.showcase-carousel {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
}

.showcase-frame {
  flex: 1;
  max-width: 940px;
}

.carousel-arrow {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid var(--divider);
  background: var(--paper-card);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.carousel-arrow:hover {
  color: var(--accent);
  border-color: var(--accent);
}

.carousel-arrow svg {
  width: 18px;
  height: 18px;
}

.showcase-caption {
  text-align: center;
  margin-top: 1.1rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--ink-muted);
}

.carousel-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 1.75rem;
}

.carousel-dot {
  width: 8px;
  height: 8px;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: var(--divider);
  cursor: pointer;
  transition: all 0.2s ease;
}

.carousel-dot.is-active {
  width: 22px;
  border-radius: 4px;
  background: var(--accent);
}

@media (max-width: 700px) {
  .showcase-carousel {
    gap: 10px;
  }

  .carousel-arrow {
    width: 36px;
    height: 36px;
  }
}

/* ---------- Theme compare slider ---------- */

.compare {
  --pos: 50%;
  position: relative;
  display: grid;
  overflow: hidden;
  user-select: none;
  touch-action: none;
  cursor: ew-resize;
  background: #1a1612;
}

.compare-base,
.compare-overlay {
  grid-area: 1 / 1;
  width: 100%;
  height: auto;
  display: block;
  max-width: none;
  pointer-events: none;
}

.compare-overlay {
  height: 100%;
  object-fit: cover;
  object-position: top center;
}

.compare-clip {
  grid-area: 1 / 1;
  position: relative;
  overflow: hidden;
  width: var(--pos);
  max-width: 100%;
  height: 100%;
  align-self: stretch;
  justify-self: start;
  z-index: 1;
}

.compare-clip .compare-overlay {
  width: var(--compare-w, 100%);
  max-width: none;
}

.compare-bar {
  position: absolute;
  top: 0;
  bottom: 0;
  left: var(--pos);
  z-index: 2;
  width: 2px;
  margin-left: -1px;
  background: rgba(255, 253, 247, 0.92);
  box-shadow: 0 0 0 1px rgba(36, 31, 22, 0.2);
  pointer-events: none;
}

.compare-knob {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 42px;
  height: 42px;
  border-radius: 999px;
  background: var(--paper-card);
  border: 1px solid var(--divider);
  box-shadow: 0 8px 20px rgba(36, 31, 22, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ink);
}

.compare-knob svg {
  width: 18px;
  height: 18px;
}

.compare-range {
  position: absolute;
  inset: 0;
  z-index: 3;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: ew-resize;
  appearance: none;
  -webkit-appearance: none;
}

.compare-label {
  position: absolute;
  z-index: 2;
  top: 12px;
  padding: 0.28rem 0.65rem;
  border-radius: 999px;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  pointer-events: none;
  background: rgba(36, 31, 22, 0.55);
  color: #fffdf7;
  backdrop-filter: blur(6px);
}

.compare-label--dark {
  left: 12px;
}

.compare-label--light {
  right: 12px;
}

.compare.is-dragging .compare-knob {
  transform: translate(-50%, -50%) scale(1.06);
}

.hero-visual-frame .compare,
.frame .compare {
  border-radius: inherit;
}

.deep-dive-visual .frame:has(.compare) {
  background: transparent;
  box-shadow: 0 30px 60px -25px rgba(36, 31, 22, 0.35);
}

/* ---------- Features page: mini UI mockups ---------- */

.frame--mock {
  background: var(--paper-card);
  padding: 34px;
  min-height: 250px;
  display: flex;
  align-items: center;
}

.mini-feature {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.mini-feature-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.mini-feature-icon svg {
  width: 100%;
  height: 100%;
}

.mini-pathbar {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.82rem;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--ink-muted);
  background: var(--paper);
}

.mini-pathbar svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ink-muted);
}

.mini-list {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.mini-list-row {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.82rem;
  padding: 0.55rem 0.8rem;
  border: 1px solid var(--divider);
  border-radius: 12px;
  color: var(--ink-muted);
  background: var(--paper);
}

.mini-list-row strong {
  color: var(--ink);
  font-weight: 600;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.78rem;
}

.mini-list-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--divider);
  flex: none;
}

.mini-list-row--latest .mini-list-dot {
  background: var(--accent);
}

.mini-branch-row {
  display: flex;
  align-items: center;
  gap: 0.7rem;
}

.mini-branch-row .mini-feature-icon {
  width: 22px;
  height: 22px;
}

.mini-search-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  font-size: 0.82rem;
  padding: 0.6rem 0.8rem;
  border: 1px solid var(--divider);
  border-radius: 999px;
  color: var(--ink);
  background: var(--paper);
}

.mini-search-bar svg {
  width: 15px;
  height: 15px;
  flex: none;
  color: var(--ink-muted);
}

.mini-search-result {
  font-size: 0.8rem;
  color: var(--ink-muted);
  padding: 0 0.85rem;
}

.mini-search-result mark {
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 650;
  border-radius: 3px;
  padding: 0 0.15em;
}

/* ---------- Mobility diagram ---------- */

.mobility-diagram {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.mobility-repo {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  margin-bottom: 4px;
  text-align: center;
}

.mobility-repo-icon {
  width: 30px;
  height: 30px;
  color: var(--accent);
}

.mobility-repo-icon svg {
  width: 100%;
  height: 100%;
}

.mobility-repo-label {
  font-size: 0.82rem;
  font-weight: 650;
  color: var(--ink);
}

.mobility-connectors {
  width: 100%;
  max-width: 380px;
  height: 36px;
  color: var(--divider);
}

.mobility-devices {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  width: 100%;
  max-width: 380px;
}

.mobility-device {
  flex: 1;
  min-width: 74px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 12px 6px;
  border: 1px solid var(--divider);
  border-radius: 14px;
  background: var(--paper);
  text-align: center;
}

.mobility-device--new {
  border-color: var(--accent);
  background: var(--accent-soft);
}

.mobility-device-icon {
  width: 20px;
  height: 20px;
  color: var(--ink-muted);
}

.mobility-device--new .mobility-device-icon {
  color: var(--accent);
}

.mobility-device-icon svg {
  width: 100%;
  height: 100%;
}

.mobility-device-name {
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.25;
}

.mobility-device-tag {
  font-size: 0.66rem;
  font-weight: 500;
  color: var(--ink-muted);
}

.mobility-device-tag--new {
  color: var(--accent);
  font-weight: 650;
}

.mobility-device-tag--phone {
  color: var(--accent);
  font-weight: 650;
}

.mobility-caption {
  margin-top: 14px;
  font-size: 0.72rem;
  text-align: center;
  color: var(--ink-muted);
  max-width: 320px;
}

@media (max-width: 420px) {
  .mobility-device-name {
    font-size: 0.68rem;
  }
}

/* ---------- Ecosystem diagram (Companion / Mobile tab) ---------- */

.ecosystem-diagram {
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ecosystem-tabbar {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;
  padding: 9px 10px;
  border: 1px solid var(--divider);
  border-radius: 12px;
  background: var(--paper);
  width: 100%;
}

.ecosystem-tab {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--ink-muted);
  padding: 0.32rem 0.6rem;
  border-radius: 8px;
  white-space: nowrap;
}

.ecosystem-tab--active {
  background: var(--accent-soft);
  color: var(--accent);
}

.ecosystem-tab--mobile {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: var(--paper-tan);
  color: var(--ink);
  border: 1px solid var(--accent);
}

.ecosystem-tab--mobile svg {
  width: 12px;
  height: 12px;
  flex: none;
}

.ecosystem-arrow {
  width: 16px;
  height: 16px;
  color: var(--divider);
}

.ecosystem-phone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 18px;
  border: 1px solid var(--accent);
  border-radius: 14px;
  background: var(--accent-soft);
}

.ecosystem-phone-icon {
  width: 20px;
  height: 20px;
  color: var(--accent);
}

.ecosystem-phone-icon svg {
  width: 100%;
  height: 100%;
}

.ecosystem-phone-name {
  font-size: 0.78rem;
  font-weight: 650;
  color: var(--ink);
}

.ecosystem-phone-tag {
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--accent);
}

.ecosystem-caption {
  margin-top: 12px;
  font-size: 0.72rem;
  text-align: center;
  color: var(--ink-muted);
  max-width: 300px;
}

.deep-dive-visual .frame + .frame {
  margin-top: 16px;
}

/* ---------- Companion page ---------- */

.companion-hero {
  padding: 56px 0 0;
  text-align: center;
}

.companion-hero h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.1;
  letter-spacing: -0.01em;
  max-width: 16ch;
  margin: 0 auto 18px;
}

.companion-hero .hero-sub {
  max-width: 48ch;
}

.companion-store-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 8px;
}

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.75rem 1.25rem;
  border-radius: 14px;
  background: var(--button-ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  box-shadow: 0 1px 2px rgba(36, 31, 22, 0.15);
}

.store-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(36, 31, 22, 0.2);
}

.store-btn--ghost {
  background: var(--paper-card);
  color: var(--ink);
  border-color: var(--divider);
}

.store-btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.store-btn .store-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.15;
  text-align: left;
}

.store-btn .store-meta small {
  font-size: 0.65rem;
  font-weight: 500;
  opacity: 0.75;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.companion-hero-phones {
  position: relative;
  margin-top: 48px;
  padding: 70px 24px 50px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 28px;
  overflow: hidden;
}

.companion-hero-phones .hero-glow {
  opacity: 0.9;
}

.phone-frame {
  position: relative;
  z-index: 1;
  width: min(240px, 42vw);
  border-radius: 28px;
  overflow: hidden;
  background: #111;
  border: 3px solid #1a1612;
  box-shadow: 0 36px 70px -28px rgba(36, 31, 22, 0.45);
}

.phone-frame img {
  width: 100%;
  height: auto;
  display: block;
}

.phone-frame--hero-main {
  width: min(280px, 52vw);
}

.phone-frame--hero-side {
  width: min(210px, 34vw);
  transform: translateY(18px);
  opacity: 0.92;
}

.phone-slideshow {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.phone-slideshow .phone-frame {
  width: min(260px, 70vw);
}

.phone-slideshow-stage {
  position: relative;
  width: min(260px, 70vw);
}

.phone-slideshow-stage [data-slide] {
  display: block;
  width: 100%;
}

.phone-slideshow-stage [data-slide][hidden] {
  display: none;
}

.phone-dots {
  display: flex;
  gap: 8px;
  justify-content: center;
}

.phone-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  padding: 0;
  background: var(--divider);
  cursor: pointer;
}

.phone-dot.is-active {
  background: var(--accent);
  width: 22px;
}

.deep-dive-visual--phones {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 420px;
}

.deep-dive code {
  font-size: 0.88em;
  background: var(--paper-tan);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.companion-cta-note a {
  color: var(--accent);
}

/* ---------- Legal pages ---------- */

.legal-content {
  max-width: 720px;
  margin: 0 auto;
  padding: 32px 0 100px;
}

.legal-content h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.45rem;
  margin: 2rem 0 0.75rem;
}

.legal-content p,
.legal-content li {
  color: var(--ink-muted);
  font-size: 0.98rem;
}

.legal-content p {
  margin-bottom: 0.9rem;
}

.legal-content ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.legal-content li {
  margin-bottom: 0.45rem;
}

.legal-content code {
  font-size: 0.88em;
  background: var(--paper-tan);
  padding: 0.1em 0.35em;
  border-radius: 4px;
}

.legal-content a {
  color: var(--accent);
}

.legal-meta {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin-bottom: 1.25rem;
}

/* ---------- Small-screen overrides (kept last so they win the cascade) ---------- */

@media (max-width: 640px) {
  .hero-badge {
    display: block;
    max-width: 300px;
    margin-left: auto;
    margin-right: auto;
  }

  .hero-badge .pill--badge {
    display: inline-flex;
    vertical-align: middle;
    margin-right: 0.4rem;
  }

  .hero-badge-text {
    display: inline;
  }

  .phone-frame--hero-side {
    display: none;
  }

  .companion-hero-phones {
    padding-top: 48px;
  }
}

/* ---------- Compare page (Word / Scrivener / StelaWare) ---------- */

.compare-intro {
  padding: 28px 0 8px;
}

.compare-intro-lead {
  max-width: 68ch;
  margin: 0 auto 36px;
  text-align: center;
  color: var(--ink-muted);
  font-size: 1.02rem;
}

.compare-tools {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  margin-bottom: 24px;
}

.compare-tool {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 18px;
  padding: 26px 24px;
}

.compare-tool--stela {
  border-color: var(--accent);
  box-shadow: 0 18px 40px -28px rgba(127, 109, 242, 0.45);
}

.compare-tool .eyebrow {
  margin-bottom: 10px;
}

.compare-tool h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.35rem;
  line-height: 1.2;
  margin-bottom: 12px;
}

.compare-tool p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0;
}

.compare-diff {
  padding: 52px 0;
  border-top: 1px solid var(--divider);
}

.compare-diff:first-of-type {
  border-top: none;
}

.compare-diff-head {
  max-width: 62ch;
  margin-bottom: 28px;
}

.compare-diff-head h2 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: clamp(1.55rem, 2.8vw, 2.05rem);
  line-height: 1.2;
  margin: 10px 0 0;
}

.compare-diff-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.compare-diff-col {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 22px 20px;
}

.compare-diff-col--stela {
  border-color: var(--accent);
  background: linear-gradient(180deg, rgba(127, 109, 242, 0.06), var(--paper-card) 42%);
}

.compare-diff-col h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.08rem;
  margin-bottom: 10px;
}

.compare-diff-col p {
  color: var(--ink-muted);
  font-size: 0.9rem;
  margin: 0;
}

.compare-table-wrap {
  padding: 20px 0 40px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.compare-table {
  width: 100%;
  min-width: 720px;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 18px;
  overflow: hidden;
}

.compare-table th,
.compare-table td {
  padding: 16px 18px;
  text-align: left;
  vertical-align: top;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--divider);
  border-right: 1px solid var(--divider);
}

.compare-table th:last-child,
.compare-table td:last-child {
  border-right: none;
}

.compare-table tbody tr:last-child th,
.compare-table tbody tr:last-child td {
  border-bottom: none;
}

.compare-table thead th {
  background: var(--paper-tan);
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 0.98rem;
  color: var(--ink);
}

.compare-table thead th.compare-col-stela {
  background: rgba(127, 109, 242, 0.14);
  color: var(--ink);
}

.compare-table tbody th {
  font-weight: 600;
  color: var(--ink);
  background: rgba(236, 226, 204, 0.35);
  width: 18%;
}

.compare-table td {
  color: var(--ink-muted);
  width: 27.3%;
}

.compare-table td.compare-col-stela {
  color: var(--ink);
  background: rgba(127, 109, 242, 0.05);
  font-weight: 500;
}

.compare-fit {
  padding: 20px 0 8px;
}

.compare-fit-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.compare-fit-card {
  background: var(--paper-card);
  border: 1px solid var(--divider);
  border-radius: 16px;
  padding: 24px 22px;
}

.compare-fit-card--stela {
  border-color: var(--accent);
}

.compare-fit-card h3 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.15rem;
  margin-bottom: 10px;
}

.compare-fit-card p {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0;
}

.compare-fit-card--stela p {
  color: var(--ink);
}

@media (max-width: 900px) {
  .compare-tools,
  .compare-diff-grid,
  .compare-fit-grid {
    grid-template-columns: 1fr;
  }
}
