/* macrotool.app — shared styles */
:root {
  --ink: #0f1a17;
  --ink-2: #33403c;
  --muted: #5d6965;
  --paper: #f5f3ec;
  --paper-2: #ece9df;
  --surface: #ffffff;
  --line: #ddd8cb;
  --line-2: #c9c3b3;
  --green: #0b5d46;
  --green-2: #0f7a5c;
  --green-deep: #08362a;
  --lime: #c8f26a;
  --lime-2: #e6fab4;
  --amber: #f2b33d;
  --radius: 14px;
  --radius-sm: 8px;
  --shadow: 0 1px 0 rgba(15, 26, 23, .04), 0 12px 32px -12px rgba(15, 26, 23, .18);
  --font-display: "Bricolage Grotesque", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", ui-monospace, "Cascadia Code", Consolas, monospace;
  --wrap: 1160px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
/* keep the page from scrolling sideways on phones (clip keeps the sticky header working) */
html, body { overflow-x: clip; }
img { max-width: 100%; display: block; }
a { color: var(--green); text-underline-offset: 3px; }
a:hover { color: var(--green-2); }
:focus-visible { outline: 3px solid var(--green-2); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.08; letter-spacing: -.02em; margin: 0 0 .5em; font-weight: 700; }
h1 { font-size: clamp(2.5rem, 6vw, 4.6rem); letter-spacing: -.035em; }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.8rem); letter-spacing: -.03em; }
h3 { font-size: 1.3rem; letter-spacing: -.01em; }
p { margin: 0 0 1em; }
code, kbd, .mono { font-family: var(--font-mono); font-size: .88em; }
code { background: var(--paper-2); padding: .12em .4em; border-radius: 5px; }
kbd { border: 1px solid var(--line-2); border-bottom-width: 2px; border-radius: 5px; padding: .05em .4em; background: var(--surface); }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
@media (max-width: 600px) { .wrap { padding: 0 16px; } body { font-size: 16px; } }

