﻿/* =====================================================================
   BIT TEK.ai - App Styles (v0.1)
   ---------------------------------------------------------------------
   Layout + components. Tokens live in tokens.css.
   Structure:
     1. Reset & base
     2. App shell / header
     3. Hero (calm landing)
     4. Composer (the single conversational input)
     5. Starter chips
     6. Conversation + Response perspectives
     7. Discovery drawer (Lenses + Thinking Controls)
     8. Utilities & motion
   ===================================================================== */

/* ---------- 1. Reset & base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }

body {
  font-family: var(--font-sans);
  color: var(--ink);
  background: var(--paper);
  /* A whisper of warmth in the corners - feels like paper under a lamp,
     not a glowing screen. Deliberately subtle, no visible gradient bands. */
  background-image:
    radial-gradient(1200px 600px at 78% -8%, rgba(193, 95, 60, 0.045), transparent 60%),
    radial-gradient(900px 500px at 8% 108%, rgba(124, 122, 78, 0.05), transparent 60%);
  background-attachment: fixed;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

h1, h2, h3 { font-family: var(--font-serif); font-weight: 500; letter-spacing: -0.01em; margin: 0; }
p { margin: 0; }
button { font-family: inherit; cursor: pointer; }
::selection { background: var(--clay-tint); }

/* ---------- 2. App shell / header ---------- */
.app {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: var(--s-5) var(--s-6);
  max-width: 1080px;
  width: 100%;
  margin: 0 auto;
}

.wordmark {
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-family: var(--font-serif);
  font-size: 19px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--ink);
  text-decoration: none;
  background: none;
  border: 0;
  padding: 0;
}
.wordmark .dot { color: var(--clay); }
.wordmark small {
  font-family: var(--font-sans);
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-muted);
  margin-left: var(--s-2);
  align-self: center;
}

.header-link {
  background: none;
  border: 0;
  color: var(--ink-muted);
  font-size: 14px;
  padding: var(--s-2) var(--s-3);
  border-radius: var(--r-pill);
  transition: color 200ms var(--ease), background 200ms var(--ease);
}
.header-link:hover { color: var(--ink); background: var(--paper-deep); }

/* ---------- 3. Hero (calm landing) ---------- */
.stage {
  flex: 1;
  width: 100%;
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--s-5) var(--s-8);
  display: flex;
  flex-direction: column;
}

.workshop-identity {
  padding-top: clamp(48px, 10vh, 112px);
  max-width: 62ch;
}
.workshop-identity h1 {
  max-width: 17ch;
  font-size: clamp(32px, 5.2vw, 46px);
  line-height: 1.1;
  color: var(--ink);
}
.workshop-identity > p:not(.eyebrow) {
  margin-top: var(--s-4);
  color: var(--ink-soft);
  font-size: 16.5px;
  line-height: 1.65;
}
.workshop-identity .workshop-tagline {
  margin-top: var(--s-3);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.6vw, 22px);
  line-height: 1.35;
}

.hero {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  transition: padding var(--dur) var(--ease), opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
}

/* When a conversation begins, the hero recedes rather than disappears -
   the room stays the same, the focus just shifts. */
.app.is-conversing .hero {
  padding-top: var(--s-6);
}

.eyebrow {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--ink-muted);
  margin-bottom: var(--s-4);
  display: flex;
  align-items: center;
  gap: var(--s-2);
}
.eyebrow .pulse {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--clay);
  box-shadow: 0 0 0 0 rgba(193, 95, 60, 0.4);
  animation: pulse 3.4s var(--ease) infinite;
}
@keyframes pulse {
  0%   { box-shadow: 0 0 0 0 rgba(193, 95, 60, 0.35); }
  70%  { box-shadow: 0 0 0 8px rgba(193, 95, 60, 0); }
  100% { box-shadow: 0 0 0 0 rgba(193, 95, 60, 0); }
}

.hero h1,
.hero h2 {
  font-size: clamp(30px, 5.2vw, 46px);
  line-height: 1.1;
  color: var(--ink);
  max-width: 15ch;
}
.hero .hero-sub {
  margin-top: var(--s-4);
  font-size: 17px;
  color: var(--ink-soft);
  max-width: 46ch;
}

