/* WriteFlow AI website — shared styles (index, privacy, support). */
:root {
  --ink: #16181A; --bg: #FAFAF8; --surface: #FFFFFF; --sunk: #F3F1EC; --muted: #5B6169;
  --accent: #A9571F; --accent-2: #D97F45; --accent-ink: #FFFFFF; --accent-soft: #FBF0E6;
  --pro-ink: #8A4A1E; --pro-border: #EAD2B8; --ok: #1F6B4A; --ok-soft: #E6F2EC;
  --border: rgba(22,24,26,0.09); --border-strong: rgba(22,24,26,0.16); --hover: rgba(22,24,26,0.045);
  --shadow-sm: 0 1px 2px rgba(0,0,0,.07); --shadow: 0 18px 44px rgba(60,30,10,.14);
  --nav-bg: rgba(250,250,248,0.9); --shot-bg: #FFFFFF;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ink: #F2F1ED; --bg: #141517; --surface: #1D1E21; --sunk: #18191B; --muted: #A2A7AD;
    --accent: #E59A63; --accent-2: #F0B283; --accent-ink: #1E1105; --accent-soft: #2C2119;
    --pro-ink: #F0B283; --pro-border: #4A3423; --ok: #7FD1A8; --ok-soft: #17291F;
    --border: rgba(255,255,255,0.09); --border-strong: rgba(255,255,255,0.16); --hover: rgba(255,255,255,0.05);
    --shadow: 0 18px 44px rgba(0,0,0,.45); --nav-bg: rgba(20,21,23,0.88); --shot-bg: #FFFFFF;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #F2F1ED; --bg: #141517; --surface: #1D1E21; --sunk: #18191B; --muted: #A2A7AD;
  --accent: #E59A63; --accent-2: #F0B283; --accent-ink: #1E1105; --accent-soft: #2C2119;
  --pro-ink: #F0B283; --pro-border: #4A3423; --ok: #7FD1A8; --ok-soft: #17291F;
  --border: rgba(255,255,255,0.09); --border-strong: rgba(255,255,255,0.16); --hover: rgba(255,255,255,0.05);
  --shadow: 0 18px 44px rgba(0,0,0,.45); --nav-bg: rgba(20,21,23,0.88); --shot-bg: #FFFFFF;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { transition: none !important; animation: none !important; } }
body {
  margin: 0; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: var(--ink); background: var(--bg); line-height: 1.6; -webkit-font-smoothing: antialiased;
}
.wrap { max-width: 1060px; margin: 0 auto; padding-inline: 24px; }
@media (max-width: 480px) { .wrap { padding-inline: 16px; } }
a { color: var(--accent); text-underline-offset: 3px; }
img { max-width: 100%; display: block; }
h1, h2, h3 { text-wrap: balance; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 12px; border-radius: 8px; z-index: 300; }
.skip:focus { left: 8px; }

/* Nav */
nav.top { position: sticky; top: 0; z-index: 100; background: var(--nav-bg); backdrop-filter: blur(10px); border-bottom: 1px solid var(--border); }
nav.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 14px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 17px; color: var(--ink); text-decoration: none; }
.mark { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(150deg, #B5622C, #D97F45); display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.nav-links { display: flex; gap: 26px; font-size: 14px; font-weight: 600; }
.nav-links a { color: var(--ink); text-decoration: none; }
.nav-links a:hover { color: var(--accent); }
@media (max-width: 820px) { .nav-links { display: none; } }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 12px 22px; border-radius: 999px; font-weight: 700; font-size: 14.5px; text-decoration: none; border: 1px solid transparent; }
.btn-primary { background: var(--accent); color: var(--accent-ink); box-shadow: var(--shadow-sm); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { background: var(--surface); color: var(--ink); border-color: var(--border-strong); }
.btn-ghost:hover { background: var(--hover); }
.btn-sm { padding: 8px 16px; font-size: 13.5px; }

/* Hero */
header.hero { padding: 64px 0 40px; position: relative; overflow: hidden; }
.glow { position: absolute; width: 760px; height: 760px; border-radius: 50%; background: radial-gradient(circle, rgba(217,127,69,0.16) 0%, rgba(217,127,69,0) 70%); top: -320px; right: -220px; pointer-events: none; }
.hero-grid { position: relative; display: grid; grid-template-columns: 1.02fr 1fr; gap: 48px; align-items: center; }
@media (max-width: 900px) { .hero-grid { grid-template-columns: 1fr; gap: 32px; } }
.pill { display: inline-flex; align-items: center; gap: 8px; background: var(--accent-soft); color: var(--pro-ink); border: 1px solid var(--pro-border); border-radius: 999px; padding: 5px 14px 5px 6px; font-size: 13px; font-weight: 700; text-decoration: none; }
.pill b { white-space: nowrap; background: var(--accent); color: var(--accent-ink); border-radius: 999px; padding: 1px 9px; font-size: 11.5px; letter-spacing: .03em; }
.hero h1 { font-size: clamp(34px, 5.2vw, 52px); line-height: 1.06; font-weight: 800; letter-spacing: -0.025em; margin: 18px 0 16px; }
.hero h1 .accent { background: linear-gradient(150deg, var(--accent), var(--accent-2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-sub { font-size: 17.5px; color: var(--muted); max-width: 520px; margin: 0 0 26px; }
.hero-ctas { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-note { margin-top: 16px; font-size: 13px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; }
.hero-note span { display: inline-flex; align-items: center; gap: 6px; }
.hero-note svg { color: var(--ok); }

/* Browser-frame screenshot */
.frame { border-radius: 14px; overflow: hidden; border: 1px solid var(--border-strong); box-shadow: var(--shadow); background: var(--shot-bg); }
.frame-bar { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--sunk); border-bottom: 1px solid var(--border); }
.frame-bar i { width: 9px; height: 9px; border-radius: 50%; background: var(--border-strong); display: block; }
.frame-bar span { margin-left: 10px; font-size: 11.5px; color: var(--muted); font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }
.frame img { width: 100%; height: auto; aspect-ratio: 1280 / 800; object-fit: cover; background: var(--shot-bg); }
.caption { font-size: 12.5px; color: var(--muted); margin-top: 10px; text-align: center; }

/* Sections */
section { padding: 72px 0; }
section.alt { background: var(--surface); border-block: 1px solid var(--border); }
.section-head { text-align: center; max-width: 620px; margin: 0 auto 40px; }
.eyebrow { font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); margin-bottom: 10px; }
h2 { font-size: clamp(26px, 3.4vw, 34px); font-weight: 800; letter-spacing: -0.015em; line-height: 1.15; margin: 0 0 12px; }
.section-sub { color: var(--muted); font-size: 15.5px; margin: 0; }

/* Three pillars */
.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 860px) { .pillars { grid-template-columns: 1fr; } }
.pillar { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 26px; display: flex; flex-direction: column; gap: 10px; }
section.alt .pillar { background: var(--bg); }
.pillar-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.pillar h3 { font-size: 18px; margin: 4px 0 0; }
.pillar p { color: var(--muted); font-size: 14.5px; margin: 0; }
.pillar ul { margin: 4px 0 0; padding: 0; list-style: none; display: grid; gap: 7px; font-size: 14px; }
.pillar li { display: flex; gap: 8px; align-items: flex-start; }
.pillar li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent-2); margin-top: 9px; flex-shrink: 0; }
.pillar .where { margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--border-strong); font-size: 12.5px; color: var(--muted); }

