:root {
  --bg: #17181c;
  --panel: #202126;
  --lifted: #2a2b32;
  --line: #34353d;
  --text: #f1f1f4;
  --muted: #abadb9;
  --purple: #b6a7ff;
  --purple-ink: #201a35;
  --green: #88cfb3;
  --amber: #e8c180;
  --red: #f0a0a0;
  --blue: #91b9ee;
  --linkedin: #0a66c2;
  --radius: 10px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Inter, Roboto, sans-serif;
  --mono: ui-monospace, "SF Mono", Menlo, monospace;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); font: 15px/1.5 var(--font); }
body { min-height: 100vh; display: flex; flex-direction: column; }
a { color: var(--purple); }
a:hover { color: #d2c9ff; }
:focus-visible { outline: 2px solid var(--purple); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .5rem; }
h1 { font-size: 1.75rem; letter-spacing: -.01em; }
h2 { font-size: 1.2rem; }
h3 { font-size: 1rem; }
p { margin: 0 0 .75rem; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); font-size: .85rem; word-break: break-all; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--purple); color: var(--purple-ink); padding: 8px 12px; border-radius: 6px; z-index: 10; }
.skip:focus { left: 8px; }

.topbar { display: flex; align-items: center; gap: 16px; padding: 12px 24px; border-bottom: 1px solid var(--line); background: var(--panel); position: sticky; top: 0; z-index: 5; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 650; }
.brand-mark { display: grid; place-items: center; width: 28px; height: 28px; border-radius: 8px; background: var(--purple); color: var(--purple-ink); font-weight: 800; }
.topnav { display: flex; gap: 4px; flex: 1; flex-wrap: wrap; }
.topnav a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 8px; }
.topnav a:hover { color: var(--text); background: var(--lifted); }
.topnav a[aria-current="page"] { color: var(--text); background: var(--lifted); }
.account { display: flex; align-items: center; gap: 10px; min-height: 32px; }

main { flex: 1; width: 100%; max-width: 1160px; margin: 0 auto; padding: 28px 24px 48px; }
main:focus { outline: none; }
.footer { display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; padding: 16px 24px; border-top: 1px solid var(--line); font-size: .85rem; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card + .card { margin-top: 16px; }
.stack > * + * { margin-top: 16px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.row.spread { justify-content: space-between; }
.grid { display: grid; gap: 16px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid.stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }
.page-head p { margin: 0; }

.hero { padding: 40px 0 24px; max-width: 720px; }
.hero h1 { font-size: 2.4rem; }
.hero p { font-size: 1.1rem; color: var(--muted); }

.stat { background: var(--lifted); border-radius: var(--radius); padding: 14px 16px; }
.stat .value { font-size: 1.8rem; font-weight: 700; display: block; }
.stat .label { color: var(--muted); font-size: .85rem; }

.btn { appearance: none; border: 1px solid var(--line); background: var(--lifted); color: var(--text); padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 550; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; }
.btn:hover { border-color: #4a4b55; color: var(--text); }
.btn.primary { background: var(--purple); color: var(--purple-ink); border-color: var(--purple); }
.btn.primary:hover { background: #c7bbff; color: var(--purple-ink); }
.btn.linkedin { background: var(--linkedin); border-color: var(--linkedin); color: #fff; }
.btn.danger { color: var(--red); }
.btn.ghost { background: transparent; }
.btn.small { padding: 4px 10px; min-height: 30px; font-size: .85rem; }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: .78rem; font-weight: 600; background: var(--lifted); color: var(--muted); border: 1px solid var(--line); }
.badge.green { color: var(--green); border-color: #3c5c50; }
.badge.amber { color: var(--amber); border-color: #5f5136; }
.badge.red { color: var(--red); border-color: #5f3c3c; }
.badge.blue { color: var(--blue); border-color: #3b4d66; }

.notice { border-radius: var(--radius); padding: 12px 14px; border: 1px solid var(--line); background: var(--lifted); margin-bottom: 16px; }
.notice.error { border-color: #6b3d3d; background: #2c1f22; }
.notice.success { border-color: #3c5c50; background: #1d2a25; }
.notice.warn { border-color: #5f5136; background: #2a251c; }
.notice p:last-child { margin-bottom: 0; }

form .field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 12px; }
label { font-weight: 550; font-size: .9rem; }
.hint { color: var(--muted); font-size: .8rem; font-weight: 400; }
input[type=text], input[type=email], input[type=url], input[type=search], select, textarea {
  font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; width: 100%;
}
textarea { min-height: 120px; resize: vertical; }
input[aria-invalid="true"] { border-color: var(--red); }
.form-grid { display: grid; gap: 0 14px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin: 0 0 12px; }
legend { font-weight: 550; font-size: .9rem; padding: 0 4px; }
.checks { display: flex; flex-wrap: wrap; gap: 6px 16px; }
.checks label { font-weight: 400; display: flex; gap: 6px; align-items: center; }

.tabs { display: flex; gap: 4px; flex-wrap: wrap; border-bottom: 1px solid var(--line); margin-bottom: 20px; }
.tabs a { padding: 8px 12px; color: var(--muted); text-decoration: none; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a[aria-current="page"] { color: var(--text); border-bottom-color: var(--purple); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { color: var(--muted); font-weight: 550; font-size: .85rem; }
tr.suppressed td { opacity: .6; }

.board { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.column { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; min-height: 120px; }
.column h3 { display: flex; justify-content: space-between; }
.mini { background: var(--lifted); border-radius: 8px; padding: 10px; margin-top: 8px; }
.mini select { margin-top: 6px; padding: 4px 6px; font-size: .85rem; }

.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 0; border-bottom: 1px solid var(--line); }
.list > li:last-child { border-bottom: 0; }

.empty { text-align: center; padding: 32px 16px; color: var(--muted); }
.empty h3 { color: var(--text); }

.signin-wrap { display: grid; place-items: center; min-height: 420px; }
dialog { background: var(--panel); color: var(--text); border: 1px solid var(--line); border-radius: 12px; padding: 0; width: min(640px, calc(100vw - 32px)); }
dialog::backdrop { background: rgba(0, 0, 0, .6); }
dialog .dlg-body { padding: 20px; max-height: 80vh; overflow: auto; }
dialog .dlg-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--lifted); border: 1px solid var(--line); padding: 10px 16px; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.4); z-index: 20; max-width: calc(100vw - 32px); }
.spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; display: inline-block; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .spinner { animation: none; } }

@media (max-width: 720px) {
  .topbar { padding: 10px 14px; }
  main { padding: 20px 14px 40px; }
  .hero h1 { font-size: 1.8rem; }
  .board { grid-template-columns: repeat(5, 78vw); }
  th.hide-sm, td.hide-sm { display: none; }
}
