/* =========================================================================
   Ask Gianfranco — base layer
   Tokens, stage, chat thread, story components, composer layout.
   Hand-authored. OKLCH throughout. Warm paper stage, deep clay-red accent.
   OS-specific chrome lives in chrome.css / ios.css / android.css.
   ========================================================================= */

:root {
  --stage:        oklch(0.915 0.014 83);  /* warm ecru page */
  --surface:      oklch(0.975 0.006 86);  /* app screen, warm white */
  --surface-2:    oklch(0.948 0.011 80);  /* incoming bubbles, panels */
  --surface-3:    oklch(0.918 0.014 78);  /* chips, inputs */
  --line:         oklch(0.85 0.015 76);
  --line-soft:    oklch(0.90 0.012 78);

  --text:         oklch(0.28 0.018 52);   /* warm charcoal ink */
  --text-muted:   oklch(0.46 0.020 50);
  --text-faint:   oklch(0.60 0.018 52);

  --accent:       oklch(0.47 0.155 33);   /* deep clay red, AA on paper */
  --accent-strong:oklch(0.41 0.160 32);
  --accent-ink:   oklch(0.975 0.012 80);  /* paper text on accent fills */
  --accent-soft:  oklch(0.47 0.155 33 / 0.13);
  --accent-line:  oklch(0.47 0.155 33 / 0.32);
  --mint:         oklch(0.58 0.135 150);  /* online dot, deepened for light */

  --font-display: "Bricolage Grotesque", system-ui, sans-serif;
  --font-ui:      "Schibsted Grotesk", system-ui, sans-serif;
  --font-mono:    "Geist Mono", ui-monospace, "SF Mono", monospace;
  --font-label:   "Schibsted Grotesk", system-ui, sans-serif; /* labels: sans, not mono */

  --ease:         cubic-bezier(0.16, 1, 0.3, 1);
  --col:          min(460px, 100vw);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--font-ui);
  background: var(--stage);
  color: var(--text);
  line-height: 1.55;
  min-height: 100dvh;
  display: flex;
  justify-content: center;
  align-items: stretch;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

::selection { background: var(--accent-soft); color: var(--text); }

a { color: inherit; }

/* ----------------------------------------------------------------- stage */

.stage-grain,
.stage-glow { position: fixed; pointer-events: none; z-index: 0; }

/* a faint warm wash at the top of the paper, nothing more */
.stage-glow {
  inset: 0;
  background: radial-gradient(72vw 44vw at 50% -8%, oklch(0.72 0.07 45 / 0.12), transparent 60%);
  transition: opacity 1.2s var(--ease);
}

/* oversized faint wordmark grounding the desktop stage (hidden on phones) */
.stage-mark { display: none; }
@media (min-width: 1080px) {
  .stage-mark {
    position: fixed;
    z-index: 0;
    pointer-events: none;
    top: 50%;
    right: calc(50% + var(--col) / 2 + 1.5vw);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    text-align: right;
    font-family: var(--font-display);
    font-weight: 800;
    font-size: clamp(3.5rem, 8.5vw, 7.5rem);
    line-height: 0.84;
    letter-spacing: -0.04em;
    color: oklch(0.30 0.02 50 / 0.07);
    white-space: nowrap;
  }
}
@media (min-width: 1320px) {
  .stage-mark { right: calc(50% + var(--col) / 2 + 3.5vw); }
}

/* subtle paper tooth (kept faint so the per-OS wallpaper reads) */
.stage-grain {
  inset: 0;
  opacity: 0.12;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.4'/%3E%3C/svg%3E");
}

/* ---- per-OS wallpaper behind the phone (animated crossfade) ------------- */
.stage-os { position: fixed; inset: 0; z-index: 0; opacity: 0; pointer-events: none; transition: opacity 0.8s var(--ease); }
.stage-os--ios {
  background:
    radial-gradient(120vw 75vh at 74% -12%, oklch(0.85 0.07 255 / 0.55), transparent 55%),
    radial-gradient(95vw 70vh at 8% 112%, oklch(0.87 0.06 200 / 0.5), transparent 55%),
    linear-gradient(160deg, oklch(0.95 0.02 255), oklch(0.93 0.02 285));
}
.stage-os--android {
  background:
    radial-gradient(115vw 78vh at 86% -8%, oklch(0.86 0.10 45 / 0.6), transparent 55%),
    radial-gradient(92vw 70vh at 4% 108%, oklch(0.88 0.08 75 / 0.52), transparent 55%),
    linear-gradient(160deg, oklch(0.93 0.035 60), oklch(0.92 0.03 38));
}
body[data-os="ios"] .stage-os--ios { opacity: 1; }
body[data-os="android"] .stage-os--android { opacity: 1; }

