/* Minarvis Team — brand v2.1: Dawn White ground, Deep Steel/Charcoal, no shadows, hazed round orb */
:root {
  --dawn: #F4F3EE;
  --charcoal: #22262B;
  --steel: #39566B;
  --steel-soft: #5B7285;
  --hairline: #D9D6CC;
  --ink-quiet: #6B6F74;
  --danger: #7A3B34;
}
* { box-sizing: border-box; }
html { font-size: 16px; }
body {
  margin: 0;
  background: var(--dawn);
  color: var(--charcoal);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 0.9375rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
h1, h2, .display { font-family: 'Inter Tight', 'Inter', sans-serif; }
h1 { font-size: 1.65rem; font-weight: 600; letter-spacing: -0.015em; margin: 0 0 0.25rem; }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0; }
a { color: var(--steel); text-decoration: none; }
a:hover, a:focus-visible { text-decoration: underline; }
:focus-visible { outline: 2px solid var(--steel); outline-offset: 2px; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 0.8125rem; }

.wrap { max-width: 56rem; margin: 0 auto; padding: 0 1.25rem 4rem; }

/* Top bar */
.bar {
  display: flex; align-items: center; gap: 0.65rem;
  padding: 1.1rem 0 1rem;
  border-bottom: 1px solid var(--hairline);
  margin-bottom: 2rem;
}
.orb {
  width: 22px; height: 22px; border-radius: 50%; flex: none;
  background: radial-gradient(circle at 34% 30%, #ffffff 0%, #c9d4dd 28%, var(--steel-soft) 62%, var(--steel) 100%);
}
.wordmark { font-family: 'Inter Tight', sans-serif; font-weight: 600; font-size: 1rem; letter-spacing: 0.01em; }
.wordmark span { color: var(--steel); font-weight: 500; }
.bar nav { margin-left: auto; display: flex; gap: 1.25rem; align-items: baseline; font-size: 0.875rem; }
.bar nav a.here { color: var(--charcoal); border-bottom: 2px solid var(--steel); padding-bottom: 2px; }
.who { color: var(--ink-quiet); font-size: 0.8125rem; }

/* Sections as ruled rows, not cards */
section { margin: 0 0 2.4rem; }
.rule-head {
  display: flex; align-items: baseline; justify-content: space-between;
  border-bottom: 1px solid var(--hairline); padding-bottom: 0.5rem; margin-bottom: 0.9rem;
}
.rule-head .aside { color: var(--ink-quiet); font-size: 0.8125rem; }

.rows { margin: 0; }
.row {
  display: grid; grid-template-columns: 6.2rem 1fr auto;
  gap: 0.9rem; padding: 0.55rem 0;
  border-bottom: 1px solid var(--hairline);
  align-items: baseline;
}
.row:last-child { border-bottom: 0; }
.row .id { color: var(--steel); }
.row .meta { color: var(--ink-quiet); font-size: 0.8125rem; white-space: nowrap; }
.row.done { color: var(--ink-quiet); }
.row.done .tick { color: var(--steel); }

.lede { max-width: 44rem; }
.quiet { color: var(--ink-quiet); }
.moves { display: flex; flex-wrap: wrap; gap: 0.4rem 1.4rem; padding: 0; margin: 0.4rem 0 0; list-style: none; }
.moves li { font-size: 0.875rem; }
.moves .n { color: var(--steel); font-family: 'JetBrains Mono', monospace; font-size: 0.75rem; margin-right: 0.3rem; }

/* Forms & buttons */
input[type=text], input[type=password], textarea {
  width: 100%; background: #fff; color: var(--charcoal);
  border: 1px solid var(--hairline); border-radius: 4px;
  padding: 0.6rem 0.7rem; font: inherit;
}
input:focus, textarea:focus { border-color: var(--steel); outline: none; }
button {
  background: var(--steel); color: var(--dawn); border: 0; border-radius: 4px;
  padding: 0.6rem 1.1rem; font: inherit; font-weight: 500; cursor: pointer;
}
button:hover { background: #2E4557; }
button:disabled { background: var(--steel-soft); cursor: default; }
button.ghost { background: transparent; color: var(--steel); padding: 0.2rem 0.3rem; }
.err { color: var(--danger); font-size: 0.875rem; }

/* Login */
.gate { max-width: 22rem; margin: 14vh auto 0; }
.gate .orb { width: 34px; height: 34px; margin-bottom: 1rem; }
.gate label { display: block; font-size: 0.8125rem; color: var(--ink-quiet); margin: 0.9rem 0 0.3rem; }
.gate button { width: 100%; margin-top: 1.1rem; }

/* Chat */
.chat { display: flex; flex-direction: column; min-height: 62vh; }
.thread { flex: 1; }
.msg { padding: 0.8rem 0; border-bottom: 1px solid var(--hairline); }
.msg .from { font-size: 0.75rem; color: var(--ink-quiet); margin-bottom: 0.2rem; }
.msg.marvis .from { color: var(--steel); }
.msg p { margin: 0.35rem 0; max-width: 46rem; white-space: pre-wrap; }
.composer { display: flex; gap: 0.6rem; margin-top: 1.2rem; align-items: flex-end; }
.composer textarea { min-height: 3.2rem; resize: vertical; }
.notice { border: 1px solid var(--hairline); border-left: 3px solid var(--steel); background: #fff; padding: 0.7rem 0.9rem; font-size: 0.875rem; margin-bottom: 1rem; }

@media (max-width: 640px) {
  .row { grid-template-columns: 1fr; gap: 0.15rem; }
  .row .meta { white-space: normal; }
  .bar nav { gap: 0.9rem; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
