/* LinkPounce app. Ajay's design language (from Dhucha): dark sidebar, serif headlines (Fraunces) with Inter
   for the interface, eyebrows over headlines that end in a full stop, generous rounded cards with a soft shadow,
   ONE dark moment per key screen, and ONE loud button per screen. LinkPounce's own colours: deep navy where
   Dhucha has forest, "pounce" orange where Dhucha has lime. Light paper, not pure white. */
:root {
  --paper: #f6f4ef; --card: #fffdf9; --ink: #131c2c; --muted: #5b6475; --line: #e4dfd4; --soft: #efece5;
  --navy: #0b1d36; --navy2: #12294a; --navy-ink: #e9eef6; --navy-muted: #9fb0c8;
  --blue: #0a66c2; --pounce: #ff7a1a; --pounce-deep: #d95f06; --pounce-ink: #1c0f03; --pounce-soft: #ffe9d6;
  --good: #14733a; --warn: #a3520a; --bad: #b42318; --good-bg: #e5f4ea; --warn-bg: #fdf0dc; --bad-bg: #fbe7e5; --info-bg: #e7f0fa;
  --serif: "Fraunces", Georgia, "Times New Roman", serif; --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --r-card: 20px; --r-btn: 12px; --shadow: 0 14px 34px rgba(19, 28, 44, .07);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #0d1420; --card: #151e2d; --ink: #edf1f7; --muted: #9ba7ba; --line: #263246; --soft: #1b2638;
    --navy: #070f1c; --navy2: #0e1b30; --blue: #5aa4f0; --pounce: #ff8a35; --pounce-soft: #3a2310;
    --good: #5fd28f; --warn: #f0b85a; --bad: #ff8a80; --good-bg: #133222; --warn-bg: #352a12; --bad-bg: #3a1714; --info-bg: #142538;
    --shadow: none; color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --paper: #0d1420; --card: #151e2d; --ink: #edf1f7; --muted: #9ba7ba; --line: #263246; --soft: #1b2638;
  --navy: #070f1c; --navy2: #0e1b30; --blue: #5aa4f0; --pounce: #ff8a35; --pounce-soft: #3a2310;
  --good: #5fd28f; --warn: #f0b85a; --bad: #ff8a80; --good-bg: #133222; --warn-bg: #352a12; --bad-bg: #3a1714; --info-bg: #142538;
  --shadow: none; color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--paper); color: var(--ink); font: 15px/1.55 var(--sans); }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3 { text-wrap: balance; }
h1 { font-family: var(--serif); font-weight: 600; font-size: 30px; line-height: 1.15; letter-spacing: -.01em; margin: 0 0 6px; }
h2 { font-family: var(--serif); font-weight: 600; font-size: 20px; margin: 0 0 10px; }
h3 { font-size: 15px; margin: 0 0 6px; }
.sub { color: var(--muted); margin: 0 0 20px; max-width: 64ch; }
.eyebrow { display: block; font: 800 11.5px/1 var(--sans); letter-spacing: .18em; text-transform: uppercase; color: var(--pounce-deep); margin-bottom: 10px; }
:focus-visible { outline: 2px solid var(--pounce); outline-offset: 2px; }

