/* Prompt Yourself — "Two Voices" identity.
   Serif = the guide explaining. Mono in a tail-cornered bubble = what you type.
   Flat warm paper, 1px borders, one teal accent. No gradients, no shadows. */

/* Dark is the site's default look regardless of system preference
   (warm charcoal — the same site at night, not a generic dark UI).
   Light applies only when the visitor flips the toggle. */
:root {
  color-scheme: dark;

  --bg: #1B1815;
  --text: #EAE6DE;
  --muted: #A69E90;
  --card: #242019;
  --border: #3A342B;
  --accent: #35C4A4;
  --accent-ink: #0E1F1A;

  --bubble: #182420;
  --bubble-border: #2A4038;
  --bubble-label: #4ED4B5;

  --font-body: "Source Serif 4", Georgia, "Times New Roman", serif;
  --font-mono: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;

  --radius-bubble: 14px 14px 14px 3px;
  --measure: 42rem;
}

:root[data-theme="light"] {
  color-scheme: light;
  --bg: #FAF6EF;
  --text: #26221B;
  --muted: #6E675C;
  --card: #FFFFFF;
  --border: #E4DCCE;
  --accent: #0E7466;
  --accent-ink: #FFFFFF;
  --bubble: #EFF6F2;
  --bubble-border: #C9E0D7;
  --bubble-label: #0E7466;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.7;
}

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* ---------- nav ---------- */
.nav {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.4rem 0;
  font-family: var(--font-mono);
  font-size: 0.85rem;
}
.nav .wordmark {
  font-weight: 500;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
}
.nav ul {
  display: flex;
  gap: 1.1rem;
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav a { color: var(--muted); text-decoration: none; }
.nav a:hover, .nav a[aria-current="page"] { color: var(--accent); }

/* light/dark toggle (injected by theme.js) */
.theme-toggle {
  display: inline-flex;
  align-items: center;
  background: none;
  border: none;
  padding: 0;
  color: var(--muted);
  cursor: pointer;
  vertical-align: middle;
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle svg { width: 17px; height: 17px; display: block; }

/* ---------- type ---------- */
h1 {
  font-size: clamp(2.1rem, 5.5vw, 3.25rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 1rem;
}
h2 {
  font-size: 1.5rem;
  font-weight: 600;
  line-height: 1.3;
  margin: 0 0 0.75rem;
}
h4 {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 1.4rem 0 0.4rem;
}
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.4rem; }
li { margin-bottom: 0.35rem; }
a { color: var(--accent); text-underline-offset: 3px; }
blockquote {
  margin: 1.25rem 0;
  padding: 0.1rem 0 0.1rem 1.1rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}
code {
  font-family: var(--font-mono);
  font-size: 0.9em;
}

.kicker {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 0.6rem;
}

.lede {
  font-size: 1.25rem;
  line-height: 1.55;
  color: var(--muted);
}

/* accent phrases in the hero headline */
.hl { color: var(--accent); }

/* the blinking input caret — hero h1 only */
.caret { white-space: nowrap; } /* the caret wraps with its word, never alone */
.caret::after {
  content: "";
  display: inline-block;
  width: 0.09em;
  height: 0.95em;
  margin-left: 0.14em;
  /* zero net advance: the caret paints just past the last letter but takes
     no layout space, so it can never wrap to a line of its own */
  margin-right: -0.23em;
  background: var(--accent);
  vertical-align: -0.1em;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }
@media (prefers-reduced-motion: reduce) { .caret::after { animation: none; } }

/* ---------- landing ---------- */
.hero { padding: 4.5rem 0 3rem; }
.hero .kicker { margin-bottom: 1.25rem; }

.cards {
  display: grid;
  gap: 1rem;
  margin: 2.25rem 0;
}
@media (min-width: 640px) {
  .cards { grid-template-columns: 1fr 1fr; }
}
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 1.5rem;
}
a.card {
  text-decoration: none;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
a.card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
}
.card h2 { margin-top: 0.25rem; }
.card p { color: var(--muted); margin-bottom: 0; }

.cta {
  text-align: center;
  padding: 2.5rem 0 1rem;
}
.cta p {
  font-size: 1.15rem;
  margin-bottom: 1.25rem;
}

/* sendable buttons — every CTA reads as an outgoing message */
.btn {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.7rem 1.3rem;
  border-radius: var(--radius-bubble);
  background: var(--accent);
  color: var(--accent-ink);
  border: 1px solid var(--accent);
  text-decoration: none;
  cursor: pointer;
}
.btn-quiet {
  background: transparent;
  color: var(--accent);
}
.btn:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

/* ---------- guide pages ---------- */
.guide-header { padding: 3.25rem 0 1.5rem; }

section.part { margin-bottom: 2.75rem; }

/* ---------- prompt bubbles ---------- */
.prompt {
  position: relative;
  background: var(--bubble);
  border: 1px solid var(--bubble-border);
  border-radius: var(--radius-bubble);
  padding: 2.3rem 1.15rem 1.15rem;
  margin: 1.75rem 0;
}
.prompt::before {
  content: attr(data-label);
  position: absolute;
  top: 0.75rem;
  left: 1.15rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--bubble-label);
}
.prompt pre {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.92rem;
  line-height: 1.55;
  white-space: pre-wrap;
  overflow-wrap: break-word;
  color: var(--text);
}
.slot {
  background: transparent;
  color: var(--accent);
  font-style: normal;
  border-bottom: 2px dashed var(--accent);
}
/* copy button is injected by script; without JS the text is still selectable */
.prompt .copy {
  position: absolute;
  top: 0.45rem;
  right: 0.6rem;
  font-family: var(--font-mono);
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.25rem 0.6rem;
  border-radius: 8px;
  background: transparent;
  color: var(--accent);
  border: 1px solid var(--bubble-border);
  cursor: pointer;
}
.prompt .copy:hover { border-color: var(--accent); }

