:root {
  --bg: #f5f1e8;
  --surface: #fffdf8;
  --ink: #23201b;
  --muted: #6d665a;
  --line: #e2dbcb;
  --accent: #c2410c;
  --accent-ink: #fff;
  --chip: #efe8d8;
  --cork: #c79b67;
  --cork-dot: #b38653;
  --shadow: 0 1px 2px rgb(0 0 0 / .08), 0 6px 16px rgb(0 0 0 / .08);
  --note-shadow: 0 2px 3px rgb(0 0 0 / .12), 0 10px 18px -8px rgb(0 0 0 / .35);
  --meter-off: #e4dccb;
  --n-white: #fbfbf7; --n-yellow: #fff27a; --n-pink: #ffc4d6; --n-blue: #b9e2ff; --n-green: #c8f0b4; --n-orange: #ffd2a1; --n-purple: #dccbff;
  --note-ink: #2b2620;
  --iith: #1d4ed8;
  --iiith: #0f766e;
  --f-statistics: #7c3aed; --f-speech: #db2777; --f-rl: #059669; --f-ml: #2563eb; --f-inference: #d97706;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #181612; --surface: #221f1a; --ink: #eee8dc; --muted: #a59d8e; --line: #383228;
    --accent: #fb923c; --accent-ink: #1a1308; --chip: #2e2921; --cork: #6b5132; --cork-dot: #5b442a;
    --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 16px rgb(0 0 0 / .35); --meter-off: #3a342a;
    --iith: #93b4ff; --iiith: #5eead4;
    --f-statistics: #b69cff; --f-speech: #f472b6; --f-rl: #34d399; --f-ml: #7aa7ff; --f-inference: #fbbf24;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #181612; --surface: #221f1a; --ink: #eee8dc; --muted: #a59d8e; --line: #383228;
  --accent: #fb923c; --accent-ink: #1a1308; --chip: #2e2921; --cork: #6b5132; --cork-dot: #5b442a;
  --shadow: 0 1px 2px rgb(0 0 0 / .4), 0 6px 16px rgb(0 0 0 / .35); --meter-off: #3a342a;
  --iith: #93b4ff; --iiith: #5eead4;
  --f-statistics: #b69cff; --f-speech: #f472b6; --f-rl: #34d399; --f-ml: #7aa7ff; --f-inference: #fbbf24;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.5 "IBM Plex Sans", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}
[hidden] { display: none !important; }
a { color: var(--accent); }
h1, h2, h3 { font-family: Fraunces, Georgia, serif; line-height: 1.15; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
.muted { color: var(--muted); }
.error { color: #dc2626; }

/* Layout */
#app { max-width: 1280px; margin: 0 auto; padding: 24px 16px 64px; }
.top { display: flex; flex-wrap: wrap; gap: 16px; align-items: end; justify-content: space-between; margin-bottom: 20px; }
.brand h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 800; letter-spacing: -.01em; }
.sub { margin: 6px 0 0; color: var(--muted); max-width: 60ch; }
.views { display: flex; gap: 4px; background: var(--chip); padding: 4px; border-radius: 10px; max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.views button { white-space: nowrap; flex: 0 0 auto; }
.views button { border: 0; background: none; padding: 7px 14px; border-radius: 7px; cursor: pointer; font-weight: 500; color: var(--muted); }
.views button[aria-selected="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.count { display: inline-block; min-width: 20px; padding: 0 6px; border-radius: 99px; background: var(--n-yellow); color: var(--note-ink); font-size: 12px; font-weight: 600; }
.count:empty { display: none; }

.filters { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 8px; }
.filters input[type="search"], .filters select {
  background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; min-height: 38px;
}
.filters input[type="search"] { flex: 1 1 260px; }
.filters select { flex: 0 1 auto; max-width: 100%; }
.check { display: inline-flex; gap: 6px; align-items: center; color: var(--muted); }

/* Key-area chips */
.focus-bar { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; margin-bottom: 12px; }
.focus-label { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.focus-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.focus-chip {
  --c: var(--muted); display: inline-flex; align-items: center; gap: 7px; cursor: pointer;
  border: 1.5px solid var(--c); color: var(--c); background: var(--surface);
  padding: 6px 14px; border-radius: 99px; font-weight: 600; font-size: 14px; transition: background .12s, color .12s;
}
.focus-chip span { font-size: 11px; font-weight: 600; opacity: .75; }
.focus-chip:hover { background: color-mix(in srgb, var(--c) 12%, var(--surface)); }
.focus-chip[aria-pressed="true"] { background: var(--c); color: var(--surface); }
.focus-mode { display: inline-flex; background: var(--chip); border-radius: 8px; padding: 3px; }
.focus-mode button { border: 0; background: none; padding: 4px 10px; border-radius: 6px; font-size: 13px; cursor: pointer; color: var(--muted); }
.focus-mode button[aria-checked="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.f-statistics { --c: var(--f-statistics); } .f-speech { --c: var(--f-speech); } .f-rl { --c: var(--f-rl); }
.f-ml { --c: var(--f-ml); } .f-inference { --c: var(--f-inference); }
.focus-tags { display: flex; flex-wrap: wrap; gap: 4px; }
.focus-tags:empty { display: none; }
.focus-tag { font-size: 11px; font-weight: 600; padding: 1px 8px; border-radius: 4px; color: var(--c); border: 1px solid color-mix(in srgb, var(--c) 45%, transparent); }
.focus-tag.hit { background: var(--c); color: var(--surface); border-color: var(--c); }
.detail .focus-tags { margin: 2px 0 8px; }

/* Cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.card {
  position: relative; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 16px;
  box-shadow: var(--shadow); cursor: pointer; display: flex; flex-direction: column; gap: 10px; text-align: left;
  transition: transform .12s ease, box-shadow .12s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-2px); outline: none; box-shadow: 0 2px 4px rgb(0 0 0 / .1), 0 12px 24px rgb(0 0 0 / .12); }
.card h3 { font-size: 19px; padding-right: 64px; }
.card .lab { font-size: 13px; color: var(--muted); }
.inst { display: inline-block; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; padding: 2px 7px; border-radius: 4px; border: 1px solid currentColor; }
.inst.iith { color: var(--iith); }
.inst.iiith { color: var(--iiith); }
.chips { display: flex; flex-wrap: wrap; gap: 4px; }
.chip { background: var(--chip); border-radius: 99px; padding: 2px 9px; font-size: 12px; }
.blurb { font-size: 13.5px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; margin: 0; }
.fit { position: absolute; top: 14px; right: 14px; text-align: center; }
.fit b { display: block; font-family: Fraunces, serif; font-size: 24px; line-height: 1; }
.fit small { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.card-foot { display: flex; justify-content: space-between; align-items: center; font-size: 12px; color: var(--muted); margin-top: auto; }
.star { border: 0; background: none; cursor: pointer; font-size: 18px; color: var(--muted); padding: 0 2px; }
.star.on { color: #eab308; }
.mini-notes { display: inline-flex; gap: 3px; align-items: center; }
.mini-notes i { width: 12px; height: 12px; display: inline-block; transform: rotate(-6deg); box-shadow: 0 1px 2px rgb(0 0 0 / .2); }
.status-tag { font-size: 11px; padding: 1px 7px; border-radius: 4px; background: var(--chip); }

/* Rating meters */
.meters { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 14px; }
.meter { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.dots { display: inline-flex; gap: 3px; }
.dots i { width: 9px; height: 9px; border-radius: 2px; background: var(--meter-off); }
.dots i.on { background: var(--accent); }

/* Detail dialog */
.detail { border: 0; padding: 0; max-width: min(1100px, calc(100vw - 16px)); width: 100%; max-height: calc(100vh - 32px); border-radius: 14px; background: var(--surface); color: var(--ink); box-shadow: 0 30px 80px rgb(0 0 0 / .35); }
.detail::backdrop { background: rgb(20 16 10 / .5); backdrop-filter: blur(2px); }
.detail-inner { position: relative; padding: 24px; }
.close { position: sticky; top: 0; float: right; border: 0; background: var(--chip); width: 34px; height: 34px; border-radius: 50%; font-size: 22px; line-height: 1; cursor: pointer; z-index: 2; }
.d-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: baseline; margin-bottom: 6px; padding-right: 40px; }
.d-head h2 { font-size: clamp(24px, 3.5vw, 32px); }
.d-sub { color: var(--muted); margin: 0 0 12px; }
.links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; margin-bottom: 16px; }
.d-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr); gap: 24px; }
@media (max-width: 820px) { .d-grid { grid-template-columns: 1fr; } }
.d-sec { margin-bottom: 18px; }
.d-sec h3 { font-family: "IBM Plex Sans", sans-serif; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin-bottom: 6px; }
.d-sec p { margin: 0 0 6px; }
.d-sec ul { margin: 0; padding-left: 18px; }
.d-sec li { margin-bottom: 4px; }
.rating-row { display: grid; grid-template-columns: 150px auto; gap: 4px 12px; align-items: start; margin-bottom: 10px; }
.rating-row .why { grid-column: 1 / -1; font-size: 13.5px; color: var(--muted); margin: 0; }
.rating-row .label { font-weight: 600; font-size: 14px; }
.standout li { margin-bottom: 8px; }
.tip { background: var(--chip); border-left: 3px solid var(--accent); padding: 8px 12px; border-radius: 0 8px 8px 0; font-size: 14px; }
.sources { font-size: 12.5px; word-break: break-all; }
.conf { font-size: 12px; color: var(--muted); }
.track { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.track select { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }

/* Sticky notes */
.notes-sec { margin-top: 8px; border-top: 1px dashed var(--line); padding-top: 16px; }
.notes-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.notes-head h3 { font-size: 24px; }
.add-note { border: 0; background: var(--n-yellow); color: var(--note-ink); padding: 8px 14px; font-family: Caveat, cursive; font-size: 22px; font-weight: 700; cursor: pointer; box-shadow: var(--note-shadow); transform: rotate(-2deg); }
.add-note:hover { transform: rotate(0deg) scale(1.03); }
.cork {
  background-color: var(--cork);
  background-image: radial-gradient(var(--cork-dot) 1px, transparent 1.5px), radial-gradient(var(--cork-dot) 1px, transparent 1.5px);
  background-size: 14px 14px, 22px 22px; background-position: 0 0, 7px 9px;
  border-radius: 10px; padding: 28px 22px; min-height: 220px;
  display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 28px 22px; align-items: start;
  box-shadow: inset 0 0 0 8px rgb(80 50 20 / .35), inset 0 2px 12px rgb(0 0 0 / .35);
}
.cork .empty { grid-column: 1 / -1; text-align: center; color: #fff8; font-family: Caveat, cursive; font-size: 26px; padding: 40px 0; }
.sticky {
  position: relative; color: var(--note-ink); padding: 26px 16px 12px; min-height: 190px; display: flex; flex-direction: column;
  box-shadow: var(--note-shadow); transform: rotate(var(--tilt, -1.5deg)); transition: transform .15s ease, box-shadow .15s ease;
  background-image: linear-gradient(180deg, rgb(255 255 255 / .25), transparent 30%);
}
.sticky::after { /* curled corner */
  content: ""; position: absolute; right: 0; bottom: 0; width: 22px; height: 22px;
  background: linear-gradient(135deg, transparent 50%, rgb(0 0 0 / .08) 50%, rgb(255 255 255 / .35) 70%);
}
.sticky:hover, .sticky:focus-within { transform: rotate(0deg) scale(1.02); z-index: 1; }
.sticky.yellow { background-color: var(--n-yellow); } .sticky.pink { background-color: var(--n-pink); }
.sticky.blue { background-color: var(--n-blue); } .sticky.green { background-color: var(--n-green); }
.sticky.orange { background-color: var(--n-orange); } .sticky.white { background-color: var(--n-white); } .sticky.purple { background-color: var(--n-purple); }
.pin { position: absolute; top: -7px; left: 50%; width: 16px; height: 16px; margin-left: -8px; border-radius: 50%; background: radial-gradient(circle at 35% 35%, #ff8a80, #c62828 60%, #7f1d1d); box-shadow: 1px 3px 4px rgb(0 0 0 / .35); }
.sticky textarea {
  flex: 1; border: 0; background: transparent; resize: none; outline: none; color: var(--note-ink);
  font-family: Caveat, cursive; font-size: 22px; line-height: 1.15; min-height: 120px; padding: 0;
}
.sticky textarea::placeholder { color: rgb(43 38 32 / .45); }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; font-size: 11px; color: rgb(43 38 32 / .65); margin-top: 6px; }
.swatches { display: flex; gap: 4px; }
.swatches button { width: 14px; height: 14px; border-radius: 50%; border: 1px solid rgb(0 0 0 / .25); padding: 0; cursor: pointer; }
.swatches button.sel { outline: 2px solid rgb(0 0 0 / .55); outline-offset: 1px; }
.del { border: 0; background: none; cursor: pointer; font-size: 15px; color: rgb(43 38 32 / .6); padding: 0 2px; }
.del:hover { color: #b91c1c; }
.saved { opacity: 0; transition: opacity .3s; } .saved.show { opacity: 1; }
.nametag { align-self: flex-start; border: 0; background: rgb(255 255 255 / .55); color: var(--note-ink); font: 600 12px "IBM Plex Sans", sans-serif; padding: 2px 8px; border-radius: 3px; margin-bottom: 6px; cursor: pointer; transform: rotate(-1deg); }
.board-text { font-family: Caveat, cursive; font-size: 22px; line-height: 1.15; white-space: pre-wrap; word-break: break-word; flex: 1; }

/* Login */
.login { min-height: 100vh; display: grid; place-items: center; padding: 16px; background: var(--cork); background-image: radial-gradient(var(--cork-dot) 1px, transparent 1.5px); background-size: 14px 14px; }
.login-card { width: min(360px, 100%); min-height: 0; padding: 32px 24px 24px; gap: 10px; --tilt: -2deg; }
.login-card h1 { font-size: 30px; }
.login-card p { margin: 0; }
.login-card input { border: 0; border-bottom: 2px solid rgb(0 0 0 / .3); background: transparent; padding: 8px 2px; font-size: 18px; outline: none; color: var(--note-ink); }
.login-card button { border: 0; background: var(--note-ink); color: #fff; padding: 10px; border-radius: 6px; font-weight: 600; cursor: pointer; }

/* Method page */
.prose { max-width: 70ch; }
.prose h2 { font-size: 28px; margin-bottom: 12px; }
.prose dt { font-weight: 600; margin-top: 12px; }
.prose dd { margin: 2px 0 0; color: var(--muted); }

@media (max-width: 520px) {
  .views button { padding: 7px 10px; }
  .grid { grid-template-columns: 1fr; }
  .detail-inner { padding: 16px; }
  .cork { grid-template-columns: 1fr 1fr; gap: 20px 12px; padding: 20px 12px; }
  .sticky { min-height: 150px; padding: 22px 10px 10px; }
  .sticky textarea, .board-text { font-size: 19px; }
  .rating-row { grid-template-columns: 1fr auto; }
}
@media (max-width: 380px) { .cork { grid-template-columns: 1fr; } }

/* Investigation board */
body.wide #app { max-width: none; }
.pin-btn { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 5px 10px; cursor: pointer; font-size: 13px; }
.ib-toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.ib-tool {
  border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 7px 12px; min-height: 36px;
  cursor: pointer; font-weight: 500; max-width: 100%;
}
.ib-tool[aria-pressed="true"] { background: #a3242b; border-color: #a3242b; color: #fff; }
.ib-hint { color: var(--muted); font-size: 13px; }
.ib-viewport {
  position: relative; overflow: auto; height: calc(100vh - 210px); min-height: 480px; border-radius: 12px;
  box-shadow: inset 0 0 0 10px #2a2622, 0 10px 30px rgb(0 0 0 / .3); background: #3d3b39; overscroll-behavior: contain;
}
.ib-canvas {
  position: relative; width: 3200px; height: 2200px;
  background-color: #403e3b;
  background-image:
    radial-gradient(rgb(255 255 255 / .05) 1px, transparent 1.2px),
    radial-gradient(rgb(0 0 0 / .18) 1px, transparent 1.2px),
    radial-gradient(ellipse at center, transparent 40%, rgb(0 0 0 / .35));
  background-size: 7px 7px, 11px 11px, 100% 100%;
  background-position: 0 0, 3px 5px, 0 0;
}
.ib-empty { position: absolute; top: 120px; left: 0; width: min(100vw, 1100px); text-align: center; color: rgb(255 255 255 / .6); font-family: Caveat, cursive; font-size: 30px; }
.ib-strings { position: absolute; inset: 0; pointer-events: none; z-index: 50; overflow: visible; }
.ib-string { fill: none; stroke: #b3262e; stroke-width: 2.4; stroke-linecap: round; filter: drop-shadow(1px 3px 2px rgb(0 0 0 / .45)); }
.ib-string.auto { stroke: #8f1f26; stroke-width: 1.8; opacity: .9; }
.ib-hit { fill: none; stroke: transparent; stroke-width: 14; pointer-events: stroke; cursor: pointer; }
.ib-hit:hover + .ib-string, .ib-hit:hover { stroke: rgb(255 255 255 / .18); }
.ib-area { fill: none; stroke: var(--c); stroke-width: 2; stroke-dasharray: 6 5; opacity: .8; }
.ib-area.f-statistics { stroke: #c4a8ff; } .ib-area.f-speech { stroke: #f472b6; } .ib-area.f-rl { stroke: #34d399; }
.ib-area.f-ml { stroke: #7aa7ff; } .ib-area.f-inference { stroke: #fbbf24; }

.ib-item { position: absolute; touch-action: none; user-select: none; cursor: grab; z-index: 1; }
.ib-item.lifted { cursor: grabbing; z-index: 40; }
.ib-item.lifted > div { transform: rotate(0deg) scale(1.04); box-shadow: 0 24px 40px rgb(0 0 0 / .55); }
.stringing .ib-item { cursor: crosshair; }
.ib-item.picked > div { outline: 3px solid #ff5a5f; outline-offset: 4px; }
.ib-pin { position: absolute; top: -4px; left: 50%; transform: translateX(-50%); z-index: 60; pointer-events: none; }
.ib-pin.metal { width: 22px; height: 22px; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #fff, #c9ccd1 30%, #7d838c 70%, #4b5058); box-shadow: 2px 4px 5px rgb(0 0 0 / .5); }
.ib-pin.push { width: 14px; height: 22px; top: -12px; }
.ib-pin.push::before { content: ""; position: absolute; left: 0; top: 0; width: 14px; height: 12px; border-radius: 50% 50% 40% 40%; background: radial-gradient(circle at 35% 30%, #6b6b6b, #1d1d1d 70%); box-shadow: 1px 3px 4px rgb(0 0 0 / .5); }
.ib-pin.push::after { content: ""; position: absolute; left: 6px; top: 11px; width: 2px; height: 9px; background: linear-gradient(#bbb, #666); }

.ib-photo {
  position: relative; width: 240px; padding: 9px; background: #f4f4f0; transform: rotate(var(--tilt));
  box-shadow: 0 3px 6px rgb(0 0 0 / .35), 0 14px 24px -10px rgb(0 0 0 / .6); transition: transform .12s, box-shadow .12s;
}
.ib-photo-inner { background: linear-gradient(160deg, #2f9c94, #23807f); color: #f2fffd; padding: 14px 12px 12px; min-height: 190px; display: flex; flex-direction: column; gap: 6px; }
.ib-prof:nth-child(3n) .ib-photo-inner { background: linear-gradient(160deg, #3794ae, #2a7893); }
.ib-meta { display: flex; justify-content: space-between; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; opacity: .85; }
.ib-meta b { font-family: Fraunces, serif; font-size: 18px; letter-spacing: 0; opacity: 1; }
.ib-photo h4 { font-family: Fraunces, serif; font-size: 19px; line-height: 1.15; margin: 0; }
.ib-photo p { margin: 0; font-size: 12px; opacity: .85; line-height: 1.35; }
.ib-photo .ib-edge { font-size: 11.5px; opacity: .75; }
.ib-tags { display: flex; flex-wrap: wrap; gap: 3px; }
.ib-tags i { font-style: normal; font-size: 10.5px; font-weight: 600; padding: 0 6px; border-radius: 3px; background: rgb(0 0 0 / .22); color: #fff; }
.ib-x { position: absolute; top: 2px; right: 3px; border: 0; background: none; color: rgb(0 0 0 / .45); font-size: 16px; cursor: pointer; opacity: 0; transition: opacity .12s; padding: 0 4px; }
.ib-item:hover .ib-x, .ib-x:focus-visible { opacity: 1; }

.ib-note {
  position: relative; width: 200px; min-height: 170px; padding: 22px 14px 12px; transform: rotate(var(--tilt));
  box-shadow: 0 3px 5px rgb(0 0 0 / .3), 0 14px 20px -10px rgb(0 0 0 / .55); display: flex; flex-direction: column; transition: transform .12s, box-shadow .12s;
  --lines: rgb(120 90 20 / .22);
  background-image: repeating-linear-gradient(transparent 0 25px, var(--lines) 25px 26px);
  background-position: 0 30px;
}
.ib-sticky { background-color: #f7c64a; }
.ib-sticky.c-pink { background-color: #ffb3c8; } .ib-sticky.c-blue { background-color: #a9d8f5; } .ib-sticky.c-green { background-color: #bde8a5; }
.ib-sticky.c-orange { background-color: #ffc98f; } .ib-sticky.c-purple { background-color: #d5c3ff; }
.ib-sticky::after { content: ""; position: absolute; right: 0; bottom: 0; width: 26px; height: 26px; background: linear-gradient(135deg, transparent 50%, rgb(0 0 0 / .12) 50%, rgb(255 255 255 / .4) 75%); }
.ib-paper { background-color: #fbfbf7; --lines: rgb(70 110 170 / .22); padding-left: 30px; min-height: 240px; }
.ib-paper::before { /* punched holes */
  content: ""; position: absolute; left: 9px; top: 14px; bottom: 14px; width: 10px;
  background: radial-gradient(circle, #2f2d2b 3.5px, transparent 4px) 0 0 / 10px 22px repeat-y;
}
.ib-note textarea {
  flex: 1; width: 100%; border: 0; background: transparent; resize: none; outline: none; color: #2b2620;
  font: 600 21px/26px Caveat, cursive; min-height: 120px; padding: 0; pointer-events: none;
}
.ib-note.editing textarea { pointer-events: auto; cursor: text; }
.ib-note.editing { box-shadow: 0 0 0 2px rgb(255 255 255 / .55), 0 14px 20px -10px rgb(0 0 0 / .55); }
.ib-paper textarea { min-height: 190px; }
.ib-owner { align-self: flex-start; font: 600 11px "IBM Plex Sans", sans-serif; background: rgb(255 255 255 / .55); color: #2b2620; padding: 1px 6px; border-radius: 3px; margin-bottom: 4px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 520px) {
  .ib-viewport { height: calc(100vh - 260px); min-height: 380px; }
  .ib-hint { flex-basis: 100%; }
}

/* Overview */
.ov-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 10px; margin-bottom: 22px; }
.ov-stats div { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; display: flex; flex-direction: column; }
.ov-stats b { font-family: Fraunces, serif; font-size: 30px; line-height: 1; }
.ov-stats span { color: var(--muted); font-size: 13px; margin-top: 4px; }
.ov-h { font-size: 22px; margin: 26px 0 12px; display: flex; flex-wrap: wrap; gap: 4px 12px; align-items: baseline; }
.ov-h small { font: 400 13px "IBM Plex Sans", sans-serif; color: var(--muted); }
.ov-lane { margin-bottom: 18px; }
.ov-lane h3 { font: 600 14px "IBM Plex Sans", sans-serif; display: flex; align-items: center; gap: 8px; margin-bottom: 8px; color: var(--c); }
.ov-lane h3 small { color: var(--muted); font-weight: 400; }
.ov-dot { width: 10px; height: 10px; border-radius: 3px; background: var(--c); }
.ov-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.ov-tile {
  position: relative; text-align: left; cursor: pointer; display: flex; flex-direction: column; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--c); border-radius: 10px; padding: 12px 12px 14px;
  transition: transform .12s, box-shadow .12s; overflow: hidden;
}
.ov-tile:hover, .ov-tile:focus-visible { transform: translateY(-2px); box-shadow: var(--shadow); outline: none; }
.ov-tile-name { font-family: Fraunces, serif; font-weight: 600; font-size: 16px; line-height: 1.2; }
.ov-tile-tag { font-size: 12.5px; color: var(--muted); line-height: 1.35; flex: 1; }
.ov-tile-foot { display: flex; justify-content: space-between; align-items: center; gap: 6px; flex-wrap: wrap; }
.ov-avatars { display: inline-flex; }
.ov-avatars i {
  font-style: normal; width: 24px; height: 24px; border-radius: 50%; display: inline-grid; place-items: center;
  font-size: 9.5px; font-weight: 700; color: #fff; border: 2px solid var(--surface); margin-left: -6px; background: var(--iith);
}
.ov-avatars i:first-child { margin-left: 0; }
.ov-avatars i.iiith { background: var(--iiith); }
.ov-avatars i.more { background: var(--muted); }
:root[data-theme="dark"] .ov-avatars i, .ov-avatars i { color: #fff; }
.ov-badges { display: inline-flex; gap: 4px; }
.ov-badges b { font-size: 10.5px; font-weight: 600; padding: 1px 6px; border-radius: 4px; }
.ov-badges .hire { background: color-mix(in srgb, #16a34a 18%, transparent); color: #15803d; }
.ov-badges .open { background: color-mix(in srgb, #2563eb 16%, transparent); color: #1d4ed8; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .ov-badges .hire { color: #4ade80; } :root:not([data-theme="light"]) .ov-badges .open { color: #93b4ff; } }
:root[data-theme="dark"] .ov-badges .hire { color: #4ade80; } :root[data-theme="dark"] .ov-badges .open { color: #93b4ff; }
.ov-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: var(--meter-off); }
.ov-progress i { display: block; height: 100%; background: var(--c); }

.ov-labs { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 460px), 1fr)); gap: 18px; }
.ov-labgroup h4 { font: 600 13px "IBM Plex Sans", sans-serif; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); margin: 0 0 8px; }
.ov-lab { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; margin-bottom: 8px; }
.ov-lab-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; }
.ov-lab-head strong { font-size: 15px; }
.ov-lab-head .muted { font-size: 12.5px; }
.ov-lab-head a { text-decoration: none; font-size: 13px; }
.ov-lab p { margin: 4px 0 6px; font-size: 13.5px; }
.ov-lab-foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px; align-items: center; }
.ov-pis { display: flex; flex-wrap: wrap; gap: 4px; }
.ov-pis button { border: 0; background: var(--chip); border-radius: 99px; padding: 2px 9px; font-size: 12px; cursor: pointer; }
.ov-pis button:hover { background: var(--accent); color: var(--accent-ink); }
.ov-hire { font-size: 12px; color: var(--muted); margin-top: 6px; }
.ov-hdot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; background: #9ca3af; flex: none; align-self: center; }
.ov-hdot.r5, .ov-hdot.r4 { background: #16a34a; } .ov-hdot.r3 { background: #eab308; } .ov-hdot.r2, .ov-hdot.r1 { background: #9ca3af; }
.ov-legend { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; color: var(--muted); }

.ov-study .ov-step { font-weight: 600; margin: 12px 0 4px; }
.ov-checks { list-style: none; padding: 0 !important; }
.ov-checks label { display: flex; gap: 8px; align-items: baseline; cursor: pointer; }
.ov-checks input:checked + * , .ov-checks input:checked { accent-color: var(--accent); }
.ov-kind { display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .05em; background: var(--chip); padding: 0 6px; border-radius: 3px; margin-right: 4px; }
.ov-plist { display: flex; flex-direction: column; gap: 6px; }
.ov-prow { display: flex; gap: 10px; align-items: center; text-align: left; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; cursor: pointer; }
.ov-prow:hover { border-color: var(--accent); }
.ov-pname { flex: 1; display: flex; flex-direction: column; font-weight: 600; font-size: 14px; min-width: 0; }
.ov-pname small { font-weight: 400; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ov-pfit { text-align: right; display: flex; flex-direction: column; }
.ov-pfit b { font-family: Fraunces, serif; font-size: 18px; line-height: 1; }
.ov-pfit small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* Directory list layout */
.layout-toggle { margin-left: auto; }
.plist { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.prow {
  display: grid; grid-template-columns: 28px minmax(200px, 2.2fr) minmax(140px, 1.6fr) repeat(4, 44px) 48px;
  gap: 8px; align-items: center; padding: 8px 12px; border-top: 1px solid var(--line); cursor: pointer;
}
.prow:hover, .prow:focus-visible { background: var(--chip); outline: none; }
.phead { cursor: default; border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); }
.phead:hover { background: var(--bg); }
.phead span:nth-child(n+4) { text-align: center; }
.pr-name { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: baseline; min-width: 0; }
.pr-name small { flex-basis: 100%; color: var(--muted); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pr-n { text-align: center; font-weight: 600; font-size: 13px; border-radius: 6px; padding: 2px 0; }
.pr-n.r5 { background: color-mix(in srgb, #16a34a 30%, transparent); } .pr-n.r4 { background: color-mix(in srgb, #16a34a 16%, transparent); }
.pr-n.r3 { background: color-mix(in srgb, #eab308 16%, transparent); } .pr-n.r2, .pr-n.r1 { color: var(--muted); }
.pr-fit { text-align: center; font-family: Fraunces, serif; font-weight: 600; font-size: 17px; }
@media (max-width: 760px) {
  .prow { grid-template-columns: 26px 1fr repeat(4, 30px) 38px; }
  .prow > .focus-tags, .phead span:nth-child(3) { display: none; }
  .pr-n { font-size: 12px; }
}
@media (max-width: 420px) {
  .prow { grid-template-columns: 24px 1fr 30px 30px 38px; gap: 6px; padding: 8px; }
  .prow > :nth-child(6), .prow > :nth-child(7) { display: none; }
}