.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.site-header.scrolled { border-bottom-color: var(--line); }
.nav { display: flex; align-items: center; justify-content: space-between; height: 68px; gap: 16px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--font-display); font-weight: 700; font-size: 1.28rem; letter-spacing: -.02em; }
.brand:hover { color: var(--ink); }
.brand svg { width: 32px; height: 32px; flex: none; }
.brand .tld { color: var(--muted); font-weight: 500; }
.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: .95rem; }
.nav-links a:hover, .nav-links a[aria-current="page"] { background: var(--paper-2); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line-2); border-radius: 10px; width: 42px; height: 42px; cursor: pointer; color: var(--ink); }
.nav-toggle svg { width: 20px; height: 20px; }
@media (max-width: 820px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links { position: absolute; top: 68px; left: 0; right: 0; flex-direction: column; align-items: stretch; background: var(--paper); border-bottom: 1px solid var(--line); padding: 8px 16px 16px; display: none; }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 12px 14px; }
  .nav-links .btn { margin-top: 6px; text-align: center; justify-content: center; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 20px; border-radius: 999px; border: 1px solid transparent;
  font: 600 .98rem/1 var(--font-body); text-decoration: none; cursor: pointer;
  transition: transform .15s ease, background .15s, box-shadow .15s, color .15s;
}
.btn svg { width: 18px; height: 18px; }
.btn-primary { background: var(--ink); color: #fff; }
.btn-primary:hover { background: var(--green); color: #fff; transform: translateY(-1px); }
.btn-lime { background: var(--lime); color: var(--ink); }
.btn-lime:hover { background: #d6f78a; color: var(--ink); transform: translateY(-1px); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn-ghost:hover { border-color: var(--ink); color: var(--ink); }
.btn-ghost-light { color: #fff; border-color: rgba(255,255,255,.3); background: transparent; }
.btn-ghost-light:hover { color: #fff; border-color: #fff; }
.nav-links .btn { padding: 10px 16px; font-size: .92rem; }
.nav-links .btn-primary, .nav-links .btn-primary:hover { color: #fff; }

/* ---------- labels / cell references ---------- */
.cellref {
  display: inline-flex; align-items: center; gap: 10px;
  font: 500 .78rem/1 var(--font-mono); letter-spacing: .04em; text-transform: uppercase; color: var(--muted);
  margin-bottom: 18px;
}
.cellref b { display: inline-grid; place-items: center; min-width: 30px; height: 22px; padding: 0 6px; border: 1.5px solid var(--green); color: var(--green); border-radius: 4px; font-weight: 600; background: var(--surface); }
.on-dark .cellref { color: rgba(255,255,255,.6); }
.on-dark .cellref b { border-color: var(--lime); color: var(--lime); background: transparent; }

/* ---------- hero ---------- */
.hero { position: relative; padding: 72px 0 96px; overflow: hidden; }
.grid-bg {
  position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 120px 34px;
  background-position: -1px -1px;
  mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 70% 30%, #000 20%, transparent 75%);
  opacity: .7;
}
.hero-inner { display: grid; grid-template-columns: 1.05fr .95fr; gap: 56px; align-items: center; }
.hero h1 .hl { position: relative; white-space: nowrap; }
.hero h1 .hl::after { content: ""; position: absolute; left: -4px; right: -4px; bottom: .06em; height: .32em; background: var(--lime); z-index: -1; border-radius: 3px; }
.hero .lede { font-size: 1.2rem; color: var(--ink-2); max-width: 34em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.hero-meta { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-top: 32px; color: var(--muted); font-size: .92rem; }
.hero-meta span { display: inline-flex; align-items: center; gap: 8px; }
.hero-meta svg { width: 16px; height: 16px; color: var(--green); }
@media (max-width: 960px) { .hero-inner { grid-template-columns: 1fr; gap: 44px; } .hero { padding: 48px 0 72px; } }

/* formula bar + sheet mock */
.sheet {
  background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius);
  box-shadow: var(--shadow); overflow: hidden; font-size: .86rem;
}
.sheet-bar { display: flex; align-items: center; gap: 0; border-bottom: 1px solid var(--line); font-family: var(--font-mono); font-size: .8rem; }
.sheet-bar .ref { padding: 10px 14px; border-right: 1px solid var(--line); color: var(--muted); min-width: 64px; }
.sheet-bar .fx { padding: 10px 12px; color: var(--muted); font-style: italic; border-right: 1px solid var(--line); }
.sheet-bar .formula { padding: 10px 14px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; flex: 1; }
.formula .fn { color: var(--green); font-weight: 600; }
.formula .str { color: #a2541b; }
.caret { display: inline-block; width: 2px; height: 1.05em; background: var(--ink); vertical-align: -2px; margin-left: 1px; animation: blink 1.1s steps(1) infinite; }
@keyframes blink { 50% { opacity: 0; } }

.sheet table { width: 100%; border-collapse: collapse; table-layout: fixed; }
.sheet th, .sheet td { border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 8px 10px; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet th { background: var(--paper); font: 500 .74rem/1 var(--font-mono); color: var(--muted); text-align: center; padding: 6px; }
.sheet th:first-child, .sheet td:first-child { width: 38px; text-align: center; background: var(--paper); color: var(--muted); font: 500 .74rem/1 var(--font-mono); }
.sheet tr.head td { font-weight: 600; background: #fbfaf6; }
.sheet td:last-child, .sheet th:last-child { border-right: 0; }
.pill { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .76rem; font-weight: 600; }
.pill.wait { background: #fdf0d2; color: #8a5a00; }
.pill.go { background: var(--lime-2); color: #2c5300; }
.pill.done { background: #dcefe8; color: var(--green); }
.pill.neutral { background: var(--paper-2); color: var(--ink-2); }
.sheet-tabs { display: flex; gap: 2px; padding: 6px 8px 0; background: var(--paper); border-top: 1px solid var(--line); font-size: .8rem; }
.sheet-tabs span { padding: 7px 14px; border-radius: 8px 8px 0 0; color: var(--muted); display: inline-flex; gap: 6px; align-items: center; }
.sheet-tabs span.active { background: var(--surface); color: var(--green); font-weight: 600; box-shadow: inset 0 2px 0 var(--green); }
.sheet-tabs .count { font: 600 .7rem/1 var(--font-mono); background: var(--paper-2); padding: 3px 6px; border-radius: 6px; color: var(--ink-2); }

/* animated transfer demo */
.demo tr.mover td { transition: background .3s; }
.demo.play tr.mover { animation: moveRow 6s ease-in-out infinite; }
.demo.play tr.mover .status-a { animation: swapA 6s steps(1) infinite; }
.demo.play tr.mover .status-b { animation: swapB 6s steps(1) infinite; }
.demo.play .count-done { animation: bump 6s ease infinite; }
.swap { display: inline-grid; }
.swap > * { grid-area: 1 / 1; justify-self: start; }
.status-b { opacity: 0; }
@keyframes swapA { 0%, 24% { opacity: 1; } 25%, 100% { opacity: 0; } }
@keyframes swapB { 0%, 24% { opacity: 0; } 25%, 100% { opacity: 1; } }
@keyframes moveRow {
  0%, 24% { opacity: 1; transform: none; background: transparent; }
  25%, 45% { background: var(--lime-2); opacity: 1; transform: none; }
  62% { opacity: 0; transform: translateX(40px); }
  63%, 88% { opacity: 0; transform: translateX(-20px); }
  100% { opacity: 1; transform: none; }
}
@keyframes bump {
  0%, 60% { background: var(--paper-2); color: var(--ink-2); }
  64%, 86% { background: var(--green); color: #fff; }
  100% { background: var(--paper-2); color: var(--ink-2); }
}
@media (prefers-reduced-motion: reduce) {
  .demo.play tr.mover, .demo.play .count-done, .caret { animation: none !important; }
}

/* floating chips around hero mock */
.mock-wrap { position: relative; }
.chip {
  position: absolute; z-index: 2; background: var(--ink); color: #fff; border-radius: 12px; padding: 10px 14px;
  font-size: .82rem; line-height: 1.3; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center;
}
.chip svg { width: 18px; height: 18px; color: var(--lime); flex: none; }
.chip small { display: block; color: rgba(255,255,255,.6); font-size: .74rem; }
.chip-a { right: -18px; top: -22px; }
.chip-b { left: -22px; bottom: -26px; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); }
.chip-b svg { color: var(--green); }
.chip-b small { color: var(--muted); }
@media (max-width: 600px) { .chip-a { right: 6px; top: -30px; } .chip-b { left: 6px; bottom: -34px; } }

/* ---------- sections ---------- */
.section { padding: 96px 0; }
.section-tight { padding: 64px 0; }
.section-head { max-width: 680px; margin-bottom: 48px; }
.section-head p { color: var(--muted); font-size: 1.08rem; }
.dark { background: var(--green-deep); color: #e8efe9; }
.dark h2, .dark h3 { color: #fff; }
.dark a { color: var(--lime); }
.band { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--surface); }
@media (max-width: 600px) { .section { padding: 64px 0; } }

/* app cards */
.apps-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.app-card {
  position: relative; display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 28px; text-decoration: none; color: var(--ink); min-height: 300px;
  transition: transform .2s ease, box-shadow .2s, border-color .2s;
}
a.app-card:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--line-2); color: var(--ink); }
.app-card.featured { grid-column: span 2; background: var(--ink); color: #e8efe9; border-color: var(--ink); display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: center; }
.app-card.featured h3 { color: #fff; font-size: 1.9rem; }
.app-card.featured p { color: rgba(232,239,233,.78); }
a.app-card.featured:hover { color: #e8efe9; border-color: var(--green); }
.app-icon { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; margin-bottom: 18px; }
.app-icon svg { width: 56px; height: 56px; }
.app-tag { display: inline-flex; align-items: center; gap: 6px; font: 600 .72rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .06em; padding: 6px 10px; border-radius: 999px; margin-bottom: 14px; }
.app-tag.live { background: var(--lime); color: var(--ink); }
.app-tag.soon { background: var(--paper-2); color: var(--muted); }
.app-card .more { margin-top: auto; padding-top: 16px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; color: var(--green); }
.app-card.featured .more { color: var(--lime); }
.app-card .more svg { width: 18px; height: 18px; transition: transform .2s; }
a.app-card:hover .more svg { transform: translateX(4px); }
.app-card.ghost { border-style: dashed; background: transparent; }
.app-card.ghost h3 { color: var(--ink-2); }
.app-card.ghost p { color: var(--muted); }
.featured .sheet { color: var(--ink); font-size: .8rem; }
@media (max-width: 960px) {
  .apps-grid { grid-template-columns: 1fr 1fr; }
  .app-card.featured { grid-column: span 2; grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .apps-grid { grid-template-columns: 1fr; }
  .app-card.featured { grid-column: auto; }
}

/* pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0; border-top: 1px solid var(--line); }
.pillar { padding: 32px 28px 8px 0; border-right: 1px solid var(--line); }
.pillar + .pillar { padding-left: 28px; }
.pillar:last-child { border-right: 0; }
.pillar .num { font: 600 .8rem/1 var(--font-mono); color: var(--green); margin-bottom: 16px; display: block; }
.pillar p { color: var(--muted); }
@media (max-width: 820px) {
  .pillars { grid-template-columns: 1fr; }
  .pillar, .pillar + .pillar { padding: 24px 0 4px; border-right: 0; border-bottom: 1px solid var(--line); }
}

/* developer */
.dev { display: grid; grid-template-columns: 380px 1fr; gap: 64px; align-items: start; }
.dev-photo { position: relative; }
.dev-photo img { border-radius: 18px; aspect-ratio: 1 / 1; object-fit: cover; width: 100%; filter: saturate(.95); }
.dev-photo::before { content: ""; position: absolute; inset: 14px -14px -14px 14px; border: 1.5px solid var(--lime); border-radius: 18px; z-index: -1; }
.badge-row { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 26px; }
.badge {
  display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); font-size: .88rem; color: #fff;
}
.badge svg { width: 16px; height: 16px; color: var(--lime); }
.dev h2 { margin-bottom: .2em; }
.dev .role { font-family: var(--font-mono); color: var(--lime); font-size: .95rem; letter-spacing: .02em; }
.dev .bio { color: rgba(232,239,233,.82); font-size: 1.06rem; max-width: 40em; }
.skills { display: grid; grid-template-columns: repeat(2, 1fr); gap: 2px; margin: 32px 0; border-radius: 12px; overflow: hidden; }
.skill { background: rgba(255,255,255,.05); padding: 18px 20px; }
.skill h4 { font-size: 1rem; color: #fff; margin-bottom: .3em; letter-spacing: 0; }
.skill p { margin: 0; color: rgba(232,239,233,.68); font-size: .9rem; line-height: 1.5; }
.dev-photo .caption { margin-top: 26px; font-size: .9rem; color: rgba(232,239,233,.65); }
.dev-photo .caption strong { color: #fff; display: block; font-size: 1.05rem; }
@media (max-width: 900px) {
  .dev { grid-template-columns: 1fr; gap: 40px; }
  .dev-photo { max-width: 320px; }
}
@media (max-width: 560px) { .skills { grid-template-columns: 1fr; } }

/* work list */
.work { list-style: none; padding: 0; margin: 0; counter-reset: w; }
.work li { display: grid; grid-template-columns: 64px 1fr; gap: 16px; padding: 20px 0; border-top: 1px solid rgba(255,255,255,.12); }
.work li::before { counter-increment: w; content: "0" counter(w); font: 600 .85rem/1.9 var(--font-mono); color: var(--lime); }
.work h4 { margin: 0 0 .25em; font-size: 1.05rem; color: #fff; letter-spacing: 0; }
.work p { margin: 0; color: rgba(232,239,233,.7); font-size: .94rem; }

/* CTA band */
.cta { background: var(--lime); border-radius: 22px; padding: 56px; display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: center; }
.cta h2 { margin: 0 0 .25em; }
.cta p { margin: 0; color: var(--ink-2); }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; padding: 36px 24px; } }

/* ---------- product page ---------- */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 22px; }
.crumbs a { color: var(--muted); }
.product-hero h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
.product-title { display: flex; align-items: center; gap: 18px; margin-bottom: 18px; }
.product-title svg { width: 64px; height: 64px; flex: none; }
.product-title h1 { margin: 0; }
.status-line { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 22px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.feature .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--lime-2); color: var(--green); margin-bottom: 16px; }
.feature .ic svg { width: 22px; height: 22px; }
.feature h3 { font-size: 1.12rem; margin-bottom: .4em; }
.feature p { color: var(--muted); font-size: .95rem; margin: 0; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .features { grid-template-columns: 1fr; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; counter-reset: s; }
.steps li { position: relative; padding-top: 52px; }
.steps li::before { counter-increment: s; content: counter(s); position: absolute; top: 0; left: 0; width: 38px; height: 38px; border-radius: 50%; background: var(--ink); color: var(--lime); display: grid; place-items: center; font: 700 1rem/1 var(--font-display); }
.steps li::after { content: ""; position: absolute; top: 19px; left: 50px; right: -10px; height: 1px; background: var(--line-2); }
.steps li:last-child::after { display: none; }
.steps h3 { font-size: 1.1rem; }
.steps p { color: var(--muted); font-size: .95rem; }
@media (max-width: 900px) { .steps { grid-template-columns: 1fr 1fr; } .steps li::after { display: none; } }
@media (max-width: 560px) { .steps { grid-template-columns: 1fr; } }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
@media (max-width: 900px) { .split { grid-template-columns: 1fr; gap: 36px; } }

.check-list { list-style: none; padding: 0; margin: 0 0 1em; }
.check-list li { position: relative; padding-left: 32px; margin-bottom: 12px; }
.check-list li::before { content: ""; position: absolute; left: 0; top: .32em; width: 20px; height: 20px; border-radius: 6px; background: var(--lime) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230f1a17' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L20 7'/%3E%3C/svg%3E") center/13px no-repeat; }
.dark .check-list li::before { background-color: var(--lime); }

/* email mock */
.mail { background: var(--surface); border: 1px solid var(--line-2); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; color: var(--ink); }
.mail-head { padding: 16px 20px; border-bottom: 1px solid var(--line); font-size: .88rem; }
.mail-head .subj { font-weight: 700; font-size: 1.02rem; margin-bottom: 4px; }
.mail-head .from { color: var(--muted); }
.mail-body { padding: 18px 20px; font-size: .92rem; }
.mail-body table { border-collapse: collapse; margin-top: 10px; font-size: .86rem; }
.mail-body td { padding: 6px 10px; border-bottom: 1px solid var(--line); }
.mail-body td:first-child { background: #f1f5f4; font-weight: 600; color: #24403b; }
.token { font-family: var(--font-mono); font-size: .8em; background: var(--lime-2); color: #2c5300; padding: 1px 6px; border-radius: 4px; }

/* permissions table */
.perm { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; font-size: .95rem; }
.perm th, .perm td { text-align: left; padding: 14px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.perm th { background: var(--paper); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; }
.perm tr:last-child td { border-bottom: 0; }
.perm code { font-size: .78rem; word-break: break-all; }
.table-scroll { overflow-x: auto; border-radius: var(--radius); }

/* FAQ */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; padding: 22px 44px 22px 0; position: relative; font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; letter-spacing: -.01em; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font: 400 1.6rem/1 var(--font-body); color: var(--green); transition: transform .2s; }
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq .ans { padding: 0 0 22px; color: var(--ink-2); max-width: 760px; }

/* ---------- docs / legal ---------- */
.doc-layout { display: grid; grid-template-columns: 240px 1fr; gap: 64px; align-items: start; padding: 56px 0 96px; }
.toc { position: sticky; top: 96px; font-size: .92rem; }
.toc h4 { font: 600 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 14px; }
.toc ol { list-style: none; padding: 0; margin: 0; border-left: 1px solid var(--line); }
.toc a { display: block; padding: 6px 0 6px 16px; color: var(--ink-2); text-decoration: none; margin-left: -1px; border-left: 2px solid transparent; }
.toc a:hover, .toc a.active { color: var(--green); border-left-color: var(--green); }
.doc { max-width: 760px; }
.doc h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); }
.doc h2 { font-size: 1.7rem; margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); scroll-margin-top: 90px; }
.doc h3 { margin-top: 1.6em; scroll-margin-top: 90px; }
.doc ul, .doc ol { padding-left: 1.3em; }
.doc li { margin-bottom: .45em; }
.doc .meta { color: var(--muted); font-size: .95rem; }
.callout { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--green); border-radius: var(--radius-sm); padding: 18px 22px; margin: 1.4em 0; }
.callout.lime { border-left-color: var(--lime); background: #fbfdf3; }
.callout p:last-child { margin-bottom: 0; }
.shot { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 14px 18px; font-family: var(--font-mono); font-size: .85rem; color: var(--ink-2); margin: 1em 0; }
.shot .arrow { color: var(--green); padding: 0 6px; }
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; gap: 24px; padding-top: 32px; }
  .toc { position: static; }
  .toc ol { display: flex; flex-wrap: wrap; gap: 4px 12px; border-left: 0; }
  .toc a { padding: 4px 0; border-left: 0; }
}

/* support cards */
.support-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.support-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; display: flex; flex-direction: column; }
.support-card .ic { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--ink); color: var(--lime); margin-bottom: 18px; }
.support-card .ic svg { width: 22px; height: 22px; }
.support-card p { color: var(--muted); }
.support-card .btn { margin-top: auto; align-self: flex-start; }
@media (max-width: 900px) { .support-grid { grid-template-columns: 1fr; } }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: rgba(232,239,233,.7); padding: 64px 0 32px; font-size: .94rem; }
.site-footer a { color: rgba(232,239,233,.85); text-decoration: none; }
.site-footer a:hover { color: var(--lime); }
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1fr; gap: 40px; }
.site-footer .brand { color: #fff; margin-bottom: 14px; }
.site-footer .brand .tld { color: rgba(255,255,255,.5); }
.site-footer h4 { font: 600 .75rem/1 var(--font-mono); text-transform: uppercase; letter-spacing: .08em; color: rgba(232,239,233,.5); margin-bottom: 16px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 10px; }
.foot-bottom { margin-top: 48px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,.1); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px; font-size: .84rem; color: rgba(232,239,233,.5); }
@media (max-width: 820px) { .foot-grid { grid-template-columns: 1fr 1fr; } .foot-grid > :first-child { grid-column: 1 / -1; } }

/* ---------- reveal ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- fixes ---------- */
.dark .btn-lime, .dark .btn-lime:hover { color: var(--ink); }
.dark .btn-ghost-light, .dark .btn-ghost-light:hover { color: #fff; }
.token { white-space: nowrap; }
.mock-wrap { margin-bottom: 48px; }
.chip-b { bottom: -58px; left: 28px; }
.dev-photo img { position: relative; z-index: 1; }
.dev-photo::before { z-index: 0; }
.app-card.ghost .more { font-size: .95rem; }
@media (max-width: 600px) {
  .mock-wrap { margin-top: 36px; }
  .chip-a { top: -44px; right: 8px; }
  .chip-b { left: 8px; bottom: -60px; }
  .sheet th:nth-child(3), .sheet td:nth-child(3) { display: none; }
}
.dev-photo::before { display: none; }
.dev-photo img { box-shadow: 14px 14px 0 -1.5px var(--green-deep), 14px 14px 0 0 var(--lime); }

/* ---------- pricing */
.pricing { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; max-width: 920px; }
.price-card { position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: 32px; display: flex; flex-direction: column; gap: 18px; box-shadow: var(--shadow); }
.price-card.pro { background: var(--ink); color: #e8efe9; border-color: var(--ink); }
.price-card.pro .check-list li { color: #e8efe9; }
.price-name { font-family: var(--font-display); font-weight: 600; font-size: 1.15rem; }
.price { display: flex; align-items: baseline; gap: 8px; }
.price .amt { font-family: var(--font-display); font-weight: 700; font-size: 3.2rem; line-height: 1; letter-spacing: -.02em; }
.price .per { color: var(--muted); font-size: .95rem; }
.price-card.pro .per { color: rgba(232,239,233,.7); }
.price-card .check-list { margin: 0; flex: 1; }
.price-card .btn { align-self: flex-start; }
.price-tag { position: absolute; top: -12px; right: 24px; background: var(--lime); color: var(--ink); font-size: .75rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; padding: 5px 11px; border-radius: 999px; }
.price-how { margin: 0; font-size: .9rem; color: rgba(232,239,233,.78); background: rgba(255,255,255,.06); border-radius: 12px; padding: 12px 14px; }
.price-how b { color: var(--lime); font-weight: 600; }
.price-foot { margin-top: 18px; color: var(--muted); font-size: .92rem; }
@media (max-width: 760px) { .pricing { grid-template-columns: 1fr; } .price-card { padding: 26px; } }
.pricing.three { grid-template-columns: repeat(3, 1fr); max-width: 1120px; }
.pricing.three .price-card { padding: 28px; }
@media (max-width: 980px) { .pricing.three { grid-template-columns: 1fr; max-width: 560px; } }

/* ---------- thank-you page */
.thanks { max-width: 640px; margin: 0 auto; text-align: center; padding: 40px 0 24px; }
.thanks .state-ico { width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin: 0 auto 20px; background: var(--lime); color: var(--ink); }
.thanks .state-ico svg { width: 30px; height: 30px; }
.thanks.pending .state-ico { background: var(--paper-2); }
.thanks.error .state-ico { background: #fde6df; color: #9b2c13; }
.thanks ol { text-align: left; margin: 28px auto 0; max-width: 480px; padding-left: 1.2em; }
.thanks ol li { margin: .45em 0; }
.thanks .who { font-family: var(--font-mono); font-size: .95rem; background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 2px 8px; }

/* ---------- grid children may shrink (stops the home card overflowing on phones) */
.apps-grid > *, .app-card.featured > * { min-width: 0; }
.app-card.featured .sheet { max-width: 100%; overflow: hidden; }
.app-card.featured .sheet table { width: 100%; table-layout: fixed; }
.app-card.featured .sheet td, .app-card.featured .sheet th { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pay-line { font-size: .95rem; margin: -4px 0 0; }
.app-card.featured .pay-line { color: #e8efe9; }
.app-card.featured .pay-line b { color: var(--lime); }

/* ---------- advantage strip in the product hero */
.edge-strip { list-style: none; margin: 0 0 26px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.edge-strip li { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line-2); font-size: .86rem; font-weight: 500; color: var(--ink-2); }
.edge-strip li::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green-2); flex: none; }
.edge-strip li.hot { background: var(--lime); border-color: var(--lime); color: var(--ink); }
.edge-strip li.hot::before { background: var(--ink); }
.edge-strip b { font-weight: 700; }

/* ---------- comparison table */
.compare-wrap { background: var(--surface); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); overflow: hidden; }
.compare { width: 100%; border-collapse: collapse; font-size: .95rem; }
.compare th, .compare td { text-align: left; padding: 15px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.compare tbody tr:last-child th, .compare tbody tr:last-child td { border-bottom: 0; }
.compare thead th { font-family: var(--font-display); font-size: 1rem; font-weight: 600; color: var(--ink-2); background: var(--paper); }
.compare thead th.us { background: var(--ink); color: #fff; }
.compare tbody th { font-weight: 600; color: var(--ink); width: 26%; }
.compare td { color: var(--muted); }
.compare td.us { background: #f3fbe2; color: var(--ink); }
.compare td.us b { color: var(--green); }
.compare svg { width: 16px; height: 16px; vertical-align: -3px; margin-right: 2px; }
.compare svg.ok { color: var(--green-2); }
.compare svg.no { color: #b0432a; }
.compare .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.compare-note { margin-top: 14px; color: var(--muted); font-size: .85rem; }
@media (max-width: 760px) {
  .compare thead { display: none; }
  .compare, .compare tbody, .compare tr, .compare th, .compare td { display: block; width: auto; }
  .compare tbody tr { border-bottom: 1px solid var(--line); padding: 14px 16px; }
  .compare tbody tr:last-child { border-bottom: 0; }
  .compare tbody th, .compare td { border: 0; padding: 0; }
  .compare tbody th { margin-bottom: 8px; font-size: 1rem; width: auto; }
  .compare td { display: grid; grid-template-columns: 112px 1fr; gap: 10px; padding: 6px 0; font-size: .9rem; }
  .compare td::before { content: attr(data-l); font-weight: 600; font-size: .78rem; color: var(--ink-2); padding-top: 2px; }
  .compare td.us { background: #f3fbe2; border-radius: 10px; padding: 8px 10px; margin: 0 -10px 4px; }
}

/* ---------- pay-once banner */
.pay-once { display: flex; gap: 16px; align-items: center; max-width: 1120px; margin: 0 0 30px; padding: 18px 22px; border-radius: 16px; background: var(--lime); color: var(--ink); }
.pay-once .po-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); color: var(--lime); display: grid; place-items: center; flex: none; }
.pay-once .po-ico svg { width: 22px; height: 22px; }
.pay-once b { display: block; font-family: var(--font-display); font-size: 1.15rem; line-height: 1.25; }
.pay-once span:not(.po-ico) { display: block; font-size: .95rem; color: var(--ink-2); margin-top: 2px; }
@media (max-width: 600px) { .pay-once { align-items: flex-start; padding: 16px; } }
.price-how.light { background: var(--surface); border: 1px solid var(--line); color: var(--ink-2); }
.price-how.light b { color: var(--green); }
@media (max-width: 600px) {
  .app-card.featured { padding: 22px; }
  .app-card.featured .sheet td, .app-card.featured .sheet th { padding-left: 8px; padding-right: 6px; }
  .app-card.featured .sheet td:first-child, .app-card.featured .sheet th:first-child { width: 30px; }
  .app-card.featured .sheet .pill { padding: 2px 7px; font-size: .7rem; }
}
