/* Shared look for the whole site: chalk-stream teal + gorse gold */

:root {
  --bg: #eef2ee;
  --panel: #ffffff;
  --ink: #14231f;
  --mut: #5d6f69;
  --line: #d3ddd7;
  --m: #1f8a7d;
  --u: #d99a0b;
  --link: #176f65;
  --glow: rgba(31, 138, 125, .14);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1917;
    --panel: #14251f;
    --ink: #e6f0ea;
    --mut: #8fa59d;
    --line: #25403a;
    --m: #3cc9b5;
    --u: #f5b933;
    --link: #3cc9b5;
    --glow: rgba(60, 201, 181, .16);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; scroll-padding-top: 80px; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  overflow-x: hidden;
}

h1, h2, h3, .logo { font-family: "Bricolage Grotesque", system-ui, sans-serif; }

a { color: var(--link); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 2px solid var(--m); outline-offset: 3px; border-radius: 4px;
}
img { max-width: 100%; display: block; }

/* ---------- Navigation ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  align-items: center;
  justify-content: space-between;
  padding: 14px max(20px, calc((100vw - 1120px) / 2 + 20px));
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.logo { font-size: 1.2rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.logo span { color: var(--m); }
.nav nav { display: flex; flex-wrap: wrap; gap: 6px 20px; align-items: center; }
.nav nav a { color: var(--mut); text-decoration: none; font-size: .95rem; transition: color .2s; }
.nav nav a:hover { color: var(--ink); }
.nav nav a.pill { color: var(--bg); background: var(--ink); padding: 6px 16px; border-radius: 99px; font-weight: 600; }
.nav nav a.pill:hover { color: var(--bg); opacity: .85; }

/* "Work" drop-down (admin) */
.nav-menu { position: relative; }
.nav-menu summary {
  list-style: none; cursor: pointer; color: var(--mut); font-size: .95rem;
  display: inline-flex; align-items: center; gap: 6px; transition: color .2s;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu summary::after {
  content: ""; width: 6px; height: 6px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor;
  transform: translateY(-2px) rotate(45deg); transition: transform .2s;
}
.nav-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }
.nav-menu summary:hover, .nav-menu[open] summary, .nav-menu summary.current { color: var(--ink); }
.nav-menu summary.current { font-weight: 600; }
.nav-menu-panel {
  position: absolute; top: calc(100% + 12px); left: -10px; z-index: 20; min-width: 11rem;
  display: flex; flex-direction: column; padding: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, .14);
}
.nav nav .nav-menu-panel a { padding: 8px 12px; border-radius: 8px; color: var(--ink); }
.nav nav .nav-menu-panel a:hover { background: var(--glow); }
.nav nav .nav-menu-panel a[aria-current=page] { background: var(--glow); font-weight: 600; }

main { max-width: 1120px; margin: 0 auto; padding: 0 20px 40px; }

footer {
  max-width: 1120px;
  margin: 0 auto;
  padding: 24px 20px 40px;
  border-top: 1px solid var(--line);
  color: var(--mut);
  font-size: .88rem;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  align-items: center;
  justify-content: space-between;
}
footer form { margin: 0; }

/* ---------- Plain pages: login, admin ---------- */
main > h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 28px 0 12px; }
main > h2 { font-size: 1.25rem; margin: 24px 0 10px; }
main > p { margin-bottom: 12px; max-width: 60ch; }
main > table { margin-top: 8px; }

label { display: block; margin-bottom: .75rem; }
label.inline { display: flex; gap: .5rem; align-items: center; }
input, select, textarea, button { font: inherit; }
input:not([type=checkbox]):not([type=hidden]), select, textarea {
  padding: .45rem .75rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
}
form.stack { max-width: 22rem; }
form.stack input:not([type=checkbox]) { display: block; width: 100%; }

button {
  padding: .45rem 1.1rem;
  border: 1px solid var(--ink);
  border-radius: 99px;
  background: var(--ink);
  color: var(--bg);
  font-weight: 600;
  cursor: pointer;
  transition: opacity .2s;
}
button:hover { opacity: .85; }
button.ghost { background: transparent; color: var(--ink); }
button.link { padding: 0; border: none; background: none; color: var(--link); font-weight: 400; text-decoration: underline; }