/* Showcase */
.groups { display: flex; gap: 6px; justify-content: center; flex-wrap: wrap; margin-bottom: 26px; }
.group-btn { font: inherit; font-size: 14px; font-weight: 700; padding: 9px 18px; border-radius: 999px; border: 1px solid var(--border-strong); background: var(--bg); color: var(--ink); cursor: pointer; }
.group-btn[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.showcase { display: grid; grid-template-columns: 300px 1fr; gap: 28px; align-items: start; }
@media (max-width: 860px) { .showcase { grid-template-columns: 1fr; } }
.tabs { display: flex; flex-direction: column; gap: 6px; }
@media (max-width: 860px) { .tabs { flex-direction: row; overflow-x: auto; padding-bottom: 6px; scroll-snap-type: x mandatory; } .tab { min-width: 220px; scroll-snap-align: start; } }
.tab { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: var(--bg); border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; cursor: pointer; font: inherit; color: var(--ink); transition: border-color .15s, background .15s; }
.tab:hover { background: var(--hover); }
.tab[aria-selected="true"] { background: var(--surface); border-color: var(--accent); box-shadow: var(--shadow-sm); }
.tab-num { flex-shrink: 0; width: 26px; height: 26px; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 800; background: var(--border); color: var(--muted); }
.tab[aria-selected="true"] .tab-num { background: linear-gradient(150deg, #B5622C, #D97F45); color: #fff; }
.tab-text { display: flex; flex-direction: column; gap: 1px; }
.tab-text strong { font-size: 14px; }
.tab-text small { font-size: 12px; color: var(--muted); }
.tab .new { font-size: 10px; font-weight: 800; letter-spacing: .05em; color: var(--pro-ink); background: var(--accent-soft); border: 1px solid var(--pro-border); border-radius: 999px; padding: 0 7px; margin-left: 6px; vertical-align: 1px; }
.shot img { transition: opacity .2s ease; }
.shot img.fading { opacity: 0; }

/* Sites */
.sites { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; max-width: 860px; margin: 0 auto; }
.site { font-size: 13.5px; font-weight: 650; padding: 7px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--border); }
.site.ai { background: var(--accent-soft); border-color: var(--pro-border); color: var(--pro-ink); }
.sites-note { text-align: center; color: var(--muted); font-size: 13.5px; margin-top: 18px; }

/* Privacy strip */
.trust { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
@media (max-width: 900px) { .trust { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .trust { grid-template-columns: 1fr; } }
.trust div { padding: 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); }
.trust h3 { font-size: 15px; margin: 10px 0 6px; }
.trust p { font-size: 13.5px; color: var(--muted); margin: 0; }
.trust svg { color: var(--ok); }

/* Pricing */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; max-width: 860px; margin: 0 auto; }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }
.plan { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; display: flex; flex-direction: column; }
.plan.pro { border-color: var(--pro-border); background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 55%); }
.plan h3 { font-size: 20px; margin: 0; }
.plan .price { font-size: 14px; color: var(--muted); margin: 4px 0 18px; }
.plan ul { list-style: none; margin: 0 0 22px; padding: 0; display: grid; gap: 10px; font-size: 14.5px; }
.plan li { display: flex; gap: 10px; }
.plan li svg { flex-shrink: 0; margin-top: 4px; color: var(--ok); }
.plan .btn { margin-top: auto; align-self: flex-start; }