/* ---------- guide pager (injected by guide.js) ---------- */
/* author styles on .btn would otherwise beat the browser's [hidden] rule */
[hidden] { display: none !important; }

.pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
}
.pager-count {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}

/* ---------- live practice bot ---------- */
.bot-section { margin: 0 0 3rem; }
.bot-section > p { color: var(--muted); }

.bot-chat {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
  margin-top: 1.25rem;
}
.bc-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.bc-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); flex: none; }
.bc-dot.resting { background: #D98E04; }

.bc-msgs {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  padding: 1.1rem;
  max-height: 26rem;
  overflow-y: auto;
}
.bc-bot { max-width: 94%; font-size: 0.98rem; line-height: 1.6; }
.bc-bot p { margin: 0 0 0.6rem; }
.bc-bot p:last-child { margin-bottom: 0; }
.bc-user {
  align-self: flex-end;
  max-width: 85%;
  background: var(--bubble);
  border: 1px solid var(--bubble-border);
  border-radius: 14px 14px 3px 14px;
  padding: 0.5rem 0.8rem;
  font-family: var(--font-mono);
  font-size: 0.88rem;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: break-word;
}

/* typing indicator */
.bc-typing span {
  display: inline-block;
  width: 6px;
  height: 6px;
  margin-right: 4px;
  border-radius: 50%;
  background: var(--muted);
  animation: bcdots 1s ease-in-out infinite;
}
.bc-typing span:nth-child(2) { animation-delay: 0.15s; }
.bc-typing span:nth-child(3) { animation-delay: 0.3s; }
@keyframes bcdots { 0%, 60%, 100% { opacity: 0.3; } 30% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { .bc-typing span { animation: none; } }

/* resting fallback: line inside the box, guide button below it
   (the button replaces the bridge line, so it wears its spacing) */
.bc-go {
  display: inline-block;
  font-size: 0.9rem;
  padding: 0.55rem 1.1rem;
  margin: 1.1rem 0 0.4rem;
}

/* icon buttons: draw + speak */
.bc-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--muted);
  padding: 0.5rem 0.55rem;
  cursor: pointer;
  flex: none;
}
.bc-icon:hover { color: var(--accent); border-color: var(--accent); }
.bc-icon svg { width: 16px; height: 16px; }
.bc-icon.listening {
  color: #e5484d;
  border-color: #e5484d;
  animation: bcpulse 1.2s ease-in-out infinite;
}
@keyframes bcpulse { 50% { opacity: 0.5; } }
@media (prefers-reduced-motion: reduce) { .bc-icon.listening { animation: none; } }

/* whiteboard panel */
.bc-wb { border-top: 1px solid var(--border); padding: 0.75rem; }
.bc-wb canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  touch-action: none;
  cursor: crosshair;
}
.bc-wb-row { display: flex; justify-content: flex-end; gap: 0.6rem; margin-top: 0.6rem; }
.bc-wb-btn { font-size: 0.8rem; padding: 0.45rem 0.9rem; }

/* pending-drawing strip above the input */
.bc-attach {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 0.75rem 0.7rem;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
}
.bc-attach img {
  width: 46px;
  height: auto;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 6px;
}
.bc-attach button {
  background: none;
  border: none;
  color: var(--muted);
  font-size: 1rem;
  cursor: pointer;
  padding: 0 0.2rem;
}
.bc-attach button:hover { color: var(--accent); }

/* the whole chat is a drop target for a resume file */
.bot-chat.bc-dropping { outline: 2px dashed var(--accent); outline-offset: -3px; }

/* resume upload offer under the coach greeting */
.bc-upload {
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--accent);
  background: transparent;
  border: 1px dashed var(--border);
  border-radius: 999px;
  padding: 0.35rem 0.85rem;
  cursor: pointer;
}
.bc-upload:hover { border-color: var(--accent); }

/* an uploaded file inside your sent bubble */
.bc-user-file {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.78rem;
  margin-bottom: 0.35rem;
}

/* a drawing inside your sent bubble */
.bc-user-img {
  display: block;
  width: 170px;
  max-width: 100%;
  background: #fff;
  border: 1px solid var(--bubble-border);
  border-radius: 8px;
  margin-bottom: 0.35rem;
}

.bc-form {
  display: flex;
  align-items: flex-end;
  gap: 0.6rem;
  padding: 0.75rem;
  border-top: 1px solid var(--border);
}
.bc-input {
  flex: 1;
  resize: none;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  font-family: var(--font-mono);
  font-size: 0.9rem;
  line-height: 1.45;
  padding: 0.55rem 0.7rem;
  max-height: 128px;
}
.bc-input:focus { outline: none; border-color: var(--accent); }
.bc-input:disabled { opacity: 0.6; }
.bc-send { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
.bc-send:disabled { opacity: 0.55; cursor: default; }

/* the bridge from the live bot to the guide (guide starts hidden behind it) */
.guide-bridge {
  margin: 1.1rem 0 0.4rem;
  font-size: 1.02rem;
}
.guide-bridge a { color: var(--accent); }

.bc-note {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--muted);
  margin-top: 0.6rem;
}

/* ---------- footer ---------- */
footer {
  margin-top: 3.5rem;
  padding: 1.5rem 0 2.5rem;
  border-top: 1px solid var(--border);
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--muted);
}
footer a { color: var(--muted); }
footer .next { margin-bottom: 0.75rem; }
