:root {
  --ink: #111713;
  --muted: #66716b;
  --line: #dbe1dc;
  --paper: #f4f3f1;
  --forest: #12392b;
  --lime: #dffc2f;
  --white: #fff;
  --warn: #fff8dd;
  --warn-line: #ead78b;
}

* { box-sizing: border-box; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  margin: 0;
  -webkit-font-smoothing: antialiased;
}

button,
input { font: inherit; }

button { color: inherit; }
a { color: inherit; text-decoration: none; }

.legal-header {
  align-items: center;
  background: rgba(244, 243, 241, 0.94);
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 78px;
  padding: 0 clamp(24px, 5vw, 76px);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(14px);
}

.legal-brand {
  align-items: center;
  display: inline-flex;
  font-size: 20px;
  gap: 10px;
  letter-spacing: -0.5px;
}

.legal-brand > span {
  align-items: center;
  background: var(--lime);
  border-radius: 11px;
  color: var(--forest);
  display: flex;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.legal-brand img {
  border-radius: 11px;
  display: block;
  height: 42px;
  width: 42px;
}

.legal-brand .ph { font-size: 26px; }

.header-actions {
  display: flex;
  gap: 8px;
}

.quiet-button {
  align-items: center;
  background: transparent;
  border: 1px solid #cfd6d1;
  border-radius: 9px;
  cursor: pointer;
  display: inline-flex;
  font-size: 11px;
  font-weight: 700;
  gap: 7px;
  min-height: 38px;
  padding: 0 12px;
}

.quiet-button:hover { background: white; }

.legal-shell {
  margin: 0 auto;
  max-width: 1440px;
  padding: 64px clamp(24px, 5vw, 76px) 90px;
}

.legal-intro {
  max-width: 900px;
}

.eyebrow {
  color: #678071;
  display: block;
  font-size: 10px;
  font-weight: 750;
  letter-spacing: 1.25px;
  text-transform: uppercase;
}

.legal-intro h1,
.agreement-card h2,
.signature-card h2 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 400;
}

.legal-intro h1 {
  font-size: clamp(44px, 6vw, 76px);
  letter-spacing: -3.7px;
  line-height: 0.97;
  margin: 20px 0;
  max-width: 850px;
}

.legal-intro > p {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.65;
  margin: 0;
  max-width: 690px;
}

.trust-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(3, 1fr);
  margin-top: 38px;
}

.trust-grid article {
  background: #ebecea;
  border: 1px solid #dde1de;
  border-radius: 14px;
  display: grid;
  gap: 7px;
  min-height: 136px;
  padding: 20px;
}

.trust-grid .ph {
  color: var(--forest);
  font-size: 23px;
}

.trust-grid strong { font-size: 13px; }
.trust-grid span {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.agreement-layout {
  align-items: start;
  display: grid;
  gap: 22px;
  grid-template-columns: minmax(0, 1fr) 390px;
  margin-top: 52px;
}

.agreement-card,
.signature-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 14px 45px rgba(27, 49, 37, 0.05);
}

.agreement-card { min-width: 0; }

.agreement-toolbar {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  padding: 24px 28px;
}

.agreement-toolbar h2 {
  font-size: 25px;
  letter-spacing: -0.8px;
  margin: 7px 0 0;
}

.version-chip {
  background: #edf0ed;
  border-radius: 999px;
  color: #59645e;
  font-size: 9px;
  font-weight: 750;
  max-width: 260px;
  overflow: hidden;
  padding: 8px 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.review-warning {
  align-items: flex-start;
  background: var(--warn);
  border-bottom: 1px solid var(--warn-line);
  display: flex;
  gap: 10px;
  padding: 14px 28px;
}

.review-warning .ph {
  color: #876d08;
  font-size: 19px;
  margin-top: 1px;
}

.review-warning p {
  color: #6d5d1c;
  font-size: 11px;
  line-height: 1.5;
  margin: 0;
}

.agreement-copy {
  background: white;
  border: 0;
  color: #38413b;
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 12px;
  line-height: 1.72;
  margin: 0;
  max-height: 710px;
  overflow: auto;
  padding: 30px 34px;
  white-space: pre-wrap;
}

.agreement-copy:focus {
  outline: 3px solid rgba(18, 57, 43, 0.09);
  outline-offset: -3px;
}

.agreement-meta {
  align-items: center;
  border-top: 1px solid var(--line);
  color: var(--muted);
  display: flex;
  flex-wrap: wrap;
  font-size: 9px;
  gap: 18px;
  justify-content: space-between;
  padding: 16px 28px;
}

.agreement-meta span {
  align-items: center;
  display: flex;
  gap: 6px;
}

.agreement-meta code {
  color: #47514b;
  font-family: "SFMono-Regular", Consolas, monospace;
}

.signature-card {
  padding: 26px;
  position: sticky;
  top: 100px;
}

.workspace-lockup {
  align-items: center;
  border-bottom: 1px solid var(--line);
  display: flex;
  gap: 12px;
  margin-bottom: 25px;
  padding-bottom: 20px;
}

.workspace-mark {
  align-items: center;
  background: var(--forest);
  border-radius: 11px;
  color: white;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  height: 42px;
  justify-content: center;
  width: 42px;
}

.workspace-lockup div > span,
.workspace-lockup div > strong { display: block; }
.workspace-lockup div > span {
  color: var(--muted);
  font-size: 9px;
  margin-bottom: 4px;
  text-transform: uppercase;
}
.workspace-lockup div > strong { font-size: 13px; }

.signature-card h2 {
  font-size: 31px;
  letter-spacing: -1px;
  line-height: 1.08;
  margin: 0 0 9px;
}

.signature-lede {
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
  margin: 0 0 20px;
}

#nda-form { display: grid; gap: 8px; }

#nda-form > label:not(.check-row) {
  font-size: 10px;
  font-weight: 750;
  margin-top: 6px;
}

