/* ═══════════════════════════════════════════════════════════════
   Keep Climbing v21 — editorial interface
   Exo 2 italic throughout (FHM brand). Paper, ink, hairlines, real photography.
   ═══════════════════════════════════════════════════════════════ */
:root {
  --paper: #F5F3EE; --paper-2: #EEEBE4; --card: #FFFFFF; --ink: #0E1A26; --ink-2: #364452; --muted: #7B8692; --faint: #A9B1B9;
  --rule: #E3DFD7; --rule-2: #D3CEC4; --navy: #0C3C60; --green: #A0D96D; --green-ink: #3E6E1A; --red: #B4412F; --amber: #A86B12; --blue: #2B5F8F;
  --accent: var(--navy); --accent-2: var(--green);
  --shadow: 0 1px 2px rgba(14,26,38,.04), 0 8px 28px rgba(14,26,38,.07); --shadow-lg: 0 24px 80px rgba(14,26,38,.22);
  --r: 14px; --r-sm: 9px; --rail: 252px; --ease: cubic-bezier(.22,.8,.24,1); --spring: cubic-bezier(.34,1.4,.64,1);
  --fb: #1877F2; --ig: #D62976; --li: #0A66C2; --ghl: #F59E0B;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --paper: #0D1218; --paper-2: #121921; --card: #151C25; --ink: #ECEFF2; --ink-2: #C3CBD3; --muted: #8B97A3; --faint: #5D6974; --rule: #232D38; --rule-2: #2E3A46; --navy: #8DB8DD; --green-ink: #A0D96D; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark; } }
:root[data-theme="dark"] { --paper: #0D1218; --paper-2: #121921; --card: #151C25; --ink: #ECEFF2; --ink-2: #C3CBD3; --muted: #8B97A3; --faint: #5D6974; --rule: #232D38; --rule-2: #2E3A46; --navy: #8DB8DD; --green-ink: #A0D96D; --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 28px rgba(0,0,0,.35); color-scheme: dark; }

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--paper); color: var(--ink); font: italic 400 15px/1.55 'Exo 2', system-ui, sans-serif; -webkit-font-smoothing: antialiased; overflow-x: hidden; }
@supports (overflow: clip) { html, body { overflow-x: clip; } }
button, input, select, textarea { font: inherit; font-style: italic; color: inherit; }
a { color: inherit; text-decoration-color: var(--rule-2); text-underline-offset: 3px; }
a:hover { text-decoration-color: currentColor; }
img { display: block; max-width: 100%; }
::selection { background: var(--green); color: #0E1A26; }
h1, h2, h3, h4 { margin: 0; font-weight: 300; letter-spacing: -.02em; line-height: 1.08; }
p { margin: 0 0 .8em; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ─── boot ─── */
.boot { position: fixed; inset: 0; display: grid; place-content: center; justify-items: center; gap: 14px; background: var(--paper); z-index: 99; transition: opacity .5s var(--ease), visibility .5s; }
.boot.gone { opacity: 0; visibility: hidden; }
.boot-mark { width: 44px; height: 44px; border-radius: 12px; background: var(--ink); position: relative; animation: breathe 1.6s var(--ease) infinite; }
.boot-mark::after { content: ''; position: absolute; left: 11px; right: 11px; top: 18px; height: 6px; border-radius: 3px; background: var(--green); }
.boot-word { font-weight: 700; letter-spacing: .3em; text-transform: uppercase; font-size: 12px; color: var(--muted); }
@keyframes breathe { 50% { transform: scale(.92); } }

/* ─── shell ─── */
.shell { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; min-height: 100dvh; }
.rail { position: sticky; top: 0; height: 100vh; height: 100dvh; display: flex; flex-direction: column; border-right: 1px solid var(--rule); padding: 20px 16px 16px; gap: 6px; background: var(--paper); z-index: 5; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 14px; }
.brand-mark { width: 34px; height: 34px; flex: none; border-radius: 9px; display: block; }
.brand-word { font-weight: 800; font-size: 13px; letter-spacing: .26em; text-transform: uppercase; line-height: 1.1; }
.brand-word small { display: block; font-weight: 500; letter-spacing: .14em; font-size: 12px; color: var(--muted); }
.switcher { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); cursor: pointer; text-align: left; transition: border-color .2s, box-shadow .2s, transform .2s var(--ease); }
.switcher:hover { border-color: var(--rule-2); box-shadow: var(--shadow); }
.switcher:active { transform: scale(.985); }
.sw-img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; background: var(--paper-2); flex: none; }
.sw-txt { min-width: 0; flex: 1; }
.sw-name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sw-sub { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav { display: flex; flex-direction: column; gap: 1px; margin-top: 10px; overflow-y: auto; min-height: 0; flex: 0 1 auto; }
.rail > :not(.nav) { flex-shrink: 0; }   /* a long nav scrolls; the logo, switcher and New post / New email buttons never get squashed */
.nav-label { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); padding: 14px 10px 6px; }
.nav a { display: flex; align-items: center; gap: 11px; padding: 8px 10px; border-radius: 10px; text-decoration: none; color: var(--ink-2); font-weight: 500; position: relative; transition: background .2s, color .2s; }
.nav a svg { width: 18px; height: 18px; stroke: currentColor; flex: none; opacity: .8; }
.nav a:hover { background: var(--paper-2); color: var(--ink); }
.nav a.on { background: var(--card); color: var(--ink); box-shadow: inset 0 0 0 1px var(--rule); }
.nav a.on::before { content: ''; position: absolute; left: -16px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent-2); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); }
.rail-foot { margin-top: auto; padding-top: 12px; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 10px; }
.avatar { width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: var(--paper); display: grid; place-items: center; font-weight: 700; font-size: 12px; flex: none; overflow: hidden; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.who { min-width: 0; flex: 1; font-size: 12.5px; line-height: 1.3; }
.who b { display: block; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.who span { color: var(--muted); font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.badge-super { display: inline-block; font-size: 12px; font-weight: 800; letter-spacing: .16em; padding: 2px 6px; border-radius: 4px; background: var(--ink); color: var(--green); text-transform: uppercase; vertical-align: 1px; }

.main { min-width: 0; }
.topbar { display: none; }
.page { max-width: 1240px; margin: 0 auto; padding: 36px 44px 120px; animation: pageIn .45s var(--ease) both; }
@keyframes pageIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.page.out { animation: pageOut .16s ease both; }
@keyframes pageOut { to { opacity: 0; transform: translateY(-4px); } }

/* ─── editorial type ─── */
.kicker { font-size: 12px; font-weight: 700; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.kicker .dot { width: 4px; height: 4px; border-radius: 50%; background: var(--rule-2); }
.masthead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; padding-bottom: 22px; border-bottom: 1px solid var(--ink); margin-bottom: 28px; flex-wrap: wrap; }
.masthead h1 { font-size: clamp(34px, 4.6vw, 58px); font-weight: 300; margin-top: 10px; }
.masthead h1 b { font-weight: 700; }
.dek { font-size: 17px; color: var(--ink-2); max-width: 720px; margin-top: 12px; line-height: 1.5; font-weight: 300; }
.section { margin-top: 44px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; border-bottom: 1px solid var(--rule); padding-bottom: 10px; margin-bottom: 18px; flex-wrap: wrap; }
.section-head h2 { font-size: 24px; font-weight: 400; }
.section-head .kicker { font-size: 12px; }
.muted { color: var(--muted); } .small { font-size: 13px; } .xs { font-size: 12px; } .strong { font-weight: 600; }
.num { font-feature-settings: 'tnum'; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-style: normal; font-size: 12px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; } .grow { flex: 1; min-width: 0; } .end { justify-content: flex-end; } .between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; }
.mt { margin-top: 18px; } .mt8 { margin-top: 8px; } .mb { margin-bottom: 18px; }

/* ─── controls ─── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 18px; border-radius: 999px; border: 1px solid var(--ink); background: var(--ink); color: var(--paper); font-weight: 600; font-size: 14px; cursor: pointer; white-space: nowrap; text-decoration: none; transition: transform .18s var(--ease), background .2s, box-shadow .2s, opacity .2s; }
.btn:hover { box-shadow: 0 6px 18px rgba(14,26,38,.18); }
.btn:active { transform: scale(.97); }
.btn svg { width: 16px; height: 16px; stroke: currentColor; }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--rule-2); }
.btn.ghost:hover { border-color: var(--ink); box-shadow: none; }
.btn.green { background: var(--green); border-color: var(--green); color: #0E1A26; }
.btn.danger { background: transparent; color: var(--red); border-color: color-mix(in srgb, var(--red) 40%, transparent); }
.btn.sm { height: 32px; padding: 0 13px; font-size: 13px; }
.btn.xs { height: 26px; padding: 0 10px; font-size: 12px; }
.btn.icon { width: 40px; padding: 0; }
.btn.sm.icon { width: 32px; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.busy { pointer-events: none; opacity: .75; }
.btn.busy::after { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.link { background: none; border: 0; padding: 0; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-2); text-underline-offset: 3px; cursor: pointer; font-weight: 500; }
.link:hover { text-decoration-color: currentColor; }
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .lbl { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=time], input[type=number], input[type=search], input[type=tel], select, textarea {
  width: 100%; border: 1px solid var(--rule-2); background: var(--card); border-radius: var(--r-sm); padding: 10px 12px; outline: none; transition: border-color .2s, box-shadow .2s; min-height: 42px; }
textarea { resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 35%, transparent); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.seg { display: inline-flex; border: 1px solid var(--rule-2); border-radius: 999px; padding: 3px; background: var(--card); }
.seg button { border: 0; background: none; height: 30px; padding: 0 14px; border-radius: 999px; cursor: pointer; color: var(--muted); font-weight: 600; font-size: 13px; transition: background .2s, color .2s; }
.seg button.on { background: var(--ink); color: var(--paper); }
.toggle { position: relative; width: 38px; height: 22px; flex: none; }
.toggle input { opacity: 0; width: 0; height: 0; }
.toggle span { position: absolute; inset: 0; border-radius: 99px; background: var(--rule-2); transition: .25s var(--ease); cursor: pointer; }
.toggle span::after { content: ''; position: absolute; width: 16px; height: 16px; left: 3px; top: 3px; border-radius: 50%; background: #fff; transition: .25s var(--spring); box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.toggle input:checked + span { background: var(--ink); }
.toggle input:checked + span::after { transform: translateX(16px); background: var(--green); }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-size: 13.5px; }
.check input { width: 16px; height: 16px; accent-color: var(--ink); }

/* ─── surfaces ─── */
.card { background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); padding: 20px; }
.card.flat { box-shadow: none; }
.card.lift { box-shadow: var(--shadow); border-color: transparent; }
.hairlist > * { padding: 14px 0; border-bottom: 1px solid var(--rule); }
.hairlist > *:last-child { border-bottom: 0; }
.pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: var(--paper-2); color: var(--ink-2); white-space: nowrap; }
.pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .7; }
.pill.ok { color: var(--green-ink); background: color-mix(in srgb, var(--green) 22%, transparent); }
.pill.warn { color: var(--amber); background: color-mix(in srgb, var(--amber) 14%, transparent); }
.pill.bad { color: var(--red); background: color-mix(in srgb, var(--red) 12%, transparent); }
.pill.info { color: var(--blue); background: color-mix(in srgb, var(--blue) 12%, transparent); }
.pill.plain::before { display: none; }
.empty { border: 1px dashed var(--rule-2); border-radius: var(--r); padding: 34px 24px; text-align: center; color: var(--muted); }
.empty h3 { color: var(--ink); font-size: 22px; margin-bottom: 8px; }
.banner { display: flex; gap: 14px; align-items: center; padding: 14px 18px; border-radius: var(--r); border: 1px solid var(--rule); background: var(--card); }
.banner.warn { border-color: color-mix(in srgb, var(--amber) 40%, var(--rule)); background: color-mix(in srgb, var(--amber) 6%, var(--card)); }
.banner.bad { border-color: color-mix(in srgb, var(--red) 35%, var(--rule)); background: color-mix(in srgb, var(--red) 5%, var(--card)); }