.row { display: flex; flex-wrap: wrap; gap: .75rem; align-items: flex-end; margin-bottom: 1rem; }
.row.form label { display: flex; flex-direction: column; gap: 2px; margin: 0; font-size: .85rem; color: var(--mut); }
.row.form label.inline { flex-direction: row; align-items: center; padding-bottom: .5rem; }
.row .grow { flex: 1 1 14rem; }
.row .grow input { width: 100%; }

.tw { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { padding: .6rem .5rem; border-bottom: 1px solid var(--line); text-align: left; }
th { font-size: .85rem; color: var(--mut); font-weight: 600; }
td.actions { display: flex; flex-wrap: wrap; gap: .4rem; align-items: center; margin: 0; }
td.actions button { padding: .2rem .8rem; font-size: .85rem; }

.error { color: #d9534f; }
.ok { color: var(--m); }

/* ---------- Games ---------- */
.games h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); line-height: 1.15; margin: 28px 0 12px; }
.games-head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; justify-content: space-between; }
.games-head .btn, .game-actions a {
  display: inline-block; padding: .45rem 1.1rem; border: 1px solid var(--ink); border-radius: 99px;
  color: var(--ink); text-decoration: none; font-weight: 600;
}
.games-search { display: flex; flex-wrap: wrap; gap: .75rem; align-items: center; margin: 4px 0 24px; }
.games-search input { flex: 1 1 16rem; max-width: 28rem; }
.games .muted { color: var(--mut); }
.games .badge {
  display: inline-block; padding: 0 .65rem; border: 1px solid var(--u); border-radius: 99px;
  font-size: .8rem; color: var(--u);
}
.game-grid { list-style: none; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 20px; margin-bottom: 24px; }
.game-card {
  display: flex; flex-direction: column; gap: 8px; padding: 12px; border: 1px solid var(--line);
  border-radius: 14px; background: var(--panel); transition: border-color .2s, box-shadow .2s;
}
.game-card:hover { border-color: var(--m); box-shadow: 0 6px 24px var(--glow); }
.game-link { display: flex; flex-direction: column; gap: 10px; color: var(--ink); text-decoration: none; }
.game-link img, .game-placeholder { width: 100%; aspect-ratio: 16 / 10; border-radius: 10px; object-fit: cover; }
.game-placeholder {
  display: grid; place-items: center; color: #fff; font: 800 3rem "Bricolage Grotesque", system-ui, sans-serif;
  background: linear-gradient(135deg, hsl(var(--hue) 60% 42%), hsl(calc(var(--hue) + 50) 70% 55%));
}
.game-title { font-family: "Bricolage Grotesque", system-ui, sans-serif; font-weight: 700; font-size: 1.15rem; line-height: 1.2; }
.game-desc {
  color: var(--mut); font-size: .9rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3;
  -webkit-box-orient: vertical; overflow: hidden;
}
.game-meta { display: flex; gap: 12px; align-items: center; margin-top: auto; font-size: .88rem; }
.games .crumb { margin-top: 20px; font-size: .9rem; }
.games .crumb a { text-decoration: none; }
.game-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.game-about { max-width: 70ch; margin-bottom: 14px; }
.game-frame {
  display: block; width: 100%; height: min(78vh, 760px); min-height: 420px; margin: 8px 0 10px;
  border: 1px solid var(--line); border-radius: 12px; background: #000;
}
.game-stage { position: relative; }
.game-exit { display: none; }
.game-stage:fullscreen, .game-stage:-webkit-full-screen { background: #000; }
.game-stage:fullscreen .game-frame { border: none; border-radius: 0; height: 100%; margin: 0; }
.game-stage:-webkit-full-screen .game-frame { border: none; border-radius: 0; height: 100%; margin: 0; }
/* Stand-in for full screen on iPhone: cover the whole window, clear of the notch */
.game-stage.fake-fs {
  position: fixed; inset: 0; z-index: 1000; background: #000;
  height: 100vh; height: 100dvh;
  padding: env(safe-area-inset-top) env(safe-area-inset-right) env(safe-area-inset-bottom) env(safe-area-inset-left);
}
.game-stage.fake-fs .game-frame { height: 100%; min-height: 0; margin: 0; border: none; border-radius: 0; }
.game-stage.fake-fs .game-exit {
  display: block; position: absolute; z-index: 2; top: calc(env(safe-area-inset-top) + 8px); right: calc(env(safe-area-inset-right) + 8px);
  padding: .35rem .9rem; font-size: .85rem; border: 1px solid rgba(255,255,255,.5); background: rgba(0,0,0,.55); color: #fff;
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
}
html.game-fs-lock, html.game-fs-lock body { overflow: hidden; }
html.game-fs-lock .nav { visibility: hidden; }
.row.form small { color: var(--mut); font-size: .8rem; }
.game-foot { display: flex; flex-wrap: wrap; gap: 6px 18px; align-items: center; justify-content: space-between; margin-bottom: 6px; font-size: .9rem; }
.game-cloud { color: var(--m); font-weight: 600; }
.game-cloud.warn { color: var(--u); }

/* ---------- Users, invites ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
button.chip {
  padding: .15rem .7rem; font-size: .8rem; font-weight: 600; border-radius: 99px;
  background: transparent; color: var(--mut); border: 1px dashed var(--line);
}
button.chip.on { background: var(--m); color: #fff; border: 1px solid var(--m); }
button.chip.admin.on { background: var(--u); border-color: var(--u); color: #1a1200; }
button.chip:disabled { opacity: .55; cursor: default; }
.stepup, .invite-new {
  margin: 16px 0; padding: 14px 18px; border: 2px solid var(--u); border-radius: 14px; background: var(--panel);
}
.stepup h2 { margin-top: 0; }
.invite-page { max-width: 30rem; }
.invite-page h1 { font-size: clamp(1.6rem, 4vw, 2.2rem); margin: 28px 0 12px; }
.invite-page p { margin-bottom: 12px; }

/* ---------- Two-factor authentication ---------- */
.account-links { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: center; }
ol.steps { max-width: 60ch; margin: 0 0 16px 1.4rem; }
ol.steps li { margin-bottom: 10px; }
img.qr { margin: 10px 0; background: #fff; padding: 8px; border-radius: 8px; image-rendering: pixelated; }
code.key { font-size: 1rem; letter-spacing: .05em; word-break: break-all; }
pre.recovery-codes {
  display: inline-block; margin: 4px 0 16px; padding: 12px 20px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); font-size: 1.05rem; line-height: 1.8;
}

/* ---------- Home page (scoped so it can't leak into the dashboard) ---------- */
.home .hero { padding: clamp(40px, 9vw, 96px) 0 24px; }
.home .hero h1 { font-size: clamp(3.2rem, 12vw, 8rem); line-height: .95; font-weight: 800; letter-spacing: -.04em; }
.home .lede { margin-top: 18px; max-width: 44ch; font-size: clamp(1.1rem, 2.4vw, 1.4rem); color: var(--mut); }
.home .route { width: 100%; height: auto; display: block; margin-top: 36px; overflow: visible; }

.home .stats { display: grid; grid-template-columns: repeat(4, 1fr); margin-top: 8px; border-top: 1px solid var(--line); }
.home .stats[hidden] { display: none; }
.home .stats div { padding: 16px 12px 4px 0; }
.home .stats b { display: block; font-family: "Bricolage Grotesque", system-ui, sans-serif; font-size: 2.2rem; line-height: 1.1; font-weight: 700; font-variant-numeric: tabular-nums; }
.home .stats div:nth-child(2) b { color: var(--m); }
.home .stats div:nth-child(3) b { color: var(--u); }
.home .stats span { color: var(--mut); font-size: .88rem; }

.home .about {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 48px; align-items: center;
  margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line);
}
.home h2 { font-size: clamp(1.8rem, 4vw, 2.6rem); line-height: 1.1; font-weight: 700; letter-spacing: -.02em; margin-bottom: 16px; }
.home .about p, .home .teddy p { max-width: 52ch; margin-bottom: 14px; }
.home .about img { width: 100%; max-height: 460px; object-fit: cover; border-radius: 14px; }

