/* ProfileLift AI — one bold thing (the score dial), everything else quiet. */
:root {
  --ink: #13233f;
  --ink-2: #44546f;
  --ink-3: #6b7a92;
  --paper: #fbfcfe;
  --surface: #f1f4f9;
  --line: #dbe2ec;
  --blue: #1f4fd1;
  --blue-dark: #1b3f8f;
  --blue-soft: #e7eefc;
  --green: #0f9b74;
  --green-soft: #e3f6ef;
  --amber: #c27c0e;
  --amber-soft: #fbf1df;
  --red: #c8432f;
  --red-soft: #fbe9e6;
  --radius-s: 6px;
  --radius-m: 10px;
  --radius-l: 16px;
  --head: "Avenir Next", "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", system-ui, sans-serif;
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  color-scheme: light;
  --card: #ffffff;
  --hover: #e8edf5;
  --well: #e9edf3;
  --avatar: #c9d5ea;
  --yellow: #e0a43a;
  --on-accent: #ffffff;
  --amber-ink: #7a4d06;
  --green-ink: #0b6b51;
  --band: #1b3f8f;
  --band-ink: #ffffff;
  --band-muted: #d6e2ff;
  --focus: #8fb0ff;
  --shadow: rgba(19, 35, 63, .25);
  --dial-track: #e4e9f1;
  --dial-before: #b8c4d6;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
  --ink: #e7edf7; --ink-2: #b6c2d6; --ink-3: #8b9ab3;
  --paper: #0c1525; --surface: #121d31; --line: #26354f;
  --blue: #7aa2ff; --blue-dark: #a9c2ff; --blue-soft: #1a2b4f;
  --green: #3fcf9f; --green-soft: #10352b; --amber: #e9ac45; --amber-soft: #3a2b10;
  --red: #f2826f; --red-soft: #3e1c17;
  --card: #111c2f; --hover: #1a2740; --well: #0a1220; --avatar: #26375a; --yellow: #e9ac45;
  --on-accent: #0c1525; --amber-ink: #f3cf8f; --green-ink: #9be8cc;
  --band: #1b3f8f; --band-ink: #ffffff; --band-muted: #c9d8ff; --focus: #7aa2ff; --shadow: rgba(0, 0, 0, .45);
  --dial-track: #22314a; --dial-before: #3a4c6b;
  color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ink: #e7edf7; --ink-2: #b6c2d6; --ink-3: #8b9ab3;
  --paper: #0c1525; --surface: #121d31; --line: #26354f;
  --blue: #7aa2ff; --blue-dark: #a9c2ff; --blue-soft: #1a2b4f;
  --green: #3fcf9f; --green-soft: #10352b; --amber: #e9ac45; --amber-soft: #3a2b10;
  --red: #f2826f; --red-soft: #3e1c17;
  --card: #111c2f; --hover: #1a2740; --well: #0a1220; --avatar: #26375a; --yellow: #e9ac45;
  --on-accent: #0c1525; --amber-ink: #f3cf8f; --green-ink: #9be8cc;
  --band: #1b3f8f; --band-ink: #ffffff; --band-muted: #c9d8ff; --focus: #7aa2ff; --shadow: rgba(0, 0, 0, .45);
  --dial-track: #22314a; --dial-before: #3a4c6b;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { font-family: var(--head); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -0.01em; }
h1 { font-size: clamp(1.9rem, 3.4vw, 2.6rem); font-weight: 700; }
h2 { font-size: 1.5rem; font-weight: 700; }
h3 { font-size: 1.125rem; font-weight: 650; }
p { margin: 0 0 1em; }
a { color: var(--blue); }
small, .muted { color: var(--ink-3); }
.muted { font-size: .95rem; }
img { max-width: 100%; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--card); padding: 8px 12px; z-index: 50; }
.skip:focus { left: 8px; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- top bar and shell ---------- */
.topbar {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px;
  height: 60px; padding: 0 20px;
  background: var(--paper); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-size: 1.15rem; font-weight: 600; }
.brand b { color: var(--blue); font-weight: 700; }
.nav-center { display: flex; align-items: center; gap: 34px; justify-self: center; min-width: 0; }
.topbar-spacer { min-width: 0; }
.topbar-right { display: flex; align-items: center; gap: 10px; font-size: .92rem; justify-self: end; }
.topbar-right .who { color: var(--ink-2); max-width: 26ch; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.shell { display: grid; grid-template-columns: 250px minmax(0, 1fr); min-height: calc(100vh - 60px); }
.shell.no-rail { grid-template-columns: minmax(0, 1fr); }
.shell.no-rail .rail { display: none; }
main { padding: 32px clamp(16px, 4vw, 48px) 80px; max-width: 1040px; width: 100%; }
main:focus { outline: none; }

/* Step rail: the flow is a real sequence, so steps are numbered. */
.rail { border-right: 1px solid var(--line); padding: 24px 14px; background: var(--surface); position: sticky; top: 60px; height: calc(100vh - 60px); overflow-y: auto; }
.rail ol { list-style: none; margin: 0; padding: 0; counter-reset: step; }
.rail li { counter-increment: step; }
.rail a {
  display: grid; grid-template-columns: 28px 1fr; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: var(--radius-m); color: var(--ink-2); text-decoration: none; font-size: .95rem;
}
.rail a::before {
  content: counter(step); display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%;
  border: 1.5px solid var(--line); background: var(--card); font-size: .8rem; font-weight: 600; color: var(--ink-3);
}
.rail a:hover { background: var(--hover); color: var(--ink); }
.rail a.active { background: var(--card); color: var(--ink); font-weight: 600; box-shadow: 0 0 0 1px var(--line); }
.rail a.active::before { border-color: var(--blue); color: var(--blue); }
.rail a.done::before { content: "✓"; background: var(--green); border-color: var(--green); color: var(--on-accent); }
.rail .rail-score { margin: 18px 10px 0; padding-top: 16px; border-top: 1px solid var(--line); font-size: .88rem; color: var(--ink-2); }
.rail .rail-score strong { font-family: var(--head); font-size: 1.6rem; color: var(--ink); display: block; line-height: 1.1; }
.rail .usage { margin: 16px 10px 0; font-size: .82rem; color: var(--ink-3); }
.rail .usage div { display: flex; justify-content: space-between; padding: 2px 0; }

/* ---------- basic parts ---------- */
.btn {
  --b: var(--blue);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px; border-radius: var(--radius-m);
  border: 1.5px solid var(--b); background: var(--b); color: var(--on-accent);
  font: 600 .95rem/1 var(--body); cursor: pointer; text-decoration: none; white-space: nowrap;
}
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .55; cursor: not-allowed; filter: none; }
.btn.ghost { background: var(--card); color: var(--ink); border-color: var(--ink-3); }
.btn.ghost:hover { border-color: var(--blue); color: var(--blue); filter: none; }
.btn { transition: transform .15s ease, filter .15s ease, box-shadow .15s ease; }
.btn:not(.ghost):not(.link):hover { transform: translateY(-1px); box-shadow: 0 8px 20px var(--shadow); }
.btn.small { min-height: 34px; padding: 0 12px; font-size: .88rem; border-radius: var(--radius-s); }
.btn.green { --b: var(--green); }
.btn.danger { --b: var(--red); }
.btn.link { background: none; border: 0; color: var(--blue); padding: 0; min-height: 0; text-decoration: underline; }
.btn .spin { width: 16px; height: 16px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.row.end { justify-content: flex-end; }
.spread { display: flex; justify-content: space-between; gap: 12px; align-items: center; flex-wrap: wrap; }
.stack > * + * { margin-top: 14px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }

label { display: block; font-weight: 600; font-size: .92rem; margin-bottom: 6px; }
label .muted { font-weight: 400; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=url], select, textarea {
  width: 100%; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: var(--radius-s);
  font: inherit; color: var(--ink); background: var(--card);
}
textarea { min-height: 110px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.field { margin-bottom: 16px; }
.counter { font-size: .8rem; color: var(--ink-3); text-align: right; margin-top: 4px; }
.counter.over { color: var(--red); font-weight: 600; }

.panel { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px; }
.panel.flat { background: var(--surface); border-color: transparent; }
.panel + .panel, .panel + .grid2, .grid2 + .panel { margin-top: 16px; }
.grid2 > .panel + .panel, .grid3 > .panel + .panel { margin-top: 0; }
.page-head { margin-bottom: 24px; max-width: 70ch; }
.page-head p { color: var(--ink-2); margin: 0; }

.tag { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface); color: var(--ink-2); }
.tag.green { background: var(--green-soft); color: var(--green); }
.tag.amber { background: var(--amber-soft); color: var(--amber); }
.tag.red { background: var(--red-soft); color: var(--red); }
.tag.blue { background: var(--blue-soft); color: var(--blue); }
.tagline { height: auto !important; padding: 10px 14px !important; white-space: normal !important; text-align: left; justify-content: flex-start !important; width: 100%; line-height: 1.35 !important; }
.tag button { border: 0; background: none; padding: 0; cursor: pointer; color: inherit; font-size: 1rem; line-height: 1; }

.notice { padding: 12px 14px; border-radius: var(--radius-m); background: var(--blue-soft); color: var(--blue-dark); font-size: .93rem; }
.notice.amber { background: var(--amber-soft); color: var(--amber-ink); }
.notice.green { background: var(--green-soft); color: var(--green-ink); }

.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; }
.tabs button { border: 0; background: none; padding: 10px 14px; font: 600 .95rem var(--body); color: var(--ink-3); cursor: pointer; border-bottom: 2.5px solid transparent; white-space: nowrap; }
.tabs button[aria-selected=true] { color: var(--ink); border-bottom-color: var(--blue); }

.empty { text-align: left; padding: 28px; border: 1.5px dashed var(--line); border-radius: var(--radius-l); color: var(--ink-2); }

/* ---------- toasts ---------- */
.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 100; }
.toast { background: var(--ink); color: var(--paper); padding: 12px 16px; border-radius: var(--radius-m); font-size: .93rem; max-width: 360px; box-shadow: 0 8px 24px var(--shadow); }
.toast.error { background: var(--red); }