.angles-note {
  color: var(--ink-muted);
  font-size: 13.5px;
  line-height: 1.45;
  margin-top: var(--s-3);
}

.app.is-conversing .hero h1,
.app.is-conversing .hero h2 { font-size: clamp(22px, 3vw, 26px); }
.app.is-conversing .hero .hero-sub { display: none; }

/* ---------- 4. Composer ---------- */
.composer {
  margin-top: var(--s-6);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: var(--s-5) var(--s-5) var(--s-4);
  position: relative;
  transition: box-shadow 240ms var(--ease), border-color 240ms var(--ease), transform 240ms var(--ease);
}
.composer:focus-within {
  border-color: var(--clay);
  box-shadow: var(--shadow-lg), 0 0 0 4px var(--clay-tint);
  transform: translateY(-1px);
}

.composer textarea {
  width: 100%;
  border: 0;
  outline: 0;
  resize: none;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 18px;
  line-height: 1.55;
  padding: var(--s-2);
  min-height: 30px;
  max-height: 320px;
}
.composer textarea::placeholder { color: var(--ink-faint); }

.composer-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: var(--s-2);
  padding: 0 var(--s-1);
}
.composer-hint {
  font-size: 12.5px;
  color: var(--ink-muted);
}
.composer-hint kbd {
  font-family: var(--font-mono);
  font-size: 11px;
  background: var(--paper-deep);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 1px 6px;
  color: var(--ink-soft);
}

.send-btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--clay);
  color: #fff;
  border: 0;
  border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-4);
  font-size: 14.5px;
  font-weight: 500;
  transition: background 200ms var(--ease), transform 120ms var(--ease), opacity 200ms var(--ease);
}
.send-btn:hover { background: var(--clay-deep); }
.send-btn:active { transform: scale(0.97); }
.send-btn:disabled { opacity: 0.45; cursor: default; background: var(--ink-faint); }
.send-btn svg { width: 16px; height: 16px; }

/* ---------- 5. Starter chips ---------- */
.starters {
  margin-top: var(--s-5);
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  transition: opacity var(--dur) var(--ease), max-height var(--dur) var(--ease);
}
.starters-label {
  width: 100%;
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: calc(var(--s-1) * -1);
}
.chip {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-4);
  font-size: 14px;
  color: var(--ink-soft);
  transition: all 180ms var(--ease);
}
.chip:hover {
  border-color: var(--clay);
  color: var(--ink);
  background: var(--surface);
  transform: translateY(-1px);
}
/* Once someone is in a conversation, the training wheels fold away. */
.app.is-conversing .starters { opacity: 0; max-height: 0; overflow: hidden; margin: 0; pointer-events: none; }

/* ---------- 6. Conversation + Response ---------- */
.conversation {
  margin-top: var(--s-5);
  display: flex;
  flex-direction: column;
  gap: var(--s-7);
}

.exchange { display: flex; flex-direction: column; gap: var(--s-4); }

/* The user's question, kept as a quiet note pinned above the answer. */
.user-note {
  align-self: flex-start;
  max-width: 90%;
  background: rgba(244, 228, 218, 0.72);
  color: var(--ink);
  border-radius: var(--r-md);
  padding: var(--s-3) var(--s-4);
  font-size: 16px;
  line-height: 1.5;
  border: 1px solid rgba(193, 95, 60, 0.12);
}
.user-note .who {
  display: block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--clay-deep);
  margin-bottom: 4px;
}

/* Thinking panel - visible process, not hidden reasoning. */
.thinking-panel {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  margin-left: var(--s-4);
  padding: var(--s-5);
  opacity: 0;
  transform: translateY(8px);
  animation: thinkingIn 220ms var(--ease) forwards;
}
.thinking-panel.is-leaving {
  animation: thinkingOut 180ms var(--ease) forwards;
}
.thinking-title {
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 21px;
  line-height: 1.2;
  margin: 0;
}
.thinking-subtitle {
  color: var(--ink-soft);
  font-size: 14px;
  line-height: 1.5;
  margin-top: var(--s-2);
}
.thinking-steps {
  display: flex;
  flex-direction: column;
  gap: var(--s-2);
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
}
.thinking-step {
  display: flex;
  align-items: center;
  gap: var(--s-3);
  color: var(--ink-muted);
  font-size: 14px;
  line-height: 1.35;
  opacity: 0.72;
  transition: color 220ms var(--ease), opacity 220ms var(--ease), transform 220ms var(--ease);
}
.thinking-step.is-active {
  color: var(--ink);
  opacity: 1;
  transform: translateX(2px);
}
.step-mark {
  flex: none;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--paper-deep);
  color: var(--clay-deep);
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 600;
}
.thinking-step.is-active .step-mark {
  background: var(--clay-tint);
}
@keyframes thinkingIn { to { opacity: 1; transform: translateY(0); } }
@keyframes thinkingOut { to { opacity: 0; transform: translateY(6px); } }