#nda-form > input {
  background: #fafbfa;
  border: 1px solid var(--line);
  border-radius: 9px;
  min-height: 44px;
  outline: none;
  padding: 0 12px;
  width: 100%;
}

#nda-form > input:focus {
  background: white;
  border-color: #84968b;
  box-shadow: 0 0 0 3px rgba(18, 57, 43, 0.08);
}

.check-row {
  align-items: flex-start;
  cursor: pointer;
  display: grid;
  font-size: 10px;
  gap: 9px;
  grid-template-columns: 17px 1fr;
  line-height: 1.45;
  margin-top: 9px;
}

.check-row input {
  accent-color: var(--forest);
  height: 16px;
  margin: 0;
  width: 16px;
}

.recording-note {
  align-items: flex-start;
  background: #eff2ef;
  border-radius: 9px;
  color: #657169;
  display: flex;
  font-size: 9px;
  gap: 7px;
  line-height: 1.45;
  margin: 12px 0 3px;
  padding: 10px;
}

.recording-note .ph { font-size: 15px; }

.sign-button {
  align-items: center;
  background: var(--forest);
  border: 0;
  border-radius: 10px;
  color: white;
  cursor: pointer;
  display: flex;
  font-size: 12px;
  font-weight: 750;
  justify-content: space-between;
  margin-top: 7px;
  min-height: 50px;
  padding: 0 16px;
  width: 100%;
}

.sign-button:hover { background: #0d2d22; }
.sign-button:disabled { cursor: wait; opacity: 0.55; }

.form-error {
  color: #a32f23;
  font-size: 10px;
  line-height: 1.4;
  margin: 4px 0 0;
  min-height: 14px;
}

.signed-state { text-align: center; }

.signed-icon {
  align-items: center;
  background: var(--lime);
  border-radius: 50%;
  color: var(--forest);
  display: flex;
  font-size: 29px;
  height: 58px;
  justify-content: center;
  margin: 2px auto 20px;
  width: 58px;
}

.signed-state .eyebrow { margin-bottom: 10px; }
.signed-state dl {
  border-bottom: 1px solid var(--line);
  border-top: 1px solid var(--line);
  margin: 23px 0 20px;
  padding: 10px 0;
  text-align: left;
}
.signed-state dl div {
  display: grid;
  font-size: 10px;
  gap: 12px;
  grid-template-columns: 82px 1fr;
  padding: 7px 0;
}
.signed-state dt { color: var(--muted); }
.signed-state dd {
  font-weight: 700;
  margin: 0;
  overflow-wrap: anywhere;
}

@media (max-width: 980px) {
  .agreement-layout { grid-template-columns: 1fr; }
  .signature-card { position: static; }
}

@media (max-width: 700px) {
  .legal-header { min-height: 68px; padding: 0 18px; }
  .legal-brand strong { display: none; }
  .quiet-button span { display: none; }
  .quiet-button { justify-content: center; padding: 0; width: 39px; }
  .legal-shell { padding: 43px 18px 60px; }
  .legal-intro h1 { font-size: 45px; letter-spacing: -2.5px; }
  .trust-grid { grid-template-columns: 1fr; }
  .trust-grid article { min-height: auto; }
  .agreement-layout { margin-top: 34px; }
  .agreement-toolbar { align-items: flex-start; flex-direction: column; gap: 13px; padding: 20px; }
  .version-chip { max-width: 100%; }
  .agreement-copy { max-height: 520px; padding: 24px 20px; }
  .agreement-meta { align-items: flex-start; flex-direction: column; padding: 15px 20px; }
  .review-warning { padding: 14px 20px; }
  .signature-card { padding: 22px 20px; }
}

@media print {
  .legal-header,
  .legal-intro,
  .signature-card,
  .review-warning { display: none !important; }
  .legal-shell { max-width: none; padding: 0; }
  .agreement-layout { display: block; margin: 0; }
  .agreement-card { border: 0; box-shadow: none; }
  .agreement-copy { max-height: none; overflow: visible; padding: 22px 0; }
  .agreement-toolbar,
  .agreement-meta { padding-left: 0; padding-right: 0; }
}