/* -------------------------------------- story mood: emotional temperature */
/* Overlays crossfade per story beat to shift the paper's temperature
   (Phillips arc). Subtle on light; opacity-only transitions keep it cheap. */
.mood { position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: 0; }
.mood-cool {
  background: radial-gradient(62vw 50vw at 50% -6%, oklch(0.62 0.05 242 / 0.13), transparent 62%);
  transition: opacity 1.2s var(--ease);
}
.mood-dim {
  background: oklch(0.55 0.012 60 / 0.12);
  mix-blend-mode: multiply;
  transition: opacity 1.3s var(--ease);
}
.mood-bloom {
  background: radial-gradient(72vw 50vw at 50% -6%, oklch(0.62 0.13 40 / 0.15), transparent 62%);
  transition: opacity 1.2s var(--ease);
}

body[data-mood="challenge"] .mood-cool { opacity: 1; }
body[data-mood="challenge"] .stage-glow { opacity: 0.4; }
body[data-mood="peak"] .mood-bloom { opacity: 0.55; }
body[data-mood="setback"] .mood-dim { opacity: 1; }
body[data-mood="setback"] .mood-cool { opacity: 0.4; }
body[data-mood="setback"] .stage-glow { opacity: 0.3; }
body[data-mood="payoff"] .mood-bloom { opacity: 1; animation: bloom 1.6s var(--ease); }
body[data-mood="payoff"] .stage-glow { opacity: 1; }

@keyframes bloom {
  0% { opacity: 0; transform: scale(0.97); }
  45% { opacity: 1; }
  100% { opacity: 1; transform: scale(1); }
}

/* ------------------------------------------------------------ live dot */

.dot { width: 0.5rem; height: 0.5rem; border-radius: 50%; display: inline-block; }
.dot--live {
  background: var(--mint);
  box-shadow: 0 0 0 0 oklch(0.58 0.135 150 / 0.5);
  animation: pulse 2.6s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 oklch(0.58 0.135 150 / 0.45); }
  70%  { box-shadow: 0 0 0 0.5rem oklch(0.58 0.135 150 / 0); }
  100% { box-shadow: 0 0 0 0 oklch(0.58 0.135 150 / 0); }
}

/* ---------------------------------------------------------------- thread */

.thread {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 1.6rem;
  padding: 1.6rem 1.15rem 2rem;
  overflow: visible;
}

.msg { display: flex; flex-direction: column; gap: 0.4rem; max-width: 100%; }
.msg--in  { align-items: flex-start; }
.msg--out { align-items: flex-end; }

.msg__meta {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  font-family: var(--font-label);
  font-size: 0.68rem;
  color: var(--text-faint);
  padding-left: 0.25rem;
}
.msg__meta .sep { opacity: 0.5; }

.bubble {
  border-radius: 1.25rem;
  padding: 0.95rem 1.1rem;
  font-size: 1.03rem;
  line-height: 1.62;
  max-width: 92%;
}
.bubble--in {
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-top-left-radius: 0.35rem;
}
.bubble--out {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 600;
  line-height: 1.5;
  border-top-right-radius: 0.35rem;
  box-shadow: 0 0.6rem 1.4rem -0.7rem oklch(0.45 0.13 33 / 0.5);
  /* light text on the deep accent fill: keep the smoothing */
  -webkit-font-smoothing: antialiased;
}
.bubble p + p { margin-top: 0.7rem; }

.answer-lead { font-size: 1.09rem; }
.answer-aside { color: var(--text-muted); font-size: 0.95rem; font-style: italic; }

.hl { color: var(--text); font-weight: 600; box-shadow: inset 0 -0.42em 0 var(--accent-soft); padding: 0 0.04em; }
strong { font-weight: 600; color: var(--text); }

