/* Auto-TCM — design system. Apple-inspired: quiet colour, big type, generous space, soft depth. */
:root {
  --bg: #000; --surface: #1c1c1e; --surface-2: #232326; --fill: rgba(120,120,128,.28); --fill-2: rgba(120,120,128,.18);
  --ink: #f5f5f7; --ink-2: #a1a1a6; --ink-3: #6e6e73; --line: rgba(255,255,255,.10); --line-2: rgba(255,255,255,.18);
  --blue: #0a84ff; --blue-ink: #fff; --blue-soft: rgba(10,132,255,.18); --blue-hover: #409cff;
  --green: #30d158; --green-soft: rgba(48,209,88,.18); --orange: #ffb340; --orange-soft: rgba(255,159,10,.20); --red: #ff6961; --red-soft: rgba(255,69,58,.20);
  --t-ADEPT: #2f7de1; --t-ABILITY: #17a2b8; --t-SJQ: #e8920c; --t-CS: #4f9a2e; --t-RP: #8f5bd6; --t-BEI: #d6456b;
  --purple: #bf7bff; --teal: #5ac8e0; --psy: #0a84ff; --beh: #bf7bff; --sur: #5ac8e0;
  --shadow-1: none; --shadow-2: 0 8px 30px rgba(0,0,0,.6);
  --r-card: 20px; --r-ctl: 12px; --r-pill: 999px;
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Inter", "Segoe UI", system-ui, sans-serif;
  --ease: cubic-bezier(.25,.8,.25,1);
  color-scheme: dark;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 15px/1.47 var(--font); letter-spacing: -.008em; -webkit-font-smoothing: antialiased; }
h1, h2, h3, p { margin: 0; }
button, input, select, textarea { font: inherit; letter-spacing: inherit; color: inherit; }
[hidden] { display: none !important; }
:focus-visible { outline: 3px solid var(--blue-soft); outline-offset: 1px; box-shadow: 0 0 0 1px var(--blue); border-radius: 8px; }
::selection { background: var(--blue-soft); }

/* ---------- header ---------- */
.nav { position: sticky; top: 0; z-index: 30; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 16px; padding: 10px 24px;
  background: color-mix(in srgb, var(--bg) 72%, transparent); backdrop-filter: saturate(180%) blur(22px); -webkit-backdrop-filter: saturate(180%) blur(22px); border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 17px; letter-spacing: -.02em; }
.brand i { width: 24px; height: 24px; border-radius: 7px; background: linear-gradient(145deg, #3aa0ff, #0a5fd6); display: grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255,255,255,.25); }
.steps { display: flex; gap: 2px; padding: 3px; background: var(--fill-2); border-radius: var(--r-pill); }
.step { appearance: none; border: 0; background: transparent; padding: 6px 14px; border-radius: var(--r-pill); font-size: 13px; font-weight: 500; color: var(--ink-2); cursor: pointer; display: flex; align-items: center; gap: 7px; transition: background .2s var(--ease), color .2s; white-space: nowrap; }
.step:hover:not(:disabled) { color: var(--ink); }
.step:disabled { opacity: .38; cursor: default; }
.step.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12), 0 0 0 .5px var(--line); }
.step .n { width: 18px; height: 18px; border-radius: 50%; background: var(--fill); font-size: 11px; display: grid; place-items: center; font-weight: 600; }
.step.done .n { background: var(--green); color: #fff; } .step.on .n { background: var(--blue); color: #fff; }
.nav-r { display: flex; justify-content: flex-end; gap: 6px; }
.icon-btn { appearance: none; border: 0; background: transparent; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--ink-2); cursor: pointer; transition: background .15s; }
.icon-btn:hover { background: var(--fill-2); color: var(--ink); }

