/* Skalia · Gate Board — base, header, folder tabs, home, deal folders */
:root {
  --paper: #f6f2e8; --paper2: #f1ece0; --card: #fffdf8; --white: #fff;
  --ink: #111110; --ink2: #393833; --mute: #807c72; --faint: #b4afa3;
  --line: #e4ded0; --line2: #d3ccbb; --wash: #efe9dc; --strip: #e9e3d5; --tabbg: #e0d9c8; --tabbd: #c7bfab;
  --grid: rgba(80, 64, 20, .045); --grid2: rgba(80, 64, 20, .075);
  --gold: #d4a537; --gold2: #e2b94f; --gold-d: #85620f; --gold-l: #f4e6bf; --gold-ll: #fbf4e1;
  --red: #a8402c; --red-l: #f6e3dc; --amber: #b8770f; --green: #3d7a52; --green-l: #e1eee4; --blue: #3c5a7a;
  --toph: 56px; --tabh: 44px; --chatw: 400px;
  --sans: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
  --serif: 'Source Serif 4', Georgia, serif;
  --hatch: repeating-linear-gradient(-45deg, var(--gold) 0 7px, var(--ink) 7px 10px);
  --shadow: 0 1px 0 rgba(0,0,0,.02), 0 10px 30px rgba(40,30,10,.08);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; }
