:root {
  /* Baddy Books PR palette (blend of both media kits)
     Ink #101010 · Black #000000 · Burgundy #4B0925 · Wine #720D36 · Berry #9C2052
     Magenta #D20A82 / #EA33B2 · Hot pink #E93694 · Bone #F8F4ED · Silver #B9B9BD · Light gray #E6E6E6 */
  color-scheme: dark;
  --black: #000000;
  --burgundy: #4b0925;
  --wine: #720d36;
  --berry: #9c2052;
  --magenta: #d20a82;
  --magenta-2: #ea33b2;
  --hotpink: #e93694;
  --pink-soft: #ff7ac2;
  --bone: #f8f4ed;
  --silver: #b9b9bd;
  --lightgray: #e6e6e6;

  --paper: #101010;
  --paper-2: #1b1619;
  --paper-3: #2a2025;
  --card: #161214;
  --field: #0b0a0b;
  --ink: #f8f4ed;
  --ink-2: #e6e6e6;
  --ink-3: #b9b9bd;
  --line: #2c2328;
  --line-2: #43323a;
  --spine: #d20a82;
  --spine-2: #4b0925;
  --gold: #ff7ac2;
  --rust: #ff4f9a;
  --rust-soft: rgba(233, 54, 148, 0.16);
  --sage: #d20a82;
  --sage-soft: rgba(210, 10, 130, 0.16);
  --plum: #ea33b2;
  --plum-soft: rgba(234, 51, 178, 0.16);
  --ochre: #e7a1c4;
  --ochre-soft: rgba(156, 32, 82, 0.28);
  --slate: #b9b9bd;
  --slate-soft: rgba(185, 185, 189, 0.14);

  --display: "Gloock", "Georgia", serif;
  --body: "Bricolage Grotesque", "Gill Sans", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;

  --radius: 4px;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.5), 0 12px 28px -16px rgba(0, 0, 0, 0.9);
  --glow: 0 0 0 1px rgba(210, 10, 130, 0.35), 0 10px 30px -12px rgba(210, 10, 130, 0.45);
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background:
    radial-gradient(1100px 560px at 90% -12%, rgba(210, 10, 130, 0.16), transparent 60%),
    radial-gradient(900px 520px at -10% 110%, rgba(114, 13, 54, 0.32), transparent 60%),
    var(--paper);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
}
.grain {
  position: fixed; inset: 0; pointer-events: none; z-index: 1; opacity: 0.22; mix-blend-mode: screen;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .97 0 0 0 0 .95 0 0 0 0 .93 0 0 0 .14 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--pink-soft); }