/* What's new */
.timeline { max-width: 760px; margin: 0 auto; display: grid; gap: 14px; }
.release { display: grid; grid-template-columns: 96px 1fr; gap: 18px; padding: 18px 20px; border-radius: 14px; border: 1px solid var(--border); background: var(--bg); }
@media (max-width: 520px) { .release { grid-template-columns: 1fr; gap: 6px; } }
.release .ver { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-weight: 700; font-size: 14px; color: var(--accent); }
.release .ver small { display: block; font-family: inherit; color: var(--muted); font-weight: 500; font-size: 12px; }
.release h3 { font-size: 15.5px; margin: 0 0 4px; }
.release p { font-size: 14px; color: var(--muted); margin: 0; }
.release.latest { border-color: var(--accent); background: var(--surface); }

/* FAQ */
.faq { max-width: 760px; margin: 0 auto; }
details { background: var(--surface); border: 1px solid var(--border); border-radius: 12px; padding: 2px 20px; margin-bottom: 10px; }
summary { cursor: pointer; font-weight: 700; font-size: 15px; padding: 15px 0; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; font-size: 20px; color: var(--accent); font-weight: 400; }
details[open] summary::after { content: "\2212"; }
details p, details li { font-size: 14px; color: var(--muted); line-height: 1.65; }
details p { margin: 0 0 16px; }
details ul { margin: 0 0 16px; padding-left: 20px; }

/* Early access */
.early { background: linear-gradient(180deg, var(--accent-soft) 0%, var(--surface) 60%); border: 1px solid var(--pro-border); border-radius: 18px; padding: 36px; text-align: center; max-width: 640px; margin: 0 auto; }
.early h3 { font-size: 20px; margin: 0 0 10px; }
.early p { color: var(--muted); font-size: 14.5px; margin: 0; }