/* Response block */
.response {
  display: flex;
  flex-direction: column;
  gap: var(--s-4);
  margin-left: var(--s-4);
  padding-left: var(--s-4);
  border-left: 1px solid var(--line);
}

.response-kicker {
  font-size: 12.5px;
  color: var(--ink-muted);
  margin-bottom: calc(var(--s-2) * -1);
}

/* Each perspective. The Practical one is primary; the rest are lighter
   supporting notes - reflecting docs: "This should be light. It should
   not turn every answer into a five-part essay." */
.perspective {
  opacity: 0;
  transform: translateY(10px);
  animation: rise var(--dur) var(--ease) forwards;
}
@keyframes rise { to { opacity: 1; transform: translateY(0); } }

.perspective .p-head {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  margin-bottom: var(--s-2);
}
.perspective .p-dot { width: 8px; height: 8px; border-radius: 50%; }

/* Practical = the lead answer, given real weight. */
.perspective.practical {
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  padding: var(--s-5) var(--s-5);
}
.perspective.practical .p-head { color: var(--p-practical); }
.perspective.practical .p-dot { background: var(--p-practical); }
.perspective.practical .p-body { font-size: 17px; color: var(--ink); line-height: 1.62; }
.perspective.practical .p-steps {
  margin: var(--s-4) 0 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
}
.perspective.practical .p-steps li {
  display: flex;
  gap: var(--s-3);
  font-size: 15.5px;
  color: var(--ink-soft);
}
.perspective.practical .p-steps .n {
  flex: none;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--clay-tint);
  color: var(--clay-deep);
  font-size: 12px;
  font-weight: 600;
  display: grid;
  place-items: center;
  margin-top: 1px;
}

/* Supporting perspectives - quieter, sit in the margin of the answer. */
.supporting {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--s-4);
}
.perspective.support {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-4);
  transition: border-color 180ms var(--ease), transform 180ms var(--ease), background 180ms var(--ease);
}
.perspective.support:hover {
  background: var(--surface);
  border-color: var(--line-strong);
  transform: translateY(-1px);
}
.perspective.support .p-body { font-size: 14.5px; color: var(--ink-soft); line-height: 1.55; }
.perspective.skeptical .p-head, .perspective.skeptical .p-dot { color: var(--p-skeptical); }
.perspective.skeptical .p-dot { background: var(--p-skeptical); }
.perspective.creative .p-head, .perspective.creative .p-dot { color: var(--p-creative); }
.perspective.creative .p-dot { background: var(--p-creative); }
.perspective.humor .p-head, .perspective.humor .p-dot { color: var(--p-humor); }
.perspective.humor .p-dot { background: var(--p-humor); }

/* Humor spans full width as the final perspective beat. */
.perspective.humor { grid-column: 1 / -1; background: transparent; border: 0; padding: var(--s-2) var(--s-1); }
.perspective.humor .p-body { font-style: italic; color: var(--ink-muted); }

/* ---------- 7. Discovery: Lenses + Thinking Controls ---------- */
/* Available from first load. It is an invitation, never a gate. */
.discovery {
  margin-top: var(--s-3);
  opacity: 0;
  transform: translateY(8px);
  transition: opacity var(--dur) var(--ease), transform var(--dur) var(--ease);
  pointer-events: none;
}
.discovery.is-visible { opacity: 1; transform: translateY(0); pointer-events: auto; }

.discovery-helper {
  color: var(--ink-soft);
  font-size: 13.5px;
  margin-bottom: var(--s-2);
}

