/* Ask Christopher - layout and the few component styles this page needs.
 *
 * Every value here is a design-system token. The prototype expressed all of
 * this as React inline styles; the shapes are the same, moved into CSS so the
 * page needs no JavaScript to render its own layout.
 *
 * The source panel is gone, so the prototype's three-column grid
 * (240px / 1fr / 340px) becomes two columns.
 */

* { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--paper-000);
  color: var(--text-primary);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- shell */

.ask {
  display: grid;
  grid-template-columns: 240px minmax(0, 1fr);
  height: 100vh;
}

.ask__rail {
  border-right: var(--border-width-hairline) solid var(--border-hairline);
  padding: 20px 18px;
  background: var(--paper-050);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.ask__railfoot { margin-top: auto; }

.ask__main {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.ask__scroll {
  flex: 1;
  overflow: auto;
  padding: 40px 56px 0;
}

/* ------------------------------------------------------------ type roles */

.wordmark {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  text-transform: uppercase;
  font-size: 17px;
  letter-spacing: -0.02em;
  line-height: 1.05;
}

.metalabel {
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.statement {
  font-family: var(--font-display);
  font-weight: var(--weight-black);
  text-transform: uppercase;
  font-size: var(--mode-display-size);
  letter-spacing: var(--tracking-display);
  line-height: var(--leading-tight);
  margin: 16px 0 14px;
}

.lede {
  font-family: var(--font-body);
  font-size: var(--size-md);
  line-height: var(--leading-body);
  color: var(--text-secondary);
  margin: 0 0 28px;
  max-width: var(--measure-body);
}

/* ------------------------------------------------------------ intro pane */

.ask__intro {
  max-width: 640px;
  margin: 40px auto 0;
}

.ask__prompts {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.prompt {
  text-align: left;
  cursor: pointer;
  background: var(--paper-050);
  border: var(--border-width-hairline) solid var(--border-hairline);
  border-radius: var(--radius-sm);
  padding: 12px 14px;
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  color: var(--text-primary);
  transition: var(--transition-ui);
}

.prompt:hover { background: var(--surface-hover); border-color: var(--border-default); }

.ask__suggested { display: flex; flex-direction: column; gap: 10px; }

.ask__suggested a {
  font-family: var(--font-ui);
  font-size: 13px;
  color: var(--text-secondary);
  text-decoration: none;
  line-height: 1.35;
  border-left: var(--border-width-hairline) solid var(--border-hairline);
  padding-left: 10px;
}

.ask__suggested a:hover { color: var(--text-link); border-color: var(--border-signal); }

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

.ask__thread { max-width: 680px; margin: 0 auto; padding-bottom: 24px; }

.turn { margin-bottom: 34px; }

.turn__q {
  font-family: var(--font-display);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  font-size: var(--size-lg);
  letter-spacing: var(--tracking-heading);
  line-height: var(--leading-heading);
  margin: 0 0 12px;
}

.turn__a {
  font-family: var(--font-body);
  font-size: var(--size-base);
  line-height: var(--leading-body);
  color: var(--text-primary);
  white-space: pre-wrap;
  margin: 0;
}

.turn__a--error {
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  color: var(--status-danger);
  border-left: var(--border-width-rule) solid var(--status-danger);
  padding-left: 12px;
  white-space: normal;
}

/* A three-dot wait, not a fake token stream. The response is not streamed, so
 * pretending otherwise would misrepresent what is happening. */
.turn__a--pending::after {
  content: "\2026";
  font-family: var(--font-mono);
  color: var(--text-muted);
}

/* ------------------------------------------------------------- composer */

.ask__composer {
  border-top: var(--border-width-hairline) solid var(--border-hairline);
  padding: 16px 56px 24px;
  background: var(--paper-000);
}

.composer {
  max-width: 680px;
  margin: 0 auto;
  display: flex;
  border: var(--border-width-strong) solid var(--ink-900);
}

.composer__input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 14px 16px;
  font-family: var(--font-ui);
  font-size: var(--size-base);
  color: var(--text-primary);
  min-width: 0;
}

.composer__input:disabled { color: var(--text-muted); }

.composer__send {
  border: none;
  background: var(--signal-500);
  color: #fff;
  padding: 0 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  transition: var(--transition-ui);
}

.composer__send:hover:not(:disabled) { background: var(--signal-600); }
.composer__send:disabled { opacity: 0.4; cursor: not-allowed; }

.composer:focus-within { box-shadow: var(--shadow-focus); }

.composer__note {
  max-width: 680px;
  margin: 10px auto 0;
  font-family: var(--font-mono);
  font-size: var(--size-2xs);
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  color: var(--text-muted);
}

.composer__note--warn { color: var(--status-warning); }

/* ---------------------------------------------------------------- narrow */

@media (max-width: 860px) {
  .ask { grid-template-columns: 1fr; height: auto; min-height: 100vh; }
  .ask__rail {
    border-right: none;
    border-bottom: var(--border-width-hairline) solid var(--border-hairline);
    flex-direction: row;
    align-items: baseline;
    justify-content: space-between;
  }
  .ask__suggested { display: none; }
  .ask__railfoot { margin-top: 0; }
  .ask__scroll { padding: 24px 20px 0; }
  .ask__composer { padding: 12px 20px 20px; }
  .ask__intro { margin-top: 8px; }
}
