/* ManaDock site. Layout: warm dark page (light variant for light systems), sticky header,
   content sections stacked in a 1120px column; articles use a 70ch reading column. */
:root {
  --bg: #16110e;
  --surface: #211915;
  --surface-2: #2b211b;
  --line: #3a2d25;
  --fg: #f4ede7;
  --muted: #b0a297;
  --accent: #f27b2b;
  --accent-deep: #c8361e;
  --link: #ff9a55;
  --glow: rgba(242, 123, 43, .22);
  --on-accent: #fff;
  --display: "Bricolage Grotesque", "Avenir Next", system-ui, sans-serif;
  --body: "Inter", -apple-system, "Segoe UI", system-ui, sans-serif;
  color-scheme: dark;
}
@media (prefers-color-scheme: light) {
  :root:not([data-theme="dark"]) {
    --bg: #f7f4f2; --surface: #ffffff; --surface-2: #f1ebe6; --line: #e4dad2;
    --fg: #22180f; --muted: #6d5f55; --accent: #e0691b; --accent-deep: #b52f18; --link: #b4470f;
    --glow: rgba(224, 105, 27, .16); color-scheme: light;
  }
}
:root[data-theme="light"] {
  --bg: #f7f4f2; --surface: #ffffff; --surface-2: #f1ebe6; --line: #e4dad2;
  --fg: #22180f; --muted: #6d5f55; --accent: #e0691b; --accent-deep: #b52f18; --link: #b4470f;
  --glow: rgba(224, 105, 27, .16); color-scheme: light;
}

* { box-sizing: border-box; }
html { scroll-padding-top: 80px; }
body { margin: 0; background: var(--bg); color: var(--fg); font: 400 16px/1.6 var(--body); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; }
.wrap {
  max-width: 1120px; margin: 0 auto;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
h1, h2, h3 { font-family: var(--display); line-height: 1.12; text-wrap: balance; margin: 0; }
h2 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.01em; }
h3 { font-size: 19px; font-weight: 600; }
p { margin: 0; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

/* Header */
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 10; background: var(--bg); }
.top {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 5;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.top .wrap { display: flex; align-items: center; gap: 22px; padding-block: 12px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--display); font-weight: 800; font-size: 18px; white-space: nowrap; }
.brand img { width: 32px; height: 32px; }
.links { display: flex; gap: 22px; margin-left: auto; font-size: 15px; color: var(--muted); }
.links a { text-decoration: none; }
.links a:hover, .links a[aria-current="page"] { color: var(--fg); }
.lang { font-size: 13px; font-weight: 600; color: var(--muted); text-decoration: none; border: 1px solid var(--line); border-radius: 999px; padding: 4px 10px; }
.lang:hover { color: var(--fg); }

.btn {
  display: inline-flex; align-items: center; gap: 10px; justify-content: center;
  padding: 14px 22px; border-radius: 12px; font-weight: 600; font-size: 16px;
  text-decoration: none; cursor: pointer; border: 0;
}
.btn-primary { color: var(--on-accent); background: linear-gradient(180deg, var(--accent), var(--accent-deep)); box-shadow: 0 8px 24px var(--glow); }
.btn-primary:hover { filter: brightness(1.07); }
.btn-ghost { color: var(--fg); background: var(--surface-2); }
.btn-small { padding: 9px 16px; font-size: 15px; }
.btn svg { width: 18px; height: 18px; flex: none; }