body { font: 400 13px/1.45 var(--sans); color: var(--ink); background: var(--paper); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; text-align: left; }
input, textarea, select { font: inherit; color: inherit; }
::selection { background: var(--gold-l); }
kbd { display: inline-block; min-width: 17px; text-align: center; font: 500 10px/1 var(--mono); padding: 3px 4px 2px; border: 1px solid var(--line2); border-bottom-width: 2px; border-radius: 3px; background: var(--card); color: var(--ink2); }
label, .lab { font: 500 9.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); }
.mute { color: var(--mute); }
.i { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: -2px; }
.btn { display: inline-flex; align-items: center; gap: 7px; height: 30px; padding: 0 12px; border: 1px solid var(--line2); background: var(--card); font: 500 12px/1 var(--sans); white-space: nowrap; transition: border-color .15s, background .15s; }
.btn:hover { border-color: var(--ink); }
.btn.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn.ink:hover { background: #000; }
.btn.ink kbd { background: transparent; color: var(--gold); border-color: #4a4a46; }
.btn.gold { background: var(--gold); border-color: var(--gold); color: var(--ink); }
.btn.gold:hover { background: var(--gold2); }
.btn.sm { height: 26px; padding: 0 9px; font-size: 11.5px; }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { border-color: var(--line2); background: var(--card); }
.btn[disabled] { opacity: .45; pointer-events: none; }
.lnk { display: inline-flex; align-items: center; gap: 5px; font: 600 11.5px/1 var(--sans); color: var(--ink); padding-bottom: 2px; border-bottom: 1px solid var(--gold); white-space: nowrap; }
.lnk:hover { color: var(--gold-d); }
.soft { color: var(--ink2); font-size: 12.5px; line-height: 1.55; }
.chip { display: inline-flex; align-items: center; gap: 5px; height: 19px; padding: 0 7px; font: 500 10px/1 var(--mono); letter-spacing: .02em; border: 1px solid var(--line2); color: var(--ink2); background: var(--card); white-space: nowrap; }
.chip.gold { background: var(--gold-l); border-color: #e7d08f; color: var(--gold-d); }
.chip.ink { background: var(--ink); border-color: var(--ink); color: #fff; }
.chip.red { background: var(--red-l); border-color: #e8c1b5; color: var(--red); }
.chip.green { background: var(--green-l); border-color: #bcd8c4; color: var(--green); }
.chip.phone { background: #eef1f5; border-color: #cbd3de; color: var(--blue); }
.chip.phone::before { content: ''; width: 6px; height: 9px; border: 1.2px solid currentColor; border-radius: 1.5px; }
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 2px rgba(212,165,55,.2); flex: none; }
.scroll { overflow-y: auto; scrollbar-width: thin; scrollbar-color: var(--line2) transparent; }

/* ---------------------------------------------------------------- header */
#top { position: fixed; inset: 0 0 auto 0; height: var(--toph); display: flex; align-items: center; gap: 18px; padding: 0 18px 0 20px; background: var(--paper); z-index: 40; }
.brand { display: flex; align-items: baseline; gap: 10px; flex: none; }
.brand b { font: 700 19px/1 var(--sans); letter-spacing: -.03em; }
.brand span { font: 500 10px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--gold-d); padding-left: 10px; border-left: 1px solid var(--line2); }
.sessions { display: flex; align-items: center; gap: 0; margin-left: 18px; border: 1px solid var(--line2); background: var(--card); height: 34px; }
.sess { display: flex; align-items: center; gap: 8px; height: 100%; padding: 0 12px; border-right: 1px solid var(--line); font: 500 11.5px/1 var(--sans); color: var(--ink2); white-space: nowrap; position: relative; }
.sess:last-child { border-right: 0; }
.sess:hover { background: var(--wash); }
.sess time { font: 500 10.5px/1 var(--mono); color: var(--mute); }
.sess .sd { width: 8px; height: 8px; border-radius: 50%; border: 1.5px solid var(--line2); flex: none; }
.sess.done { color: var(--mute); }
.sess.done .sd { background: var(--ink); border-color: var(--ink); }
.sess.next { color: var(--ink); }
.sess.next .sd { border-color: var(--gold); background: var(--gold); box-shadow: 0 0 0 3px rgba(212,165,55,.22); }
.sess.next em { font: 500 10.5px/1 var(--mono); font-style: normal; color: var(--gold-d); }
.sess .n { font: 600 10px/1 var(--mono); padding: 2px 5px; background: var(--wash); color: var(--ink2); }
.sess.next .n { background: var(--gold-l); color: var(--gold-d); }
.hsp { flex: 1; }
.focusbtn { display: inline-flex; align-items: center; gap: 9px; height: 34px; padding: 0 14px 0 12px; background: var(--ink); color: #fff; font: 600 12.5px/1 var(--sans); letter-spacing: -.005em; }
.focusbtn:hover { background: #000; }
.focusbtn .fi { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid var(--gold); display: grid; place-items: center; }
.focusbtn .fi::after { content: ''; width: 5px; height: 5px; border-radius: 50%; background: var(--gold); }
.focusbtn kbd { background: transparent; color: var(--gold); border-color: #4a4a46; }
.focusbtn .fc { font: 600 10px/1 var(--mono); background: var(--gold); color: var(--ink); padding: 3px 5px; border-radius: 8px; }
.askbtn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 10px 0 11px; border: 1px solid var(--line2); background: var(--card); font: 500 12.5px/1 var(--sans); color: var(--ink2); min-width: 170px; }
.askbtn:hover, .askbtn.on { border-color: var(--ink); color: var(--ink); }
.askbtn kbd { margin-left: auto; }
.phonepill { position: relative; display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 11px; border: 1px solid var(--line2); background: var(--card); font: 500 12px/1 var(--sans); color: var(--ink2); }
.phonepill:hover { border-color: var(--ink); }
.phi { width: 9px; height: 14px; border: 1.4px solid var(--ink); border-radius: 2.5px; position: relative; }
.phi::after { content: ''; position: absolute; left: 2px; right: 2px; bottom: 1.5px; height: 1px; background: var(--ink); }
.phonepill .live { width: 6px; height: 6px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 3px rgba(61,122,82,.15); }
.phonepill .live.pulse { animation: pulse 1.2s ease-out 3; }
.phonepill .pc { font: 600 10px/1 var(--mono); background: #e3e9f1; color: var(--blue); padding: 3px 5px; border-radius: 8px; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(61,122,82,.5); } 100% { box-shadow: 0 0 0 9px rgba(61,122,82,0); } }
.iconbtn { display: inline-grid; place-items: center; width: 34px; height: 34px; border: 1px solid transparent; color: var(--ink2); }
.iconbtn:hover { border-color: var(--line2); background: var(--card); }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); color: var(--gold); display: grid; place-items: center; font: 600 11px/1 var(--mono); letter-spacing: .04em; flex: none; }
.menu { position: absolute; top: calc(100% + 6px); right: 0; min-width: 240px; background: var(--card); border: 1px solid var(--ink); box-shadow: var(--shadow); padding: 5px; z-index: 70; display: none; }
.menu.on { display: block; }
.menu button { display: flex; width: 100%; align-items: center; gap: 9px; padding: 8px 10px; font-size: 12.5px; }
.menu button:hover { background: var(--wash); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.menu .mh { padding: 8px 10px 4px; }

/* ---------------------------------------------------------------- folder tabs (záložky) */
#tabs { position: fixed; top: var(--toph); left: 0; right: 0; height: var(--tabh); display: flex; align-items: flex-end; padding: 0 16px 0 14px; background: var(--strip); border-top: 1px solid var(--line); z-index: 35; transition: right .28s cubic-bezier(.2,.7,.2,1); }
#tabs::after { content: ''; position: absolute; left: 0; right: 0; bottom: 0; height: 1px; background: var(--ink); z-index: 0; }
.tabrow { display: flex; align-items: flex-end; min-width: 0; flex: 0 1 auto; overflow: hidden; padding: 0 6px; }
.tab { position: relative; z-index: 1; isolation: isolate; display: flex; align-items: center; gap: 8px; height: 34px; padding: 0 20px 0 21px; margin-right: -4px; flex: 0 0 auto; max-width: 240px; cursor: pointer; color: var(--ink2); user-select: none; }
.tab::before { content: ''; position: absolute; inset: 0; z-index: -1; background: var(--tabbg); border: 1px solid var(--tabbd); border-bottom: 0; border-radius: 7px 7px 0 0; transform: perspective(70px) rotateX(5deg); transform-origin: bottom; transition: background .15s; }
.tab:hover::before { background: #e8e2d3; }
.tab .tn { font: 500 12.5px/1 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.tab .tg { flex: none; font: 500 9.5px/1 var(--mono); font-style: normal; color: var(--mute); letter-spacing: .02em; white-space: nowrap; }
.tab .x { flex: none; width: 16px; height: 16px; margin-left: -2px; margin-right: -9px; display: grid; place-items: center; border-radius: 3px; font: 400 14px/1 var(--sans); color: var(--faint); opacity: 0; transition: opacity .15s; }
.tab:hover .x, .tab.on .x { opacity: 1; }
.tab .x:hover { background: var(--line); color: var(--ink); }
.tab.on { z-index: 3; color: var(--ink); height: 36px; }
.tab.on::before { background: var(--paper); border-color: var(--ink); }
.tab.on::after { content: ''; position: absolute; left: 1px; right: 1px; bottom: -1px; height: 2px; background: var(--paper); z-index: 2; }
.tab.on .tn { font-weight: 600; }
.tab.on .tg { color: var(--gold-d); }
.tab.home { flex: none; max-width: none; padding: 0 22px 0 19px; margin-right: 6px; }
.tab .fo { width: 15px; height: 13px; color: var(--gold-d); }
.tab .cnt { font: 600 10px/1 var(--mono); font-style: normal; background: var(--gold); color: var(--ink); padding: 3px 5px; border-radius: 8px; min-width: 18px; text-align: center; }
.tab.bump .tg { animation: bump 1.4s ease-out; }
@keyframes bump { 0% { color: var(--ink); background: var(--gold); box-shadow: 0 0 0 4px rgba(212,165,55,.4); } 100% { background: transparent; box-shadow: 0 0 0 0 rgba(212,165,55,0); } }
.tab.pin { padding: 0 18px 0 18px; }
.tab.pin .tn { font-weight: 500; }
.tab.pin svg { width: 13px; height: 13px; color: var(--ink2); }
.tab.pin .cnt { background: var(--ink); color: #fff; }
.tabpins { display: flex; align-items: flex-end; margin-left: auto; padding-left: 10px; flex: none; }
.tabmore { position: relative; flex: none; align-self: center; margin-left: 8px; }
.morebtn { font: 500 11.5px/1 var(--sans); color: var(--ink2); padding: 6px 9px; border: 1px solid var(--tabbd); border-radius: 12px; background: var(--paper); }
.morebtn:hover { border-color: var(--ink); }
.tabmore .menu { top: 30px; left: 0; right: auto; }
.tabmore.on .menu { display: block; }
.menu .tg { margin-left: auto; font: 400 10px/1 var(--mono); color: var(--mute); }
.addtab { align-self: center; margin-left: 8px; width: 26px; height: 26px; display: grid; place-items: center; border: 1px dashed var(--tabbd); border-radius: 50%; color: var(--mute); font: 400 16px/1 var(--sans); flex: none; }
.addtab:hover { border-color: var(--ink); color: var(--ink); }

/* ---------------------------------------------------------------- main */
#main { position: fixed; top: calc(var(--toph) + var(--tabh)); left: 0; right: 0; bottom: 0; background-color: var(--paper);
  background-image: linear-gradient(var(--grid2) 1px, transparent 1px), linear-gradient(90deg, var(--grid2) 1px, transparent 1px), linear-gradient(var(--grid) 1px, transparent 1px), linear-gradient(90deg, var(--grid) 1px, transparent 1px);
  background-size: 100px 100px, 100px 100px, 20px 20px, 20px 20px; background-position: -1px -1px; transition: right .28s cubic-bezier(.2,.7,.2,1); }
body.chat #main, body.chat #tabs { right: var(--chatw); }
.view { height: 100%; }
.enter { animation: enter .35s cubic-bezier(.2,.7,.2,1); }
@keyframes enter { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------------- home */
.home { height: 100%; }
.hw { max-width: 1300px; margin: 0 auto; padding: 26px 36px 90px; }
.hello { display: grid; grid-template-columns: 1fr auto auto; align-items: end; gap: 14px; padding-bottom: 22px; }
.hello h1 { margin: 0; font: 400 32px/1.08 var(--serif); letter-spacing: -.02em; }
.hello p { margin: 8px 0 0; font: 400 14px/1.45 var(--sans); color: var(--ink2); max-width: 46em; }
.hello p b { font-weight: 600; color: var(--ink); }
.hcard { display: grid; gap: 5px; padding: 12px 14px; min-width: 250px; background: var(--card); border: 1px solid var(--line2); text-align: left; position: relative; }
.hcard:hover { border-color: var(--ink); }
.hcard b { font: 600 13.5px/1.2 var(--sans); }
.hcard span { font: 400 11.5px/1.3 var(--sans); color: var(--ink2); }
.hcard .go { font: 600 11.5px/1 var(--sans); color: var(--gold-d); display: flex; align-items: center; gap: 5px; margin-top: 2px; }
.hcard.sesscard { border-color: var(--ink); }
.hcard.sesscard::before { content: ''; position: absolute; left: -1px; right: -1px; top: -1px; height: 4px; background: var(--hatch); }
.hcard .cd { font: 500 20px/1 var(--mono); letter-spacing: -.02em; color: var(--ink); }
.hcard.phonecard label { color: var(--blue); }
.sh { display: flex; align-items: baseline; gap: 14px; padding: 0 0 10px; }
.sh label { color: var(--ink); font-size: 10px; }
.sh span { font: 400 11.5px/1 var(--sans); color: var(--mute); }
.sh .r { margin-left: auto; }
.queue { padding-bottom: 30px; }
.qgrid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; }
.qc { position: relative; display: flex; flex-direction: column; gap: 5px; padding: 0 13px 12px; background: var(--card); border: 1px solid var(--line2); cursor: pointer; transition: border-color .15s, box-shadow .15s, transform .15s; min-width: 0; }
.qc::before { content: ''; display: block; height: 4px; margin: 0 -13px 9px; background: var(--hatch); opacity: .92; }
.qc:hover { border-color: var(--ink); box-shadow: 0 8px 22px rgba(40,30,10,.08); }
.qc.first { border-color: var(--ink); }
.qh { display: flex; align-items: center; gap: 6px; font: 500 9.5px/1 var(--mono); letter-spacing: .06em; text-transform: uppercase; color: var(--gold-d); white-space: nowrap; overflow: hidden; min-height: 19px; }
.qh .chip { text-transform: none; letter-spacing: 0; height: 17px; }
.qc b { font: 600 15px/1.2 var(--sans); letter-spacing: -.01em; margin-top: 1px; }
.qc p { margin: 0; font: 400 12.5px/1.4 var(--sans); color: var(--ink2); min-height: 35px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.qf { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.qmeta { font: 400 10.5px/1 var(--mono); color: var(--mute); }

/* investments: group nav + rows */
.inv .sh { border-bottom: 1px solid var(--ink); padding-bottom: 0; align-items: flex-end; }
.inv .sh > label { padding-bottom: 10px; }
.gnav { display: flex; gap: 0; margin-left: 18px; }
.gnav button { position: relative; padding: 8px 12px 10px; font: 500 12.5px/1 var(--sans); color: var(--mute); display: flex; gap: 6px; align-items: baseline; }
.gnav button em { font: 500 10px/1 var(--mono); font-style: normal; color: var(--faint); }
.gnav button:hover { color: var(--ink); }
.gnav button.on { color: var(--ink); font-weight: 600; }
.gnav button.on::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 3px; background: var(--gold); }
.inv .sh .r { padding-bottom: 10px; font: 400 11.5px/1 var(--sans); color: var(--mute); }
.grp { margin-bottom: 8px; }
.gh, .row { display: grid; grid-template-columns: minmax(220px, 1.15fr) 396px minmax(220px, 1.35fr) 70px; gap: 22px; align-items: center; }
.gh { padding: 46px 0 6px; border-bottom: 1px solid var(--line2); position: sticky; top: 0; background: linear-gradient(var(--paper) 80%, rgba(246,242,232,.92)); z-index: 3; }
.gh b { font: 600 11px/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; }
.gn { display: flex; align-items: baseline; gap: 10px; min-width: 0; }
.gn span { font: 400 11px/1.2 var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.railh { display: grid; grid-template-columns: repeat(11, 32px); gap: 4px; height: 12px; position: relative; }
.railh i { position: relative; font-style: normal; cursor: help; }
.railh i span { position: absolute; left: 12px; bottom: 0; transform-origin: left bottom; transform: rotate(-42deg); white-space: nowrap; font: 500 9.5px/1 var(--mono); color: var(--mute); letter-spacing: .02em; }
.railh i.ph span { color: var(--ink2); }
.gh .nh { font: 500 9.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .09em; color: var(--mute); }
.row { width: 100%; padding: 11px 0; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .15s; position: relative; }
.row:hover { background: rgba(255,253,248,.85); }
.row.w::before { content: ''; position: absolute; left: -13px; top: 50%; width: 6px; height: 6px; margin-top: -3px; border-radius: 50%; background: var(--gold); }
.rc { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rc b { font: 600 14px/1.15 var(--sans); letter-spacing: -.01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rc b em { font: 400 11px/1 var(--mono); font-style: normal; color: var(--gold-d); margin-left: 8px; letter-spacing: .01em; }
.rc span { font: 400 11.5px/1.2 var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail { display: grid; grid-template-columns: repeat(11, 32px); gap: 4px; align-items: center; }
.m { position: relative; display: grid; place-items: center; height: 16px; border: 1px solid var(--line2); background: var(--card); overflow: hidden; }
.m.s-cleared { background: var(--gold); border-color: #c69a2f; color: var(--ink); }
.m.s-cleared .i { width: 9px; height: 9px; stroke-width: 2; }
.m.s-waiting { background: var(--hatch); border-color: var(--ink); }
.m.s-preparing { background: var(--card); border-color: var(--ink2); }
.m.s-preparing s { position: absolute; left: 0; top: 0; bottom: 0; background: repeating-linear-gradient(90deg, var(--ink2) 0 2px, transparent 2px 4px); opacity: .45; }
.m.s-skipped { border-style: dashed; background: transparent; }
.m.s-future { background: rgba(255,253,248,.6); border-color: var(--line); }
.m.s-passed { background: var(--red-l); border-color: #e2b6a8; }
.m.s-passed::after { content: ''; position: absolute; left: 3px; right: 3px; top: 50%; height: 1.4px; background: var(--red); transform: rotate(-20deg); }
.m.fresh { animation: fresh 2.4s ease-out; }
@keyframes fresh { 0% { box-shadow: 0 0 0 3px rgba(212,165,55,.9); } 100% { box-shadow: 0 0 0 10px rgba(212,165,55,0); } }
.rn { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.rn em { font: 500 9.5px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: flex; gap: 6px; align-items: center; }
.rn span { font: 500 13px/1.3 var(--sans); color: var(--ink); overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
.rn.waiting em { color: var(--gold-d); }
.rn.preparing span, .rn.idle span { color: var(--ink2); font-weight: 400; }
.rn.passed span { color: var(--red); font-weight: 400; font-style: italic; }
.rn.real em { color: var(--green); }
.row .open { justify-self: end; height: 27px; padding: 0 11px; border: 1px solid var(--line2); font: 500 11.5px/1 var(--sans); background: var(--card); }
.row:hover .open { border-color: var(--ink); }
.row.passedrow .rc b { color: var(--ink2); }
.grp-foot { display: flex; gap: 18px; padding: 12px 0; font: 400 11.5px/1.3 var(--sans); color: var(--mute); }
.legend { display: flex; gap: 14px; align-items: center; font: 400 11px/1 var(--sans); color: var(--mute); }
.inv .sh .legend.r { padding-bottom: 12px; margin-left: auto; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.legend .m { width: 18px; height: 11px; }
.legend span { white-space: nowrap; }
.camp-row .rail { display: flex; gap: 4px; }
.camp-row .rail .m { width: 60px; }
.camp-row .rail .cl { font: 400 10px/1 var(--mono); color: var(--mute); align-self: center; margin-left: 6px; }

/* ---------------------------------------------------------------- deal: header + gate folders that scroll side to side */
.proj { display: grid; grid-template-rows: auto 1fr; height: 100%; }
.ph { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 22px; padding: 13px 24px 12px; background: rgba(246,242,232,.94); border-bottom: 1px solid var(--line2); }
.pt h1 { margin: 0; font: 700 22px/1.1 var(--sans); letter-spacing: -.025em; display: flex; align-items: baseline; gap: 10px; }
.pt h1 .chip { position: relative; top: -3px; }
.pt > span { display: block; margin-top: 4px; font: 400 12px/1.2 var(--sans); color: var(--mute); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pt > span b { font: 500 11.5px/1 var(--mono); color: var(--gold-d); }
.pnav { display: flex; align-items: center; gap: 6px; font: 400 10.5px/1 var(--mono); color: var(--mute); white-space: nowrap; }
.pnav .navb { width: 26px; height: 24px; display: grid; place-items: center; border: 1px solid var(--line2); background: var(--card); }
.pnav .navb:hover { border-color: var(--ink); }
.pf { display: flex; gap: 0; margin: 0; }
.pf div { padding: 0 14px; border-left: 1px solid var(--line2); }
.pf dt { font: 500 9px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--mute); }
.pf dd { margin: 5px 0 0; font: 600 14px/1 var(--sans); letter-spacing: -.01em; white-space: nowrap; }

.strip { position: relative; display: flex; height: 100%; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; overscroll-behavior-x: contain; --sp: 60px; --openw: 900px; }
.strip::-webkit-scrollbar { display: none; }
.strip.dragging { cursor: grabbing; user-select: none; }
.col { position: relative; flex: 0 0 var(--sp); height: 100%; border-right: 1px solid var(--line2); transition: flex-basis .5s cubic-bezier(.2,.7,.2,1), background .3s; background: rgba(239,233,220,.55); }
.col.open { flex-basis: var(--openw); background: var(--card); border-right: 1px solid var(--ink); border-left: 1px solid var(--ink); margin-left: -1px; box-shadow: 0 0 40px rgba(40,30,10,.07); z-index: 2; }
.strip.nt .col { transition: none; }
.col.s-cleared:not(.open) { background: rgba(244,230,191,.32); }
.col.s-future:not(.open) { background: rgba(246,242,232,.6); }
.col.s-future:not(.open) .spine { opacity: .62; }
.col.s-skipped:not(.open) .spine { opacity: .5; }
.col.s-passed:not(.open) { background: rgba(246,227,220,.4); }
/* spine (folded gate) */
.spine { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 0 0 18px; width: 100%; }
.spine:hover { background: rgba(255,253,248,.8); }
.spine .arm { position: relative; display: block; width: 100%; height: 8px; margin-top: 14px; background: var(--line); }
.col.s-cleared .spine .arm { background: var(--gold); height: 3px; margin-top: 16px; margin-bottom: 5px; }
.col.s-waiting .spine .arm { background: var(--hatch); }
.col.s-preparing .spine .arm { background: var(--line); }
.col.s-preparing .spine .arm i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink2); transition: width .6s; }
.spine .post { width: 16px; height: 16px; margin-top: -12px; border: 1px solid var(--line2); background: var(--card); display: grid; place-items: center; color: var(--ink); }
.col.s-cleared .spine .post { background: var(--gold); border-color: #c69a2f; margin-top: -14px; }
.col.s-waiting .spine .post { border-color: var(--ink); background: var(--gold); }
.spine .vs { font: 500 9.5px/1 var(--mono); color: var(--mute); writing-mode: vertical-rl; transform: rotate(180deg); letter-spacing: .03em; white-space: nowrap; }
.col.s-waiting .spine .vs { color: var(--gold-d); font-weight: 600; }
.spine .vn { margin-top: 4px; font: 600 14px/1 var(--sans); letter-spacing: -.01em; writing-mode: vertical-rl; transform: rotate(180deg); white-space: nowrap; color: var(--ink); }
.col.s-future .spine .vn { color: var(--mute); font-weight: 500; }
.spine .ph8 { font: 500 8.5px/1 var(--mono); text-transform: uppercase; letter-spacing: .1em; color: var(--faint); writing-mode: vertical-rl; transform: rotate(180deg); }
.spine .from { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; background: #e3e9f1; color: var(--blue); font: 600 8px/1 var(--mono); }
/* open folder */
.fold { position: absolute; inset: 0; display: grid; grid-template-rows: auto 1fr; grid-template-columns: minmax(0, 1fr); min-width: 0; }
.wsp { overflow: hidden; }
.col.opening .fold { animation: unfold .45s cubic-bezier(.2,.7,.2,1); }
@keyframes unfold { from { opacity: .2; } to { opacity: 1; } }
.fh { position: relative; padding: 0; border-bottom: 1px solid var(--line2); background: var(--paper); cursor: grab; }
.fh .arm { position: relative; display: block; height: 8px; background: var(--line); transform-origin: 0 50%; transition: transform .8s cubic-bezier(.5,0,.2,1); }
.col.s-waiting .fh .arm { background: var(--hatch); }
.col.s-cleared .fh .arm { background: var(--gold); height: 3px; }
.col.s-preparing .fh .arm i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink2); transition: width .5s; }
.fh::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--gold); transform: scaleX(0); transform-origin: 0 50%; transition: transform .7s cubic-bezier(.3,0,.2,1) .15s; z-index: 1; }
.col.lift .fh::before { transform: scaleX(1); }
.col.lift .fh .arm { transform: translateY(-9px) rotate(-.6deg); opacity: 0; transition: transform .55s cubic-bezier(.5,0,.2,1), opacity .5s ease .05s; }
.liftstamp { position: absolute; right: 20px; top: 50%; transform: translateY(-40%); display: inline-flex; align-items: center; gap: 7px; padding: 6px 10px; background: var(--gold); color: var(--ink); font: 600 11.5px/1 var(--sans); opacity: 0; animation: stamp .9s cubic-bezier(.2,.7,.2,1) .25s forwards; z-index: 3; }
@keyframes stamp { from { opacity: 0; transform: translateY(-10%) scale(.96); } to { opacity: 1; transform: translateY(-50%); } }
.col.flow { animation: flow 1.4s ease-out; }
@keyframes flow { 0% { box-shadow: inset 0 3px 0 var(--gold); } 100% { box-shadow: inset 0 3px 0 rgba(212,165,55,0); } }
.col.lift .fh .post { background: var(--gold); }
.fh-in { display: flex; align-items: center; gap: 12px; padding: 11px 20px 12px; min-width: 0; }
.fh .post { position: absolute; left: 18px; top: -4px; width: 16px; height: 16px; border: 1px solid var(--ink); background: var(--card); display: grid; place-items: center; z-index: 2; transition: background .3s; }
.col.s-cleared .fh .post { background: var(--gold); border-color: #c69a2f; top: -6px; }
.fh .phs { font: 500 9.5px/1 var(--mono); color: var(--mute); text-transform: uppercase; letter-spacing: .09em; white-space: nowrap; }
.fh b { font: 700 19px/1 var(--sans); letter-spacing: -.02em; white-space: nowrap; }
.fh .gs { font: 600 10px/1 var(--mono); padding: 4px 6px; background: var(--wash); color: var(--ink2); white-space: nowrap; }
.col.s-waiting .fh .gs { background: var(--gold); color: var(--ink); }
.col.s-cleared .fh .gs { background: var(--gold-l); color: var(--gold-d); }
.col.s-preparing .fh .gs { background: var(--ink); color: #fff; }
.fh .gq { font: 400 13px/1.3 var(--sans); color: var(--ink2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 120px; flex: 1 1 0; }
.fdocs { display: flex; gap: 6px; flex: 0 1 auto; min-width: 0; overflow: hidden; }
.fdocs button { flex: 0 1 auto; min-width: 0; display: inline-flex; align-items: center; gap: 6px; height: 26px; padding: 0 9px; border: 1px solid var(--line2); background: var(--card); font: 500 11.5px/1 var(--sans); white-space: nowrap; max-width: 220px; overflow: hidden; text-overflow: ellipsis; }
.fdocs button:hover { border-color: var(--ink); }
.fdocs button .dk { width: 10px; height: 12px; border: 1px solid var(--ink2); position: relative; flex: none; }
.fdocs button .dk::after { content: ''; position: absolute; left: 2px; right: 2px; top: 3px; height: 1px; background: var(--ink2); box-shadow: 0 2px 0 var(--ink2), 0 4px 0 var(--ink2); }
.fdocs button.need { border-color: var(--gold); background: var(--gold-ll); }
.wsp { display: grid; grid-template-columns: minmax(0, 1fr) 330px; min-height: 0; }
.docpane { min-height: 0; padding: 20px 26px 80px; border-right: 1px solid var(--line2); }
.decpane { min-height: 0; padding: 20px 20px 80px; background: var(--card); }
.crumb { display: flex; justify-content: space-between; gap: 12px; font: 400 10.5px/1 var(--mono); color: var(--mute); margin-bottom: 14px; }
.crumb b { color: var(--ink); font-weight: 500; }

/* cards inside a gate folder */
.sheet { background: var(--white); border: 1px solid var(--line2); padding: 18px 20px; margin-bottom: 14px; }
.sheet.flat { background: transparent; border: 0; padding: 0; }
.dochead { display: flex; flex-direction: column; gap: 5px; margin-bottom: 12px; }
.dochead label { color: var(--gold-d); }
.dochead b { font: 400 21px/1.2 var(--serif); letter-spacing: -.01em; }
.dochead span { font: 400 12px/1.4 var(--sans); color: var(--mute); }
.docgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 10px; margin-bottom: 16px; }
.doccard { display: grid; grid-template-columns: 34px 1fr; gap: 4px 12px; padding: 13px 14px; background: var(--white); border: 1px solid var(--line2); text-align: left; position: relative; transition: border-color .15s, transform .15s, box-shadow .15s; }
.doccard:hover { border-color: var(--ink); box-shadow: 0 8px 20px rgba(40,30,10,.08); transform: translateY(-1px); }
.doccard .pg { grid-row: 1 / span 3; width: 34px; height: 44px; border: 1px solid var(--line2); background: linear-gradient(var(--white), var(--paper)); position: relative; }
.doccard .pg::before { content: ''; position: absolute; left: 6px; right: 6px; top: 9px; height: 1.5px; background: var(--ink); box-shadow: 0 5px 0 var(--line2), 0 9px 0 var(--line2), 0 13px 0 var(--line2), 0 17px 0 var(--line2), 0 21px 0 var(--line2); }
.doccard .pg.need::after { content: ''; position: absolute; right: -4px; top: -4px; width: 9px; height: 9px; border-radius: 50%; background: var(--gold); border: 2px solid var(--white); }
.doccard b { font: 600 13px/1.25 var(--sans); }
.doccard span { font: 400 11px/1.3 var(--sans); color: var(--mute); }
.doccard em { font: 500 9.5px/1 var(--mono); font-style: normal; text-transform: uppercase; letter-spacing: .07em; color: var(--mute); }
.doccard em.need { color: var(--gold-d); }
.doccard em.draft { color: var(--blue); }
.preview { background: var(--white); border: 1px solid var(--line2); padding: 22px 26px; margin-bottom: 14px; position: relative; }
.preview::before { content: ''; position: absolute; left: 0; right: 0; top: 0; height: 3px; background: var(--ink); }
.preview .pv-h { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; font: 400 10px/1 var(--mono); color: var(--mute); letter-spacing: .06em; text-transform: uppercase; padding-bottom: 12px; border-bottom: 1px solid var(--line); margin-bottom: 14px; }
.preview h2 { margin: 0 0 6px; font: 400 23px/1.2 var(--serif); letter-spacing: -.01em; }
.preview h3 { margin: 16px 0 5px; font: 600 14px/1.3 var(--serif); }
.preview p { margin: 0 0 9px; font: 400 14px/1.6 var(--serif); color: var(--ink2); max-width: 40em; }
.preview .more { display: flex; justify-content: space-between; align-items: center; margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--line); }
.kv { display: grid; grid-template-columns: 150px 1fr; border-top: 1px solid var(--line); }
.kv > * { padding: 9px 0; border-bottom: 1px solid var(--line); }
.kv dt { font: 500 9.5px/1.4 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); }
.kv dd { margin: 0; font: 400 13.5px/1.45 var(--serif); }
.tbl { width: 100%; border-collapse: collapse; font: 400 12.5px/1.3 var(--sans); }
.tbl th { text-align: left; font: 500 9.5px/1.2 var(--mono); text-transform: uppercase; letter-spacing: .08em; color: var(--mute); padding: 7px 10px 7px 0; border-bottom: 1px solid var(--ink); white-space: nowrap; }
.tbl td { padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.tbl td.n, .tbl th.n { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tr.hl td { background: var(--gold-ll); }
.tbl tr.ex td { color: var(--mute); text-decoration: line-through; text-decoration-color: var(--red); }

/* football field */
.ff { margin: 8px 0 4px; }
.ff-row { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line); font-size: 12px; }
.ff-row .bar { position: relative; height: 14px; background: repeating-linear-gradient(90deg, transparent 0 39px, var(--line) 39px 40px); }
.ff-row .bar i { position: absolute; top: 2px; bottom: 2px; background: var(--ink2); }
.ff-row.main .bar i { background: var(--gold); outline: 1px solid #c69a2f; }
.ff-row .bar .rg { position: absolute; top: -4px; bottom: -4px; border-left: 1px dashed var(--gold-d); border-right: 1px dashed var(--gold-d); background: rgba(212,165,55,.08); }
.ff-row span.n { text-align: right; font: 500 11px/1 var(--mono); }
.ff-axis { display: grid; grid-template-columns: 150px 1fr 90px; gap: 12px; font: 400 9.5px/1 var(--mono); color: var(--mute); padding-top: 4px; }
.ff-axis div { display: flex; justify-content: space-between; }

/* work list (Skalia preparing) */
.work { list-style: none; margin: 0; padding: 0; }
.work li { display: grid; grid-template-columns: 16px 1fr auto; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); font-size: 12.5px; }
.work li > i { width: 12px; height: 12px; border-radius: 50%; border: 1.5px solid var(--line2); }
.work li.done > i { background: var(--ink); border-color: var(--ink); }
.work li.running > i { border-color: var(--gold); border-top-color: transparent; animation: spin .9s linear infinite; }
.work li.queued > i { border-style: dashed; }
.work li.needs-you > i { background: var(--gold); border-color: var(--gold); }
.work li em { font: 500 10px/1 var(--mono); font-style: normal; color: var(--mute); }
.work li.done span { color: var(--ink2); }
.work .bar { width: 70px; height: 3px; background: var(--line); position: relative; }
.work .bar i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
@keyframes spin { to { transform: rotate(360deg); } }
.meter { height: 3px; background: var(--line); margin: 4px 0 10px; position: relative; overflow: hidden; }
.meter i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); transition: width .5s; }

/* history */
.hist { list-style: none; margin: 0; padding: 0; position: relative; }
.hist::before { content: ''; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 1px; background: var(--line2); }
.hist li { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 2px 10px; padding: 6px 0 9px; }
.hist li > i { width: 11px; height: 11px; border-radius: 50%; background: var(--card); border: 1.5px solid var(--ink2); margin-top: 3px; z-index: 1; }
.hist li.k-gate > i, .hist li.k-decision > i { background: var(--gold); border-color: #c69a2f; }
.hist li.k-phone > i, .hist li.k-call > i, .hist li.k-note > i { background: #e3e9f1; border-color: var(--blue); }
.hist li.k-pass > i { background: var(--red-l); border-color: var(--red); }
.hist li .ht { font: 400 12.5px/1.4 var(--sans); color: var(--ink); }
.hist li .hm { grid-column: 2; font: 400 10.5px/1.2 var(--mono); color: var(--mute); display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.hist li.fresh { animation: hfresh 2.4s ease-out; }
@keyframes hfresh { from { background: var(--gold-ll); } to { background: transparent; } }

/* decision panel */
.dp { display: flex; flex-direction: column; gap: 14px; }
.dph { display: flex; justify-content: space-between; align-items: center; }
.dph label { color: var(--gold-d); }
.conf { display: inline-flex; align-items: center; gap: 6px; font: 500 10px/1 var(--mono); color: var(--ink2); }
.conf i { width: 40px; height: 3px; background: var(--line); position: relative; }
.conf i s { position: absolute; left: 0; top: 0; bottom: 0; background: var(--ink); }
.dp h3 { margin: 0; font: 400 20px/1.25 var(--serif); letter-spacing: -.01em; }
.rec { padding: 10px 12px; background: var(--gold-ll); border-left: 3px solid var(--gold); }
.rec label { color: var(--gold-d); }
.rec b { display: block; margin-top: 5px; font: 600 13px/1.4 var(--sans); }
.rec.ed { background: #eef1f5; border-color: var(--blue); }
.opts { display: flex; flex-direction: column; gap: 6px; }
.opt { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; padding: 10px 12px; border: 1px solid var(--line2); background: var(--white); transition: border-color .12s, background .12s; }
.opt:hover { border-color: var(--ink); }
.opt kbd { grid-row: 1 / span 2; align-self: start; margin-top: 1px; }
.opt b { font: 600 13px/1.3 var(--sans); }
.opt span { font: 400 11.5px/1.4 var(--sans); color: var(--mute); }
.opt.o-a { background: var(--ink); color: #fff; border-color: var(--ink); }
.opt.o-a span { color: #b9b6ad; }
.opt.o-a kbd { background: transparent; color: var(--gold); border-color: #555; }
.opt.o-a:hover { background: #000; }
.inline { display: flex; flex-direction: column; gap: 6px; padding: 10px 12px; border: 1px solid var(--ink); background: var(--white); }
.inline input, .inline textarea { width: 100%; border: 0; border-bottom: 1px solid var(--line2); outline: 0; padding: 6px 0; font: 400 13.5px/1.4 var(--sans); background: none; resize: vertical; }
.inline input.err { border-bottom-color: var(--red); }
.inline .ih { font: 400 10.5px/1 var(--mono); color: var(--mute); }
.inline.pass label { color: var(--red); }
.conseq { display: flex; gap: 8px; align-items: flex-start; margin: 0; font: 400 12px/1.45 var(--sans); color: var(--ink2); padding: 9px 11px; border: 1px dashed var(--line2); }
.conseq b { font-weight: 600; color: var(--ink); }
.conseq .i { margin-top: 2px; color: var(--gold-d); }
.why p, .tacit p { margin: 6px 0 0; font: 400 13px/1.55 var(--sans); color: var(--ink2); }
.ev ul { list-style: none; margin: 6px 0 0; padding: 0; }
.ev li { position: relative; padding: 5px 0 5px 14px; font: 400 12px/1.45 var(--sans); color: var(--ink2); border-bottom: 1px solid var(--line); }
.ev li::before { content: ''; position: absolute; left: 0; top: 11px; width: 6px; height: 1px; background: var(--ink2); }
.tacit { padding: 10px 12px; background: var(--paper); border: 1px solid var(--line); }
.tacit p { font-family: var(--serif); font-style: italic; }
.dp .stamp { display: flex; align-items: center; gap: 8px; padding: 10px 12px; background: var(--gold-l); font: 600 12.5px/1.3 var(--sans); }
.dp .handoff { padding: 10px 12px; border: 1px solid var(--line2); background: var(--white); }
.dp .handoff p { margin: 5px 0 0; font-size: 12.5px; line-height: 1.5; }
.dp .reason { margin: 0; padding: 10px 12px; border-left: 3px solid var(--red); background: var(--red-l); font: italic 400 13px/1.5 var(--serif); }
.dp .sec { border-top: 1px solid var(--line); padding-top: 12px; }
.empty-s { color: var(--mute); }

/* ---------------------------------------------------------------- toasts */
#toasts { position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); display: flex; flex-direction: column; align-items: center; gap: 8px; z-index: 200; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; padding: 10px 14px 10px 12px; background: var(--ink); color: #fff; font: 500 12.5px/1.35 var(--sans); box-shadow: 0 12px 30px rgba(0,0,0,.22); pointer-events: auto; animation: tin .3s cubic-bezier(.2,.7,.2,1); max-width: 640px; }
.toast::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: var(--gold); flex: none; }
.toast.phone::before { background: #8fb0d6; }
.toast button { color: var(--gold); font-weight: 600; margin-left: 6px; }
.toast.out { opacity: 0; transform: translateY(6px); transition: .3s; }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

/* narrow board (chat panel open, or 1280 wide) */
.pt { min-width: 0; }
.pt h1 { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
body.chat .pf div:nth-child(n+3) { display: none; }
body.chat .pnav > span { display: none; }
body.chat .crumb span:last-child { display: none; }
body.chat .fdocs { display: none; }
@media (max-width: 1320px) { .pnav > span { max-width: 150px; overflow: hidden; text-overflow: ellipsis; } }