/* ---------- page ---------- */
main { max-width: 1040px; margin: 0 auto; padding: 44px 24px 120px; }
main.wide { max-width: 1280px; }
.hero { margin-bottom: 30px; }
.hero h1 { font-size: 40px; line-height: 1.08; font-weight: 700; letter-spacing: -.035em; }
.hero p { margin-top: 10px; font-size: 19px; line-height: 1.4; color: var(--ink-2); max-width: 640px; letter-spacing: -.012em; }
.eyebrow { font-size: 13px; font-weight: 600; color: var(--blue); letter-spacing: .01em; margin-bottom: 8px; }
.stack > * + * { margin-top: 20px; }
.card { background: var(--surface); border-radius: var(--r-card); box-shadow: var(--shadow-1); border: .5px solid var(--line); padding: 26px 28px; }
.card-h { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.card-h h2 { font-size: 21px; font-weight: 650; letter-spacing: -.022em; } .card-h p { color: var(--ink-2); font-size: 14px; margin-top: 2px; }
.muted { color: var(--ink-2); } .faint { color: var(--ink-3); } .small { font-size: 13px; } .tiny { font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .grow { flex: 1; } .right { margin-left: auto; }
.grid { display: grid; gap: 16px; } .g2 { grid-template-columns: repeat(2, 1fr); } .g3 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 820px) { .g2, .g3, .g4 { grid-template-columns: 1fr 1fr; } .hero h1 { font-size: 32px; } .nav { grid-template-columns: auto 1fr; } .brand span { display: none; } .nav-r { display: none; } main { padding: 28px 16px 100px; } .card { padding: 20px; } }
@media (max-width: 560px) { .g2, .g3, .g4 { grid-template-columns: 1fr; } .step span.t { display: none; } }

/* ---------- controls ---------- */
.field { display: block; } .field > span { display: block; font-size: 13px; font-weight: 500; color: var(--ink-2); margin-bottom: 6px; }
.input, select.input, textarea.input { width: 100%; padding: 10px 13px; border-radius: var(--r-ctl); border: .5px solid var(--line-2); background: var(--surface-2); outline: none; transition: box-shadow .15s, border-color .15s, background .15s; appearance: none; -webkit-appearance: none; }
select.input { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%238e8e93' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 13px center; padding-right: 34px; }
.input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-soft); background: var(--surface); }
textarea.input { resize: vertical; min-height: 120px; line-height: 1.45; }
.hint { font-size: 12px; color: var(--ink-3); margin-top: 5px; }
.btn { appearance: none; border: 0; border-radius: var(--r-pill); padding: 10px 20px; font-weight: 500; font-size: 15px; cursor: pointer; background: var(--fill-2); color: var(--blue); transition: background .15s, transform .1s, opacity .15s; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.btn:hover { background: var(--fill); } .btn:active { transform: scale(.98); } .btn:disabled { opacity: .4; pointer-events: none; }
.btn.primary { background: var(--blue); color: var(--blue-ink); font-weight: 600; } .btn.primary:hover { background: var(--blue-hover); }
.btn.lg { padding: 13px 26px; font-size: 16px; } .btn.sm { padding: 6px 13px; font-size: 13px; } .btn.quiet { background: transparent; color: var(--ink-2); } .btn.quiet:hover { background: var(--fill-2); color: var(--ink); }
.btn.danger { color: var(--red); }
.seg { display: inline-flex; padding: 3px; background: var(--fill-2); border-radius: 11px; gap: 2px; max-width: 100%; flex-wrap: wrap; }
.seg button { appearance: none; border: 0; background: transparent; padding: 7px 14px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--ink-2); cursor: pointer; transition: all .18s var(--ease); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.14), 0 0 0 .5px var(--line); }
.switch { position: relative; width: 42px; height: 26px; flex: none; }
.switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 13px; background: var(--fill); transition: background .2s var(--ease); }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 4px rgba(0,0,0,.25); transition: transform .22s var(--ease); }
.switch input:checked + i { background: var(--green); } .switch input:checked + i::after { transform: translateX(16px); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--r-pill); font-size: 12px; font-weight: 600; background: var(--fill-2); color: var(--ink-2); white-space: nowrap; }
.pill.blue { background: var(--blue-soft); color: var(--blue); } .pill.green { background: var(--green-soft); color: var(--green); } .pill.orange { background: var(--orange-soft); color: var(--orange); } .pill.red { background: var(--red-soft); color: var(--red); }
.pill.purple { background: color-mix(in srgb, var(--purple) 16%, transparent); color: var(--purple); }