/* streaming cursor */
.stream-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1.05em;
  margin-left: 0.04em;
  vertical-align: -0.16em;
  background: var(--accent);
  border-radius: 1px;
  animation: blink 1s steps(2, start) infinite;
}
@keyframes blink { 50% { opacity: 0; } }

/* typing indicator */
.typing { display: inline-flex; gap: 0.28rem; padding: 0.3rem 0.1rem; }
.typing span {
  width: 0.42rem; height: 0.42rem; border-radius: 50%;
  background: var(--text-faint);
  animation: typing 1.2s var(--ease) infinite;
}
.typing span:nth-child(2) { animation-delay: 0.15s; }
.typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes typing { 0%, 60%, 100% { transform: translateY(0); opacity: 0.5; } 30% { transform: translateY(-0.3rem); opacity: 1; } }

/* ------------------------------------------------------- knowledge panel */

.bubble--panel { width: 100%; max-width: 100%; }

.profile {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.12rem 0 1rem;
  margin: 0.02rem 0 0.95rem;
  border-bottom: 1px solid var(--line-soft);
}
.profile__ava {
  position: relative;
  flex: 0 0 auto;
  width: 3.9rem;
  height: 3.9rem;
}
.profile__avaframe {
  display: block;            /* span defaults to inline, which ignores sizing */
  width: 100%;
  aspect-ratio: 1;            /* robust square -> clean circle in the flex row */
  border-radius: 50%;
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: 0 0.4rem 1.2rem -0.4rem oklch(0 0 0 / 0.6);
}
.profile__avaframe img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 26%;       /* show the face, no head-crop */
  transform: scaleX(-1);          /* mirror only: face turns toward the card */
}
/* dot lives outside the clipped frame so it is never cut off */
.profile__ava .dot--live {
  position: absolute;
  right: 0.04rem;
  bottom: 0.04rem;
  width: 0.84rem;
  height: 0.84rem;
  outline: 2.5px solid var(--surface-2);
  z-index: 2;
}
.profile__id { display: flex; flex-direction: column; gap: 0.16rem; min-width: 0; }
.profile__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.14rem;
  letter-spacing: -0.015em;
  line-height: 1.05;
}
.profile__role { font-size: 0.82rem; line-height: 1.25; color: var(--text-muted); }
.profile__link {
  align-self: flex-start;
  margin-top: 0.38rem;
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  font-family: var(--font-label);
  font-size: 0.73rem;
  color: var(--accent);
  text-decoration: none;
  padding: 0.2rem 0.55rem;
  border: 1px solid var(--accent-line);
  border-radius: 1.5rem;
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}
.profile__link:hover { background: var(--accent-soft); transform: translateY(-0.08rem); }
.profile__link:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 3px; }

.glance { display: flex; flex-direction: column; gap: 1.1rem; }

.panel { display: flex; flex-direction: column; }
.panel__row {
  display: grid;
  grid-template-columns: 6rem 1fr;
  gap: 0.8rem;
  padding: 0.5rem 0;
  align-items: baseline;
}
.panel__row + .panel__row { border-top: 1px solid var(--line-soft); }
.panel__row dt {
  font-family: var(--font-label);
  font-size: 0.74rem;
  color: var(--text-faint);
  text-transform: lowercase;
}
.panel__row dd { color: var(--text-muted); font-size: 0.95rem; }
.panel__row dd strong { color: var(--text); font-weight: 600; }
.panel__row--bg dt, .panel__row--bg dd { color: var(--text-faint); }
.flags { font-size: 1.1rem; letter-spacing: 0.12em; }

/* ------------------------------------------------------------ break-outs */
/* Big display lines that punctuate the thread. */

.breakout {
  position: relative;
  align-self: center;
  width: 100%;
  text-align: left;
  padding: 0.4rem 0.25rem 0;
}
.breakout__kicker {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-faint);
}
.breakout__line {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(1.9rem, 9vw, 2.7rem);
  line-height: 1.0;
  letter-spacing: -0.02em;
  margin-top: 0.2rem;
  color: var(--text);
}
.breakout__line em { font-style: italic; color: var(--accent); }

/* -------------------------------------------- pop: staggered answer reveal */
/* Visual modules held back during text streaming, then revealed as units. */
.pop { opacity: 0; transform: translateY(0.9rem) scale(0.975); }
.pop.in {
  opacity: 1;
  transform: none;
  transition: opacity 0.45s var(--ease), transform 0.55s var(--ease);
}