/* Hero */
.hero { position: relative; overflow: hidden; }
.hero::before {
  content: ""; position: absolute; width: 760px; height: 760px; right: -200px; top: -140px;
  background: radial-gradient(closest-side, var(--glow), transparent); pointer-events: none;
}
.hero .wrap { position: relative; display: grid; grid-template-columns: 1fr 1.05fr; gap: 56px; align-items: center; padding-block: 72px 88px; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.hero h1 { font-size: clamp(38px, 5.4vw, 62px); font-weight: 800; letter-spacing: -.02em; margin-top: 14px; }
.lead { font-size: 19px; color: var(--muted); margin-top: 20px; max-width: 34em; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.fine { font-size: 14px; color: var(--muted); margin-top: 14px; }
.pitch { min-width: 0; }

/* Screenshot in a Mac window frame */
.shot { margin: 0; min-width: 0; }
.mac {
  border-radius: 12px; overflow: hidden; background: #15100d;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.45), 0 0 0 1px rgba(0,0,0,.25);
}
.mac-bar { height: 28px; display: flex; align-items: center; gap: 8px; padding: 0 12px; background: #2a1d16; }
.mac-bar i { width: 11px; height: 11px; border-radius: 50%; background: #ff5f57; }
.mac-bar i:nth-child(2) { background: #febc2e; } .mac-bar i:nth-child(3) { background: #28c840; }
.mac img { display: block; width: 100%; }
.shot figcaption { margin-top: 12px; font-size: 14px; color: var(--muted); }

/* Sections */
section.block { padding-block: 88px; }
section.block + section.block { border-top: 1px solid var(--line); }
.sec-head { max-width: 660px; margin-bottom: 44px; display: grid; gap: 14px; }
.sec-head p { color: var(--muted); font-size: 18px; }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split .copy { display: grid; gap: 16px; min-width: 0; }
.split .copy p { color: var(--muted); font-size: 17px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; }
.checks li::before { content: "✓"; color: var(--accent); font-weight: 700; }

.tile { width: 44px; height: 44px; flex: none; border-radius: 12px; display: grid; place-items: center; background: linear-gradient(180deg, #f27b2b, #c8361e); }
.tile svg { width: 22px; height: 22px; stroke: #fff; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.features { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 30px 24px; }
.feature { display: grid; gap: 10px; align-content: start; }
.feature p { color: var(--muted); font-size: 15px; }

.compare { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; }
.option { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 10px; align-content: start; }
.option .tag { font-size: 13px; font-weight: 600; color: var(--muted); }
.option p { color: var(--muted); font-size: 15px; }
.option.ours { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset; }
.option.ours .tag { color: var(--accent); }

.steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; counter-reset: step; list-style: none; margin: 0; padding: 0; }
.steps li { display: grid; gap: 10px; align-content: start; }
.steps li::before {
  counter-increment: step; content: counter(step);
  width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center;
  font-family: var(--display); font-weight: 800; font-size: 18px; background: var(--surface-2); color: var(--accent);
}
.steps p { color: var(--muted); font-size: 15px; }

/* Pricing */
.plans { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; align-items: stretch; }
.plan { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 12px; position: relative; min-width: 0; }
.plan.best { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 16px 40px var(--glow); }
.badge { position: absolute; top: -12px; left: 26px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--accent); color: var(--on-accent); }
.plan .name { font-weight: 600; color: var(--muted); }
.price { font-family: var(--display); font-weight: 800; font-size: 42px; line-height: 1; font-variant-numeric: tabular-nums; display: flex; align-items: baseline; flex-wrap: wrap; gap: 6px 8px; }
.price small { font-family: var(--body); font-size: 15px; font-weight: 500; color: var(--muted); }
.price s { font-family: var(--body); font-size: 18px; font-weight: 500; color: var(--muted); }
.plan ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; color: var(--muted); flex: 1; align-content: start; }
.plan li { display: flex; gap: 8px; }
.plan li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.plans-note { margin-top: 24px; color: var(--muted); font-size: 15px; max-width: 65ch; }

/* FAQ */
.faq { display: grid; gap: 10px; max-width: 780px; }
details { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 0 20px; }
summary { cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; display: flex; justify-content: space-between; gap: 16px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--accent); font-size: 20px; line-height: 1; }
details[open] summary::after { content: "–"; }
details p { color: var(--muted); padding-bottom: 18px; max-width: 65ch; }

/* Articles */
.crumbs { font-size: 14px; color: var(--muted); padding-top: 32px; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { color: var(--fg); }
.article { max-width: 72ch; padding-block: 24px 80px; }
.article h1 { font-size: clamp(32px, 4.6vw, 48px); font-weight: 800; letter-spacing: -.015em; margin-top: 12px; }
.article .meta { color: var(--muted); font-size: 14px; margin-top: 14px; }
.article .intro { font-size: 19px; color: var(--muted); margin-top: 22px; }
.prose { margin-top: 32px; }
.prose > * + * { margin-top: 18px; }
.prose h2 { font-size: 27px; margin-top: 44px; }
.prose h3 { margin-top: 30px; }
.prose p, .prose li { font-size: 17px; line-height: 1.7; }
.prose ul, .prose ol { padding-left: 22px; display: grid; gap: 8px; }
.prose a { color: var(--link); }
.prose table { border-collapse: collapse; width: 100%; font-size: 15px; }
.prose th, .prose td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: top; }
.prose th { color: var(--muted); font-weight: 600; }
.table-scroll { overflow-x: auto; }
.callout { margin-top: 44px; padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; gap: 20px; align-items: center; flex-wrap: wrap; }
.callout img { width: 56px; height: 56px; }
.callout div { flex: 1; min-width: 220px; display: grid; gap: 4px; }
.callout p { color: var(--muted); }
.related { margin-top: 44px; display: grid; gap: 10px; }
.related h2 { font-size: 20px; }
.related a { color: var(--link); }

.cards { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; }
.card { padding: 26px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); text-decoration: none; display: grid; gap: 10px; align-content: start; }
.card:hover { border-color: var(--accent); }
.card p { color: var(--muted); font-size: 15px; }
.card .more { color: var(--link); font-size: 15px; font-weight: 600; }

.final { text-align: center; }
.final .wrap { display: grid; justify-items: center; gap: 18px; }
.final img { width: 96px; height: 96px; }
.final p { color: var(--muted); font-size: 18px; }

footer { border-top: 1px solid var(--line); padding-block: 36px; font-size: 13px; color: var(--muted); }
footer .wrap { display: grid; gap: 14px; }
.foot-links { display: flex; flex-wrap: wrap; gap: 8px 20px; font-size: 14px; }
.foot-links a { text-decoration: none; }
.foot-links a:hover { color: var(--fg); }

@media (max-width: 1000px) {
  .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 960px) {
  .hero .wrap, .split { grid-template-columns: 1fr; gap: 40px; }
  .hero .wrap { padding-block: 48px 64px; }
  .features { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compare, .steps { grid-template-columns: 1fr; }
  .top .wrap { flex-wrap: wrap; row-gap: 8px; }
  .links { order: 3; width: 100%; margin-left: 0; overflow-x: auto; white-space: nowrap; padding-bottom: 2px; }
  .lang { margin-left: auto; }
}
@media (max-width: 600px) {
  .features, .cards, .plans { grid-template-columns: 1fr; }
  .top .btn { display: none; }
  section.block { padding-block: 64px; }
}

/* Rosetta notice on the home page */
.notice { display: flex; gap: 24px; align-items: flex-start; padding: 32px; border-radius: 20px; background: var(--surface); border: 1px solid var(--accent); max-width: 900px; }
.notice .tile { width: 56px; height: 56px; }
.notice .tile svg { width: 28px; height: 28px; }
.notice .copy { display: grid; gap: 14px; min-width: 0; }
.notice p { color: var(--muted); font-size: 17px; max-width: 65ch; }
.notice strong { color: var(--fg); font-weight: 600; }
.notice a { color: var(--link); }
@media (max-width: 600px) { .notice { flex-direction: column; padding: 24px; } }

[hidden] { display: none !important; }

/* Comparison table: our column is highlighted, crosses and checks carry the meaning */
.vs { width: 100%; min-width: 640px; border-collapse: separate; border-spacing: 0; font-size: 15px; }
.vs th, .vs td { padding: 14px 16px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.vs thead th { font-family: var(--display); font-size: 17px; font-weight: 600; color: var(--muted); border-bottom: 0; padding-bottom: 12px; }
.vs thead th.ours { color: var(--on-accent); background: linear-gradient(180deg, var(--accent), var(--accent-deep)); border-radius: 14px 14px 0 0; }
.vs tbody th { font-weight: 500; color: var(--fg); width: 34%; }
.vs td.ours { background: color-mix(in srgb, var(--accent) 9%, var(--surface)); border-left: 1px solid var(--accent); border-right: 1px solid var(--accent); }
.vs tbody tr:last-child td.ours { border-bottom: 1px solid var(--accent); border-radius: 0 0 14px 14px; }
.vs .mark { display: inline-grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-weight: 700; font-size: 13px; margin-right: 8px; vertical-align: middle; }
.vs .c-yes .mark { background: color-mix(in srgb, #2fa86a 22%, transparent); color: #2fa86a; }
.vs .c-no .mark { background: color-mix(in srgb, #d6453a 18%, transparent); color: #d6453a; }
.vs .c-part .mark { background: color-mix(in srgb, #d99a2b 20%, transparent); color: #d99a2b; }
.vs td.ours .mark { background: var(--accent); color: var(--on-accent); }
.vs .note { color: var(--muted); font-size: 13.5px; vertical-align: middle; }
.vs .price-row th, .vs .price-row td { font-weight: 600; color: var(--fg); }
.vs .price-row td.ours { color: var(--accent); }

/* Cost comparison: horizontal bars, our row highlighted */
.bars { display: grid; gap: 14px; max-width: 900px; }
.bar-row { display: grid; grid-template-columns: minmax(0, 19rem) minmax(0, 1fr) auto; gap: 18px; align-items: center; }
.bar-label { font-weight: 600; display: grid; gap: 2px; min-width: 0; }
.bar-label small { font-weight: 400; color: var(--muted); font-size: 13px; }
.bar-track { height: 14px; border-radius: 7px; background: var(--surface-2); overflow: hidden; }
.bar-fill { display: block; height: 100%; border-radius: 7px; background: color-mix(in srgb, var(--muted) 55%, transparent); }
.bar-value { font-family: var(--display); font-weight: 800; font-size: 20px; text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; min-width: 7.5rem; }
.bar-row.ours .bar-label, .bar-row.ours .bar-value { color: var(--accent); }
.bar-row.ours .bar-fill { background: linear-gradient(90deg, var(--accent), var(--accent-deep)); }
.vs-claim { margin-top: 22px; font-family: var(--display); font-size: clamp(20px, 2.6vw, 26px); font-weight: 800; color: var(--fg); max-width: 40ch; }
.vs-cards { margin-top: 36px; display: grid; grid-template-columns: 1.3fr repeat(4, minmax(0, 1fr)); gap: 16px; align-items: stretch; }
.vs-card { padding: 22px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: grid; gap: 8px; align-content: start; min-width: 0; }
.vs-card.ours { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent) inset, 0 16px 40px var(--glow); }
.vs-card h3 { font-size: 17px; }
.vs-price { font-family: var(--display); font-weight: 800; font-size: 22px; white-space: nowrap; }
.vs-card.ours .vs-price { color: var(--accent); }
.vs-time { color: var(--muted); font-size: 14px; }
.vs-list { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; font-size: 14px; }
.vs-list li { display: grid; grid-template-columns: 18px 1fr; gap: 6px; }
.vs-list.yes li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.vs-list.no li::before { content: "✕"; color: #d6453a; font-weight: 700; }
.vs-list.no li { color: var(--muted); }
.vs-note { margin-top: 18px; font-size: 13px; color: var(--muted); max-width: 80ch; }

/* Feature tour: screenshot and text, alternating sides */
.tour { display: grid; gap: 64px; }
.tour-row.flip .shot { order: 2; }
.tour-h { font-size: clamp(22px, 3vw, 30px); font-weight: 800; }
.tour-row .shot { max-width: 520px; justify-self: center; width: 100%; }

@media (max-width: 1100px) { .vs-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } .vs-card.ours { grid-column: 1 / -1; } }
@media (max-width: 600px) {
  .vs-cards { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 1fr auto; }
  .bar-track { grid-column: 1 / -1; grid-row: 2; }
  .tour-row.flip .shot { order: 0; }
}

.free-box { margin-top: 40px; padding: 26px; border-radius: 16px; background: var(--surface); border: 1px dashed var(--line); max-width: 760px; display: grid; gap: 10px; }
.free-box h2 { font-size: 22px; }
.free-box p { color: var(--muted); }

.brand .tld { color: var(--muted); font-weight: 600; }

/* Hero trust line and bare (frameless) screenshots for single components */
.trust { list-style: none; margin: 18px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 18px; font-size: 14px; color: var(--muted); }
.trust li { display: flex; gap: 6px; align-items: center; }
.trust li::before { content: "✓"; color: var(--accent); font-weight: 700; }
.mac.bare { background: transparent; border: 0; box-shadow: 0 24px 60px rgba(0,0,0,.35); border-radius: 18px; }

/* Hero: pitch and screenshot side by side, trust line under the pitch; on phones the screenshot comes right after the button */
.hero .wrap { grid-template-areas: "pitch shot" "trust shot"; grid-template-rows: auto 1fr; row-gap: 0; }
.hero .pitch { grid-area: pitch; } .hero .shot { grid-area: shot; } .hero .trust { grid-area: trust; align-self: start; }
.mac-only { display: none; margin-top: 14px; font-size: 14px; color: var(--muted); align-items: center; gap: 10px; flex-wrap: wrap; }
@media (max-width: 960px) { .hero .wrap { grid-template-areas: "pitch" "shot" "trust"; } }
@media (max-width: 600px) { .mac-only { display: flex; } .bars, .vs-claim { display: none; } }

/* Feature cards link to the matching guide */
.feature .more { color: var(--link); font-weight: 600; text-decoration: none; white-space: nowrap; }

/* Tour: tall component shots are capped so the settings panel doesn't dominate */
.tour-row .shot img { max-height: 460px; object-fit: cover; object-position: top; }

/* Comparison: our card plus three alternatives */
.vs-cards { grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr)); }

/* Pricing: one download button under the plans, free vs paid table */
.plans-cta { margin-top: 28px; align-items: center; }
.plans-cta p { color: var(--muted); font-size: 15px; }
.fvp { width: 100%; max-width: 760px; margin-top: 28px; border-collapse: collapse; font-size: 15px; }
.fvp th, .fvp td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.fvp th { color: var(--muted); font-weight: 600; }
.fvp td.c, .fvp th:nth-child(n+2) { text-align: center; }
.fvp td.c { color: var(--accent); font-weight: 700; }
details[open] summary::after { content: "\2212"; }

@media (max-width: 960px) { .hero .shot { margin-top: 24px; } .hero .trust { margin-top: 20px; } }

/* Softer comparison: neutral markers instead of red crosses */
.vs-list.no li::before { content: "–"; color: var(--muted); font-weight: 400; }
.vs-card .vs-time { font-size: 14px; }

/* Comparison cards must stack on smaller screens (these come after the desktop rule on purpose) */
@media (max-width: 1100px) { .vs-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } .vs-card.ours { grid-column: 1 / -1; } }
@media (max-width: 760px) { .vs-cards { grid-template-columns: 1fr; } }

/* Credits page */
.supporters { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.supporters li { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--accent); font-size: 16px; }
.supporters li b { font-weight: 600; }
.supporters-empty { color: var(--muted); }
.prose td small { color: var(--muted); }

.prose .supporters { display: flex; padding-left: 0; }
