/* Dev Review — AnyiMedia orange, warm paper, Anuphan for Thai + Latin. */

:root {
  --bg: #f8f4ee; --bg2: #f1eadf; --panel: #ffffff; --panel2: #fcfaf7;
  --ink: #1d1813; --ink2: #4b4239; --dim: #8b8073; --line: #ece3d6; --line2: #ddd1c0;
  --brand: #ff6a1a; --brand2: #ff9248; --brand-deep: #e2530a; --brand-soft: #fff0e5; --brand-ink: #fff;
  --green: #17a35a; --green-soft: #e3f6ec; --yellow: #e5a00d; --yellow-soft: #fdf3d8;
  --red: #e5484d; --red-soft: #fde7e7; --blue: #3a7ff0; --blue-soft: #e6effe; --orange: #f2711c; --orange-soft: #feeadb;
  --gray-soft: #f1ede7;
  --shadow: 0 1px 2px rgba(48, 28, 8, .05), 0 10px 28px -12px rgba(48, 28, 8, .16);
  --shadow-lg: 0 2px 6px rgba(48, 28, 8, .06), 0 28px 60px -20px rgba(48, 28, 8, .28);
  --r: 18px; --r-sm: 11px;
  --font: 'Anuphan', system-ui, 'Leelawadee UI', 'Segoe UI', sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Consolas, monospace;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #100d0a; --bg2: #17130f; --panel: #1c1813; --panel2: #221d17;
    --ink: #f5efe7; --ink2: #d3c8ba; --dim: #9c9183; --line: #2d2720; --line2: #3c342b;
    --brand-soft: rgba(255, 106, 26, .15); --green-soft: rgba(23, 163, 90, .17); --yellow-soft: rgba(229, 160, 13, .17);
    --red-soft: rgba(229, 72, 77, .17); --blue-soft: rgba(58, 127, 240, .18); --orange-soft: rgba(242, 113, 28, .17); --gray-soft: #26211b;
    --shadow: 0 1px 2px rgba(0, 0, 0, .3), 0 12px 30px -14px rgba(0, 0, 0, .6);
    --shadow-lg: 0 2px 6px rgba(0, 0, 0, .35), 0 30px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 90px; }
body {
  margin: 0; min-height: 100vh; background: var(--bg); color: var(--ink);
  font: 400 16px/1.65 var(--font); -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
a { color: var(--brand-deep); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (prefers-color-scheme: dark) { a { color: var(--brand2); } }
h1, h2, h3, h4 { line-height: 1.3; margin: 0 0 .4em; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 4vw, 40px); font-weight: 700; }
h2 { font-size: 21px; font-weight: 650; }
h3 { font-size: 17px; font-weight: 650; }
p { margin: 0 0 .8em; }
code, .mono { font-family: var(--mono); font-size: .88em; }
code { background: var(--gray-soft); border: 1px solid var(--line); padding: 1px 6px; border-radius: 6px; }
small { font-size: 13px; }
.muted { color: var(--dim); }
.small { font-size: 14px; }
.ic { width: 20px; height: 20px; flex: none; vertical-align: -4px; }
::selection { background: var(--brand); color: #fff; }

/* animation start states — only when JS is on and the motion module has not taken over */
.js [data-reveal], .js [data-card], .js [data-col], .js [data-tl], .js [data-feed], .js [data-row],
.js [data-five-card], .js [data-tier-card], .js [data-rung], .js [data-flow-node], .js [data-split], .js [data-split-chars] { opacity: 0; }
.anim-fallback [data-reveal], .anim-fallback [data-card], .anim-fallback [data-col], .anim-fallback [data-tl],
.anim-fallback [data-feed], .anim-fallback [data-row], .anim-fallback [data-five-card], .anim-fallback [data-tier-card],
.anim-fallback [data-rung], .anim-fallback [data-flow-node], .anim-fallback [data-split], .anim-fallback [data-split-chars] { opacity: 1 !important; transform: none !important; }
.anim-fallback :is([data-split], [data-split-chars]) :is([data-word], [data-char]),
.anim-fallback :is(.tk-node, .tk-label, .fn-icon, .af-node, .orbit-core) { opacity: 1 !important; transform: none !important; filter: none !important; }
.anim-fallback .orbit-node { opacity: 1 !important; }
.anim-fallback :is(.flow-path, .outcome-badge circle, .outcome-badge path) { stroke-dasharray: none !important; stroke-dashoffset: 0 !important; }
@media (prefers-reduced-motion: reduce) {
  .js [data-reveal], .js [data-card], .js [data-col], .js [data-tl], .js [data-feed], .js [data-row], .js [data-five-card],
  .js [data-tier-card], .js [data-rung], .js [data-flow-node], .js [data-split], .js [data-split-chars] { opacity: 1; }
  html { scroll-behavior: auto; }
}

/* background orbs */
.bg-orbs { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; }
.bg-orbs span { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .5; }
.bg-orbs span:nth-child(1) { width: 520px; height: 520px; left: -160px; top: -180px; background: radial-gradient(circle, rgba(255, 128, 50, .45), transparent 70%); }
.bg-orbs span:nth-child(2) { width: 420px; height: 420px; right: -120px; top: 30vh; background: radial-gradient(circle, rgba(255, 190, 90, .35), transparent 70%); }
.bg-orbs span:nth-child(3) { width: 380px; height: 380px; left: 30vw; bottom: -200px; background: radial-gradient(circle, rgba(255, 90, 60, .22), transparent 70%); }
@media (prefers-color-scheme: dark) { .bg-orbs span { opacity: .28; } }

/* top bar */
.topbar {
  position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 18px;
  padding: 10px max(16px, calc((100vw - 1320px) / 2)); min-height: 66px;
  background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px); border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none !important; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand2), var(--brand) 55%, var(--brand-deep));
  box-shadow: 0 6px 16px -6px rgba(255, 106, 26, .7), inset 0 1px 0 rgba(255, 255, 255, .35);
}
.brand-mark .ic { width: 24px; height: 24px; stroke-width: 1.9; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text b { font-size: 16px; font-weight: 700; }
.brand-text small { font-size: 11.5px; color: var(--dim); letter-spacing: .02em; }
.brand-lg .brand-mark { width: 48px; height: 48px; border-radius: 15px; }
.brand-lg .brand-text b { font-size: 19px; }
.nav { display: flex; gap: 4px; flex: 1; overflow-x: auto; scrollbar-width: none; }
.nav::-webkit-scrollbar { display: none; }
.nav-link {
  position: relative; display: flex; align-items: center; gap: 7px; padding: 8px 13px; border-radius: 11px;
  color: var(--ink2); font-size: 15px; font-weight: 500; white-space: nowrap; text-decoration: none !important;
  transition: background .2s, color .2s;
}
.nav-link:hover { background: var(--panel); color: var(--ink); }
.nav-link.active { background: var(--ink); color: var(--bg); }
.nav-link.active .ic { color: var(--brand2); }
.nav-badge {
  font-style: normal; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; font-size: 12px; font-weight: 700;
  display: grid; place-items: center; background: var(--brand); color: #fff; box-shadow: 0 0 0 3px var(--bg);
}
.me { display: flex; align-items: center; gap: 10px; }
.me-chip { display: block; border-radius: 50%; text-decoration: none !important; }

/* layout */
.wrap { width: min(1320px, 100% - 32px); margin: 28px auto 40px; }
.wrap:not(.wide) { width: min(1100px, 100% - 32px); }
.bare .wrap { margin-top: 0; }
.foot { width: min(1320px, 100% - 32px); margin: 0 auto 30px; display: flex; gap: 8px; flex-wrap: wrap; color: var(--dim); font-size: 13px; }
.foot span { margin-right: auto; }
.section { margin: 30px 0; }
.section-head { display: flex; align-items: center; gap: 12px; justify-content: space-between; margin-bottom: 14px; flex-wrap: wrap; }
.section-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; }
.section-head h2 .ic { color: var(--brand); }
.page-head { margin: 8px 0 24px; }
.split { display: grid; grid-template-columns: 1.4fr 1fr; gap: 22px; align-items: start; }
.split-wide { grid-template-columns: 1.7fr 1fr; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.span-2 { grid-column: span 2; }
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.card {
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow);
  padding: 22px;
}
.eyebrow { display: inline-flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 600; letter-spacing: .04em;
  color: var(--brand-deep); text-transform: uppercase; margin: 0 0 8px; }
@media (prefers-color-scheme: dark) { .eyebrow { color: var(--brand2); } }
.link { display: inline-flex; align-items: center; gap: 5px; font-size: 14px; font-weight: 600; }
.link .ic { width: 16px; height: 16px; transition: transform .2s; }
.link:hover .ic { transform: translateX(3px); }

