/* ThruSite HQ. Moody navy space, restrained glow, glass pills (the TriForce room's visual language). Phone first. */
@font-face { font-family: "Manrope"; src: url("fonts/manrope-latin-var.woff2") format("woff2"); font-weight: 200 800; font-display: swap; }

:root {
  color-scheme: dark;
  --bg: #070a14; --ink: #eef3ff; --ink-2: #b3bfdc; --ink-3: #7f8db0;
  --ice: #cfe0ff; --ice-rgb: 207, 224, 255; --us: #f2b544;
  --font: "Manrope", system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, monospace;
  --lift: 0 1px 1px rgba(0,0,0,.28), 0 8px 18px rgba(0,0,0,.32), 0 22px 48px rgba(0,0,0,.34);
  --rim: inset 0 1px 0 rgba(255,255,255,.22), inset 0 -1px 0 rgba(255,255,255,.06);
  --glass: linear-gradient(180deg, rgba(255,255,255,.09), rgba(255,255,255,.02) 46%), rgba(12, 18, 36, .58);
}
*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); height: 100%; -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100%; color: var(--ink); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button { font: inherit; color: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid #e6f0ff; outline-offset: 3px; }

.deep { position: fixed; inset: 0; z-index: 0; pointer-events: none; background-color: var(--bg);
  background-image: radial-gradient(60vmax 40vmax at 18% 10%, rgba(66, 98, 160, .22), rgba(66, 98, 160, .07) 42%, transparent 72%),
                    radial-gradient(44vmax 42vmax at 90% 40%, rgba(44, 114, 138, .13), rgba(44, 114, 138, .04) 44%, transparent 70%),
                    radial-gradient(76vmax 46vmax at 50% 115%, rgba(84, 86, 150, .14), transparent 70%); }

/* the mark + wordmark */
.wm { white-space: nowrap; }
.wm b { font-weight: 760; letter-spacing: -.01em; }
.wm span { margin-left: .34em; font-weight: 300; font-size: .8em; letter-spacing: .16em; color: var(--ice); }
.mark { display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: 50%; color: var(--ice);
  border: 1px solid rgba(var(--ice-rgb), .3); box-shadow: 0 0 20px rgba(var(--ice-rgb), .14), inset 0 0 14px rgba(var(--ice-rgb), .08); }
.mark svg { width: 20px; height: 20px; }
.mark.big { width: 78px; height: 78px; box-shadow: 0 0 46px rgba(var(--ice-rgb), .16), inset 0 0 22px rgba(var(--ice-rgb), .1); }
.mark.big svg { width: 42px; height: 42px; }

/* pills */
.pill { display: inline-flex; align-items: center; justify-content: center; gap: 11px; height: 50px; padding: 0 26px; border-radius: 999px;
  border: 1px solid rgba(255,255,255,.17); background: var(--glass); box-shadow: var(--rim), var(--lift); color: var(--ink);
  font: 650 15px/1 var(--font); text-decoration: none; backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
  transition: border-color .25s ease, box-shadow .25s ease; }
.pill:hover { border-color: rgba(var(--ice-rgb), .42); box-shadow: var(--rim), var(--lift), 0 0 28px rgba(var(--ice-rgb), .14); }
.pill .g { width: 19px; height: 19px; flex: none; }
.pill.quiet { height: 30px; padding: 0 13px; font-size: 13px; font-weight: 550; color: var(--ink-2); background: none; box-shadow: none;
  border-color: rgba(var(--ice-rgb), .2); backdrop-filter: none; -webkit-backdrop-filter: none; }
.pill.quiet:hover { color: var(--ink); border-color: rgba(var(--ice-rgb), .4); }
.pill.small { height: 30px; padding: 0 14px; font-size: 13px; box-shadow: var(--rim); }
.pill:disabled { opacity: .5; cursor: default; }

/* the door (and the private-office and demo pages) */
body.at-door { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 24px; }
.door { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 16px;
  margin-top: -6vh; }
.door h1 { margin: 6px 0 22px; font-size: clamp(32px, 9vw, 46px); font-weight: 400; line-height: 1.1; }
.door .lead { margin: -4px 0 0; font-size: 18px; font-weight: 600; }
.door .sub { margin: -6px 0 8px; color: var(--ink-3); font-size: 14px; max-width: 44ch; overflow-wrap: anywhere; }
.door .lead + .pill, .door .sub + .pill { margin-top: 10px; }
.pick { display: grid; grid-template-columns: repeat(2, 140px); gap: 10px; margin: 0; }
.pick .pill { height: 46px; }
.pick .quiet { grid-column: 1 / -1; justify-self: center; margin-top: 6px; }

/* the room */
body.in-room { height: 100vh; height: 100dvh; overflow: hidden; }
.app { position: relative; z-index: 1; height: 100%; display: flex; flex-direction: column; }
.top { flex: none; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 56px; padding: env(safe-area-inset-top) max(16px, env(safe-area-inset-right)) 0 max(16px, env(safe-area-inset-left));
  border-bottom: 1px solid rgba(var(--ice-rgb), .12); background: rgba(8, 11, 22, .5);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.brand { display: flex; align-items: center; gap: 10px; font-size: 16px; }
.me { display: flex; align-items: center; gap: 12px; min-width: 0; color: var(--ink-3); font-size: 13px; }
.me .who { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.me form { margin: 0; }

.inner { width: min(720px, 100% - 32px); margin: 0 auto; }
.thread { flex: 1; min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  scrollbar-color: rgba(var(--ice-rgb), .22) transparent;
  -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 22px); mask-image: linear-gradient(to bottom, transparent 0, #000 22px); }
.thread > .inner { min-height: 100%; display: flex; flex-direction: column; justify-content: flex-end; }
.list { list-style: none; margin: 0; padding: 22px 0 14px; display: flex; flex-direction: column; gap: 18px; }
.empty { margin: auto 0; padding: 40px 0; text-align: center; color: var(--ink-3); }

.msg { min-width: 0; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; margin-bottom: 2px; }
.msg .meta b { font-size: 14px; font-weight: 720; color: var(--ink-2); }
.msg .meta time { font-size: 12px; color: var(--ink-3); }
.msg.mine .meta b { color: var(--ink); }
.body { overflow-wrap: anywhere; }
.body p { margin: 0 0 .55em; }
.body > :last-child { margin-bottom: 0; }
.body ul { margin: .15em 0 .55em; padding-left: 1.25em; }
.body li { margin: .12em 0; }
.body li::marker { color: var(--ink-3); }
.body a { color: var(--ice); text-decoration-color: rgba(var(--ice-rgb), .45); text-underline-offset: 2px; }
.body a:hover { text-decoration-color: var(--ice); }
.body strong { font-weight: 720; }
.body .at { color: var(--ice); font-weight: 650; }
.body code { font: 13px/1.4 var(--mono); padding: 1px 5px; border-radius: 5px; background: rgba(var(--ice-rgb), .09); }
.body pre { margin: .2em 0 .6em; padding: 10px 12px; overflow-x: auto; font: 13px/1.45 var(--mono); white-space: pre;
  border-radius: 10px; border: 1px solid rgba(var(--ice-rgb), .12); background: rgba(0, 0, 0, .28); }

.msg.hermes { padding: 12px 15px 13px; border-radius: 16px; border: 1px solid rgba(var(--ice-rgb), .17);
  background: linear-gradient(180deg, rgba(var(--ice-rgb), .075), rgba(var(--ice-rgb), .02)), rgba(10, 16, 34, .5);
  box-shadow: var(--rim), 0 0 34px rgba(var(--ice-rgb), .05); }
.msg.hermes .meta b { color: var(--ice); display: inline-flex; align-items: center; gap: 7px; }
.msg.hermes .meta b::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--ice);
  box-shadow: 0 0 8px rgba(var(--ice-rgb), .8); }

.dock { flex: none; padding: 6px 0 max(12px, env(safe-area-inset-bottom)); }
.status { display: flex; align-items: center; gap: 10px; margin: 0 0 8px; padding: 5px 5px 5px 14px; border-radius: 999px;
  border: 1px solid rgba(var(--ice-rgb), .18); background: rgba(12, 18, 36, .62); color: var(--ink-2); font-size: 13.5px;
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); }
.status .st { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pulse { flex: none; width: 8px; height: 8px; border-radius: 50%; background: var(--ice); box-shadow: 0 0 10px rgba(var(--ice-rgb), .85);
  animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 0%, 100% { opacity: .35; } 50% { opacity: 1; } }
.note { margin: 0 0 8px; text-align: center; color: var(--us); font-size: 13px; }

.composer { display: flex; align-items: flex-end; gap: 8px; margin: 0; padding: 5px 5px 5px 18px; border-radius: 26px;
  border: 1px solid rgba(255,255,255,.16); background: var(--glass); box-shadow: var(--rim), var(--lift);
  backdrop-filter: blur(16px) saturate(1.2); -webkit-backdrop-filter: blur(16px) saturate(1.2); transition: border-color .2s ease; }
.composer:focus-within { border-color: rgba(var(--ice-rgb), .4); }
.composer textarea { flex: 1; min-width: 0; margin: 0; padding: 9px 0; border: 0; outline: 0; resize: none; background: transparent;
  color: var(--ink); font: 16px/1.45 var(--font); min-height: 42px; max-height: 10.5em; field-sizing: content; }
.composer textarea::placeholder { color: var(--ink-3); }
.send { flex: none; display: grid; place-items: center; width: 42px; height: 42px; padding: 0; border: 0; border-radius: 50%;
  background: var(--ice); color: #0a1020; box-shadow: 0 0 18px rgba(var(--ice-rgb), .32); transition: opacity .2s ease, box-shadow .2s ease; }
.send svg { width: 20px; height: 20px; }
.send:disabled { opacity: .28; box-shadow: none; cursor: default; }

@media (min-width: 760px) {
  .top { min-height: 64px; padding-left: 28px; padding-right: 28px; }
  .list { gap: 22px; padding-top: 30px; }
  .dock { padding-bottom: 22px; }
}
@media (prefers-reduced-motion: reduce) { .pulse { animation: none; opacity: 1; } * { transition: none !important; } }