::selection { background: var(--magenta); color: #fff; }
.ico { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.mono { font-family: var(--mono); }

/* ---------- Shell & spine ---------- */
.shell { position: relative; z-index: 2; display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.spine {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background:
    linear-gradient(90deg, rgba(0,0,0,.22), transparent 14px, transparent calc(100% - 10px), rgba(0,0,0,.25)),
    repeating-linear-gradient(0deg, rgba(255,255,255,.015) 0 2px, transparent 2px 5px),
    linear-gradient(180deg, var(--black) 0%, #1a0710 55%, var(--burgundy) 100%);
  color: var(--bone);
  border-right: 1px solid rgba(210, 10, 130, 0.35);
  box-shadow: 6px 0 28px -12px rgba(210, 10, 130, 0.35);
}
.spine-title { padding: 24px 22px 20px; background: var(--magenta); border-bottom: 1px solid var(--black); display: flex; align-items: center; gap: 12px; }
.spine-mark {
  font-family: var(--display); font-size: 20px; width: 42px; height: 42px; display: grid; place-items: center;
  border: 2px dashed var(--bone); color: var(--bone); background: var(--black); border-radius: 50%;
}
.spine-word { font-family: var(--display); font-size: 21px; line-height: 1.05; }
.nav { display: flex; flex-direction: column; padding: 10px 0 16px; gap: 1px; flex: 1; overflow-y: auto; }
.nav button {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 9px 22px; background: none; border: 0;
  text-align: left; cursor: pointer; color: rgba(248, 244, 237, 0.72); font-size: 14.5px;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav button:hover { color: #fff; background: rgba(210, 10, 130, 0.12); }
.nav button:focus-visible { outline: 2px solid var(--gold); outline-offset: -4px; }
.nav button.active { color: #fff; background: linear-gradient(90deg, rgba(210, 10, 130, 0.32), rgba(114, 13, 54, 0.2)); box-shadow: inset 3px 0 0 var(--magenta); }
.nav button.active::after {
  content: ""; position: absolute; right: 16px; top: -2px; width: 12px; height: 28px; background: var(--gold);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 78%, 0 100%);
  animation: ribbon .35s var(--ease);
}
@keyframes ribbon { from { transform: translateY(-12px); opacity: 0; } to { transform: none; opacity: 1; } }
.nav .count {
  margin-left: auto; margin-right: 22px; font-family: var(--mono); font-size: 11px; padding: 1px 7px; border-radius: 99px;
  background: rgba(234, 51, 178, 0.18); color: var(--pink-soft);
}
.nav .count.alert { background: var(--magenta); color: #fff; }
.nav-sep { margin: 14px 22px 4px; font-size: 10.5px; letter-spacing: 0.18em; text-transform: uppercase; color: var(--pink-soft); opacity: .85; }
.spine-meet {
  display: flex; align-items: center; gap: 12px; margin: 0 14px 14px; padding: 10px 12px; border: 1px dashed rgba(248, 244, 237, 0.35);
  border-radius: var(--radius); color: var(--bone); text-decoration: none; font-size: 14px; transition: background .2s var(--ease), border-color .2s var(--ease);
}
.spine-meet:hover { background: rgba(210, 10, 130, 0.18); border-color: var(--magenta); }
.spine-meet:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.spine-foot { padding: 14px 22px 20px; font-family: var(--mono); font-size: 10.5px; letter-spacing: 0.08em; text-transform: uppercase; color: rgba(248, 244, 237, 0.5); display: flex; flex-direction: column; gap: 2px; border-top: 1px solid rgba(210, 10, 130, 0.4); }

/* ---------- Page ---------- */
.page { min-width: 0; padding: 0 40px 80px; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 16px 0 12px; background: linear-gradient(var(--paper) 72%, rgba(16, 16, 16, 0));
}
.crumbs { font-family: var(--mono); font-size: 11.5px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--ink-3); white-space: nowrap; }
.crumbs b { color: var(--ink); font-weight: 500; }
.topbar-actions { display: flex; align-items: center; gap: 10px; }
.gsearch { position: relative; display: flex; align-items: center; }
.gsearch .ico { position: absolute; left: 13px; color: var(--ink-3); pointer-events: none; }
.gsearch input { padding: 9px 14px 9px 36px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card); width: 240px; font-size: 14px; transition: width .25s var(--ease); }
.gsearch input:focus { outline: 2px solid var(--magenta); outline-offset: 1px; width: 300px; }
.gresults { position: absolute; top: calc(100% + 8px); right: 0; width: 380px; max-height: 60vh; overflow-y: auto; background: var(--card); border: 1px solid var(--line-2); border-radius: 6px; box-shadow: var(--shadow); padding: 6px; animation: pop .18s var(--ease); }
.gresults[hidden] { display: none; }
.gresults button { display: grid; grid-template-columns: 86px 1fr; gap: 10px; width: 100%; background: none; border: 0; padding: 8px 10px; text-align: left; border-radius: 4px; cursor: pointer; align-items: baseline; }
.gresults button:hover, .gresults button.sel { background: var(--paper-2); }
.gresults .k { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.gresults .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 14px; }
.gresults .none { padding: 14px; color: var(--ink-3); font-size: 14px; text-align: center; }
.author-filter select {
  appearance: none; padding: 9px 34px 9px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23f8f4ed' stroke-width='2.5'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E") no-repeat right 13px center;
  cursor: pointer; min-width: 160px; font-size: 14px;
}
.quick-add { position: relative; }
.quick-menu {
  position: absolute; right: 0; top: calc(100% + 8px); background: var(--card); border: 1px solid var(--line-2); border-radius: 6px;
  box-shadow: var(--shadow); padding: 6px; min-width: 190px; display: flex; flex-direction: column; animation: pop .18s var(--ease);
}
.quick-menu[hidden] { display: none; }
.quick-menu button { background: none; border: 0; padding: 9px 12px; text-align: left; border-radius: 4px; cursor: pointer; }
.quick-menu button:hover, .quick-menu button:focus-visible { background: var(--paper-2); outline: none; }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 7px; padding: 9px 16px; border-radius: 99px; border: 1px solid var(--line-2);
  background: var(--card); cursor: pointer; font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink);
  transition: transform .15s var(--ease), background .2s, border-color .2s; white-space: nowrap;
}
.btn:hover { border-color: var(--hotpink); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:focus-visible { outline: 2px solid var(--spine); outline-offset: 2px; }
.btn-ink { background: var(--magenta); border-color: var(--magenta); color: #fff; box-shadow: 0 8px 22px -12px rgba(210, 10, 130, 0.9); }
.btn-ink:hover { background: var(--magenta-2); border-color: var(--magenta-2); }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--paper-2); border-color: transparent; }
.btn-danger { color: var(--rust); border-color: transparent; background: transparent; }
.btn-danger:hover { background: var(--rust-soft); border-color: transparent; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .55; cursor: progress; }

/* ---------- Masthead ---------- */
.masthead { display: grid; grid-template-columns: 1fr auto; align-items: end; gap: 24px; padding: 14px 0 24px; border-bottom: 2px solid var(--magenta); margin-bottom: 28px; animation: rise .5s var(--ease) both; }
.masthead h1 { font-family: var(--display); font-weight: 400; font-size: clamp(36px, 4.6vw, 60px); line-height: .95; margin: 0; letter-spacing: -0.01em; }
.masthead h1 em { font-style: normal; color: var(--magenta-2); text-shadow: 0 0 22px rgba(234, 51, 178, 0.35); }
.masthead .kicker { font-family: var(--mono); font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-soft); margin-bottom: 10px; }
.masthead .dek { color: var(--ink-2); margin: 14px 0 0; max-width: 64ch; font-size: 16px; }
.masthead-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.section-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 14px; }
.section-title h2 { font-family: var(--display); font-weight: 400; font-size: 25px; margin: 0; }
.section-title .meta { font-family: var(--mono); font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }

@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.stagger > * { animation: rise .5s var(--ease) both; }
.stagger > *:nth-child(2) { animation-delay: .06s; }
.stagger > *:nth-child(3) { animation-delay: .12s; }
.stagger > *:nth-child(4) { animation-delay: .18s; }
.stagger > *:nth-child(5) { animation-delay: .24s; }
.stagger > *:nth-child(n+6) { animation-delay: .3s; }

/* ---------- Ledger stats ---------- */
.ledger { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border: 1px solid var(--line-2); background: var(--card); margin-bottom: 32px; box-shadow: var(--shadow); }
.ledger > div { padding: 16px 20px; border-right: 1px dashed var(--line-2); }
.ledger > div:last-child { border-right: 0; }
.ledger .num { font-family: var(--display); font-size: 38px; line-height: 1; }
.ledger .num small { font-size: 18px; color: var(--ink-3); }
.ledger .lbl { font-size: 13px; color: var(--ink-3); margin-top: 6px; }
.ledger .alert .num { color: var(--rust); }

.today-grid { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 34px 40px; }
.today-grid .wide { grid-column: 1 / -1; }
.panel { min-width: 0; }

/* ---------- Rows ---------- */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line-2); }
.row {
  display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; padding: 12px 6px;
  border-bottom: 1px solid var(--line); cursor: pointer; transition: background .2s var(--ease), padding .2s var(--ease);
}
.row:hover { background: rgba(210, 10, 130, 0.08); padding-left: 12px; }
.row-title { font-weight: 500; }
.row-sub { display: flex; flex-wrap: wrap; gap: 6px 12px; font-size: 13px; color: var(--ink-3); margin-top: 3px; align-items: center; }
.row.done .row-title { text-decoration: line-through; color: var(--ink-3); }
.row.overdue .due { color: var(--rust); font-weight: 600; }
.due { font-family: var(--mono); font-size: 12px; text-align: right; white-space: nowrap; color: var(--ink-2); }
.due small { display: block; color: var(--ink-3); font-size: 11px; }

