/* gosling.pro — a generative interface in the DesignTech look. Tokens follow designtech-ai-app. */

@font-face { font-family: "Poppins"; font-weight: 400; font-display: swap; src: url("/fonts/poppins-400.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 500; font-display: swap; src: url("/fonts/poppins-500.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-weight: 600; font-display: swap; src: url("/fonts/poppins-600.woff2") format("woff2"); }
@font-face { font-family: "Roboto Slab"; font-weight: 400 700; font-display: swap; src: url("/fonts/roboto-slab.woff2") format("woff2"); }

:root {
  color-scheme: dark;
  --bg: 226 72% 7%;
  --fg: 210 40% 96%;
  --card: 225 39% 14%;
  --primary: 217 91% 60%;
  --accent-2: 217 91% 78%;
  --muted: 215 18% 72%;
  --border: 217 24% 27%;
  --input: 225 35% 16%;
  --ok: 152 70% 52%;
  --radius: 0.6rem;
  --glass: hsl(224 45% 6% / 0.34);
  --glass-edge: hsl(210 40% 98% / 0.08);
  --surface: hsl(225 39% 9% / 0.5);
  --surface-hover: hsl(225 39% 11% / 0.7);
  --wash: hsl(210 40% 98% / 0.06);
  --glow: rgba(101, 65, 206, 0.16);
  --grad: #06b6d4, #3b82f6, #8b5cf6, #d946ef, #8b5cf6, #3b82f6, #06b6d4;
  --grad-short: linear-gradient(90deg, #06b6d4, #3b82f6 35%, #8b5cf6 65%, #d946ef);
  --font-body: "Poppins", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-heading: "Roboto Slab", ui-serif, Georgia, "Times New Roman", serif;
  --panel-w: 340px;
  font-family: var(--font-body);
  font-size: 15px;
}

* { box-sizing: border-box; }
html, body { height: 100%; }

body {
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(60rem 40rem at 85% -10%, var(--glow), transparent 60%),
    radial-gradient(50rem 35rem at 10% 110%, rgba(6, 182, 212, 0.08), transparent 60%),
    hsl(var(--bg));
  color: hsl(var(--fg));
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: hsl(var(--accent-2)); text-underline-offset: 0.2em; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid hsl(var(--primary)); outline-offset: 2px; border-radius: 6px; }

.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.icon { width: 18px; height: 18px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: fixed; z-index: 50; top: 0.75rem; left: 0.75rem; padding: 0.5rem 0.8rem; border-radius: 0.5rem; background: hsl(var(--primary)); color: #fff; transform: translateY(-200%); }
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */

.app { display: grid; grid-template-columns: var(--panel-w) 1fr; height: 100dvh; }

.panel {
  display: flex;
  flex-direction: column;
  min-height: 0;
  border-right: 1px solid var(--glass-edge);
  background: var(--glass);
  backdrop-filter: blur(18px);
}

.panel-scroll { flex: 1; min-height: 0; overflow-y: auto; padding: 1.25rem 1.25rem 0.5rem; }

.wordmark {
  display: inline-block;
  color: hsl(var(--fg));
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  text-decoration: none;
}
.wordmark span { background: var(--grad-short); -webkit-background-clip: text; background-clip: text; color: transparent; }

.me { padding: 1.5rem 0 1.25rem; }

.avatar {
  position: relative;
  display: grid;
  place-items: center;
  width: 112px;
  height: 112px;
  margin-bottom: 1rem;
  padding: 3px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, var(--grad));
  animation: spin 14s linear infinite;
}
.avatar img, .avatar-fallback {
  grid-area: 1 / 1;
  width: 100%;
  height: 100%;
  border: 3px solid hsl(var(--bg));
  border-radius: 50%;
  object-fit: cover;
  animation: spin 14s linear infinite reverse;
}
.avatar-fallback {
  display: none;
  place-items: center;
  background: hsl(var(--card));
  font-family: var(--font-heading);
  font-size: 2rem;
  font-weight: 600;
}
.avatar.no-photo img { display: none; }
.avatar.no-photo .avatar-fallback { display: grid; }

.me-name { margin: 0; font-family: var(--font-heading); font-size: 1.7rem; font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.me-title {
  margin: 0.15rem 0 0.75rem;
  background: var(--grad-short);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  font-size: 1.05rem;
  font-weight: 600;
}
.me-status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.9rem;
  padding: 0.25rem 0.7rem;
  border: 1px solid hsl(var(--ok) / 0.35);
  border-radius: 999px;
  background: hsl(var(--ok) / 0.1);
  color: hsl(var(--ok));
  font-size: 0.78rem;
  font-weight: 500;
}
.pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 0 currentColor; animation: pulse 2.2s ease-out infinite; }
.me-bio { margin: 0; color: hsl(var(--muted)); font-size: 0.9rem; }

.suggested-label, .block-label {
  margin: 0 0 0.5rem;
  color: hsl(var(--muted));
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.suggested ul { display: grid; gap: 0.3rem; margin: 0; padding: 0; list-style: none; }
.suggested button {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  padding: 0.6rem 0.7rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: none;
  color: hsl(var(--fg) / 0.85);
  font-size: 0.88rem;
  text-align: left;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.suggested button:hover { background: var(--wash); color: hsl(var(--fg)); }
.suggested button[aria-current="true"] {
  border-color: hsl(var(--primary) / 0.45);
  background: linear-gradient(90deg, hsl(var(--primary) / 0.18), hsl(var(--primary) / 0.04));
  color: hsl(var(--fg));
}
.suggested button[aria-current="true"] .icon { color: hsl(var(--accent-2)); }

.panel-foot {
  display: flex;
  gap: 0.25rem;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--glass-edge);
}
.panel-foot a {
  display: inline-flex;
  flex: 1;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.5rem;
  border-radius: var(--radius);
  color: hsl(var(--muted));
  font-size: 0.8rem;
  text-decoration: none;
}
.panel-foot a:hover { background: var(--wash); color: hsl(var(--fg)); }
.panel-foot .icon { width: 16px; height: 16px; }

/* ---------- Stage ---------- */

.stage { display: flex; flex-direction: column; min-width: 0; min-height: 0; }

.thread {
  flex: 1;
  min-height: 0;
  overflow-y: auto;
  padding: 2.5rem clamp(1rem, 4vw, 3rem) 1.5rem;
  scroll-behavior: smooth;
}
.thread > * { max-width: 52rem; margin-inline: auto; }

.turn { margin-bottom: 2rem; }

.ask {
  width: fit-content;
  max-width: 80%;
  margin: 0 0 1.25rem auto;
  padding: 0.6rem 0.95rem;
  border: 1px solid hsl(var(--primary) / 0.35);
  border-radius: 0.9rem;
  background: hsl(var(--primary) / 0.14);
  animation: rise 0.35s ease both;
}

.answer { display: grid; gap: 1rem; }

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  width: fit-content;
  padding: 0.35rem 0.8rem 0.35rem 0.5rem;
  border: 1px solid var(--glass-edge);
  border-radius: 999px;
  background: var(--surface);
  font-size: 0.82rem;
}
.status-text {
  background: linear-gradient(90deg, hsl(var(--muted)) 0%, #fff 50%, hsl(var(--muted)) 100%) 0 0 / 200% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 1.6s linear infinite;
}
.spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 25%, #06b6d4, #8b5cf6, #d946ef);
  -webkit-mask: radial-gradient(circle, transparent 5px, #000 6px);
  mask: radial-gradient(circle, transparent 5px, #000 6px);
  animation: spin 0.9s linear infinite;
}

.prose { margin: 0; font-size: 1.02rem; line-height: 1.7; }
.prose.streaming::after {
  display: inline-block;
  width: 0.5em;
  height: 1.1em;
  margin-left: 2px;
  vertical-align: -0.15em;
  border-radius: 2px;
  background: var(--grad-short);
  content: "";
  animation: blink 1s steps(2) infinite;
}

.block { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
.block .stagger { animation: rise 0.5s cubic-bezier(0.2, 0.7, 0.2, 1) both; animation-delay: calc(var(--i, 0) * 70ms); }

.card {
  border: 1px solid var(--glass-edge);
  border-radius: calc(var(--radius) + 0.25rem);
  background: var(--surface);
  backdrop-filter: blur(10px);
}

/* hero */
.hero { position: relative; overflow: hidden; padding: clamp(1.5rem, 4vw, 2.5rem); }
.hero::before {
  position: absolute;
  inset: 0;
  padding: 1px;
  border-radius: inherit;
  background: linear-gradient(120deg, var(--grad));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  content: "";
  opacity: 0.7;
}
.hero-eyebrow { margin: 0 0 0.75rem; color: hsl(var(--accent-2)); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; }
.hero-title { margin: 0 0 1rem; font-family: var(--font-heading); font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.hero-title em { font-style: normal; background: var(--grad-short); -webkit-background-clip: text; background-clip: text; color: transparent; }
.hero-lede { margin: 0; max-width: 40rem; color: hsl(var(--fg) / 0.8); font-size: 1.02rem; }

/* stats */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(10.5rem, 1fr)); gap: 0.75rem; }
.stat { padding: 1.1rem 1.2rem; }
.stat-value { display: block; margin-bottom: 0.25rem; font-family: var(--font-heading); font-size: 2.1rem; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.stat-label { color: hsl(var(--muted)); font-size: 0.82rem; line-height: 1.4; }

/* timeline */
.timeline { margin: 0; padding: 0.5rem 0; list-style: none; }
.tl-item { position: relative; padding-left: 2.25rem; }
.tl-item::before { position: absolute; top: 0; bottom: 0; left: 0.55rem; width: 2px; background: linear-gradient(#3b82f6, #8b5cf6); content: ""; opacity: 0.4; }
.tl-item:first-child::before { top: 1.2rem; }
.tl-item:last-child::before { bottom: calc(100% - 1.2rem); }
.tl-node {
  position: absolute;
  top: 0.85rem;
  left: 0.15rem;
  width: 0.8rem;
  height: 0.8rem;
  border: 2px solid #8b5cf6;
  border-radius: 50%;
  background: hsl(var(--bg));
  transition: background 0.2s, box-shadow 0.2s;
}
.tl-item.open .tl-node { background: #d946ef; border-color: #d946ef; box-shadow: 0 0 0 5px rgba(217, 70, 239, 0.18); }
.tl-head {
  display: grid;
  grid-template-columns: 3.75rem 1fr auto;
  align-items: baseline;
  gap: 0.75rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  border: 0;
  border-radius: var(--radius);
  background: none;
  text-align: left;
  cursor: pointer;
}
.tl-head:hover { background: var(--wash); }
.tl-year { color: hsl(var(--accent-2)); font-size: 0.82rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.tl-title { font-family: var(--font-heading); font-size: 1.08rem; font-weight: 500; }
.tl-org { color: hsl(var(--muted)); font-size: 0.8rem; }
.tl-body { margin: 0 0 0.75rem; padding: 0 0.75rem 0 5.25rem; color: hsl(var(--fg) / 0.82); }
.tl-body[hidden] { display: none; }

/* cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 0.75rem; }
.pcard { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.1rem; transition: border-color 0.2s, transform 0.2s, background 0.2s; }
.pcard:hover { border-color: hsl(var(--primary) / 0.45); background: var(--surface-hover); transform: translateY(-2px); }
.pcard-tag { width: fit-content; padding: 0.1rem 0.55rem; border-radius: 999px; background: hsl(var(--primary) / 0.16); color: hsl(var(--accent-2)); font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }
.pcard h3 { margin: 0; font-family: var(--font-heading); font-size: 1.15rem; font-weight: 600; line-height: 1.25; }
.pcard-metric { margin: 0; background: var(--grad-short); -webkit-background-clip: text; background-clip: text; color: transparent; font-size: 0.85rem; font-weight: 600; }
.pcard p { margin: 0; color: hsl(var(--fg) / 0.78); font-size: 0.88rem; }
.pcard .chips { margin-top: auto; padding-top: 0.25rem; }
.pcard-more { display: inline-flex; align-items: center; gap: 0.35rem; width: fit-content; padding: 0; border: 0; background: none; color: hsl(var(--accent-2)); font-size: 0.82rem; font-weight: 600; cursor: pointer; }
.pcard-more .icon { width: 15px; height: 15px; transition: transform 0.2s; }
.pcard-more:hover .icon { transform: translateX(3px); }

.pcard-cover { width: calc(100% + 2.2rem); aspect-ratio: 16 / 9; margin: -1.1rem -1.1rem 0.4rem; border-bottom: 1px solid var(--glass-edge); border-radius: calc(var(--radius) + 0.25rem) calc(var(--radius) + 0.25rem) 0 0; object-fit: cover; object-position: top; }

/* project */
.project { display: grid; gap: 0.5rem; padding: clamp(1.25rem, 3vw, 1.75rem); }
.project-head { display: grid; gap: 0.35rem; margin-bottom: 0.5rem; }
.project-title { margin: 0; font-family: var(--font-heading); font-size: clamp(1.5rem, 3vw, 2rem); font-weight: 600; line-height: 1.15; }
.project-meta { margin: 0; color: hsl(var(--muted)); font-size: 0.86rem; }
.project-metric { font-size: 0.95rem; }
.project-points { display: grid; gap: 0.45rem; margin: 0 0 0.75rem; padding-left: 1.1rem; color: hsl(var(--fg) / 0.85); }

/* gallery */
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.75rem; }
.gallery-item { display: grid; gap: 0.5rem; padding: 0; overflow: hidden; border: 1px solid var(--glass-edge); border-radius: calc(var(--radius) + 0.25rem); background: var(--surface); text-align: left; cursor: zoom-in; transition: border-color 0.2s, transform 0.2s; }
.gallery-item:hover { border-color: hsl(var(--primary) / 0.5); transform: translateY(-2px); }
.gallery-item img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; }
.gallery-caption { padding: 0 0.85rem 0.75rem; color: hsl(var(--fg) / 0.78); font-size: 0.82rem; }
.lightbox { max-width: min(92vw, 1400px); max-height: 92dvh; padding: 0; overflow: visible; border: 1px solid var(--glass-edge); border-radius: 0.9rem; background: hsl(var(--bg)); color: hsl(var(--fg)); }
.lightbox::backdrop { background: rgba(2, 6, 20, 0.82); backdrop-filter: blur(6px); }
.lightbox-figure { margin: 0; }
.lightbox-figure img { display: block; max-width: 100%; max-height: calc(92dvh - 4rem); border-radius: 0.9rem 0.9rem 0 0; object-fit: contain; }
.lightbox-caption { padding: 0.75rem 1rem; color: hsl(var(--fg) / 0.85); font-size: 0.88rem; }
.lightbox-close, .lightbox-nav { position: absolute; padding: 0.4rem 0.8rem; border: 1px solid var(--glass-edge); border-radius: 999px; background: hsl(var(--bg) / 0.85); font-size: 0.8rem; cursor: pointer; }
.lightbox-close { top: -2.6rem; right: 0; }
.lightbox-nav { bottom: 0.6rem; }
.lightbox-nav.prev { right: 6.4rem; }
.lightbox-nav.next { right: 0.75rem; }
.lightbox-nav[hidden] { display: none; }

/* chips */
.chips { display: flex; flex-wrap: wrap; gap: 0.35rem; margin: 0; padding: 0; list-style: none; }
.chip { padding: 0.2rem 0.6rem; border: 1px solid hsl(var(--border)); border-radius: 999px; background: hsl(var(--input) / 0.5); color: hsl(var(--fg) / 0.85); font-size: 0.76rem; }

/* pipeline */
.pipeline { padding: 1.25rem; }
.pipeline h3 { margin: 0 0 1.1rem; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 1rem; margin: 0; padding: 0; list-style: none; counter-reset: step; }
.step { position: relative; padding-top: 2.6rem; }
.step::before {
  position: absolute;
  top: 0;
  left: 0;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--grad-short);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 600;
  counter-increment: step;
  content: counter(step);
  box-shadow: 0 0 18px rgba(139, 92, 246, 0.4);
}
.step::after {
  position: absolute;
  top: 1rem;
  left: 2.4rem;
  right: -0.6rem;
  height: 2px;
  background: linear-gradient(90deg, rgba(139, 92, 246, 0.7), rgba(59, 130, 246, 0.15));
  content: "";
  transform-origin: left;
  animation: draw 0.6s ease both;
  animation-delay: calc(var(--i, 0) * 160ms + 200ms);
}
.step:last-child::after { display: none; }
.step h4 { margin: 0 0 0.25rem; font-size: 0.95rem; font-weight: 600; }
.step p { margin: 0; color: hsl(var(--fg) / 0.75); font-size: 0.85rem; }

/* metric */
.metric { padding: 1.25rem; }
.metric h3 { margin: 0 0 1rem; font-family: var(--font-heading); font-size: 1.1rem; font-weight: 600; }
.bars { display: grid; gap: 0.6rem; margin-bottom: 1rem; }
.bar { display: grid; grid-template-columns: 7.5rem 1fr 3rem; align-items: center; gap: 0.75rem; font-size: 0.82rem; }
.bar-track { height: 0.6rem; overflow: hidden; border-radius: 999px; background: hsl(var(--input)); }
.bar-fill { width: var(--w, 0%); height: 100%; border-radius: inherit; background: hsl(var(--muted) / 0.6); transition: width 1.2s cubic-bezier(0.2, 0.7, 0.2, 1); }
.bar.after .bar-fill { background: var(--grad-short); }
.bar-value { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.metric p { margin: 0; color: hsl(var(--fg) / 0.75); font-size: 0.86rem; }

/* list, note */
.list { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.list li { position: relative; padding: 0.8rem 1rem 0.8rem 2.4rem; }
.list li::before { position: absolute; top: 1.25rem; left: 1rem; width: 0.55rem; height: 0.55rem; border-radius: 2px; background: var(--grad-short); content: ""; transform: rotate(45deg); }
.note { padding: 1.1rem 1.25rem; }
.note h3 { margin: 0 0 0.4rem; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; }
.note p { margin: 0; color: hsl(var(--fg) / 0.8); font-size: 0.9rem; }

/* roles */
.roles { display: grid; gap: 0.6rem; margin: 0; padding: 0; list-style: none; }
.role { display: grid; grid-template-columns: 7rem 1fr; gap: 1rem; padding: 1rem 1.1rem; }
.role-period { color: hsl(var(--accent-2)); font-size: 0.8rem; font-weight: 600; }
.role h3 { margin: 0; font-family: var(--font-heading); font-size: 1.05rem; font-weight: 600; }
.role-org { margin: 0 0 0.4rem; color: hsl(var(--muted)); font-size: 0.85rem; }
.role ul { margin: 0; padding-left: 1.1rem; color: hsl(var(--fg) / 0.82); font-size: 0.87rem; }

/* links, contact */
.links { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.6rem 1rem;
  border: 1px solid hsl(var(--primary) / 0.5);
  border-radius: var(--radius);
  background: hsl(var(--primary) / 0.18);
  color: hsl(var(--fg));
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
}
.btn:hover { background: hsl(var(--primary) / 0.3); }
.btn.primary { border-color: transparent; background: linear-gradient(90deg, #3b82f6, #8b5cf6); }
.btn.primary:hover { filter: brightness(1.12); }
.contact { padding: clamp(1.25rem, 3vw, 1.75rem); }
.contact-email { display: block; margin: 0.25rem 0 0.5rem; color: hsl(var(--fg)); font-family: var(--font-heading); font-size: clamp(1.4rem, 3.5vw, 2rem); font-weight: 600; overflow-wrap: anywhere; text-decoration: none; }
.contact-email:hover { color: hsl(var(--accent-2)); }
.contact-where { margin: 0 0 1rem; color: hsl(var(--muted)); font-size: 0.88rem; }

/* suggestions */
.suggestions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.suggestion {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.85rem;
  border: 1px solid hsl(var(--border));
  border-radius: var(--radius);
  background: hsl(var(--input) / 0.6);
  font-size: 0.85rem;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
}
.suggestion:hover { border-color: hsl(var(--primary) / 0.6); background: hsl(var(--primary) / 0.14); }
.suggestion .icon { width: 16px; height: 16px; color: hsl(var(--accent-2)); }

/* composer */
.composer {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: min(52rem, calc(100% - 2rem));
  margin: 0 auto;
  padding: 0.4rem 0.4rem 0.4rem 1.1rem;
  border-radius: 1rem;
  background: #060c22;
}
.composer::before {
  position: absolute;
  inset: 0;
  padding: 1.5px;
  border-radius: inherit;
  background: linear-gradient(90deg, #06b6d4, #3b82f6, #8b5cf6, #d946ef);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  content: "";
  pointer-events: none;
}
.composer:focus-within { box-shadow: 0 0 32px rgba(139, 92, 246, 0.25); }
.composer input { flex: 1; min-width: 0; padding: 0.7rem 0; border: 0; background: none; color: hsl(var(--fg)); font: inherit; font-size: 0.98rem; outline: none; }
.composer input::placeholder { color: hsl(var(--muted)); }
.composer button {
  display: grid;
  place-items: center;
  width: 2.6rem;
  height: 2.6rem;
  border: 0;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #8b5cf6);
  cursor: pointer;
}
.composer button:disabled { background: hsl(var(--primary) / 0.25); cursor: default; }
.composer-note { margin: 0.5rem auto 1rem; color: hsl(var(--muted) / 0.75); font-size: 0.72rem; text-align: center; }

/* ---------- Motion ---------- */

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes blink { 50% { opacity: 0; } }
@keyframes draw { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 hsl(var(--ok) / 0.6); } 100% { box-shadow: 0 0 0 9px hsl(var(--ok) / 0); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
  .thread { scroll-behavior: auto; }
}

/* ---------- Small screens: the panel becomes a compact header with a scrolling action row ---------- */

@media (max-width: 860px) {
  body { overflow: auto; }
  .app { display: flex; flex-direction: column; height: 100dvh; }
  .panel { flex: none; border-right: 0; border-bottom: 1px solid var(--glass-edge); }
  .panel-scroll { overflow: visible; padding: 0.75rem 1rem 0.6rem; }
  .wordmark, .me-bio, .panel-foot, .suggested-label { display: none; }
  .me { display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 0.85rem; padding: 0 0 0.6rem; }
  .avatar { grid-row: span 3; width: 56px; height: 56px; margin: 0; padding: 2px; }
  .avatar-fallback { font-size: 1.1rem; }
  .me-name { font-size: 1.2rem; }
  .me-title { margin: 0; font-size: 0.9rem; }
  .me-status { width: fit-content; margin: 0.2rem 0 0; padding: 0.1rem 0.55rem; font-size: 0.7rem; }
  .suggested ul { display: flex; gap: 0.4rem; margin: 0 -1rem; padding: 0 1rem 0.1rem; overflow-x: auto; scrollbar-width: none; }
  .suggested li { flex: none; }
  .suggested button { padding: 0.4rem 0.7rem; border-color: hsl(var(--border)); white-space: nowrap; font-size: 0.8rem; }
  .thread { padding: 1.25rem 1rem 1rem; }
  .role { grid-template-columns: 1fr; gap: 0.25rem; }
  .tl-head { grid-template-columns: 3rem 1fr; }
  .tl-org { grid-column: 2; }
  .tl-body { padding-left: 4.25rem; }
  .bar { grid-template-columns: 5.5rem 1fr 2.5rem; }
  .composer-note { display: none; }
  .composer { margin-bottom: max(0.75rem, env(safe-area-inset-bottom)); }
}
