:root {
  --ink: #101713;
  --muted: #62706a;
  --paper: #f5f3e9;
  --surface: #fffdf5;
  --line: #cbd1c5;
  --navy: #18224a;
  --blue: #2f57dc;
  --lime: #eef56a;
  --peach: #ffb17c;
  --mint: #dcefe5;
  --danger: #a4352d;
  --shadow: 0 18px 60px rgba(24, 34, 74, .12);
  font-family: "PingFang SC", "Microsoft YaHei", "Noto Sans CJK SC", system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background:
    linear-gradient(90deg, rgba(24, 34, 74, .035) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--paper);
  font-size: 17px;
  line-height: 1.65;
}

button, input, textarea, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid var(--peach);
  outline-offset: 3px;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  justify-content: space-between;
  align-items: center;
  min-height: 84px;
  padding: 14px clamp(20px, 5vw, 72px);
  border-bottom: 1px solid var(--line);
  background: rgba(245, 243, 233, .94);
  backdrop-filter: blur(16px);
}

.brand { display: flex; align-items: center; gap: 12px; color: inherit; text-decoration: none; }
.brand-mark {
  display: grid;
  width: 52px;
  height: 52px;
  place-items: center;
  border-radius: 15px;
  background: var(--navy);
  color: var(--lime);
  font-weight: 900;
  letter-spacing: -.04em;
}
.brand b, .brand small { display: block; }
.brand b { font-size: 18px; }
.brand small { color: var(--muted); font-size: 12px; letter-spacing: .08em; }
.account-entry {
  border: 1px solid var(--navy);
  border-radius: 999px;
  padding: 9px 16px;
  background: transparent;
  color: var(--navy);
  font-size: 14px;
  font-weight: 750;
  cursor: pointer;
}
.account-entry:hover { background: var(--navy); color: white; }
.back-to-messages { margin-left:auto; padding:9px 13px; border:1px solid var(--blue); border-radius:999px; color:var(--blue); background:#fff; text-decoration:none; font-size:14px; font-weight:800; }
.back-to-messages[hidden] { display:none; }
.back-to-messages:not([hidden]) + .account-entry { margin-left:0; }
@media(max-width:620px) {
  .topbar { gap:7px; padding-inline:12px; }
  .brand { gap:7px; }
  .brand-mark { width:39px; height:39px; }
  .brand small { display:none; }
  .brand b { font-size:14px; white-space:nowrap; }
  .back-to-messages { padding:7px 9px; font-size:12px; white-space:nowrap; }
  .account-entry { padding:7px 9px; font-size:12px; white-space:nowrap; }
}

main { width: min(1180px, calc(100% - 40px)); margin: 0 auto; padding: 68px 0 120px; }
.local-preview-note { margin: 0 0 28px; padding: 14px 18px; border-left: 5px solid var(--blue); background: #edf2ff; color: var(--navy); font-weight: 700; }
.local-preview-note a { color: var(--blue); }

.intro { display: grid; grid-template-columns: minmax(0, 1fr) 330px; gap: 54px; align-items: end; }
.eyebrow, .section-heading > span, .draft-head span, .unknown-panel > span {
  margin: 0 0 12px;
  color: var(--blue);
  font-size: 13px;
  font-weight: 850;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.intro h1 {
  margin: 0;
  max-width: 820px;
  font-size: clamp(48px, 7vw, 88px);
  line-height: .99;
  letter-spacing: -.065em;
}
.intro h1 em { color: var(--blue); font-style: normal; }
.lead { max-width: 800px; margin: 30px 0; color: #44504b; font-size: clamp(18px, 2vw, 23px); line-height: 1.7; }
.promise-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; margin: 0; padding: 0; overflow: hidden; border: 1px solid var(--line); background: var(--line); list-style: none; }
.promise-list li { min-height: 176px; padding: 20px; background: var(--surface); }
.promise-list small, .promise-list b, .promise-list span { display: block; }
.promise-list small { margin-bottom: 10px; color: var(--blue); font-size: 12px; font-weight: 850; letter-spacing: .04em; }
.promise-list b { margin-bottom: 8px; font-size: 17px; line-height: 1.35; }
.promise-list span { color: var(--muted); font-size: 14px; line-height: 1.55; }

.process-note { padding: 28px; border-radius: 28px 28px 6px 28px; background: var(--navy); color: white; box-shadow: var(--shadow); }
.process-note > span { color: var(--lime); font-size: 13px; font-weight: 850; letter-spacing: .08em; }
.process-note > strong { display: block; margin: 2px 0 18px; font-size: 42px; line-height: 1.15; }
.process-note ol { margin: 0; padding: 0; list-style: none; counter-reset: steps; }
.process-note li { position: relative; padding: 11px 0 11px 38px; border-top: 1px solid rgba(255, 255, 255, .17); color: #aeb7d7; counter-increment: steps; }
.process-note li::before { content: counter(steps); position: absolute; left: 0; top: 10px; display: grid; width: 25px; height: 25px; place-items: center; border: 1px solid currentColor; border-radius: 50%; font-size: 12px; }
.process-note li.done { color: white; }
.process-note li.done::before { border-color: var(--lime); background: var(--lime); color: var(--navy); font-weight: 900; }
.process-note p { margin: 20px 0 0; color: #c5cce4; font-size: 13px; line-height: 1.55; }

.account-library { display: grid; grid-template-columns: minmax(230px, .8fr) 1.2fr; gap: 28px; align-items: start; margin-top: 54px; padding: 26px 30px; border-left: 7px solid var(--blue); background: #edf2ff; }
.account-library small { color: var(--blue); font-weight: 850; }
.account-library h2 { margin: 4px 0 8px; font-size: 27px; line-height: 1.2; }
.account-library p { margin: 0; color: #4d5b67; font-size: 14px; }
.account-library-items { display: grid; gap: 8px; }
.account-library-item { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; background: white; }
.account-library-item button { border: 0; padding: 5px; background: transparent; color: var(--blue); font-weight: 750; text-align: left; cursor: pointer; }
.account-library-item button[data-delete-draft] { color: var(--danger); font-size: 13px; }
.account-library-empty { padding: 14px; border: 1px dashed #98a8d4; }

.incoming-invite { margin-top: 54px; border: 2px solid var(--navy); background: var(--surface); }
.incoming-head { padding: 25px 30px; background: var(--navy); color: white; }
.incoming-head span { color: var(--lime); font-size: 14px; font-weight: 850; }
.incoming-head h2 { max-width: 780px; margin: 7px 0; font-size: clamp(25px, 3vw, 38px); line-height: 1.18; }
.incoming-head p { margin: 0; color: #d4d9eb; }
.incoming-body { display: grid; grid-template-columns: 1fr 1fr; }
.incoming-peer, .incoming-own { min-width: 0; padding: 24px 30px 30px; }
.incoming-peer { border-right: 1px solid var(--line); background: #e9f5ef; }
.incoming-peer h3, .incoming-own h3 { margin: 0 0 4px; font-size: 23px; line-height: 1.25; }
.incoming-peer p, .incoming-own p { margin: 0 0 16px; color: var(--muted); font-size: 14px; }
.incoming-own label { display: block; margin: 18px 0 6px; font-weight: 800; }
.incoming-own select { width: 100%; min-height: 48px; border: 1px solid #9ca89e; border-radius: 8px; padding: 8px 12px; background: white; }
.incoming-own .primary-action { width: 100%; margin-top: 18px; }
#incoming-login { margin: 20px 30px 26px; }
.incoming-newcomer { margin: 20px 30px 0; max-width: 780px; color: var(--navy); font-weight: 650; line-height: 1.65; }

.exchange-library { margin-top: 18px; padding: 24px 30px; border: 1px solid var(--line); background: var(--surface); }
.exchange-library-head { display: flex; justify-content: space-between; align-items: start; gap: 20px; }
.exchange-library small { color: var(--blue); font-weight: 850; }
.exchange-library h2 { margin: 4px 0 5px; font-size: 26px; line-height: 1.2; }
.exchange-library p { margin: 0; color: var(--muted); font-size: 14px; }
#exchange-library-items { display: grid; gap: 9px; margin-top: 18px; }
.exchange-row { display: flex; align-items: center; justify-content: space-between; gap: 15px; border-top: 1px solid var(--line); padding: 12px 2px; }
.exchange-row b, .exchange-row small { display: block; }
.exchange-row small { color: var(--muted); font-weight: 500; }
.exchange-row button { flex: 0 0 auto; border: 1px solid var(--navy); border-radius: 999px; padding: 7px 13px; background: transparent; color: var(--navy); font-weight: 800; cursor: pointer; }
.exchange-row[data-state="ACCEPTED"] { border-left: 5px solid #297659; padding-left: 13px; }
.exchange-row[data-state="REVOKED"], .exchange-row[data-state="EXPIRED"] { opacity: .7; }

.role-stage, .material-stage, .draft-stage { margin-top: 78px; scroll-margin-top: 110px; }
.section-heading h2, .draft-head h2 { margin: 0; font-size: clamp(30px, 4vw, 48px); line-height: 1.16; letter-spacing: -.045em; }
.section-heading p, .draft-head p { margin: 14px 0 0; color: var(--muted); }
.role-options { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 30px; }
.role-option {
  display: grid;
  grid-template-columns: 72px 1fr auto;
  gap: 18px;
  align-items: center;
  min-height: 164px;
  padding: 24px;
  border: 2px solid var(--navy);
  border-radius: 24px 24px 4px 24px;
  background: var(--surface);
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: transform .18s ease, background .18s ease, box-shadow .18s ease;
}
.role-option:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.role-option[aria-pressed="true"] { background: var(--navy); color: white; box-shadow: var(--shadow); }
.role-number { display: grid; width: 72px; height: 72px; place-items: center; border-radius: 22px 22px 4px 22px; background: var(--mint); color: #145a3f; font-size: 30px; font-weight: 900; }
.role-option[aria-pressed="true"] .role-number { background: var(--lime); color: var(--navy); }
.role-content b, .role-content small { display: block; }
.role-content b { font-size: 26px; }
.role-content small { margin-top: 6px; color: var(--muted); font-size: 14px; }
.role-option[aria-pressed="true"] small { color: #cbd2ea; }
.role-arrow { align-self: end; color: var(--blue); font-size: 13px; font-weight: 850; }
.role-option[aria-pressed="true"] .role-arrow { color: var(--lime); }
.mutual-note { margin: 20px 0 0; padding: 18px 22px; border-left: 6px solid var(--peach); background: rgba(255, 253, 245, .78); color: var(--muted); }
.mutual-note b { color: var(--ink); }

.material-stage { padding: clamp(24px, 5vw, 54px); border: 1px solid var(--line); background: var(--surface); box-shadow: var(--shadow); }
.material-stage.is-locked { opacity: .62; box-shadow: none; }
.source-switch { display: inline-flex; margin: 30px 0 18px; padding: 4px; border: 1px solid var(--line); border-radius: 999px; background: var(--paper); }
.source-switch button { border: 0; border-radius: 999px; padding: 10px 18px; background: transparent; color: var(--muted); cursor: pointer; }
.source-switch button.active { background: var(--navy); color: white; font-weight: 750; }
.source-panel.hidden, .hidden { display: none !important; }
.file-drop { display: grid; place-items: center; min-height: 280px; padding: 36px; border: 2px dashed #8b978f; background: #f9f8f1; text-align: center; cursor: pointer; }
.file-drop:hover { border-color: var(--blue); background: #f1f4ff; }
.file-drop input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.file-icon { display: grid; width: 64px; height: 64px; place-items: center; margin-bottom: 14px; border-radius: 50%; background: var(--blue); color: white; font-size: 34px; line-height: 1; }
.file-drop b { font-size: 24px; }
.file-drop small { margin-top: 8px; color: var(--muted); }
.file-drop em { margin-top: 22px; color: var(--blue); font-size: 14px; font-style: normal; font-weight: 750; }
#text-panel label { display: block; margin-bottom: 10px; font-weight: 800; }
#material-text { width: 100%; min-height: 280px; resize: vertical; border: 1px solid #8b978f; border-radius: 0; padding: 20px; background: #fff; color: var(--ink); }
.text-count { margin-top: 6px; color: var(--muted); font-size: 13px; text-align: right; }
.privacy-strip { display: grid; grid-template-columns: 190px 1fr; gap: 16px; margin: 22px 0; padding: 18px 20px; background: var(--mint); }
.privacy-strip p { margin: 0; color: #365448; font-size: 14px; }
.primary-action { min-height: 58px; border: 0; border-radius: 4px 18px 18px 18px; padding: 14px 24px; background: var(--blue); color: white; font-weight: 850; cursor: pointer; box-shadow: 8px 8px 0 var(--navy); }
.primary-action:hover:not(:disabled) { transform: translate(-2px, -2px); box-shadow: 10px 10px 0 var(--navy); }
.primary-action:disabled { background: #9da6a1; box-shadow: none; cursor: not-allowed; }
.material-stage > .primary-action { width: 100%; }
.form-error { min-height: 24px; margin: 14px 0 0; color: var(--danger); font-weight: 700; }

.draft-stage { padding-top: 12px; border-top: 8px solid var(--navy); }
.draft-head { display: flex; justify-content: space-between; gap: 24px; align-items: end; padding: 32px 0; }
.quiet-button { border: 1px solid var(--navy); border-radius: 999px; padding: 9px 16px; background: transparent; color: var(--navy); cursor: pointer; }
.boundary-note { padding: 18px 22px; border-left: 7px solid var(--lime); background: var(--navy); color: #dfe4f5; }
.source-coverage { margin-top: 14px; padding: 13px 18px; border: 1px solid #a6d2b7; border-left: 6px solid #2c7e59; background: var(--mint); color: var(--ink); font-size: 14px; }
.source-coverage strong { font-weight: 850; }
.original-source { margin-top: 24px; }
.original-source h3 { margin-bottom: 10px; color: var(--navy); }
.original-source p { max-width: 70ch; color: var(--muted); line-height: 1.7; }
.original-source pre { margin: 20px 0; padding: clamp(16px, 3vw, 28px); border: 1px solid var(--line); background: #fff; font: inherit; font-weight: 400; line-height: 1.85; white-space: pre-wrap; overflow-wrap: anywhere; }
.original-source-missing { padding: 20px; border-left: 4px solid var(--blue); background: #f4f6ff; }
.draft-columns { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 28px; margin-top: 28px; align-items: start; }
.field-list { display: grid; gap: 16px; }
.draft-field { border: 1px solid var(--line); background: var(--surface); }
.draft-field header { display: grid; grid-template-columns: 46px 1fr; gap: 14px; padding: 20px; border-bottom: 1px solid var(--line); }
.field-index { display: grid; width: 42px; height: 42px; place-items: center; border-radius: 50%; background: var(--lime); color: var(--navy); font-weight: 900; }
.draft-field h3 { margin: 0; font-size: 21px; }
.field-count { margin-left: 8px; color: var(--blue); font-size: 13px; font-weight: 850; white-space: nowrap; }
.draft-field-review { border-color: #c29470; }
.draft-field-review .field-index { background: var(--peach); }
.draft-field header p { margin: 3px 0 0; color: var(--muted); font-size: 13px; }
.field-items { padding: 10px 20px 20px; }
.source-item { position: relative; margin-top: 12px; padding: 16px 14px 12px; background: #f4f6ff; }
.source-item textarea { width: 100%; min-height: 78px; resize: vertical; border: 0; background: transparent; color: var(--ink); line-height: 1.7; }
.source-item small { display: block; color: var(--blue); font-weight: 750; }
.source-item button { position: absolute; right: 10px; bottom: 8px; border: 0; background: transparent; color: var(--muted); cursor: pointer; }
.field-empty { margin: 10px 0 0; padding: 16px; border: 1px dashed #9ba59f; color: var(--muted); }
.add-item { margin-top: 12px; border: 0; background: transparent; color: var(--blue); font-weight: 800; cursor: pointer; }
.unknown-panel { position: sticky; top: 110px; padding: 26px; border-radius: 6px 28px 28px 28px; background: #ffe4ce; }
.unknown-panel h3 { margin: 0; font-size: 27px; line-height: 1.2; }
.unknown-panel p { color: #715749; font-size: 14px; }
.unknown-panel ol { margin: 20px 0 0; padding-left: 24px; }
.unknown-panel li { margin: 14px 0; padding-left: 5px; }
.unknown-panel li::marker { color: var(--blue); font-weight: 900; }
.choice-options { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 8px; }
.choice-options button { border: 1px solid #b77c58; border-radius: 16px; padding: 6px 10px; background: #fffaf4; color: #443426; cursor: pointer; text-align: left; }
.choice-options button:hover, .choice-options button:focus-visible { background: var(--lime); border-color: var(--blue); }
.choice-options button:disabled { opacity: .55; cursor: default; }
.supplement-stage { margin-top: 32px; padding: clamp(20px, 4vw, 32px); border: 1px solid var(--line); background: var(--surface); }
.supplement-stage .section-heading h3 { margin: 5px 0 8px; font-size: clamp(24px, 3vw, 32px); }
.supplement-stage .section-heading p { max-width: 76ch; color: var(--muted); }
.supplement-inputs { display: grid; gap: 10px; max-width: 760px; }
.supplement-inputs label { font-weight: 800; }
.supplement-inputs label small { display: block; color: var(--muted); font-weight: 400; }
.supplement-inputs input[type=file], .supplement-inputs textarea { width: 100%; padding: 12px; border: 1px solid #9ba59f; background: #fff; font: inherit; }
.supplement-inputs textarea { resize: vertical; }
.supplement-inputs button { justify-self: start; }
.supplement-disclosure { max-width: 76ch; color: #44504b; }
.supplement-candidate, .private-criterion { display: grid; grid-template-columns: auto minmax(0, 1fr) minmax(130px, 180px); gap: 10px; align-items: start; margin: 10px 0; padding: 13px; border: 1px solid var(--line); background: #f7f9f5; }
.supplement-candidate textarea, .private-criterion textarea { width: 100%; min-height: 70px; padding: 8px; border: 1px solid var(--line); font: inherit; resize: vertical; }
.supplement-candidate select, .private-criterion select { width: 100%; padding: 8px; font: inherit; }
.private-criterion { grid-template-columns: minmax(0, 1fr) minmax(130px, 180px) auto; }
.private-criterion small { display: block; color: var(--blue); }
.private-criterion button { border: 0; background: transparent; color: var(--blue); cursor: pointer; }
.private-criteria { margin-top: 24px; border-top: 1px solid var(--line); }
.private-criteria h4 { font-size: 20px; }
.private-criteria h4 small { display: block; color: var(--muted); font-size: 13px; font-weight: 400; }
.draft-footer { display: flex; justify-content: space-between; gap: 34px; align-items: center; margin-top: 30px; padding: 28px; border: 1px solid var(--navy); background: var(--surface); }
.draft-next-copy { max-width: 600px; }
.draft-next-copy small { color: var(--blue); font-weight: 850; }
.draft-next-copy h3 { margin: 3px 0 5px; font-size: 26px; line-height: 1.2; }
.draft-next-copy p { margin: 0 0 8px; color: #44504b; }
.draft-next-copy span { display: block; color: var(--muted); font-size: 14px; }
.draft-next-actions { display: grid; gap: 15px; min-width: 265px; }
.draft-next-actions .quiet-button { border-radius: 4px 16px 16px 16px; }
.saved-workspace { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 14px; padding: 20px 26px; background: var(--mint); }
.saved-workspace p { margin: 4px 0 0; color: #365448; font-size: 14px; }
.saved-workspace a { flex: 0 0 auto; color: var(--navy); font-weight: 800; }

.share-stage { margin-top: 24px; padding: clamp(20px, 4vw, 32px); border: 2px solid var(--blue); background: #f1f5ff; }
.share-intro { max-width: 850px; }
.share-intro span { color: var(--blue); font-size: 13px; font-weight: 850; }
.share-intro h3 { margin: 5px 0 8px; font-size: clamp(25px, 3vw, 34px); line-height: 1.2; }
.share-intro p { margin: 0; color: #4d5b67; }
.share-items { display: grid; gap: 8px; max-height: 480px; overflow-y: auto; margin-top: 20px; }
.share-item { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 13px; align-items: start; border: 1px solid #bcc7df; padding: 14px; background: white; cursor: pointer; }
.share-item:has(input:checked) { border-color: var(--blue); background: #e6edff; }
.share-item input { width: 21px; height: 21px; margin: 2px 0 0; accent-color: var(--blue); }
.share-item b { display: block; color: #1f3b86; font-size: 13px; }
.share-item span { display: block; overflow-wrap: anywhere; white-space: pre-wrap; line-height: 1.55; }
.share-stage > .primary-action { width: 100%; margin-top: 22px; }
.share-error { min-height: 20px; margin: 10px 0 0; color: var(--danger); font-size: 14px; font-weight: 700; }
.share-link-result { margin-top: 20px; padding: 18px; border-left: 6px solid #297659; background: var(--mint); }
.share-link-result b { color: #145a3f; }
.share-link-result p { margin: 4px 0 12px; color: #365448; font-size: 14px; }
.share-link-result > div { display: flex; gap: 9px; }
.share-link-result input { flex: 1; min-width: 0; border: 1px solid #8ba99b; border-radius: 6px; padding: 8px 10px; background: white; color: var(--ink); }
.snapshot-item { margin-top: 9px; padding: 12px 14px; border-left: 4px solid var(--blue); background: white; overflow-wrap: anywhere; }
.snapshot-item b { display: block; margin-bottom: 4px; color: #1f3b86; font-size: 13px; }
.snapshot-item span { white-space: pre-wrap; }

.exchange-dialog { width: min(900px, calc(100% - 26px)); max-height: calc(100dvh - 26px); overflow-y: auto; border: 2px solid var(--navy); border-radius: 20px; padding: 24px; background: var(--surface); color: var(--ink); }
.exchange-dialog::backdrop { background: rgba(10, 18, 33, .65); }
.exchange-dialog-head { display: flex; justify-content: space-between; align-items: start; gap: 16px; }
.exchange-dialog-head small { color: var(--blue); font-weight: 850; }
.exchange-dialog h2 { margin: 3px 0 5px; font-size: clamp(24px, 3vw, 34px); line-height: 1.2; }
.exchange-dialog > p { color: var(--muted); font-size: 14px; }
.exchange-sides { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.exchange-sides section { min-width: 0; padding: 14px; background: #f1f5ff; }
.exchange-sides section:last-child { background: #e9f5ef; }
.exchange-sides h3 { margin: 0 0 8px; font-size: 18px; }
.exchange-snapshot-details { margin: 18px 0; border-top: 1px solid var(--line); padding-top: 15px; }
.exchange-snapshot-details summary { width: fit-content; margin-bottom: 14px; color: var(--blue); font-weight: 800; cursor: pointer; }
.exchange-snapshot-details summary:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
.recruit-unread { display: inline-grid; min-width: 22px; height: 22px; place-items: center; padding: 0 5px; border-radius: 999px; background: #c93438; color: #fff; font-style: normal; font-size: 12px; }
.recruit-chat { margin-top: 22px; padding: 18px; border: 1px solid var(--line); border-radius: 14px; background: #fffef8; }
.recruit-chat-heading { display: flex; justify-content: space-between; align-items: start; gap: 14px; }
.recruit-chat-heading small { color: var(--blue); font-weight: 800; }
.recruit-chat-heading h3 { margin: 4px 0; font-size: 22px; }
.recruit-chat > p, .recruit-chat-compose p { color: var(--muted); line-height: 1.6; }
.recruit-chat-brief { margin: 12px 0; padding: 13px 15px; border-left: 5px solid #e3f17b; border-radius: 3px 10px 10px 3px; background: #182458; color: #fff; line-height: 1.6; }
.recruit-chat-messages { display: grid; gap: 10px; max-height: 330px; overflow-y: auto; margin: 18px 0; }
.recruit-chat-message { max-width: 88%; padding: 12px 15px; border-radius: 15px; background: #eaf3ef; overflow-wrap: anywhere; }
.recruit-chat-message.mine { justify-self: end; background: #e8edff; }
.recruit-chat-message.peer { justify-self: start; }
.recruit-chat-message small { color: #426054; font-size: 12px; font-weight: 700; }
.recruit-chat-message p { margin: 6px 0 0; white-space: pre-wrap; line-height: 1.6; }
.recruit-chat-empty { color: var(--muted); }
#recruit-chat-compose label { display: block; margin: 8px 0; font-weight: 800; }
#recruit-chat-compose textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: 10px; font: inherit; resize: vertical; }
.recruit-chat-preview { margin-top: 12px; padding: 14px; border: 2px solid var(--blue); border-radius: 10px; background: #eef2ff; }
.recruit-chat-preview p { white-space: pre-wrap; overflow-wrap: anywhere; }
.recruit-chat-preview button { margin: 3px 8px 3px 0; }
@media (max-width: 600px) { .recruit-chat-heading { flex-direction: column; } .recruit-chat-message { max-width: 94%; } }

.account-dialog { width: min(480px, calc(100% - 28px)); max-height: calc(100dvh - 28px); border: 2px solid var(--navy); border-radius: 26px 26px 5px 26px; padding: 28px; background: var(--surface); color: var(--ink); box-shadow: 16px 16px 0 var(--navy); }
.account-dialog::backdrop { background: rgba(10, 18, 33, .65); }
.account-dialog-head { display: flex; justify-content: space-between; align-items: center; }
.buddy-mark { display: grid; width: 46px; height: 46px; place-items: center; border-radius: 14px; background: var(--navy); color: var(--lime); font-size: 24px; font-weight: 900; }
.dialog-close { width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 50%; background: transparent; color: var(--navy); font-size: 26px; cursor: pointer; }
.account-dialog h2 { margin: 18px 0 4px; font-size: 30px; line-height: 1.2; }
.account-dialog > p { margin: 0 0 18px; color: var(--muted); font-size: 15px; }
.account-tabs { display: grid; grid-template-columns: 1fr 1fr; border-bottom: 1px solid var(--line); }
.account-tabs button { border: 0; border-bottom: 3px solid transparent; padding: 11px 6px; background: transparent; color: var(--muted); font-weight: 800; cursor: pointer; }
.account-tabs button[aria-selected="true"] { border-color: var(--blue); color: var(--blue); }
.account-form { display: grid; gap: 10px; margin-top: 18px; }
.account-form label { font-size: 14px; font-weight: 800; }
.account-form input { width: 100%; min-height: 50px; border: 1px solid #9ca89e; border-radius: 9px; padding: 10px 14px; background: white; color: var(--ink); }
.account-form .primary-action { width: 100%; margin-top: 10px; }
.account-form p { margin: 3px 0; color: var(--muted); font-size: 13px; }
.account-recovery { justify-self: end; color: var(--blue); font-size: 14px; }
.account-logout { width: 100%; margin-top: 18px; padding: 12px; border: 1px solid #9ca89e; border-radius: 9px; background: transparent; color: var(--ink); font: inherit; font-weight: 700; cursor: pointer; }
.account-logout:hover { border-color: var(--blue); color: var(--blue); }
.account-dialog .account-error { min-height: 22px; margin: 12px 0 0; color: var(--danger); font-size: 14px; font-weight: 700; }

.toast { position: fixed; left: 50%; bottom: 24px; z-index: 20; transform: translate(-50%, 120px); max-width: min(560px, calc(100% - 30px)); padding: 13px 20px; border-radius: 999px; background: var(--ink); color: white; opacity: 0; transition: .2s ease; }
.toast.show { transform: translate(-50%, 0); opacity: 1; }

@media (max-width: 900px) {
  .intro { grid-template-columns: 1fr; }
  .process-note { max-width: 560px; }
  .promise-list { grid-template-columns: 1fr; }
  .promise-list li { min-height: auto; }
  .account-library { grid-template-columns: 1fr; }
  .draft-columns { grid-template-columns: 1fr; }
  .unknown-panel { position: static; }
  .supplement-candidate, .private-criterion { grid-template-columns: 1fr; }
  .incoming-body, .exchange-sides { grid-template-columns: 1fr; }
  .incoming-peer { border-right: 0; border-bottom: 1px solid var(--line); }
}

@media (max-width: 680px) {
  body { font-size: 16px; }
  .topbar { min-height: 72px; padding: 10px 16px; }
  .brand-mark { width: 44px; height: 44px; border-radius: 12px; font-size: 14px; }
  .brand small { display: none; }
  .account-entry { padding: 8px 11px; font-size: 12px; }
  main { width: min(100% - 28px, 1180px); padding: 42px 0 80px; }
  .intro { gap: 28px; }
  .intro h1 { font-size: clamp(36px, 10vw, 48px); letter-spacing: -.075em; }
  .lead { margin: 22px 0; font-size: 17px; }
  .role-stage, .material-stage, .draft-stage { margin-top: 56px; }
  .role-options { grid-template-columns: 1fr; }
  .role-option { grid-template-columns: 56px 1fr; min-height: 142px; padding: 18px; }
  .role-number { width: 56px; height: 56px; border-radius: 17px 17px 4px 17px; font-size: 24px; }
  .role-content b { font-size: 22px; }
  .role-arrow { display: none; }
  .material-stage { padding: 24px 18px; }
  .source-switch { display: flex; }
  .source-switch button { flex: 1; padding-inline: 13px; }
  .file-drop { min-height: 250px; padding: 26px 15px; }
  .privacy-strip { grid-template-columns: 1fr; gap: 6px; }
  .draft-head { align-items: start; flex-direction: column; }
  .draft-field header { grid-template-columns: 40px 1fr; padding: 17px 14px; }
  .field-index { width: 38px; height: 38px; }
  .field-items { padding: 8px 14px 16px; }
  .draft-footer { align-items: stretch; flex-direction: column; padding: 20px; }
  .draft-next-actions { min-width: 0; }
  .saved-workspace { align-items: start; flex-direction: column; }
  .account-dialog { padding: 22px; box-shadow: 8px 8px 0 var(--navy); }
  .incoming-head, .incoming-peer, .incoming-own { padding: 20px; }
  .exchange-library { padding: 20px; }
  .exchange-library-head, .exchange-row { flex-direction: column; align-items: stretch; }
  .share-link-result > div { flex-direction: column; }
  .exchange-dialog { padding: 18px; }
}
.site-registration {margin:24px auto;padding:16px 20px;text-align:center;font-size:13px;line-height:1.8;color:#505b55;}
.site-registration a {color:inherit;text-decoration:underline;}

/* Dedicated management views, not a registration waterfall. */
.recruit-workspace-head{margin:0 0 28px;padding-bottom:20px;border-bottom:2px solid var(--navy)}
.recruit-workspace-head h1{font-size:clamp(30px,5vw,44px);line-height:1.25;margin:8px 0}
.recruit-workspace-head small{color:var(--blue);font-weight:800}
.recruit-workspace-head p{line-height:1.7;color:#52605c;margin:10px 0}
.recruit-workspace-nav,.library-role-tabs,.draft-section-nav,.library-add-actions{display:flex;flex-wrap:wrap;gap:10px;margin:20px 0}
.recruit-workspace-nav button,.library-role-tabs button,.draft-section-nav button,.library-add-actions button,.recruit-access-state button{min-height:44px;padding:10px 16px;border:1px solid #aab9dc;border-radius:8px;background:#fff;color:#182458;font:inherit;font-weight:750;cursor:pointer}
.recruit-workspace-nav button.active,.library-role-tabs button.active,.draft-section-nav button.active{background:#182458;color:#fff;border-color:#182458}
.draft-field[hidden],.unknown-panel[hidden],.draft-columns[hidden],main>section[hidden]{display:none!important}
body:not([data-recruit-view="about"]) main{padding-top:24px}
body:not([data-recruit-view="about"]) .account-library,body:not([data-recruit-view="about"]) .exchange-library,body:not([data-recruit-view="about"]) .role-stage,body:not([data-recruit-view="about"]) .material-stage,body:not([data-recruit-view="about"]) .draft-stage{margin-top:24px}
body[data-recruit-view="edit"] .draft-columns{grid-template-columns:minmax(0,1fr)}
body[data-recruit-view="edit"] .unknown-panel{position:static;max-width:none}
.draft-section-nav{border-bottom:1px solid #aab9dc;padding-bottom:20px}
.account-library-item b,.account-library-item small{display:block}.account-library-item small{margin-top:6px;font-size:13px;font-weight:400}
.account-library-item button{min-width:0;overflow-wrap:anywhere;text-align:left}
.account-library{display:block}
.invitation-purpose{padding:12px 20px;background:#eef2ff;line-height:1.7;color:#34423c}
@media(max-width:620px){.recruit-workspace-nav button,.library-role-tabs button{flex:1 1 42%;padding:10px 12px}.draft-section-nav button{font-size:13px;padding:10px}.library-add-actions button{flex:1}.account-library-item{align-items:stretch}.account-library-item button{min-height:46px}}
@media(max-width:420px){.topbar{flex-wrap:wrap}.topbar .brand{width:100%}.back-to-messages{margin-left:0;flex:1;text-align:center;min-height:44px;display:flex;justify-content:center;align-items:center}.account-entry{flex:1;min-height:44px}.account-library-item{flex-wrap:wrap}.account-library-item>[data-load-draft]{flex:1 1 75%}}
