/* Styles the app needs beyond the mock-up's. The mock-up's sheets (look.css) are copies: change them in the mock-up, not here.
   Only the design system's names are used (--ink, --soft, --line, --accent, --copper, --fs-*), never a fixed colour. */

/* an agent is always marked as one */
.chip.agentmark{font-size:var(--fs-micro,10.5px);letter-spacing:.06em;text-transform:uppercase;padding:0 6px;color:var(--soft)}

/* a card someone else just changed glows once, so the eye finds it */
@keyframes app-flash{0%{box-shadow:0 0 0 2px var(--copper,#c87d3c)}100%{box-shadow:var(--lift-1,none)}}
@media (prefers-reduced-motion:no-preference){.card.flash{animation:app-flash 2.4s ease-out 1}}
.card.flash{border-left-color:var(--copper,#c87d3c)!important}

/* the card: dates with an optional time, moving without dragging */
.date-in{display:flex;gap:4px;align-items:center}
.date-in input[type=date]{flex:1;min-width:0}
.date-in input[type=time]{width:6.5em}
.move-row{gap:4px}
.frow .hint{font-size:var(--fs-caption,12px);min-width:0;flex-basis:100%}
.check label{flex:1;cursor:pointer}
.check .btn{opacity:.5}.check:hover .btn,.check .btn:focus-visible{opacity:1}
.dr-foot{margin-top:18px;padding-top:10px;border-top:1px solid var(--line)}

/* AI access */
.try-form{display:grid;gap:10px}
.try-f{display:grid;grid-template-columns:150px minmax(0,1fr);gap:8px;align-items:center}
.try-f label code{font-size:var(--fs-caption,12px)}
.newkey{display:grid;gap:8px;border-left:2px solid var(--copper,#c87d3c)!important}
.keyline{display:flex;gap:8px;align-items:center}
.keyline code{flex:1;min-width:0;overflow-wrap:anywhere;padding:6px 8px;font-size:var(--fs-caption,12px)}

/* signed out */
.signedout{margin:12vh auto 0;width:calc(100% - 32px)}
.signedout pre{max-width:240px}

/* phone: the mock-up's narrow-window rules, plus a few for screens it does not have */
@media (max-width:900px){
  .top .btn.primary .lbl{display:none}
  .try-f{grid-template-columns:minmax(0,1fr)}
  .keyline{flex-direction:column;align-items:stretch}
  .frow .hint{display:none}
}

/* the look's round pale icon button would be a white blob in a dark toast */
.toast .btn.icon{background:transparent!important;box-shadow:none!important;color:inherit}

/* sizes that used to be inline styles (a Content-Security-Policy forbids those) */
.av-16{width:16px;height:16px;font-size:9px}.av-18{width:18px;height:18px;font-size:9px}.av-20{width:20px;height:20px;font-size:9px}
.av-22{width:22px;height:22px;font-size:9px}.av-24{width:24px;height:24px;font-size:10px}
.grow{flex:1}

/* the Changes screen */
.more-row{margin-top:12px}
.logrow .row{gap:4px;justify-content:flex-end}

/* which side you are on: My board (real cards) or Demo (the mock-up, on its own origin) */
.rail-g.side{margin-top:auto;padding-top:10px;border-top:1px solid var(--line)}
.side-switch{display:grid;grid-template-columns:1fr 1fr;border:1px solid var(--line);border-radius:999px;padding:2px;gap:2px}
.side-switch>*{display:flex;align-items:center;justify-content:center;gap:5px;padding:5px 8px;border-radius:999px;font-size:var(--fs-caption,12px);color:var(--soft);text-decoration:none}
.side-switch .on{background:var(--accent);color:var(--on-accent,#fff);font-weight:600}
.side-switch a:hover{color:var(--ink);background:var(--hover,transparent)}
.side-switch .off{opacity:.5;cursor:not-allowed}
.side-note{margin:6px 2px 0;font-size:var(--fs-micro,10.5px);color:var(--soft);line-height:1.35}

/* first run: one obvious action */
.firstrun h2{margin-top:4px}
.banner.firstrun{display:flex;align-items:center;gap:10px;flex-wrap:wrap}
.banner.firstrun span{flex:1;min-width:200px}

/* phone: the look makes the top bar transparent so the picture shows through; when it sticks while scrolling,
   the cards slid under it and read through it. On narrow screens it takes the page colour. */
@media (max-width:900px){html[data-look=gi] .top{background:var(--bg)}}

/* list view: a part's indent comes from data-lvl (set as --lvl after paint, no inline style) */
.kx-li{padding-left:calc(var(--lvl,0) * 18px)}

/* ---------- version 1.2: Parked and Cancelled, the stage pill, views (no mock-up: built from the board's own pieces) */
.kx-grid.kx-grid6{grid-template-columns:repeat(6,minmax(0,1fr))}
.vx-hidden{margin-left:4px;white-space:nowrap}
.kx-stage.s-cancelled{color:var(--mute);text-decoration:line-through;text-decoration-color:var(--line3,var(--line2))}
.col.kx-col.s-parked,.col.kx-col.s-cancelled{opacity:.92}
/* the stage pill: the same stage chip, as a quiet button that opens the stage menu */
.kx-pill{display:inline-flex;align-items:center;padding:1px 6px;border:1px solid var(--line2);background:transparent;cursor:pointer;font:inherit;color:inherit;border-radius:999px}
.kx-pill:hover,.kx-pill:focus-visible{border-color:var(--line3,var(--soft));background:var(--hover,var(--panel2))}
/* a view */
.vx-quiet{font-size:var(--fs-small,13px);margin-top:4px}
.vx-name-in{font:inherit;font-size:var(--fs-title2,24px);min-width:min(420px,80vw)}
.board.kx-board>.col.kx-col.vx-thin{flex:0 0 120px;min-width:120px;max-width:120px}
.vx-thin .col-h h3{white-space:nowrap}
.vx-thin .col-body{border:1px dashed var(--line2);min-height:120px}
.vx-tools{display:inline-flex;gap:2px;margin-left:4px;opacity:0;transition:opacity var(--t-fast,120ms)}
.vx-col .col-h:hover .vx-tools,.vx-col .col-h:focus-within .vx-tools{opacity:1}
.vx-closed{opacity:.6}
.vx-closed:hover{opacity:1}
.card .vx-moveb{position:absolute;top:6px;right:6px;opacity:0;transition:opacity var(--t-fast,120ms)}
.card:hover>.vx-moveb,.card:focus-within>.vx-moveb,.card:focus>.vx-moveb{opacity:1}
@media (hover:none),(max-width:900px){.vx-tools,.card .vx-moveb{opacity:1}}
.vx-pick-row.in{opacity:.6}
#vx-pick-r{max-height:52vh;overflow:auto}
/* Life cycle | Custom on every board, the view picker beside it, and naming a view in place */
.vx-picker{display:inline-flex;align-items:center;gap:4px;max-width:220px}
.vx-picker{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.vx-name-new,.vx-name-in.vx-name-bar{font:inherit;font-size:var(--fs-small,13px);min-width:0;width:min(220px,60vw);padding:4px 8px}
.vx-bar{display:flex;align-items:center;gap:10px;flex-wrap:wrap;margin:0 0 10px}
.vx-bar .vx-quiet{margin:0}
.card .vx-addb{margin-top:6px;justify-self:start;width:auto}
#vx-menu button.vx-mi-new{justify-content:flex-start}
.vx-tray-none{padding:8px 4px;font-size:var(--fs-small,13px)}
.vx-tray.over,.vx-tray.over-end{border-color:var(--accent)}
.vx-addto select{max-width:min(260px,100%)}
/* the small menu of a stage pill or "Move to…" */
#vx-menu .vx-menu{position:fixed;z-index:45;min-width:200px;max-width:min(300px,calc(100vw - 16px));display:grid;padding:4px;background:var(--panel);border:1px solid var(--line2);box-shadow:var(--lift-2,var(--shadow))}
#vx-menu .vx-menu-h{padding:6px 10px 4px;font-size:var(--fs-caption,12px);color:var(--soft);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
#vx-menu button{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:7px 10px;border:0;background:transparent;font:inherit;color:var(--ink);text-align:left;cursor:pointer}
#vx-menu button:hover,#vx-menu button:focus-visible{background:var(--hover,var(--panel2));outline:0}
#vx-menu button.on{font-weight:500}
#vx-menu hr{border:0;border-top:1px solid var(--line);margin:4px 0}
@media (max-width:900px){.kx-grid.kx-grid6{grid-template-columns:repeat(6,minmax(200px,1fr));min-width:1290px}}

/* drops (Eric: they must not "slip out"): every column runs to the bottom of a tall board, so a short column is still a
   tall target, and the column that will take the card is highlighted, with a line where it lands when that is the end */
.board.kx-board{min-height:60vh}
.board.kx-board>.col.kx-col{transition:background-color var(--t-fast,120ms),box-shadow var(--t-fast,120ms)}
.col.kx-col.over-end>.col-body{box-shadow:inset 0 -3px 0 var(--accent)}
.kx-sum.over-end{box-shadow:inset 0 -3px 0 var(--accent)}
@media (max-width:900px){.board.kx-board{min-height:0}}

/* ---------- version 1.3: Archive on the card face, the Archived side of a board, and deleting for good */
/* the card's small buttons sit at the end of its meta line: on hover and focus, always on touch screens */
.card-meta .card-acts{margin-left:auto;display:inline-flex;gap:3px;opacity:0;transition:opacity var(--t-fast,120ms)}
.card:hover>.card-meta>.card-acts,.card:focus-within>.card-meta>.card-acts,.card:focus>.card-meta>.card-acts{opacity:1}
@media (hover:none){.card-meta .card-acts{opacity:1}}
.card-q:hover,.card-q:focus-visible{color:var(--ink);border-color:var(--line3,var(--soft))}
/* in the archive the buttons are always there: they are what the page is for */
.ax-card>.card-meta>.card-acts{opacity:1}
.ax-board .ax-card{cursor:pointer}
.ax-col .col-h .btn{margin-left:auto}
@media (max-width:480px){.ax-col .col-h{flex-wrap:wrap;row-gap:4px}.ax-col .col-h .btn{flex-basis:100%;margin-left:0;justify-content:center}}
.ax-alone{font-size:var(--fs-caption,12px)}
.ax-gone{font-style:italic}
/* a switch that does not apply here (Life cycle | Custom and Board | List in the archive) */
.seg.ax-off{opacity:.55;cursor:not-allowed}
.seg.ax-off>span{display:inline-flex;align-items:center;gap:4px;padding:4px 10px;font-size:var(--fs-small,13px)}
.seg.ax-off>span.on{background:var(--line2);color:var(--ink);border-radius:999px}
.ax-mode a{display:inline-flex;align-items:center;gap:4px}
/* what deletes for good is never the accent colour: the design system's "bad" colour, and a word that says so */
html[data-look] .btn.danger{background:var(--bad);border-color:var(--bad);color:var(--panel)}
html[data-look] .btn.danger:hover,html[data-look] .btn.danger:focus-visible{background:var(--bad);filter:brightness(.92);color:var(--panel)}
html[data-look] .btn.ax-danger,html[data-look] .kx-ob.ax-del{color:var(--bad)}
.btn.ax-danger:hover,.kx-ob.ax-del:hover,.kx-ob.ax-del:focus-visible{color:var(--bad);border-color:var(--bad);background:var(--badbg,transparent)}
.modal.ax-ask h2 .ic{color:var(--bad)}
.kx-ask-body p{margin:0 0 6px}
.kx-ask .row{flex-wrap:wrap;justify-content:flex-end}
@media (max-width:480px){.kx-ask .row .btn{flex:1 1 100%;justify-content:center}}
/* a confirmation stacked on a phone keeps Cancel at the bottom, under the thumb; the yes is above it (review 1.3, S1) */
@media (max-width:480px){html[data-look] .kx-confirm .row{flex-direction:column-reverse;flex-wrap:nowrap;align-items:stretch}html[data-look] .kx-confirm .row .btn{flex:0 0 auto;width:100%}}
/* the yes is switched off for its first moments (CONFIRM_WAIT in ax.js), and looks it */
.kx-ask .btn.is-wait,.kx-ask .btn[disabled]{opacity:.45;cursor:wait;filter:none}
.ax-vrow{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
#ax-views{display:grid;gap:4px;max-height:52vh;overflow:auto}
@media (max-width:900px){.board.kx-board.ax-board{min-height:0}}

/* the version pill (Eric: "a pill somewhere at top so i can see"); a copy that is not the real board says which database */
.top .pill.ver{font-size:var(--fs-micro,10.5px);padding:1px 8px;margin-left:8px;color:var(--soft);font-variant-numeric:tabular-nums}
.top .pill.ver.dev{border-color:var(--copper,var(--line2));color:var(--copper,var(--soft))}
@media (max-width:480px){.top .pill.ver{margin-left:4px;padding:1px 6px}}

/* Below the view's columns, one shared area: Not sorted, or Not in this view, with a toggle when both have cards
   (Eric, 14 Nov). Full width, cards in a wrapping row, scrolls when long. */
.vx-below.col.kx-col { margin-top: 12px; width: auto; max-width: none; min-height: 0; }
.vx-below .col-h { flex-wrap: wrap; gap: 6px 12px; }
.vx-below .col-body { display: flex; flex-wrap: wrap; gap: 8px; min-height: 40px; max-height: 50vh; overflow: auto; }
.vx-below .col-body > .card { width: 260px; }
.vx-below.vx-tray { background: var(--panel2, transparent); border: 1px dashed var(--line2); }
.vx-below.over, .vx-below.over-end { border-color: var(--accent); }
.vx-below-seg button { display: inline-flex; align-items: center; gap: 6px; }
.vx-below-seg .count { font-size: var(--fs-micro, 10.5px); }
@media (max-width: 480px) { .vx-below .col-body > .card { width: 100%; } }

/* Security screen (security.js): a verdict, then rows that open for the detail */
.sx-looks{margin-bottom:14px;border-left:2px solid var(--warn)!important}.sx-looks.calm{border-left-color:var(--ok)!important}
.sx-looks h2{display:flex;gap:8px;align-items:center;margin:0 0 6px;font-size:var(--f14)}.sx-looks ul{margin:0;padding-left:18px;display:grid;gap:4px}
.sx-looks li.bad::marker{color:var(--bad)}.sx-looks li.warn::marker{color:var(--warn)}.sx-looks a{color:inherit}
.stat.warnstat b{color:var(--warn)}
.sx-row{background:var(--panel);border:1px solid var(--line);border-radius:12px;margin-bottom:8px;overflow:hidden}
.sx-h{display:flex;gap:10px;align-items:center;padding:11px 14px;color:var(--ink);text-decoration:none!important}.sx-h:hover{background:var(--hover,rgba(0,0,0,.03))}
.sx-h .muted{font-size:var(--f12)}.sx-b{padding:4px 14px 14px;display:grid;gap:10px;border-top:1px solid var(--line)}

/* sync with the hub at a glance (sync.md 7.5): a dot and a few words in the top bar. Green beats when changes cross;
   copper when the hub cannot be reached or sync is paused. Motion only decorates: reduced motion keeps the dot still. */
.top .pill.sync{margin-left:8px;font-size:var(--fs-micro,10.5px);padding:1px 8px 1px 7px;color:var(--soft);gap:6px;font-variant-numeric:tabular-nums;width:13.5em;flex:none;overflow:hidden}
.top .pill.sync span{overflow:hidden;text-overflow:ellipsis}
.top .pill.sync:hover,.top .pill.sync:focus-visible{border-color:var(--line3,var(--soft));color:var(--ink)}
.sync-dot{position:relative;display:inline-grid;place-items:center;width:7px;height:7px;border-radius:50%;background:var(--soft);font-style:normal;font-size:7px;font-weight:800;line-height:1;color:var(--paper-hi,#fff)}
.pill.sync.ok .sync-dot,.pill.sync.busy .sync-dot{background:var(--accent)}
.pill.sync.away{border-color:var(--copper,#c87d3c);color:var(--copper,#c87d3c)}
.pill.sync.away .sync-dot{background:var(--copper,#c87d3c)}
.pill.sync.paused .sync-dot{width:11px;height:11px}
.sync-dot::after{content:'';position:absolute;inset:0;border-radius:50%;background:inherit;opacity:0}
@keyframes sync-beat{0%{transform:scale(1);opacity:.55}100%{transform:scale(2.8);opacity:0}}
@keyframes sync-busy{0%,100%{opacity:1}50%{opacity:.35}}
@media (prefers-reduced-motion:no-preference){
  .pill.sync.beat .sync-dot::after{animation:sync-beat 1.2s var(--ease,ease-out) 1}
  .pill.sync.busy .sync-dot{animation:sync-busy 1s ease-in-out infinite}
}
@media (max-width:480px){.top .pill.sync{margin-left:4px;width:auto}.top .pill.sync span{display:none}}