/* ---------- tool tiles ---------- */
.tools { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 12px; }
.tile { border: .5px solid var(--line-2); border-radius: 16px; padding: 14px 16px; background: var(--surface-2); cursor: pointer; transition: all .2s var(--ease); display: grid; gap: 8px; position: relative; }
.tile:hover { border-color: var(--blue); }
.tile.on { background: var(--surface); border-color: var(--blue); box-shadow: 0 0 0 1px var(--blue), var(--shadow-1); }
.tile .top { display: flex; align-items: center; gap: 12px; } .tile b { font-weight: 600; display: block; } .tile .sub { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.tile .dotk { width: 10px; height: 10px; border-radius: 50%; flex: none; background: var(--tc); } .k-psy { background: var(--psy); } .k-beh { background: var(--beh); } .k-sur { background: var(--sur); }
.tile .mins { display: none; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-2); flex-wrap: wrap; } .tile.on .mins { display: flex; }
.mini { width: 66px; padding: 5px 8px; border-radius: 9px; border: .5px solid var(--line-2); background: var(--surface-2); text-align: center; outline: none; }
.mini:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.presets { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* ---------- competencies ---------- */
.drop { border: 1.5px dashed var(--line-2); border-radius: 18px; padding: 28px; text-align: center; color: var(--ink-2); transition: all .2s var(--ease); background: var(--surface-2); }
.drop.over { border-color: var(--blue); background: var(--blue-soft); color: var(--blue); }
.drop b { display: block; font-size: 17px; color: var(--ink); font-weight: 600; margin-bottom: 4px; }
.ctable { width: 100%; border-collapse: separate; border-spacing: 0; }
.ctable th { text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 0 10px 8px; letter-spacing: .02em; text-transform: uppercase; }
.ctable td { padding: 6px 4px; vertical-align: top; border-top: .5px solid var(--line); }
.ctable .input { padding: 8px 10px; background: transparent; border-color: transparent; border-radius: 10px; } .ctable .input:hover { background: var(--fill-2); } .ctable .input:focus { background: var(--surface); border-color: var(--blue); }
.ctable textarea.input { min-height: 0; height: 74px; font-size: 14px; }
.x { appearance: none; border: 0; background: transparent; color: var(--ink-3); width: 28px; height: 28px; border-radius: 50%; cursor: pointer; margin-top: 6px; } .x:hover { background: var(--red-soft); color: var(--red); }

/* ---------- mapping review ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin-bottom: 22px; }
.kpi { background: var(--surface); border-radius: 18px; padding: 16px 18px; border: .5px solid var(--line); box-shadow: var(--shadow-1); }
.kpi .v { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.15; } .kpi .l { font-size: 13px; color: var(--ink-2); margin-top: 2px; }
.meter { height: 6px; border-radius: 6px; background: var(--fill); overflow: hidden; display: flex; margin-top: 10px; } .meter i { display: block; height: 100%; transition: width .5s var(--ease); }
.mcard { background: var(--surface); border-radius: var(--r-card); border: .5px solid var(--line); box-shadow: var(--shadow-1); padding: 22px 26px; margin-bottom: 16px; }
.mcard h3 { font-size: 19px; font-weight: 650; letter-spacing: -.02em; }
.beh { display: grid; grid-template-columns: 26px 1fr minmax(210px, 34%); gap: 6px 14px; padding: 12px 0; border-top: .5px solid var(--line); align-items: start; }
.beh:first-of-type { border-top: 0; }
.beh .num { width: 22px; height: 22px; border-radius: 50%; background: var(--fill-2); font-size: 12px; font-weight: 600; display: grid; place-items: center; color: var(--ink-2); margin-top: 1px; }
.beh .txt { font-size: 14.5px; line-height: 1.45; } .beh .txt small { display: block; color: var(--ink-3); font-size: 12.5px; margin-top: 3px; }
.beh .pick { display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.en { appearance: none; border: 0; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 5px 12px; border-radius: var(--r-pill); font-size: 13.5px; font-weight: 600; background: var(--blue-soft); color: var(--blue); transition: all .15s; text-align: left; }
.en:hover { filter: brightness(.96); }
.en.ghost { background: transparent; border: 1px dashed var(--line-2); color: var(--ink-2); font-weight: 500; font-size: 12.5px; padding: 3px 10px; } .en.ghost:hover { border-color: var(--blue); color: var(--blue); }
.en.supp { background: var(--orange-soft); color: var(--orange); }
.en.off { background: var(--fill-2); color: var(--ink-3); text-decoration: line-through; }
.en .chk { font-size: 11px; } .en.hit { box-shadow: inset 0 0 0 1.5px var(--green); } .en.miss { box-shadow: inset 0 0 0 1.5px var(--red-soft); }
.why { font-size: 12.5px; color: var(--ink-2); line-height: 1.35; }
.sel-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 14px; padding-top: 14px; border-top: .5px solid var(--line); }
.sel-row .lab { font-size: 12px; font-weight: 600; color: var(--ink-3); text-transform: uppercase; letter-spacing: .04em; margin-right: 2px; }
.addbox { position: relative; } .addbox input { width: 190px; padding: 5px 12px; font-size: 13px; border-radius: var(--r-pill); }
.menu { position: absolute; z-index: 20; top: calc(100% + 6px); left: 0; width: 340px; max-height: 280px; overflow: auto; background: var(--surface); border-radius: 14px; box-shadow: var(--shadow-2); border: .5px solid var(--line); padding: 6px; }
.menu button { display: block; width: 100%; text-align: left; border: 0; background: transparent; padding: 8px 10px; border-radius: 9px; cursor: pointer; } .menu button:hover, .menu button.act { background: var(--blue-soft); }
.menu b { font-weight: 600; font-size: 14px; } .menu small { display: block; color: var(--ink-2); font-size: 12px; line-height: 1.3; }
.working { display: grid; place-items: center; text-align: center; padding: 70px 20px; }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--fill); border-top-color: var(--blue); animation: spin .8s linear infinite; margin: 0 auto 18px; } @keyframes spin { to { transform: rotate(360deg); } }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 14px 18px; border-radius: 16px; background: var(--orange-soft); color: var(--orange); font-size: 14px; margin-bottom: 16px; } .banner.blue { background: var(--blue-soft); color: var(--blue); } .banner.green { background: var(--green-soft); color: var(--green); } .banner.red { background: var(--red-soft); color: var(--red); }
.banner b { font-weight: 650; }
@media (max-width: 760px) { .beh { grid-template-columns: 26px 1fr; } .beh .pick { grid-column: 2; } }

/* ---------- TCM grid ---------- */
.gridwrap { background: var(--surface); border-radius: var(--r-card); border: .5px solid var(--line); box-shadow: var(--shadow-1); overflow: auto; }
.tcm { width: 100%; table-layout: fixed; border-collapse: separate; border-spacing: 0; }
.tcm th { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface) 88%, transparent); backdrop-filter: blur(12px); text-align: left; font-size: 12px; font-weight: 600; color: var(--ink-3); padding: 12px 14px; border-bottom: .5px solid var(--line-2); letter-spacing: .02em; text-transform: uppercase; }
.tcm td { padding: 14px; border-bottom: .5px solid var(--line); vertical-align: top; font-size: 14px; }
.tcm tr:last-child td { border-bottom: 0; }
.tcm td.cl { font-weight: 600; color: var(--ink-2); background: var(--surface-2); font-size: 13px; border-right: .5px solid var(--line); }
.tcm td.nm { font-weight: 600; } .tcm ul { margin: 0; padding: 0; list-style: none; } .tcm li { margin: 2px 0; font-size: 13.5px; }
.tcm th.tl, .tcm td.tl { text-align: center; padding: 8px; }
.cell { appearance: none; border: 0; width: 100%; min-height: 44px; border-radius: 12px; cursor: pointer; background: transparent; color: var(--ink-3); font-size: 18px; display: grid; place-items: center; align-content: center; padding: 4px; transition: all .15s var(--ease); }
.cell:hover { background: var(--fill-2); }
.cell.on { color: #fff; font-size: 13px; font-weight: 650; } .cell.on.psy { background: var(--psy); } .cell.on.beh { background: var(--beh); } .cell.on.sur { background: var(--sur); }
.cell small { display: block; font-size: 10.5px; font-weight: 500; opacity: .92; line-height: 1.2; margin-top: 2px; } .cell.lock { box-shadow: inset 0 0 0 2px rgba(255,255,255,.55); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 13px; color: var(--ink-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; }
.tbl { width: 100%; border-collapse: collapse; } .tbl th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .03em; color: var(--ink-3); font-weight: 600; padding: 0 10px 8px; } .tbl td { padding: 11px 10px; border-top: .5px solid var(--line); font-size: 14px; } .tbl td.n { font-variant-numeric: tabular-nums; text-align: right; } .tbl th.n { text-align: right; }

/* ---------- dialog ---------- */
dialog { border: 0; border-radius: 22px; padding: 0; width: min(560px, calc(100vw - 32px)); background: var(--surface); color: var(--ink); box-shadow: var(--shadow-2); }
dialog::backdrop { background: rgba(0,0,0,.36); backdrop-filter: blur(6px); }
dialog .dh { padding: 24px 26px 6px; } dialog .dh h2 { font-size: 22px; font-weight: 650; letter-spacing: -.02em; } dialog .db { padding: 14px 26px 6px; } dialog .df { padding: 18px 26px 24px; display: flex; gap: 10px; justify-content: flex-end; }
dialog.wide { width: min(780px, calc(100vw - 32px)); }
.code { font: 12px/1.45 ui-monospace, "SF Mono", Menlo, monospace; background: var(--surface-2); border: .5px solid var(--line-2); border-radius: 12px; padding: 12px; max-height: 190px; overflow: auto; white-space: pre-wrap; word-break: break-word; color: var(--ink-2); }
.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); background: rgba(30,30,32,.92); color: #fff; padding: 11px 20px; border-radius: var(--r-pill); font-size: 14px; opacity: 0; pointer-events: none; transition: all .3s var(--ease); z-index: 100; backdrop-filter: blur(10px); }
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.foot { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; justify-content: center; padding: 14px 24px calc(14px + env(safe-area-inset-bottom)); background: color-mix(in srgb, var(--bg) 78%, transparent); backdrop-filter: saturate(180%) blur(22px); border-top: .5px solid var(--line); }
.foot .in { width: 100%; max-width: 1040px; display: flex; align-items: center; gap: 12px; } .foot.wide .in { max-width: 1280px; }
@media (prefers-reduced-motion: reduce) { * { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (max-width: 560px) { .foot { padding: 10px 12px calc(10px + env(safe-area-inset-bottom)); } .foot .in { gap: 8px; } .foot .btn { padding: 9px 14px; font-size: 14px; } .foot .btn.lg { padding: 10px 16px; font-size: 15px; } .foot .muted { display: none; } .hero p { font-size: 17px; } .kpi .v { font-size: 26px; } }

/* ---------- enabler tooltip (instant, frosted) ---------- */
.tip { position: fixed; z-index: 200; max-width: 340px; padding: 13px 15px 11px; border-radius: 16px; pointer-events: none; opacity: 0; transform: translateY(4px) scale(.98); transition: opacity .09s ease-out, transform .09s ease-out;
  background: color-mix(in srgb, var(--surface) 78%, transparent); backdrop-filter: saturate(180%) blur(24px); -webkit-backdrop-filter: saturate(180%) blur(24px);
  border: .5px solid var(--line-2); box-shadow: 0 12px 40px rgba(0,0,0,.18), 0 2px 8px rgba(0,0,0,.08); }
.tip.on { opacity: 1; transform: none; }
.tip b { display: block; font-size: 14px; font-weight: 650; letter-spacing: -.01em; }
.tip .cat { display: block; font-size: 11.5px; color: var(--ink-3); margin: 1px 0 6px; }
.tip p { font-size: 13px; line-height: 1.42; color: var(--ink); } .tip em { display: block; margin-top: 8px; font-style: normal; font-size: 11px; color: var(--ink-3); }
[data-eid] { cursor: pointer; }

/* ---------- mapping review v2 ---------- */
.beh-text { font-size: 13.5px; color: var(--ink-2); line-height: 1.5; margin: 2px 0 14px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.sec { display: grid; grid-template-columns: 78px 1fr; gap: 10px; align-items: start; padding: 9px 0; border-top: .5px solid var(--line); }
.sec .lab { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-3); padding-top: 7px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.en.pri { background: var(--blue); color: #fff; padding: 7px 15px; font-size: 14px; box-shadow: 0 1px 2px rgba(0,0,0,.12); }
.en.pri:hover { background: var(--blue-hover); filter: none; }
.en.sug { background: var(--fill-2); color: var(--ink-2); font-weight: 500; padding: 6px 13px; font-size: 13.5px; } .en.sug:hover { background: var(--blue-soft); color: var(--blue); filter: none; }
.en.pri.hit { box-shadow: 0 0 0 2.5px var(--green); } .en.pri.miss { opacity: .72; }
.how { margin-top: 6px; border-top: .5px solid var(--line); padding-top: 10px; } .how summary { cursor: pointer; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.how .el { display: grid; grid-template-columns: 14px 1fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: 13px; }
.how .et { color: var(--ink-2); } .how .ea { font-weight: 600; color: var(--blue); }
.w { width: 8px; height: 8px; border-radius: 50%; background: var(--ink-3); } .w.w3 { background: var(--blue); } .w.w2 { background: color-mix(in srgb, var(--blue) 50%, var(--ink-3)); }
.addbox input { width: 170px; }

/* ---------- Excel-style TCM grid ---------- */
.xl { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.xl th, .xl td { border: .5px solid var(--line-2); padding: 9px 11px; vertical-align: top; background: var(--surface); }
.xl thead th { position: sticky; top: 0; z-index: 2; background: color-mix(in srgb, var(--surface-2) 92%, var(--ink) 4%); font-size: 12px; font-weight: 700; text-align: center; letter-spacing: .02em; }
.xl thead tr:first-child th { background: var(--ink); color: var(--surface); border-color: var(--ink); letter-spacing: .06em; }
.xl td.xc { font-weight: 650; background: var(--surface-2); width: 130px; } .xl td.xn { font-weight: 650; width: 190px; }
.xl td.xb { width: 38%; min-width: 280px; color: var(--ink-2); font-size: 12.5px; line-height: 1.5; } .xl td.xb div { white-space: pre-line; display: -webkit-box; -webkit-line-clamp: 7; -webkit-box-orient: vertical; overflow: hidden; }
.xl td.xe { font-weight: 500; min-width: 190px; } .xl td.xe span[data-eid]:hover { color: var(--blue); }
.xl th.xtl, .xl td.xt { width: 64px; min-width: 64px; text-align: center; }
.xl td.xt { cursor: pointer; transition: background .12s; } .xl td.xt:hover { background: var(--fill); }
.xl td.xt.on { background: var(--tc, #5b9b3a); } .xl td.xt.on:hover { filter: brightness(1.1); }
.xl td.xt .tn { display: block; font-size: 10.5px; font-weight: 650; line-height: 1.25; color: #fff; word-break: break-word; }
.xl th.xtl { border-bottom: 3px solid var(--tc, transparent); }
.legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 10px 2px 0; font-size: 12px; color: var(--ink-2); } .legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.abl { display: grid; grid-template-columns: minmax(150px, 1fr) 2fr; gap: 8px 16px; font-size: 13px; } .abl .alt { color: var(--ink-3); font-size: 12px; } .abl b { font-weight: 600; }
.gridwrap { overflow: auto; }
@media (max-width: 560px) { .sec { grid-template-columns: 1fr; gap: 4px; } .sec .lab { padding-top: 0; } }

/* ---------- brand ---------- */
.brand .aon { height: 21px; width: auto; display: block; } .brand .sep { width: 1px; height: 18px; background: var(--line-2); margin: 0 3px; } .brand .bn { font-weight: 600; font-size: 16px; letter-spacing: -.02em; color: var(--ink-2); }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- sign in ---------- */
.login { display: grid; grid-template-columns: minmax(380px, 46fr) 54fr; min-height: 100vh; min-height: 100dvh; background: var(--surface); }
.login-l { position: relative; display: flex; flex-direction: column; padding: 28px 40px; }
.login-logo { height: 30px; width: auto; align-self: flex-start; }
.login-form { margin: auto; width: 100%; max-width: 340px; padding: 24px 0 56px; }
.login-form h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; text-align: center; }
.login-form > p { text-align: center; color: var(--ink-2); font-size: 15px; margin: 8px 0 26px; }
.login-form .field { margin-bottom: 12px; }
.login-form .input { height: 46px; border-radius: 12px; padding: 0 14px; font-size: 15px; background: var(--surface); border-color: var(--line-2); }
.login-form .input:focus { box-shadow: 0 0 0 4px var(--blue-soft); border-color: var(--ink); }
.login-btn { width: 100%; height: 46px; margin-top: 6px; border: 0; border-radius: 12px; background: var(--ink); color: var(--surface); font-size: 15px; font-weight: 600; cursor: pointer; transition: transform .1s, opacity .15s; }
.login-btn:hover { opacity: .88; } .login-btn:active { transform: scale(.985); } .login-btn:disabled { opacity: .55; cursor: default; }
.login-err { min-height: 20px; font-size: 13.5px; color: var(--red); text-align: center; margin: 2px 0 4px; }
.login-foot { display: block; text-align: center; margin-top: 22px; color: var(--ink-3); font-size: 12px; }
.login-form.shake { animation: shake .38s cubic-bezier(.36,.07,.19,.97); } @keyframes shake { 10%,90% { transform: translateX(-1px); } 20%,80% { transform: translateX(3px); } 30%,50%,70% { transform: translateX(-5px); } 40%,60% { transform: translateX(5px); } }
.login-r { padding: 12px 12px 12px 0; display: flex; } @media (max-width: 860px) { .login { grid-template-columns: 1fr; } .login-r { display: none; } .login-l { padding: 22px 24px; } }
.login-img { position: relative; margin: 0; flex: 1; border-radius: 26px; overflow: hidden; background: #0c1322; box-shadow: 0 0 0 .5px var(--line-2); }
.login-img img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 52% 72%; display: block; }
.login-img figcaption { position: absolute; left: 18px; bottom: 14px; font-size: 11px; letter-spacing: .02em; color: rgba(255,255,255,.7); text-shadow: 0 1px 6px rgba(0,0,0,.6); }
.grp { font-size: 13px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 30px 4px 12px; }
.grp:first-of-type { margin-top: 6px; }

/* ================= light theme (Settings > General; dark is the default) ================= */
html[data-theme="light"] { color-scheme: light;
  --bg: #f5f5f7; --surface: #ffffff; --surface-2: #fafafc; --fill: rgba(120,120,128,.12); --fill-2: rgba(120,120,128,.08);
  --ink: #1d1d1f; --ink-2: #6e6e73; --ink-3: #98989d; --line: rgba(0,0,0,.08); --line-2: rgba(0,0,0,.14);
  --blue: #0071e3; --blue-hover: #0077ed; --blue-soft: rgba(0,113,227,.10); --green: #1f9d55; --green-soft: rgba(52,199,89,.14);
  --orange: #c77700; --orange-soft: rgba(255,159,10,.16); --red: #d70015; --red-soft: rgba(255,59,48,.12);
  --purple: #8e44c8; --teal: #1a8ea3; --psy: #0071e3; --beh: #8e44c8; --sur: #1a8ea3; --shadow-1: 0 1px 2px rgba(0,0,0,.04), 0 2px 8px rgba(0,0,0,.04); --shadow-2: 0 8px 30px rgba(0,0,0,.10), 0 1px 3px rgba(0,0,0,.06); }

html[data-theme="light"] .nav .brand .aon { filter: none; }

/* ================= split workspace ================= */
:root { --nav: 58px; --foot: 72px; }
main.split-host { max-width: none; padding: 0; margin: 0; }
.split { --ratio: .44; display: grid; grid-template-columns: calc(var(--ratio) * 100%) 12px minmax(0, 1fr); height: calc(100vh - var(--nav) - var(--foot)); height: calc(100dvh - var(--nav) - var(--foot)); }
.split.dragging { user-select: none; cursor: col-resize; } .split.dragging .sp { pointer-events: none; }
.sp { overflow: auto; min-width: 0; scrollbar-gutter: stable; }
.pane-in { padding: 26px 26px 40px; max-width: 1500px; }
.ph { margin-bottom: 18px; } .ph h1 { font-size: 30px; font-weight: 700; letter-spacing: -.03em; line-height: 1.1; } .ph p { margin-top: 6px; color: var(--ink-2); font-size: 14px; max-width: 560px; }
.sp-d { position: relative; cursor: col-resize; display: grid; place-items: center; touch-action: none; outline: none; }
.sp-d i { width: 4px; height: 56px; border-radius: 4px; background: var(--line-2); transition: background .15s, height .15s; }
.sp-d:hover i, .sp-d:focus-visible i, .split.dragging .sp-d i { background: var(--blue); height: 84px; }
.sp-d::before { content: ""; position: absolute; inset: 0 -6px; }
.stack > .card + .card, .pane-in > .card + .card, .pane-in > section + section { margin-top: 16px; }
.grid .full { grid-column: 1 / -1; }
.kpis.small { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; margin-bottom: 14px; } .kpis.small .kpi { padding: 12px 14px; border-radius: 16px; } .kpis.small .kpi .v { font-size: 24px; }
.foot .in { max-width: none; }
@media (max-width: 980px) { .split { display: block; height: auto; } .sp { overflow: visible; } .sp-d { display: none; } .pane-in { padding: 20px 16px; } .foot { position: sticky; } }

/* ================= client search ================= */
.co { position: relative; display: inline-grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 9px; background: var(--fill); overflow: hidden; box-shadow: inset 0 0 0 .5px var(--line-2); }
.co b { font-size: 12px; font-weight: 700; color: var(--ink-2); } .co img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; background: #fff; padding: 4px; } .co.big { width: 56px; height: 56px; border-radius: 14px; }
.clientchip { display: flex; align-items: center; gap: 12px; padding: 8px 12px; border: .5px solid var(--line-2); border-radius: var(--r-ctl); background: var(--surface-2); } .clientchip b { display: block; font-weight: 600; } .clientchip small { color: var(--ink-3); font-size: 12px; }
.clientbox { width: 100%; } .clientbox .input { width: 100%; padding: 10px 13px; border-radius: var(--r-ctl); font-size: 15px; }
.menu.cm { width: 100%; max-height: 360px; } .menu.cm button { display: flex; align-items: center; gap: 12px; } .menu.cm .grow { min-width: 0; } .menu.cm b, .menu.cm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; } .menu.cm .addrow { border-top: .5px solid var(--line); margin-top: 4px; border-radius: 0 0 9px 9px; }

/* ================= settings ================= */
dialog.xl { width: min(980px, calc(100vw - 32px)); height: min(720px, calc(100vh - 48px)); overflow: hidden; }
.set { display: grid; grid-template-columns: 210px 1fr; height: 100%; position: relative; }
.set-nav { background: var(--surface-2); border-right: .5px solid var(--line); padding: 22px 12px; display: flex; flex-direction: column; gap: 3px; } .set-nav h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; padding: 0 10px 12px; }
.set-nav button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border: 0; border-radius: 10px; background: transparent; color: var(--ink-2); font-size: 14px; font-weight: 500; cursor: pointer; text-align: left; } .set-nav button:hover { background: var(--fill-2); color: var(--ink); } .set-nav button.on { background: var(--blue-soft); color: var(--blue); }
.set-body { overflow: auto; padding: 26px 30px 34px; } .set-x { position: absolute; top: 14px; right: 14px; z-index: 2; margin: 0; }
.sh { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 14px; } .grp2 { font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin: 22px 0 4px; }
.srow { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 14px 0; border-top: .5px solid var(--line); } .srow.top { align-items: flex-start; } .srow b { font-weight: 600; } .srow p { color: var(--ink-2); font-size: 13px; margin-top: 2px; max-width: 520px; line-height: 1.4; }
.srow.rule { padding: 11px 0; } .lock { font-size: 12px; opacity: .7; }
.pcard { display: block; padding: 14px 16px; margin-bottom: 10px; cursor: pointer; } .pcard.sel { box-shadow: 0 0 0 1.5px var(--blue); }
.thumb { position: relative; display: inline-grid; place-items: center; width: 86px; height: 64px; border-radius: 12px; overflow: hidden; background: var(--fill-2); border: .5px solid var(--line-2); font-size: 12px; color: var(--ink-3); text-align: center; } .thumb img { width: 100%; height: 100%; object-fit: cover; } .thumb.sm { width: 54px; height: 40px; border-radius: 8px; }
.thumb.add { cursor: pointer; border-style: dashed; padding: 6px; } .thumb.add.over { border-color: var(--blue); color: var(--blue); } .thumb .x { position: absolute; top: 3px; right: 3px; width: 20px; height: 20px; margin: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 10px; }
dialog.xl .drop { padding: 22px; }

/* ================= mapping notes ================= */
.notes { margin-top: 10px; display: grid; gap: 6px; } .note { font-size: 12.5px; line-height: 1.4; padding: 8px 11px; border-radius: 10px; color: var(--ink-2); background: var(--fill-2); } .note b { font-weight: 650; margin-right: 6px; }
.note.gap b { color: var(--orange); } .note.watch b { color: var(--blue); } .why-sum { font-size: 13px; color: var(--ink-2); margin: 8px 0 4px; line-height: 1.45; }
.mcard .row h3 { font-size: 17px; }
.xl { table-layout: fixed; min-width: 620px; } .xl td.xb { width: auto; min-width: 0; } .xl td.xn { width: auto; }
.xl th, .xl td { padding: 8px 9px; font-size: 13px; } .xl td.xb { font-size: 12px; } .xl td.xe { min-width: 0; }
.xl { min-width: 900px; }

/* ================= no number spinners ================= */
input[type=number] { -moz-appearance: textfield; appearance: textfield; }
input[type=number]::-webkit-outer-spin-button, input[type=number]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

/* ================= icon dropdown ================= */
.dd { position: relative; }
.ddb { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; cursor: pointer; padding-right: 12px; } .ddb .ddt { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .ddb .ddt.ph { color: var(--ink-3); }
.ddb .ddc { color: var(--ink-3); flex: none; transition: transform .18s var(--ease); } .ddb[aria-expanded=true] .ddc { transform: rotate(180deg); }
.ddi { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--blue-soft); color: var(--blue); flex: none; } .ddb .ddi { width: 26px; height: 26px; border-radius: 8px; margin: -2px 0 -2px -4px; }
.ddm { width: 100%; min-width: 260px; max-height: 340px; padding: 6px; } .ddm button { display: flex; align-items: center; gap: 12px; padding: 7px 10px; } .ddm .grow { min-width: 0; } .ddm b { font-weight: 550; font-size: 14px; display: block; } .ddm small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ddm button.sel { color: var(--blue); } .ddm button.sel .ddi { background: var(--blue); color: #fff; }

/* ================= autosave chip, undo, shortcuts, review focus ================= */
.savechip { font-size: 12px; color: var(--ink-3); padding: 0 8px; align-self: center; white-space: nowrap; transition: color .2s; } .savechip.busy { color: var(--blue); }
.icon-btn:disabled { opacity: .3; cursor: default; pointer-events: none; }
.mcard { transition: box-shadow .15s var(--ease), border-color .15s; } .mcard.focused { box-shadow: 0 0 0 2px var(--blue), var(--shadow-1); } .mcard.approved { border-color: color-mix(in srgb, var(--green) 45%, var(--line)); }
.kbd { display: inline-flex; gap: 4px; } kbd { font: 600 12px/1 -apple-system, BlinkMacSystemFont, "SF Pro Text", sans-serif; min-width: 24px; text-align: center; padding: 5px 7px; border-radius: 7px; background: var(--fill-2); border: .5px solid var(--line-2); box-shadow: 0 1px 0 var(--line-2); color: var(--ink-2); }
@media (max-width: 760px) { .savechip { display: none; } }

/* ================= per-enabler agreement between two models ================= */
.en.ag-both::before, .en.ag-one::before { content: ""; width: 7px; height: 7px; border-radius: 50%; flex: none; margin-right: 1px; }
.en.ag-both::before { background: #8fe3ac; box-shadow: 0 0 0 2px rgba(143,227,172,.28); } .en.ag-one::before { border: 1.5px solid #ffd27a; box-sizing: border-box; }
html[data-theme="light"] .en.ag-both::before { background: #1f9d55; } html[data-theme="light"] .en.ag-one::before { border-color: #ffd27a; background: rgba(255,255,255,.25); }
.agtip { margin-top: 8px; font-size: 12px; font-weight: 600; padding: 4px 8px; border-radius: 8px; display: inline-block; } .agtip.both { background: var(--green-soft); color: var(--green); } .agtip.one { background: var(--orange-soft); color: var(--orange); }
.reasonrow .lab { padding-top: 3px; } .reasonrow s { opacity: .6; margin-right: 6px; } .reasonrow .plus { color: var(--green); font-weight: 600; margin-right: 6px; }
.rs { appearance: none; border: .5px solid var(--line-2); background: transparent; color: var(--ink-2); font-size: 12px; padding: 3px 10px; border-radius: 999px; cursor: pointer; } .rs:hover { border-color: var(--blue); color: var(--blue); } .rs.on { background: var(--blue-soft); border-color: var(--blue); color: var(--blue); font-weight: 600; }
.sugg-card { margin-bottom: 20px; padding: 16px 18px; }
.up { color: var(--green); font-weight: 600; font-size: 12px; margin-left: 4px; } .down { color: var(--red); font-weight: 600; font-size: 12px; margin-left: 4px; }
.note.consist { background: var(--orange-soft); color: var(--ink); } .note.consist b { color: var(--orange); } .note .rs { margin-left: 6px; }

.xl td.xt[data-tool=ABILITY], .xl th.xtl[style*=ABILITY] { width: 104px; min-width: 104px; }
