/* Previyo site — shared styles. Brand: Ink + Tangerine (docs/BRAND.md). Light-first, dark via prefers-color-scheme. */
:root {
  --paper: #f3f2ef;
  --surface: #ffffff;
  --ink: #15161a;
  --muted: #6b6e76;
  --line: #dddbd5;
  --accent: #ff5b1f;
  --accent-ink: #15161a;
  --ok: #1e7a4c;
  --logo-ink: #111111;
  --logo-dot: #ff5b1f;
  --shadow: 0 1px 2px rgb(21 22 26 / .06), 0 14px 36px rgb(21 22 26 / .09);
  /* App mock (a generic light ESP UI, always light like the real thing) */
  --app-bg: #f7f7f8; --app-surface: #ffffff; --app-ink: #1d1f24; --app-muted: #6a6f78; --app-line: #e6e7ea;
  --app-link: #1f5bd8; --app-select: #e8f0fe; --app-bar: #1f2125;
  /* Email mock content */
  --mail-bg: #f6efe6; --mail-card: #ffffff; --mail-ink: #2a1d14; --mail-hero-a: #3b2416; --mail-hero-b: #7a3f1d; --mail-gold: #e2a23b;
  --display: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;
  --body: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #111216; --surface: #1a1c21; --ink: #f1f1ee; --muted: #8d9098; --line: #2c2f36;
    --accent: #ff5b1f; --accent-ink: #15161a; --ok: #5cc48e; --logo-ink: #ff5b1f; --logo-dot: #ff5b1f;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 14px 36px rgb(0 0 0 / .35);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } * { animation: none !important; transition: none !important; } }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 17px/1.6 var(--body); }
img, svg { max-width: 100%; }
a { color: inherit; text-underline-offset: 3px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { font-family: var(--display); line-height: 1.08; letter-spacing: -0.02em; text-wrap: balance; margin: 0; }
p { margin: 0; }
.wrap { max-width: 1160px; margin-inline: auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.narrow { max-width: 760px; }
.mono { font-family: var(--mono); font-size: 0.8rem; letter-spacing: 0.02em; }
.eyebrow { font: 500 0.76rem/1 var(--mono); letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- header / footer ---------- */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--paper); }
.nav { position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); }
.nav .wrap { display: flex; align-items: center; gap: 26px; padding-block: 12px; }
.brand { display: block; line-height: 0; }
.brand .wordmark { height: 28px; width: auto; }
.nav-links { display: flex; gap: 22px; margin-left: auto; font-size: 0.95rem; }
.nav-links a { text-decoration: none; color: var(--muted); }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--ink); }
@media (max-width: 820px) { .nav-links { display: none; } .nav .btn { margin-left: auto; } }
.site-footer { margin-top: 96px; border-top: 1px solid var(--line); padding-block: 40px 56px; font-size: 0.92rem; color: var(--muted); }
.site-footer .cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
.site-footer h3 { font: 600 0.78rem/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--ink); margin-bottom: 12px; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-footer a { text-decoration: none; }
.site-footer .legal { margin-top: 32px; }
@media (max-width: 700px) { .site-footer .cols { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; cursor: pointer; font: 600 1rem/1 var(--body); padding: 14px 20px; border-radius: 10px; border: 1px solid var(--ink); background: transparent; color: var(--ink); }
.btn:hover { color: var(--ink); background: color-mix(in srgb, var(--ink) 6%, transparent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.primary:hover { filter: brightness(1.06); color: var(--accent-ink); }
.btn.small { padding: 10px 14px; font-size: 0.92rem; }
.ctas { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.fineprint { color: var(--muted); font-size: 0.92rem; display: flex; flex-wrap: wrap; gap: 6px 18px; }
.fineprint span::before { content: "✓ "; color: var(--ok); font-weight: 700; }

/* ---------- sections ---------- */
section { padding-block: 84px; }
.section-head { display: grid; gap: 14px; max-width: 46rem; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); font-weight: 800; }
.section-head p { color: var(--muted); font-size: 1.1rem; }
.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- article (guides / features / legal) ---------- */
.crumbs { font-size: 0.88rem; color: var(--muted); display: flex; flex-wrap: wrap; gap: 6px; padding-top: 28px; }
.crumbs a { text-decoration: none; }
.crumbs span[aria-hidden] { opacity: .6; }
.article { padding-block: 24px 24px; }
.article header { display: grid; gap: 14px; margin-bottom: 28px; }
.article h1 { font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; }
.article .lede { font-size: 1.15rem; color: var(--muted); }
.prose { font-size: 1.04rem; }
.prose > * + * { margin-top: 1em; }
.prose h2 { font-size: 1.55rem; font-weight: 800; margin-top: 2.1em; }
.prose h3 { font-size: 1.15rem; font-weight: 700; margin-top: 1.6em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li + li { margin-top: .35em; }
.prose code { font: 0.9em var(--mono); background: color-mix(in srgb, var(--ink) 7%, transparent); padding: 1px 5px; border-radius: 5px; }
.prose blockquote { margin: 1.4em 0; padding: 14px 18px; border-left: 3px solid var(--accent); background: var(--surface); border-radius: 0 10px 10px 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: 0.95rem; display: block; overflow-x: auto; }
.prose th, .prose td { text-align: left; padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { font: 600 0.78rem/1.4 var(--mono); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.prose a { color: var(--ink); text-decoration-color: var(--accent); text-decoration-thickness: 2px; }
.cta-box { margin-top: 48px; background: var(--ink); color: var(--paper); border-radius: 18px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 20px; align-items: center; }
.cta-box h2 { font-size: 1.6rem; font-weight: 800; }
.cta-box p { color: color-mix(in srgb, var(--paper) 72%, var(--ink)); margin-top: 6px; }
.cta-box .btn:not(.primary) { border-color: var(--paper); color: var(--paper); }
@media (max-width: 700px) { .cta-box { grid-template-columns: 1fr; } }
.related { margin-top: 40px; display: grid; gap: 10px; }
.related a { display: block; padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; text-decoration: none; background: var(--surface); }
.related a:hover { border-color: var(--ink); color: var(--ink); }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; display: grid; gap: 10px; align-content: start; text-decoration: none; }
a.card:hover { border-color: var(--ink); color: var(--ink); }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--muted); font-size: 0.97rem; }

/* ---------- ESP app mock (generic, Klaviyo-like layout; no third-party logos) ---------- */
.app { background: var(--app-bg); color: var(--app-ink); border: 1px solid var(--app-line); border-radius: 14px; box-shadow: var(--shadow); overflow: hidden; font: 400 13px/1.45 var(--body); position: relative; }
.app-top { display: flex; align-items: center; gap: 6px; padding: 9px 12px; background: var(--app-surface); border-bottom: 1px solid var(--app-line); }
.app-top i { width: 9px; height: 9px; border-radius: 50%; background: #d9dadd; }
.app-top .url { margin-left: 10px; font: 500 11px/1 var(--mono); color: var(--app-muted); background: var(--app-bg); border-radius: 6px; padding: 5px 9px; }
.app-body { display: grid; grid-template-columns: 150px minmax(0, 1fr); min-height: 380px; }
.app-side { background: var(--app-surface); border-right: 1px solid var(--app-line); padding: 14px 10px; display: grid; gap: 4px; align-content: start; }
.app-side span { display: flex; align-items: center; gap: 8px; padding: 6px 8px; border-radius: 7px; color: var(--app-muted); }
.app-side span::before { content: ""; width: 12px; height: 12px; border-radius: 3px; background: #dcdde1; }
.app-side span.on { background: var(--app-bg); color: var(--app-ink); font-weight: 600; }
.app-side span.on::before { background: #9aa0aa; }
.app-main { padding: 18px 18px 70px; display: grid; gap: 12px; align-content: start; position: relative; }
.app-h { font: 700 16px/1.2 var(--body); display: flex; align-items: center; gap: 10px; }
.app-h .create { margin-left: auto; font-size: 11px; background: var(--app-bar); color: #fff; padding: 6px 10px; border-radius: 7px; font-weight: 600; }
.app-filters { display: flex; gap: 6px; }
.app-filters span { border: 1px dashed #cfd2d8; border-radius: 7px; padding: 4px 8px; font-size: 11px; color: var(--app-muted); }
.app-table { background: var(--app-surface); border: 1px solid var(--app-line); border-radius: 10px; overflow: hidden; }
.app-row { display: grid; grid-template-columns: 22px minmax(0, 1fr) 76px 92px 24px; gap: 10px; align-items: center; padding: 9px 12px; border-top: 1px solid var(--app-line); }
.app-row:first-child { border-top: 0; }
.app-row.head { font-size: 11px; color: var(--app-muted); background: var(--app-bg); }
.app-row.sel { background: var(--app-select); box-shadow: inset 3px 0 0 #1f5bd8; }
.app-row .cb { width: 14px; height: 14px; border: 1.5px solid #b9bdc5; border-radius: 4px; background: #fff; }
.app-row.sel .cb { background: #1f5bd8 url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12'%3E%3Cpath d='M2.6 6.3 5 8.6l4.4-5' fill='none' stroke='%23fff' stroke-width='1.9' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 11px no-repeat; border-color: #1f5bd8; }
.app-row .nm { min-width: 0; }
.app-row .nm b { display: block; color: var(--app-link); font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-row .nm small { color: var(--app-muted); font-size: 11px; }
.pill { justify-self: start; font-size: 10.5px; padding: 3px 8px; border-radius: 99px; background: #eef0f3; color: #4b505a; }
.pill.sent { background: #e2f5e8; color: #1e6b3a; }
.pill.live { background: #e2f5e8; color: #1e6b3a; }
.app-row .dots { width: 22px; height: 22px; border-radius: 6px; display: grid; place-items: center; color: var(--app-muted); font-weight: 700; letter-spacing: 1px; }
.app-row .dots.open { background: #e9eaee; color: var(--app-ink); }
.app-menu { position: absolute; z-index: 3; width: 210px; background: var(--app-surface); border: 1px solid var(--app-line); border-radius: 10px; box-shadow: 0 12px 30px rgb(0 0 0 / .14); padding: 6px; display: grid; }
.app-menu span { padding: 7px 10px; border-radius: 6px; color: var(--app-ink); }
.app-menu span.danger { color: #c4321f; }
.app-menu .ours { display: flex; align-items: center; gap: 8px; font-weight: 600; background: rgb(255 91 31 / .12); border-block: 1px solid rgb(127 127 127 / .18); border-radius: 0; margin-inline: -6px; padding-inline: 16px; }
.app-menu .ours svg { width: 18px; height: auto; flex: none; }
.app-bulk { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); background: var(--app-bar); color: #fff; border-radius: 12px; padding: 8px 10px 8px 14px; display: flex; align-items: center; gap: 8px; font-size: 12px; white-space: nowrap; box-shadow: 0 10px 24px rgb(0 0 0 / .25); }
.app-bulk .clear { color: #8fb3ff; }
.app-bulk span.b { border: 1px solid #5a5e66; border-radius: 7px; padding: 4px 9px; }
.app-bulk span.b.ours { border-color: var(--accent); color: #fff; background: rgb(255 91 31 / .22); font-weight: 700; }
.app-toast { position: absolute; z-index: 4; right: 14px; bottom: 64px; width: 250px; background: #1c1d21; color: #f1f0ec; border-radius: 12px; padding: 12px; box-shadow: 0 16px 36px rgb(0 0 0 / .3); display: grid; gap: 8px; font-size: 12px; }
.app-toast .t { display: flex; align-items: center; gap: 8px; font-weight: 700; font-size: 12.5px; }
.app-toast .t svg { width: 20px; height: auto; }
.app-toast .ok { background: #173326; border-radius: 9px; padding: 9px 10px; display: grid; gap: 3px; }
.app-toast .ok b { color: #6fd3a0; }
.app-toast .ok code { font: 500 10px/1.3 var(--mono); color: #c9c7c1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.app-toast .ok .mono { font-size: 10px; white-space: nowrap; }
.app-toast .acts { display: flex; gap: 6px; }
.app-toast .acts span { flex: 1; text-align: center; border: 1px solid #3a3a36; border-radius: 7px; padding: 5px; font-weight: 600; }
@media (max-width: 640px) {
  .app-body { grid-template-columns: 1fr; }
  .app-side { display: none; }
  .app-row { grid-template-columns: 22px minmax(0, 1fr) 24px; }
  .app-row > :nth-child(3), .app-row > :nth-child(4) { display: none; }
  .app-toast { display: none; }
}

/* Widget mock (the in-page Export ▾ button and its menu) */
.widget { position: absolute; z-index: 3; right: 14px; top: 14px; display: grid; justify-items: end; gap: 6px; }
.widget .main { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 10px 0 7px; border-radius: 9px; background: #15161a; color: #f6f3ee; font: 600 12.5px/1 var(--body); box-shadow: 0 4px 14px rgb(0 0 0 / .22); }
.widget .main svg { width: 18px; height: auto; }
.widget .panel { width: 230px; background: #fff; color: #15161a; border: 1px solid #e2e0da; border-radius: 12px; box-shadow: 0 12px 32px rgb(0 0 0 / .18); padding: 10px; display: grid; gap: 8px; font-size: 11.5px; }
.widget .lbl { font: 500 9.5px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: #6b6a66; }
.widget .seg { display: flex; gap: 4px; }
.widget .seg span { flex: 1; text-align: center; border: 1px solid #e2e0da; border-radius: 6px; padding: 5px 2px; }
.widget .seg span.on { background: #15161a; color: #f6f3ee; border-color: #15161a; }
.widget .go { background: #ff5b1f; color: #15161a; border-radius: 8px; padding: 9px; text-align: center; font-weight: 700; }

/* Email mock (fictional brand) */
.mail { background: var(--mail-bg); color: var(--mail-ink); font: 400 10px/1.5 Georgia, "Times New Roman", serif; border-radius: 4px; overflow: hidden; }
.mail .m-pre { font: 500 7px/1 var(--mono); color: #8b7a6c; text-align: center; padding: 8px 0 4px; }
.mail .m-logo { text-align: center; font: 800 13px/1 var(--display); letter-spacing: 0.18em; padding: 10px 0 12px; }
.mail .m-hero { background: linear-gradient(160deg, var(--mail-hero-a), var(--mail-hero-b)); color: #fff6ec; text-align: center; padding: 30px 18px 26px; display: grid; gap: 10px; justify-items: center; }
.mail .m-kicker { font: 600 7px/1 var(--mono); letter-spacing: 0.2em; color: var(--mail-gold); }
.mail .m-h { font: 700 24px/1 Georgia, serif; }
.mail .m-bag { width: 70px; height: 86px; border-radius: 8px 8px 12px 12px; background: linear-gradient(180deg, #f3e3cf, #e7cfb0); box-shadow: 0 8px 18px rgb(0 0 0 / .3); }
.mail .m-btn { display: inline-block; background: var(--mail-gold); color: #2a1d14; font: 700 8px/1 var(--display); letter-spacing: .14em; padding: 9px 14px; border-radius: 3px; }
.mail .m-body { padding: 16px 18px; text-align: center; font-size: 9px; color: #5c4a3d; }
.mail .m-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 14px 14px; }
.mail .m-card { background: var(--mail-card); border-radius: 4px; padding: 8px; display: grid; gap: 5px; justify-items: center; font: 600 8px/1.2 var(--display); }
.mail .m-card i { width: 100%; aspect-ratio: 1.2; border-radius: 3px; background: radial-gradient(circle at 50% 60%, #b9763f 0 26%, #c9d8c5 27%); }
.mail .m-card:nth-child(2) i { background: radial-gradient(circle at 50% 60%, #6b3b1f 0 26%, #efd3c8 27%); }
.mail .m-card:nth-child(3) i { background: radial-gradient(circle at 50% 60%, #d9b27c 0 26%, #d6dbe8 27%); }
.mail .m-card:nth-child(4) i { background: radial-gradient(circle at 50% 60%, #3f2a1c 0 26%, #efe2b8 27%); }
.mail .m-foot { border-top: 1px solid #e3d6c6; padding: 12px; text-align: center; font: 400 7px/1.6 var(--mono); color: #8b7a6c; }

/* Article figures (feature/guide screenshots from `pnpm site:shots`) */
.prose figure { margin: 1.8em 0; }
.prose figure img { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 12px; background: #efeee9; }
.prose figcaption { margin-top: 10px; font-size: 0.88rem; line-height: 1.45; color: var(--muted); }