/* ============================================================ storytelling */

/* chapter kicker: a small label that opens each story beat */
.kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.05em;
  color: var(--accent);
}
.kicker::before {
  content: "";
  width: 1.3rem;
  height: 1px;
  background: var(--accent-line);
}
.kicker__n { color: var(--text-faint); letter-spacing: 0.04em; }

/* hero cliffhanger tail */
.hook-tail { margin-top: 0.7rem; color: var(--text-muted); }
.hook-tail strong { color: var(--accent); font-weight: 600; }

/* open-loop tail lines inside an answer */
.tail { margin-top: 0.8rem; color: var(--text-faint); font-size: 0.92rem; }
.aside-quiet { margin-top: 0.75rem; color: var(--text-faint); font-size: 0.92rem; font-style: italic; }

/* the cliffhanger "continue" button: the dopamine pull to the next beat */
.next-cta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  width: 100%;
  margin-top: 0.9rem;
  padding: 0.85rem 1.1rem;
  font-family: var(--font-ui);
  font-size: 1.02rem;
  font-weight: 600;
  text-align: left;
  color: var(--accent-ink);
  background: var(--accent);
  border: none;
  border-radius: 1.1rem;
  cursor: pointer;
  box-shadow: 0 0.7rem 1.6rem -0.7rem oklch(0.45 0.13 33 / 0.5);
  transition: transform 0.3s var(--ease), box-shadow 0.3s var(--ease), background 0.25s var(--ease);
}
.next-cta:hover { transform: translateY(-0.14rem); background: var(--accent-strong); box-shadow: 0 1rem 2.2rem -0.6rem var(--accent-strong); }
.next-cta:focus-visible { outline: 2px solid var(--accent-strong); outline-offset: 3px; }
.next-cta:active { transform: translateY(0); }
.next-cta:disabled { cursor: default; opacity: 0.72; transform: none; }
.next-cta__go {
  flex: 0 0 auto;
  font-size: 1.2rem;
  font-weight: 700;
  transition: transform 0.3s var(--ease);
}
.next-cta:hover .next-cta__go { transform: translateX(0.3rem); }
.next-cta--out { background: var(--surface-3); color: var(--text); box-shadow: none; border: 1px solid var(--accent-line); }
.next-cta--out:hover { background: var(--surface-2); }

/* the continue button morphs into the question bubble it becomes.
   Only the shared element animates; the rest of the page swaps instantly. */
::view-transition-group(q-morph) {
  animation-duration: 0.5s;
  animation-timing-function: var(--ease);
}
::view-transition-old(root),
::view-transition-new(root) { animation: none; }