.discovery-toggle {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--surface);
  border: 1px solid rgba(193, 95, 60, 0.28);
  color: var(--ink-soft);
  border-radius: var(--r-pill);
  box-shadow: var(--shadow-sm);
  padding: var(--s-2) var(--s-5);
  font-size: 14px;
  font-weight: 600;
  transition: all 180ms var(--ease);
}
.discovery-toggle:hover { color: var(--ink); border-color: var(--clay); transform: translateY(-1px); }
.discovery-toggle .caret { transition: transform 220ms var(--ease); }
.discovery.is-open .discovery-toggle .caret { transform: rotate(180deg); }

.discovery-panel {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transition: max-height 420ms var(--ease), opacity 320ms var(--ease), margin 320ms var(--ease);
}
.discovery.is-open .discovery-panel { max-height: 860px; opacity: 1; margin-top: var(--s-4); }

.panel-card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  padding: var(--s-5);
  box-shadow: var(--shadow-sm);
}
.panel-intro { font-size: 13.5px; color: var(--ink-muted); margin-bottom: var(--s-5); }
.panel-intro strong { color: var(--ink-soft); font-weight: 600; }

.tuning-group {
  padding: var(--s-4);
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  background: var(--surface-warm);
}
.tuning-group + .tuning-group { margin-top: var(--s-4); }
.live-tuning {
  background: linear-gradient(180deg, #fff, var(--surface-warm));
  border-style: dashed;
}
.group-heading {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s-3);
  margin-bottom: var(--s-3);
}
.group-heading span {
  color: var(--ink);
  font-size: 14px;
  font-weight: 600;
}
.group-heading small {
  color: var(--ink-muted);
  font-size: 12px;
}

.lenses {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
}
.lens {
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-4);
  font-size: 13.5px;
  color: var(--ink-soft);
  transition: all 160ms var(--ease);
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
}
.lens .lens-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ink-faint); }
.lens:hover {
  border-color: var(--clay);
  color: var(--ink);
  transform: translateY(-1px);
}
.lens.is-active {
  background: var(--ink);
  color: #fff;
  border-color: var(--ink);
}
.lens.is-active .lens-dot { background: var(--clay); }

.controls { display: flex; flex-direction: column; gap: var(--s-4); }
.control {
  padding: var(--s-3);
  border-radius: var(--r-sm);
  transition: background 180ms var(--ease);
}
.control:hover { background: rgba(244, 228, 218, 0.42); }
.control-label {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12.5px;
  margin-bottom: var(--s-2);
}
.control-name {
  color: var(--ink-soft);
  font-weight: 600;
}
.control-value {
  font-family: var(--font-mono);
  color: var(--clay-deep);
  background: var(--clay-tint);
  border-radius: var(--r-pill);
  padding: 2px 8px;
  font-size: 11px;
}
.control-ends {
  display: flex;
  justify-content: space-between;
  color: var(--ink-muted);
  font-size: 11.5px;
  margin-bottom: var(--s-2);
}
input[type="range"] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: var(--r-pill);
  background: linear-gradient(90deg, var(--clay) 0 var(--value, 50%), var(--line-strong) var(--value, 50%) 100%);
  outline: none;
}
input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: var(--surface);
  border: 2px solid var(--clay);
  box-shadow: var(--shadow-sm);
  cursor: pointer;
  transition: transform 120ms var(--ease), box-shadow 120ms var(--ease);
}
input[type="range"]::-webkit-slider-thumb:hover {
  transform: scale(1.14);
  box-shadow: 0 0 0 6px var(--clay-tint);
}
input[type="range"]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--surface); border: 2px solid var(--clay); cursor: pointer;
}