/* Footer */
footer.site-foot { padding: 44px 0 90px; text-align: center; border-top: 1px solid var(--border); }
.foot-links { display: flex; gap: 22px; justify-content: center; flex-wrap: wrap; font-size: 13.5px; font-weight: 600; margin-bottom: 12px; }
.foot-links a { color: var(--ink); text-decoration: none; }
.foot-links a:hover { color: var(--accent); }
.copyright { font-size: 12.5px; color: var(--muted); }

/* Contact bubble */
.contact-wrap { position: fixed; bottom: calc(22px + env(safe-area-inset-bottom, 0px)); right: 22px; z-index: 200; display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.contact-bubble { width: 56px; height: 56px; border-radius: 999px; border: none; cursor: pointer; background: linear-gradient(150deg, #B5622C, #D97F45); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 10px 26px rgba(181,98,44,0.38); position: relative; }
.contact-bubble svg { transition: transform .2s ease; }
.contact-bubble .icon-close { position: absolute; transform: scale(0); }
.contact-bubble[aria-expanded="true"] .icon-chat { transform: scale(0); }
.contact-bubble[aria-expanded="true"] .icon-close { transform: scale(1); }
.contact-card { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; box-shadow: var(--shadow); padding: 16px; width: 230px; }
.contact-card h4 { font-size: 14px; margin: 0 0 2px; }
.contact-card p { font-size: 12.5px; color: var(--muted); margin: 0 0 10px; }
.contact-link { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; font-weight: 650; color: var(--ink); text-decoration: none; }
.contact-link:hover { background: var(--hover); }
.contact-link .ci { width: 30px; height: 30px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--accent-soft); color: var(--accent); flex-shrink: 0; }

/* Document pages (privacy, support) */
.doc { max-width: 760px; margin: 0 auto; padding: 48px 24px 80px; }
@media (max-width: 480px) { .doc { padding-inline: 16px; } }
.doc h1 { font-size: clamp(28px, 4vw, 36px); letter-spacing: -0.02em; line-height: 1.15; margin: 0 0 8px; }
.doc .meta { color: var(--muted); font-size: 13.5px; margin: 0 0 28px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc h3 { font-size: 16px; margin: 24px 0 8px; }
.doc p, .doc li { font-size: 15px; }
.doc ul { padding-left: 22px; }
.doc li { margin-bottom: 8px; }
.doc code { font-size: 13px; background: var(--sunk); border: 1px solid var(--border); border-radius: 6px; padding: 1px 6px; }
.summary-card { background: var(--ok-soft); border: 1px solid var(--border); border-radius: 14px; padding: 20px 22px; margin: 0 0 12px; }
.summary-card p { margin: 0 0 8px; }
.summary-card ul { margin: 0; }
.toc { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px 22px; margin: 20px 0 8px; }
.toc strong { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
.toc ol { margin: 8px 0 0; padding-left: 20px; columns: 2; column-gap: 28px; }
@media (max-width: 560px) { .toc ol { columns: 1; } }
.toc li { font-size: 14px; margin-bottom: 4px; }
.table-scroll { overflow-x: auto; margin: 14px 0; border: 1px solid var(--border); border-radius: 12px; }
table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
th, td { text-align: left; padding: 11px 13px; border-bottom: 1px solid var(--border); vertical-align: top; }
tr:last-child td { border-bottom: 0; }
th { background: var(--sunk); font-weight: 700; font-size: 13px; }
td .tag { display: inline-block; font-size: 11.5px; font-weight: 700; border-radius: 999px; padding: 1px 8px; background: var(--sunk); border: 1px solid var(--border); white-space: nowrap; }
td .tag.local { background: var(--ok-soft); color: var(--ok); }
.card { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 22px 24px; margin-bottom: 16px; }
.card h2 { margin-top: 0; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.card h2 svg { color: var(--accent); flex-shrink: 0; }
.card ul { margin: 0; }
.back { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; font-weight: 600; text-decoration: none; margin-bottom: 20px; }
