:root {
  color-scheme: light;
  --page: #f5f6fa;
  --surface: #fff;
  --lane: #eceef5;
  --line: #d8dce8;
  --text: #202239;
  --muted: #575f77;
  --accent: #5545bd;
  --accent-text: #fff;
  --accent-soft: #eae5fd;
  --danger: #a22e4f;
  --todo: #7567b3;
  --doing: #a86516;
  --done: #25774f;
  --shadow: 0 3px 10px #1e20400a;
  font-family: "Instrument Sans", system-ui, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --page: #151520;
    --surface: #202030;
    --lane: #1b1b29;
    --line: #3c3d53;
    --text: #f3f0fa;
    --muted: #bbb8cb;
    --accent: #bfb1ff;
    --accent-text: #1c143b;
    --accent-soft: #343051;
    --danger: #ffa2ba;
    --todo: #b2a4e9;
    --doing: #f2ba72;
    --done: #8bd8af;
    --shadow: 0 3px 10px #0002;
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #151520;
  --surface: #202030;
  --lane: #1b1b29;
  --line: #3c3d53;
  --text: #f3f0fa;
  --muted: #bbb8cb;
  --accent: #bfb1ff;
  --accent-text: #1c143b;
  --accent-soft: #343051;
  --danger: #ffa2ba;
  --todo: #b2a4e9;
  --doing: #f2ba72;
  --done: #8bd8af;
  --shadow: 0 3px 10px #0002;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--page); color: var(--text); line-height: 1.5; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button, summary, select { cursor: pointer; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
[hidden] { display: none !important; }
.skip { position: fixed; z-index: 5; top: .5rem; left: .5rem; padding: .6rem; background: var(--surface); transform: translateY(-180%); }
.skip:focus { transform: none; }
.topbar { background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner, .page { width: min(100% - 3rem, 82rem); margin-inline: auto; }
.topbar-inner { min-height: 4rem; display: flex; align-items: center; gap: clamp(.6rem, 3vw, 2.5rem); }
.brand { display: inline-flex; gap: .65rem; align-items: center; font-weight: 800; letter-spacing: -.045em; font-size: 1.25rem; white-space: nowrap; }
.brand-mark { display: flex; gap: 3px; align-items: flex-start; padding: 9px 7px; background: var(--accent-soft); border-radius: 8px; }
.brand-mark i { width: 3px; height: 10px; border-radius: 2px; background: var(--accent); }
.brand-mark i:first-child { height: 14px; }
.brand-mark i:last-child { height: 7px; }
.topbar nav, .project-nav { display: flex; gap: .25rem; flex-wrap: wrap; }
.topbar nav a, .project-nav a, .mobile-status a { padding: .52rem .75rem; color: var(--muted); border-radius: 8px; font-weight: 650; font-size: .92rem; }
.topbar nav a[aria-current], .project-nav a[aria-current] { background: var(--accent-soft); color: var(--accent); }
.topbar nav a:hover, .project-nav a:hover, .mobile-status a:hover { background: var(--lane); color: var(--text); }
.theme-control { margin-left: auto; }
.page { padding-block: clamp(1.6rem, 4vw, 3.5rem) 4rem; }
.narrow { max-width: 36rem; }
.page-head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; }
.page-head > div { min-width: 0; }
.eyebrow { color: var(--accent); font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; margin-bottom: .35rem; }
h1, h2, h3, p { margin: 0; overflow-wrap: anywhere; }
h1 { font-size: clamp(2rem, 5.5vw, 3.25rem); line-height: 1.08; letter-spacing: -.055em; }
h2 { font-size: 1.05rem; letter-spacing: -.015em; }
h3 { font-size: 1rem; line-height: 1.35; }
.muted { color: var(--muted); }
.description { white-space: pre-wrap; color: var(--muted); margin-top: .65rem; max-width: 78ch; }
.back { display: inline-block; margin-bottom: 1rem; color: var(--accent); font-weight: 650; }
.actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.button, select, input, textarea {
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--text);
  background: var(--surface);
  padding: .55rem .75rem;
  min-height: 2.65rem;
  max-width: 100%;
}
.button { display: inline-flex; justify-content: center; align-items: center; font-size: .9rem; font-weight: 700; }
.button:hover { background: var(--lane); }
.button.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-text); }
.button.primary:hover { filter: brightness(1.12); }
.button.danger, .error, .notice { color: var(--danger); }
textarea { resize: vertical; }
.project-nav { padding-bottom: .75rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--line); }
.toolbar { display: flex; flex-wrap: wrap; gap: .85rem; align-items: center; justify-content: space-between; margin-bottom: 1rem; }
.search { display: flex; gap: .4rem; flex-wrap: wrap; }
.search input { width: min(17rem, 100%); }
.count { font-size: .9rem; }
.mobile-status { display: none; }
.board { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.lane { background: var(--lane); border: 1px solid var(--line); min-height: 17rem; border-radius: 14px; padding: .9rem; scroll-margin-top: .7rem; }
.lane.drop-target { border-color: var(--accent); background: var(--accent-soft); }
.lane-head { display: flex; align-items: center; gap: .55rem; margin: .1rem .15rem .9rem; }
.status-dot { width: .62rem; height: .62rem; border-radius: 100%; }
.todo { background: var(--todo); }.doing { background: var(--doing); }.done { background: var(--done); }
.lane-count { margin-left: auto; font-weight: 700; color: var(--muted); font-variant-numeric: tabular-nums; font-size: .86rem; }
.lane-items, .resource-list { display: grid; gap: .65rem; }
.card, .panel { background: var(--surface); border: 1px solid var(--line); border-radius: 11px; box-shadow: var(--shadow); min-width: 0; }
.card { padding: .85rem; }
.card[draggable] { cursor: grab; }
.card.dragging { opacity: .48; }
.card h3 a:hover { color: var(--accent); text-decoration: underline; }
.card-description { color: var(--muted); font-size: .9rem; margin-top: .3rem; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; white-space: pre-wrap; }
.card-footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem; margin-top: .65rem; font-size: .85rem; }
.card-footer:empty { display: none; }
.move { display: flex; gap: .25rem; max-width: 100%; }
.move select, .move .button { font-size: .85rem; min-height: 2.5rem; padding: .28rem .45rem; min-width: 0; }
.lane-empty { padding: .9rem; color: var(--muted); border: 1px dashed var(--line); border-radius: 8px; font-size: .92rem; text-align: center; }
.auth-panel, .edit-panel, .settings-panel, .upload { padding: clamp(1rem, 4vw, 1.75rem); }
.auth-panel > p { margin-top: .8rem; }
.auth-panel form, .auth-panel > .button, .edit-panel, .settings-panel form { margin-top: 1rem; }
.fields { display: grid; gap: .85rem; }
.fields label { display: grid; gap: .25rem; font-weight: 650; min-width: 0; }
.fields input, .fields textarea, .fields select { width: 100%; }
.fields .button { justify-self: start; }
.footer-action { margin-top: 2rem; }
.upload { margin-bottom: 1rem; }
.upload summary { font-weight: 750; color: var(--accent); }
.upload form { margin-top: .9rem; }
.resource { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1rem; }
.resource > div { min-width: 0; }
.resource .actions, .resource form { flex-shrink: 0; }
.settings-panel { margin-bottom: 1rem; }
.settings-panel p { margin-top: .65rem; }
.notice { margin-bottom: .85rem; }
@media (max-width: 760px) {
  .topbar-inner, .page { width: calc(100% - 1.5rem); }
  .topbar-inner { flex-wrap: wrap; padding-block: .55rem; row-gap: .45rem; }
  .topbar nav { order: 3; flex-basis: 100%; }
  .topbar nav a, .project-nav a { padding: .55rem .6rem; }
  .board { grid-template-columns: 1fr; gap: .75rem; }
  .lane { min-height: 0; }
  .mobile-status { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: .65rem; }
  .mobile-status a { background: var(--surface); border: 1px solid var(--line); }
  .search { width: 100%; }
  .search input { width: auto; flex: 1 1 8rem; min-width: 0; }
  .resource { flex-wrap: wrap; }
  .resource .actions { flex-shrink: 1; }
}