.panel-actions { display: flex; justify-content: flex-end; margin-top: var(--s-5); }
.rerun-btn {
  background: var(--ink);
  color: #fff;
  border: 0;
  border-radius: var(--r-pill);
  padding: var(--s-2) var(--s-5);
  font-size: 14px;
  font-weight: 500;
  transition: background 180ms var(--ease), transform 120ms var(--ease);
}
.rerun-btn:hover { background: #000; }
.rerun-btn:active { transform: scale(0.97); }
.rerun-btn:disabled { opacity: 0.45; cursor: default; background: var(--ink-faint); transform: none; }

/* ---------- 8. Behind the Bench + utilities & footer ---------- */
.bench-notes {
  margin-top: var(--s-8);
  padding-top: var(--s-6);
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
  scroll-margin-top: var(--s-5);
}
.bench-notes .eyebrow { margin-bottom: var(--s-3); }
.bench-notes > h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: var(--s-4);
}
.bench-notes-intro,
.bench-notes-belief {
  max-width: 58ch;
  font-size: 15.5px;
  line-height: 1.65;
}
.bench-notes-belief {
  margin-top: var(--s-3);
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: 17px;
}
.bench-note-list { margin-top: var(--s-6); border-top: 1px solid var(--line); }
.bench-note { border-bottom: 1px solid var(--line); scroll-margin-top: var(--s-4); }
.bench-note.is-open {
  background: rgba(255, 255, 255, 0.24);
  box-shadow: inset 3px 0 0 var(--line-strong);
}
.bench-note h3 { margin: 0; }
.bench-note-toggle {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
  padding: var(--s-4) var(--s-2);
  border: 0;
  border-radius: var(--r-sm);
  background: transparent;
  color: var(--ink);
  font-family: var(--font-serif);
  font-size: clamp(18px, 2.4vw, 21px);
  text-align: left;
}
.bench-note-toggle:hover { background: var(--paper-deep); }
.bench-note-toggle:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.bench-note-label { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.bench-note-subtitle {
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 13.5px;
  font-weight: 400;
  line-height: 1.45;
}
.bench-note-mark { color: var(--clay-deep); font-family: var(--font-sans); font-size: 20px; font-weight: 400; transition: transform var(--dur) var(--ease); }
.bench-note.is-open .bench-note-mark { transform: rotate(45deg); }
.bench-note-body {
  max-width: 62ch;
  padding: var(--s-3) var(--s-5) var(--s-6);
  border-top: 1px dashed var(--line);
}
.bench-note-body[hidden] { display: none; }
.bench-note-body section + section { margin-top: var(--s-5); }
.bench-note-body h4 {
  margin: 0 0 var(--s-2);
  color: var(--ink-muted);
  font-family: var(--font-sans);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.bench-note-body p { font-size: 14.75px; line-height: 1.72; }
.bench-note-body p + p { margin-top: var(--s-3); }
.bench-note-body section:last-child p { color: var(--ink); font-family: var(--font-serif); font-size: 16px; }
.bench-aside {
  padding-left: var(--s-4);
  border-left: 2px solid var(--line-strong);
  color: var(--ink-muted);
  font-size: 13.75px !important;
  font-style: italic;
}

.site-footer {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: var(--s-5);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 12.5px;
  display: flex;
  justify-content: space-between;
  gap: var(--s-4);
  flex-wrap: wrap;
}
.badge {
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--ink-muted);
  border: 1px solid var(--line);
  border-radius: var(--r-pill);
  padding: 2px 10px;
}
.footer-copyright {
  color: var(--ink-faint);
  font-size: 11.5px;
}
.footer-bottom {
  flex-basis: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}
.footer-email {
  color: var(--ink-muted);
  font-size: 11.5px;
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 3px;
  transition: color var(--dur) var(--ease), text-decoration-color var(--dur) var(--ease);
}
.footer-email:hover { color: var(--ink); text-decoration-color: currentColor; }
.footer-email:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; border-radius: 2px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 620px) {
  .site-header { padding: var(--s-4) var(--s-5); }
  .workshop-identity { padding-top: var(--s-6); }
  .workshop-section,
  .bench-notes { margin-top: var(--s-7); padding-top: var(--s-5); }
  .supporting { grid-template-columns: 1fr; }
  .response { margin-left: 0; padding-left: var(--s-3); }
  .thinking-panel { margin-left: 0; }
  .composer-row { align-items: flex-start; flex-direction: column; gap: var(--s-3); }
  .send-btn { width: 100%; justify-content: center; }
  .group-heading { flex-direction: column; gap: 2px; }
  .hero .hero-sub { font-size: 15.5px; }
  .angles-note { font-size: 13px; }
  .composer textarea { font-size: 16.5px; }
  .bench-note-toggle { padding: var(--s-4) 0; }
  .bench-note-toggle { min-height: 56px; }
  .bench-note-body { padding-left: 0; padding-right: 0; }
  .bench-note.is-open { box-shadow: inset 2px 0 0 var(--line-strong); padding-left: var(--s-3); padding-right: var(--s-3); }
  .footer-bottom { align-items: flex-start; flex-direction: column; gap: var(--s-2); }
  .footer-email { display: inline-flex; align-items: center; min-height: 44px; }

  /* Touch has no hover preview. Keep the editorial card, but make its
     destination and pressed state apparent on first contact. */
  .workshop-card-link {
    position: relative;
    box-shadow: var(--shadow-md);
    border-color: var(--line-strong);
    -webkit-tap-highlight-color: rgba(193, 95, 60, 0.12);
  }
  .workshop-card-link::after {
    content: "↗";
    position: absolute;
    top: var(--s-3);
    right: var(--s-3);
    color: var(--clay-deep);
    font-size: 14px;
    line-height: 1;
    opacity: 0.72;
    pointer-events: none;
  }
  .workshop-card-link:active {
    box-shadow: var(--shadow-sm);
    transform: translateY(1px);
  }
  .workshop-project-link {
    padding: var(--s-2) 0;
    border-bottom-color: var(--clay-deep);
    font-size: 14.5px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .thinking-panel,
  .thinking-panel.is-leaving,
  .thinking-step,
  .perspective {
    animation: none;
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---------- Workshop projects ("Things we're building") ----------
   A calm shelf of what we're actively building. Museum exhibit, not
   storefront. The grid scales from one project to many on its own. */
.workshop-section {
  margin-top: var(--s-8);
  padding: var(--s-6) 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.workshop-section .eyebrow { margin-bottom: var(--s-3); }
.workshop-section h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: var(--s-4);
}
.workshop-intro {
  max-width: 58ch;
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: var(--s-6);
}
.workshop-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  /* Inside the 720px stage this yields at most two columns, so four
     cards sit as a balanced 2x2. Narrow screens collapse to one column. */
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--s-5);
}
.workshop-project {
  display: flex;
  flex-direction: column;
}
.workshop-card-link {
  display: flex;
  flex: 1;
  flex-direction: column;
  background: var(--surface-warm);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: var(--s-6);
  box-shadow: var(--shadow-sm);
  color: inherit;
  cursor: pointer;
  text-decoration: none;
  transition: box-shadow var(--dur) var(--ease),
              border-color var(--dur) var(--ease),
              transform var(--dur) var(--ease);
}
.workshop-card-link:hover {
  box-shadow: var(--shadow-md);
  border-color: var(--line-strong);
  transform: translateY(-2px);
}
.workshop-card-link:focus-visible {
  outline: 3px solid var(--clay);
  outline-offset: 4px;
  border-color: var(--line-strong);
  box-shadow: var(--shadow-md);
}
.workshop-project-preview {
  display: block;
  width: 100%;
  height: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-md);
  margin-bottom: var(--s-5);
}
.workshop-project-title {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.2;
  color: var(--ink);
  margin-bottom: var(--s-2);
}
.workshop-project-sub {
  max-width: 56ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: var(--s-3);
}
.workshop-project-note {
  max-width: 56ch;
  font-size: 14.5px;
  line-height: 1.65;
  color: var(--ink-muted);
  margin-bottom: var(--s-5);
}
/* Center an odd final project without making it wider than its neighbors. */
.workshop-project:last-child:nth-child(odd) {
  grid-column: 1 / -1;
  width: calc((100% - var(--s-5)) / 2);
  justify-self: center;
}
.workshop-project-reflection {
  max-width: 56ch;
  margin: 0 0 var(--s-3);
  padding-top: var(--s-2);
  border-top: 1px solid var(--line);
  color: var(--ink-muted);
  font-size: 13.75px;
  font-style: italic;
  line-height: 1.7;
}
.workshop-project-link {
  display: inline-flex;
  margin-top: auto;
  width: fit-content;
  color: var(--clay-deep);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px solid rgba(193, 95, 60, 0.34);
  transition: color var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
}
.workshop-card-link:hover .workshop-project-link,
.workshop-card-link:focus-visible .workshop-project-link {
  color: var(--ink);
  border-color: var(--ink);
}
/* Card head: title + a quiet status label sitting on the same shelf. */
.workshop-project-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--s-3);
  flex-wrap: wrap;
  margin-bottom: var(--s-2);
}
.workshop-project-head .workshop-project-title { margin-bottom: 0; }
.workshop-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12.5px;
  font-weight: 500;
  letter-spacing: 0.01em;
  color: var(--ink-muted);
  white-space: nowrap;
}
.workshop-status .status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--ink-faint);
  flex: none;
}
.workshop-status--amber .status-dot { background: var(--clay); }
.workshop-status--green .status-dot { background: #6f8a5f; }

@media (max-width: 680px) {
  .workshop-project:last-child:nth-child(odd) {
    grid-column: auto;
    width: auto;
    justify-self: stretch;
  }
}

/* "Built because..." - a small workshop tell, not a tagline. */
.workshop-because {
  font-weight: 600;
  color: var(--ink-soft);
}

/* ---------- Shape the next experiment (an invitation, not a form) ---------- */
.shape-section {
  margin-top: var(--s-8);
  padding: var(--s-6) 0 0;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}
.shape-section .eyebrow { margin-bottom: var(--s-3); }
.shape-section h2 {
  font-size: clamp(22px, 3vw, 30px);
  line-height: 1.18;
  color: var(--ink);
  margin-bottom: var(--s-4);
}
.shape-intro {
  max-width: 58ch;
  font-size: 15.5px;
  line-height: 1.65;
  margin-bottom: var(--s-6);
}
.shape-form {
  display: flex;
  flex-direction: column;
  gap: var(--s-3);
  max-width: 560px;
}
.shape-label {
  font-size: 14.5px;
  font-weight: 600;
  color: var(--ink);
}
.shape-label--soft {
  font-weight: 500;
  color: var(--ink-soft);
  margin-top: var(--s-3);
}
.shape-optional {
  font-weight: 400;
  color: var(--ink-muted);
}
.shape-textarea,
.shape-input {
  width: 100%;
  font-family: var(--font-sans);
  font-size: 15.5px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid var(--line-strong);
  border-radius: var(--r-md);
  padding: var(--s-4);
  transition: border-color var(--dur) var(--ease),
              box-shadow var(--dur) var(--ease);
}
.shape-textarea { resize: vertical; min-height: 108px; }
.shape-textarea::placeholder,
.shape-input::placeholder { color: var(--ink-faint); }
.shape-textarea:focus,
.shape-input:focus {
  outline: none;
  border-color: var(--clay);
  box-shadow: 0 0 0 3px var(--clay-tint);
}
.shape-submit {
  align-self: flex-start;
  margin-top: var(--s-2);
  display: inline-flex;
  align-items: center;
  font-family: var(--font-sans);
  font-size: 14.5px;
  font-weight: 600;
  color: var(--paper);
  background: var(--ink);
  border: none;
  border-radius: var(--r-pill);
  padding: 12px 22px;
  cursor: pointer;
  transition: background var(--dur) var(--ease),
              transform 120ms var(--ease);
}
.shape-submit:hover { background: var(--clay-deep); }
.shape-submit:active { transform: scale(0.98); }
.shape-submit:disabled { opacity: 0.6; cursor: default; }

.shape-intro--note {
  color: var(--ink-muted);
  font-style: italic;
}

/* Inline retry message: calm, never alarming. Preserves the visitor's text. */
.shape-message {
  margin: 0;
  min-height: 0;
  font-size: 14px;
  line-height: 1.6;
  white-space: pre-line;
}
.shape-message--error {
  margin-top: var(--s-2);
  color: var(--clay-deep);
}

/* Success: the form steps aside for a warm, human thank-you. */
.shape-success {
  max-width: 560px;
  color: var(--ink-soft);
  font-size: 15.5px;
  line-height: 1.65;
}
.shape-success p { margin: 0 0 var(--s-3); max-width: 58ch; }
.shape-success p:last-child { margin-bottom: 0; }
.shape-success-lead {
  font-family: var(--font-serif);
  font-size: clamp(20px, 2.4vw, 24px);
  color: var(--ink);
}