/* buttons */
.btn {
  position: relative; overflow: hidden; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink);
  font: 600 15px/1.2 var(--font); cursor: pointer; text-decoration: none !important; white-space: nowrap;
  transition: transform .15s, box-shadow .2s, background .2s, border-color .2s; -webkit-tap-highlight-color: transparent;
}
.btn:hover { border-color: var(--brand); box-shadow: 0 6px 18px -10px rgba(255, 106, 26, .6); }
.btn:active { transform: scale(.97); }
.btn-primary {
  background: linear-gradient(135deg, var(--brand2), var(--brand) 50%, var(--brand-deep)); background-size: 160% 160%;
  color: #fff; border-color: transparent; box-shadow: 0 8px 20px -10px rgba(255, 106, 26, .85), inset 0 1px 0 rgba(255, 255, 255, .25);
}
.btn-primary:hover { background-position: 100% 0; box-shadow: 0 12px 26px -10px rgba(255, 106, 26, .95), inset 0 1px 0 rgba(255, 255, 255, .25); }
.btn-warn { background: var(--yellow); color: #2a1d00; border-color: transparent; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 7px 13px; font-size: 14px; border-radius: 10px; }
.btn-lg { padding: 14px 26px; font-size: 16.5px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn .ripple { position: absolute; border-radius: 50%; background: rgba(255, 255, 255, .45); pointer-events: none; width: 10px; height: 10px; margin: -5px 0 0 -5px; }
.btn:not(.btn-primary) .ripple { background: rgba(255, 106, 26, .25); }
.link-btn { background: none; border: 0; padding: 4px 0; font: 500 14px var(--font); color: var(--brand-deep); cursor: pointer; display: inline-flex; gap: 5px; align-items: center; }
.link-btn.danger { color: var(--red); }
.link-btn .ic { width: 16px; height: 16px; }

/* chips, badges, dots, avatars */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 6px 0; }
.chip { display: inline-flex; align-items: center; gap: 5px; padding: 3px 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--gray-soft); color: var(--ink2); border: 1px solid transparent; white-space: nowrap; }
.chip-green { background: var(--green-soft); color: var(--green); }
.chip-yellow { background: var(--yellow-soft); color: #a86f00; }
.chip-red { background: var(--red-soft); color: var(--red); }
.chip-blue { background: var(--blue-soft); color: var(--blue); }
.chip-brand { background: var(--brand-soft); color: var(--brand-deep); }
.chip-stage { background: var(--ink); color: var(--bg); }
@media (prefers-color-scheme: dark) { .chip-yellow { color: #f3c04a; } .chip-brand { color: var(--brand2); } }
.tier { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; font-weight: 700; padding: 2px 10px 2px 8px; border-radius: 99px; }
.tier i { width: 9px; height: 9px; border-radius: 50%; }
.tier-green { background: var(--green-soft); color: var(--green); } .tier-green i { background: var(--green); }
.tier-yellow { background: var(--yellow-soft); color: #a86f00; } .tier-yellow i { background: var(--yellow); }
.tier-red { background: var(--red-soft); color: var(--red); } .tier-red i { background: var(--red); }
@media (prefers-color-scheme: dark) { .tier-yellow { color: #f3c04a; } }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; position: relative; }
.dot-none { border: 2px dashed var(--line2); }
.dot-green { background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.dot-yellow { background: var(--yellow); box-shadow: 0 0 0 4px var(--yellow-soft); }
.dot-red { background: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.avatar {
  --s: 28px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: calc(var(--s) * .44); font-weight: 700; color: #fff; line-height: 1;
  background: linear-gradient(140deg, hsl(var(--h) 75% 62%), hsl(calc(var(--h) + 30) 70% 46%));
  box-shadow: 0 0 0 2px var(--panel);
}
.avatar-none { background: var(--line2); color: var(--dim); }
.person { display: inline-flex; align-items: center; gap: 9px; }
.person b { display: block; font-size: 14.5px; font-weight: 600; line-height: 1.25; }
.person small { display: block; color: var(--dim); font-size: 12px; line-height: 1.3; }

/* messages + toasts */
.msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 15px; border-radius: 12px; font-size: 14.5px; margin: 0 0 16px; }
.msg .ic { margin-top: 2px; }
.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg-bad { background: var(--red-soft); color: var(--red); }
.msg-info { background: var(--blue-soft); color: var(--blue); }
.msg-good { background: var(--green-soft); color: var(--green); }
.toast {
  position: fixed; z-index: 100; top: 82px; right: max(16px, calc((100vw - 1320px) / 2)); max-width: min(440px, calc(100vw - 32px));
  display: flex; gap: 10px; align-items: flex-start; padding: 14px 18px; border-radius: 14px; font-size: 15px; font-weight: 500;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); cursor: pointer;
}
.toast .ic { color: var(--brand2); margin-top: 2px; }
.toast-bad { background: var(--red); color: #fff; } .toast-bad .ic { color: #fff; }
.toast + .toast { top: 150px; }

/* forms */
.form { display: flex; flex-direction: column; gap: 12px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > span { font-size: 14px; font-weight: 600; color: var(--ink2); }
.field > span em { font-style: normal; font-weight: 400; color: var(--dim); }
.field small { color: var(--dim); }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 11px 14px; font: 400 15.5px/1.5 var(--font); color: var(--ink); background: var(--panel2);
  border: 1px solid var(--line2); border-radius: 12px; transition: border-color .2s, box-shadow .2s, background .2s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); background: var(--panel); box-shadow: 0 0 0 4px var(--brand-soft); }
input:disabled { opacity: .6; }
select { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--dim) 50%), linear-gradient(135deg, var(--dim) 50%, transparent 50%);
  background-position: calc(100% - 19px) 50%, calc(100% - 14px) 50%; background-size: 5px 5px; background-repeat: no-repeat; padding-right: 36px; }
.check-line { display: flex; align-items: center; gap: 10px; font-size: 15px; cursor: pointer; padding: 6px 0; }
.check-line input { width: 20px; height: 20px; accent-color: var(--brand); flex: none; }
.checks { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px; border: 1px dashed var(--line2); border-radius: 12px; }
.form-card h2, .form-card h3 { display: flex; align-items: center; gap: 9px; }
.form-step span { width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--ink); color: var(--bg); font-size: 14px; }
.form-wide { gap: 18px; }
.form-actions { display: flex; gap: 12px; align-items: center; }
.inline-form { flex-direction: row; gap: 10px; margin-top: 10px; }
.inline-form input { flex: 1; }
.inline-filter select { min-width: 220px; padding: 8px 36px 8px 12px; font-size: 14.5px; }
.req-note { font-style: normal; font-weight: 500; color: var(--brand-deep); font-size: 12.5px; }
.hint-list { margin: 0; padding: 12px 14px 12px 34px; background: var(--panel2); border-radius: 12px; border: 1px solid var(--line); font-size: 14.5px; }

/* tier pick */
.tier-pick { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.tier-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 18px 16px; border-radius: 16px; cursor: pointer;
  border: 2px solid var(--line); background: var(--panel2); transition: border-color .25s, background .25s, opacity .25s;
}
.tier-card input { position: absolute; opacity: 0; pointer-events: none; }
.tier-card b { font-size: 20px; }
.tier-card .tc-label { font-weight: 600; color: var(--ink2); font-size: 14.5px; }
.tier-card ul { margin: 8px 0; padding-left: 18px; color: var(--ink2); font-size: 13.5px; }
.tier-card small { color: var(--dim); font-size: 12.5px; line-height: 1.5; }
.tc-dot { position: absolute; top: 18px; right: 18px; width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line2); transition: all .25s; }
.tier-card-green:has(input:checked) { border-color: var(--green); background: var(--green-soft); }
.tier-card-yellow:has(input:checked) { border-color: var(--yellow); background: var(--yellow-soft); }
.tier-card-red:has(input:checked) { border-color: var(--red); background: var(--red-soft); }
.tier-card-green:has(input:checked) .tc-dot { background: var(--green); border-color: var(--green); box-shadow: inset 0 0 0 4px var(--panel); }
.tier-card-yellow:has(input:checked) .tc-dot { background: var(--yellow); border-color: var(--yellow); box-shadow: inset 0 0 0 4px var(--panel); }
.tier-card-red:has(input:checked) .tc-dot { background: var(--red); border-color: var(--red); box-shadow: inset 0 0 0 4px var(--panel); }
.tier-pick:has(input:checked) .tier-card:not(:has(input:checked)) { opacity: .62; }
.tier-card-green b { color: var(--green); } .tier-card-yellow b { color: #b07700; } .tier-card-red b { color: var(--red); }
@media (prefers-color-scheme: dark) { .tier-card-yellow b { color: #f3c04a; } }

/* verdict radios */
.verdicts { display: flex; flex-wrap: wrap; gap: 10px; }
.verdict { position: relative; cursor: pointer; }
.verdict input { position: absolute; opacity: 0; }
.verdict span {
  display: inline-flex; align-items: center; gap: 8px; padding: 11px 18px; border-radius: 12px; font-weight: 600; font-size: 15px;
  border: 2px solid var(--line2); background: var(--panel2); transition: all .2s;
}
.verdict span::before { content: ''; width: 12px; height: 12px; border-radius: 50%; background: var(--line2); transition: all .2s; }
.verdict-green input:checked + span { border-color: var(--green); background: var(--green-soft); color: var(--green); }
.verdict-green input:checked + span::before { background: var(--green); }
.verdict-yellow input:checked + span { border-color: var(--yellow); background: var(--yellow-soft); color: #9a6500; }
.verdict-yellow input:checked + span::before { background: var(--yellow); }
.verdict-red input:checked + span { border-color: var(--red); background: var(--red-soft); color: var(--red); }
.verdict-red input:checked + span::before { background: var(--red); }
.verdict-blue input:checked + span { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.verdict-blue input:checked + span::before { background: var(--blue); }
.verdict input:focus-visible + span { box-shadow: 0 0 0 4px var(--brand-soft); }
[data-show-for] { display: none; }
[data-show-for].show { display: flex; }

/* dropzone */
.dropzone { position: relative; border: 2px dashed var(--line2); border-radius: 16px; background: var(--panel2); transition: all .25s; }
.dropzone input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.dropzone.over { border-color: var(--brand); background: var(--brand-soft); transform: scale(1.01); }
.dz-inner { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px; text-align: center; pointer-events: none; }
.dz-inner .ic { width: 34px; height: 34px; color: var(--brand); }
.dz-inner small { color: var(--dim); }
.dz-list { list-style: none; margin: 0; padding: 0 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.dz-list:not(:empty) { padding-bottom: 14px; }
.dz-list li { display: flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-size: 13px; }
.dz-list li .ic { width: 15px; height: 15px; color: var(--brand); }

/* hero + stats */
.hero { display: flex; align-items: center; gap: 30px; justify-content: space-between; margin: 10px 0 26px; }
.hero-title { font-size: clamp(30px, 4.6vw, 48px); margin: 0 0 10px; }
.hero-sub { color: var(--ink2); font-size: 17px; max-width: 640px; }
.hero-ring { position: relative; width: 150px; height: 150px; flex: none; }
.hero-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.hero-ring circle { fill: none; stroke-width: 12; stroke-linecap: round; }
.ring-bg { stroke: var(--line); }
.ring-fg { stroke: url(#none); stroke: var(--brand); filter: drop-shadow(0 4px 10px rgba(255, 106, 26, .45)); }
.ring-label { position: absolute; inset: 0; display: grid; place-content: center; text-align: center; line-height: 1.1; }
.ring-label b { font-size: 34px; font-weight: 700; }
.ring-label small { color: var(--dim); }
.stats { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; }
.stat {
  position: relative; overflow: hidden; display: flex; flex-direction: column; gap: 2px; padding: 18px; border-radius: var(--r);
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--ink); text-decoration: none !important;
  transition: transform .25s, box-shadow .25s;
}
.stat:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.stat::after { content: ''; position: absolute; right: -30px; top: -30px; width: 110px; height: 110px; border-radius: 50%; opacity: .5; }
.stat-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; margin-bottom: 8px; }
.stat-num { font-size: 34px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { color: var(--dim); font-size: 14px; font-weight: 500; }
.stat-brand .stat-icon { background: var(--brand-soft); color: var(--brand); } .stat-brand::after { background: var(--brand-soft); }
.stat-blue .stat-icon { background: var(--blue-soft); color: var(--blue); } .stat-blue::after { background: var(--blue-soft); }
.stat-red .stat-icon { background: var(--red-soft); color: var(--red); } .stat-red::after { background: var(--red-soft); }
.stat-yellow .stat-icon { background: var(--yellow-soft); color: var(--yellow); } .stat-yellow::after { background: var(--yellow-soft); }
.stat-green .stat-icon { background: var(--green-soft); color: var(--green); } .stat-green::after { background: var(--green-soft); }

/* queue cards */
.queue-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.queue-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 18px 50px 18px 18px; border-radius: var(--r);
  background: linear-gradient(160deg, var(--panel), var(--panel2)); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none !important; transition: transform .25s, box-shadow .25s, border-color .25s;
}
.queue-card::before { content: ''; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 0 4px 4px 0; background: var(--brand); }
.queue-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: var(--brand); }
.qc-stage { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; color: var(--brand-deep); }
@media (prefers-color-scheme: dark) { .qc-stage { color: var(--brand2); } }
.qc-stage .ic { width: 17px; height: 17px; }
.queue-card b { font-size: 16.5px; line-height: 1.35; }
.queue-card small { color: var(--dim); display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.qc-why { font-size: 14px; color: var(--ink2); margin-top: 4px; }
.qc-go { position: absolute; right: 16px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border-radius: 50%;
  display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); transition: all .25s; }
.queue-card:hover .qc-go { background: var(--brand); color: #fff; transform: translateY(-50%) translateX(3px); }

/* board */
.board { display: grid; grid-template-columns: repeat(7, minmax(220px, 1fr)); gap: 12px; overflow-x: auto; padding: 4px 2px 14px; scroll-snap-type: x proximity; }
.col { background: var(--bg2); border: 1px solid var(--line); border-radius: var(--r); padding: 10px; min-height: 180px; scroll-snap-align: start; }
.col-done { background: color-mix(in srgb, var(--green-soft) 60%, var(--bg2)); }
.col-head { display: flex; align-items: center; gap: 9px; padding: 4px 4px 10px; }
.col-head b { display: block; font-size: 14px; line-height: 1.25; }
.col-head small { display: block; font-size: 11.5px; color: var(--dim); line-height: 1.3; }
.col-n { width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex: none; background: var(--ink); color: var(--bg); font-size: 13px; font-weight: 700; }
.col-n .ic { width: 16px; height: 16px; }
.col-done .col-n { background: var(--green); color: #fff; }
.col-count { margin-left: auto; font-style: normal; font-size: 13px; font-weight: 700; color: var(--dim); background: var(--panel); border-radius: 99px; padding: 1px 9px; }
.col-body { display: flex; flex-direction: column; gap: 9px; }
.col-empty { text-align: center; color: var(--dim); font-size: 13px; padding: 22px 0; border: 1px dashed var(--line2); border-radius: 12px; }
.job-card {
  position: relative; display: flex; flex-direction: column; gap: 4px; padding: 12px 13px 11px 15px; border-radius: 13px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink); text-decoration: none !important;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .04); transition: transform .2s, box-shadow .2s;
}
.job-card::before { content: ''; position: absolute; left: 0; top: 10px; bottom: 10px; width: 4px; border-radius: 0 4px 4px 0; }
.tier-edge-green::before { background: var(--green); } .tier-edge-yellow::before { background: var(--yellow); } .tier-edge-red::before { background: var(--red); }
.job-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.jc-top { display: flex; align-items: center; gap: 7px; }
.jc-ref { font-family: var(--mono); font-size: 11.5px; color: var(--dim); margin-right: auto; }
.jc-title { font-weight: 600; font-size: 14.5px; line-height: 1.4; }
.jc-proj { font-size: 12.5px; color: var(--dim); }
.jc-foot { display: flex; align-items: center; gap: 8px; margin-top: 4px; }
.jc-people { display: flex; }
.jc-people .avatar + .avatar { margin-left: -7px; }
.round { font-size: 11.5px; font-weight: 700; color: var(--orange); background: var(--orange-soft); padding: 1px 7px; border-radius: 99px; }
.due { margin-left: auto; display: inline-flex; align-items: center; gap: 3px; font-size: 12px; color: var(--dim); }
.due .ic { width: 14px; height: 14px; }
.due.late { color: var(--red); font-weight: 700; }

/* feed + sticks */
.feed { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 14px; }
.feed li { display: flex; gap: 11px; font-size: 14.5px; }
.feed li > div { min-width: 0; }
.feed p { margin: 2px 0; color: var(--ink2); overflow-wrap: anywhere; }
.feed small { color: var(--dim); }
.feed li.is-comment > div { background: var(--panel2); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 8px 12px; }
.stick-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.stick { padding: 14px; border-radius: 14px; display: flex; flex-direction: column; gap: 2px; }
.stick b { font-size: 30px; line-height: 1.1; }
.stick span { font-weight: 600; font-size: 13.5px; }
.stick small { font-size: 12px; opacity: .8; }
.stick-yellow { background: var(--yellow-soft); color: #9a6500; }
.stick-orange { background: var(--orange-soft); color: var(--orange); }
.stick-red { background: var(--red-soft); color: var(--red); }
@media (prefers-color-scheme: dark) { .stick-yellow { color: #f3c04a; } }

/* empty state */
.empty-state { text-align: center; padding: 50px 20px; border: 2px dashed var(--line2); border-radius: 22px; background: var(--panel2); }
.empty-state h1, .empty-state h3 { margin-top: 10px; }
.empty-state p { color: var(--dim); max-width: 520px; margin: 0 auto 18px; }
.empty-icon { width: 70px; height: 70px; margin: 0 auto; border-radius: 22px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); }
.empty-icon .ic { width: 34px; height: 34px; }
.small-empty { padding: 26px; }
.small-empty .empty-icon { width: 52px; height: 52px; border-radius: 16px; }

/* job page */
.job-head { display: grid; grid-template-columns: 1fr 340px; gap: 24px; align-items: start; margin-bottom: 8px; }
.jh-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 10px; }
.jh-ref { font-size: 14px; font-weight: 700; color: var(--brand-deep); background: var(--brand-soft); padding: 3px 10px; border-radius: 8px; }
@media (prefers-color-scheme: dark) { .jh-ref { color: var(--brand2); } }
.jh-title { font-size: clamp(26px, 3.4vw, 38px); }
.jh-proj { color: var(--ink2); display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.jh-proj .ic { width: 17px; height: 17px; color: var(--dim); }
.jh-detail { color: var(--ink2); background: var(--panel2); border: 1px solid var(--line); padding: 12px 15px; border-radius: 12px; }
.jh-side { display: flex; flex-direction: column; gap: 16px; }
.color-box { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; background: var(--gray-soft); }
.color-box .dot { width: 16px; height: 16px; }
.color-box small { display: block; color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.color-green { background: var(--green-soft); } .color-yellow { background: var(--yellow-soft); } .color-red { background: var(--red-soft); }
.team { display: flex; flex-direction: column; gap: 10px; }
.assign summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand-deep); display: flex; gap: 6px; align-items: center; list-style: none; }
.assign summary::-webkit-details-marker { display: none; }
.assign[open] summary { margin-bottom: 10px; }

.tracker { position: relative; list-style: none; margin: 0; padding: 22px 10px 6px; display: grid; grid-template-columns: repeat(6, 1fr);
  background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.tracker-line { position: absolute; left: calc(10px + (100% - 20px) / 12); width: calc((100% - 20px) * 5 / 6); top: 46px; height: 4px; overflow: visible; }
.tracker-line line { stroke-width: 4; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.tl-bg { stroke: var(--line); }
.tl-fg { stroke: var(--brand); }
.tk { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; z-index: 1; }
.tk-node { position: relative; width: 52px; height: 52px; border-radius: 50%; display: grid; place-items: center; background: var(--panel);
  border: 2px solid var(--line2); color: var(--dim); transition: all .3s; }
.tk-node .ic { width: 23px; height: 23px; }
.tk-num { position: absolute; right: -4px; top: -4px; width: 20px; height: 20px; border-radius: 50%; font-size: 11px; font-weight: 700;
  display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line2); color: var(--dim); }
.tk-label b { display: block; font-size: 13.5px; line-height: 1.3; }
.tk-label small { display: block; font-size: 12px; color: var(--dim); line-height: 1.35; padding: 0 4px; }
.tk.done .tk-node { background: var(--ink); border-color: var(--ink); color: var(--bg); }
.tk.done .tk-num { background: var(--green); border-color: var(--green); color: #fff; }
.tk.flagged .tk-node { background: var(--yellow); border-color: var(--yellow); color: #2a1d00; }
.tk.current .tk-node { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 8px 22px -6px rgba(255, 106, 26, .8); }
.tk.current .tk-num { background: #fff; color: var(--brand); border-color: var(--brand); }
.tk.current .tk-label b { color: var(--brand-deep); }
.tk.skipped .tk-node { background: transparent; border-style: dashed; color: var(--line2); }
.tk.skipped .tk-label { opacity: .55; }
.tk .pulse-ring { position: absolute; inset: -2px; border-radius: 50%; border: 2px solid var(--brand); pointer-events: none; }

.outcome { display: flex; align-items: center; gap: 18px; padding: 20px 24px; border-radius: var(--r); margin: 18px 0; }
.outcome h2 { margin: 0; font-size: 24px; }
.outcome p { margin: 0; color: var(--ink2); }
.outcome-green { background: var(--green-soft); color: var(--green); }
.outcome-yellow { background: var(--yellow-soft); color: #9a6500; }
.outcome-red { background: var(--red-soft); color: var(--red); }
.outcome-badge svg { width: 64px; height: 64px; fill: none; stroke: currentColor; stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; }

.act { margin: 22px 0; border: 2px solid var(--brand); box-shadow: 0 20px 50px -26px rgba(255, 106, 26, .55); position: relative; overflow: hidden; }
.act::before { content: ''; position: absolute; inset: 0 0 auto; height: 5px; background: linear-gradient(90deg, var(--brand2), var(--brand), var(--brand-deep)); }
.act-head { display: flex; gap: 16px; align-items: flex-start; margin-bottom: 16px; }
.act-head h2 { font-size: 24px; margin: 0 0 2px; }
.act-icon { width: 54px; height: 54px; border-radius: 16px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(140deg, var(--brand2), var(--brand-deep)); box-shadow: 0 10px 22px -10px rgba(255, 106, 26, .9); }
.act-icon .ic { width: 27px; height: 27px; }
.act h4 { margin: 8px 0 0; }
.sc-item { display: grid; grid-template-columns: 40px 1fr; gap: 12px; padding: 16px 0; border-top: 1px dashed var(--line2); }
.sc-item:first-of-type { border-top: 0; }
.sc-item > div { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.sc-n { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; font-weight: 700; font-size: 17px;
  background: var(--brand-soft); color: var(--brand-deep); }
.waiting { display: flex; align-items: center; gap: 20px; margin: 22px 0; }
.waiting h2 { margin: 0; }
.waiting p { margin: 0; }
.waiting-pulse { position: relative; width: 22px; height: 22px; border-radius: 50%; background: var(--brand); flex: none; margin-left: 8px; }
.waiting-pulse::after { content: ''; position: absolute; inset: 0; border-radius: 50%; background: var(--brand); opacity: .4; }

.timeline { list-style: none; margin: 0; padding: 0 0 0 28px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--brand), var(--line2)); border-radius: 2px; }
.tl-round span { display: inline-block; margin: 8px 0 12px -28px; padding: 3px 12px; border-radius: 99px; background: var(--ink); color: var(--bg); font-size: 12.5px; font-weight: 700; position: relative; }
.tl-item { position: relative; margin-bottom: 14px; }
.tl-node { position: absolute; left: -28px; top: 14px; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel); border: 2px solid var(--brand); color: var(--brand); }
.tl-node .ic { width: 15px; height: 15px; }
.tl-card { padding: 16px 18px; margin-left: 12px; }
.tl-head { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-bottom: 8px; }
.tl-who { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); }
.tl-data { display: grid; grid-template-columns: 170px 1fr; gap: 6px 14px; margin: 0; font-size: 14.5px; }
.tl-data dt { color: var(--dim); font-weight: 600; font-size: 13.5px; }
.tl-data dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.yes, .no { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.yes { color: var(--green); } .no { color: var(--red); }
.yes .ic, .no .ic { width: 16px; height: 16px; }
.ev-link { display: inline-flex; align-items: center; gap: 5px; margin: 0 8px 4px 0; padding: 3px 10px; border-radius: 8px; background: var(--panel2); border: 1px solid var(--line); font-size: 13.5px; }
.ev-link .ic { width: 15px; height: 15px; }
.file-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; margin-top: 12px; }
.file-tile { margin: 0; border-radius: 12px; overflow: hidden; border: 1px solid var(--line); background: var(--panel2); display: flex; flex-direction: column; }
.file-tile img, .file-tile video { width: 100%; height: 110px; object-fit: cover; display: block; background: #000; }
.ft-icon { height: 110px; display: grid; place-items: center; color: var(--dim); }
.ft-icon .ic { width: 38px; height: 38px; }
.file-tile figcaption { padding: 7px 9px; font-size: 12.5px; line-height: 1.35; }
.file-tile figcaption a { display: block; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file-tile figcaption small { color: var(--dim); font-size: 11.5px; }
.comment-form { flex-direction: row; align-items: flex-end; margin-bottom: 16px; }
.comment-form textarea { flex: 1; min-height: 46px; }

/* tables */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 12.5px; font-weight: 700; color: var(--dim); letter-spacing: .04em; padding: 14px 16px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 12px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--panel2); }
.people-cell { white-space: nowrap; }
.people-cell .avatar + .avatar { margin-left: -6px; }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg2); border: 1px solid var(--line); }
.tab { padding: 6px 16px; border-radius: 9px; color: var(--ink2); font-weight: 600; font-size: 14px; text-decoration: none !important; }
.tab.active { background: var(--panel); color: var(--ink); box-shadow: var(--shadow); }
.matrix-wrap { padding: 0; overflow-x: auto; }
.matrix { width: 100%; border-collapse: collapse; font-size: 14px; }
.matrix th { padding: 14px 10px; font-size: 12.5px; color: var(--dim); font-weight: 700; border-bottom: 1px solid var(--line); vertical-align: bottom; }
.matrix th:first-child { text-align: left; padding-left: 18px; }
.matrix td { padding: 10px; border-bottom: 1px solid var(--line); text-align: center; }
.matrix td:first-child { text-align: left; padding-left: 18px; }
.mx.on { color: var(--green); }
.mx.on .ic { width: 20px; height: 20px; stroke-width: 2.4; }

/* projects / people / admin */
.project-card h3 { margin: 6px 0 10px; }
.project-card h3 a { color: var(--ink); }
.project-card.archived { opacity: .55; }
.pc-top { display: flex; align-items: center; gap: 8px; }
.pc-code { font-weight: 700; color: var(--brand-deep); background: var(--brand-soft); padding: 2px 9px; border-radius: 7px; font-size: 13px; }
.pc-nums { display: flex; gap: 18px; margin: 12px 0; font-size: 14px; color: var(--dim); }
.pc-nums b { font-size: 22px; color: var(--ink); margin-right: 4px; }
.pc-links { display: flex; flex-wrap: wrap; gap: 12px; font-size: 14px; }
.pc-links a { display: inline-flex; gap: 4px; align-items: center; }
.pc-links .ic { width: 16px; height: 16px; }
.pc-archive { margin-top: 8px; }
.pos-card h3 { margin-bottom: 4px; }
.pos-holders { display: flex; gap: 4px; margin-top: 12px; flex-wrap: wrap; }
.new-link { display: flex; align-items: center; gap: 18px; justify-content: space-between; border: 2px solid var(--brand); margin: 0 0 22px; }
.new-link code, .copy-box code { display: block; margin: 6px 0; padding: 10px 12px; font-size: 14px; overflow-wrap: anywhere; background: var(--panel2); }
.pos-pick { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.pos-opt { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 2px solid var(--line); background: var(--panel2); cursor: pointer; transition: all .2s; }
.pos-opt input { width: 19px; height: 19px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.pos-opt b { display: block; font-size: 14.5px; }
.pos-opt small { color: var(--dim); font-size: 12px; line-height: 1.4; display: block; }
.pos-opt:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); }
.invite-list { list-style: none; margin: 10px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.invite-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 14px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); }
.invite-list small { display: block; color: var(--dim); }
.user-list { display: flex; flex-direction: column; gap: 12px; }
.user-row { display: grid; grid-template-columns: 240px 1fr auto; gap: 18px; align-items: center; padding: 16px 18px; }
.user-row.disabled { opacity: .5; }
.ur-who { display: flex; gap: 12px; align-items: center; min-width: 0; }
.ur-who b { display: block; }
.ur-who small { display: block; color: var(--dim); font-size: 12px; line-height: 1.4; }
.ur-pos { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; flex-direction: row; }
.pos-chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.pos-chip input { position: absolute; opacity: 0; }
.pos-chip span { display: inline-block; padding: 4px 11px; border-radius: 99px; font-size: 12.5px; font-weight: 600; cursor: pointer;
  border: 1px solid var(--line2); color: var(--dim); background: var(--panel2); transition: all .15s; }
.pos-chip input:checked + span { background: var(--brand); border-color: var(--brand); color: #fff; }
.pos-chip input:focus-visible + span { box-shadow: 0 0 0 3px var(--brand-soft); }
.ur-actions { display: flex; flex-direction: column; gap: 2px; align-items: flex-end; }
.pos-editor { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 14px; }
.pos-edit { display: flex; flex-direction: column; gap: 12px; }
.pos-new { border-style: dashed; }
.perm-toggles { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 14px; }
.toggle { display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14px; }
.toggle input { position: absolute; opacity: 0; }
.toggle i { position: relative; width: 38px; height: 22px; border-radius: 99px; background: var(--line2); flex: none; transition: background .2s; }
.toggle i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .25s cubic-bezier(.3, 1.6, .5, 1); box-shadow: 0 1px 3px rgba(0, 0, 0, .25); }
.toggle input:checked + i { background: var(--brand); }
.toggle input:checked + i::after { transform: translateX(16px); }
.toggle input:focus-visible + i { box-shadow: 0 0 0 3px var(--brand-soft); }
.account-head { display: flex; align-items: center; gap: 18px; }
.account-head h1 { margin: 0; }
.logout-form { margin-left: auto; }
.copy-box { display: flex; align-items: center; gap: 14px; justify-content: space-between; margin-bottom: 20px; }
.copy-box > div { flex: 1; min-width: 0; }
.copy-box.inline { padding: 0; margin: 8px 0; border: 0; gap: 8px; }
.copy-box.inline code { flex: 1; margin: 0; font-size: 12.5px; }
.num-steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.examples { display: flex; flex-wrap: wrap; gap: 10px; margin: 6px 0 14px; }
.example { padding: 10px 14px; border-radius: 14px; background: var(--panel2); border: 1px solid var(--line); font-size: 14.5px; }
.consent-list { list-style: none; padding: 0; margin: 14px 0; display: flex; flex-direction: column; gap: 8px; }
.consent-list li { display: flex; gap: 8px; align-items: center; }
.consent-list .ic { color: var(--green); }
.consent-list li.muted .ic { color: var(--dim); }

/* auth */
.auth { min-height: calc(100vh - 70px); display: grid; grid-template-columns: 1.1fr 1fr; gap: 40px; align-items: center; padding: 40px 0; }
.auth-single { grid-template-columns: 1fr; justify-items: center; }
.auth-card { width: min(480px, 100%); padding: 32px; }
.auth-card h1 { font-size: 28px; margin: 22px 0 10px; }
.auth-hero { position: relative; }
.auth-title { font-size: clamp(38px, 5.4vw, 66px); line-height: 1.2; margin: 20px 0 16px; font-weight: 700; color: var(--ink); }
.auth-title em { font-style: normal; color: var(--brand); }
.auth-sub { color: var(--ink2); font-size: 17px; }
.auth-flow { position: relative; height: 120px; max-width: 600px; }
.af-path { position: absolute; inset: 0; width: 100%; height: 100%; }
.af-path path { fill: none; stroke: var(--brand); stroke-width: 2.5; stroke-dasharray: 6 8; opacity: .55; }
.af-node { position: absolute; top: 50%; left: calc((var(--i) - 1) * 18% + 1%); width: 52px; height: 52px; margin-top: -26px; border-radius: 16px;
  display: grid; place-items: center; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--brand); z-index: 1; }
.af-node .ic { width: 25px; height: 25px; }

/* standard page */
.std-hero { display: grid; grid-template-columns: 1.3fr 1fr; gap: 30px; align-items: center; min-height: 480px; margin-bottom: 20px; }
.std-title { font-size: clamp(54px, 9vw, 112px); line-height: 1.15; margin: 0; font-weight: 700; color: var(--brand);
  text-shadow: 0 18px 40px rgba(255, 106, 26, .28); }
.std-title2 { font-size: clamp(22px, 2.6vw, 30px); font-weight: 600; margin: 8px 0 16px; }
.std-lead { font-size: 17px; color: var(--ink2); max-width: 640px; }
.std-jump { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.pill-link { padding: 8px 16px; border-radius: 99px; background: var(--panel); border: 1px solid var(--line); font-weight: 600; font-size: 14.5px; color: var(--ink) !important; text-decoration: none !important; transition: all .2s; }
.pill-link:hover { border-color: var(--brand); background: var(--brand-soft); }
.std-orbit { position: relative; width: min(400px, 100%); aspect-ratio: 1; margin: 0 auto; }
.orbit-ring { position: absolute; inset: 0; width: 100%; height: 100%; }
.orbit-ring circle { fill: none; stroke: var(--line2); stroke-width: 1.5; stroke-dasharray: 4 7; }
.orbit-ring circle.faint { opacity: .5; stroke-dasharray: 2 10; }
.orbit-core { position: absolute; left: 50%; top: 50%; width: 120px; height: 120px; margin: -60px 0 0 -60px; border-radius: 36px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand2), var(--brand) 50%, var(--brand-deep)); box-shadow: 0 30px 60px -20px rgba(255, 106, 26, .8), inset 0 2px 0 rgba(255, 255, 255, .3); }
.orbit-core .ic { width: 64px; height: 64px; stroke-width: 1.6; }
.orbit-node { position: absolute; left: 50%; top: 50%; width: 56px; height: 56px; margin: -28px 0 0 -28px; border-radius: 18px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg); color: var(--brand);
  transform: rotate(calc(var(--i) * 60deg - 90deg)) translate(37.5%) rotate(calc(var(--i) * -60deg + 90deg)); }
.orbit-node .ic { width: 26px; height: 26px; }
.std-section { margin: 70px 0; }
.std-head { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.std-head h2 { font-size: clamp(24px, 3vw, 34px); margin-bottom: 4px; }
.std-num { font-family: var(--mono); font-weight: 700; font-size: 15px; color: var(--brand); padding: 6px 10px; border-radius: 10px; background: var(--brand-soft); margin-top: 6px; }
.flow { position: relative; }
.flow-svg { position: absolute; left: 0; right: 0; top: -10px; width: 100%; height: auto; overflow: visible; pointer-events: none; }
.flow-path { fill: none; stroke: var(--brand); stroke-width: 3; stroke-linecap: round; opacity: .8; }
.flow-dot { fill: var(--brand); filter: drop-shadow(0 0 10px rgba(255, 106, 26, .9)); }
.flow-nodes { list-style: none; margin: 0; padding: 40px 0 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 14px; position: relative; }
.flow-node { position: relative; display: flex; flex-direction: column; align-items: center; text-align: center; padding: 70px 14px 18px; border-radius: 20px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); margin-top: 30px; }
.fn-icon { position: absolute; top: -30px; width: 76px; height: 76px; border-radius: 24px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand2), var(--brand-deep)); box-shadow: 0 16px 30px -12px rgba(255, 106, 26, .85); }
.fn-icon .ic { width: 36px; height: 36px; }
.fn-n { position: absolute; top: 12px; right: 14px; font-family: var(--mono); font-weight: 700; color: var(--dim); font-size: 13px; }
.flow-node b { font-size: 16px; line-height: 1.3; }
.flow-node small { color: var(--brand-deep); font-weight: 600; margin: 2px 0 8px; }
.flow-node p { color: var(--ink2); font-size: 13.5px; margin: 0; }
.flow-notes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-top: 18px; }
.note-card { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 16px; background: var(--panel2); border: 1px dashed var(--line2); font-size: 14.5px; }
.note-card .ic { color: var(--brand); margin-top: 2px; }
.five { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; perspective: 1200px; }
.five-card { position: relative; padding: 26px 20px 20px; display: flex; flex-direction: column; transform-style: preserve-3d; }
.five-n { font-size: 64px; font-weight: 700; line-height: 1; margin-bottom: 10px;
  background: linear-gradient(160deg, var(--brand2), var(--brand-deep)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.five-card h3 { font-size: 17px; }
.five-card p { color: var(--ink2); font-size: 14px; }
.five-card .why { margin-top: auto; display: flex; gap: 8px; padding: 12px; border-radius: 12px; background: var(--red-soft); color: var(--ink2); font-size: 13px; }
.five-card .why .ic { color: var(--red); width: 17px; height: 17px; margin-top: 1px; }
.five-card .why b { color: var(--red); }
.tiers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; perspective: 1200px; }
.tier-big { position: relative; overflow: hidden; padding: 26px; transform-style: preserve-3d; }
.tier-big::before { content: ''; position: absolute; inset: 0 0 auto; height: 6px; }
.tier-big-green::before { background: var(--green); } .tier-big-yellow::before { background: var(--yellow); } .tier-big-red::before { background: var(--red); }
.tb-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 10px; }
.tb-head h3 { font-size: 30px; margin: 0; }
.tb-head small { color: var(--dim); font-weight: 600; }
.tb-dot { width: 22px; height: 22px; border-radius: 50%; }
.tier-big-green .tb-dot { background: var(--green); box-shadow: 0 0 0 6px var(--green-soft); } .tier-big-green h3 { color: var(--green); }
.tier-big-yellow .tb-dot { background: var(--yellow); box-shadow: 0 0 0 6px var(--yellow-soft); } .tier-big-yellow h3 { color: #b07700; }
.tier-big-red .tb-dot { background: var(--red); box-shadow: 0 0 0 6px var(--red-soft); } .tier-big-red h3 { color: var(--red); }
.tier-big ul { padding-left: 20px; color: var(--ink2); font-size: 15px; }
.tb-review { display: flex; gap: 8px; padding: 12px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); font-size: 14px; margin: 0; }
.tb-review .ic { color: var(--brand); }
.verdict-legend { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; justify-content: space-around; margin-top: 18px; }
.verdict-legend > .ic { color: var(--dim); }
.ladder { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.rung { display: flex; gap: 18px; align-items: center; padding: 18px 22px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  margin-left: calc(var(--k, 0) * 0px); }
.rung:nth-child(2) { margin-left: 4%; } .rung:nth-child(3) { margin-left: 8%; } .rung:nth-child(4) { margin-left: 12%; }
.rung-step { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; font-size: 21px; font-weight: 700; flex: none; color: #fff; }
.rung b { font-size: 17px; margin-right: 10px; }
.rung-who { font-size: 13px; font-weight: 700; padding: 2px 10px; border-radius: 99px; background: var(--gray-soft); color: var(--ink2); }
.rung p { margin: 4px 0 0; color: var(--ink2); font-size: 14.5px; }
.rung-yellow .rung-step { background: var(--yellow); } .rung-orange .rung-step { background: var(--orange); }
.rung-red .rung-step { background: var(--red); } .rung-gray .rung-step { background: var(--dim); }
.std-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap;
  background: linear-gradient(135deg, var(--brand-soft), var(--panel)); border-color: var(--brand); }
.cta-btns { display: flex; gap: 10px; flex-wrap: wrap; }

/* confetti */
.confetti { position: fixed; z-index: 200; width: 10px; height: 14px; border-radius: 3px; pointer-events: none; top: 0; left: 0; }

/* responsive */
@media (max-width: 1180px) {
  .stats { grid-template-columns: repeat(3, 1fr); }
  .five { grid-template-columns: repeat(3, 1fr); }
  .flow-nodes { grid-template-columns: repeat(3, 1fr); row-gap: 56px; }
  .flow-svg { display: none; }
  .user-row { grid-template-columns: 1fr; }
  .ur-actions { flex-direction: row; gap: 16px; align-items: center; }
}
@media (max-width: 900px) {
  .split, .split-wide, .job-head, .std-hero, .auth { grid-template-columns: 1fr; }
  .auth-hero { display: none; }
  .tier-pick, .tiers, .flow-notes { grid-template-columns: 1fr; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .tracker { grid-template-columns: 1fr; padding: 16px 18px; gap: 4px; }
  .tracker-line { display: none; }
  .tk { flex-direction: row; text-align: left; gap: 14px; padding: 6px 0; }
  .tk-node { width: 44px; height: 44px; }
  .std-orbit { width: min(320px, 90%); }
  .pos-editor { grid-template-columns: 1fr; }
  .hero { flex-direction: column; align-items: flex-start; }
  .hero-ring { display: none; }
  .topbar { flex-wrap: wrap; padding-bottom: 6px; }
  .nav { order: 3; flex-basis: 100%; }
}
@media (max-width: 600px) {
  body { font-size: 15.5px; }
  .wrap, .wrap:not(.wide) { width: calc(100% - 32px); margin-top: 18px; }
  .stats { grid-template-columns: 1fr 1fr; }
  .five, .flow-nodes { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .span-2 { grid-column: auto; }
  .card { padding: 18px; }
  .brand-text small { display: none; }
  .new-job span { display: none; }
  .nav-link span { font-size: 14px; }
  .tl-data { grid-template-columns: 1fr; gap: 2px; }
  .tl-data dd { margin-bottom: 8px; }
  .timeline { padding-left: 22px; }
  .tl-card { margin-left: 8px; }
  .stick-row { grid-template-columns: 1fr; }
  .new-link, .copy-box { flex-direction: column; align-items: stretch; }
  .rung { margin-left: 0 !important; }
  .perm-toggles { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(7, 78vw); }
  .inline-filter select { min-width: 0; width: 100%; }
  .account-head { flex-wrap: wrap; }
  .toast { top: auto; bottom: 16px; right: 16px; left: 16px; max-width: none; }
  .toast + .toast { top: auto; bottom: 84px; }
}

/* ── v2: teams, projects for sales, verification, time ─────────────────────── */
img.avatar-img { object-fit: cover; padding: 0; background: var(--line); }
.timer-pill { display: inline-flex; align-items: center; gap: 7px; padding: 6px 12px; border-radius: 99px; background: var(--red-soft); color: var(--red);
  font-weight: 700; font-size: 14px; text-decoration: none !important; border: 1px solid rgba(229, 72, 77, .3); }
.timer-pill small { font-weight: 600; opacity: .8; }
.rec { width: 10px; height: 10px; border-radius: 50%; background: var(--red); display: inline-block; box-shadow: 0 0 0 4px rgba(229, 72, 77, .18); }

.picker { border: 1px solid var(--line2); border-radius: 14px; background: var(--panel2); padding: 8px; }
.picker-q { margin-bottom: 8px; padding: 8px 12px !important; font-size: 14px !important; }
.picker-list { display: flex; flex-direction: column; gap: 4px; max-height: 236px; overflow-y: auto; overscroll-behavior: contain; }
.pick { display: flex; align-items: center; gap: 10px; padding: 6px 9px; border-radius: 10px; cursor: pointer; border: 1px solid transparent; transition: background .15s, border-color .15s; }
.pick:hover { background: var(--panel); }
.pick input { width: 18px; height: 18px; accent-color: var(--brand); flex: none; }
.pick b { display: block; font-size: 14px; line-height: 1.25; }
.pick small { display: block; color: var(--dim); font-size: 11.5px; line-height: 1.3; }
.pick:has(input:checked) { background: var(--brand-soft); border-color: rgba(255, 106, 26, .35); }
.pick.hide { display: none; }
.team-pickers { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.form-sub { display: flex; align-items: center; gap: 8px; font-size: 16px; margin: 10px 0 0; }
.form-sub .ic { color: var(--brand); }

.proof-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin: 6px 0 10px; }
.check { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.check .ic { width: 15px; height: 15px; stroke-width: 2.2; }
.check-ok { background: var(--green-soft); color: var(--green); }
.check-missing { background: var(--red-soft); color: var(--red); }
.check-unknown { background: var(--yellow-soft); color: #9a6500; }
@media (prefers-color-scheme: dark) { .check-unknown { color: #f3c04a; } }
.drive-chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 11px; border-radius: 99px; font-size: 13px; font-weight: 600;
  background: var(--blue-soft); color: var(--blue) !important; text-decoration: none !important; margin: 0 6px 6px 0; }
.drive-chip .ic { width: 15px; height: 15px; }
.cats { display: flex; flex-wrap: wrap; gap: 5px; }
.cat { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 700; color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent); }
.pos-chip span[style] { border-color: color-mix(in srgb, var(--c) 40%, var(--line2)); }
.pos-chip input:checked + span[style] { background: var(--c); border-color: var(--c); }

.search-bar { display: flex; align-items: center; gap: 10px; padding: 8px 8px 8px 16px; border-radius: 18px; margin-bottom: 14px; }
.search-bar input { border: 0 !important; background: transparent !important; box-shadow: none !important; font-size: 17px !important; padding: 8px 4px !important; }
.sb-icon .ic { width: 22px; height: 22px; color: var(--brand); }
.cat-bar { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 14px; scrollbar-width: thin; }
.cat-filter { --c: var(--ink); flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 14px; border-radius: 99px; font-weight: 600; font-size: 14px;
  background: var(--panel); border: 1px solid var(--line); color: var(--ink2) !important; text-decoration: none !important; transition: all .2s; }
.cat-filter em { font-style: normal; font-size: 12px; color: var(--dim); background: var(--gray-soft); border-radius: 99px; padding: 0 7px; }
.cat-filter:hover { border-color: var(--c); }
.cat-filter.active { background: var(--c); border-color: var(--c); color: #fff !important; }
.cat-filter.active em { background: rgba(255, 255, 255, .25); color: #fff; }
.project-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); gap: 18px; margin-bottom: 14px; }
.pcard { display: flex; flex-direction: column; border-radius: 20px; overflow: hidden; background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow);
  color: var(--ink); text-decoration: none !important; transition: box-shadow .25s; }
.pcard:hover { box-shadow: var(--shadow-lg); }
.pcard.archived { opacity: .55; }
.pcard.hide { display: none; }
.pcard-cover { position: relative; aspect-ratio: 16 / 9; background: linear-gradient(135deg, var(--brand2), var(--brand-deep)); overflow: hidden; }
.pcard-cover img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .5s; }
.pcard:hover .pcard-cover img { transform: scale(1.05); }
.pcard-ph { position: absolute; inset: 0; display: grid; place-items: center; color: rgba(255, 255, 255, .92); font-size: 26px; font-weight: 700; letter-spacing: .04em; }
.pcard-checks { position: absolute; right: 10px; top: 10px; display: flex; gap: 6px; }
.dotc { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: rgba(0, 0, 0, .45); color: #fff; backdrop-filter: blur(6px); }
.dotc .ic { width: 15px; height: 15px; }
.dotc-ok { background: rgba(23, 163, 90, .9); }
.dotc-missing { background: rgba(229, 72, 77, .92); }
.dotc-unknown { background: rgba(229, 160, 13, .92); }
.pcard-body { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.pcard-top { display: flex; align-items: center; gap: 8px; }
.pcard-top small { color: var(--dim); margin-left: auto; }
.pcard h3 { margin: 0; font-size: 17px; line-height: 1.35; }
.pcard-client { margin: 0; color: var(--ink2); font-size: 14px; }
.pcard-foot { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 8px; }
.pcard-foot small { margin-left: auto; color: var(--dim); }

.phero { position: relative; min-height: 220px; border-radius: 24px; overflow: hidden; display: flex; align-items: flex-end; margin-bottom: 14px;
  background: linear-gradient(135deg, var(--brand2), var(--brand-deep)); }
.phero-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.phero.has-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0, 0, 0, .05) 20%, rgba(0, 0, 0, .72)); }
.phero-text { position: relative; z-index: 1; padding: 26px 28px; color: #fff; }
.phero-text .jh-title { color: #fff; margin: 4px 0; }
.phero-text .jh-ref { background: rgba(255, 255, 255, .2); color: #fff; }
.phero-text .cat { background: rgba(255, 255, 255, .9); }
.phero-client { display: flex; align-items: center; gap: 6px; margin: 0; opacity: .92; }
.proof { padding: 14px 18px; margin-bottom: 8px; }
.proof .proof-row { margin: 0; }
.recheck { margin-left: auto; }
.gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.g-item { position: relative; display: block; aspect-ratio: 4 / 3; border-radius: 14px; overflow: hidden; background: #111; text-decoration: none !important; }
.g-item img, .g-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .4s; }
.g-item:hover img, .g-item:hover video { transform: scale(1.06); }
.g-play { position: absolute; left: 50%; top: 50%; width: 46px; height: 46px; margin: -23px 0 0 -23px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(255, 106, 26, .92); color: #fff; box-shadow: 0 8px 20px rgba(0, 0, 0, .35); }
.g-play .ic { width: 22px; height: 22px; fill: #fff; }
.g-cap { position: absolute; left: 0; right: 0; bottom: 0; padding: 18px 10px 7px; font-size: 12px; color: #fff; background: linear-gradient(transparent, rgba(0, 0, 0, .7));
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.drive-list { margin-top: 12px; }
.team-role { margin-bottom: 12px; }
.team-role > small { display: block; color: var(--dim); font-weight: 700; font-size: 12px; letter-spacing: .04em; margin-bottom: 6px; }
.time-sum { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.time-sum li { display: flex; align-items: center; justify-content: space-between; }
.edit-project summary { cursor: pointer; list-style: none; }
.edit-project summary::-webkit-details-marker { display: none; }
.edit-project summary h2 { margin: 0; }

.time-card .section-head { margin-bottom: 10px; }
.time-actions { display: flex; flex-direction: column; gap: 10px; }
.timer-form { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.timer-form input, .timer-form select { flex: 1; min-width: 200px; }
.timer-live { display: flex; align-items: center; gap: 10px; }
.timer-live b { font-size: 26px; color: var(--red); }
.manual-time summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand-deep); display: inline-flex; gap: 6px; align-items: center; list-style: none; }
.manual-time summary::-webkit-details-marker { display: none; }
.manual-time[open] summary { margin-bottom: 10px; }
.time-table { margin-top: 14px; }
form.inline { display: inline; }
.wiki-line { padding: 10px 12px; border-radius: 12px; background: var(--blue-soft); }
.rules { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 14px; }
.rule { display: flex; gap: 14px; align-items: flex-start; }
.rule h3 { font-size: 16px; margin-bottom: 4px; }
.rule p { color: var(--ink2); font-size: 14px; margin: 0; }
.rule-icon { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; background: linear-gradient(140deg, var(--brand2), var(--brand-deep)); }
.rule-icon .ic { width: 24px; height: 24px; }
.cat-editor { display: flex; flex-direction: column; gap: 8px; }
.cat-row { display: flex; gap: 8px; align-items: center; }
.cat-row input[type=color] { width: 42px; height: 38px; padding: 2px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel2); flex: none; }
.cat-row input:not([type]) { flex: 1; }
.avatar-edit { display: flex; gap: 18px; align-items: center; flex-wrap: wrap; }
.avatar-edit .form { flex: 1; min-width: 220px; }
.comment-form { flex-direction: column; align-items: stretch; }
.comment-actions { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.attach-btn { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px dashed var(--line2); cursor: pointer; color: var(--brand); font-size: 13px; }
.attach-btn input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.small-grid { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
.small-grid .file-tile img, .small-grid .file-tile video { height: 80px; }
.stats-3 { grid-template-columns: repeat(3, 1fr); margin-bottom: 18px; }
.stats-3 .stat-num { font-size: 26px; }
@media (max-width: 1180px) { .team-pickers { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .rules, .team-pickers, .stats-3 { grid-template-columns: 1fr; }
  .timer-pill small { display: none; }
  .phero { min-height: 180px; }
  .phero-text { padding: 18px; }
}

.search-bar input { flex: 1; min-width: 0; }
.proof-row .drive-chip { margin: 0; }
input[type=file] { font: 400 14px var(--font); color: var(--dim); max-width: 100%; }
input[type=file]::file-selector-button { font: 600 14px var(--font); padding: 8px 14px; margin-right: 10px; border-radius: 10px; border: 1px solid var(--line2);
  background: var(--panel); color: var(--ink); cursor: pointer; }
input[type=file]::file-selector-button:hover { border-color: var(--brand); }

.uplink-row { margin: -4px 0 14px; display: flex; flex-direction: column; gap: 4px; }
@media print {
  [data-reveal], [data-card], [data-col], [data-tl], [data-feed], [data-row], [data-five-card], [data-tier-card], [data-rung],
  [data-flow-node], [data-split], [data-split-chars], [data-split] *, [data-split-chars] * { opacity: 1 !important; transform: none !important; filter: none !important; }
  .topbar, .bg-orbs, .act, .comment-form, .time-actions, .assign { display: none !important; }
}

/* ── reports: chart tokens (validated with the dataviz palette checks) ─────── */
:root {
  --viz-1: #2a78d6; --viz-2: #eb6834;
  --viz-o1: #86b6ef; --viz-o2: #3987e5; --viz-o3: #1c5cab; --viz-o4: #0d366b;
  --viz-grid: #eee7dc; --viz-muted: #b4aa9c; --viz-hover: rgba(42, 120, 214, .07);
}
@media (prefers-color-scheme: dark) {
  :root {
    --viz-1: #3987e5; --viz-2: #d95926;
    --viz-o1: #184f95; --viz-o2: #2a78d6; --viz-o3: #6da7ec; --viz-o4: #b7d3f6;
    --viz-grid: #2f2a23; --viz-muted: #6f675c; --viz-hover: rgba(57, 135, 229, .12);
  }
}
.viz-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin: 0 0 18px; }
.viz-filters .inline-filter select { min-width: 240px; }
.kpis { display: grid; grid-template-columns: repeat(6, 1fr); gap: 12px; margin-bottom: 18px; }
.kpi { display: flex; flex-direction: column; gap: 2px; padding: 16px 16px 14px; border-radius: var(--r); background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow); min-width: 0; }
.kpi-label { display: flex; align-items: center; gap: 5px; font-size: 13px; color: var(--dim); font-weight: 600; }
.kpi-label .ic { width: 16px; height: 16px; }
.kpi-value { font-size: 32px; font-weight: 700; line-height: 1.15; color: var(--ink); }
.kpi-value small { font-size: 15px; font-weight: 600; color: var(--dim); }
.kpi-sub { font-size: 12.5px; color: var(--dim); }
.kpi-spark { height: 26px; margin-top: 4px; }
.kpi-alert { border-color: rgba(229, 72, 77, .45); }
.kpi-alert .kpi-label { color: var(--red); }
.viz-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.viz-card { padding: 18px 20px; min-width: 0; }
.viz-wide { margin-bottom: 16px; }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 8px; }
.viz-head h2 { margin: 0; font-size: 18px; }
.viz-head p { margin: 2px 0 0; }
.viz-toggle { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px; border-radius: 9px; border: 1px solid var(--line2); background: var(--panel); color: var(--ink2);
  font: 600 13px var(--font); cursor: pointer; flex: none; }
.viz-toggle .ic { width: 16px; height: 16px; }
.viz-toggle[aria-pressed="true"] { background: var(--ink); color: var(--bg); border-color: var(--ink); }
.viz-tablewrap { overflow-x: auto; }
.js .viz-tablewrap { display: none; }
.js .viz-card.show-table .viz-tablewrap { display: block; }
.js .viz-card.show-table .viz-body { display: none; }
.viz-table { font-size: 13.5px; }
.viz-table td, .viz-table th { padding: 7px 10px; }
.viz-body svg { display: block; overflow: visible; }
.viz-grid line, line.viz-grid { stroke: var(--viz-grid); stroke-width: 1; shape-rendering: crispEdges; }
.viz-tick { fill: var(--dim); font: 500 11px var(--font); font-variant-numeric: tabular-nums; }
.viz-label { fill: var(--ink); font: 700 12px var(--font); }
.viz-bar { transform-box: fill-box; transform-origin: 50% 100%; }
.viz-hit { fill: transparent; cursor: default; outline: none; }
.viz-hit.on, .viz-hit:focus-visible { fill: var(--viz-hover); }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 2px 0 10px; font-size: 13px; color: var(--ink2); }
.viz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.key { display: inline-block; flex: none; }
.key-rect { width: 12px; height: 12px; border-radius: 3px; }
.key-line { width: 14px; height: 2px; border-radius: 2px; }
.viz-empty { padding: 30px 0; text-align: center; }
.hb-list { display: flex; flex-direction: column; gap: 4px; }
.hb-row { display: grid; grid-template-columns: minmax(120px, 38%) 1fr auto; align-items: center; gap: 12px; padding: 6px 8px; border-radius: 10px;
  color: var(--ink); text-decoration: none !important; outline: none; }
.hb-row:hover, .hb-row:focus-visible { background: var(--viz-hover); }
.hb-label { font-size: 14px; font-weight: 600; line-height: 1.3; min-width: 0; overflow-wrap: anywhere; }
.hb-label small { display: block; font-weight: 400; color: var(--dim); font-size: 12px; }
.hb-track { display: block; height: 16px; }
.hb-bar { display: block; height: 100%; min-width: 2px; background: var(--viz-1); border-radius: 0 4px 4px 0; transform-origin: 0 50%; }
.hb-val { font-weight: 700; font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
.sb-list { display: flex; flex-direction: column; gap: 6px; }
.sb-row { display: grid; grid-template-columns: minmax(140px, 30%) 1fr 110px; align-items: center; gap: 12px; padding: 4px 0; }
.sb-label { font-size: 14px; font-weight: 600; color: var(--ink) !important; line-height: 1.3; overflow-wrap: anywhere; }
.sb-track { height: 22px; }
.sb-fill { display: flex; gap: 2px; height: 100%; transform-origin: 0 50%; }
.sb-seg { display: grid; place-items: center; min-width: 3px; font: 700 12px var(--font); font-style: normal; outline: none; cursor: default; transition: filter .15s; }
.sb-seg:last-child { border-radius: 0 4px 4px 0; }
.sb-seg.on, .sb-seg:focus-visible { filter: brightness(1.12); box-shadow: 0 0 0 2px var(--panel), 0 0 0 4px var(--ink2); }
.sb-total { font-size: 13px; font-weight: 700; color: var(--ink); white-space: nowrap; }
.sb-total em { display: block; font-style: normal; font-weight: 600; font-size: 12px; color: var(--red); }
.spark { display: inline-block; vertical-align: middle; }
.spark-svg { display: block; overflow: visible; }
.spark-line { fill: none; stroke: var(--viz-muted); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.spark-dot { fill: var(--viz-1); stroke: var(--panel); stroke-width: 2; }
.viz-tip { position: fixed; z-index: 300; pointer-events: none; min-width: 140px; max-width: 280px; padding: 9px 12px; border-radius: 12px;
  background: var(--ink); color: var(--bg); box-shadow: var(--shadow-lg); font-size: 13px; }
.viz-tip[hidden] { display: none; }
.tip-title { font-size: 12px; opacity: .75; margin-bottom: 4px; }
.tip-row { display: flex; align-items: center; gap: 8px; }
.tip-row i { width: 12px; height: 2px; border-radius: 2px; flex: none; }
.tip-row b { font-size: 15px; font-variant-numeric: tabular-nums; }
.tip-row span { opacity: .8; }
.people-report td.num, .people-report th.num { text-align: right; font-variant-numeric: tabular-nums; }
.people-report th[data-sort] { cursor: pointer; user-select: none; }
.people-report th[data-sort]:hover { color: var(--ink); }
.people-report th[aria-sort="ascending"]::after { content: " ↑"; }
.people-report th[aria-sort="descending"]::after { content: " ↓"; }
.hbar { display: inline-block; width: 70px; height: 8px; margin-right: 8px; vertical-align: middle; }
.hbar i { display: block; height: 100%; width: var(--w); background: var(--viz-1); border-radius: 0 4px 4px 0; }
@media (max-width: 1180px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .viz-grid { grid-template-columns: 1fr; } }
@media (max-width: 600px) {
  .kpis { grid-template-columns: 1fr 1fr; }
  .sb-row, .hb-row { grid-template-columns: 1fr; gap: 4px; }
  .sb-total { justify-self: start; }
}

/* ── v1.2: guidelines per job type, test cases, the time calculator ─────────── */
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.guides .section-head { flex-wrap: wrap; gap: 6px 14px; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
.guide { padding: 16px 18px; border-top: 3px solid var(--c, var(--brand)); display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.guide header { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.guide-cat { font-weight: 700; font-size: 15px; color: var(--c, var(--ink)); }
@media (prefers-color-scheme: dark) { .guide-cat { color: color-mix(in srgb, var(--c) 60%, #fff); } }
.guide-open { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.guide-open .ic { width: 15px; height: 15px; }
.guide-tools { margin: 0; padding-left: 18px; font-size: 14px; line-height: 1.55; color: var(--ink2); }
.guide-tools li + li { margin-top: 3px; }
.guide-ai summary { cursor: pointer; font-size: 13px; font-weight: 600; color: var(--ink2); }
.guide-ai ul { margin: 6px 0 0; padding-left: 18px; font-size: 13px; color: var(--ink2); }
.guide-ai-note { margin-top: 10px; }
.guide-ai-note code { font-size: 12px; overflow-wrap: anywhere; }

.tc { display: flex; flex-direction: column; gap: 8px; }
.tc-rows { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.tc-row { display: grid; grid-template-columns: 26px minmax(0, 1.5fr) minmax(0, 1.2fr) 140px minmax(0, 1fr) 34px; gap: 6px; align-items: center;
  padding: 6px; border-radius: 12px; background: var(--panel2); border: 1px solid var(--line); border-left: 4px solid var(--line2); }
.tc-row[data-result="pass"] { border-left-color: var(--green); }
.tc-row[data-result="fail"] { border-left-color: var(--red); background: color-mix(in srgb, var(--red-soft) 60%, var(--panel2)); }
.tc-row[data-result="not_run"] { border-left-color: var(--dim); }
.tc-row input, .tc-row select { padding: 7px 10px; font-size: 14px; min-width: 0; }
.tc-row input:required:placeholder-shown { border-color: var(--red); }
.tc-n { font: 700 13px var(--mono); color: var(--dim); text-align: center; }
.tc-del { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; border: 0; background: none; color: var(--dim); cursor: pointer; }
.tc-del:hover, .tc-del:focus-visible { background: var(--red-soft); color: var(--red); }
.tc-del .ic { width: 16px; height: 16px; }
.tc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.tc-suggest { padding: 10px 12px; border-radius: 12px; border: 1px dashed var(--line2); }
.tc-suggest > small { display: flex; align-items: center; gap: 5px; color: var(--dim); font-weight: 600; margin-bottom: 6px; }
.tc-suggest > small .ic { width: 15px; height: 15px; }
.tc-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tc-chip { display: inline-flex; align-items: center; gap: 4px; padding: 4px 11px 4px 8px; border-radius: 99px; border: 1px solid var(--line2); background: var(--panel);
  font: 500 13px/1.4 var(--font); color: var(--ink2); cursor: pointer; text-align: left; transition: border-color .15s, background .15s; }
.tc-chip .ic { width: 14px; height: 14px; flex: none; color: var(--brand); }
.tc-chip:hover, .tc-chip:focus-visible { border-color: var(--brand); background: var(--brand-soft); }
.tc-chip.used, .tc-chip:disabled { opacity: .45; cursor: default; background: none; border-style: dashed; }
.rt-row { grid-template-columns: 26px minmax(0, 2.2fr) 150px minmax(0, 1fr); }
.rt-case { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; }
.rt-case small { color: var(--dim); }
.rt-maker { font-size: 12.5px; color: var(--dim); display: flex; flex-wrap: wrap; align-items: center; gap: 4px; }
.rt-maker .chip { padding: 1px 8px; font-size: 12px; }
.tc-view { width: 100%; border-collapse: collapse; font-size: 14px; }
.tc-view td { padding: 6px 8px; border-top: 1px solid var(--line); vertical-align: top; }
.tc-view tr:first-child td { border-top: 0; }
.tc-view td small { display: block; color: var(--dim); }
.tc-view td em { display: block; font-style: normal; font-size: 13px; color: var(--ink2); }
.tc-view .tc-num { width: 24px; font: 700 12px var(--mono); color: var(--dim); padding-top: 9px; }
.tc-view .tc-res { width: 1%; white-space: nowrap; text-align: right; }
.tc-view tr.tc-fail td { background: color-mix(in srgb, var(--red-soft) 55%, transparent); }

.mini-time { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--dim); white-space: nowrap; }
.mini-time input { padding: 6px 8px; font-size: 14px; width: 110px; }
.calc-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; }
.calc-out { font-size: 14px; color: var(--ink2); padding: 6px 12px; border-radius: 10px; background: var(--gray-soft); }
.calc-out b { color: var(--ink); font-size: 15px; }
.calc-out.bad { color: var(--red); background: var(--red-soft); }
.span-line { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--ink2); margin: 4px 0 10px; }
.span-line .ic { width: 15px; height: 15px; }
.day-span { font-size: 13px; color: var(--dim); font-weight: 500; }
.day-span b { color: var(--ink2); }
@media (max-width: 900px) {
  .grid-4 { grid-template-columns: 1fr 1fr; }
  .tc-row { grid-template-columns: 26px 1fr 34px; }
  .tc-row > input[name$="_expected[]"], .tc-row > select, .tc-row > input[name$="_note[]"] { grid-column: 2 / 3; }
  .rt-row { grid-template-columns: 26px 1fr; }
  .rt-row > select, .rt-row > input { grid-column: 2; }
}
@media (max-width: 600px) { .grid-4 { grid-template-columns: 1fr; } }
.std-guides { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
.std-guide { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line);
  border-left: 4px solid var(--c); background: var(--panel); color: var(--ink) !important; font-weight: 600; transition: border-color .15s, transform .15s; }
.std-guide:hover, .std-guide:focus-visible { border-color: var(--c); transform: translateY(-1px); }
.std-guide small { font-weight: 400; color: var(--dim); white-space: nowrap; }
.cat-row .cat-guide { flex: 1.6; font-size: 14px; }
.cat-row > a.small { display: inline-flex; align-items: center; gap: 4px; white-space: nowrap; }
.cat-row > a.small .ic { width: 14px; height: 14px; }
@media (max-width: 760px) { .cat-row { flex-wrap: wrap; } .cat-row .cat-guide { flex-basis: 100%; } }
.proj-guides { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 13.5px; margin-top: 6px; }
.proj-guides a { display: inline-flex; align-items: center; gap: 4px; font-weight: 600; }
.proj-guides .ic { width: 15px; height: 15px; }
/* on the orange (or photo) project hero: white text and white pills, never orange-on-orange */
.phero .proj-guides .muted { color: rgba(255, 255, 255, .9); }
.phero .proj-guides a { color: #fff; background: rgba(255, 255, 255, .16); border: 1px solid rgba(255, 255, 255, .45);
  padding: 3px 11px; border-radius: 999px; text-decoration: none; }
.phero .proj-guides a:hover { background: rgba(255, 255, 255, .3); }
.tc-group { display: grid; grid-template-columns: 150px 1fr; gap: 8px; align-items: start; padding: 6px 0; }
.tc-group + .tc-group { border-top: 1px dashed var(--line); }
.tc-group-name { font-size: 13px; font-weight: 700; color: var(--ink2); padding-top: 4px; }
@media (max-width: 760px) { .tc-group { grid-template-columns: 1fr; gap: 4px; } }

/* ── v1.3: plain navigation — "+ สร้าง" chooser and the avatar menu ─────────── */
.menu-wrap { position: relative; }
.menu-wrap > summary { list-style: none; cursor: pointer; }
.menu-wrap > summary::-webkit-details-marker { display: none; }
.menu-wrap > summary:focus-visible { outline: 3px solid var(--brand-soft); outline-offset: 2px; }
.me-menu > summary { display: block; border-radius: 50%; }
.menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 80; min-width: 250px; padding: 8px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line); box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 2px; }
.menu > a, .menu form button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; color: var(--ink) !important;
  font: 500 15px var(--font); text-decoration: none !important; background: none; border: 0; width: 100%; text-align: left; cursor: pointer; }
.menu > a .ic, .menu form button .ic { width: 18px; height: 18px; color: var(--dim); }
.menu > a:hover, .menu > a:focus-visible, .menu form button:hover, .menu form button:focus-visible { background: var(--brand-soft); outline: none; }
.menu form { margin: 4px 0 0; padding-top: 4px; border-top: 1px solid var(--line); }
.mm-head { display: flex; flex-direction: column; padding: 8px 12px 10px; margin-bottom: 4px; border-bottom: 1px solid var(--line); }
.mm-head b { font-size: 15.5px; }
.mm-head small { color: var(--dim); font-size: 12.5px; line-height: 1.4; }
.create-menu { width: min(400px, calc(100vw - 32px)); padding: 10px; gap: 6px; }
.cm-item { display: flex !important; align-items: flex-start !important; gap: 14px !important; padding: 14px !important; border: 1px solid var(--line); border-radius: 14px !important; }
.cm-item b { display: block; font-size: 16.5px; margin-bottom: 2px; }
.cm-item small { display: block; color: var(--dim); font-size: 13.5px; line-height: 1.45; font-weight: 400; }
.cm-item:hover, .cm-item:focus-visible { border-color: var(--brand); }
.cm-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--brand2), var(--brand)); }
.cm-icon .ic { width: 22px !important; height: 22px !important; color: #fff !important; }
.cm-icon-alt { background: linear-gradient(140deg, #5b9cf5, var(--blue)); }
.cm-note { display: flex; align-items: center; gap: 6px; margin: 2px 4px 0; font-size: 13px; color: var(--dim); }
.cm-note .ic { width: 15px; height: 15px; }
@media (max-width: 600px) {
  .menu { position: fixed; left: 16px; right: 16px; top: 64px; width: auto; min-width: 0; }
}

/* home: plain first screen */
.home-hero { margin-bottom: 18px; }
.home-hero .hero-text { width: 100%; }
.home-hero .eyebrow a { font-weight: 600; }
.home-search { display: flex; align-items: center; gap: 10px; max-width: 640px; padding: 6px 6px 6px 16px; border-radius: 16px;
  background: var(--panel); border: 1px solid var(--line2); box-shadow: var(--shadow); }
.home-search input { border: 0 !important; background: none !important; box-shadow: none !important; padding: 8px 0 !important; }
.home-search .sb-icon .ic { width: 20px; height: 20px; color: var(--dim); }
.home-search:focus-within { border-color: var(--brand); box-shadow: 0 0 0 4px var(--brand-soft); }
.howto { padding: 20px 22px; margin-bottom: 22px; border: 1px solid color-mix(in srgb, var(--brand) 35%, var(--line)); }
.guide-hidden .howto { display: none; }
.howto-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.howto-head h2 { display: flex; align-items: center; gap: 9px; margin: 0; font-size: 19px; }
.howto-head h2 .ic { color: var(--brand); }
.howto-you { list-style: none; margin: 14px 0 6px; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.howto-you li { display: flex; align-items: flex-start; gap: 10px; font-size: 15px; color: var(--ink2); }
.howto-you .ic { width: 19px; height: 19px; flex: none; margin-top: 3px; color: var(--brand); }
.howto-you b { color: var(--ink); }
.explain { display: flex; align-items: stretch; gap: 10px; }
.explain.card { padding: 14px; margin-bottom: 18px; }
.ex-step { flex: 1; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; padding: 12px 14px; border-radius: 14px;
  background: var(--panel2); border: 1px solid var(--line); min-width: 0; }
.ex-step > span { grid-row: span 2; width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 15px;
  background: var(--gray-soft); color: var(--ink2); }
.ex-step b { font-size: 16px; }
.ex-step small { color: var(--dim); font-size: 13px; line-height: 1.4; }
.ex-on { background: var(--brand-soft); border-color: color-mix(in srgb, var(--brand) 45%, transparent); }
.ex-on > span { background: var(--brand); color: #fff; }
.ex-arrow { display: grid; place-items: center; color: var(--dim); }
.ex-arrow .ic { width: 18px; height: 18px; }
.count-pill { font-style: normal; font-size: 14px; font-weight: 700; padding: 1px 10px; border-radius: 99px; background: var(--brand); color: #fff; }
.qc-do { align-self: flex-start; display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; padding: 6px 12px; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 14px; }
.qc-do .ic { width: 16px; height: 16px; }
.empty-inline { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-radius: 14px; border: 1px dashed var(--line2); color: var(--dim); background: var(--panel2); }
.empty-inline .ic { width: 20px; height: 20px; color: var(--green); }
.empty-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.stats-4 { grid-template-columns: repeat(4, 1fr); margin-bottom: 8px; }
.sh-sub { margin: 4px 0 0; }
.feed-compact { gap: 8px; }
.feed-compact li { font-size: 14px; }
.feed-compact p { margin: 0; }
.head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; }
.phero-actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.next-step { display: flex; align-items: center; gap: 16px; padding: 18px 20px; margin: 0 0 18px; border: 1px solid color-mix(in srgb, var(--green) 45%, var(--line)); background: var(--green-soft); }
.next-step > div { flex: 1; }
.next-step p { margin: 2px 0 0; }
.ns-icon { width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--green); color: #fff; flex: none; }
.ns-icon .ic { width: 22px; height: 22px; }
.more-roles { margin-top: 12px; }
.more-roles > summary { cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--brand-deep); padding: 6px 0; }
.more-roles > summary .ic { width: 16px; height: 16px; }
.more-roles[open] > summary { margin-bottom: 8px; }
@media (max-width: 900px) {
  .explain { flex-direction: column; }
  .ex-arrow { transform: rotate(90deg); height: 14px; }
  .stats-4 { grid-template-columns: 1fr 1fr; }
}
/* compact number row on the home page: icon · number · label on one line */
.stats-4 .stat { display: grid; grid-template-columns: auto auto 1fr; align-items: center; column-gap: 12px; padding: 12px 16px; }
.stats-4 .stat::after { display: none; }
.stats-4 .stat-icon { width: 34px; height: 34px; margin: 0; border-radius: 10px; }
.stats-4 .stat-icon .ic { width: 18px; height: 18px; }
.stats-4 .stat-num { font-size: 26px; }
.stats-4 .stat-label { font-size: 14px; line-height: 1.3; }
.phero .phero-actions .btn-primary { background: #fff; color: var(--brand-deep); box-shadow: 0 8px 20px -10px rgba(0, 0, 0, .45); }
.phero .phero-actions .btn-primary .ic { color: var(--brand); }
.phero .phero-actions .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, .6); background: rgba(255, 255, 255, .12); }
.section-head h2 em { font-style: normal; }
@media (max-width: 900px) { .topbar > .me { margin-left: auto; } }

/* ── v1.4: one office — wiki, Git and ClickUp from here ──────────────────────── */
.hub-links { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 12px; }
.hub-link { display: inline-flex; align-items: center; gap: 7px; padding: 7px 14px; border-radius: 12px; background: var(--panel); border: 1px solid var(--line2);
  color: var(--ink) !important; font-weight: 600; font-size: 14.5px; text-decoration: none !important; transition: border-color .15s, transform .15s; }
.hub-link .ic { width: 17px; height: 17px; color: var(--brand); }
.hub-link:hover, .hub-link:focus-visible { border-color: var(--brand); transform: translateY(-1px); }
.office-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 12px; margin: 10px 0 14px; }
.office-item { display: flex; flex-direction: column; gap: 6px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--panel2); }
.office-item b { display: flex; align-items: center; gap: 7px; font-size: 15.5px; }
.office-item b .ic { width: 18px; height: 18px; color: var(--brand); }
.office-item .inline-form { margin-top: 4px; }
.office-sync { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.git-people { list-style: none; margin: 8px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.git-people li { display: flex; align-items: flex-start; gap: 8px; font-size: 14px; }
.git-people .check { padding: 2px; }
.git-people small { display: block; }
.cu-import { display: flex; align-items: flex-end; gap: 12px; padding: 14px 16px; margin-bottom: 16px; }
.cu-import .field { flex: 1; margin: 0; }
.cu-icon { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand); flex: none; align-self: center; }
.cu-icon .ic { width: 20px; height: 20px; }
.cu-pull { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 6px 0; }
@media (max-width: 600px) { .cu-import { flex-wrap: wrap; } .cu-icon { display: none; } }
/* account problems: the person's own box, the admin list, the dot on the avatar */
.acct-issues { padding: 16px 20px; margin-bottom: 18px; border: 1px solid color-mix(in srgb, var(--blue) 35%, var(--line)); background: var(--blue-soft); }
.acct-issues.is-warn { border-color: color-mix(in srgb, var(--yellow) 55%, var(--line)); background: var(--yellow-soft); }
.acct-issues h3 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 16.5px; }
.acct-issues h3 .ic { width: 19px; height: 19px; color: var(--yellow); }
.acct-issues ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.acct-issues li { display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 14.5px; }
.acct-issues li.ai-warn span { font-weight: 600; }
.me-chip { position: relative; }
.me-dot { position: absolute; right: -1px; top: -1px; width: 12px; height: 12px; border-radius: 50%; background: var(--blue); box-shadow: 0 0 0 2px var(--bg); }
.me-dot.warn { background: var(--red); }
.mm-badge { font-style: normal; font-size: 11.5px; font-weight: 700; padding: 1px 7px; border-radius: 99px; background: var(--red-soft); color: var(--red); margin-left: 4px; }
.admin-nudge { display: flex; align-items: center; gap: 12px; padding: 12px 16px; margin-bottom: 18px; border-radius: 14px; border: 1px solid color-mix(in srgb, var(--yellow) 50%, var(--line));
  background: var(--yellow-soft); color: var(--ink) !important; text-decoration: none !important; }
.admin-nudge > span { flex: 1; font-size: 14.5px; }
.admin-nudge .ic { width: 19px; height: 19px; flex: none; }
.acct-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 14px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.acct-row ul { margin: 0; padding-left: 18px; font-size: 14px; }
.acct-row li.ai-warn { color: #a86f00; font-weight: 600; }
.acct-fix input { max-width: 200px; padding: 7px 10px; font-size: 14px; }
.git-loose { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; }
.git-suggest { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin: 8px 0; padding: 10px 12px; border-radius: 12px; background: var(--brand-soft); }
.git-howto { margin: 8px 0; }
.git-howto summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand-deep); }
.join-git summary { cursor: pointer; font-weight: 600; font-size: 14px; color: var(--brand-deep); }
.join-git small { display: block; color: var(--dim); }
@media (max-width: 900px) { .acct-row { grid-template-columns: 1fr; } .acct-issues li { flex-wrap: wrap; } }