/* network glyph */
.net { width: 18px; height: 18px; border-radius: 5px; display: inline-grid; place-items: center; color: #fff; flex: none; }
.net svg { width: 11px; height: 11px; fill: currentColor; }
.net.facebook_page { background: var(--fb); } .net.instagram { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); } .net.linkedin_profile, .net.linkedin_org { background: var(--li); } .net.ghl { background: var(--ghl); }
.chav { position: relative; width: 40px; height: 40px; flex: none; }
.chav img, .chav .ph { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--paper-2); display: grid; place-items: center; font-weight: 700; font-size: 13px; color: var(--muted); }
.chav .net { position: absolute; right: -3px; bottom: -3px; width: 17px; height: 17px; border: 2px solid var(--card); border-radius: 50%; }
.chav .net svg { width: 9px; height: 9px; }

/* ─── Today ─── */
.today-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 32px; }
.hero { position: relative; border-radius: var(--r); overflow: hidden; min-height: 380px; background: #0E1A26; color: #fff; display: flex; align-items: flex-end; isolation: isolate; }
.hero img.bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; transform: scale(1.02); transition: transform 6s var(--ease); }
.hero:hover img.bg { transform: scale(1.06); }
.hero::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,16,24,0) 30%, rgba(8,16,24,.82) 100%); }
.hero-body { padding: 28px; width: 100%; }
.hero .kicker { color: rgba(255,255,255,.75); }
.hero h2 { font-size: clamp(26px, 3vw, 38px); font-weight: 300; margin: 10px 0 8px; max-width: 640px; }
.hero p { color: rgba(255,255,255,.85); max-width: 600px; font-size: 15px; }
.hero .btn.ghost { color: #fff; border-color: rgba(255,255,255,.4); }
.figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); border-top: 1px solid var(--ink); border-bottom: 1px solid var(--rule); }
.fig { padding: 18px 18px 18px 0; border-right: 1px solid var(--rule); }
.fig + .fig { padding-left: 18px; }
.fig:last-child { border-right: 0; }
.fig .v { font-size: 40px; font-weight: 300; line-height: 1; letter-spacing: -.03em; }
.fig .l { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 8px; }
.fig .s { font-size: 12px; color: var(--muted); margin-top: 3px; }
.upnext .item { display: grid; grid-template-columns: 52px 1fr; gap: 14px; align-items: start; padding: 14px 0; border-bottom: 1px solid var(--rule); cursor: pointer; transition: background .2s; }
.upnext .item:hover { background: linear-gradient(90deg, transparent, var(--paper-2), transparent); }
.when { text-align: center; line-height: 1; }
.when .d { font-size: 26px; font-weight: 300; }
.when .m { font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.clamp2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.clamp3 { display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.askbar { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 14px; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); box-shadow: var(--shadow); }
.askbar input { border: 0; box-shadow: none !important; background: none; min-height: 40px; padding: 0; }

/* post grid (published) */
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 22px; }
.pcard { display: flex; flex-direction: column; border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--rule); transition: transform .3s var(--ease), box-shadow .3s; animation: rise .5s var(--ease) both; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } }
.pcard .img { aspect-ratio: 4/5; background: var(--paper-2); position: relative; overflow: hidden; }
.pcard .img img { width: 100%; height: 100%; object-fit: cover; }
.pcard .img .noimg { position: absolute; inset: 0; display: flex; align-items: center; padding: 22px; font-size: 18px; font-weight: 300; line-height: 1.35; color: var(--ink-2); background: var(--paper-2); }
.pcard .meta { padding: 14px 16px 16px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.pcard .metrics { display: flex; gap: 14px; font-size: 12.5px; color: var(--ink-2); margin-top: auto; padding-top: 8px; border-top: 1px solid var(--rule); }
.pcard .metrics b { font-weight: 700; }
.pcard .tools { display: flex; gap: 6px; }

/* ─── Planner ─── */
.cal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.cal-head h2 { font-size: 40px; font-weight: 300; }
.cal-head h2 b { font-weight: 700; }
.planner { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 28px; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.cal .dow { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 10px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
.day { min-height: 128px; border-right: 1px solid var(--rule); border-bottom: 1px solid var(--rule); padding: 8px; display: flex; flex-direction: column; gap: 5px; cursor: pointer; transition: background .2s; position: relative; }
.day:hover { background: var(--card); }
.day .dn { font-size: 13px; font-weight: 500; color: var(--muted); display: flex; justify-content: space-between; }
.day.other .dn { color: var(--faint); }
.day.today .dn b { background: var(--ink); color: var(--paper); border-radius: 99px; padding: 0 7px; }
.day.past { background: repeating-linear-gradient(135deg, transparent 0 8px, color-mix(in srgb, var(--rule) 35%, transparent) 8px 9px); }
.day.drop { background: color-mix(in srgb, var(--green) 18%, var(--card)); }
.day .add { opacity: 0; font-size: 18px; line-height: 1; color: var(--muted); transition: opacity .2s; }
.day:hover .add { opacity: 1; }
.chip { display: flex; gap: 6px; align-items: center; padding: 4px 6px; border-radius: 7px; background: var(--card); border: 1px solid var(--rule); font-size: 12px; line-height: 1.25; cursor: grab; transition: transform .2s var(--ease), box-shadow .2s; border-left: 3px solid var(--muted); min-width: 0; }
.chip:hover { box-shadow: var(--shadow); transform: translateY(-1px); }
.chip.scheduled { border-left-color: var(--blue); } .chip.published { border-left-color: var(--green); } .chip.draft { border-left-color: var(--faint); border-style: dashed; border-left-style: solid; } .chip.failed, .chip.partial { border-left-color: var(--red); } .chip.publishing { border-left-color: var(--amber); }
.chip img { width: 22px; height: 22px; border-radius: 4px; object-fit: cover; flex: none; }
.chip .t { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; flex: 1; }
.chip .tm { font-weight: 700; color: var(--ink-2); flex: none; }
.chip .nets { display: flex; gap: 2px; flex: none; }
.chip .nets .net { width: 12px; height: 12px; border-radius: 3px; } .chip .nets .net svg { width: 7px; height: 7px; }
.more { font-size: 12px; color: var(--muted); padding-left: 4px; }
.agenda .grp { padding: 18px 0 6px; font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--ink); }
.arow { display: grid; grid-template-columns: 70px 64px 1fr auto; gap: 16px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); cursor: pointer; }
.arow:hover { background: linear-gradient(90deg, transparent, var(--card), transparent); }
.arow .thumb { width: 64px; height: 64px; border-radius: 10px; object-fit: cover; background: var(--paper-2); }
.arow .tm { font-size: 18px; font-weight: 300; }
.tray { position: sticky; top: 24px; align-self: start; }
.tray .item { padding: 12px 0; border-bottom: 1px solid var(--rule); cursor: pointer; font-size: 13.5px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 0; border-top: 1px solid var(--ink); border-left: 1px solid var(--rule); }
.week .day { min-height: 420px; }

/* ─── Sheet (composer etc.) ─── */
#layer { position: relative; z-index: 50; }
.scrim { position: fixed; inset: 0; background: rgba(10,18,26,.38); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .3s var(--ease); }
.scrim.show { opacity: 1; }
.sheet { position: fixed; top: 0; right: 0; bottom: 0; width: min(1080px, 100vw); background: var(--paper); box-shadow: var(--shadow-lg); transform: translateX(104%); transition: transform .45s var(--ease); display: flex; flex-direction: column; }
.sheet.show { transform: none; }
.sheet.narrow { width: min(560px, 100vw); }
.sheet-head { display: flex; align-items: center; gap: 14px; padding: 18px 26px; border-bottom: 1px solid var(--rule); }
.sheet-head h3 { font-size: 24px; font-weight: 400; }
.sheet-body { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 24px 26px; }
.sheet-foot { display: flex; align-items: center; gap: 10px; padding: 14px 26px calc(14px + env(safe-area-inset-bottom)); border-top: 1px solid var(--rule); background: var(--paper); flex-wrap: wrap; }
.modal { position: fixed; left: 50%; top: 50%; width: min(560px, calc(100vw - 32px)); max-height: calc(100vh - 48px); max-height: calc(100dvh - 48px - env(safe-area-inset-top) - env(safe-area-inset-bottom)); overflow-y: auto; overscroll-behavior: contain; background: var(--paper); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px; transform: translate(-50%, -46%) scale(.97); opacity: 0; transition: transform .35s var(--spring), opacity .25s; }
.modal.wide { width: min(820px, calc(100vw - 32px)); }
.modal.show { transform: translate(-50%, -50%); opacity: 1; }
.modal h3 { font-size: 26px; font-weight: 400; margin-bottom: 6px; }
.x { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--rule-2); background: var(--card); cursor: pointer; display: grid; place-items: center; margin-left: auto; flex: none; transition: transform .2s; }
.x:hover { transform: rotate(90deg); }
.x svg { width: 14px; height: 14px; stroke: currentColor; }
.pop { position: fixed; z-index: 60; background: var(--card); border: 1px solid var(--rule); border-radius: var(--r); box-shadow: var(--shadow-lg); padding: 8px; transform-origin: top left; animation: popIn .25s var(--spring) both; max-height: 70vh; max-height: 70dvh; overflow-y: auto; overscroll-behavior: contain; }
@keyframes popIn { from { opacity: 0; transform: scale(.94) translateY(-6px); } }

