/* Relay — presentation layer: brand header, the act rail, and the four acts
   with their documents. The tool's own chrome lives in styles.css. */

/* ---------- brand header ---------- */

.site-head {
  height: 57px;
  display: flex;
  align-items: center;
  gap: 22px;
  padding: 0 20px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  color: var(--text);
  text-decoration: none;
}
.site-brand .brand-mark { display: inline-flex; color: var(--text); }
.site-wordmark {
  font-stretch: 125%;
  font-weight: 650;
  font-size: 19px;
  letter-spacing: -0.02em;
}
.site-claim {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
}
.site-acts {
  margin-left: auto;
  display: flex;
  gap: 4px;
}
.site-acts a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 6px;
  transition: color .18s cubic-bezier(0.23,1,0.32,1), background-color .18s cubic-bezier(0.23,1,0.32,1);
}
.site-acts a:hover { color: var(--text); background: var(--panel-2); }

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

.tool-shell {
  height: calc(100vh - 57px);
  height: calc(100dvh - 57px);
  min-height: 600px;
  max-height: 940px;
  display: flex;
  flex-direction: column;
  border-bottom: 1px solid var(--line);
}
.tool-shell .layout { flex: 1; min-height: 0; }

/* ---------- act rail ---------- */

.actrail {
  flex: 0 0 38px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 16px;
  background: var(--panel);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
}
.act-step {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--faint);
  white-space: nowrap;
  transition: color .25s cubic-bezier(0.23,1,0.32,1);
}
.act-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  border: 2px solid #3a3a42;
  background: transparent;
  transition: background-color .25s, border-color .25s, box-shadow .25s;
}
.act-join { width: 26px; height: 1px; background: #2c2c33; flex: 0 0 26px; }
.act-step.is-active { color: var(--text); }
.act-step.is-active .act-dot {
  border-color: var(--amber);
  background: var(--amber);
  box-shadow: 0 0 0 4px rgba(237,181,79,.18);
}
.act-step.is-done { color: var(--muted); }
.act-step.is-done .act-dot { border-color: var(--green); background: var(--green); box-shadow: none; }
.actrail-note {
  margin-left: auto;
  color: var(--faint);
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.skip-chip {
  margin-left: auto;
  flex: 0 0 auto;
  background: var(--panel-2);
  border: 1px solid var(--node-border);
  color: var(--text);
  border-radius: 20px;
  padding: 4px 12px;
  font-size: 12px;
  font-weight: 500;
  transition: transform .16s cubic-bezier(0.23,1,0.32,1), border-color .16s;
}
.skip-chip:hover { border-color: #3d3d46; }
.skip-chip:active { transform: scale(0.97); }
.actrail-note + .skip-chip { margin-left: 12px; }

/* ---------- the acts ---------- */

.acts {
  max-width: 1060px;
  margin: 0 auto;
  padding: 30px 24px 10px;
}
.acts-intro {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  max-width: 62ch;
  margin: 26px 0 8px;
}
.acts-intro strong { color: var(--amber); font-weight: 600; }

.act {
  padding: 74px 0 10px;
}
.act-tag {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--faint);
  margin: 0 0 14px;
  letter-spacing: .02em;
}
.act-head {
  font-stretch: 125%;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.04;
  font-size: clamp(2.75rem, 6vw, 5.5rem);
  margin: 0 0 18px;
  text-wrap: balance;
}
.act-claim {
  color: var(--muted);
  font-size: 17px;
  line-height: 1.65;
  max-width: 58ch;
  margin: 0 0 30px;
}

/* documents */

.doc {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 20px 22px 22px;
}
.doc-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: var(--faint);
  border-bottom: 1px solid var(--line);
  padding-bottom: 11px;
  margin-bottom: 16px;
}
.doc-cap {
  font-family: var(--mono);
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
  font-size: 11px;
  color: var(--faint);
  white-space: nowrap;
}

/* arrive — the lead, as submitted */

.doc-lead-name { font-size: 21px; font-weight: 650; margin: 0 0 3px; letter-spacing: -0.01em; }
.doc-lead-meta { font-family: var(--mono); font-size: 12.5px; color: var(--muted); margin: 0 0 13px; }
.doc-lead-msg { font-size: 15.5px; line-height: 1.7; color: #ddd9cf; margin: 0; max-width: 68ch; }

/* read / decide — ruled field rows */

.field-rows { margin: 0; }
.field-rows > div {
  display: flex;
  gap: 18px;
  padding: 9px 0;
  border-bottom: 1px dashed #232329;
}
.field-rows > div:last-child { border-bottom: none; }
.field-rows dt {
  flex: 0 0 92px;
  color: var(--faint);
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .07em;
  padding-top: 3px;
}
.field-rows dd { margin: 0; font-size: 14.5px; color: var(--text); }

/* decide — the score */

.doc-decide {
  display: flex;
  align-items: flex-start;
  gap: 34px;
}
.decide-score {
  font-family: var(--mono);
  color: var(--amber);
  line-height: 1;
  white-space: nowrap;
}
.decide-score span { font-size: clamp(4.2rem, 9vw, 7.5rem); font-weight: 500; letter-spacing: -0.04em; }
.decide-score small { font-size: 15px; color: var(--faint); margin-left: 6px; }
.decide-facts { flex: 1; min-width: 0; }
.decide-intent { font-size: 19px; font-weight: 600; margin: 6px 0 12px; letter-spacing: -0.01em; }
.decide-cap { align-self: flex-start; }

/* act — the paperwork */

.doc-paper {
  background: var(--paper);
  border-color: #d9d2c0;
  color: #23211c;
  margin-bottom: 18px;
}
.paper-head { border-bottom-color: #ddd6c4; color: #8a8474; }
.paper-head .doc-cap { color: #8a8474; }
.doc-paper .draft-label { color: #8a8474; }
.doc-paper .draft-to { color: #23211c; }
.doc-paper .draft-subject { color: #23211c; }
.paper-body {
  border-top: 1px solid #ddd6c4;
  margin-top: 10px;
  padding-top: 15px;
  font-size: 14.5px;
  line-height: 1.7;
  white-space: pre-wrap;
  max-width: 72ch;
}
.paper-status {
  border-top: 1px solid #ddd6c4;
  margin: 15px 0 0;
  padding-top: 12px;
  font-size: 12px;
  color: #8a8474;
}
.paper-status.sent { color: #2c7a4b; }

.act-pair {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  align-items: start;
}
.doc-table td { font-size: 13px; }
.doc-cal-grid { grid-template-columns: repeat(5, 1fr); }

/* the log */

.doc-log #docLog .log-entry { animation: none; }
.doc-log #docLog .log-entry:first-child { padding-top: 0; }

/* ---------- footer ---------- */

.site-foot {
  max-width: 1060px;
  margin: 0 auto;
  padding: 84px 24px 54px;
  display: flex;
  align-items: baseline;
  gap: 22px;
}
.site-foot p {
  margin: 0;
  color: var(--faint);
  font-size: 13.5px;
  line-height: 1.6;
  max-width: 52ch;
}
.site-foot a {
  margin-left: auto;
  color: var(--muted);
  text-decoration: none;
  font-size: 13.5px;
  font-weight: 500;
  white-space: nowrap;
}
.site-foot a:hover { color: var(--text); }

/* ---------- small screens ---------- */

@media (max-width: 400px) {
  .site-nav { gap: 13px; }
  .site-nav a { font-size: 12.5px; }
  .brand-name { font-size: 19px; }
}

@media (max-width: 920px) {
  .site-claim { display: none; }
  .acts { padding: 18px 16px 6px; }
  .act { padding: 52px 0 6px; }
  .act-pair { grid-template-columns: 1fr; }
  .doc-decide { flex-direction: column; gap: 14px; }
  .doc { padding: 16px 16px 18px; }
  .site-foot { flex-wrap: wrap; padding: 60px 16px 40px; }
  .site-foot a { margin-left: 0; }
  .actrail-note { display: none; }
  .skip-chip { margin-left: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .site-acts a, .act-step, .act-dot { transition: none; }
}
