/* Kota: the calm forest (B Metsä, 2026-11-17). One sheet for sign-in and
   the app; colours and fonts by name in themes/<theme>.css. */

@font-face {
  font-family: "Nunito";
  src: url("fonts/nunito.woff2") format("woff2");
  font-weight: 200 1000;
  font-display: swap;
}
@font-face {
  font-family: "Bitter";
  src: url("fonts/bitter.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-display: swap;
}

/* Colours and type: themes/<theme>.css (KOTA_THEME). */

* { box-sizing: border-box; }
html { background: var(--ground); }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--ground);
  color: var(--text);
  font: 15.5px/1.5 var(--body, system-ui, sans-serif);
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }
h1, h2, h3 { font-family: var(--display); font-weight: 700; letter-spacing: -0.01em; }
p { margin: 0; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: var(--mono); font-size: 13px; }

/* ---- controls ---- */

label { font: 700 12px var(--body); color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
input, select, textarea {
  width: 100%;
  min-height: 42px;
  padding: 8px 12px;
  background: var(--panel);
  border: 1px solid var(--rule);
  border-radius: 10px;
}
input:focus, select:focus { border-color: var(--accent); outline: none; }
input.code { font: 500 24px var(--mono); letter-spacing: 0.3em; text-align: center; }
input[type="checkbox"] { width: 18px; min-height: 18px; height: 18px; accent-color: var(--accent); }

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border-radius: 999px;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.primary { background: var(--accent); color: var(--accent-ink); border: 0; }
.primary:hover { filter: brightness(1.06); }
.primary:disabled { opacity: 0.6; cursor: wait; }
.secondary { background: var(--panel); color: var(--text); border: 1px solid var(--rule); }
.secondary:hover { border-color: var(--accent); color: var(--accent); }
.danger { color: var(--warn); }
.txt {
  background: none;
  border: 0;
  padding: 0;
  color: var(--accent);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }

.status {
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  background: var(--panel);
  box-shadow: var(--shadow);
  color: var(--soft);
}
.status.error { background: var(--warn-wash); color: var(--warn); }

/* ---- sign-in ---- */

.card {
  max-width: 440px;
  margin: 0 auto;
  padding: max(56px, 10vh) 16px 80px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.card h1 { margin: 0; font-size: clamp(2.2rem, 8vw, 3rem); font-weight: 700; line-height: 1.05; }
.crumb { font: 700 13px var(--body); color: var(--muted); }
.crumb a { color: var(--muted); text-decoration: none; }
.lead { color: var(--soft); }
#methods, .method, .nostr, #nostr-app, #bunker-form { display: flex; flex-direction: column; gap: 12px; }
.method-btn { width: 100%; min-height: 46px; }
.or { display: flex; align-items: center; gap: 12px; color: var(--muted); font: 700 12px var(--body); text-transform: uppercase; letter-spacing: .06em; }
.or::before, .or::after { content: ""; flex: 1; border-top: 1px solid var(--border); }
.nostr { padding: 16px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); }
.qr { margin: 0; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 14px; }
.qr > div { width: 220px; max-width: 100%; background: #fff; border-radius: 8px; padding: 6px; line-height: 0; }
.qr svg { width: 100%; height: auto; }
.more summary { cursor: pointer; color: var(--soft); font-size: 14px; }
.more[open] { display: flex; flex-direction: column; gap: 12px; }

/* ---- app shell (Kota UX review, option A): a rail on desktop, bottom
   tabs on phones ---- */

body.app { min-height: 100vh; }
.shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); min-height: 100vh; }
.rail { border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 2px; position: sticky; top: 0; height: 100vh; }
.brand { font: 700 22px var(--display); padding: 4px 10px 16px; color: var(--text); text-decoration: none; }
.rail a.nav, .rail a.me { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-radius: 999px; color: var(--soft); text-decoration: none; font-weight: 500; min-width: 0; }
.rail a.nav:hover, .rail a.me:hover { background: var(--sunk); }
.rail a.on { background: var(--sunk); color: var(--accent); font-weight: 800; }
.rail .me span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ico { width: 22px; text-align: center; flex: none; }
.rail .sep { height: 1px; background: var(--border); margin: 10px 4px; }
.rail .later { color: var(--muted); font-size: 13px; padding: 6px 10px; }
.rail .grow { flex: 1; }
.topbar, .tabbar { display: none; }