.composer { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 28px; }
.chan-pick { display: flex; flex-wrap: wrap; gap: 10px; }
.chan-pick button { display: flex; align-items: center; gap: 10px; padding: 6px 14px 6px 6px; border-radius: 999px; border: 1px solid var(--rule-2); background: var(--card); cursor: pointer; transition: all .2s var(--ease); opacity: .55; filter: grayscale(.8); }
.chan-pick button.on { opacity: 1; filter: none; border-color: var(--ink); box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 40%, transparent); }
.chan-pick .chav, .chan-pick .chav img, .chan-pick .chav .ph { width: 30px; height: 30px; }
.chan-pick .nm { font-size: 13px; font-weight: 600; max-width: 160px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.editor { border: 1px solid var(--rule-2); border-radius: var(--r); background: var(--card); overflow: hidden; transition: border-color .2s, box-shadow .2s; }
.editor:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 30%, transparent); }
.editor textarea { border: 0; border-radius: 0; min-height: 210px; padding: 16px 18px; font-size: 16px; box-shadow: none !important; background: transparent; }
.editor-bar { display: flex; align-items: center; gap: 6px; padding: 8px 10px; border-top: 1px solid var(--rule); flex-wrap: wrap; }
.counter { margin-left: auto; font-size: 12px; color: var(--muted); display: flex; gap: 10px; }
.counter .over { color: var(--red); font-weight: 700; }
.kc-assist { display: flex; flex-wrap: wrap; gap: 6px; }
.kc-assist button { border: 1px solid var(--rule-2); background: var(--paper); border-radius: 99px; height: 28px; padding: 0 11px; font-size: 12px; cursor: pointer; font-weight: 600; color: var(--ink-2); transition: all .2s; display: inline-flex; gap: 6px; align-items: center; }
.kc-assist button:hover { border-color: var(--ink); color: var(--ink); }
.kc-assist button svg { width: 12px; height: 12px; }
.mediarow { display: flex; gap: 10px; flex-wrap: wrap; }
.mthumb { width: 92px; height: 92px; border-radius: 10px; overflow: hidden; position: relative; background: var(--paper-2); animation: popIn .3s var(--spring) both; }
.mthumb img, .mthumb video { width: 100%; height: 100%; object-fit: cover; }
.mthumb button { position: absolute; top: 5px; right: 5px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; cursor: pointer; display: grid; place-items: center; font-size: 13px; }
.drop { width: 92px; height: 92px; border-radius: 10px; border: 1.5px dashed var(--rule-2); display: grid; place-items: center; text-align: center; font-size: 12px; color: var(--muted); cursor: pointer; transition: all .2s; padding: 6px; }
.drop:hover, .drop.over { border-color: var(--ink); color: var(--ink); background: var(--card); }
.quick { display: flex; flex-wrap: wrap; gap: 6px; }
.quick button { border: 1px solid var(--rule-2); background: var(--card); border-radius: 8px; padding: 5px 10px; font-size: 12px; cursor: pointer; font-weight: 600; }
.quick button:hover { border-color: var(--ink); }
.preview-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--rule); margin-bottom: 16px; }
.preview-tabs button { border: 0; background: none; padding: 8px 12px; cursor: pointer; font-weight: 600; font-size: 13px; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; }
.preview-tabs button.on { color: var(--ink); border-bottom-color: var(--ink); }
.pv { background: #fff; color: #0f1419; border-radius: 12px; border: 1px solid #e4e6eb; overflow: hidden; font-style: normal; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; font-size: 14px; box-shadow: var(--shadow); }
.pv * { font-style: normal; }
.pv .ph { display: flex; gap: 10px; align-items: center; padding: 12px; }
.pv .ph img, .pv .ph .ini { width: 38px; height: 38px; border-radius: 50%; object-fit: cover; background: #e4e6eb; }
.pv .ph b { font-size: 14px; display: block; } .pv .ph span { font-size: 12px; color: #65676b; }
.pv .tx { padding: 0 12px 12px; white-space: pre-wrap; word-wrap: break-word; line-height: 1.4; }
.pv .im { background: #f0f2f5; } .pv .im img, .pv .im video { width: 100%; max-height: 520px; object-fit: cover; }
.pv .im.sq { aspect-ratio: 1; } .pv .im.sq img { height: 100%; }
.pv .ft { display: flex; justify-content: space-around; padding: 9px; border-top: 1px solid #e4e6eb; color: #65676b; font-weight: 600; font-size: 13px; }
.pv.ig .ph { padding: 10px 12px; } .pv.ig .ph img { width: 32px; height: 32px; } .pv.ig .tx { padding-top: 10px; }
.pv.ig .ico { display: flex; gap: 14px; padding: 10px 12px 0; font-size: 20px; }
.pv .warnbox { padding: 40px 20px; text-align: center; color: #b4412f; background: #fff6f4; font-size: 13px; }

/* ─── KC ─── */
.kc-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; height: calc(100vh - 220px); height: calc(100dvh - 220px); min-height: 520px; }
.chat { display: flex; flex-direction: column; min-height: 0; border: 1px solid var(--rule); border-radius: 18px; background: var(--card); overflow: hidden; }
.msgs { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 26px 28px; display: flex; flex-direction: column; gap: 22px; scroll-behavior: smooth; }
.msg { display: flex; gap: 14px; max-width: 820px; animation: rise .4s var(--ease) both; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; }
.msg .bubble { line-height: 1.6; font-size: 15px; min-width: 0; }
.msg.me .bubble { background: var(--paper-2); padding: 12px 16px; border-radius: 18px 18px 4px 18px; }
.msg.kc .bubble { padding-top: 4px; }
.msg .bubble p:last-child { margin-bottom: 0; }
.msg .bubble ul, .msg .bubble ol { padding-left: 20px; margin: 6px 0 10px; }
.msg .bubble h1, .msg .bubble h2, .msg .bubble h3 { font-size: 18px; font-weight: 600; margin: 12px 0 6px; }
.msg .bubble code { background: var(--paper-2); padding: 1px 5px; border-radius: 5px; font-size: 13px; }
.msg .bubble pre { background: var(--paper-2); padding: 12px; border-radius: 10px; overflow-x: auto; white-space: pre-wrap; }
.msg .bubble table { border-collapse: collapse; font-size: 13px; margin: 8px 0; } .msg .bubble td, .msg .bubble th { border: 1px solid var(--rule); padding: 5px 8px; }
.kc-mark { width: 34px; height: 34px; flex: none; }
.steps { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.step { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 12px; background: var(--paper); font-size: 13.5px; animation: popIn .35s var(--spring) both; }
.step .ic { width: 26px; height: 26px; border-radius: 8px; background: var(--ink); color: var(--green); display: grid; place-items: center; flex: none; }
.step .ic svg { width: 14px; height: 14px; stroke: currentColor; }
.thinking { display: flex; gap: 6px; align-items: center; color: var(--muted); font-size: 13px; }
.thinking i { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); animation: blink 1.2s infinite; }
.thinking i:nth-child(2) { animation-delay: .15s; } .thinking i:nth-child(3) { animation-delay: .3s; }
@keyframes blink { 0%, 80%, 100% { opacity: .2; transform: translateY(0); } 40% { opacity: 1; transform: translateY(-3px); } }
.composer-kc { border-top: 1px solid var(--rule); padding: 12px; background: var(--card); }
.composer-kc .box { display: flex; align-items: flex-end; gap: 8px; border: 1px solid var(--rule-2); border-radius: 16px; padding: 6px 6px 6px 14px; background: var(--paper); transition: border-color .2s, box-shadow .2s; }
.composer-kc .box:focus-within { border-color: var(--ink); box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 30%, transparent); }
.composer-kc textarea { border: 0; background: none; box-shadow: none !important; padding: 8px 0; min-height: 40px; max-height: 200px; resize: none; }
.composer-kc .opts { display: flex; gap: 8px; align-items: center; padding: 8px 4px 0; flex-wrap: wrap; }
.attach-chip { display: inline-flex; gap: 6px; align-items: center; padding: 4px 10px; border-radius: 99px; background: var(--paper-2); font-size: 12px; }
.suggest { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 720px; }
.suggest button { text-align: left; border: 1px solid var(--rule); background: var(--paper); border-radius: 12px; padding: 14px; cursor: pointer; font-size: 14px; transition: all .2s var(--ease); }
.suggest button:hover { border-color: var(--ink); transform: translateY(-2px); }
.suggest button span { display: block; font-size: 12px; color: var(--muted); margin-top: 4px; }
.brainpanel { overflow-y: auto; }
.brainpanel .card { margin-bottom: 16px; }
.mem { display: flex; gap: 8px; align-items: flex-start; padding: 9px 0; border-bottom: 1px solid var(--rule); font-size: 13px; }
.mem button { margin-left: auto; border: 0; background: none; color: var(--faint); cursor: pointer; font-size: 16px; line-height: 1; }
.mem button:hover { color: var(--red); }
.brain-orb { width: 46px; height: 46px; border-radius: 14px; background: radial-gradient(circle at 30% 30%, var(--green), #2f6a3a 60%, #0e1a26); position: relative; box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 60%, transparent); animation: pulse 2.6s infinite; flex: none; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 color-mix(in srgb, var(--green) 55%, transparent); } 70% { box-shadow: 0 0 0 14px transparent; } 100% { box-shadow: 0 0 0 0 transparent; } }
.fab { position: fixed; right: 26px; bottom: 26px; z-index: 30; width: 58px; height: 58px; border-radius: 18px; border: 0; background: var(--ink); color: var(--green); box-shadow: 0 14px 40px rgba(14,26,38,.35); cursor: pointer; display: grid; place-items: center; transition: transform .3s var(--spring); }
.fab:hover { transform: translateY(-3px) rotate(-4deg); }
.fab svg { width: 34px; height: 34px; }

/* ─── Connections / accounts ─── */
.conn-row { display: grid; grid-template-columns: 44px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.conn-row .nm { font-weight: 600; }
.conn-row .sub { font-size: 12.5px; color: var(--muted); }
.flow { display: grid; grid-template-columns: 1fr 24px 1fr 24px 1fr; align-items: center; gap: 6px; font-size: 13px; }
.flow .arrow { color: var(--faint); text-align: center; }
.connect-tiles { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 14px; }
.tile { border: 1px solid var(--rule); border-radius: var(--r); padding: 18px; background: var(--card); display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s; }
.tile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.tile .logos { display: flex; gap: 6px; }
.tile .logos .net { width: 26px; height: 26px; border-radius: 8px; } .tile .logos .net svg { width: 14px; height: 14px; }
.tile h4 { font-size: 18px; font-weight: 500; }
.tile p { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.tile.soon { opacity: .6; }
.acc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 22px; }
.acc { border-radius: var(--r); overflow: hidden; background: var(--card); border: 1px solid var(--rule); display: flex; flex-direction: column; transition: transform .3s var(--ease), box-shadow .3s; cursor: pointer; animation: rise .5s var(--ease) both; }
.acc:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.acc .cover { aspect-ratio: 16/10; background: var(--paper-2) center/cover; position: relative; }
.acc .cover .tag { position: absolute; left: 12px; top: 12px; }
.acc .body { padding: 16px; display: flex; flex-direction: column; gap: 4px; }
.acc h4 { font-size: 21px; font-weight: 500; }
.acc.add { border-style: dashed; display: grid; place-items: center; min-height: 260px; color: var(--muted); text-align: center; background: transparent; }
.acc.cur { box-shadow: 0 0 0 2px var(--ink); }
.sw-list { width: 320px; }
.sw-list .hd { font-size: 12px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; color: var(--faint); padding: 8px 10px 4px; display: flex; justify-content: space-between; }
.sw-item { display: flex; gap: 10px; align-items: center; padding: 8px 10px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.sw-item:hover { background: var(--paper-2); }
.sw-item.on { background: var(--paper-2); }
.sw-item img, .sw-item .ph { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: var(--paper-2); flex: none; }
.sw-item .n { font-weight: 600; font-size: 14px; }
.sw-item .s { font-size: 12px; color: var(--muted); }
.meter { height: 4px; background: var(--rule); border-radius: 4px; overflow: hidden; margin: 6px 10px 8px; }
.meter i { display: block; height: 100%; background: var(--ink); border-radius: 4px; transition: width .6s var(--ease); }
.table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.table th { text-align: left; font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 8px 10px; border-bottom: 1px solid var(--ink); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--rule); vertical-align: middle; }
.table-wrap { overflow-x: auto; }
.chartbox { position: relative; height: 260px; }
.keyline { display: flex; gap: 8px; align-items: center; }
.copy { display: flex; gap: 8px; } .copy input { font-family: ui-monospace, Menlo, monospace; font-style: normal; font-size: 12.5px; }

/* ─── Login ─── */
.login { display: grid; grid-template-columns: 1.1fr .9fr; min-height: 100vh; min-height: 100dvh; }
.login-art { position: relative; overflow: hidden; background: #0E1A26; color: #fff; display: flex; flex-direction: column; justify-content: space-between; padding: 40px; isolation: isolate; }
.login-art > img:not(.login-logo) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; animation: kenburns 24s ease-in-out infinite alternate; }
@keyframes kenburns { from { transform: scale(1.04); } to { transform: scale(1.14) translate(-1.5%, -1%); } }
.login-art::after { content: ''; position: absolute; inset: 0; z-index: -1; background: linear-gradient(180deg, rgba(8,16,24,.55), rgba(8,16,24,.05) 30%, rgba(8,16,24,.2) 55%, rgba(8,16,24,.88)); }
.login-logo { height: 42px; width: auto; display: block; align-self: flex-start; filter: drop-shadow(0 4px 14px rgba(0,0,0,.35)); }
.login-art blockquote { margin: 0; font-size: clamp(28px, 3.4vw, 46px); font-weight: 300; line-height: 1.12; letter-spacing: -.02em; max-width: 620px; }
.login-art cite { display: block; margin-top: 16px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; font-weight: 700; color: rgba(255,255,255,.7); font-style: italic; }
.login-form { display: flex; flex-direction: column; justify-content: center; padding: 48px clamp(28px, 6vw, 88px); gap: 18px; max-width: 560px; width: 100%; margin: 0 auto; }
.login-form h1 { font-size: 44px; }
.err { color: var(--red); font-size: 13.5px; min-height: 20px; }

/* ─── toasts ─── */
#toasts { position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%); z-index: 90; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--paper); padding: 11px 18px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg); animation: toastIn .4s var(--spring) both; display: flex; gap: 10px; align-items: center; max-width: calc(100vw - 32px); pointer-events: auto; }
.toast.err { background: var(--red); color: #fff; }
.toast.out { animation: toastOut .3s ease both; }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.95); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px); } }
.celebrate { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); opacity: 0; transition: opacity .4s var(--ease); }
.celebrate.show { opacity: 1; }
.celebrate .box { text-align: center; transform: scale(.9); transition: transform .5s var(--spring); }
.celebrate.show .box { transform: none; }
.celebrate h2 { font-size: 40px; margin-top: 16px; }
.celebrate svg.ok { width: 84px; height: 84px; }
.celebrate .ring { fill: none; stroke: var(--green); stroke-width: 3; stroke-dasharray: 180; stroke-dashoffset: 180; animation: draw .7s .1s var(--ease) forwards; }
.celebrate .tick { fill: none; stroke: var(--ink); stroke-width: 4; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 50; stroke-dashoffset: 50; animation: draw .45s .65s var(--ease) forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.skel { background: linear-gradient(90deg, var(--paper-2), var(--card), var(--paper-2)); background-size: 200% 100%; animation: shimmer 1.4s infinite; border-radius: 8px; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* ─── mobile ─── */
.tabbar { display: none; }
@media (max-width: 1100px) { .today-grid, .planner, .composer, .kc-page { grid-template-columns: 1fr; } .tray { position: static; } .kc-page { height: auto; } .chat { height: calc(100vh - 230px); height: calc(100dvh - 230px); min-height: 480px; } }
@media (max-width: 860px) {
  .shell { grid-template-columns: 1fr; }
  .rail { display: none; }
  .topbar { display: flex; position: sticky; top: 0; z-index: 20; align-items: center; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 16px 10px; background: color-mix(in srgb, var(--paper) 88%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--rule); }
  .topbar .switcher { flex: 1; padding: 5px 8px; }
  .topbar .sw-img { width: 32px; height: 32px; }
  .page { padding: 22px 16px 120px; }
  .masthead { padding-bottom: 16px; margin-bottom: 20px; }
  .dek { font-size: 15.5px; }
  .tabbar { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 25; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); border-top: 1px solid var(--rule); padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .tabbar a, .tabbar button { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 12px; font-weight: 600; text-decoration: none; color: var(--muted); padding: 6px 0; background: none; border: 0; cursor: pointer; }
  .tabbar a svg, .tabbar button svg { width: 22px; height: 22px; stroke: currentColor; }
  .tabbar a.on { color: var(--ink); }
  .tabbar .plus span { width: 46px; height: 46px; margin-top: -18px; border-radius: 16px; background: var(--ink); color: var(--green); display: grid; place-items: center; box-shadow: 0 10px 26px rgba(14,26,38,.3); }
  .fab { display: none; }
  .grid2, .grid3 { grid-template-columns: 1fr; }
  .fig .v { font-size: 32px; }
  .figures { grid-template-columns: 1fr 1fr; }
  .fig { padding: 14px 10px 14px 0 !important; border-right: 0; border-bottom: 1px solid var(--rule); }
  .fig:nth-child(odd) { border-right: 1px solid var(--rule); } .fig:nth-child(even) { padding-left: 14px !important; }
  .hero { min-height: 300px; } .hero-body { padding: 20px; }
  .cal .dow { padding: 6px 4px; font-size: 12px; letter-spacing: .08em; text-align: center; }
  .day { min-height: 64px; padding: 4px; }
  .day .chip { padding: 2px; border-left-width: 3px; } .day .chip .t, .day .chip .tm, .day .chip .nets { display: none; } .day .chip img { width: 100%; height: 22px; }
  .arow { grid-template-columns: 52px 52px 1fr; } .arow .thumb { width: 52px; height: 52px; } .arow > :last-child { grid-column: 1 / -1; }
  .sheet { width: 100vw; top: env(safe-area-inset-top); border-radius: 18px 18px 0 0; transform: translateY(104%); }
  .sheet.show { transform: none; }
  .sheet-head, .sheet-body { padding-left: 16px; padding-right: 16px; } .sheet-foot { padding-left: 16px; padding-right: 16px; }
  .sheet-foot .btn { flex: 1; }
  .msgs { padding: 18px 16px; } .suggest { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; } .login-art { min-height: 300px; padding: 24px; } .login-art blockquote { font-size: 28px; }
  .login-logo { height: 34px; }
  .flow { grid-template-columns: 1fr; } .flow .arrow { transform: rotate(90deg); }
  .conn-row { grid-template-columns: 40px minmax(0, 1fr); } .conn-row > :last-child { grid-column: 1 / -1; }
  .pgrid { grid-template-columns: 1fr 1fr; gap: 12px; } .pcard .meta { padding: 10px; } .pcard .metrics { gap: 8px; font-size: 12px; flex-wrap: wrap; }
  .cal-head h2 { font-size: 30px; }
  .sw-list { width: calc(100vw - 32px); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
/* fixes */
.switcher > svg { width: 16px; height: 16px; flex: none; stroke: var(--muted); }
.sw-name, .sw-sub { display: block; }
.askbar input { flex: 1; min-width: 0; }
.askbar .kc-mark { flex: none; }
.who .badge-super { display: inline-block; margin-top: 2px; }
svg:not([width]):not([class]) { max-width: 100%; }
.cal:not(.week) .chip { display: grid; grid-template-columns: auto 1fr auto; grid-template-areas: "img tm nets" "t t t"; column-gap: 6px; row-gap: 2px; }
.cal:not(.week) .chip img, .cal:not(.week) .chip video { grid-area: img; width: 18px !important; height: 18px !important; }
.cal:not(.week) .chip .tm { grid-area: tm; } .cal:not(.week) .chip .nets { grid-area: nets; } .cal:not(.week) .chip .t { grid-area: t; font-size: 12px; color: var(--ink-2); }
.week .chip { flex-direction: column; align-items: stretch; } .week .chip img { width: 100%; height: 90px; } .week .chip .t { white-space: normal; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; }
.hero::after { background: linear-gradient(180deg, rgba(8,16,24,.15) 0%, rgba(8,16,24,.55) 45%, rgba(8,16,24,.92) 100%); }
.hero h2 { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (max-width: 860px) { .cal:not(.week) .chip { display: block; padding: 2px; } .cal:not(.week) .chip img { width: 100% !important; height: 24px !important; } }
.pill { width: fit-content; justify-self: start; align-self: flex-start; } .conn-row .pill, .row .pill { align-self: center; } .tile .btn { align-self: stretch; }
.brainpanel .row { flex-wrap: nowrap; } .brainpanel .row svg { flex: none; }

.net.tiktok { background: #000; } .net.youtube { background: #FF0000; } .net.x { background: #000; } .net.threads { background: #000; } .net.pinterest { background: #E60023; } .net.gbp { background: #4285F4; } .net.reddit { background: #FF4500; } .net.bluesky { background: #0085FF; } .net.tumblr { background: #36465D; } .net.telegram { background: #26A5E4; } .net.discord { background: #5865F2; } .net.mastodon { background: #6364FF; } .net.stripe { background: #635BFF; }
:root[data-theme="dark"] .net.tiktok, :root[data-theme="dark"] .net.x, :root[data-theme="dark"] .net.threads { box-shadow: inset 0 0 0 1px #444; }
.nets-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; }
.ntile { border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .25s var(--ease), box-shadow .25s; animation: rise .45s var(--ease) both; position: relative; }
.ntile:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.ntile .net { width: 34px; height: 34px; border-radius: 10px; } .ntile .net svg { width: 18px; height: 18px; }
.ntile h4 { font-size: 19px; font-weight: 500; } .ntile p { font-size: 13px; color: var(--muted); margin: 0; flex: 1; }
.ntile .rank { position: absolute; right: 14px; top: 14px; font-size: 12px; font-weight: 800; letter-spacing: .14em; color: var(--faint); }
.ntile.on { box-shadow: inset 0 0 0 1.5px var(--green); }
.ntile .btn { align-self: stretch; }
.tile.on { box-shadow: inset 0 0 0 1.5px var(--green); } .tile .logos .net { width: 30px; height: 30px; border-radius: 9px; } .tile .logos .net svg { width: 16px; height: 16px; }

/* ═══════════════════════════════════════════════════════════════
   v21.3 — design system + mobile-first responsive layer
   One scroll container per page (the document). Sheets, modals and pops scroll inside themselves.
   ═══════════════════════════════════════════════════════════════ */
:root {
  /* spacing scale (4px base) */
  --s1: 4px; --s2: 8px; --s3: 12px; --s4: 16px; --s5: 20px; --s6: 24px; --s7: 32px; --s8: 44px;
  /* type scale */
  --t-xs: 12px; --t-sm: 13.5px; --t-md: 15px; --t-lg: 18px; --t-xl: 24px; --t-2xl: 30px; --t-3xl: clamp(32px, 4.6vw, 58px);
  /* radius + elevation */
  --r-xs: 6px; --r-lg: 18px; --r-pill: 999px;
  --shadow-sm: 0 1px 2px rgba(14,26,38,.05), 0 2px 8px rgba(14,26,38,.05);
  /* touch + layout */
  --tap: 44px; --gutter: 44px; --tabbar-h: 64px; --topbar-h: 64px;
  --safe-l: env(safe-area-inset-left, 0px); --safe-r: env(safe-area-inset-right, 0px); --safe-t: env(safe-area-inset-top, 0px); --safe-b: env(safe-area-inset-bottom, 0px);
  --dur: .22s;
}
html { -webkit-tap-highlight-color: transparent; overscroll-behavior-x: none; scroll-padding-top: calc(var(--topbar-h) + var(--safe-t)); }
body { touch-action: manipulation; text-rendering: optimizeLegibility; }
html.locked, html.locked body { overflow: hidden; }
img, video, canvas, iframe, table, pre { max-width: 100%; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.btn:focus-visible, .x:focus-visible { box-shadow: 0 0 0 4px color-mix(in srgb, var(--green) 45%, transparent); outline: 0; }
.grid2, .grid3, .today-grid, .planner, .composer { min-width: 0; }
.grid2 > *, .grid3 > *, .today-grid > *, .planner > *, .composer > *, .kc-page > * { min-width: 0; }
.figures { grid-template-columns: repeat(auto-fit, minmax(min(150px, 100%), 1fr)); }
.fig { min-width: 0; }
.fig .v { overflow-wrap: anywhere; }
.pgrid { grid-template-columns: repeat(auto-fill, minmax(min(240px, 100%), 1fr)); }
.acc-grid { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.connect-tiles { grid-template-columns: repeat(auto-fit, minmax(min(230px, 100%), 1fr)); }
.nets-grid { grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); }
.banner { flex-wrap: wrap; }
.banner .grow { min-width: min(220px, 100%); }
.conn-row > div, .arow > div, .upnext .item > div { min-width: 0; overflow-wrap: anywhere; }
.msg { max-width: min(820px, 100%); min-width: 0; }
.msg .bubble { overflow-wrap: anywhere; }
.msg .bubble table { display: block; overflow-x: auto; max-width: 100%; -webkit-overflow-scrolling: touch; }
.msg .bubble a { word-break: break-word; }
.mono { overflow-wrap: anywhere; }
.table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.sheet { max-width: 100%; }
.sheet-head { flex-wrap: nowrap; }
.sheet-head > div:not(.row) { min-width: 0; }
.sheet-head h3 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pop { max-width: calc(100vw - 24px); }
.sw-list { max-width: 100%; }
.empty { display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 40px 24px; background: color-mix(in srgb, var(--card) 55%, transparent); }
.empty::before { content: ''; width: 48px; height: 48px; border-radius: 13px; margin-bottom: 10px; background: url('brand/kc-icon-v228.svg') center/cover no-repeat; opacity: .55; filter: saturate(.85); box-shadow: 0 6px 18px rgba(0,0,0,.12); }
.empty p { max-width: 440px; margin: 0 auto 10px; }
.empty .row { justify-content: center; }
.skel { display: block; min-height: 12px; }
.skel-card { border: 1px solid var(--rule); border-radius: var(--r); overflow: hidden; background: var(--card); }
.skel-card .skel { border-radius: 0; }
.skel-line { height: 12px; margin: 12px 14px 0; border-radius: 6px; }
.skel-line.short { width: 45%; margin-bottom: 14px; }
.skel-row { display: flex; gap: 12px; align-items: center; padding: 14px 0; border-bottom: 1px solid var(--rule); }
.skel-row .skel:first-child { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.skel-row .skel:last-child { flex: 1; height: 14px; }
.btn, .seg button, .x, .tabbar a, .tabbar button, .chan-pick button, .kc-assist button, .quick button { -webkit-user-select: none; user-select: none; }
.btn, .x, .seg button, .link, .chip, .tile, .acc, .pcard { transition-duration: var(--dur); }
.drag-handle { display: none; }

/* ─── tablet ─── */
@media (max-width: 1100px) {
  :root { --gutter: 32px; }
  .page { padding-left: var(--gutter); padding-right: var(--gutter); }
}

/* ─── phones + small tablets: app chrome ─── */
@media (max-width: 860px) {
  :root { --gutter: 20px; --t-3xl: clamp(30px, 8.4vw, 40px); }
  /* iOS zooms into any field under 16px and stays zoomed — that's what cut the screens off at the edges */
  input, select, textarea, .input { font-size: 16px !important; }
  .topbar { min-height: calc(var(--topbar-h) + var(--safe-t)); padding: calc(10px + var(--safe-t)) calc(var(--gutter) + var(--safe-r)) 10px calc(var(--gutter) + var(--safe-l)); }
  .topbar .switcher { min-width: 0; min-height: var(--tap); }
  .topbar .btn.icon { width: var(--tap); height: var(--tap); flex: none; }
  .page { padding: var(--s6) calc(var(--gutter) + var(--safe-r)) calc(var(--tabbar-h) + var(--safe-b) + 40px) calc(var(--gutter) + var(--safe-l)); }
  .masthead { gap: var(--s4); }
  .masthead > div { min-width: 0 !important; }
  .masthead > div:first-child { flex: 1 1 100%; }
  .masthead h1 { font-size: var(--t-3xl); overflow-wrap: break-word; }
  .masthead > .row { width: 100%; }
  .masthead > .row > .btn { flex: 1 1 auto; }
  .masthead > .btn { width: 100%; }
  .section { margin-top: 36px; }
  .section-head { row-gap: 4px; }
  .section-head h2 { font-size: 22px; }
  .kicker { letter-spacing: .16em; }

  /* tab bar: fixed, safe-area aware; content is padded above it */
  .tabbar { min-height: calc(var(--tabbar-h) + var(--safe-b)); padding: 4px calc(6px + var(--safe-r)) calc(4px + var(--safe-b)) calc(6px + var(--safe-l)); align-items: stretch; }
  .tabbar a, .tabbar button { min-height: 52px; justify-content: center; border-radius: 12px; transition: color var(--dur), background var(--dur); }
  .tabbar a:active, .tabbar button:active { background: var(--paper-2); }
  .tabbar .plus { padding: 0; }
  .tabbar .plus:active { background: none; }
  .tabbar .plus span { width: 52px; height: 52px; margin-top: -22px; transition: transform .2s var(--spring); }
  .tabbar .plus:active span { transform: scale(.94); }
  #toasts { bottom: calc(var(--tabbar-h) + var(--safe-b) + 14px); width: calc(100% - 2 * var(--gutter)); }

  /* 44px tap targets */
  .btn { min-height: var(--tap); height: auto; }
  .btn.sm { min-height: 40px; padding: 0 16px; }
  .btn.xs { min-height: 34px; padding: 0 12px; position: relative; }
  .btn.xs::before { content: ''; position: absolute; inset: -5px -2px; }
  .btn.icon, .btn.sm.icon { width: var(--tap); min-width: var(--tap); }
  .x { width: var(--tap); height: var(--tap); }
  .seg button { height: 38px; padding: 0 16px; }
  .link { min-height: 36px; display: inline-flex; align-items: center; gap: 4px; }
  .kc-assist button, .quick button { min-height: 38px; padding: 0 14px; }
  .chan-pick button { min-height: var(--tap); }
  .check { min-height: 40px; }
  .input, input:not([type]), input[type=text], input[type=email], input[type=password], input[type=url], input[type=date], input[type=time], input[type=number], input[type=search], input[type=tel], select { min-height: 48px; }
  .mthumb button { width: 30px; height: 30px; }

  /* numbers: clean 2-up grid that always fits */
  .figures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .fig, .fig + .fig { padding: 16px 12px 16px 0 !important; border-right: 0; border-bottom: 1px solid var(--rule); }
  .fig:nth-child(even) { padding-left: 16px !important; padding-right: 0 !important; }
  .fig:nth-child(odd) { border-right: 1px solid var(--rule); }
  .fig:nth-last-child(-n+2):nth-child(odd), .fig:last-child { border-bottom: 0; }
  .fig .v { font-size: clamp(26px, 8vw, 34px); }
  .fig .l { letter-spacing: .12em; }

  .hero { min-height: 280px; }
  .hero-body { padding: var(--s5); }
  .hero .row .btn { flex: 1 1 auto; }
  .askbar { padding: 6px 6px 6px 12px; gap: 10px; }
  .askbar .btn { flex: none; }
  .pgrid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
  .acc-grid, .connect-tiles, .nets-grid { gap: 14px; }
  .banner { padding: 14px 16px; gap: 12px; }
  .banner > .btn { flex: 1 1 100%; }
  .conn-row .row { gap: 8px; }
  .conn-row select, .conn-row input { flex: 1 1 140px; max-width: none !important; width: auto !important; }
  .cal-head h2 { font-size: 28px; }

  /* KC: on phones the conversation flows in the page (no box-in-a-box scrolling); the composer sticks above the tab bar */
  .kc-page { display: block; height: auto; min-height: 0; }
  .chat { height: auto !important; min-height: 0; overflow: visible; border-radius: var(--r-lg); }
  .kc-page .msgs { overflow: visible; flex: none; padding: 18px 16px 8px; }
  .kc-page .composer-kc { position: sticky; bottom: calc(var(--tabbar-h) + var(--safe-b)); z-index: 4; border-radius: 0 0 var(--r-lg) var(--r-lg); box-shadow: 0 -10px 24px -18px rgba(14,26,38,.35); }
  .composer-kc .box { padding: 4px 4px 4px 12px; }
  .composer-kc textarea { padding: 10px 0; }
  .composer-kc .opts > .xs.grow { flex-basis: 100%; text-align: left !important; }
  .brainpanel { margin-top: 24px; }
  .msg { gap: 10px; }
  .msg .kc-mark { width: 28px; height: 28px; }

  /* sheets: true bottom sheets that scroll inside themselves */
  .sheet { left: 0; right: 0; width: 100%; top: calc(var(--safe-t) + 10px); border-radius: 20px 20px 0 0; }
  .sheet.narrow { width: 100%; }
  .sheet::before { content: ''; position: absolute; top: 7px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 5px; background: var(--rule-2); }
  .sheet-head { padding: 20px calc(var(--gutter) + var(--safe-r)) 14px calc(var(--gutter) + var(--safe-l)); }
  .sheet-head h3 { font-size: 22px; }
  .sheet-body { padding: 20px calc(var(--gutter) + var(--safe-r)) 28px calc(var(--gutter) + var(--safe-l)); }
  .sheet-foot { padding: 12px calc(var(--gutter) + var(--safe-r)) calc(12px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); gap: 8px; }
  .sheet-foot > .grow:empty { display: none; }
  .sheet-foot > span.grow:not(:empty) { flex-basis: 100%; }
  .sheet .hairlist > a.row { min-height: 52px; }
  .modal { width: calc(100% - 2 * var(--gutter)); padding: 24px 20px; }
  .modal h3 { font-size: 24px; }
  .pop-sheet { left: calc(12px + var(--safe-l)) !important; right: calc(12px + var(--safe-r)); max-width: none; }
  .pop-sheet .sw-list { width: auto; }
  .sw-item { min-height: 52px; }

  /* tables become stacked cards — no sideways scrolling for the money screens */
  .table.cards, .table.cards tbody, .table.cards tr, .table.cards td { display: block; width: 100%; }
  .table.cards tr:first-child:has(th) { display: none; }
  .table.cards tr { padding: 14px 0; border-bottom: 1px solid var(--rule); }
  .table.cards td { border: 0; padding: 3px 0; display: flex; gap: 12px; justify-content: space-between; align-items: center; text-align: right; min-height: 30px; }
  .table.cards td::before { content: attr(data-l); font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); text-align: left; flex: none; }
  .table.cards td[data-l=""]::before, .table.cards td:not([data-l])::before { display: none; }
  .table.cards td:first-child { display: block; text-align: left; padding-bottom: 6px; }
  .table.cards td:last-child .row { width: 100%; justify-content: flex-start; padding-top: 8px; }
  .table.cards td[colspan] { display: block; text-align: left; }

  .login-form { padding: 32px calc(var(--gutter) + var(--safe-r)) calc(32px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); }
  .login-art { padding: calc(24px + var(--safe-t)) var(--gutter) 24px; }
}

/* ─── small phones ─── */
@media (max-width: 380px) {
  :root { --gutter: 18px; }
  .pgrid { gap: 10px; }
  .pcard .meta { padding: 10px 10px 12px; }
  .pcard .metrics { gap: 6px 10px; }
  .fig .v { font-size: 26px; }
  .arow { grid-template-columns: 46px 46px minmax(0, 1fr); gap: 12px; }
  .arow .thumb { width: 46px; height: 46px; }
  .tabbar a, .tabbar button { font-size: 12px; }
}

/* ─── touch devices of any size ─── */
@media (pointer: coarse) {
  input, select, textarea { font-size: 16px; }
  .day .add { opacity: 1; }
  .pcard:hover, .acc:hover, .tile:hover, .ntile:hover { transform: none; }
}
@media (prefers-reduced-motion: reduce) { .page { animation: none; } }
.pill { max-width: 100%; }
.msg .pill { white-space: normal; text-align: left; line-height: 1.35; padding-top: 4px; padding-bottom: 4px; }
.msg .bubble > .row { flex-wrap: wrap; }
.hairlist > .row > .grow { flex: 1 1 200px; overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .btn.xs { min-height: 36px; } .btn.xs::before { inset: -4px -2px; }
  .seg button { height: 40px; }
  .link { min-height: 44px; }
  .kc-assist button, .quick button { min-height: 40px; }
  .mem button { width: 44px; height: 44px; margin: -12px -12px -12px auto; }
  .mthumb button { width: 32px; height: 32px; }
}
@media (max-width: 860px) { .day .add { display: none; } }

/* ═══════════ v21.4 — KC tab: real chat layout (one scroll area · sticky composer · live KC) ═══════════ */
.page[data-view="kc"] { padding-top: 24px; padding-bottom: 24px; }
.kc-page { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 24px; height: calc(100vh - 72px); height: calc(100dvh - 72px); min-height: 0; }
.kc-chat { display: flex; flex-direction: column; min-height: 0; height: 100%; border: 1px solid var(--rule); border-radius: var(--r-lg); background: var(--card); overflow: hidden; }
.kc-head { display: flex; align-items: center; gap: 12px; padding: 12px 12px 12px 14px; border-bottom: 1px solid var(--rule); flex: none; min-width: 0; }
.kc-avatar { width: 48px; height: 48px; border-radius: 14px; flex: none; position: relative; overflow: hidden; display: grid; place-items: center;
  background: radial-gradient(circle at 38% 42%, rgba(168,216,110,.5), rgba(168,216,110,0) 60%), linear-gradient(160deg, #26376F, #1E2A5A 55%, #0E1530); box-shadow: inset 0 0 0 1px rgba(168,216,110,.35); }
.kc-avatar.sm { width: 36px; height: 36px; border-radius: 11px; }
.kc-avatar canvas, .kc-hero-bot canvas { display: block; width: 100%; height: 100%; }
.kc-bot-fallback { display: grid; place-items: center; }
.kc-avatar.live .kc-bot-fallback, .kc-hero-bot.live .kc-bot-fallback { display: none; }
.kc-avatar .kc-mark rect:first-child { fill: transparent; }
.kc-id { flex: 1; min-width: 0; }
.kc-name { font-weight: 700; font-size: 17px; line-height: 1.25; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kc-name span { font-weight: 400; color: var(--muted); font-size: 14px; }
.kc-status { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--muted); min-width: 0; margin-top: 2px; }
.kc-status span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
.kc-status i { width: 7px; height: 7px; border-radius: 50%; background: #A8D86E; flex: none; box-shadow: 0 0 0 3px rgba(168,216,110,.22); }
.kc-status[data-state="thinking"] i, .kc-status[data-state="streaming"] i { animation: kcFade 1.8s ease-in-out infinite; }
.kc-status[data-state="error"] i { background: var(--red); box-shadow: none; }
@keyframes kcFade { 50% { opacity: .3; } }
.kc-hbtn { width: 44px; height: 44px; border-radius: 12px; border: 1px solid var(--rule); background: var(--paper); color: var(--ink); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--dur), border-color var(--dur); }
.kc-hbtn:hover { border-color: var(--ink); }
.kc-hbtn:active { background: var(--paper-2); }
.kc-hbtn svg { width: 20px; height: 20px; stroke: currentColor; }
.kc-hbtn.busy { opacity: .5; pointer-events: none; }
.kc-narrow { display: none; }
.kc-chat .msgs { flex: 1 1 auto; min-height: 0; overflow-y: auto; overflow-x: hidden; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; padding: 20px 24px; gap: 18px; scroll-behavior: auto; }
.msg.kc { max-width: min(820px, 100%); width: 100%; }
.msg.kc .bubble { width: 100%; padding: 2px 0 2px 14px; border-left: 2px solid color-mix(in srgb, var(--green) 75%, transparent); }
.msg.me { max-width: min(600px, 88%); }
.kc-used { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.kc-used:empty { display: none; }
.kc-used .pill { font-size: 12px; }
.kc-text > :first-child { margin-top: 0; }
.kc-caret { display: inline-block; width: 7px; height: 15px; margin-left: 3px; vertical-align: -2px; background: var(--green); border-radius: 2px; animation: kcFade 1.1s ease-in-out infinite; }
.kc-from { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--green-ink); margin-bottom: 6px; }
.kc-from svg { stroke: currentColor; }
.kc-via { display: flex; gap: 4px; align-items: center; justify-content: flex-end; font-size: 12px; color: var(--muted); margin-top: 4px; }
.kc-via svg { stroke: currentColor; }
.kc-brainline { opacity: .8; }
/* empty state: the live KC on its navy window */
.kc-empty { margin: auto 0; width: 100%; max-width: 760px; display: flex; flex-direction: column; gap: 16px; }
.kc-hero { position: relative; display: flex; align-items: center; gap: 16px; padding: 14px 22px 14px 6px; border-radius: var(--r-lg); overflow: hidden; color: #fff;
  background: radial-gradient(90% 130% at 14% 55%, rgba(168,216,110,.55), rgba(168,216,110,0) 52%), linear-gradient(150deg, #26376F 0%, #1E2A5A 50%, #0E1530 100%); box-shadow: 0 18px 40px -24px rgba(14,21,48,.7); }
.kc-hero::after { content: ''; position: absolute; inset: 0; pointer-events: none; background-image: radial-gradient(rgba(255,255,255,.08) 1px, transparent 1.2px); background-size: 22px 22px; }
.kc-hero-bot { width: 168px; height: 168px; flex: none; position: relative; z-index: 1; display: grid; place-items: center; }
.kc-hero-txt { position: relative; z-index: 1; min-width: 0; }
.kc-hero-txt h2 { font-size: 27px; line-height: 1.15; margin: 0; color: #fff; }
.kc-hero-txt p { margin: 8px 0 0; color: rgba(255,255,255,.8); font-size: 14.5px; line-height: 1.5; }
.kc-empty .suggest { max-width: none; }
.kc-empty .suggest button { min-height: 44px; }
/* composer */
.kc-chat .composer-kc, .sheet .composer-kc { flex: none; position: static; border-top: 1px solid var(--rule); padding: 10px 12px 8px; background: var(--card); box-shadow: none; border-radius: 0; }
.composer-kc .box { display: flex; align-items: flex-end; gap: 2px; padding: 3px; border-radius: 24px; }
.composer-kc textarea { flex: 1; min-width: 0; min-height: 44px; padding: 11px 6px; line-height: 22px; font-size: 15px; }
.kc-ib { width: 44px; height: 44px; border-radius: 50%; border: 0; background: none; color: var(--muted); display: grid; place-items: center; cursor: pointer; flex: none; transition: color var(--dur), background var(--dur); }
.kc-ib[hidden] { display: none; }
.kc-ib:hover { color: var(--ink); background: var(--paper-2); }
.kc-ib.on { color: var(--green-ink); background: color-mix(in srgb, var(--green) 25%, transparent); }
.kc-ib svg { width: 20px; height: 20px; stroke: currentColor; }
.kc-send { width: 44px; height: 44px; border-radius: 50%; border: 0; background: var(--rule-2); color: var(--card); display: grid; place-items: center; cursor: pointer; flex: none; transition: background var(--dur), color var(--dur); }
.kc-send.ready { background: var(--ink); color: var(--green); }
.kc-send svg { width: 19px; height: 19px; stroke: currentColor; }
.composer-kc .opts { display: flex; align-items: center; gap: 8px; padding: 4px 0 0; flex-wrap: nowrap; min-width: 0; }
.kc-chip { display: inline-flex; align-items: center; min-height: 44px; cursor: pointer; position: relative; flex: none; }
.kc-chip input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.kc-chip span { display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: var(--r-pill); border: 1px solid var(--rule-2); font-size: 13px; font-weight: 600; color: var(--muted); transition: background var(--dur), color var(--dur), border-color var(--dur); white-space: nowrap; }
.kc-chip span svg { width: 14px; height: 14px; stroke: currentColor; }
.kc-chip input:checked + span { background: var(--ink); color: var(--green); border-color: var(--ink); }
.kc-chip input:focus-visible + span { box-shadow: 0 0 0 3px color-mix(in srgb, var(--green) 45%, transparent); }
.kc-route { margin-left: auto; display: inline-flex; border-radius: var(--r-pill); background: var(--paper-2); border: 1px solid var(--rule); min-width: 0; }
.kc-route[hidden] { display: none; }
.kc-route button { min-height: 44px; min-width: 44px; padding: 0 14px; border: 0; border-radius: var(--r-pill); background: none; font: inherit; font-weight: 600; font-size: 13px; color: var(--muted); cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 150px; }
.kc-route button.on { background: var(--ink); color: var(--green); }
.kc-route.offline button[data-r="computer"] { opacity: .65; }
.kc-att { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 6px; }
.kc-att:empty { display: none; }
.kc-att .attach-chip button { min-width: 32px; min-height: 32px; }
/* side panel: brain · computer · memory */
.brainpanel { height: 100%; overflow-y: auto; overscroll-behavior: contain; min-height: 0; }
.kc-panel .card { margin-bottom: 14px; }
.kc-orb { animation: none; }
.kc-note { padding: 12px; border-radius: 12px; background: color-mix(in srgb, var(--green) 16%, transparent); font-size: 13px; line-height: 1.45; }
.kc-note .btn { display: flex; width: 100%; justify-content: center; }
.kc-memf { display: flex; gap: 8px; }
.kc-memf input { flex: 1; min-width: 0; min-height: 44px; }
.kc-memf .btn { min-height: 44px; }
.kc-pc { width: 40px; height: 40px; border-radius: 12px; background: var(--paper-2); color: var(--muted); display: grid; place-items: center; flex: none; }
.kc-pc.on { background: #1E2A5A; color: #A8D86E; }
.kc-pc svg { width: 20px; height: 20px; stroke: currentColor; }
.kc-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--faint); margin-right: 6px; vertical-align: 1px; }
.kc-dot.on { background: #7CC24A; }
.kc-code { margin-top: 10px; padding: 14px 10px; border-radius: 14px; background: #1E2A5A; color: #A8D86E; text-align: center; font: 800 28px/1 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: .14em; overflow-wrap: anywhere; }
.kc-bbtns { gap: 8px; flex-wrap: nowrap; }
.kc-bbtns .btn { flex: 1; min-height: 44px; justify-content: center; }
.kc-job { padding: 10px 0; border-bottom: 1px solid var(--rule); }
.kc-job:last-child { border-bottom: 0; }
.kc-bar { height: 6px; border-radius: 6px; background: var(--paper-2); overflow: hidden; margin: 6px 0 4px; }
.kc-bar i { display: block; height: 100%; border-radius: 6px; background: linear-gradient(90deg, #8DC255, #A8D86E); transition: width .8s var(--ease); }
.kc-job.stopped .kc-bar i { background: var(--faint); }
.kc-pct { font-weight: 800; color: var(--green-ink); flex: none; }
.clamp1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }

@media (max-width: 1100px) {
  .kc-page { display: block; height: auto; }
  .kc-page > .brainpanel { display: none; }
  .kc-narrow { display: grid; }
}
@media (max-width: 860px) {
  .page[data-view="kc"] { padding-top: 12px; padding-bottom: calc(var(--tabbar-h) + var(--safe-b) + 12px); }
  html.kc-kb .page[data-view="kc"] { padding-bottom: 8px; }
  html.kc-kb .tabbar { display: none; }
  html.kc-on, html.kc-on body { overscroll-behavior-y: none; }
  .kc-page { height: calc(100dvh - 180px); }
  .kc-chat { border-radius: var(--r-lg); }
  .kc-head { padding: 10px 10px 10px 12px; gap: 10px; }
  .kc-avatar { width: 44px; height: 44px; border-radius: 13px; }
  .kc-name { font-size: 16px; }
  .kc-chat .msgs { padding: 16px 16px 12px; gap: 16px; }
  .msg.kc .bubble { padding-left: 12px; font-size: 15px; }
  .kc-chat .composer-kc { padding: 8px 10px 6px; }
  .composer-kc .box { padding: 2px; }
  .composer-kc .opts > .xs.grow { display: none; }
  .kc-hero { gap: 8px; padding: 8px 14px 8px 2px; }
  .kc-hero-bot { width: 112px; height: 112px; }
  .kc-hero-txt h2 { font-size: 20px; }
  .kc-hero-txt p { font-size: 13.5px; line-height: 1.45; margin-top: 4px; }
  .kc-empty { gap: 12px; margin: 0; }
  .kc-empty .suggest { grid-template-columns: 1fr; gap: 8px; }
  .kc-empty .suggest button { padding: 11px 14px; font-size: 14px; }
  .kc-empty .suggest button span { margin-top: 2px; }
}
@media (max-width: 380px) {
  .kc-chip span { padding: 0 10px; font-size: 12.5px; }
  .kc-route button { padding: 0 10px; max-width: 110px; }
  .kc-name span { display: none; }
}
@media (max-width: 860px) { .msg .step .btn { min-height: 44px; padding-left: 14px; padding-right: 14px; } .msg .step .row { gap: 8px; } }

/* ═══ v22.1 — turnkey: history, day sheet, list filters, logos ═══ */
.pl-filter { display: flex; max-width: 100%; overflow-x: auto; scrollbar-width: none; margin: -4px 0 16px; }
.pl-filter::-webkit-scrollbar { display: none; }
.pl-filter button { flex: none; min-height: 40px; }
.seg button .count { display: inline-grid; place-items: center; min-width: 18px; height: 18px; padding: 0 5px; margin-left: 4px; border-radius: 99px; background: var(--red); color: #fff; font-size: 12px; font-style: normal; }
.day.past { background: repeating-linear-gradient(135deg, transparent 0 10px, color-mix(in srgb, var(--rule) 18%, transparent) 10px 11px); }
.day.past:hover, .day.past:focus-visible { background: var(--card); }
.day:focus-visible { outline: 2px solid var(--green); outline-offset: -2px; }
.day .dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.day .dots i { width: 6px; height: 6px; border-radius: 99px; background: var(--green); }
.day.past .dots i { background: var(--ink-2); }
.chip.ext { cursor: pointer; border-left-color: var(--green); background: color-mix(in srgb, var(--green) 8%, var(--card)); }
.hrow { text-decoration: none; color: inherit; }
.hrow .link { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.clamp4 { display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; overflow-wrap: anywhere; }
.dlist { display: grid; gap: 12px; }
.dcard { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 14px; padding: 12px; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); }
.dcard .dimg { width: 96px; height: 96px; border-radius: 10px; object-fit: cover; background: var(--paper-2); }
.dcard:not(:has(.dimg)) { grid-template-columns: minmax(0, 1fr); }
.dcard .dbody { min-width: 0; }
.dcard .btn.xs { min-height: 36px; }
.day-sheet .sheet-body { padding-bottom: 12px; }
.acc-ini { display: none; place-items: center; font-weight: 800; }
@media (max-width: 600px) {
  .cal:not(.week) .day .chip, .cal:not(.week) .day .more { display: none !important; }
  .cal:not(.week) .day .dots { display: flex; }
  .day { min-height: 58px; }
  .day .add { display: none; }
  .dcard { grid-template-columns: 72px minmax(0, 1fr); gap: 12px; padding: 10px; } .dcard .dimg { width: 72px; height: 72px; }
  .pl-filter { width: 100%; } .pl-filter button { padding: 0 10px; font-size: 12.5px; } .seg button .count { margin-left: 3px; min-width: 16px; height: 16px; font-size: 12px; }
  .arow .tm { font-size: 14px; white-space: nowrap; font-weight: 600; }
  .arow.hrow { grid-template-columns: 52px 52px minmax(0, 1fr); }
}
.kc-keynote { margin: 0 0 14px; align-items: center; gap: 10px; flex-wrap: wrap; }
.kc-keynote .btn { flex: none; min-height: 44px; }

/* v22.3: pop-up windows keep their rows together (no big empty gaps) */
.sheet-body { align-content: start; }
/* v22.3 contrast: Super Admin badge readable in dark mode */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .badge-super { background: #A0D96D; color: #0D1218; } }
:root[data-theme="dark"] .badge-super { background: #A0D96D; color: #0D1218; }
/* v22.3 contrast: status pills on dark backgrounds */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) .st-pill.live { color: #A0D96D; } :root:not([data-theme="light"]) .st-pill.warn { color: #FFC861; } :root:not([data-theme="light"]) .st-pill.bad { color: #FF9C9C; } }
:root[data-theme="dark"] .st-pill.live { color: #A0D96D; } :root[data-theme="dark"] .st-pill.warn { color: #FFC861; } :root[data-theme="dark"] .st-pill.bad { color: #FF9C9C; }
/* v22.3 contrast: brighter status colors in dark mode (pills, errors, links) */
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) { --amber: #F0B24A; --red: #FF8A7A; --blue: #8DB8DD; } }
:root[data-theme="dark"] { --amber: #F0B24A; --red: #FF8A7A; --blue: #8DB8DD; }

/* v22.4: anything marked hidden stays hidden, whatever its layout class */
[hidden] { display: none !important; }

@media (max-width: 600px) { .login-art { min-height: 260px; } .login-art blockquote { font-size: 22px !important; line-height: 1.15; } .login-art cite { display: none; } }

/* ═══ v23.1 — mobile polish: native-feeling sheets, 40px+ targets, 12px legibility floor, iOS chrome ═══ */
button { -webkit-appearance: none; appearance: none; }          /* iOS Safari: never draw native button chrome (it squashed tiles into pills) */
input[type=search] { -webkit-appearance: none; appearance: none; }
.toggle { display: inline-block; vertical-align: middle; }       /* a span: needs a box of its own outside flex rows too */
label:has(> .toggle) { cursor: pointer; }
.pill, .st-pill { font-size: 12px; }
.sheet-foot { padding-bottom: calc(14px + var(--safe-b)); }
@media (max-width: 860px) {
  .seg button { min-height: 40px; height: auto; }
  .toggle { width: 44px; height: 26px; }
  .toggle span::after { width: 20px; height: 20px; }
  .toggle input:checked + span::after { transform: translateX(18px); }
  .toggle::before { content: ''; position: absolute; inset: -9px -2px; }
  a.kicker, .kicker a, .kicker button, a.xs, button.link, .link.xs { min-height: 40px; display: inline-flex; align-items: center; }
  .hubtabs a { min-height: 40px; }
  .hubtabs .hk { font-size: 12px; }
  .section-head a:not(.btn), .section-head .link { min-height: 40px; display: inline-flex; align-items: center; }
  summary { min-height: 44px; display: flex; align-items: center; cursor: pointer; }
  label:has(> .toggle), label.row:has(.toggle), label:has(> input[type=checkbox]), label:has(> input[type=radio]) { min-height: 44px; }
  .adm-lim { min-height: 44px !important; }
  input[type=file] { min-height: 44px; max-width: 100%; }
  .pl-filter button { min-width: 44px; }
  .fig .s a, .fig a { min-height: 40px; display: inline-flex; align-items: center; }
  .sheet { top: calc(var(--safe-t) + 10px); }
  .sheet-body > .row:last-child:has(> .btn), .sheet-body > .stack > .row:last-child:has(> .btn) { position: sticky; bottom: calc(-28px - var(--safe-b)); z-index: 3; margin: 16px calc(-1 * (var(--gutter) + var(--safe-r))) calc(-28px - var(--safe-b)) calc(-1 * (var(--gutter) + var(--safe-l))); padding: 12px calc(var(--gutter) + var(--safe-r)) calc(12px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); background: var(--paper); border-top: 1px solid var(--rule); flex-wrap: wrap; gap: 8px; }
  .sheet-body > .row:last-child:has(> .btn) > .btn, .sheet-body > .stack > .row:last-child:has(> .btn) > .btn { flex: 1 1 auto; }
  .sheet-body { padding-bottom: calc(28px + var(--safe-b)); }
}
/* phones: pop-up windows become bottom sheets with a sticky action bar and full-width buttons */
@media (max-width: 600px) {
  .modal, .modal.wide { left: 0; right: 0; top: auto; bottom: 0; width: 100%; max-width: none; max-height: calc(100vh - 24px); max-height: calc(100dvh - var(--safe-t) - 16px); border-radius: 22px 22px 0 0; padding: 30px calc(var(--gutter) + var(--safe-r)) calc(22px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); transform: translateY(105%); opacity: 1; transition: transform .38s var(--ease); }
  .modal.show { transform: none; }
  .modal::before { content: ''; position: absolute; top: 8px; left: 50%; width: 38px; height: 5px; margin-left: -19px; border-radius: 5px; background: var(--rule-2); }
  .modal > .row:last-child:has(> .btn) { position: sticky; bottom: calc(-22px - var(--safe-b)); z-index: 3; margin: 18px calc(-1 * (var(--gutter) + var(--safe-r))) calc(-22px - var(--safe-b)) calc(-1 * (var(--gutter) + var(--safe-l))); padding: 12px calc(var(--gutter) + var(--safe-r)) calc(12px + var(--safe-b)) calc(var(--gutter) + var(--safe-l)); background: var(--paper); border-top: 1px solid var(--rule); flex-wrap: wrap; gap: 8px; }
  .modal > .row:last-child:has(> .btn) > .btn { flex: 1 1 auto; }
  .modal > .row:last-child:has(> .btn) > span:empty { display: none; }
  .modal > .row:last-child:has(> .btn) > div.row { flex: 1 1 100%; }
  .modal > .row:last-child:has(> .btn) > div.row > .btn { flex: 1 1 auto; }
}
/* sideways tab strips: soft fade on the side that scrolls (set by kcScrollHints in core.js) */
.kc-sx.sx-r { -webkit-mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, #000 calc(100% - 36px), transparent); }
.kc-sx.sx-l { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px); mask-image: linear-gradient(90deg, transparent, #000 36px); }
.kc-sx.sx-l.sx-r { -webkit-mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); mask-image: linear-gradient(90deg, transparent, #000 36px, #000 calc(100% - 36px), transparent); }

/* ═══ v23.2 — responsive audit (360×740 · 390×844 · 768×1024 · 1440×900, dark + light) ═══ */
:root { --line: var(--rule); --bg: var(--paper); }   /* add-on modules use var(--line, #e3e3e3) — without this, dark mode got light-grey borders */
/* sidebar footer: the Super Admin badge never runs under the bell / sign-out buttons */
.rail-foot > button, .rail-foot > .btn { flex: none; }
.rail-foot .who .badge-super { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; letter-spacing: .02em; text-transform: none; padding: 1px 6px; margin: 2px 0 1px; vertical-align: middle; }
.badge-super.sm { font-size: 12px; letter-spacing: .08em; padding: 1px 6px; margin-left: 8px; vertical-align: 2px; font-style: normal; }
h2 .badge-super, h3 .badge-super, .lbl .badge-super { letter-spacing: .08em; }

/* ─── Sites · Domains · Hosting: one segmented row at the top of the section ─── */
.site-seg { display: flex; gap: 4px; padding: 4px; margin: 0 0 22px; width: max-content; max-width: 100%; border: 1px solid var(--rule-2); border-radius: 999px; background: var(--card); overflow-x: auto; scrollbar-width: none; }
.site-seg::-webkit-scrollbar { display: none; }
.site-seg a { flex: none; display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; padding: 0 18px; border-radius: 999px; color: var(--ink-2); font-weight: 600; font-size: 14.5px; text-decoration: none; white-space: nowrap; transition: background var(--dur, .2s), color var(--dur, .2s); }
.site-seg a svg { width: 17px; height: 17px; stroke: currentColor; flex: none; opacity: .85; }
.site-seg a:hover { color: var(--ink); background: var(--paper-2); }
.site-seg a.on { background: var(--green); color: #10200a; }
.site-seg a.on svg { opacity: 1; }
.site-seg + .masthead { margin-top: 0; }
@media (max-width: 600px) {
  .site-seg { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); width: 100%; margin-bottom: 18px; }
  .site-seg a { padding: 0 6px; gap: 6px; font-size: 14px; min-height: 42px; }
  .site-seg a span { overflow: hidden; text-overflow: ellipsis; }
}
@media (max-width: 400px) { .site-seg:has(a:nth-child(4)) a svg { display: none; } }

/* status pills (Sites) */
.st-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; padding: 3px 9px; border-radius: 99px; background: rgba(127,127,127,.14); white-space: nowrap; max-width: 100%; }
.st-pill.live { background: rgba(160,217,109,.25); color: #3d7a14; } .st-pill.warn { background: rgba(255,190,60,.22); color: #8a5a00; } .st-pill.bad { background: rgba(220,60,60,.15); color: #b02a2a; }

/* domain numbers */
.dm-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 10px; margin: 0 0 16px; }
.dm-stats button { display: flex; flex-direction: column; justify-content: space-between; gap: 6px; -webkit-appearance: none; appearance: none; border: 1px solid var(--rule); border-radius: var(--r); background: var(--card); padding: 14px 14px 12px; text-align: left; font: inherit; color: inherit; cursor: pointer; min-width: 0; min-height: 76px; transition: border-color .2s, transform .2s; }
.dm-stats button:hover { transform: translateY(-1px); border-color: var(--rule-2); }
.dm-stats button.on { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.dm-stats b { display: block; font-size: 28px; font-weight: 600; line-height: 1.05; font-variant-numeric: tabular-nums; }
.dm-stats span { display: block; font-size: 12px; line-height: 1.25; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); font-weight: 700; overflow-wrap: anywhere; }
.dm-stats .bad b { color: var(--red); } .dm-stats .warn b { color: var(--amber); }
@media (max-width: 760px) {
  .dm-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .dm-stats button { min-height: 64px; padding: 10px 12px; gap: 4px; }
  .dm-stats button:first-child { grid-column: 1 / -1; flex-direction: row; align-items: center; justify-content: flex-start; gap: 12px; min-height: 52px; }
  .dm-stats b { font-size: 24px; }
  .dm-stats span { letter-spacing: .06em; }
}
.dm-dns { margin: 0 0 24px; }
/* expired domains */
.dm-exp { border: 1px solid color-mix(in srgb, var(--red) 55%, transparent); background: color-mix(in srgb, var(--red) 8%, transparent); border-radius: var(--r); padding: 14px 16px 6px; margin: 0 0 16px; }
.dm-exph { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 4px 12px; padding-bottom: 8px; }
.dm-exp .r2 { display: grid; grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "n b" "d b"; gap: 2px 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--rule); }
.dm-exp .dm-xn { grid-area: n; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.dm-exp .dm-xd { grid-area: d; display: block; min-width: 0; font-size: 12.5px; color: var(--muted); }
.dm-exp .r2 > .btn { grid-area: b; min-width: 88px; }
/* the domain list: name + meta · status · actions · auto-renew each get their own grid area, so nothing can overlap */
.dm-tools { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; } .dm-tools input { flex: 1 1 220px; min-width: 0; } .dm-tools select { flex: 1 1 160px; min-width: 0; }
.st-net { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px; margin-bottom: 10px; }
.st-res { display: grid; gap: 6px; }
.st-res .r { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--rule); border-radius: 12px; min-width: 0; }
.st-res .r .d { flex: 1; min-width: 0; font-weight: 600; overflow-wrap: anywhere; }
.st-res .r.no { opacity: .5; }
.st-res .r.dm-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; grid-template-areas: "m s a" "m s r"; align-items: center; gap: 8px 14px; padding: 14px 16px; border-radius: var(--r); background: var(--card); }
.st-res .r.dm-row .dm-main { grid-area: m; display: flex; flex-direction: column; gap: 3px; min-width: 0; font-weight: 600; word-break: normal; overflow-wrap: break-word; }
.dm-row .dm-name { font-size: 15.5px; line-height: 1.3; overflow-wrap: anywhere; }
.dm-row .dm-meta { font-size: 12.5px; font-weight: 400; line-height: 1.45; color: var(--muted); overflow-wrap: break-word; word-break: normal; }
.dm-row .dm-meta b { white-space: nowrap; }
.dm-row .dm-st { grid-area: s; justify-self: end; }
.dm-row .dm-acts { grid-area: a; display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; align-items: center; min-width: 0; }
.dm-row .dm-acts select { flex: 0 1 180px; min-width: 0; max-width: 200px; height: 40px; min-height: 40px; }
.dm-row .dm-ar { grid-area: r; justify-self: end; }
.dm-ar { display: inline-flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 40px; padding: 0 6px 0 14px; border: 1px solid var(--rule-2); border-radius: 999px; cursor: pointer; white-space: nowrap; font-size: 13px; font-weight: 600; color: var(--ink); min-width: 0; }
.dm-ar .dm-arl { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.dm-ar .dm-arl small { font-size: 12px; font-weight: 400; color: var(--muted); } .dm-ar .dm-arl small:empty { display: none; }
.dm-ar .toggle { display: inline-block; width: 44px; height: 26px; flex: none; } .dm-ar .toggle span::after { width: 20px; height: 20px; } .dm-ar .toggle input:checked + span::after { transform: translateX(18px); }
@media (max-width: 1100px) {
  .st-res .r.dm-row { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "m s" "a a" "r r"; }
  .dm-row .dm-st { align-self: start; margin-top: 2px; }
  .dm-row .dm-acts { justify-content: flex-start; }
  .dm-row .dm-ar { justify-self: start; }
}
@media (max-width: 860px) {
  .st-res .r.dm-row { padding: 14px; gap: 10px 12px; grid-template-columns: minmax(0, 1fr); grid-template-areas: "m" "s" "a" "r"; }
  .dm-row .dm-st { justify-self: start; margin: 0; }
  .dm-row .dm-acts > .btn, .dm-row .dm-acts > a.btn { flex: 1 1 auto; }
  .dm-row .dm-acts select { flex: 1 1 100%; max-width: none; height: 48px; }
  .dm-row .dm-ar { justify-self: stretch; border: 0; border-top: 1px solid var(--rule); border-radius: 0; padding: 10px 0 0; min-height: 48px; }
}

/* ─── touch: every control ≥ 36px (most ≥ 40px), fields ≥ 16px so iOS never zooms ─── */
@media (max-width: 860px) {
  body .btn.xs { min-width: 36px; }
  body input[type=color] { min-height: 44px; min-width: 44px; }
  body .cv-f button { min-height: 40px; padding: 0 14px; }
  body .af-plus { width: 36px; height: 36px; font-size: 18px; }
  body .dv-row .mn { min-width: 40px; min-height: 40px; }
  body .sh-crumb button { min-height: 40px; padding: 0 8px; }
  body .tc-side h4 button { min-width: 40px; min-height: 40px; padding: 0 8px; }
  body .st-seg button, body .st-chips button { min-height: 40px; min-width: 40px; }
  body .st-th button { position: relative; }
  body .st-th button::before { content: ''; position: absolute; inset: -10px -10px; }
  body .kc-empty .suggest button { white-space: normal; height: auto; }
}
/* Reels Studio timeline: a short clip's label no longer runs under its drag handle */
.st-blk em { max-width: calc(100% - 40px); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ─── tables on phones: DNS records become cards; every other table scrolls inside its own box ─── */
.table-wrap, .dv-wrap { max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
@media (max-width: 600px) {
  .table.hb-rec, .table.hb-rec tbody, .table.hb-rec tr, .table.hb-rec td { display: block; width: 100%; }
  .table.hb-rec tr:first-child:has(th) { display: none; }
  .table.hb-rec tr { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; grid-template-areas: "t n l" "v v v" "a a a"; gap: 4px 10px; padding: 12px 0; border-bottom: 1px solid var(--rule); }
  .table.hb-rec td { border: 0; padding: 0; min-width: 0; }
  .table.hb-rec td:nth-child(1) { grid-area: t; } .table.hb-rec td:nth-child(2) { grid-area: n; overflow-wrap: anywhere; font-weight: 600; }
  .table.hb-rec td:nth-child(3) { grid-area: v; max-width: none; } .table.hb-rec td:nth-child(4) { grid-area: l; text-align: right; }
  .table.hb-rec td:nth-child(4)::before { content: 'TTL '; }
  .table.hb-rec td:nth-child(5) { grid-area: a; display: flex; gap: 8px; } .table.hb-rec td:nth-child(5):empty { display: none; }
  .table.hb-rec td:nth-child(5) .btn { flex: 1 1 auto; }
}
.dm-admin .badge-super { margin: 0 auto 0 0; }
/* phones: a long button label wraps inside the button instead of pushing past the screen edge */
@media (max-width: 860px) {
  .btn { max-width: 100%; white-space: normal; text-align: center; line-height: 1.25; padding-top: 6px; padding-bottom: 6px; }
  .btn svg { flex: none; }
}

/* ═══ v23.2 (Z8): KC logo → Today · account menu · KC chat privacy, incognito, life ═══ */
a.brand.kc-home { color: inherit; text-decoration: none; border-radius: 12px; transition: background var(--dur); }
a.brand.kc-home:hover { background: var(--paper-2); }
a.brand.kc-home:focus-visible, .tb-home:focus-visible, .acct-btn:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; }
a.brand.kc-home .brand-mark { transition: transform .45s var(--spring); }
a.brand.kc-home:hover .brand-mark { transform: rotate(-8deg) scale(1.06); }
.tb-home { display: none; }
@media (max-width: 860px) {
  .tb-home { display: grid; place-items: center; width: 44px; height: 44px; flex: none; border-radius: 12px; margin-left: -6px; }
  .tb-home img { width: 34px; height: 34px; border-radius: 9px; display: block; }
  .tb-home:active { background: var(--paper-2); }
  .topbar .switcher { min-width: 0; }
}
.acct-btn { display: flex; align-items: center; gap: 10px; flex: 1 1 auto; min-width: 0; padding: 6px; margin: -6px 0 -6px -6px; border: 0; border-radius: 12px; background: none; color: inherit; font: inherit; text-align: left; cursor: pointer; min-height: 44px; transition: background var(--dur); }
.acct-btn:hover { background: var(--paper-2); }
.rail-foot > .acct-btn { flex: 1 1 auto; }
.am-list { width: 280px; }
.am-list .am-i { width: 100%; border: 0; background: none; font: inherit; color: inherit; text-align: left; min-height: 48px; }
.am-list .am-i svg { flex: none; color: var(--muted); }
.am-list .am-i:hover svg { color: var(--ink); }
.sw-item.sw-logo .n { font-weight: 600; }
.msg .kc-text a.kc-dl { margin: 4px 6px 2px 0; text-decoration: none; }

/* KC chat — privacy line, incognito, memory controls */
.kc-chip.kc-incog input:checked + span { background: #2a1f4a; color: #D9C8FF; border-color: #2a1f4a; }
.kc-priv { display: inline-flex; align-items: center; justify-content: center; gap: 5px; min-height: 44px; min-width: 44px; padding: 0 6px; margin-left: auto; border: 0; background: none; color: var(--muted); font: inherit; font-size: 12.5px; font-weight: 600; cursor: pointer; flex: none; border-radius: 10px; }
.kc-priv svg { width: 14px; height: 14px; stroke: currentColor; }
.kc-priv:hover { color: var(--ink); }
@media (max-width: 420px) { .kc-priv b { display: none; } .kc-chip span { padding: 0 10px; } }
.kc-incog-banner { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1px dashed color-mix(in srgb, #8F6BFF 55%, var(--rule)); background: color-mix(in srgb, #8F6BFF 8%, var(--card)); font-size: 13.5px; color: var(--ink-2); margin-bottom: 12px; animation: rise .4s var(--ease) both; }
.kc-incog-banner svg { width: 22px; height: 22px; stroke: #8F6BFF; flex: none; }
.kc-page.incog .kc-head { background: color-mix(in srgb, #8F6BFF 7%, transparent); }
.kc-ctrl { display: flex; flex-direction: column; gap: 2px; margin-top: 10px; }
.kc-ctrl .row { min-height: 44px; align-items: center; }
.kc-switch { position: relative; width: 44px; height: 26px; flex: none; }
.kc-switch input { position: absolute; inset: 0; opacity: 0; margin: 0; cursor: pointer; z-index: 1; }
.kc-switch i { position: absolute; inset: 0; border-radius: 99px; background: var(--rule-2); transition: background var(--dur); }
.kc-switch i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .25s var(--spring); }
.kc-switch input:checked + i { background: var(--green); }
.kc-switch input:checked + i::after { transform: translateX(18px); }
.kc-switch input:focus-visible + i { outline: 2px solid var(--green); outline-offset: 2px; }
.kc-pv-list { margin: 10px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 8px; font-size: 13.5px; color: var(--ink-2); }
.kc-pv-list li { display: flex; gap: 10px; align-items: flex-start; }
.kc-pv-list li svg { width: 16px; height: 16px; flex: none; margin-top: 2px; stroke: var(--green-ink); }
.kc-meter { height: 6px; border-radius: 99px; background: var(--paper-2); overflow: hidden; margin-top: 8px; }
.kc-meter i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green), #6FC2A8); transition: width .6s var(--ease); }
.kc-adm .grid2 { gap: 10px; }
.kc-adm select, .kc-adm input { width: 100%; }
@media (max-width: 860px) { .kc-adm select, .kc-adm input { font-size: 16px; } }

/* KC feels alive: a softer "thinking" shimmer, a typing glow and a wave hello */
.msg.kc.live .thinking span { background: linear-gradient(90deg, var(--muted) 0%, var(--ink) 45%, var(--muted) 90%); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; animation: shimmer 2.4s linear infinite; }
.msg.kc.live .thinking i { background: var(--green); }
.msg.kc.live .bubble { position: relative; }
.msg.kc.live.typing .bubble { box-shadow: 0 0 0 1px color-mix(in srgb, var(--green) 35%, transparent), 0 8px 28px color-mix(in srgb, var(--green) 14%, transparent); transition: box-shadow .4s var(--ease); }
.msg.kc.pop-in { animation: kcPopIn .45s var(--spring) both; }
@keyframes kcPopIn { from { opacity: 0; transform: translateY(8px) scale(.98); } }
.kc-avatar.wave { animation: kcHop .9s var(--spring) both; }
@keyframes kcHop { 30% { transform: translateY(-3px) rotate(-4deg); } 60% { transform: translateY(0) rotate(3deg); } }
@media (prefers-reduced-motion: reduce) { .msg.kc.live .thinking span { animation: none; color: var(--muted); background: none; } .msg.kc.pop-in, .kc-avatar.wave, .kc-incog-banner { animation: none; } a.brand.kc-home .brand-mark { transition: none; } }
/* v23.4.1: iOS Safari gives date/time inputs an intrinsic min-width, so they spill past the sheet edge — keep every one inside its box */
input[type=date],input[type=time],input[type=datetime-local],input[type=month],input[type=week]{display:block;width:100%;max-width:100%;min-width:0;box-sizing:border-box;-webkit-appearance:none;appearance:none;text-align:left}
input[type=date]::-webkit-date-and-time-value,input[type=time]::-webkit-date-and-time-value,input[type=datetime-local]::-webkit-date-and-time-value{text-align:left;margin:0}