/* ---- shell: dark navy sidebar ---- */
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.side { background: var(--navy); color: var(--navy-ink); padding: 18px 12px 14px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 9px; font-family: var(--serif); font-weight: 600; font-size: 21px; color: #fff; padding: 2px 8px 14px; }
.brand:hover { text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand .dot { color: var(--pounce); }
.navgroup { font: 700 10.5px/1 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--navy-muted); margin: 16px 10px 6px; }
nav a { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; color: #d7deea; font-weight: 500; font-size: 14px; margin-bottom: 1px; }
nav a:hover { background: var(--navy2); color: #fff; text-decoration: none; }
nav a.on { background: var(--pounce); color: var(--pounce-ink); font-weight: 700; }
.badge { background: var(--pounce); color: var(--pounce-ink); border-radius: 99px; font-size: 11px; font-weight: 800; padding: 1px 7px; min-width: 20px; text-align: center; }
nav a.on .badge { background: var(--navy); color: var(--pounce); }
.badge:empty { display: none; }
.side-foot { margin-top: auto; font-size: 12px; color: var(--navy-muted); padding: 12px 6px 0; border-top: 1px solid rgba(255,255,255,.08); }
.side-foot .link { color: #cfd9e8; }
.modes span { display: inline-block; border-radius: 6px; padding: 1px 7px; margin: 0 4px 6px 0; font-weight: 700; font-size: 11px; }
.mode-live { background: rgba(95,210,143,.16); color: #7be0a3; } .mode-dry { background: rgba(255,138,53,.16); color: #ffb27a; }
.ver { margin-top: 6px; } .ver .link { color: var(--navy-muted); font: 500 11px ui-monospace, Menlo, monospace; }
.main { padding: 30px 34px 70px; min-width: 0; }
.menu-btn { display: none; }

/* ---- status line (no toasts) ---- */
.status { background: var(--info-bg); border-radius: 12px; padding: 10px 14px; margin-bottom: 16px; font-weight: 600; }
.status.err { background: var(--bad-bg); color: var(--bad); } .status.ok { background: var(--good-bg); color: var(--good); }

/* ---- cards, tiles, layout ---- */
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--r-card); padding: 20px 22px; box-shadow: var(--shadow); margin-bottom: 16px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.between { justify-content: space-between; }
.grid { display: grid; gap: 14px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)); gap: 12px; margin-bottom: 16px; }
.tile { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 14px 16px; }
.tile b { display: block; font-family: var(--serif); font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; } .tile span { color: var(--muted); font-size: 12.5px; }

/* ---- ONE dark moment: hero panels ---- */
.dark { position: relative; overflow: hidden; color: #f3f6fb; border: 0;
  background: radial-gradient(640px 320px at 95% -10%, rgba(255,122,26,.26), transparent 60%), radial-gradient(560px 360px at -8% 115%, rgba(10,102,194,.45), transparent 60%), linear-gradient(160deg, var(--navy), var(--navy2)); }
.dark::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(255,255,255,.06) 1px, transparent 1px); background-size: 22px 22px; pointer-events: none; }
.dark > * { position: relative; z-index: 1; }
.dark .eyebrow { color: var(--pounce); } .dark .sub, .dark .hint { color: #b9c6d9; }
.dark label { color: #e6ecf5; }
.dark input { background: rgba(255,255,255,.08); border-color: rgba(255,255,255,.22); color: #fff; }
.dark input::placeholder { color: #8fa0b8; }

/* ---- buttons: one loud button ---- */
button, .btn { font: 600 14px var(--sans); border: 1.5px solid var(--line); background: var(--card); color: var(--ink); border-radius: var(--r-btn); padding: 8px 14px; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; text-decoration: none; }
button:hover, .btn:hover { border-color: var(--ink); text-decoration: none; }
.primary { background: var(--pounce); color: var(--pounce-ink); border-color: var(--pounce); font-weight: 800; }
.primary:hover { background: var(--pounce-deep); border-color: var(--pounce-deep); color: #fff; }
.danger { color: var(--bad); }
.link { border: 0; background: none; padding: 0; color: var(--blue); font-weight: 600; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
button:disabled { opacity: .5; cursor: default; }
button.big, .btn.big { width: 100%; justify-content: center; padding: 14px 18px; font-size: 16px; margin-top: 16px; border-radius: 14px; }
.chip { font-size: 13px; padding: 5px 11px; border-radius: 99px; }

/* ---- forms ---- */
label { display: block; font-weight: 700; font-size: 13.5px; margin: 12px 0 5px; }
label small, .hint { font-weight: 400; color: var(--muted); font-size: 12.5px; }
input, textarea, select { width: 100%; font: 15px var(--sans); color: var(--ink); background: var(--card); border: 1.5px solid var(--line); border-radius: 12px; padding: 10px 12px; }
input:focus, textarea:focus, select:focus { border-color: var(--blue); outline: none; box-shadow: 0 0 0 3px rgba(10,102,194,.15); }
textarea { min-height: 84px; resize: vertical; }
input[type=checkbox], input[type=radio] { width: 18px; height: 18px; margin: 2px 8px 0 0; accent-color: var(--pounce-deep); flex: none; }
.check { display: flex; align-items: flex-start; gap: 4px; font-weight: 400; margin: 8px 0; }

/* ---- tables, pills, tabs ---- */
table { width: 100%; border-collapse: collapse; } th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 12px; color: var(--muted); font-weight: 700; letter-spacing: .02em; } tr.click { cursor: pointer; } tr.click:hover td { background: var(--soft); }
.table-wrap { overflow-x: auto; }
.pill { display: inline-block; border-radius: 99px; padding: 2px 9px; font-size: 12px; font-weight: 600; background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.good { background: var(--good-bg); color: var(--good); } .pill.warn { background: var(--warn-bg); color: var(--warn); } .pill.bad { background: var(--bad-bg); color: var(--bad); } .pill.info { background: var(--info-bg); color: var(--blue); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 18px 0; overflow-x: auto; }
.tabs button { border: 0; border-bottom: 3px solid transparent; border-radius: 0; background: none; padding: 9px 14px; color: var(--muted); font-weight: 600; }
.tabs button.on { color: var(--ink); border-color: var(--pounce); }
.section-title { font: 800 11.5px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: var(--muted); margin: 20px 0 8px; }
.draft { white-space: pre-wrap; background: var(--soft); border-radius: 12px; padding: 12px 14px; }
.issues { color: var(--warn); font-size: 13px; }
.reason { background: var(--info-bg); border-radius: 12px; padding: 10px 14px; font-size: 14px; }
.thread .m { max-width: 80%; padding: 9px 12px; border-radius: 14px; margin: 6px 0; white-space: pre-wrap; }
.thread .us { background: var(--info-bg); margin-left: auto; } .thread .them { background: var(--soft); }
.empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.bar { height: 8px; background: var(--soft); border-radius: 99px; overflow: hidden; } .bar i { display: block; height: 100%; background: var(--pounce); }
.drawer { position: fixed; inset: 0; background: rgba(8,14,24,.45); z-index: 20; display: flex; justify-content: flex-end; }
.drawer-in { background: var(--paper); width: min(660px, 100%); height: 100%; overflow-y: auto; padding: 24px; position: relative; }
.x { position: absolute; top: 14px; right: 14px; font-size: 20px; line-height: 1; padding: 4px 12px; }
.level { border: 1.5px solid var(--line); border-radius: 14px; padding: 12px 14px; margin: 8px 0; display: flex; gap: 8px; cursor: pointer; font-weight: 400; background: var(--card); }
.level.on { border-color: var(--pounce); background: var(--pounce-soft); }
.timeline div { border-left: 2px solid var(--line); padding: 0 0 10px 12px; font-size: 13px; } .timeline small { color: var(--muted); }
.updbar { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); z-index: 50; display: flex; align-items: center; gap: 12px; background: var(--navy); color: #fff; border-radius: 16px; padding: 10px 10px 10px 16px; max-width: calc(100% - 24px); box-shadow: 0 14px 34px rgba(11,29,54,.35); font-weight: 600; }
.updbar .link { color: #cfd9e8; text-decoration: underline; }

/* ---- welcome and wizard ---- */
.hero-card { border-radius: 24px; padding: 34px; max-width: 680px; margin: 4vh auto; }
.hero-card h1 { font-size: 36px; color: #fff; }
.wizard { max-width: 700px; margin: 0 auto; }
.wizard h1 { font-size: 32px; margin-top: 10px; }
.progress { height: 6px; background: var(--soft); border-radius: 99px; overflow: hidden; }
.progress i { display: block; height: 100%; background: var(--pounce); transition: width .35s; box-shadow: 0 0 10px rgba(255,122,26,.5); }
.wsteps { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 22px; font-size: 12px; color: var(--muted); }
.wsteps span { padding: 3px 10px; border-radius: 99px; background: var(--soft); font-weight: 600; }
.wsteps span.on { background: var(--navy); color: #fff; }
.wsteps span.done { background: var(--good-bg); color: var(--good); }
.skiprest { text-align: center; margin-top: 22px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.working { display: flex; align-items: center; gap: 10px; background: var(--info-bg); border-radius: 12px; padding: 12px 14px; margin-top: 14px; }
.working .wtext { flex: 1; font-weight: 600; } .working .secs { font-variant-numeric: tabular-nums; color: var(--muted); font-size: 13px; }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--pounce); border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spin { animation: none; } .progress i { transition: none; } }

/* ---- project page ---- */
.kv { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 14px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-child { border-bottom: 0; } .kv > span { color: var(--muted); font-size: 13px; font-weight: 700; }
ul.plain { margin: 0; padding-left: 18px; }
.logo-prev { max-height: 52px; max-width: 220px; background: #fff; padding: 6px; border-radius: 10px; border: 1px solid var(--line); }
.swatch { width: 26px; height: 26px; border-radius: 8px; border: 1px solid var(--line); display: inline-block; }

/* ---- Audit My LinkedIn ---- */
.audit-hero { border-radius: 24px; padding: 26px 28px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 26px; align-items: center; margin-bottom: 18px; }
.ring { --p: 0; width: 120px; height: 120px; border-radius: 50%; display: grid; place-items: center; background: conic-gradient(var(--pounce) calc(var(--p) * 1%), rgba(255,255,255,.12) 0); }
.ring > div { width: 96px; height: 96px; border-radius: 50%; background: var(--navy); display: grid; place-items: center; text-align: center; }
.ring b { font-family: var(--serif); font-size: 36px; line-height: 1; color: #fff; font-variant-numeric: tabular-nums; }
.ring small { display: block; font-size: 11px; color: #9fb0c8; margin-top: 2px; }
.audit-hero h2 { color: #fff; font-size: 24px; margin: 0 0 4px; }
.audit-hero .delta { display: inline-block; margin-top: 8px; font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: rgba(95,210,143,.16); color: #7be0a3; }
.audit-hero .delta.down { background: rgba(255,138,128,.16); color: #ffb3ab; }
.todo { border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px; margin-bottom: 12px; background: var(--card); display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.todo .num { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; font-weight: 800; background: var(--pounce-soft); color: var(--pounce-deep); }
.todo.done { opacity: .7; } .todo.done .num { background: var(--good-bg); color: var(--good); }
.todo.done h3 { text-decoration: line-through; }
.todo.skipped { opacity: .55; }
.todo h3 { margin: 2px 0 4px; font-size: 16px; }
.todo .acts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.todo .acts button, .todo .acts .btn { font-size: 13.5px; padding: 7px 12px; }
.good-list { display: flex; flex-wrap: wrap; gap: 6px; }

@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .side { position: fixed; left: -250px; width: 240px; z-index: 30; transition: left .2s; }
  .side.open { left: 0; box-shadow: 0 0 40px rgba(0,0,0,.35); }
  .menu-btn { display: inline-flex; margin-bottom: 12px; }
  .main { padding: 16px max(16px, env(safe-area-inset-right, 0px)) 60px max(16px, env(safe-area-inset-left, 0px)); }
  .g2, .g3, .g4 { grid-template-columns: 1fr; }
  .kv { grid-template-columns: 1fr; gap: 2px; }
  .hero-card { padding: 22px; } .hero-card h1 { font-size: 28px; } h1 { font-size: 26px; }
  .audit-hero { grid-template-columns: 1fr; justify-items: start; padding: 22px; }
}
[hidden] { display: none !important; }