main.page { padding: 24px 32px 48px; max-width: 1100px; width: 100%; min-width: 0; }
main.page.narrow { max-width: 760px; }
h1 { font-size: 26px; margin: 0; }
.head { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; }
.head h1, .head h2 { margin: 0; }
.sp { flex: 1; }
.page .lead { margin: -8px 0 18px; max-width: 60ch; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--rule); background: var(--panel); color: var(--text); font-weight: 700; text-decoration: none; cursor: pointer; white-space: nowrap; }
.btn:hover { border-color: var(--accent); }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn.quiet { border-color: transparent; background: transparent; color: var(--accent); padding: 0 8px; }
.btn.danger { color: var(--warn); }
.btn:disabled { opacity: 0.6; cursor: default; }
select.mini { width: auto; min-height: 32px; padding: 2px 6px; border-radius: 6px; font-size: 13.5px; }
.flabel { display: block; text-transform: none; letter-spacing: 0; font: 13px var(--body); color: var(--muted); margin-bottom: 4px; }
.check { display: flex; gap: 8px; align-items: center; text-transform: none; letter-spacing: 0; font: 14.5px var(--body); color: var(--text); }

.box { background: var(--panel); border: 1px solid transparent; border-radius: 16px; box-shadow: var(--shadow); padding: 16px; min-width: 0; }
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; }
.stack > * + * { margin-top: 12px; }
.section { margin-top: 28px; }
.section > h2 { margin: 0 0 10px; font-size: 18px; }
.list { background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.item { display: flex; gap: 12px; align-items: center; padding: 11px 14px; border-top: 1px solid var(--border); color: var(--text); text-decoration: none; min-width: 0; }
.item:first-child { border-top: 0; }
a.item:hover, .item.link:hover { background: var(--sunk); cursor: pointer; }
.item .main { flex: 1; min-width: 0; }
.item .main > b { font-weight: 700; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .main > b a { color: inherit; text-decoration: none; }
.item .main > b a:hover { color: var(--accent); }
.sub { display: block; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.end { color: var(--muted); font-size: 13px; white-space: nowrap; }
.list .none { padding: 18px 14px; color: var(--muted); }
.ficon { width: 36px; height: 36px; border-radius: 50%; background: var(--sunk); color: var(--accent); display: grid; place-items: center; flex: none; }
.ficon.big { width: 52px; height: 52px; font-size: 22px; }
a.box.place { display: flex; gap: 12px; align-items: center; text-decoration: none; color: var(--text); }
a.box.place:hover { border-color: var(--accent); }
.place .main { flex: 1; min-width: 0; }
.place b { display: block; }

.avatar.on { position: relative; overflow: visible; }
.avatar.on::after { content: ""; position: absolute; right: -2px; bottom: -2px; width: 9px; height: 9px; border-radius: 50%; background: var(--ok); border: 2px solid var(--panel); }
img.avatar.on { outline: 2px solid var(--ok); outline-offset: 1px; }
.avatars { display: inline-flex; }
.avatars .avatar { margin-left: -6px; border: 2px solid var(--panel); }
.avatars .avatar:first-child { margin-left: 0; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 2px 9px; border-radius: 999px; background: var(--sunk); color: var(--soft); font-size: 12.5px; white-space: nowrap; border: 0; }
.chip.warn { color: var(--warn); background: var(--warn-wash); }
.chip.ok { color: var(--ok); background: var(--ok-wash); }
button.chip { cursor: pointer; border: 1px solid transparent; }
button.chip.on { border-color: var(--accent); color: var(--text); font-weight: 600; }
.badge { display: inline-block; padding: 1px 8px; border-radius: 99px; background: var(--sunk); color: var(--soft); font: 700 12px var(--body); }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--border); margin-right: 4px; vertical-align: middle; }
.dot.on { background: var(--ok); }

.crumbs { font: 500 20px var(--display); display: flex; gap: 6px; flex-wrap: wrap; align-items: center; min-width: 0; }
.crumbs a { color: var(--soft); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs .s { color: var(--muted); }

.split { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.details h2 { margin: 0; font-size: 18px; overflow-wrap: anywhere; }
.details h3, .dialog-h3 { font: 800 12px var(--body); text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 16px 0 8px; }
ul.feed { list-style: none; margin: 0; padding: 0; font-size: 13.5px; display: flex; flex-direction: column; }
ul.feed li { display: flex; gap: 8px; padding: 5px 0; align-items: flex-start; }
ul.feed li .grow { flex: 1; min-width: 0; overflow-wrap: anywhere; }
ul.feed a { color: var(--text); text-decoration: none; }
ul.feed a:hover { color: var(--accent); }
.meter { height: 6px; background: var(--sunk); border-radius: 3px; overflow: hidden; margin-top: 6px; }
.meter > div { height: 100%; background: var(--accent); }
.drop { outline: 2px dashed var(--accent); outline-offset: 4px; }
.menu { position: relative; }
.menu > summary { list-style: none; cursor: pointer; padding: 4px 8px; border-radius: 6px; color: var(--muted); }
.menu > summary::-webkit-details-marker { display: none; }
.menu > summary:hover { background: var(--sunk); }
.menu > div { position: absolute; right: 0; top: 100%; z-index: 4; background: var(--panel); border: 1px solid var(--border); border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.12); display: flex; flex-direction: column; min-width: 140px; padding: 4px; }
.menu > div button { text-align: left; background: none; border: 0; padding: 8px 10px; border-radius: 6px; cursor: pointer; }
.menu > div button:hover { background: var(--sunk); }

ol.steps { list-style: none; padding: 0; margin: 8px 0 0; }
ol.steps > li { display: flex; gap: 12px; align-items: center; padding: 12px 0; border-top: 1px solid var(--border); }
ol.steps > li:first-child { border-top: 0; }
ol.steps .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
ol.steps .done .n { background: var(--ok); border-color: var(--ok); color: var(--ground); }
ol.steps .done .main > b { text-decoration: line-through; color: var(--muted); }
ol.steps .main { flex: 1; min-width: 0; }
ol.steps .main > b { display: block; }

.ptabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; scrollbar-width: none; }
.ptabs a, .ptabs span { padding: 8px 12px; color: var(--soft); text-decoration: none; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; }
.ptabs a.on { color: var(--text); border-color: var(--accent); font-weight: 800; }
.ptabs .later { color: var(--muted); font-style: italic; }

table.table { width: 100%; border-collapse: collapse; background: var(--panel); box-shadow: var(--shadow); border-radius: 16px; overflow: hidden; font-size: 14px; }
table.table th { text-align: left; font-weight: 600; color: var(--muted); font-size: 12.5px; padding: 9px 12px; background: var(--sunk); }
table.table td { padding: 10px 12px; border-top: 1px solid var(--border); vertical-align: middle; }
table.table td .avatar { vertical-align: middle; margin-right: 6px; }

/* dialogs */
dialog { width: min(520px, calc(100vw - 32px)); max-height: calc(100vh - 32px); border: 0; border-radius: 18px; background: var(--panel); color: var(--text); padding: 20px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
dialog::backdrop { background: rgba(10, 22, 12, 0.5); }
dialog h2 { margin: 0; font-size: 20px; padding-right: 36px; overflow-wrap: anywhere; }
dialog .x { position: absolute; right: 12px; top: 12px; }
dialog hr { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.dlg-end { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; flex-wrap: wrap; }
ul.who { list-style: none; padding: 0; margin: 8px 0 0; display: flex; flex-direction: column; }
ul.who li { display: flex; gap: 10px; align-items: center; padding: 7px 0; }
ul.who li .main { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.inline { display: flex; gap: 8px; flex-wrap: wrap; }
.inline > input, .inline > select:not(.mini) { flex: 1 1 160px; width: auto; }
.grow { flex: 1 1 6em; min-width: 0; overflow-wrap: anywhere; }
.wrap { overflow-wrap: anywhere; word-break: break-all; }
.toast { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); max-width: calc(100vw - 32px); padding: 10px 18px; border-radius: 999px; background: var(--text); color: var(--ground); z-index: 30; }
.toast.error { background: var(--warn); color: var(--ground); }
details > summary { cursor: pointer; }

/* avatars */
.avatar { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; border-radius: 50%; object-fit: cover; background: var(--sunk); border: 1px solid var(--border); color: var(--soft); font: 700 13px var(--body); }
.avatar.small { width: 22px; height: 22px; font-size: 10px; }
.avatar.large { width: 56px; height: 56px; font-size: 20px; }
.profile-head { display: flex; gap: 14px; align-items: center; min-width: 0; }
.profile-head h2 { margin: 0; }
.profile-head p { overflow-wrap: anywhere; }

@media (max-width: 1000px) {
  .split { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 760px) {
  .shell { display: block; }
  .rail { display: none; }
  .topbar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); position: sticky; top: 0; background: var(--ground); z-index: 5; }
  .topbar .brand { font-size: 20px; flex: 1; padding: 0; }
  .tabbar { display: grid; grid-template-columns: repeat(6, 1fr); position: fixed; left: 0; right: 0; bottom: 0; background: var(--panel); border-top: 1px solid var(--border); padding-bottom: env(safe-area-inset-bottom); z-index: 5; }
  .tabbar a { display: flex; flex-direction: column; align-items: center; gap: 1px; padding: 7px 0 8px; font-size: 10.5px; min-width: 0; color: var(--muted); text-decoration: none; }
  .tabbar a .ico { font-size: 19px; line-height: 1.2; }
  .tabbar a.on { color: var(--accent); font-weight: 800; }
  main.page { padding: 16px 16px 96px; }
  h1 { font-size: 22px; }
  .hide-phone { display: none !important; }
  .toast { bottom: 80px; }
}
@media (min-width: 761px) { .only-phone { display: none !important; } }

/* ---- get started ---- */

.card.wide { max-width: 720px; }
.step { display: flex; flex-direction: column; gap: 8px; padding-top: 12px; border-top: 1px solid var(--border); }
.step h2 { margin: 6px 0 0; font-size: 20px; }
.step h3 { margin: 8px 0 0; font-size: 15px; color: var(--soft); }
pre.cmd {
  margin: 0;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  font: 14px var(--mono);
  overflow-x: auto;
  user-select: all;
}
.downloads { margin: 8px 0; padding-left: 20px; }

.guide ul, .guide ol { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 6px; }
.guide .kinds { list-style: none; padding-left: 4px; }
.toc { line-height: 1.9; }
.faq dt { font-weight: 600; margin-top: 10px; }
.faq dd { margin: 4px 0 0; color: var(--soft); }
#by-avatar:empty { display: none; }

/* ---- front page ---- */

.hero { max-width: 640px; margin: 0 auto; padding: 40px 16px 56px; }
.hero h1 { font-size: 34px; line-height: 1.15; margin-top: 8px; }
.hero .lead { margin: 10px 0 18px; }
.hero .uses { display: grid; gap: 10px; margin-top: 22px; }
.hero .uses .box { display: flex; gap: 12px; align-items: flex-start; }
.hero .lang { float: right; }
.hero .techies { margin-top: 22px; }
.hero .invite-note { margin-top: 12px; }

/* Requests waiting for the person's confirmation (core, "AI as a first-class user") */
.confirms:empty { display: none; }
.confirms { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.box.confirm { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; border-color: var(--spark); }
.box.confirm .main { flex: 1; min-width: 200px; }
.caps { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-top: 6px; }
.presets { border: 0; padding: 0; margin: 0; }
.presets .check { align-items: flex-start; }
.presets details { margin-top: 4px; }
.caps-pick { margin-top: 6px; } .caps-pick select { width: auto; }

/* ---- icons and the mark (B Metsä): 1.75 px rounded line, a pale green
   duotone fill, the spark only in the fire ---- */
.ic { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; vertical-align: middle; }
.ic .f { fill: color-mix(in srgb, var(--mark-lit) 30%, transparent); }
.ic .h { fill: color-mix(in srgb, var(--spark) 40%, transparent); }
.ic.sm { width: 16px; height: 16px; margin-right: 4px; vertical-align: -3px; }
.ficon.big .ic { width: 28px; height: 28px; }
.avatar .ic.sm { margin: 0; }
.ico .ic { display: block; margin: 0 auto; }
.sees { display: inline; }
.mark { width: 30px; height: 30px; flex: none; }
.mark .mk-pole { stroke: var(--mark-pole); stroke-width: 3.4; stroke-linecap: round; fill: none; }
.mark .mk-lit { fill: var(--mark-lit); }
.mark .mk-shade { fill: var(--mark-shade); }
.mark .mk-door { fill: var(--mark-door); }
.mark .mk-flame { fill: var(--mark-flame); }
.mark .mk-flame-in { fill: var(--mark-flame-in); }
.brand { display: flex; align-items: center; gap: 8px; }
.topbar .brand .mark { width: 26px; height: 26px; }
.crumb .mark, .signin-mark { width: 44px; height: 44px; }
.brandline { display: flex; align-items: center; gap: 10px; }
p.brandline { font: 700 22px var(--display); color: var(--text); }
h1.brandline .signin-mark { width: 56px; height: 56px; }

/* Spaces (Kota people and spaces, step 3) */
.acc { display: flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.sico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--sunk); }
.sico.big { width: 52px; height: 52px; border-radius: 14px; }
.sico.me { background: color-mix(in srgb, var(--sunk) 70%, #c9bfa6); }
.sico.c { background: color-mix(in srgb, var(--sunk) 70%, #9fc8bd); }
.sico.g { background: color-mix(in srgb, var(--sunk) 70%, #a9c88f); }
.sico.p { background: color-mix(in srgb, var(--sunk) 70%, #9cc2c6); }
.glabel { display: flex; align-items: center; gap: 8px; margin: 22px 0 8px; font: 600 12px var(--mono, monospace); text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 10px; }
.chips button { border: 1px solid var(--border); background: var(--panel); color: inherit; border-radius: 999px; padding: 4px 12px; font-size: 13px; cursor: pointer; }
.chips button.on { background: var(--text); color: var(--ground); border-color: var(--text); }
.sphead { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; margin: 8px 0 14px; }
.sphead .t { flex: 1; min-width: 200px; }
.sphead .acc { font-size: 14px; }
.pick-people { display: flex; flex-direction: column; gap: 6px; max-height: 260px; overflow-y: auto; }
.pick-people .check { display: flex; align-items: center; gap: 8px; }
.item > select { width: auto; max-width: 55%; flex: 0 1 auto; }
.item > .main { min-width: 0; }

/* Agents page */
.agent .dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; align-self: flex-start; background: var(--muted); }
.agent .dot.needs-you { background: #e5534b; }
.agent .dot.working { background: #4c8eda; }
.agent .dot.done, .tally .dot.done { background: var(--ok); }
.tallies { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; margin: 4px 0 6px; }
.tally { display: inline-flex; align-items: center; gap: 6px; }
.tally .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); }
.tally .dot.needs-you { background: #e5534b; }
.tally .dot.working { background: #4c8eda; }
.agent .main { display: flex; flex-direction: column; gap: 2px; }
.agent .needs { color: #b5382f; font-size: 13.5px; font-weight: 600; }
.agent .doing { font-size: 13.5px; overflow-wrap: anywhere; }
.agent details summary { cursor: pointer; color: var(--soft); }
.agent details p { margin: 6px 0 0; overflow-wrap: anywhere; }
details.older { margin-top: 8px; }
@media (max-width: 640px) {
  .item.agent { flex-wrap: wrap; }
  .item.agent > .main { flex: 1 1 calc(100% - 40px); }

}
.agent .main > b { white-space: normal; overflow-wrap: anywhere; }
.agent .acts { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; }
.glabel .linkish { margin-left: auto; background: none; border: 0; color: var(--accent); font: 600 13px var(--body); cursor: pointer; text-transform: none; letter-spacing: 0; }
@media (max-width: 640px) { .item.agent > .acts { margin-left: 24px; flex-direction: row; } }

/* Signed-out pages (Kota welcome and onboarding): one calm column */
.out { min-height: 100vh; display: flex; flex-direction: column; }
.out-top { display: flex; align-items: center; gap: 10px; padding: 14px 20px; max-width: 1040px; width: 100%; margin: 0 auto; }
.out-top .brand { display: flex; align-items: center; gap: 9px; font: 700 21px var(--display); color: var(--text); text-decoration: none; flex: 1; }
.out .col { width: 100%; max-width: 640px; margin: 0 auto; padding: 24px 20px 48px; }
.fhero { padding-top: 6vh; }
.fhero h1 { font-size: 40px; line-height: 1.12; letter-spacing: -0.02em; }
.out .lead { font-size: 18px; line-height: 1.6; margin: 16px 0 26px; max-width: none; color: var(--soft); }
.out .lead b { color: var(--text); }
.out .actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.btn.big { min-height: 48px; padding: 0 22px; font-size: 16px; justify-content: center; border-radius: 999px; }
.out .hint { color: var(--muted); font-size: 14px; margin-top: 14px; }
.out-foot { margin-top: auto; padding: 18px 20px 26px; text-align: center; color: var(--muted); font-size: 13px; }
.out-foot a { color: var(--muted); }
.hl { display: grid; gap: 22px; margin-top: 52px; }
.hl .it, .feat .f { display: flex; gap: 14px; align-items: flex-start; }
.fic { width: 42px; height: 42px; border-radius: 12px; background: var(--sunk); color: var(--accent); display: grid; place-items: center; flex: none; }
.fic svg { width: 22px; height: 22px; }
.hl b, .feat b { font: 600 17px var(--display); display: block; margin-bottom: 2px; }
.hl p, .feat p { color: var(--soft); font-size: 15px; margin: 0; }
.more-link { display: inline-block; margin-top: 30px; font-weight: 650; text-decoration: none; }
.feat { display: grid; gap: 4px; margin-top: 18px; }
.feat .f { padding: 16px 0; border-top: 1px solid var(--border); }
.feat .f:first-child { border-top: 0; }
.feat p + p { margin-top: 6px; }
.feat .ex { color: var(--muted); font-size: 13.5px; }
@media (min-width: 900px) {
  .out.wide .col#front { max-width: 980px; }
  .fhero { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; }
  .fhero h1 { font-size: 48px; }
  .hl { margin-top: 0; }
}
.out .actions.after { margin-top: 26px; }

/* An invite on top of the sign-in (Kota welcome W5) */
.invite-card { margin: 4px 0 14px; }
.invite-card .inv { display: flex; gap: 12px; align-items: center; background: var(--sunk); border-radius: 14px; padding: 12px 14px; margin-bottom: 12px; text-align: left; }
.invite-card .inv b { display: block; }
.invite-card .what { color: var(--soft); font-size: 14px; }
.invite-card .quote { border-left: 3px solid var(--bark); padding: 4px 0 4px 12px; color: var(--soft); font-style: italic; margin: 0 0 12px; text-align: left; font-size: 15px; }
.invite-card .facts { list-style: none; padding: 0; margin: 0 0 6px; display: grid; gap: 6px; font-size: 14.5px; color: var(--soft); text-align: left; }
.invite-card .facts li { display: flex; gap: 8px; }
.invite-card .facts li::before { content: "✓"; color: var(--ok); font-weight: 800; }

/* Getting started: the first-run question and the checklist card */
.welcome { max-width: 560px; }
.welcome .namebox { display: flex; gap: 12px; align-items: center; margin: 8px 0 22px; }
.welcome h2 { font-size: 20px; }
.choices { display: grid; gap: 10px; margin-top: 14px; }
.choice { display: flex; gap: 14px; align-items: center; padding: 16px; border-radius: 16px; background: var(--panel); box-shadow: var(--shadow); color: var(--text); text-align: left; border: 2px solid transparent; cursor: pointer; font: inherit; }
.choice:hover { border-color: var(--accent); }
.choice .main { display: flex; flex-direction: column; }
.choice b { font: 600 17px var(--display); }
.choice .s { color: var(--soft); font-size: 14px; }
.choice .go { margin-left: auto; color: var(--muted); font-size: 20px; }
.check-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--soft); margin-top: 22px; }
.cl { background: var(--panel); border-radius: 18px; box-shadow: var(--shadow); overflow: hidden; margin-bottom: 18px; }
.cl-head { padding: 16px 18px 12px; display: flex; gap: 12px; align-items: center; }
.cl-head h2 { font-size: 20px; flex: 1; margin: 0; }
.cl-head .from { color: var(--muted); font-size: 13.5px; display: block; font-family: var(--body); font-weight: 500; margin-top: 2px; }
.ring { width: 46px; height: 46px; flex: none; }
.ring circle { fill: none; stroke-width: 5; }
.ring .t { stroke: var(--sunk); }
.ring .p { stroke: var(--accent); stroke-linecap: round; transform: rotate(-90deg); transform-origin: 50% 50%; }
.ring text { font: 700 12px var(--body); fill: var(--text); }
.st { border-top: 1px solid var(--border); }
.st > .t { display: flex; gap: 12px; align-items: center; padding: 12px 18px; }
.st .n { width: 28px; height: 28px; border-radius: 50%; border: 2px solid var(--rule); display: grid; place-items: center; font-weight: 750; font-size: 13px; flex: none; color: var(--muted); }
.st .tt { flex: 1; font-weight: 650; }
.st .opt { color: var(--muted); font-weight: 500; font-size: 13px; }
.st.done .n { background: var(--ok); border-color: var(--ok); color: var(--panel); }
.st.done .tt { color: var(--muted); }
.st.now .n { border-color: var(--accent); color: var(--accent); }
.st.soon { opacity: .6; }
.st .sb { padding: 0 18px 14px 58px; display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.st .sb pre.cmd { align-self: stretch; }
.linkish { background: none; border: 0; color: var(--accent); font: 600 14px var(--body); cursor: pointer; padding: 0; }
.welcome label.check-line { text-transform: none; letter-spacing: 0; font: 14px/1.45 var(--body); color: var(--soft); }
/* Sign-in: "Your identity is yours" (welcome design) */
details.why { margin-top: 18px; text-align: center; }
details.why summary { color: var(--accent); font-size: 14px; list-style: none; }
details.why summary::-webkit-details-marker { display: none; }
details.why p { text-align: left; margin-top: 8px; background: var(--sunk); border-radius: 10px; padding: 10px 12px; color: var(--soft); }

/* Your picture (profile.js): a round frame to place and zoom it in. */
.avatar-btn { padding: 0; border: 0; background: none; border-radius: 50%; cursor: pointer; }
.avatar-btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.crop { position: relative; width: min(280px, 70vw); aspect-ratio: 1; margin: 12px auto 0; border-radius: 12px; overflow: hidden; background: var(--sunk); touch-action: none; cursor: grab; user-select: none; }
.crop.has:active { cursor: grabbing; }
.crop canvas { position: absolute; inset: 0; width: 100%; height: 100%; }
.crop-ring { position: absolute; inset: 0; border-radius: 50%; box-shadow: 0 0 0 999px rgb(0 0 0 / 0.45); pointer-events: none; }
.crop:not(.has) .crop-ring { display: none; }
.crop-hint { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; text-align: center; padding: 20px; color: var(--soft); pointer-events: none; }
.crop.has .crop-hint { display: none; }
.crop-zoom { justify-content: center; margin-top: 10px; }
.crop-zoom input { width: min(220px, 55vw); }

/* A space's Chat tab (Kota chat and live design §4.11): the people strip,
   the chat (the shared live feed) and its input. */
.strip { display: flex; gap: 10px; overflow-x: auto; padding: 2px 0 12px; scrollbar-width: thin; }
.strip .tile { flex: none; width: 84px; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 10px 4px 8px; background: var(--panel); border-radius: 14px; box-shadow: var(--shadow); }
.strip .tile span { font-size: 12.5px; color: var(--soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatbox { display: flex; flex-direction: column; height: calc(100vh - 330px); min-height: 320px; background: var(--panel); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden; }
.chatbox .feed-lines { flex: 1; overflow-y: auto; list-style: none; margin: 0; padding: 12px 14px; display: flex; flex-direction: column; gap: 4px; overflow-wrap: anywhere; }
.chatbox .feed-lines li { line-height: 1.45; white-space: pre-wrap; }
.chatbox .feed-time { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-right: 2px; }
.chatbox .feed-lines b { font-weight: 800; }
.chatbox .feed-mark { color: var(--muted); font-style: normal; font-size: 13px; }
.chatbox li.system { color: var(--muted); font-style: italic; }
.chatbox li.interim .feed-text { color: var(--muted); }
.chatbox li.gone .feed-text { color: var(--muted); font-style: italic; }
.chatbox .feed-day { align-self: center; color: var(--muted); font-size: 12.5px; margin: 10px 0 4px; padding: 2px 10px; border-radius: 10px; background: var(--sunk); white-space: normal; }
.chatbox .feed-empty { flex: 1; padding: 18px 14px; color: var(--muted); }
.chatbox .feed-note { margin: 0 14px 8px; padding: 6px 10px; border-radius: 10px; background: var(--warn-wash); color: var(--warn); }
.chatbox .feed-form { display: flex; gap: 8px; align-items: flex-end; padding: 10px; border-top: 1px solid var(--border); }
.chatbox .feed-input { flex: 1; min-width: 0; resize: none; font-size: 16px; padding: 9px 12px; border: 1px solid var(--rule); border-radius: 12px; background: var(--ground); line-height: 1.4; max-height: 160px; }
.chatbox .feed-send { flex: none; width: 42px; height: 40px; border: 0; border-radius: 12px; background: var(--accent); color: var(--accent-ink); font-weight: 800; cursor: pointer; }
.chatbox .feed-extra:empty { display: none; }
.chatbox .feed-remove { display: none; }
.chatbox > p.small { padding: 10px 14px; border-top: 1px solid var(--border); }
@media (max-width: 700px) { .chatbox { height: calc(100vh - 260px); } }

/* Live (Kota chat and live design §4.7, §4.11, §4.12): the strip's tiles,
   the join panel, the fixed top bar, the "● 3 live" marks. */
.strip .tile { cursor: default; }
.strip .tile-pic { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; overflow: hidden; }
.strip .tile-pic video { width: 100%; height: 100%; object-fit: cover; }
.strip .tile.live .tile-pic:has(video) { width: 112px; height: 64px; border-radius: 10px; }
.strip .tile:has(video) { width: 124px; }
.strip .tile.speaking .tile-pic { box-shadow: 0 0 0 3px var(--spark); }
.strip .tile.live .tile-name::before { content: "● "; color: var(--spark); }
.strip .tile.muted .tile-name::after { content: " 🔇"; }
.strip .tile-name { font-size: 12.5px; color: var(--soft); max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chatbox .feed-join { flex: none; height: 40px; white-space: nowrap; }
.livemark { color: var(--spark); font-size: 12.5px; font-weight: 800; white-space: nowrap; }
.jstage { position: relative; aspect-ratio: 16 / 9; background: var(--sunk); border-radius: 12px; overflow: hidden; display: grid; place-items: center; }
.jstage video { width: 100%; height: 100%; object-fit: cover; transform: scaleX(-1); }
.jpanel select { width: 100%; }
.jlevel { height: 6px; border-radius: 3px; background: var(--sunk); margin-top: 6px; overflow: hidden; }
.jlevel span { display: block; height: 100%; width: 0; background: var(--ok); transition: width 80ms linear; }
.livebar { position: fixed; top: 0; left: 0; right: 0; z-index: 50; height: 46px; display: flex; align-items: center; gap: 8px; padding: 0 14px; background: var(--panel); border-bottom: 1px solid var(--border); box-shadow: var(--shadow); white-space: nowrap; overflow: hidden; }
.livebar .dot { width: 10px; height: 10px; border-radius: 50%; background: var(--spark); flex: none; }
.livebar a { font-weight: 800; color: var(--text); text-decoration: none; overflow: hidden; text-overflow: ellipsis; }
.livebar .speaking { color: var(--soft); font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.livebar .grow { flex: 1; }
.livebar .lb { width: 38px; height: 34px; border-radius: 10px; border: 1px solid var(--rule); background: var(--ground); cursor: pointer; flex: none; }
.livebar .lb.on { background: var(--sunk); border-color: var(--accent); }
.livebar .btn.small { padding: 5px 12px; }
body.is-live { padding-top: 46px; }
body.is-live .rail { top: 46px; height: calc(100vh - 46px); }
@media (max-width: 700px) { .livebar .speaking, .livebar .muted, .livebar .tmark { display: none; } }
.stage { margin-bottom: 12px; border-radius: 14px; overflow: hidden; background: #111; aspect-ratio: 16 / 9; max-height: 42vh; display: grid; place-items: center; }
.stage video { width: 100%; height: 100%; object-fit: contain; }
.stage:not([hidden]) + .chatbox { height: calc(58vh - 330px); min-height: 240px; }
body.is-live .chatbox { height: calc(100vh - 376px); }
body.is-live .stage:not([hidden]) + .chatbox { height: calc(58vh - 376px); }
.strip .tile[tabindex] { cursor: pointer; }
.tnotes:empty { display: none; }
.tnote { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-size: 13.5px; color: var(--soft); margin: 0 0 10px; }
.tnote.on { color: var(--text); }
.tnote .btn.small { padding: 3px 10px; font-size: 13px; }
.jpanel .tnote { margin: 0; }
.livebar .tmark { font-size: 12.5px; font-weight: 800; color: var(--bark); border: 1px solid var(--bark); border-radius: 999px; padding: 1px 8px; }
@media (max-width: 700px) {
  .strip .tile { width: 68px; padding: 6px 2px; }
  .strip .tile-pic { width: 44px; height: 44px; }
  .strip .tile.live .tile-pic:has(video) { width: 78px; height: 44px; }
  .strip .tile:has(video) { width: 88px; }
  .chatbox, body.is-live .chatbox { height: calc(100dvh - 330px); min-height: 280px; }
  .stage:not([hidden]) + .chatbox, body.is-live .stage:not([hidden]) + .chatbox { height: calc(70dvh - 330px); min-height: 220px; }
  .tnote { font-size: 12.5px; }
}
.strip .tile-pic > .avatar { width: 100%; height: 100%; }

/* Feedback (feedback.js): a small button in the corner, the box. */
.fb-open { position: fixed; right: 12px; bottom: 12px; z-index: 25; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--border); background: var(--panel); color: var(--muted); font: inherit; font-size: 13px; cursor: pointer; opacity: .85; }
.fb-open:hover { opacity: 1; color: var(--text); }
dialog.fb textarea { width: 100%; margin-top: 10px; }
.fb-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.fb-shot { display: block; max-width: 100%; max-height: 220px; margin-top: 10px; border: 1px solid var(--border); border-radius: 8px; }
.toast .linkish { color: inherit; text-decoration: underline; }
@media (max-width: 760px) { .fb-open { bottom: 76px; right: 8px; } }
/* Never over a chat's send button, at any width. */
body:has(.chatbox) .fb-open { display: none; }
.sphead .livejoin { flex: none; }

/* Confirmations per connected app (Account → Connected apps). */
.conf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.conf-row span { flex: 1; min-width: 0; }

/* What a page is (Kosti, 2026-11-18): Space or Group, beside the name. */
h1 .chip.type { font-family: var(--body); font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; vertical-align: middle; padding: 2px 8px; position: relative; top: -3px; }
.backline a { white-space: nowrap; }
.item > a.main { text-decoration: none; color: inherit; }
.sticky-tabs { position: sticky; top: 0; z-index: 5; background: var(--ground); padding-top: 4px; }

/* Connected apps: one card each (Account → Connected apps). */
.app-card { border: 1px solid var(--border); border-radius: 12px; padding: 12px 14px; background: var(--panel); display: grid; gap: 12px; }
.app-card + .app-card { margin-top: 10px; }
.app-head { display: flex; align-items: center; gap: 12px; }
.app-head .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.app-grid { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 10px 14px; align-items: start; }
.app-grid .flabel { margin: 8px 0 0; }
.app-grid select { max-width: 320px; }
@media (max-width: 560px) { .app-grid { grid-template-columns: 1fr; gap: 4px; } .app-grid .flabel { margin-top: 8px; } }
.conf-cat { border-top: 1px solid var(--border); padding-top: 8px; }
.conf-cat:first-child { border-top: 0; padding-top: 0; }
.conf-each { margin: 4px 0 0 12px; }
.conf-each .conf-row { margin-top: 6px; }
/* The live bar's buttons: line icons; struck through and red when off (Kosti, 2026-11-17). */
.livebar .lb { display: inline-grid; place-items: center; color: var(--text); padding: 0; }
.livebar .lb .ic { width: 20px; height: 20px; }
.livebar .lb.off { color: var(--warn); border-color: var(--warn); background: var(--warn-wash); }
.livebar .lb.off .ic .f { fill: none; }
.livebar .lb.share { color: var(--soft); }
.livebar .lb.share.on { color: var(--accent); }
.livebar .lb.leave { width: auto; display: inline-flex; gap: 6px; padding: 0 12px; background: var(--warn); border-color: var(--warn); color: #fff; font-weight: 800; }
.livebar .lb.leave .ic .f { fill: rgba(255, 255, 255, .35); }
@media (max-width: 700px) { .livebar .lb.leave span { display: none; } .livebar .lb.leave { padding: 0 10px; } }
/* Live now: every space where someone is live, with Join. */
.livenow { margin: 4px 0 22px; }
.livenow h2 { font-size: 17px; margin: 0 0 10px; display: flex; align-items: center; gap: 4px; }
.livenow h2 .ic { color: var(--spark); width: 20px; height: 20px; }
.livenow .item .main b a { color: inherit; text-decoration: none; }
.livenow .avatars { flex: none; }