/* challenge: two forces in tension */
.forces { display: flex; flex-direction: column; gap: 0.55rem; margin-top: 0.7rem; }
.force {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  padding: 0.8rem 0.9rem;
}
.force__k {
  font-family: var(--font-label);
  font-size: 0.68rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.force p { margin-top: 0.2rem; font-size: 0.95rem; color: var(--text-muted); }
.force strong { color: var(--text); }
.forces__plus {
  align-self: center;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.3rem;
  color: var(--accent);
  line-height: 0.6;
}
.stakes { margin-top: 0.8rem; font-size: 1.02rem; color: var(--text); }
.stakes strong { color: var(--accent); font-weight: 700; }

/* setback: the quiet, honest dip (oxytocin) */
.setback-block {
  margin-top: 0.7rem;
  padding: 0.95rem 1rem;
  background: var(--stage);
  border: 1px solid var(--line-soft);
  border-radius: 1rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.setback-block p + p { margin-top: 0.6rem; }
.setback-block strong { color: var(--text); font-weight: 600; }

/* conclusion: the warm payoff */
.payoff { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 0.7rem; }
.payoff__chip {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.65rem 0.85rem;
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  border-radius: 0.8rem;
}
.payoff__chip::before {
  content: "✓";
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent);
}
.punchline {
  margin-top: 0.85rem;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  line-height: 1.2;
  letter-spacing: -0.015em;
  color: var(--text);
}
.punchline strong { color: var(--accent); }

/* --------------------------------------------------------------- badges */

.badges { display: flex; flex-wrap: wrap; gap: 0.45rem; margin-top: 0.65rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.42rem; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  font-size: 0.82rem;
  font-weight: 500;
  padding: 0.36rem 0.72rem;
  border-radius: 0.7rem;
  background: var(--surface-3);
  border: 1px solid var(--line);
  color: var(--text);
  white-space: nowrap;
}
.badge--lead {
  background: var(--accent-soft);
  border-color: var(--accent-line);
  font-weight: 600;
}
.badge--ghost { background: transparent; color: var(--text-muted); border-style: dashed; }
.badge--flag { background: var(--surface); }
.badge__dot {
  width: 0.46rem; height: 0.46rem; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 0.5rem var(--accent);
}

/* ------------------------------------------- agentviz: AI mini-diagram */

.agentviz {
  margin-top: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1.05rem;
  padding: 1rem 0.9rem 0.85rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
}
.agentviz__agent {
  font-family: var(--font-label);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--accent-ink);
  background: var(--accent);
  padding: 0.24rem 0.72rem;
  border-radius: 1rem;
  box-shadow: 0 0.4rem 1.3rem -0.3rem var(--accent-strong);
}
.agentviz__beam {
  width: 2px; height: 0.9rem;
  background: linear-gradient(var(--accent), transparent);
}
.agentviz__mods { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: center; }
.mod {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  color: var(--text-muted);
  background: var(--surface-2);
  border: 1px solid var(--line-soft);
  border-radius: 0.5rem;
  padding: 0.3rem 0.55rem;
}
.mod--hot {
  color: var(--accent);
  border-color: var(--accent-line);
  background: var(--accent-soft);
}
.agentviz__cap { font-size: 0.8rem; color: var(--text-faint); margin-top: 0.15rem; text-align: center; }
.agentviz__cap strong { color: var(--text-muted); }

/* ------------------------------------------------ punch: tag + bold line */

.punch {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.7rem;
  align-items: start;
  margin-top: 0.7rem;
}
.punch__k {
  font-family: var(--font-label);
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid var(--accent-line);
  padding: 0.24rem 0.5rem;
  border-radius: 0.5rem;
  white-space: nowrap;
  margin-top: 0.12rem;
}
.punch p { font-size: 0.96rem; color: var(--text-muted); }
.punch strong { color: var(--text); font-weight: 600; }

/* --------------------------------------------------------- work tiles */

.tile {
  margin-top: 0.7rem;
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-radius: 1.05rem;
  padding: 0.9rem 0.95rem;
}
.tile__head {
  display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem;
  margin-bottom: 0.45rem;
}
.tile__org { font-family: var(--font-label); font-size: 0.7rem; color: var(--accent); }
.tile__when { font-family: var(--font-label); font-size: 0.68rem; color: var(--text-faint); white-space: nowrap; }
.tile__title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.tile__title strong { color: var(--accent); }
.tile__sub { font-size: 0.9rem; color: var(--text-muted); margin-top: 0.35rem; }
.tile__sub strong { color: var(--text); font-weight: 600; }