.check {
  appearance: none; width: 20px; height: 20px; border: 1.5px solid var(--silver); border-radius: 50%; cursor: pointer; margin: 0;
  display: grid; place-items: center; transition: background .2s, transform .2s var(--ease); background: var(--card);
}
.check:hover { transform: scale(1.1); }
.check:checked { background: var(--magenta); border-color: var(--magenta); }
.check:checked::after { content: ""; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); }
.check:focus-visible { outline: 2px solid var(--spine); outline-offset: 2px; }
.check.sq { border-radius: 4px; width: 18px; height: 18px; }

.who { display: inline-flex; align-items: center; gap: 6px; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; flex: none; box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-family: var(--mono); letter-spacing: .04em; text-transform: uppercase;
  padding: 2px 8px; border-radius: 3px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap;
}
.tag.high { background: var(--berry); color: #fff; box-shadow: inset 0 0 0 1px var(--hotpink); }
.tag.low { background: var(--slate-soft); color: var(--silver); }
.tag.plum { background: var(--plum-soft); color: var(--pink-soft); }
.tag.ochre { background: var(--ochre-soft); color: var(--ochre); }
.tag.slate { background: var(--slate-soft); color: var(--slate); }
.tag.plat { color: #fff; }

.queue { display: flex; flex-direction: column; gap: 10px; }
.queue-item { display: grid; grid-template-columns: 58px 1fr; gap: 14px; padding: 12px; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; transition: transform .2s var(--ease), box-shadow .2s; }
.queue-item:hover { transform: translateX(3px); box-shadow: var(--glow); }
.stamp { text-align: center; border-right: 1px dashed var(--line-2); padding-right: 12px; }
.stamp .d { font-family: var(--display); font-size: 26px; line-height: 1; }
.stamp .m { font-family: var(--mono); font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); }
.stamp .t { font-family: var(--mono); font-size: 11px; color: var(--pink-soft); margin-top: 4px; }
.excerpt { font-size: 14px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 4px; }

.campaign-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }

/* ---------- Campaign cards ---------- */
.ccard {
  position: relative; background: var(--card); border: 1px solid var(--line-2); padding: 20px 20px 18px 26px; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .25s var(--ease), box-shadow .25s; overflow: hidden;
}
.ccard::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 7px; background: var(--c, var(--spine)); }
.ccard:hover { transform: translateY(-3px) rotate(-.25deg); box-shadow: var(--glow); }
.ccard:focus-visible { outline: 2px solid var(--spine); outline-offset: 2px; }
.ccard h3 { font-family: var(--display); font-weight: 400; font-size: 22px; margin: 6px 0 2px; line-height: 1.1; }
.ccard .book { font-style: italic; color: var(--ink-2); font-size: 14px; }
.ccard .range { font-family: var(--mono); font-size: 11.5px; color: var(--ink-3); margin-top: 10px; }
.meter { height: 6px; background: var(--paper-3); border-radius: 99px; overflow: hidden; margin-top: 6px; }
.meter > span { display: block; height: 100%; background: var(--c, var(--spine)); border-radius: inherit; transform-origin: left; animation: grow .8s var(--ease) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.meter-row { display: flex; justify-content: space-between; font-size: 12px; color: var(--ink-3); margin-top: 12px; }
.ccard .counts { display: flex; gap: 14px; margin-top: 14px; font-size: 12.5px; color: var(--ink-2); border-top: 1px dashed var(--line-2); padding-top: 10px; }
.ccard .counts b { font-family: var(--display); font-weight: 400; font-size: 18px; margin-right: 3px; }

.status-pill { font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; text-transform: uppercase; padding: 2px 8px; border-radius: 99px; border: 1px solid currentColor; white-space: nowrap; }
.st-planning, .st-onboarding { color: var(--slate); }
.st-active { color: var(--magenta-2); }
.st-wrapping_up, .st-paused { color: var(--ochre); }
.st-complete, .st-archived { color: var(--ink-3); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 20px; }
.chip {
  padding: 6px 13px; border-radius: 99px; border: 1px solid var(--line-2); background: transparent; cursor: pointer; font-size: 13px;
  transition: background .2s, color .2s, border-color .2s;
}
.chip:hover { border-color: var(--hotpink); }
.chip.on { background: var(--magenta); color: #fff; border-color: var(--magenta); }
.toolbar .spacer { flex: 1; }
.search { padding: 8px 14px; border: 1px solid var(--line-2); border-radius: 99px; background: var(--card); min-width: 220px; }
.search:focus { outline: 2px solid var(--magenta); outline-offset: 1px; }
.seg { display: inline-flex; border: 1px solid var(--line-2); border-radius: 99px; overflow: hidden; }
.seg button { border: 0; background: transparent; padding: 6px 13px; cursor: pointer; font-size: 13px; }
.seg button.on { background: var(--magenta); color: #fff; }

.group { margin-bottom: 30px; }
.group-head { display: flex; align-items: baseline; gap: 10px; margin-bottom: 4px; }
.group-head h3 { font-family: var(--display); font-weight: 400; font-size: 21px; margin: 0; }
.group-head .n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); }
.group.overdue h3 { color: var(--rust); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); }
table.dt { width: 100%; border-collapse: collapse; font-size: 14px; }
.dt th { text-align: left; font-family: var(--mono); font-weight: 500; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--pink-soft); padding: 10px 14px; background: var(--burgundy); border-bottom: 1px solid var(--wine); white-space: nowrap; }
.dt th.sortable { cursor: pointer; user-select: none; }
.dt th.sortable:hover { color: var(--ink); }
.dt td { padding: 10px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.dt tbody tr { cursor: pointer; transition: background .15s; }
.dt tbody tr:hover { background: rgba(210, 10, 130, 0.08); }
.dt tbody tr.done td { color: var(--ink-3); }
.dt tbody tr.done .tt { text-decoration: line-through; }
.dt .num { text-align: right; font-family: var(--mono); white-space: nowrap; }
.dt tfoot td { font-weight: 600; background: var(--paper-2); border-bottom: 0; }
.dt .late { color: var(--rust); font-weight: 600; }

/* ---------- Boards ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.col { background: rgba(75, 9, 37, 0.28); border: 1px solid var(--line); border-radius: 6px; padding: 12px; min-height: 260px; transition: background .2s, border-color .2s; }
.col.drop { background: var(--sage-soft); border-color: var(--magenta); border-style: dashed; }
.col-head { display: flex; justify-content: space-between; align-items: center; margin: 2px 4px 12px; }
.col-head h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 18px; }
.col-head .n { font-family: var(--mono); font-size: 11px; color: var(--ink-3); background: var(--card); padding: 1px 8px; border-radius: 99px; }
.col-body { display: flex; flex-direction: column; gap: 10px; }
.kcard {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 13px; cursor: grab; position: relative;
  box-shadow: 0 1px 0 rgba(0,0,0,.4); transition: transform .2s var(--ease), box-shadow .2s;
}
.kcard:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.kcard.dragging { opacity: .45; transform: rotate(2deg); }
.kcard:focus-visible { outline: 2px solid var(--spine); outline-offset: 2px; }
.kcard .k-top { display: flex; justify-content: space-between; gap: 8px; align-items: center; margin-bottom: 7px; }
.kcard .k-title { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.kcard .k-foot { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 12px; color: var(--ink-3); margin-top: 9px; }
.kcard .k-foot .mono { font-size: 11px; }
.kcard .late { color: var(--rust); font-weight: 600; }
.col-add { width: 100%; margin-top: 10px; background: none; border: 1px dashed var(--line-2); padding: 8px; border-radius: var(--radius); cursor: pointer; color: var(--ink-3); font-size: 13px; }
.col-add:hover { color: var(--ink); border-color: var(--hotpink); background: var(--card); }
.stats-line { display: flex; gap: 10px; font-family: var(--mono); font-size: 11px; color: var(--ink-2); }

.design-thumb {
  border-radius: 3px; margin: -2px -3px 10px; display: grid; place-items: center; color: rgba(255,255,255,.92);
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .08em; position: relative; overflow: hidden;
  background: linear-gradient(135deg, var(--c, var(--spine)), color-mix(in srgb, var(--c, var(--spine)) 55%, #000));
}
.design-thumb::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(45deg, rgba(255,255,255,.06) 0 6px, transparent 6px 12px); }
.canva-link { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--pink-soft); text-decoration: none; }
.canva-link:hover { text-decoration: underline; }

/* ---------- Calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.cal-head h2 { font-family: var(--display); font-weight: 400; font-size: 34px; margin: 0 8px 0 0; min-width: 240px; }
.legend { display: flex; gap: 14px; margin-left: auto; font-size: 12.5px; color: var(--ink-3); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 2px; display: inline-block; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line-2); border-left: 1px solid var(--line-2); background: var(--card); box-shadow: var(--shadow); }
.cal-dow { padding: 8px 10px; font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-soft); border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); background: var(--burgundy); }
.cal-day { min-height: 118px; padding: 6px 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.cal-day.out { background: rgba(0, 0, 0, 0.45); }
.cal-day.out .cal-num { color: var(--ink-3); opacity: .6; }
.cal-day.today { background: rgba(210, 10, 130, 0.12); box-shadow: inset 0 0 0 2px var(--magenta); }
.cal-num { display: flex; justify-content: space-between; align-items: center; font-family: var(--display); font-size: 17px; padding: 0 2px 2px; }
.cal-num button { opacity: 0; background: none; border: 0; cursor: pointer; color: var(--ink-3); padding: 0 4px; font-size: 18px; line-height: 1; transition: opacity .15s; }
.cal-day:hover .cal-num button, .cal-num button:focus-visible { opacity: 1; }
.cal-item {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font-size: 12px; padding: 2px 6px; border-radius: 3px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; line-height: 1.5; border-left: 3px solid var(--c);
  background: color-mix(in srgb, var(--c) 18%, var(--card));
}
.cal-item:hover { background: color-mix(in srgb, var(--c) 30%, var(--card)); }
.cal-item.done { text-decoration: line-through; opacity: .6; }
.cal-item.k-deadline { --c: var(--hotpink); }
.cal-item.k-post { --c: var(--slate); }
.cal-item.k-design { --c: #c2306a; }
.cal-item.k-campaign { --c: var(--ochre); font-weight: 600; }
.cal-more { font-size: 11px; color: var(--ink-3); padding-left: 6px; }
.agenda .day-block { margin-bottom: 22px; }
.agenda .day-block h3 { font-family: var(--display); font-weight: 400; font-size: 20px; margin: 0 0 6px; }
.agenda .day-block.today h3 { color: var(--magenta-2); }

/* ---------- Authors ---------- */
.roster { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.acard { background: var(--card); border: 1px solid var(--line-2); box-shadow: var(--shadow); display: grid; grid-template-rows: auto 1fr auto; transition: transform .25s var(--ease); }
.acard:hover { transform: translateY(-3px); box-shadow: var(--glow); }
.acard-cover { height: 86px; background: linear-gradient(135deg, var(--c), color-mix(in srgb, var(--c) 50%, #000)); position: relative; padding: 14px 18px; color: #fff; display: flex; align-items: flex-end; justify-content: space-between; }
.acard-cover .initials { position: absolute; right: 16px; top: 8px; font-family: var(--display); font-size: 46px; opacity: .25; line-height: 1; }
.acard-cover .genre { font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em; text-transform: uppercase; }
.acard-cover .status-pill { color: #fff; position: relative; }
.acard-body { padding: 14px 18px; }
.acard-body h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 23px; }
.acard-body .real { color: var(--ink-3); font-size: 13px; }
.acard-body .notes { color: var(--ink-2); font-size: 13.5px; margin-top: 10px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.acard-stats { display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px dashed var(--line-2); }
.acard-stats div { padding: 10px 8px; text-align: center; font-size: 11px; color: var(--ink-3); }
.acard-stats div + div { border-left: 1px dashed var(--line-2); }
.acard-stats b { display: block; font-family: var(--display); font-weight: 400; font-size: 20px; color: var(--ink); }
.acard-actions { display: flex; gap: 6px; padding: 0 12px 12px; flex-wrap: wrap; }
.retainer { margin-top: 12px; }
.retainer .meter > span { background: var(--c); }
.retainer.over .meter > span { background: var(--rust); }

/* ---------- Detail pages ---------- */
.detail-cols { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.mini { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; margin-bottom: 8px; transition: transform .2s var(--ease); }
.mini:hover { transform: translateX(3px); }
.mini .t { font-weight: 500; font-size: 14px; }
.mini .s { font-size: 12px; color: var(--ink-3); display: flex; gap: 8px; margin-top: 2px; flex-wrap: wrap; align-items: center; }
.back { background: none; border: 0; cursor: pointer; font-family: var(--mono); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--ink-3); padding: 0; margin-bottom: 4px; }
.back:hover { color: var(--ink); }
.facts { display: flex; gap: 28px; flex-wrap: wrap; margin: -8px 0 28px; font-size: 14px; color: var(--ink-2); }
.facts b { display: block; font-family: var(--mono); font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--ink-3); font-weight: 400; }

/* ---------- Library ---------- */
.lib-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.lcard { background: var(--card); border: 1px solid var(--line-2); padding: 16px 18px; display: flex; flex-direction: column; gap: 8px; cursor: pointer; box-shadow: var(--shadow); transition: transform .2s var(--ease); position: relative; }
.lcard:hover { transform: translateY(-2px); box-shadow: var(--glow); }
.lcard h3 { margin: 0; font-family: var(--display); font-weight: 400; font-size: 19px; line-height: 1.15; }
.lcard pre { margin: 0; font-family: var(--mono); font-size: 12px; white-space: pre-wrap; color: var(--ink-2); background: var(--field); padding: 8px 10px; border-radius: 3px; max-height: 110px; overflow: hidden; }
.lcard .lfoot { display: flex; gap: 8px; align-items: center; margin-top: auto; flex-wrap: wrap; }

/* ---------- Reports ---------- */
.report-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 36px; }
.bars { display: flex; flex-direction: column; gap: 10px; }
.bar-row { display: grid; grid-template-columns: 150px 1fr 70px; gap: 12px; align-items: center; font-size: 13.5px; }
.bar-row .lbl { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar-track { height: 14px; background: var(--paper-2); border-radius: 2px; overflow: hidden; }
.bar-track > span { display: block; height: 100%; background: var(--c, var(--spine)); transform-origin: left; animation: grow .8s var(--ease) both .1s; border-radius: 0 2px 2px 0; }
.bar-row .v { text-align: right; font-family: var(--mono); font-size: 12px; color: var(--ink-2); }
.card-box { background: var(--card); border: 1px solid var(--line-2); padding: 18px 20px; box-shadow: var(--shadow); }

/* ---------- Empty / loading ---------- */
.empty { border: 1.5px dashed var(--line-2); border-radius: 6px; padding: 26px 22px; text-align: center; color: var(--ink-3); font-size: 14px; }
.empty .em-title { font-family: var(--display); color: var(--ink); font-size: 20px; margin-bottom: 4px; }
.empty .btn { margin-top: 12px; }
.welcome {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center; padding: 40px; background: linear-gradient(135deg, var(--card) 55%, rgba(114, 13, 54, 0.45));
  border: 1px solid var(--line-2); box-shadow: var(--shadow);
}
.welcome h2 { font-family: var(--display); font-weight: 400; font-size: 36px; margin: 0 0 10px; line-height: 1.05; }
.welcome p { color: var(--ink-2); margin: 0 0 20px; max-width: 52ch; }
.welcome ol { margin: 0; padding: 0; list-style: none; counter-reset: s; display: flex; flex-direction: column; gap: 14px; }
.welcome li { counter-increment: s; display: grid; grid-template-columns: 38px 1fr; gap: 12px; align-items: start; font-size: 14px; color: var(--ink-2); }
.welcome li::before { content: counter(s, upper-roman); font-family: var(--display); font-size: 20px; color: var(--magenta-2); border-bottom: 1px solid var(--line-2); text-align: center; }
.welcome li b { color: var(--ink); display: block; font-weight: 600; }
.skel { background: linear-gradient(90deg, var(--paper-2) 0%, var(--paper-3) 40%, var(--paper-2) 80%); background-size: 200% 100%; animation: shimmer 1.3s linear infinite; border-radius: 4px; }
@keyframes shimmer { to { background-position: -200% 0; } }
.error-box { padding: 20px; border: 1px solid var(--hotpink); background: var(--rust-soft); color: var(--pink-soft); border-radius: 6px; }

/* ---------- Modal & forms ---------- */
.modal { border: 0; padding: 0; background: transparent; max-width: min(760px, calc(100vw - 24px)); width: 100%; max-height: calc(100vh - 40px); }
.modal::backdrop { background: rgba(0, 0, 0, 0.7); backdrop-filter: blur(3px); }
.modal[open] .modal-inner { animation: modalIn .28s var(--ease); }
@keyframes modalIn { from { opacity: 0; transform: translateY(16px) scale(.985); } to { opacity: 1; transform: none; } }
.modal-inner { background: var(--card); border: 1px solid var(--line-2); border-top: 6px solid var(--magenta); box-shadow: 0 30px 70px -20px rgba(210, 10, 130, .35); }
.modal-head { display: flex; justify-content: space-between; align-items: start; padding: 22px 26px 6px; gap: 12px; }
.modal-head h2 { font-family: var(--display); font-weight: 400; font-size: 28px; margin: 0; }
.modal-head .kicker { font-family: var(--mono); font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--pink-soft); }
.x { background: none; border: 0; cursor: pointer; padding: 6px; border-radius: 50%; color: var(--ink-3); }
.x:hover { background: var(--paper-2); color: var(--ink); }
.form { padding: 12px 26px 4px; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px 18px; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field.third { grid-column: span 1; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .03em; color: var(--ink-2); display: flex; justify-content: space-between; gap: 8px; }
.field .hint { font-weight: 400; color: var(--ink-3); font-family: var(--mono); font-size: 11px; }
.field .hint.over { color: var(--rust); font-weight: 600; }
.field input, .field select, .field textarea {
  width: 100%; padding: 9px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--field); transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 84px; }
.field input:focus, .field select:focus, .field textarea:focus { outline: none; border-color: var(--magenta); box-shadow: 0 0 0 3px rgba(210, 10, 130, .25); }
.field input[type="color"] { padding: 3px; height: 40px; cursor: pointer; }
.field.invalid input, .field.invalid textarea, .field.invalid select { border-color: var(--rust); }
.form-error { grid-column: 1 / -1; color: var(--pink-soft); background: var(--rust-soft); padding: 9px 12px; border-radius: var(--radius); font-size: 13.5px; }
.form-error[hidden] { display: none; }
.modal-foot { display: flex; align-items: center; gap: 8px; padding: 18px 26px 22px; border-top: 1px dashed var(--line-2); margin-top: 18px; flex-wrap: wrap; }
.modal-foot .spacer { flex: 1; }
.inline-tools { grid-column: 1 / -1; display: flex; gap: 8px; flex-wrap: wrap; margin-top: -6px; }

.assist { grid-column: 1 / -1; border: 1px solid var(--line-2); background: linear-gradient(135deg, var(--burgundy), var(--paper-2)); padding: 14px 16px; border-radius: 6px; }
.assist-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 13.5px; margin-bottom: 10px; }
.assist-head svg { color: var(--pink-soft); }
.assist-row { display: grid; grid-template-columns: 1fr 160px auto; gap: 8px; }
.assist-row input { padding: 8px 11px; border: 1px solid var(--line-2); border-radius: var(--radius); background: var(--field); min-width: 0; }
.assist .note { font-size: 12px; color: var(--ink-3); margin-top: 7px; }
.spin { width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: rot .7s linear infinite; display: inline-block; }
@keyframes rot { to { transform: rotate(360deg); } }

.day-picker { padding: 10px 26px 26px; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.day-picker button { padding: 18px 12px; border: 1px solid var(--line-2); background: var(--paper); border-radius: 6px; cursor: pointer; font-family: var(--display); font-size: 19px; transition: transform .2s var(--ease), background .2s; }
.day-picker button:hover { background: var(--card); border-color: var(--magenta); transform: translateY(-2px); }

/* ---------- Timer & toasts ---------- */
.timer-pill { position: fixed; left: 260px; bottom: 22px; z-index: 90; display: flex; align-items: center; gap: 12px; background: var(--black); color: var(--bone); border: 1px solid var(--magenta); padding: 8px 8px 8px 16px; border-radius: 99px; box-shadow: var(--glow); font-size: 14px; animation: rise .3s var(--ease); }
.timer-pill[hidden] { display: none; }
.timer-pill .clock { font-family: var(--mono); font-size: 15px; color: var(--pink-soft); }
.timer-pill .pulse { width: 8px; height: 8px; border-radius: 50%; background: var(--magenta-2); animation: pulse 1.4s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .25; } }
.timer-pill .btn { padding: 5px 12px; font-size: 12.5px; }
.toasts { position: fixed; bottom: 22px; right: 22px; z-index: 100; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--black); color: var(--bone); border-left: 4px solid var(--magenta); padding: 11px 16px; border-radius: 6px; font-size: 14px; box-shadow: var(--shadow); animation: rise .3s var(--ease); max-width: 360px; }
.toast.err { background: var(--wine); border-left-color: var(--hotpink); }

/* ---------- Responsive ---------- */
@media (max-width: 1180px) {
  .today-grid, .detail-cols, .report-grid { grid-template-columns: 1fr; }
  .welcome { grid-template-columns: 1fr; }
  .gsearch input { width: 180px; }
  .gsearch input:focus { width: 220px; }
}
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .spine { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; }
  .spine-title { border: 0; padding: 10px 14px; }
  .spine-word, .spine-foot, .nav-sep, .nav .count { display: none; }
  .spine-mark { width: 34px; height: 34px; font-size: 16px; }
  .nav { flex-direction: row; overflow-x: auto; padding: 0; }
  .nav button { padding: 18px 12px; white-space: nowrap; font-size: 13.5px; }
  .nav button .ico { display: none; }
  .spine-meet { margin: 0 10px; padding: 6px 10px; white-space: nowrap; font-size: 13px; }
  .spine-meet .ico { display: none; }
  .nav button.active::after { right: auto; left: 50%; top: 0; width: 10px; height: 14px; margin-left: -5px; }
  .page { padding: 0 16px 80px; }
  .topbar { top: 58px; flex-wrap: wrap; }
  .crumbs { display: none; }
  .topbar-actions { width: 100%; }
  .gsearch { flex: 1; }
  .gsearch input, .gsearch input:focus { width: 100%; }
  .gresults { width: calc(100vw - 32px); left: 0; right: auto; }
  .author-filter select { min-width: 0; max-width: 130px; }
  .masthead { grid-template-columns: 1fr; }
  .masthead-actions { justify-content: flex-start; }
  .form { grid-template-columns: 1fr; }
  .assist-row { grid-template-columns: 1fr; }
  .cal-day { min-height: 74px; }
  .cal-item { font-size: 0; padding: 0; height: 6px; border-left-width: 0; background: var(--c); }
  .cal-head h2 { font-size: 26px; min-width: 0; }
  .legend { display: none; }
  .bar-row { grid-template-columns: 100px 1fr 60px; }
  .timer-pill { left: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