/* ---------- landing ---------- */
.landing { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(320px, 400px); gap: 56px; align-items: start; padding: 24px 0 40px; }
.landing .auth-card { position: sticky; top: 84px; }
.shell.no-rail main { margin: 0 auto; max-width: 1120px; }
.preview-row { display: flex; gap: 16px; align-items: flex-end; margin-top: 10px; flex-wrap: wrap; }
.preview-card { max-width: 620px; }
.landing h1 { font-size: clamp(2.2rem, 4.6vw, 3.4rem); max-width: 16ch; }
.landing .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 46ch; }
.landing ul.points { list-style: none; padding: 0; margin: 22px 0 28px; display: grid; gap: 8px; }
.landing ul.points li { padding-left: 26px; position: relative; color: var(--ink-2); }
.landing ul.points li::before { content: ""; position: absolute; left: 0; top: .5em; width: 12px; height: 12px; border-radius: 3px; background: var(--green); }
.auth-card { max-width: 420px; }
.auth-card h2 { margin-bottom: 4px; }
.preview-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.preview-card .banner { height: 92px; background: linear-gradient(120deg, #1b3f8f, #1f4fd1 55%, #2fd3a0); }
.preview-card .body { padding: 0 22px 22px; }
.preview-card .avatar { width: 84px; height: 84px; border-radius: 50%; border: 4px solid var(--card); margin-top: -42px; background: var(--avatar); display: grid; place-items: center; font: 700 1.6rem var(--head); color: var(--blue-dark); }
.preview-card .line { height: 10px; border-radius: 5px; background: var(--surface); margin-top: 10px; }
.how { margin-top: 40px; }
.how ol { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; list-style: none; padding: 0; counter-reset: how; }
.how li { counter-increment: how; background: var(--surface); border-radius: var(--radius-l); padding: 18px; }
.how li::before { content: counter(how); font: 700 1.5rem var(--head); color: var(--blue); display: block; margin-bottom: 6px; }
.how li strong { display: block; margin-bottom: 4px; }
.how li span { color: var(--ink-2); font-size: .93rem; }

/* ---------- score dial (the bold thing) ---------- */
.dial-wrap { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 28px; align-items: center; }
.dial { position: relative; width: 240px; height: 140px; }
.dial svg { width: 240px; height: 140px; display: block; }
.dial .num { position: absolute; left: 0; right: 0; bottom: 2px; text-align: center; font-family: var(--head); }
.dial .num strong { font-size: 3.4rem; font-weight: 700; line-height: 1; display: block; letter-spacing: -0.03em; }
.dial .num span { font-size: .9rem; color: var(--ink-3); }
.dial.small, .dial.small svg { width: 150px; height: 88px; }
.dial.small .num strong { font-size: 2rem; }
.grade { font-family: var(--head); font-size: 1.4rem; font-weight: 700; }
.grade.red { color: var(--red); } .grade.yellow { color: var(--amber); } .grade.lightgreen, .grade.green { color: var(--green); }
.delta { font-weight: 600; color: var(--green); }

/* audit parts */
.parts { display: grid; gap: 10px; }
.part { border: 1px solid var(--line); border-radius: var(--radius-m); background: var(--card); }
.part > button { width: 100%; display: grid; grid-template-columns: 12px minmax(0, 1fr) 70px 110px 20px; gap: 14px; align-items: center; padding: 14px 16px; background: none; border: 0; cursor: pointer; font: inherit; color: inherit; text-align: left; }
.part .dot { width: 12px; height: 12px; border-radius: 50%; }
.dot.green { background: var(--green); } .dot.yellow { background: var(--yellow); } .dot.red { background: var(--red); }
.part .pts { font-weight: 700; font-family: var(--head); text-align: right; }
.bar { height: 8px; border-radius: 4px; background: var(--surface); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 4px; background: var(--blue); }
.bar i.green { background: var(--green); } .bar i.yellow { background: var(--yellow); } .bar i.red { background: var(--red); }
.part .chev { transition: transform .15s; color: var(--ink-3); }
.part[open] .chev { transform: rotate(90deg); }
.part .detail { padding: 0 16px 16px 42px; display: none; }
.part[open] .detail { display: block; }
.part ul { margin: 6px 0 0; padding-left: 18px; }
.part li { margin: 3px 0; }
.good li::marker { color: var(--green); }
.fixes li::marker { color: var(--red); }

.wins { counter-reset: win; list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.wins li { counter-increment: win; display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 12px 14px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); }
.wins li::before { content: counter(win); font: 700 1.1rem var(--head); color: var(--blue); }
.wins .gain { font-weight: 700; color: var(--green); white-space: nowrap; }

/* ---------- options (AI writing) ---------- */
.options { display: grid; gap: 12px; }
.option { border: 1.5px solid var(--line); border-radius: var(--radius-m); padding: 16px; background: var(--card); }
.option.chosen { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.option .text { white-space: pre-wrap; margin: 8px 0 12px; }
.option .meta { font-size: .85rem; color: var(--ink-3); }
.mods { display: flex; gap: 6px; flex-wrap: wrap; }
.mods button { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 5px 12px; font: 500 .85rem var(--body); cursor: pointer; color: var(--ink-2); }
.mods button:hover { border-color: var(--blue); color: var(--blue); }
.current-box { white-space: pre-wrap; background: var(--surface); border-radius: var(--radius-m); padding: 14px; color: var(--ink-2); font-size: .95rem; }

/* experience editor rows */
.role { border: 1px solid var(--line); border-radius: var(--radius-m); padding: 16px; background: var(--card); margin-bottom: 12px; }
.role h4 { margin: 0; font-size: 1rem; }

/* chat questions */
.chat { max-width: 680px; }
.chat .q { font-family: var(--head); font-size: 1.35rem; font-weight: 650; margin: 0 0 6px; }
.chat .help { color: var(--ink-2); margin-bottom: 16px; }
.choices { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 14px; }
.choices button { border: 1.5px solid var(--line); background: var(--card); border-radius: 999px; padding: 8px 16px; font: 500 .95rem var(--body); cursor: pointer; color: var(--ink); }
.choices button[aria-pressed=true] { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.progress { height: 6px; background: var(--surface); border-radius: 3px; overflow: hidden; margin-bottom: 26px; }
.progress i { display: block; height: 100%; background: var(--blue); transition: width .25s; }
.chips-input { display: flex; flex-wrap: wrap; gap: 6px; padding: 8px; border: 1.5px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.chips-input input { border: 0 !important; box-shadow: none !important; flex: 1; min-width: 140px; padding: 4px; }
.followup { margin-top: 10px; }

/* ---------- studios ---------- */
.studio { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.canvas-box { background: var(--well); border-radius: var(--radius-m); padding: 14px; }
.canvas-box canvas { width: 100%; height: auto; display: block; border-radius: 6px; background: var(--card); }
.safe-note { font-size: .82rem; color: var(--ink-3); margin-top: 8px; }
.templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; }
.templates button { border: 2px solid transparent; border-radius: var(--radius-s); padding: 0; cursor: pointer; background: none; overflow: hidden; }
.templates button[aria-pressed=true] { border-color: var(--blue); }
.templates canvas { width: 100%; display: block; }
.controls .field { margin-bottom: 12px; }
.swatches { display: flex; gap: 6px; flex-wrap: wrap; }
.swatches button { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--card); box-shadow: 0 0 0 1px var(--line); cursor: pointer; }
.swatches button[aria-pressed=true] { box-shadow: 0 0 0 2px var(--blue); }
input[type=color] { width: 44px; height: 32px; border: 1px solid var(--line); border-radius: 6px; padding: 2px; background: var(--card); }
input[type=range] { width: 100%; accent-color: var(--blue); }
.photo-stage { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; }
.checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.checks li { display: grid; grid-template-columns: 22px 1fr; gap: 8px; }
.checks .ok { color: var(--green); font-weight: 700; } .checks .no { color: var(--red); font-weight: 700; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius-l); padding: 28px; text-align: center; background: var(--card); cursor: pointer; }
.drop:hover, .drop.over { border-color: var(--blue); background: var(--blue-soft); }

/* checklist */
.copyrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--line); }
.copyrow .t { white-space: pre-wrap; font-size: .95rem; }
.copyrow h4 { margin: 0 0 4px; font-size: .95rem; }
.kwmap table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.kwmap th, .kwmap td { padding: 8px 10px; border-bottom: 1px solid var(--line); text-align: left; }
.kwmap th { font-size: .82rem; color: var(--ink-3); font-weight: 600; }
.kwmap td.n { text-align: center; }
.kwmap td.zero { color: var(--red); }

.cta-band { margin-top: 28px; padding: 20px 22px; border-radius: var(--radius-l); background: var(--band); color: var(--band-ink); display: flex; justify-content: space-between; gap: 16px; align-items: center; flex-wrap: wrap; }
.cta-band p { margin: 0; color: var(--band-muted); }
.cta-band .btn { --b: var(--band-ink); color: var(--band); }

/* print: report and resume */
.print-only { display: none; }
@media print {
  .topbar, .rail, .toasts, .no-print, .cta-band { display: none !important; }
  .shell { display: block; }
  main { padding: 0; max-width: none; }
  .print-only { display: block; }
  .panel { border: 0; padding: 0; }
  body { background: #fff; font-size: 11pt; }
  .copyrow { break-inside: avoid; }
  .resume { font-family: Arial, Helvetica, sans-serif; color: #000; }
  /* report as a clean PDF */
  .report-topbar { border: 0; border-bottom: 2px solid var(--blue); border-radius: 0; padding: 0 0 10px; margin-bottom: 16px; }
  .improve-panel { border: 0; }
  .report-head, .panel, .score-panel, .improve-example, .improve-list > li, .mini-part, .fix-plan > li, .fix-list > li { break-inside: avoid; }
  .report-grid, .grid2 { display: block !important; }
}
.resume { max-width: 760px; }
.resume h1 { font-size: 1.8rem; margin-bottom: 2px; }
.resume h2 { font-size: 1.05rem; border-bottom: 1px solid #999; padding-bottom: 3px; margin-top: 18px; }
.resume .r-role { margin: 10px 0; }
.resume .r-role .r-top { font-weight: 700; }
.resume .r-desc { white-space: pre-wrap; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  .rail { position: static; height: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 10px; }
  .rail ol { display: flex; overflow-x: auto; gap: 4px; }
  .rail a { grid-template-columns: 24px auto; white-space: nowrap; padding: 6px 10px; }
  .rail .rail-score, .rail .usage { display: none; }
  .landing, .studio, .photo-stage, .grid2, .grid3 { grid-template-columns: 1fr; }
  .how ol { grid-template-columns: 1fr 1fr; }
  .dial-wrap { grid-template-columns: 1fr; }
  .part > button { grid-template-columns: 12px minmax(0, 1fr) 60px 20px; }
  .part .bar { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}
@media (max-width: 600px) {
  .topbar { padding: 0 12px; }
  .topbar-right .who { display: none; }
  .brand span { white-space: nowrap; }
}

/* ---------- RanksProfile hub ---------- */
.topbar { gap: 20px; }
.topnav { display: flex; gap: 2px; flex: 0 1 auto; min-width: 0; justify-content: center; align-items: center; overflow-x: auto; scrollbar-width: none; }
.topnav::-webkit-scrollbar { display: none; }
.topnav a { font-weight: 500; }
.tools-dd > summary { font-weight: 500; }
.topnav a { padding: 6px 10px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-size: .92rem; white-space: nowrap; }
.topnav a:hover { background: var(--hover); color: var(--ink); }
.topnav a[aria-current=page] { color: var(--blue); font-weight: 600; }
.footer { border-top: 1px solid var(--line); background: var(--surface); margin-top: 48px; padding: 40px clamp(16px, 4vw, 48px) 24px; font-size: .9rem; color: var(--ink-2); }
.foot-top { display: grid; grid-template-columns: minmax(220px, 1.2fr) 3fr; gap: 32px; max-width: 1200px; margin: 0 auto; }
.foot-brand .brand { margin-bottom: 10px; }
.foot-brand p { margin: 0; max-width: 34ch; line-height: 1.6; }
.foot-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 24px; }
.foot-col h4 { font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin: 0 0 10px; }
.foot-col ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--blue); }
.foot-bottom { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; max-width: 1200px; margin: 28px auto 0; padding-top: 18px; border-top: 1px solid var(--line); font-size: .84rem; color: var(--ink-3); }
@media (max-width: 760px) { .foot-top { grid-template-columns: 1fr; gap: 24px; } }

/* static company/legal pages */
.static-page { max-width: 760px; }
.static-page h2 { font-size: 1.2rem; margin: 24px 0 8px; }
.static-page p { color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; }
.static-page a { color: var(--blue); }
.contact-form { max-width: 640px; display: grid; gap: 14px; margin: 10px 0 26px; }
.contact-form .cf-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.contact-form .field { margin: 0; }
.contact-form input, .contact-form textarea { width: 100%; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-m); font: inherit; background: var(--card); color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.contact-form textarea { resize: vertical; min-height: 120px; }
.contact-form .hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
@media (max-width: 560px) { .contact-form .cf-row { grid-template-columns: 1fr; } }
.ticket { margin-bottom: 10px; }
.ticket.tnew { border-left: 3px solid var(--blue); }
.btn.big { min-height: 52px; padding: 0 26px; font-size: 1.05rem; }
.small-print { font-size: .88rem; margin-top: 10px; }

.hero { position: relative; overflow-x: clip; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(300px, .95fr); gap: 48px; align-items: center; padding: 56px 0 64px; }
.hero::before { content: ""; position: absolute; inset: -16% -40% auto -40%; height: 600px; z-index: -2; pointer-events: none;
  background: linear-gradient(180deg, var(--surface) 0%, transparent 85%); opacity: .6; }
.hero::after { content: ""; position: absolute; inset: 0 0 auto 0; height: 560px; z-index: -1; pointer-events: none;
  background-image: radial-gradient(var(--line) 1px, transparent 1.4px); background-size: 24px 24px; opacity: .22;
  -webkit-mask-image: linear-gradient(180deg, #000 0%, transparent 80%); mask-image: linear-gradient(180deg, #000 0%, transparent 80%); }
.hero-eyebrow { display: inline-block; font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--blue); background: var(--blue-soft); padding: 6px 12px; border-radius: 999px; margin-bottom: 14px; }

/* ---------- centered hero ---------- */
.hero-center { display: block; text-align: center; max-width: 920px; margin: 0 auto; padding: 60px 0 52px; }
.hero-center .hero-eyebrow { margin-bottom: 20px; }
.hero-center .hero-h1 { font-size: clamp(2.3rem, 6vw, 4rem); line-height: 1.04; letter-spacing: -0.03em; font-weight: 800; max-width: 22ch; margin: 0 auto 18px; text-wrap: balance; }
.hero-center .hero-h1 .grad { background: linear-gradient(90deg, var(--blue) 0%, #6a5cff 100%); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-center .hero-tag { font-size: clamp(1.1rem, 2.2vw, 1.35rem); font-weight: 600; color: var(--ink); max-width: 46ch; margin: 0 auto 10px; text-wrap: balance; }
.hero-center .lead { font-size: 1.05rem; color: var(--ink-2); max-width: 58ch; margin: 0 auto 28px; }
.herobar { max-width: 560px; margin: 0 auto; display: grid; gap: 14px; justify-items: center; }
.herobar-row { width: 100%; display: flex; gap: 8px; align-items: center; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 7px; box-shadow: 0 16px 44px var(--shadow); transition: border-color .15s, box-shadow .15s; }
.herobar-row:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft), 0 16px 44px var(--shadow); }
.herobar-row input { flex: 1; min-width: 0; border: 0; background: transparent; color: var(--ink); font-size: 1.05rem; padding: 13px 14px; }
.herobar-row input::placeholder { color: var(--ink-3); }
.herobar-row input:focus { outline: none; }
.herobar-btn { flex: none; height: 50px; border-radius: 10px; padding: 0 26px; font-size: 1rem; font-weight: 650; white-space: nowrap; }
.herobar-link { color: var(--ink-2); font-weight: 600; font-size: .95rem; text-decoration: none; }
.herobar-link:hover { color: var(--blue); }
@media (max-width: 540px) {
  .herobar-row { flex-direction: column; padding: 10px; gap: 10px; }
  .herobar-row input { width: 100%; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
  .herobar-btn { width: 100%; }
}
.hero-pill { display: inline-flex; align-items: center; gap: 8px; margin-top: 22px; padding: 10px 18px; border-radius: 999px; background: var(--blue-soft); color: var(--blue-dark); font-weight: 650; font-size: .95rem; text-decoration: none; transition: background .15s, color .15s, transform .15s; }
.hero-pill:hover { background: var(--blue); color: #fff; transform: translateY(-1px); }
.hero-pill svg { width: 16px; height: 16px; }
.hero-pill .ico { display: grid; }
.hero-pill .arr { font-weight: 700; }
.hero-badges.center { justify-content: center; margin-top: 24px; }
#how-to-rank { scroll-margin-top: 80px; }
.hero h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); max-width: 16ch; text-wrap: balance; letter-spacing: -0.02em; }
.hero .lead { font-size: 1.15rem; color: var(--ink-2); max-width: 52ch; }
.hero-visual { position: relative; display: grid; justify-items: center; }
.hero-checks { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; width: 100%; }

/* lead funnel visual */
.funnel { display: grid; gap: 12px; justify-items: center; width: 100%; max-width: 420px; }
.funnel-label { font: 600 .78rem var(--body); text-transform: uppercase; letter-spacing: .07em; color: var(--ink-3); margin-bottom: 2px; }
.funnel-step { display: flex; align-items: center; gap: 14px; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 15px 20px; box-shadow: 0 14px 34px var(--shadow); }
.funnel-step .funnel-ic { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: var(--blue-soft); color: var(--blue); }
.funnel-tx strong { display: block; font-size: 1rem; }
.funnel-tx span { color: var(--ink-2); font-size: .85rem; }
.funnel .fs1 { width: 100%; }
.funnel .fs2 { width: 88%; }
.funnel .fs3 { width: 76%; }
.funnel-out { width: 64%; text-align: center; color: #fff; border-radius: 14px; padding: 16px; box-shadow: 0 18px 40px var(--shadow);
  background: linear-gradient(120deg, #2a5fe0, #1b3f8f 70%, #14296a); }
.funnel-out strong { display: block; font-size: 1.05rem; }
.funnel-out span { color: rgba(255, 255, 255, .8); font-size: .8rem; }
/* connectors between steps */
.funnel-step + .funnel-step::before, .funnel-out::before { content: ""; position: absolute; }
.funnel { position: relative; }
@keyframes funnelIn { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
.funnel-label, .funnel-step, .funnel-out { animation: funnelIn .5s ease both; }
.funnel-step.fs1 { animation-delay: .08s; }
.funnel-step.fs2 { animation-delay: .18s; }
.funnel-step.fs3 { animation-delay: .28s; }
.funnel-out { animation-delay: .38s; }
@media (prefers-reduced-motion: reduce) { .funnel-label, .funnel-step, .funnel-out { animation: none; } }
@media (max-width: 920px) { .funnel { max-width: 460px; } }
.hero-checks li { padding-left: 26px; position: relative; font-size: .95rem; color: var(--ink-2); }
.hero-checks li::before { position: absolute; left: 0; font-weight: 700; }
.hero-checks li.bad::before { content: "✗"; color: var(--red); }
.hero-checks li.good::before { content: "✓"; color: var(--green); }
.linkbox { display: flex; gap: 8px; margin-top: 20px; max-width: 560px; padding: 6px; border: 2px solid var(--blue); border-radius: 14px; background: var(--card); }
.linkbox input { border: 0 !important; box-shadow: none !important; font-size: 1.05rem; padding: 10px 12px; min-width: 0; }
.linkbox .btn { min-height: 48px; border-radius: 10px; }
.tool-grid-wrap { margin-top: 12px; }
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 14px; }
.tool-card { display: flex; flex-direction: column; gap: 6px; padding: 18px; border-radius: var(--radius-l); background: var(--card); border: 1px solid var(--line); color: var(--ink); text-decoration: none; }
.tool-card h3 { margin: 0; }
.tool-card p { margin: 0; color: var(--ink-2); font-size: .93rem; flex: 1; }
.tool-card .tool-go { color: var(--blue); font-weight: 600; font-size: .92rem; }
a.tool-card { transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease; }
a.tool-card:hover { border-color: var(--blue); transform: translateY(-3px); box-shadow: 0 12px 28px var(--shadow); }
.tool-card.soon { background: var(--surface); border-style: dashed; }
.tool-card.soon .tag { align-self: flex-start; }

/* featured tools strip */
.section-head { margin-bottom: 16px; }
.section-head h2 { margin-bottom: 4px; }
.section-head p { margin: 0; }
.feature-strip { margin: 20px 0 36px; padding: 22px; border-radius: var(--radius-l); background: var(--surface); border: 1px solid var(--line); }
.feature-strip .tool-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.feature-strip .tool-card { background: var(--card); border-color: var(--blue); }
.feature-strip a.tool-card:hover { box-shadow: 0 6px 20px var(--shadow); }

/* customer dashboard */
.dash-top { align-items: stretch; margin-bottom: 8px; }
.dash-score { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.dash-h { margin: 28px 0 12px; }
.use-list { display: grid; gap: 12px; margin-top: 6px; }
.use-row { display: grid; gap: 5px; }
.use-bar { height: 8px; border-radius: 999px; background: var(--hover); overflow: hidden; }
.use-bar i { display: block; height: 100%; background: var(--blue); border-radius: 999px; }
.use-bar i.full { background: var(--red); }

/* long-form SEO content under each tool */
.tool-content { max-width: 760px; margin: 40px auto 0; padding-top: 28px; border-top: 1px solid var(--line); }
.tool-content h2 { font-size: 1.35rem; margin: 26px 0 10px; }
.tool-content p { color: var(--ink-2); line-height: 1.7; margin: 0 0 12px; }
.tc-intro p:first-child { font-size: 1.08rem; color: var(--ink); }
.tc-steps { padding-left: 0; list-style: none; counter-reset: tcs; display: grid; gap: 10px; }
.tc-steps > li { counter-increment: tcs; position: relative; padding-left: 38px; color: var(--ink-2); line-height: 1.6; }
.tc-steps > li::before { content: counter(tcs); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .85rem var(--head); display: grid; place-items: center; }
.tc-benefits { padding-left: 0; list-style: none; display: grid; gap: 8px; }
.tc-benefits > li { position: relative; padding-left: 26px; color: var(--ink-2); line-height: 1.6; }
.tc-benefits > li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 700; }
.tc-tips { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.tc-tips > li { position: relative; padding-left: 24px; color: var(--ink-2); line-height: 1.6; }
.tc-tips > li::before { content: "→"; position: absolute; left: 0; color: var(--blue); font-weight: 700; }
.tc-mistakes { padding-left: 0; list-style: none; display: grid; gap: 10px; }
.tc-mistakes > li { position: relative; padding-left: 24px; color: var(--ink-2); line-height: 1.6; }
.tc-mistakes > li::before { content: "✗"; position: absolute; left: 0; color: var(--red); font-weight: 700; }
.tc-faq details { border-bottom: 1px solid var(--line); padding: 2px 0; }
.tc-faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
.tc-faq summary::-webkit-details-marker { display: none; }
.tc-faq summary::before { content: "+"; color: var(--blue); font-weight: 700; margin-right: 10px; }
.tc-faq details[open] summary::before { content: "–"; }
.tc-faq details p { margin: 0 0 14px; }
.tc-related-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.tc-related-list li { line-height: 1.5; }
.tc-related-list a { font-weight: 600; color: var(--blue); text-decoration: none; }
.tc-related-list a:hover { text-decoration: underline; }
.tc-source { font-size: .88rem; color: var(--ink-3); margin-top: 20px; }
.tc-source a { color: var(--blue); }
main > .crumbs { max-width: 760px; margin: 0 auto 6px; }

/* expandable category cards */
.exp-cards { display: grid; gap: 12px; }
.exp-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; }
.exp-card summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; padding: 18px 20px; font: 650 1.1rem var(--head); list-style: none; }
.exp-card summary::-webkit-details-marker { display: none; }
.exp-card summary::after { content: "+"; color: var(--blue); font-weight: 700; font-size: 1.3rem; line-height: 1; }
.exp-card[open] summary::after { content: "\2013"; }
.exp-card[open] summary { border-bottom: 1px solid var(--line); }
.exp-card summary:hover { background: var(--hover); }
.exp-count { font: 500 .82rem var(--body); color: var(--ink-3); background: var(--surface); border-radius: 999px; padding: 4px 10px; white-space: nowrap; }
.exp-list { margin: 0; padding: 16px 20px 20px; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exp-item { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 15px 16px; transition: border-color .15s ease, transform .15s ease; }
.exp-item:hover { border-color: var(--blue); transform: translateY(-2px); }
.exp-tool { display: inline-flex; align-items: center; gap: 6px; font: 700 1rem var(--head); color: var(--ink); text-decoration: none; }
a.exp-tool:hover { color: var(--blue); }
.exp-tool.soon { color: var(--ink-3); font-weight: 600; }
.exp-arrow { color: var(--blue); transition: transform .15s ease; }
a.exp-tool:hover .exp-arrow { transform: translateX(3px); }
.exp-how { margin: 7px 0 0; color: var(--ink-2); font-size: .9rem; line-height: 1.55; }
.exp-win { margin: 11px 0 0; padding-top: 11px; border-top: 1px dashed var(--line); color: var(--ink); font-size: .9rem; line-height: 1.55; }
.exp-win-tag { display: inline-block; font: 700 .66rem var(--body); text-transform: uppercase; letter-spacing: .05em; color: var(--green-ink); background: var(--green-soft); padding: 3px 9px; border-radius: 999px; margin-right: 8px; vertical-align: middle; }
@media (max-width: 640px) { .exp-list { grid-template-columns: 1fr; } }

/* at-a-glance table */
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-l); }
.tools-table { width: 100%; border-collapse: collapse; font-size: .93rem; min-width: 520px; }
.tools-table th { text-align: left; background: var(--surface); color: var(--ink-2); font: 700 .8rem var(--body); text-transform: uppercase; letter-spacing: .04em; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.tools-table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: top; color: var(--ink-2); }
.tools-table tr:last-child td { border-bottom: 0; }
.tools-table td:first-child { color: var(--ink); font-weight: 600; white-space: nowrap; }
.tools-table td:first-child a { color: var(--blue); text-decoration: none; }
.tools-table tbody tr:hover { background: var(--hover); }

/* hero benefit badges + stats band */
.hero-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hero-badges span { font-size: .82rem; font-weight: 600; color: var(--ink-2); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 6px 12px; }
.stats-band { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; text-align: center; margin: 8px 0 36px; }
.stats-band .stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 22px 14px; }
.stats-band .stat b { display: block; font: 700 1.9rem var(--head); color: var(--blue); }
.stats-band .stat span { color: var(--ink-2); font-size: .9rem; }
@media (max-width: 560px) { .stats-band { grid-template-columns: 1fr 1fr; } }

/* centered section heads + reveal animation */
.section-head.center { text-align: center; max-width: 640px; margin: 0 auto 28px; }
.section-head.center h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.reveal { opacity: 0; transform: translateY(20px); 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; } }
main > section { margin-bottom: 52px; }

/* benefit cards */
.benefit-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 16px; }
.benefit-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 24px; transition: transform .18s ease, box-shadow .18s ease; }
.benefit-card:hover { transform: translateY(-4px); box-shadow: 0 16px 36px var(--shadow); }
.benefit-ico { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); margin-bottom: 14px; }
.benefit-card h3 { margin: 0 0 6px; font-size: 1.1rem; }
.benefit-card p { margin: 0; color: var(--ink-2); font-size: .94rem; line-height: 1.6; }
.ico { display: inline-grid; place-items: center; }
.ico svg { display: block; }