.flow { display: flex; align-items: center; gap: 0.45rem; flex-wrap: wrap; margin-bottom: 0.2rem; }
.flow__step {
  font-size: 0.84rem;
  font-weight: 600;
  padding: 0.42rem 0.7rem;
  border-radius: 0.7rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.flow__step--ai { color: var(--accent); border-color: var(--accent-line); background: var(--accent-soft); }
.flow__step--out { background: var(--accent); color: var(--accent-ink); border-color: transparent; font-weight: 700; }
.flow__arrow { color: var(--text-faint); font-weight: 700; }

/* ----------------------------------------------------------- toolkit */

.kit { display: flex; flex-direction: column; gap: 0.95rem; }
.kit__row { display: flex; flex-direction: column; gap: 0.45rem; }
.kit__k {
  font-family: var(--font-label);
  font-size: 0.72rem;
  letter-spacing: 0.04em;
  color: var(--text-faint);
}
.kit__row--lead .kit__k { color: var(--accent); }

/* -------------------------------------------------------------- timeline */

.timeline { list-style: none; display: flex; flex-direction: column; }
.timeline__item {
  display: grid;
  grid-template-columns: 6.2rem 1fr;
  gap: 0.9rem;
  padding: 0.6rem 0 0.6rem 0.9rem;
  position: relative;
  align-items: baseline;
}
.timeline__item::before {
  content: ""; position: absolute; left: 0; top: 0.95em;
  width: 0.55rem; height: 0.55rem; border-radius: 50%;
  background: var(--accent); outline: 3px solid var(--surface-2);
}
.timeline__item::after {
  content: ""; position: absolute; left: 0.245rem; top: 1.4em; bottom: -0.6em;
  width: 1.5px; background: var(--line);
}
.timeline__item:last-child::after { display: none; }
.timeline__item--edu::before { background: var(--text-faint); }
.timeline__when { font-family: var(--font-label); font-size: 0.74rem; color: var(--text-faint); }
.timeline__what { font-size: 0.96rem; color: var(--text-muted); }

/* --------------------------------------------------------------- contact */

.contact { display: flex; flex-direction: column; gap: 0.6rem; margin-top: 0.65rem; }
.cta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  padding: 0.85rem 1rem;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 1.05rem;
  text-decoration: none;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease), transform 0.3s var(--ease);
}
.cta:hover { border-color: var(--accent-line); background: var(--surface-3); transform: translateY(-0.12rem); }
.cta:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 3px; }
.cta:active { transform: translateY(0); }
.cta__icon { flex: 0 0 auto; color: var(--accent); }
.cta__body { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.cta__k { font-family: var(--font-label); font-size: 0.68rem; color: var(--text-faint); text-transform: lowercase; }
.cta__v { font-weight: 600; color: var(--text); }
.cta__go { color: var(--accent); font-weight: 700; font-size: 1.15rem; transition: transform 0.3s var(--ease); }
.cta:hover .cta__go { transform: translateX(0.28rem); }

/* -------------------------------------------------------------- composer */
/* Layout only. The visible material (Liquid Glass / Material surface) is
   painted on a ::before layer defined in chrome.css and skinned per OS —
   a backdrop-filter on .composer itself would make it a containing block
   and trap the fixed desktop OS-switch inside it. */

.composer {
  position: sticky;
  bottom: 0;
  z-index: 20;
  padding: 0.7rem 1.0rem max(0.9rem, env(safe-area-inset-bottom));
}

.suggest {
  display: flex;
  gap: 0.5rem;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 0.3rem 0.1rem 0.7rem;
  margin: 0 -0.2rem;
  scroll-padding: 0.2rem;
  scroll-snap-type: x proximity;
  cursor: grab;
  user-select: none;
  touch-action: pan-y;
  -webkit-mask-image: linear-gradient(to right, transparent, #000 0.6rem, #000 calc(100% - 1.4rem), transparent);
          mask-image: linear-gradient(to right, transparent, #000 0.6rem, #000 calc(100% - 1.4rem), transparent);
}
.suggest::-webkit-scrollbar { display: none; }
.suggest--dragging { cursor: grabbing; scroll-snap-type: none; }

.chip {
  flex: 0 0 auto;
  scroll-snap-align: center;
  font-family: var(--font-ui);
  font-size: 0.85rem;
  font-weight: 500;
  min-height: 2.75rem;
  color: var(--text);
  background: var(--surface-3);
  border: 1px solid var(--line);
  border-radius: 2rem;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease), color 0.25s var(--ease), transform 0.25s var(--ease);
}
.chip:hover { border-color: var(--accent-line); transform: translateY(-0.1rem); }
.chip:focus-visible { outline: 2px solid var(--accent-line); outline-offset: 3px; }
.chip:active { transform: translateY(0); }
.chip--done { color: var(--text-faint); opacity: 0.55; }
.chip--done::before { content: "✓ "; color: var(--accent); }

/* ------------------------------------------------------- reveal & motion */

.reveal { opacity: 0; transform: translateY(1.2rem); }
.reveal.in { opacity: 1; transform: none; transition: opacity 0.7s var(--ease), transform 0.7s var(--ease); }

/* very small phones */
@media (max-width: 360px) {
  .thread { padding-inline: 0.9rem; }
  .bubble { font-size: 0.95rem; }
}

/* --------------------------------------------------- reduced motion (global) */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .stream-cursor { display: none; }
  /* OS-feature components rest in their final, visible state */
  .notif, .gemini, .poster { opacity: 1; transform: none; }
  .ai-glow, .ai-label { display: none; }
}
