@import url('https://fonts.googleapis.com/css2?family=Archivo:wght@400;500;600;700&family=Fraunces:opsz,wght@9..144,500;9..144,600&display=swap');
:root { --bg: #fff; --bg-soft: #f6f7f7; --ink: #141414; --ink-soft: #535858; --line: #d9dede; --accent: #c93400; --accent-dark: #a72c00; --success: #17624c; --error: #a21d29; --font-body: 'Archivo', sans-serif; --font-display: 'Fraunces', Georgia, serif; --radius: 6px; }
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 16px/1.55 var(--font-body); letter-spacing: 0; }
::selection { background: #ffe2d7; color: var(--ink); }
a { color: var(--accent); text-underline-offset: 3px; }
button, input, select, textarea { font: inherit; letter-spacing: 0; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; border: 1px solid var(--line); border-radius: var(--radius); padding: 10px 18px; background: white; color: var(--ink); cursor: pointer; text-decoration: none; line-height: 1.3; white-space: normal; }
button:hover, .button:hover { background: var(--bg-soft); }
button.primary, .button.primary { background: var(--accent); border-color: var(--accent); color: white; }
button.primary:hover, .button.primary:hover { background: var(--accent-dark); }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #187b8a; outline-offset: 3px; }
[hidden] { display: none !important; }
h1, h2, h3, p { margin-top: 0; }
h1 { font: 500 36px/1.18 var(--font-display); margin-bottom: 16px; overflow-wrap: anywhere; }
h2 { font-size: 22px; line-height: 1.3; }
h3 { font-size: 17px; }
.muted { color: var(--ink-soft); }
.topbar { border-bottom: 1px solid var(--line); min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 16px 32px; }
.brand { display: inline-flex; gap: 12px; align-items: center; text-decoration: none; color: var(--ink); }
.brand img { width: 38px; height: 38px; object-fit: contain; }
.brand strong { display: block; font-size: 18px; line-height: 1.2; }
.brand small { display: block; color: var(--ink-soft); font-size: 12px; }
.intake { max-width: 720px; margin: 0 auto; padding: 32px 28px 60px; }
.steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); list-style: none; padding: 0; gap: 12px; margin: 0 0 38px; font-size: 13px; color: var(--ink-soft); }
.steps li { padding-top: 10px; border-top: 3px solid var(--line); }
.steps [aria-current] { border-color: var(--accent); color: var(--ink); font-weight: 700; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 20px; min-width: 0; }
.field label, .field-label { font-weight: 600; }
input:not([type=checkbox]):not([type=radio]), select, textarea { width: 100%; min-height: 46px; padding: 10px 12px; background: white; border: 1px solid #8c9696; border-radius: var(--radius); color: var(--ink); caret-color: var(--accent); }
input::placeholder, textarea::placeholder { color: #626b6b; }
input[type=checkbox], input[type=radio] { width: 19px; height: 19px; flex: 0 0 19px; accent-color: var(--accent); }
.check { display: flex; align-items: flex-start; gap: 10px; margin: 18px 0; }
.check input { margin-top: 4px; }
.check label { font-size: 14px; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.actions .primary { margin-left: auto; }
.status { min-height: 26px; margin: 12px 0; font-size: 14px; color: var(--success); }
.status.error { color: var(--error); }
.notice { padding: 16px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); margin: 24px 0; color: var(--ink-soft); font-size: 14px; }
.question { border: 0; border-top: 1px solid var(--line); padding: 24px 0; margin: 0; min-width: 0; }
.question legend { float: left; width: 100%; font-weight: 500; margin-bottom: 16px; }
.options { display: flex; gap: 12px; clear: both; }
.option { display: inline-flex; align-items: center; gap: 8px; min-height: 46px; padding: 8px 18px; border: 1px solid var(--line); border-radius: var(--radius); cursor: pointer; }
.option:has(:checked) { border-color: var(--accent); background: #fff2ed; }
.two-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.footer { color: var(--ink-soft); border-top: 1px solid var(--line); padding: 24px; text-align: center; font-size: 13px; }
.complete-mark { width: 52px; height: 52px; color: var(--success); margin: 8px 0 24px; }
.protocol { font-variant-numeric: tabular-nums; font-weight: 600; overflow-wrap: anywhere; }
.login { max-width: 440px; padding: 50px 24px; margin: 0 auto; }
.admin-shell { display: grid; grid-template-columns: 210px minmax(0, 1fr); min-height: calc(100vh - 78px); }
.sidebar { border-right: 1px solid var(--line); padding: 24px 16px; background: var(--bg-soft); }
.sidebar button { display: flex; width: 100%; justify-content: flex-start; margin-bottom: 6px; border: 0; background: transparent; }
.sidebar button[aria-current] { background: #e8eded; font-weight: 700; }
.workspace { min-width: 0; padding: 32px; }
.workspace h1 { font: 600 28px/1.2 var(--font-body); }
.view-header { display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin-bottom: 24px; }
.view-header h1, .view-header p { margin-bottom: 0; }
.filters { display: flex; align-items: end; flex-wrap: wrap; gap: 12px; padding: 20px 0; border-top: 1px solid var(--line); }
.filters .field { margin: 0; flex: 1 1 140px; }
.filters .search-field { flex: 2 1 220px; }
.filters label { font-size: 12px; }
.table-wrap { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; font-variant-numeric: tabular-nums; }
th { font-size: 12px; text-align: left; color: var(--ink-soft); padding: 12px; border-block: 1px solid var(--line); background: var(--bg-soft); }
td { border-bottom: 1px solid var(--line); padding: 14px 12px; vertical-align: top; }
td strong, td small { display: block; }
td small { color: var(--ink-soft); }
.text-button { border: 0; background: transparent; color: var(--accent); padding: 0; min-height: 32px; text-align: left; justify-content: flex-start; }
.tag { display: inline-block; font-size: 12px; padding: 3px 7px; background: #edf1f1; color: #354848; border-radius: 3px; white-space: nowrap; }
.tag.success { background: #e4f2e9; color: var(--success); }
.tag.warning { background: #fff0d3; color: #69480c; }
.detail-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 1fr); gap: 40px; }
.detail-section { padding: 24px 0; border-top: 1px solid var(--line); }
dl { display: grid; grid-template-columns: 150px 1fr; gap: 12px; margin: 0; }
dt { color: var(--ink-soft); font-size: 14px; }
dd { margin: 0; overflow-wrap: anywhere; }
.note { padding: 16px 0; border-bottom: 1px solid var(--line); white-space: pre-wrap; overflow-wrap: anywhere; }
.note small { display: block; color: var(--ink-soft); }
summary { cursor: pointer; padding: 16px 0; color: var(--accent); }
.icon-button { width: 44px; padding: 10px; flex: 0 0 44px; }
svg { width: 20px; height: 20px; flex-shrink: 0; }
.security-list { list-style: none; padding: 0; max-width: 720px; }
.security-list li { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 16px 0; border-bottom: 1px solid var(--line); }
.empty { text-align: center; padding: 50px 20px; color: var(--ink-soft); }
dialog { width: min(480px, calc(100% - 32px)); border: 1px solid var(--line); border-radius: 8px; padding: 28px; }
dialog::backdrop { background: #14141470; }
dialog h2 { margin-right: 36px; }
.dialog-close { position: absolute; top: 12px; right: 12px; }
@media (max-width: 760px) {
  .topbar { padding: 14px 18px; }
  .topbar .muted { font-size: 12px; }
  .brand small { display: none; }
  .intake { padding: 28px 20px 44px; }
  h1 { font-size: 30px; }
  .two-cols, .detail-grid { grid-template-columns: 1fr; gap: 0; }
  .steps { gap: 8px; font-size: 11px; margin-bottom: 28px; }
  .admin-shell { display: block; }
  .sidebar { display: flex; gap: 4px; padding: 8px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; }
  .sidebar button { width: auto; margin: 0; flex-shrink: 0; padding: 10px; font-size: 13px; }
  .workspace { padding: 24px 16px; }
  .lead-table thead { display: none; }
  .lead-table tr { display: grid; grid-template-columns: 1fr 1fr; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .lead-table td { border: 0; padding: 6px; overflow-wrap: anywhere; }
  .lead-table td:first-child { grid-column: 1 / -1; }
  dl { grid-template-columns: 110px minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { scroll-behavior: auto !important; animation: none !important; transition: none !important; } }