.home .actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 22px; }
.home .btn {
  display: inline-block; padding: 10px 24px; border-radius: 99px; border: 1px solid var(--ink);
  background: var(--ink); color: var(--bg); font-weight: 600; text-decoration: none; transition: transform .2s, opacity .2s;
}
.home .btn:hover { transform: translateY(-2px); opacity: .9; }
.home .btn.ghost { background: transparent; color: var(--ink); }

.home .facts { margin-top: 56px; }
.home .facts div { display: grid; grid-template-columns: 240px 1fr; gap: 8px 32px; padding: 24px 0; border-top: 1px solid var(--line); }
.home .facts div:last-child { border-bottom: 1px solid var(--line); }
.home .facts h3 { font-size: 1.25rem; font-weight: 700; }
.home .facts p { color: var(--mut); max-width: 60ch; }

.home .teddy { display: grid; grid-template-columns: minmax(180px, 320px) 1fr; gap: 40px; align-items: center; margin-top: 56px; }
.home .teddy figure {
  position: relative; aspect-ratio: 1; border-radius: 14px; overflow: hidden; background: var(--panel);
  border: 1px solid var(--line); display: grid; place-content: center; font-size: 4rem;
}
.home .teddy figure img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

@media (max-width: 760px) {
  .home .about, .home .teddy { grid-template-columns: 1fr; gap: 28px; }
  .home .facts div { grid-template-columns: 1fr; }
  .home .stats { grid-template-columns: repeat(2, 1fr); }
  .nav { padding: 12px 20px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

/* ---------- /IAStatus: "days since" sign ---------- */
.ia-status {
  position: relative; margin: 28px 0 8px; padding: clamp(20px, 4vw, 40px) 16px 0; border-radius: 18px;
  /* cartoon-sky blue, with a strip of plant-green floor at the bottom */
  background: linear-gradient(#2f8fd8 0%, #6cc3f2 55%, #a9ddf7 calc(100% - 64px), #5fa83a calc(100% - 64px), #4c8f2c 100%);
  color: #10233a; text-align: center; overflow: hidden; isolation: isolate;
}
.ia-clouds { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.ia-clouds i {   /* puffy cartoon clouds: three overlapping circles each */
  position: absolute; width: 150px; height: 46px; border-radius: 40px; background: #fff;
  box-shadow: 0 4px 0 rgba(0,0,0,.04);
  animation: ia-drift 60s linear infinite;
}
.ia-clouds i::before, .ia-clouds i::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.ia-clouds i::before { width: 70px; height: 70px; left: 22px; top: -36px; }
.ia-clouds i::after { width: 54px; height: 54px; left: 74px; top: -24px; }
.ia-clouds i:nth-child(1) { top: 70px; left: 4%; }
.ia-clouds i:nth-child(2) { top: 40px; left: 62%; transform: scale(.8); animation-duration: 80s; }
.ia-clouds i:nth-child(3) { top: 300px; left: 78%; transform: scale(1.1); animation-duration: 70s; }
.ia-clouds i:nth-child(4) { top: 380px; left: -6%; transform: scale(.7); animation-duration: 90s; }
@keyframes ia-drift { from { translate: 0 0; } to { translate: 40px 0; } }

.ia-title, .ia-doh, .ia-reset button {
  font-family: "Luckiest Guy", "Arial Black", system-ui, sans-serif; font-weight: 400; letter-spacing: .03em;
}
.ia-title {
  display: inline-block; margin-bottom: clamp(18px, 4vw, 34px); padding: 6px 18px 2px; border-radius: 10px;
  font-size: clamp(1.2rem, 3.4vw, 1.9rem); color: #ffd90f; background: #10233a;
  -webkit-text-stroke: 1px #000; text-shadow: 2px 2px 0 #000; transform: rotate(-1.5deg);
}

.ia-scene { position: relative; max-width: 900px; margin: 0 auto; padding-bottom: 8px; }
.ia-sign {
  --sign: #c6dcdf;
  position: relative; display: flex; align-items: center; gap: clamp(12px, 3vw, 28px);
  max-width: 880px; margin: 0 auto; padding: clamp(14px, 3vw, 26px) clamp(16px, 4vw, 36px);
  background: linear-gradient(var(--sign), #b3cdd1); border: 4px solid #1b1b1b; border-radius: 8px;
  box-shadow: 0 10px 0 #5f7b80, 0 10px 0 4px #1b1b1b, 0 26px 34px rgba(0,0,0,.3);
  transform: rotate(-1.2deg);
}
.ia-card {
  position: relative; flex: none; display: grid; place-items: center;
  min-width: clamp(84px, 18vw, 150px); height: clamp(100px, 21vw, 170px); padding: 0 12px;
  background: #f4f4ef; border: 3px solid #1b1b1b; border-radius: 4px;
  box-shadow: 3px 4px 0 rgba(0,0,0,.25); transform: rotate(2.5deg); transform-origin: 50% 8px;
}
.ia-card::before {   /* the nail */
  content: ""; position: absolute; top: 7px; left: 50%; width: 9px; height: 9px; margin-left: -4.5px;
  border-radius: 50%; background: #6b6b66; border: 2px solid #1b1b1b;
}
.ia-card span {
  font: 900 clamp(4rem, 13vw, 8rem)/1 "Arial Black", "Helvetica Neue", Arial, sans-serif;
  color: #111; font-variant-numeric: tabular-nums; letter-spacing: -.04em;
}
.ia-words {
  flex: 1; display: flex; flex-direction: column; align-items: flex-start; text-align: left;
  font: 900 clamp(1.4rem, 4.6vw, 2.9rem)/1.05 "Arial Black", "Helvetica Neue", Arial, sans-serif;
  color: #111; letter-spacing: -.01em;
}

/* The worker stands in front of the sign's bottom-left corner */
.ia-worker {
  position: relative; z-index: 2; display: block; width: clamp(130px, 24vw, 220px); height: auto;
  margin: clamp(-80px, -9vw, -40px) auto 0 clamp(0px, 4vw, 40px);
  filter: drop-shadow(4px 6px 0 rgba(0,0,0,.18));
  animation: ia-bob 3.2s ease-in-out infinite; transform-origin: 50% 100%;
}
@keyframes ia-bob { 0%, 100% { transform: rotate(0); } 50% { transform: rotate(-2deg) translateY(-2px); } }
.ia-pupil { animation: ia-look 6s steps(1) infinite; }
@keyframes ia-look { 0%, 70%, 100% { transform: none; } 72%, 90% { transform: translate(-6px, 2px); } }

.ia-doh {
  position: absolute; z-index: 3; left: clamp(150px, 30vw, 290px); bottom: clamp(90px, 15vw, 160px);
  padding: 12px 22px 6px; font-size: clamp(1.8rem, 6vw, 3.2rem); color: #ffd90f; background: #fff;
  border: 4px solid #000; border-radius: 50% / 44%; -webkit-text-stroke: 2px #000; text-shadow: 3px 3px 0 #000;
  animation: ia-pop .5s .5s cubic-bezier(.3, 1.8, .5, 1) both;
}
.ia-doh::after {   /* speech-bubble tail */
  content: ""; position: absolute; left: -26px; top: 18px; border: 10px solid transparent;
  border-right: 22px solid #000; border-top-width: 4px;
}

.ia-reset { margin: 18px auto 0; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.ia-reset button {
  padding: 16px 34px 12px; border: 4px solid #000; border-radius: 16px; font-size: clamp(1.2rem, 3.4vw, 1.6rem);
  color: #ffd90f; -webkit-text-stroke: 1px #000; text-shadow: 2px 2px 0 #000;
  background: linear-gradient(#ef4a3c, #c42a1e); box-shadow: 0 8px 0 #000;
  transition: transform .08s, box-shadow .08s;
}
.ia-reset button:hover { opacity: 1; filter: brightness(1.08); }
.ia-reset button:active { transform: translateY(7px); box-shadow: 0 1px 0 #000; }
.ia-reset small { color: #10233a; font-weight: 600; }

.ia-stats {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 10px 14px; margin: 26px auto 0; max-width: 760px;
}
.ia-stats div {
  padding: 8px 18px; background: #fff; border: 3px solid #000; border-radius: 12px; box-shadow: 3px 3px 0 #000;
}
.ia-stats dt { color: #4a5b6e; font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; }
.ia-stats dd { font-weight: 800; font-size: 1.1rem; }

.ia-barrel { display: block; width: 64px; height: auto; margin: 18px 0 6px auto; }
.ia-ooze { animation: ia-glow 1.6s ease-in-out infinite alternate; }
@keyframes ia-glow { from { filter: drop-shadow(0 0 2px #7cff4f); } to { filter: drop-shadow(0 0 8px #7cff4f); } }

/* After a reset: the card flips over to 0, the sign shudders and the worker shouts */
.just-reset .ia-card { animation: ia-flip .9s ease-out both; }
.just-reset .ia-sign { animation: ia-shake .5s .55s both; }
@keyframes ia-flip {
  0% { transform: rotate(2.5deg) rotateX(0); }
  45% { transform: rotate(2.5deg) rotateX(90deg); }
  100% { transform: rotate(2.5deg) rotateX(0); }
}
@keyframes ia-shake {
  0%, 100% { transform: rotate(-1.2deg); }
  25% { transform: rotate(-3deg) translateY(3px); }
  50% { transform: rotate(.8deg); }
  75% { transform: rotate(-2deg) translateY(1px); }
}
@keyframes ia-pop { from { transform: scale(0) rotate(-12deg); } to { transform: scale(1) rotate(-6deg); } }

@media (prefers-reduced-motion: reduce) {
  .ia-status *, .ia-status *::before, .ia-status *::after { animation: none !important; }
}
@media (max-width: 520px) {
  .ia-sign { flex-direction: column; text-align: center; }
  .ia-words { align-items: center; text-align: center; }
  .ia-worker { margin-top: -6px; }
  .ia-doh { bottom: 96px; left: 150px; }
}

/* ---------- Dev tasks (admin) ---------- */
.devtasks .small { font-size: .85rem; }
.devtasks .nowrap { white-space: nowrap; }
.devtask-list tr.clickable { cursor: pointer; }
.devtask-list th { white-space: nowrap; }
.devtask-list .th-sort {
  padding: 0; border: none; border-radius: 0; background: none; color: inherit;
  font: inherit; font-weight: 600; cursor: pointer; display: inline-flex; gap: .3rem; align-items: center;
}
.devtask-list .th-sort:hover, .devtask-list .th-sort.active { color: var(--ink); }
.devtask-list .th-sort:focus-visible { outline: 2px solid var(--m); outline-offset: 2px; }
.devtask-list .th-arrow { font-size: .7rem; opacity: .45; }
.devtask-list .th-sort.active .th-arrow { opacity: 1; color: var(--m); }
.devtask-list tr.clickable:hover td { background: var(--glow); }
.devtask-list td.devtask-text a { color: var(--ink); text-decoration: none; }
.devtask-list td.devtask-text { min-width: 14rem; }
.devtask-status {
  display: inline-block; padding: .1rem .6rem; border-radius: 99px; border: 1px solid var(--line);
  font-size: .8rem; font-weight: 600; white-space: nowrap; color: var(--mut);
}
.devtask-status.big { font-size: .95rem; padding: .25rem .9rem; }
.devtask-status.s1 { color: var(--link); border-color: var(--m); }
.devtask-status.s2 { color: #14231f; background: var(--u); border-color: var(--u); }
.devtask-status.s4 { color: var(--m); background: var(--glow); border-color: transparent; }
.devtask-status.s3 { text-decoration: line-through; }
.devtask-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 1rem 1.2rem; margin: .5rem 0 1rem;
}
.devtask-desc, .devtask-notes p, .devtask-closing p { white-space: pre-wrap; overflow-wrap: anywhere; margin: .25rem 0; }
.devtask-desc { font-size: 1.05rem; }
.devtask-closing { border-top: 1px solid var(--line); margin-top: .75rem; padding-top: .6rem; }
.devtask-actions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-bottom: 1rem; }
.devtasks .row.form label.grow { flex: 1 1 20rem; }
.devtasks .row.form textarea { width: 100%; }
.devtask-notes { list-style: none; padding: 0; margin: 0; }
.devtask-notes li { border-left: 3px solid var(--m); padding: .3rem 0 .3rem .8rem; margin-bottom: .8rem; }