/* persona cards */
.persona-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.persona-card { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px; }
.persona-ico { flex: none; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 10px; background: var(--card); color: var(--blue); border: 1px solid var(--line); }
.persona-card h3 { margin: 0 0 4px; font-size: 1.05rem; }
.persona-card p { margin: 0; color: var(--ink-2); font-size: .92rem; line-height: 1.55; }

/* numbered signal cards */
.signal { position: relative; }
.signal-n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .9rem var(--head); margin-bottom: 10px; }

/* CTA band actions */
.cta-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta-band .btn.ghost { background: transparent; }

/* dedicated login pages */
.auth-page { min-height: 68vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 420px; }
.auth-logo { font-family: var(--head); font-weight: 600; font-size: 1.3rem; margin-bottom: 12px; }
.auth-logo b { color: var(--blue); }
.auth-card h1 { font-size: 1.6rem; margin: 0 0 4px; }
.auth-card form { margin-top: 14px; }

/* admin dashboard */
.admin-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 20px; }
.admin-card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; text-align: center; }
.admin-card-num { font: 700 1.9rem var(--head); color: var(--blue); }
.admin-card-label { color: var(--ink-2); font-size: .85rem; margin-top: 2px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: .9rem; }
.admin-table th { text-align: left; color: var(--ink-3); font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.admin-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.admin-table tr:last-child td { border-bottom: 0; }
.health-list { display: grid; gap: 10px; }
.health-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.health-row:last-child { border-bottom: 0; }
.health-main { flex: 1; min-width: 0; }
.health-row .dot { width: 11px; height: 11px; border-radius: 50%; flex: none; }
.health-row .dot.ok { background: var(--green); }
.health-row .dot.bad { background: var(--red); }
.health-row .dot.off { background: var(--ink-3); }

/* LinkedIn "post now" control */
.li-post { display: inline-flex; gap: 6px; align-items: center; }
.li-target { max-width: 220px; padding: 6px 8px; font-size: .9rem; }

/* landing: explainer, signals, steps, explained list, faq, cta */
.explain { margin: 44px 0; }
.signal-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.signal { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 18px; }
.signal h3 { margin: 0 0 6px; font-size: 1.05rem; }
.signal p { margin: 0; color: var(--ink-2); font-size: .92rem; }

.rank-steps { margin: 44px 0; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 14px; }
.steps > li { counter-increment: step; position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 20px 22px 20px 70px; }
.steps > li::before { content: counter(step); position: absolute; left: 20px; top: 20px; width: 34px; height: 34px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 1.05rem var(--head); display: grid; place-items: center; }
.steps h3 { margin: 0 0 4px; }
.steps p { margin: 0; color: var(--ink-2); }
.step-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.step-pill { font-size: .86rem; font-weight: 600; color: var(--blue); text-decoration: none; padding: 6px 12px; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.step-pill:hover { border-color: var(--blue); }

.tool-explain { display: grid; }
.tool-explain .te { padding: 12px 0; border-top: 1px solid var(--line); }
.tool-explain .te:first-child { border-top: 0; }
.tool-explain .te h4 { margin: 0 0 2px; font-size: 1rem; }
.tool-explain .te h4 a { color: var(--ink); text-decoration: none; }
.tool-explain .te h4 a:hover { color: var(--blue); }
.tool-explain .te p { margin: 0; color: var(--ink-2); font-size: .92rem; }
.tool-explain .te .te-how { margin-bottom: 4px; }
.tool-explain .te p strong { color: var(--ink); }
.tool-explain .te .te-leads strong { color: var(--blue); }

.faq { margin: 44px 0; }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary { cursor: pointer; padding: 14px 0; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before { content: "+"; color: var(--blue); font-weight: 700; margin-right: 10px; }
.faq details[open] summary::before { content: "–"; }
.faq details p { margin: 0 0 14px; color: var(--ink-2); }

.cta-band { position: relative; overflow: hidden; text-align: center; color: #fff; border: 0; border-radius: var(--radius-l); padding: 52px 24px; margin: 44px 0;
  background: linear-gradient(135deg, #2a5fe0 0%, #1b3f8f 60%, #14296a 100%); box-shadow: 0 24px 60px var(--shadow); }
.cta-band::before { content: ""; position: absolute; inset: auto -10% -60% 40%; width: 420px; height: 420px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.14), transparent 70%); pointer-events: none; }
.cta-band > * { position: relative; }
.cta-band h2 { margin: 0 0 8px; color: #fff; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.cta-band p { margin: 0 0 22px; color: rgba(255,255,255,.88); max-width: 56ch; margin-left: auto; margin-right: auto; }
.cta-band .btn { --b: #fff; background: #fff; color: #1b3f8f; border-color: #fff; }
.cta-band .btn:not(.ghost):hover { filter: none; background: #eef3ff; transform: translateY(-1px); }
.cta-band .btn.ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.6); }
.cta-band .btn.ghost:hover { background: rgba(255,255,255,.12); border-color: #fff; color: #fff; }

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

/* dialog */
.modal { border: 0; border-radius: var(--radius-l); padding: 0; width: min(440px, calc(100vw - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 20px 60px var(--shadow); }
.modal::backdrop { background: rgba(10, 18, 32, .55); }
.modal-body { padding: 22px; }

/* scan report */
.scanning .progress-steps { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.progress-steps li { padding-left: 28px; position: relative; color: var(--ink-3); }
.progress-steps li::before { content: ""; position: absolute; left: 0; top: .3em; width: 14px; height: 14px; border-radius: 50%; border: 2px solid var(--line); }
.progress-steps li.done { color: var(--ink-2); }
.progress-steps li.done::before { background: var(--green); border-color: var(--green); }
.progress-steps li.now { color: var(--ink); font-weight: 600; }
.progress-steps li.now::before { border-color: var(--blue); border-right-color: transparent; animation: spin .9s linear infinite; }
.report-head { border-radius: var(--radius-l); overflow: hidden; border: 1px solid var(--line); background: var(--card); margin-bottom: 16px; }
.report-banner { aspect-ratio: 4 / 1; max-height: 200px; width: 100%; background: linear-gradient(120deg, var(--surface), var(--hover)) center / cover no-repeat; display: grid; place-items: center; color: var(--ink-3); font-size: .95rem; }
.report-id { display: flex; gap: 18px; align-items: flex-end; padding: 0 22px 18px; flex-wrap: wrap; }
.report-photo { width: 120px; height: 120px; border-radius: 50%; border: 4px solid var(--card); margin-top: -60px; object-fit: cover; background: var(--avatar); display: grid; place-items: center; font: 700 2rem var(--head); color: var(--blue-dark); }
.report-who { min-width: 0; flex: 1; }
.report-who h2 { margin: 6px 0 2px; }
.report-who p { margin: 0 0 4px; }
.score-panel .dial-wrap { align-items: center; }
.fix-list { margin: 0; padding-left: 22px; display: grid; gap: 10px; }
.fix-list li { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; }
.fix-list .gain { font-weight: 700; color: var(--green); }
.mini-parts { display: grid; gap: 8px; }
.mini-part { display: grid; grid-template-columns: 150px minmax(0, 1fr) 46px; gap: 10px; align-items: center; font-size: .92rem; }
.mini-part strong { text-align: right; font-variant-numeric: tabular-nums; }

/* optimizer */
.fix-cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin: 16px 0; }
.fix-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; border-radius: var(--radius-l); background: var(--card); border: 1px solid var(--line); border-top: 4px solid var(--line); }
.fix-card.red { border-top-color: var(--red); }
.fix-card.yellow { border-top-color: var(--yellow); }
.fix-card.green { border-top-color: var(--green); }
.fix-card .fix-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.fix-card h3 { margin: 0; }
.fix-card .pts { font: 700 1rem var(--head); font-variant-numeric: tabular-nums; }
.fix-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); font-size: .92rem; flex: 1; }
.fix-card .btn { align-self: flex-start; }
.setup { max-width: 760px; }
.setup .more summary { cursor: pointer; font-weight: 600; color: var(--blue); }
.rail-links { list-style: none; margin: 14px 0 0; padding: 12px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.rail-links a { display: block; padding: 7px 10px; border-radius: var(--radius-m); color: var(--ink-2); text-decoration: none; font-size: .9rem; }
.rail-links a:hover, .rail-links a.active { background: var(--hover); color: var(--ink); }
.current-banner { width: 100%; border-radius: var(--radius-s); margin-top: 10px; aspect-ratio: 4 / 1; object-fit: cover; background: var(--surface); }

/* standalone tools */
.tool-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.post-text { white-space: pre-wrap; margin-top: 10px; }

/* professional report header + AI improvement plan */
.report-topbar { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px 18px; margin-bottom: 14px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); }
.report-brand { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.report-logo { font-family: var(--head); font-weight: 600; font-size: 1.1rem; }
.report-logo b { color: var(--blue); }
.report-date { font-size: .9rem; white-space: nowrap; }
.improve-box:empty { display: none; }
.improve-box { margin-bottom: 16px; }
.improve-panel { border-color: var(--blue); }
.improve-summary { font-size: 1.05rem; }
.improve-list { display: grid; gap: 16px; padding: 0; list-style: none; counter-reset: imp; margin: 0; }
.improve-list > li { counter-increment: imp; position: relative; padding-left: 40px; }
.improve-list > li::before { content: counter(imp); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; background: var(--blue); color: #fff; font: 700 .9rem var(--head); display: grid; place-items: center; }
.improve-list h4 { margin: 0 0 4px; }
.improve-list p { margin: 0 0 6px; }
.improve-example { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-m); padding: 12px; margin-top: 8px; }

@media (max-width: 900px) {
  .hero, .tool-layout { grid-template-columns: 1fr; }
  .topnav { display: none; }
  .mini-part { grid-template-columns: 120px minmax(0, 1fr) 46px; }
}
@media (max-width: 520px) {
  .linkbox { flex-direction: column; }
}
main > * + * { margin-top: 16px; }
.rail-links a::before { content: none; }
.tool-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); }

/* ---------- simple guides and controls ---------- */
.tool-head > * + * { margin-top: 0; }
.guide { background: var(--blue-soft); border-radius: var(--radius-m); padding: 12px 16px; margin: -8px 0 20px; max-width: 760px; }
.guide summary { cursor: pointer; font-weight: 650; color: var(--blue-dark); }
.guide ol { margin: 8px 0 2px; padding-left: 20px; display: grid; gap: 3px; color: var(--ink); }
.guide-tip { margin: 8px 0 0; font-size: .9rem; color: var(--ink-2); }
.seg { display: inline-flex; flex-wrap: wrap; gap: 4px; padding: 4px; background: var(--surface); border-radius: 10px; }
.seg button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; font: 600 .9rem var(--body); color: var(--ink-2); cursor: pointer; }
.seg button[aria-checked=true] { background: var(--card); color: var(--blue); box-shadow: 0 1px 3px var(--shadow); }
.more-opts { margin: 4px 0 14px; }
.more-opts > summary { cursor: pointer; font-weight: 600; color: var(--blue); font-size: .93rem; padding: 6px 0; }
.more-body { padding-top: 10px; }
.inline-check { display: inline-flex !important; align-items: center; gap: 8px; font-weight: 500; font-size: .9rem; margin: 0; cursor: pointer; }
.inline-check input { width: 18px; height: 18px; accent-color: var(--blue); }

/* top bar tools menu (small screens) */
.topnav .all-tools { color: var(--blue); font-weight: 600; }
#toolmenu { display: none; position: relative; }
.toolmenu summary { list-style: none; cursor: pointer; padding: 6px 12px; border: 1px solid var(--line); border-radius: var(--radius-s); font-weight: 600; font-size: .9rem; }
.toolmenu summary::-webkit-details-marker { display: none; }
.toolmenu-list { position: absolute; left: 0; top: 42px; z-index: 60; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-m); box-shadow: 0 12px 30px var(--shadow); padding: 6px; display: grid; min-width: 240px; }
.toolmenu-list a { padding: 9px 12px; border-radius: 6px; color: var(--ink); text-decoration: none; }
.toolmenu-list a:hover { background: var(--hover); }
@media (max-width: 900px) { #toolmenu { display: block; } .topbar { gap: 10px; } }

/* home tool groups */
.tool-group + .tool-group { margin-top: 22px; }
.group-title { font-size: 1rem; color: var(--ink-2); margin-bottom: 10px; }

/* banner studio */
.templates { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
.templates button { display: grid; gap: 4px; padding: 3px; background: var(--card); border: 2px solid var(--line); }
.templates button span { font-size: .78rem; color: var(--ink-2); padding: 0 2px 2px; text-align: left; }
.templates button[aria-pressed=true] span { color: var(--blue); font-weight: 600; }
.templates canvas { border-radius: 4px; }
.themes { gap: 8px; }
.themes button { width: 34px; height: 34px; }
.controls h3 { font-size: 1rem; margin-bottom: 10px; }

/* photo studio */
.photo-canvas { width: 260px; height: 260px; border-radius: 50%; background: var(--well); cursor: grab; touch-action: none; display: block; box-shadow: 0 0 0 1px var(--line); }
.photo-left { position: sticky; top: 80px; }
@media (max-width: 900px) { .photo-left { position: static; } .photo-canvas { margin: 0 auto; } }

/* content calendar */
.tag.t0 { background: var(--blue-soft); color: var(--blue-dark); }
.tag.t1 { background: var(--green-soft); color: var(--green-ink); }
.tag.t2 { background: var(--amber-soft); color: var(--amber-ink); }
.tag.t3 { background: var(--red-soft); color: var(--red); }
.tag.t4 { background: #efe7fb; color: #5b2bb5; }
.tag.t5 { background: #e3f4f8; color: #0e6a80; }
.cal-list { display: grid; gap: 12px; }
.cal-item { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px; }
.cal-item.done { opacity: .7; }
.cal-item.flash { box-shadow: 0 0 0 3px var(--blue); }
.cal-item-top { display: grid; grid-template-columns: 64px minmax(0, 1fr); gap: 14px; }
.cal-date { display: grid; justify-items: center; align-content: start; background: var(--surface); border-radius: var(--radius-m); padding: 8px 4px; line-height: 1.1; }
.cal-date strong { font: 700 1.5rem var(--head); }
.cal-date span { font-weight: 600; font-size: .85rem; }
.cal-date small { color: var(--ink-3); font-size: .78rem; }
.cal-title { font-weight: 650; font-size: 1.02rem !important; margin-top: 6px; border-color: transparent !important; padding-left: 4px !important; }
.cal-title:hover { border-color: var(--line) !important; }
.cal-hook { margin: 6px 0 0 4px; color: var(--ink-2); font-size: .93rem; }
.cal-actions { margin-top: 12px; }
.cal-actions input[type=date] { width: auto; padding: 6px 8px; font-size: .88rem; }
.cal-post-wrap { margin-top: 12px; }
.cal-post-wrap > * + * { margin-top: 8px; }
.cal-post { min-height: 180px; }
.cal-grid-wrap { overflow-x: auto; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(100px, 1fr)); gap: 4px; min-width: 720px; }
.cal-head { font-size: .8rem; font-weight: 650; color: var(--ink-3); padding: 4px 6px; }
.cal-cell { min-height: 92px; background: var(--surface); border-radius: 8px; padding: 6px; display: grid; align-content: start; gap: 4px; }
.cal-cell.today { box-shadow: inset 0 0 0 2px var(--blue); }
.cal-num { font-size: .78rem; font-weight: 600; color: var(--ink-3); }
.cal-chip { border: 0; text-align: left; border-radius: 6px; padding: 5px 7px; font: 600 .78rem/1.25 var(--body); cursor: pointer; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.cal-chip.t0 { background: var(--blue-soft); color: var(--blue-dark); }
.cal-chip.t1 { background: var(--green-soft); color: var(--green-ink); }
.cal-chip.t2 { background: var(--amber-soft); color: var(--amber-ink); }
.cal-chip.t3 { background: var(--red-soft); color: var(--red); }
.cal-chip.t4 { background: #efe7fb; color: #5b2bb5; }
.cal-chip.t5 { background: #e3f4f8; color: #0e6a80; }
.cal-chip.done { text-decoration: line-through; opacity: .6; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .tag.t4, :root:not([data-theme="light"]) .cal-chip.t4 { background: #2c1f4a; color: #cdb6ff; }
  :root:not([data-theme="light"]) .tag.t5, :root:not([data-theme="light"]) .cal-chip.t5 { background: #10343d; color: #9fe3f2; }
}
:root[data-theme="dark"] .tag.t4, :root[data-theme="dark"] .cal-chip.t4 { background: #2c1f4a; color: #cdb6ff; }
:root[data-theme="dark"] .tag.t5, :root[data-theme="dark"] .cal-chip.t5 { background: #10343d; color: #9fe3f2; }
@media (max-width: 600px) { .cal-item-top { grid-template-columns: 52px minmax(0, 1fr); } }
@media (max-width: 480px) {
  .topbar-right { gap: 6px; }
  .topbar-right .btn.small { padding: 0 10px; }
  .brand span { display: none; }
}
.cal-chip { max-height: calc(3.75em + 10px); }

/* ---------- top menu: Profile Score + All Tools dropdown ---------- */
.topnav { overflow: visible; align-items: center; }
.tools-dd { position: relative; }
.tools-dd > summary { list-style: none; cursor: pointer; padding: 6px 10px; border-radius: var(--radius-s); color: var(--ink-2); font-size: .92rem; display: flex; align-items: center; gap: 6px; white-space: nowrap; }
.tools-dd > summary::-webkit-details-marker { display: none; }
.tools-dd > summary::after { content: ""; width: 7px; height: 7px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.tools-dd[open] > summary::after { transform: rotate(-135deg) translateY(-2px); }
.tools-dd > summary:hover, .tools-dd[open] > summary { background: var(--hover); color: var(--ink); }
.tools-dd > summary[aria-current=page] { color: var(--blue); font-weight: 600; }
.tools-dd-panel { position: absolute; top: calc(100% + 8px); left: 0; z-index: 70; width: min(940px, calc(100vw - 32px)); background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: 0 18px 40px var(--shadow); padding: 14px; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px 14px; }
.tools-dd-title { font-size: .75rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 6px 10px; }
.tools-dd-group a { display: grid; gap: 2px; padding: 8px 10px; border-radius: var(--radius-m); text-decoration: none; color: var(--ink); }
.tools-dd-group a strong { font-size: .92rem; font-weight: 600; }
.tools-dd-group a span { font-size: .8rem; color: var(--ink-3); line-height: 1.35; }
.tools-dd-group a:hover, .tools-dd-group a[aria-current=page] { background: var(--hover); }
.tools-dd-group a[aria-current=page] strong { color: var(--blue); }
.tools-dd-all { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 10px 10px 2px; font-size: .88rem; font-weight: 600; color: var(--blue); text-decoration: none; }
#toolmenu { display: none !important; }
@media (max-width: 900px) {
  .topnav { display: flex; flex: 1; gap: 2px; }
  .tools-dd-panel { position: fixed; top: 60px; left: 16px; right: 16px; width: auto; grid-template-columns: 1fr; max-height: calc(100vh - 80px); overflow-y: auto; }
  .tools-dd-group a span { display: none; }
}
@media (max-width: 480px) {
  .topnav > a { display: none; }
}
.tools-dd-panel a { white-space: normal; font-size: inherit; }
.tools-dd-group a span { font-weight: 400; }
@media (min-width: 901px) { .tools-dd-panel { position: fixed; top: 58px; left: 50%; transform: translateX(-50%); } }

/* ---------- expert tools ---------- */
.chip-list { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.kw-list { margin: 10px 0 0; padding-left: 22px; display: grid; gap: 6px; }
.check-list { display: grid; gap: 8px; }
.example-card { border: 1px solid var(--line); border-radius: var(--radius-l); overflow: hidden; background: var(--card); }
.example-banner { background: linear-gradient(120deg, #0d1b3e, #1f4fd1); color: #fff; padding: 22px 24px 46px; text-align: right; display: grid; gap: 4px; }
.example-banner strong { font: 700 1.2rem var(--head); }
.example-banner span { opacity: .85; font-size: .9rem; }
.example-id { display: flex; gap: 16px; align-items: flex-end; padding: 0 22px 18px; }
.example-avatar { width: 96px; height: 96px; border-radius: 50%; margin-top: -48px; border: 4px solid var(--card); background: var(--avatar); display: grid; place-items: center; font: 700 1.6rem var(--head); color: var(--blue-dark); flex: none; }
.example-id h2 { margin: 8px 0 2px; font-size: 1.25rem; }
.example-id p { margin: 0 0 2px; }
.ai-design textarea { min-height: 70px; }
.ai-design.big { border: 2px solid var(--blue); }
.ai-form { display: grid; gap: 10px 16px; }
@media (min-width: 560px) { .ai-form { grid-template-columns: 1fr 1fr; } }
.ai-form .field { margin: 0; }

/* ---------- carousel maker ---------- */
.car-layout { display: grid; grid-template-columns: minmax(0, 1fr) minmax(300px, 400px); gap: 20px; align-items: start; }
.car-left { position: sticky; top: 76px; }
.car-stage { display: flex; align-items: center; gap: 10px; justify-content: center; background: var(--well); border-radius: var(--radius-l); padding: 16px; }
.car-preview { width: min(100%, 420px); height: auto; aspect-ratio: 4 / 5; border-radius: 8px; box-shadow: 0 8px 24px var(--shadow); background: var(--card); }
.car-nav { flex: none; }
.car-strip { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 8px; }
.car-thumb { flex: none; width: 72px; border: 2px solid transparent; border-radius: 6px; padding: 0; background: none; cursor: pointer; position: relative; }
.car-thumb canvas { width: 100%; height: auto; display: block; border-radius: 4px; }
.car-thumb span { position: absolute; left: 4px; bottom: 4px; background: rgba(0,0,0,.6); color: #fff; font-size: .7rem; padding: 1px 5px; border-radius: 4px; }
.car-thumb[aria-pressed=true] { border-color: var(--blue); }
@media (max-width: 900px) { .car-layout { grid-template-columns: 1fr; } .car-left { position: static; } .car-nav { display: none; } }

/* ---------- fix plan ---------- */
.fix-plan { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; counter-reset: plan; }
.fix-plan > li { counter-increment: plan; display: grid; grid-template-columns: 40px minmax(0, 1fr) auto; gap: 14px; align-items: start; padding: 16px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); }
.fix-plan > li::before { content: counter(plan); width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--blue-soft); color: var(--blue-dark); font: 700 1rem var(--head); }
.fix-plan h3 { margin: 0 0 4px; font-size: 1.02rem; }
.fix-plan ul { margin: 4px 0 10px; padding-left: 18px; color: var(--ink-2); font-size: .93rem; }
.fix-plan .gain { font: 700 1rem var(--head); color: var(--green); white-space: nowrap; }
.fix-plan .row { gap: 8px; }
@media (max-width: 600px) { .fix-plan > li { grid-template-columns: 30px minmax(0, 1fr); } .fix-plan .gain { grid-column: 2; } }
.car-layout > * { min-width: 0; }
.car-templates { display: grid; grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); gap: 10px; }
.car-templates button { display: grid; gap: 4px; padding: 3px; border: 2px solid var(--line); border-radius: var(--radius-s); background: var(--card); cursor: pointer; }
.car-templates button[aria-pressed=true] { border-color: var(--blue); }
.car-templates canvas { width: 100%; height: auto; display: block; border-radius: 4px; }
.car-templates span { font-size: .76rem; color: var(--ink-2); text-align: left; padding: 0 2px 2px; }
.car-templates button[aria-pressed=true] span { color: var(--blue); font-weight: 600; }

/* Header nav links (About / Contact / Blog) sit beside the tools dropdown. */
.topnav > a { padding: 6px 10px; border-radius: var(--radius-s); color: var(--ink-2); text-decoration: none; font-size: .92rem; font-weight: 500; white-space: nowrap; }
.topnav > a:hover { background: var(--hover); color: var(--ink); }
.topnav > a[aria-current=page] { color: var(--blue); font-weight: 600; }

/* ---------- mobile hamburger drawer ---------- */
.navmenu { position: relative; display: none; }
.navmenu > summary { list-style: none; cursor: pointer; width: 42px; height: 42px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: var(--radius-s); background: var(--card); }
.navmenu > summary::-webkit-details-marker { display: none; }
.nm-bars { display: block; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; }
.nm-bars::before, .nm-bars::after { content: ""; position: absolute; left: 0; width: 18px; height: 2px; background: var(--ink); border-radius: 2px; }
.nm-bars::before { top: -6px; }
.nm-bars::after { top: 6px; }
.navmenu[open] > summary { background: var(--hover); }
.nm-panel { position: fixed; top: 60px; left: 12px; right: 12px; z-index: 80; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-l); box-shadow: 0 18px 44px var(--shadow); padding: 10px; max-height: calc(100vh - 76px); overflow-y: auto; display: grid; gap: 4px; }
.nm-group { display: grid; gap: 2px; }
.nm-group + .nm-group { margin-top: 4px; padding-top: 8px; border-top: 1px solid var(--line); }
.nm-title { font-size: .72rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); padding: 8px 10px 2px; }
.nm-panel a, .nm-logout { display: block; width: 100%; text-align: left; padding: 11px 12px; border-radius: var(--radius-m); color: var(--ink); text-decoration: none; font-size: .98rem; font-weight: 500; background: none; border: 0; cursor: pointer; font-family: inherit; }
.nm-panel a:hover, .nm-logout:hover { background: var(--hover); }
.nm-panel a[aria-current=page] { color: var(--blue); font-weight: 600; }
.nm-cta { background: var(--blue) !important; color: #fff !important; text-align: center !important; font-weight: 600 !important; margin-top: 4px; }
.nm-all { color: var(--blue) !important; font-weight: 600 !important; border-top: 1px solid var(--line); margin-top: 4px; }

@media (max-width: 640px) {
  .topbar { grid-template-columns: auto 1fr auto; gap: 8px; padding: 0 14px; }
  .nav-center { justify-self: start; gap: 0; }
  .topnav { display: none !important; }
  .nav-btn { display: none !important; }
  .navmenu { display: block; }
  .topbar-right { gap: 0; }
  .brand span { display: inline; }
}

/* ---------- blog ---------- */
.blog-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.blog-card { display: flex; flex-direction: column; gap: 8px; padding: 20px; border: 1px solid var(--line); border-radius: var(--radius-l); background: var(--card); text-decoration: none; color: var(--ink); transition: border-color .15s ease, transform .15s ease, box-shadow .15s ease; }
.blog-card:hover { border-color: var(--blue); transform: translateY(-2px); box-shadow: 0 10px 28px var(--shadow); }
.blog-card { padding: 0; overflow: hidden; }
.blog-card-img { width: 100%; height: auto; aspect-ratio: 1200 / 630; flex: 0 0 auto; display: block; background: var(--surface); border-bottom: 1px solid var(--line); }
.blog-card > :not(.blog-card-img) { margin-left: 20px; margin-right: 20px; }
.blog-card-cat { margin-top: 16px; }
.blog-card > .blog-card-meta { margin-bottom: 18px; }
.blog-card h3 { margin: 0; font-size: 1.1rem; line-height: 1.3; }
.blog-card p { margin: 0; color: var(--ink-2); font-size: .92rem; flex: 1; }
.blog-card-cat { font-size: .72rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--blue); }
.blog-card-meta { font-size: .82rem; color: var(--ink-3); }

.blog-post { max-width: 760px; margin: 0 auto; }
.crumbs { font-size: .85rem; color: var(--ink-3); margin-bottom: 10px; }
.crumbs a { color: var(--blue); text-decoration: none; }
.blog-post > h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.15; letter-spacing: -0.02em; margin: 0 0 10px; }
.blog-meta { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--ink-3); font-size: .9rem; margin-bottom: 20px; }
.blog-meta .dot { opacity: .5; }
.blog-hero-img { width: 100%; height: auto; aspect-ratio: 1200 / 630; display: block; border: 1px solid var(--line); border-radius: var(--radius-l); margin: 0 0 26px; background: var(--surface); }
.blog-lead { font-size: 1.18rem; line-height: 1.6; color: var(--ink-2); margin: 0 0 24px; }
.blog-toc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-l); padding: 16px 20px; margin: 0 0 28px; }
.blog-toc strong { display: block; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--ink-3); margin-bottom: 8px; }
.blog-toc ol { margin: 0; padding-left: 20px; display: grid; gap: 6px; }
.blog-toc a { color: var(--blue); text-decoration: none; }
.blog-toc a:hover { text-decoration: underline; }
.blog-section { margin: 0 0 24px; }
.blog-section h2, .blog-faq h2, .blog-takeaways h2, .blog-related h2 { font-size: 1.45rem; line-height: 1.25; margin: 28px 0 12px; scroll-margin-top: 76px; }
.blog-section p { line-height: 1.75; margin: 0 0 14px; color: var(--ink); }
.blog-section ul { line-height: 1.7; padding-left: 22px; }
.blog-takeaways { background: var(--blue-soft); border-radius: var(--radius-l); padding: 20px 24px; margin: 28px 0; }
.blog-takeaways h2 { margin-top: 0; color: var(--blue-dark); }
.blog-takeaways ul { margin: 0; padding-left: 20px; display: grid; gap: 8px; line-height: 1.6; }
.blog-cta { border: 1px solid var(--line); border-left: 4px solid var(--blue); border-radius: var(--radius-l); padding: 20px 24px; margin: 28px 0; background: var(--card); }
.blog-cta p { color: var(--ink-2); margin: 6px 0 14px; }
.blog-faq { margin: 28px 0; }
.blog-faq details { border-bottom: 1px solid var(--line); padding: 14px 0; }
.blog-faq summary { cursor: pointer; font-weight: 600; }
.blog-faq p { color: var(--ink-2); margin: 10px 0 0; line-height: 1.6; }
.blog-vote { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 32px 0; padding: 20px; border: 1px dashed var(--line); border-radius: var(--radius-l); }
.blog-vote-btns { display: flex; gap: 10px; }
.vote-btn { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: var(--card); cursor: pointer; font: 600 .92rem var(--body); color: var(--ink); }
.vote-btn:hover { border-color: var(--blue); }
.vote-btn.on { border-color: var(--blue); background: var(--blue-soft); color: var(--blue-dark); }
.vote-n { font-size: .82rem; color: var(--ink-3); }
.blog-related { margin-top: 36px; border-top: 1px solid var(--line); padding-top: 24px; }
.blog-tool-links { list-style: none; padding: 0; margin: 14px 0 0; display: grid; gap: 10px; }
.blog-tool-links li { line-height: 1.5; }
.blog-tool-links a { font-weight: 600; color: var(--blue); text-decoration: none; }
.blog-tool-links a:hover { text-decoration: underline; }
.section-foot { text-align: center; margin-top: 22px; }
