.sd-shell {
  --sd-ink: #172033;
  --sd-muted: #667085;
  --sd-line: #dde3ec;
  --sd-soft: #f5f7fb;
  --sd-blue: #3157d5;
  --sd-blue-dark: #2746ad;
  --sd-teal: #0f766e;
  --sd-amber: #a15c05;
  --sd-red: #b42318;
  max-width: 1220px;
  margin: 0 auto;
  padding: 34px 20px 82px;
  color: var(--sd-ink);
}

.sd-shell *, .sd-shell *::before, .sd-shell *::after { box-sizing: border-box; }
.sd-shell button, .sd-shell input, .sd-shell select, .sd-shell textarea { font: inherit; }
.sd-shell button, .sd-shell a { -webkit-tap-highlight-color: transparent; }
.sd-shell [hidden] { display: none !important; }

.sd-hero { padding: 14px 0 26px; }
.sd-eyebrow, .sd-result-kicker, .sd-card-head > span, .sd-section-title > div > span, .sd-next-step > div > span {
  color: var(--sd-blue);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.sd-hero h1 { max-width: 900px; margin: 7px 0 12px; font-size: clamp(34px, 5vw, 54px); line-height: 1.04; letter-spacing: -.035em; }
.sd-hero-lead { max-width: 850px; margin: 0; color: var(--sd-muted); font-size: 17px; line-height: 1.62; }
.sd-principles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 25px; }
.sd-principles article { display: flex; gap: 13px; align-items: flex-start; padding: 15px 16px; border: 1px solid var(--sd-line); border-radius: 14px; background: rgba(255,255,255,.8); }
.sd-principles article > span { display: grid; flex: 0 0 34px; width: 34px; height: 34px; place-items: center; border-radius: 10px; color: var(--sd-blue); background: #edf1ff; font-size: 11px; font-weight: 900; }
.sd-principles strong, .sd-principles small { display: block; }
.sd-principles strong { margin-bottom: 4px; font-size: 14px; }
.sd-principles small { color: var(--sd-muted); font-size: 12px; line-height: 1.4; }

.sd-panel { border: 1px solid var(--sd-line); border-radius: 16px; background: #fff; box-shadow: 0 12px 35px rgba(24, 36, 62, .055); }
.sd-form-panel { padding: 24px; }
.sd-section-head, .sd-section-title, .sd-result-head { display: flex; justify-content: space-between; gap: 28px; align-items: flex-start; }
.sd-section-head { padding-bottom: 19px; border-bottom: 1px solid var(--sd-line); }
.sd-section-head span { color: var(--sd-blue); font-size: 12px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.sd-section-head h2, .sd-section-title h2, .sd-section-title h3 { margin: 4px 0 0; }
.sd-section-head h2 { font-size: 24px; }
.sd-section-head p, .sd-section-title > p { max-width: 450px; margin: 2px 0 0; color: var(--sd-muted); font-size: 13px; line-height: 1.5; }

.sd-main-input { padding: 27px 0 22px; }
.sd-main-input-grid { display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(320px, .92fr); gap: 18px; align-items: start; }
.sd-primary-field { max-width: 920px; }
.sd-primary-field > span { font-size: 14px; }
.sd-primary-field input { min-height: 56px; padding: 14px 15px; border-color: #b9c5dc; border-radius: 12px; font-size: 16px; }
.sd-primary-field small { font-size: 12px; }
.sd-url-field input { background: #fbfcff; }
.sd-mode-explainer { display: flex; gap: 11px; align-items: center; margin: -6px 0 20px; padding: 11px 13px; border: 1px solid #dbe3fb; border-radius: 11px; background: #f7f9ff; }
.sd-mode-explainer > span { flex: 0 0 auto; padding: 5px 8px; border-radius: 7px; color: #2448ad; background: #e5ebff; font-size: 10px; font-weight: 850; }
.sd-mode-explainer p { margin: 0; color: #59657a; font-size: 11px; line-height: 1.45; }

.sd-advanced { overflow: hidden; margin: 0; border: 1px solid var(--sd-line); border-radius: 13px; background: #fbfcfe; }
.sd-advanced > summary { display: grid; grid-template-columns: auto 1fr auto; gap: 11px; align-items: center; min-height: 62px; padding: 12px 15px; cursor: pointer; list-style: none; color: #344054; user-select: none; }
.sd-advanced > summary::-webkit-details-marker { display: none; }
.sd-advanced > summary:hover { background: #f7f9fd; }
.sd-advanced > summary:focus-visible { outline: 3px solid rgba(49,87,213,.16); outline-offset: -3px; }
.sd-advanced > summary strong, .sd-advanced > summary small { display: block; }
.sd-advanced > summary strong { font-size: 13px; }
.sd-advanced > summary small { margin-top: 3px; color: var(--sd-muted); font-size: 11px; font-weight: 500; line-height: 1.35; }
.sd-advanced-icon { display: grid; width: 30px; height: 30px; place-items: center; border-radius: 9px; color: var(--sd-blue); background: #edf1ff; font-size: 19px; font-weight: 500; line-height: 1; transition: transform .18s ease; }
.sd-advanced-chevron { width: 9px; height: 9px; margin-right: 3px; border-right: 2px solid #8490a5; border-bottom: 2px solid #8490a5; transform: rotate(45deg); transition: transform .18s ease; }
.sd-advanced[open] > summary { border-bottom: 1px solid var(--sd-line); background: #f8faff; }
.sd-advanced[open] .sd-advanced-icon { transform: rotate(45deg); }
.sd-advanced[open] .sd-advanced-chevron { transform: rotate(225deg); }
.sd-advanced-body { padding: 0 18px 20px; }
.sd-advanced-body .sd-llm-toggle { margin-top: 18px; }

.sd-form-section { min-width: 0; margin: 0; padding: 24px 0; border: 0; border-bottom: 1px solid var(--sd-line); }
.sd-form-section legend { display: flex; align-items: center; gap: 9px; margin-bottom: 17px; padding: 0; color: #2e3a52; font-size: 15px; font-weight: 800; }
.sd-form-section legend > span { display: grid; width: 26px; height: 26px; place-items: center; border-radius: 8px; background: #edf1ff; color: var(--sd-blue); font-size: 12px; }
.sd-form-section legend small { color: var(--sd-muted); font-size: 11px; font-weight: 500; }
.sd-draft-section { border-bottom: 0; }
.sd-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 18px; }
.sd-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.sd-span-2 { grid-column: span 2; }
.sd-field { display: block; min-width: 0; }
.sd-field > span { display: flex; justify-content: space-between; gap: 8px; min-height: 20px; margin-bottom: 7px; color: #344054; font-size: 13px; font-weight: 700; }
.sd-field > span b { color: var(--sd-red); }
.sd-field > span em { color: #8b94a5; font-size: 10px; font-style: normal; font-weight: 500; letter-spacing: .02em; text-transform: uppercase; }
.sd-field input, .sd-field select, .sd-field textarea { width: 100%; border: 1px solid #cfd6e2; border-radius: 10px; outline: 0; background: #fff; color: var(--sd-ink); transition: border-color .15s ease, box-shadow .15s ease; }
.sd-field input, .sd-field select { min-height: 45px; padding: 10px 12px; }
.sd-field textarea { display: block; min-height: 82px; padding: 11px 12px; resize: vertical; line-height: 1.5; }
.sd-field input:focus, .sd-field select:focus, .sd-field textarea:focus { border-color: #7890e5; box-shadow: 0 0 0 3px rgba(49,87,213,.11); }
.sd-field input[aria-invalid="true"] { border-color: #e1766c; box-shadow: 0 0 0 3px rgba(180,35,24,.08); }
.sd-field small { display: block; margin-top: 6px; color: var(--sd-muted); font-size: 11px; line-height: 1.45; }

.sd-submit-row { display: flex; justify-content: space-between; gap: 20px; align-items: center; padding-top: 21px; }
.sd-submit-note { max-width: 470px; margin: 0; color: var(--sd-muted); font-size: 11px; line-height: 1.5; text-align: right; }
.sd-primary, .sd-secondary { display: inline-flex; align-items: center; justify-content: center; gap: 9px; min-height: 44px; padding: 10px 17px; border-radius: 10px; cursor: pointer; font-weight: 800; text-decoration: none; transition: transform .15s ease, background .15s ease, border-color .15s ease; }
.sd-primary { border: 1px solid var(--sd-blue); color: #fff; background: var(--sd-blue); }
.sd-primary:hover { color: #fff; background: var(--sd-blue-dark); transform: translateY(-1px); }
.sd-primary svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.sd-secondary { border: 1px solid #cfd6e2; color: #344054; background: #fff; }
.sd-secondary:hover { border-color: #9aa8bc; color: var(--sd-ink); background: #f8fafc; }
.sd-primary:disabled, .sd-secondary:disabled { cursor: wait; opacity: .58; transform: none; }
.sd-llm-toggle { display: flex; align-items: flex-start; gap: 10px; max-width: 420px; cursor: pointer; }
.sd-llm-toggle input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--sd-blue); }
.sd-llm-toggle b, .sd-llm-toggle small { display: block; }
.sd-llm-toggle b { color: #344054; font-size: 12px; }
.sd-llm-toggle small { margin-top: 3px; color: var(--sd-muted); font-size: 11px; line-height: 1.35; }
.sd-alert { margin-top: 17px; padding: 12px 14px; border-radius: 10px; font-size: 13px; line-height: 1.5; }
.sd-alert-error { border: 1px solid #f4b8b2; color: #8e1c13; background: #fff4f2; }
.sd-alert a { color: inherit; font-weight: 800; }

.sd-progress { display: grid; grid-template-columns: auto 1fr minmax(180px, 280px); gap: 17px; align-items: center; margin-top: 18px; padding: 18px 20px; border-color: #cfd9fb; }
.sd-progress-icon { display: flex; gap: 4px; width: 37px; height: 37px; align-items: center; justify-content: center; border-radius: 11px; background: #edf1ff; }
.sd-progress-icon span { width: 5px; height: 5px; border-radius: 99px; background: var(--sd-blue); animation: sd-pulse 1.15s infinite ease-in-out; }
.sd-progress-icon span:nth-child(2) { animation-delay: .15s; }
.sd-progress-icon span:nth-child(3) { animation-delay: .3s; }
@keyframes sd-pulse { 0%, 70%, 100% { transform: translateY(0); opacity: .35; } 35% { transform: translateY(-5px); opacity: 1; } }
.sd-progress-copy strong, .sd-progress-copy small { display: block; }
.sd-progress-copy strong { margin-bottom: 4px; font-size: 14px; }
.sd-progress-copy small { color: var(--sd-muted); font-size: 11px; }
.sd-progress-meter { display: grid; grid-template-columns: 1fr auto; gap: 7px 10px; align-items: center; }
.sd-progress-meter span { grid-column: 2; grid-row: 1; color: var(--sd-blue); font-size: 12px; font-weight: 800; }
.sd-progress-meter progress { grid-column: 1 / -1; grid-row: 2; width: 100%; height: 7px; overflow: hidden; appearance: none; border: 0; border-radius: 99px; background: #e8ecf4; }
.sd-progress-meter progress::-webkit-progress-bar { background: #e8ecf4; }
.sd-progress-meter progress::-webkit-progress-value { border-radius: 99px; background: var(--sd-blue); transition: width .25s ease; }
.sd-progress-meter progress::-moz-progress-bar { border-radius: 99px; background: var(--sd-blue); }

.sd-results { margin-top: 34px; }
.sd-result-head { padding: 0 2px 20px; }
.sd-result-head h2 { margin: 5px 0 4px; font-size: 31px; line-height: 1.15; }
.sd-result-head p { margin: 0; color: var(--sd-muted); font-size: 13px; }
.sd-result-head-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.sd-audit { margin-bottom: 24px; padding: 24px; border-color: #cbd8fb; box-shadow: 0 15px 40px rgba(30, 65, 150, .08); }
.sd-audit-head { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; padding-bottom: 18px; border-bottom: 1px solid var(--sd-line); }
.sd-audit-mode { display: block; color: var(--sd-blue); font-size: 11px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.sd-audit-head h3 { margin: 5px 0 5px; font-size: 24px; line-height: 1.2; }
.sd-audit-head p { max-width: 720px; margin: 0; color: var(--sd-muted); font-size: 12px; line-height: 1.5; overflow-wrap: anywhere; }
.sd-audit-head p a { color: var(--sd-blue); text-decoration: none; }
.sd-audit-head p a:hover { text-decoration: underline; }
.sd-audit-alignment { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.sd-audit-alignment span { display: inline-flex; max-width: 360px; padding: 7px 9px; border: 1px solid #d7def0; border-radius: 8px; color: #44526b; background: #f4f6fb; font-size: 10px; font-weight: 750; line-height: 1.35; }
.sd-audit-alignment span.is-note { color: #3d4e6c; background: #f4f7fc; }
.sd-audit-alignment span.is-review { border-color: #edd4ab; color: #76501c; background: #fff8eb; }
.sd-audit-alignment span.is-good { color: #11695f; background: #daf4ef; }
.sd-audit-alignment span.is-bad { color: #9b231b; background: #ffebe9; }
.sd-audit-legacy { display: grid; gap: 3px; margin-top: 14px; padding: 11px 13px; border: 1px solid #edd4ab; border-radius: 9px; color: #76501c; background: #fff8eb; font-size: 10px; line-height: 1.45; }
.sd-audit-legacy strong { color: #684413; font-size: 11px; }
.sd-audit-verdict { margin-top: 16px; }
.sd-audit-verdict-card { padding: 15px 17px; border-left: 4px solid #df9632; border-radius: 10px; background: #fff8eb; }
.sd-audit-verdict-card.is-good { border-left-color: #2b978a; background: #effbf8; }
.sd-audit-verdict-card.is-bad { border-left-color: #d75148; background: #fff3f1; }
.sd-audit-verdict-card span, .sd-audit-verdict-card strong { display: block; }
.sd-audit-verdict-card span { margin-bottom: 4px; color: var(--sd-muted); font-size: 9px; font-weight: 850; letter-spacing: .07em; text-transform: uppercase; }
.sd-audit-verdict-card strong { color: #2d374a; font-size: 15px; line-height: 1.5; }
.sd-audit-block { margin-top: 22px; }
.sd-audit-block > h4, .sd-audit-block-head h4 { margin: 0; font-size: 16px; }
.sd-audit-block-head { display: flex; justify-content: space-between; gap: 18px; align-items: end; margin-bottom: 10px; }
.sd-audit-block-head p { max-width: 620px; margin: 0; color: var(--sd-muted); font-size: 10px; line-height: 1.45; text-align: right; }
.sd-audit-top-gaps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; counter-reset: sd-audit-gap; }
.sd-audit-top-gaps li { position: relative; min-height: 48px; padding: 11px 12px 11px 42px; border: 1px solid #f0c8c4; border-radius: 10px; color: #64302b; background: #fff8f7; font-size: 12px; font-weight: 700; line-height: 1.45; counter-increment: sd-audit-gap; }
.sd-audit-top-gaps li::before { content: counter(sd-audit-gap); position: absolute; left: 11px; top: 10px; display: grid; width: 22px; height: 22px; place-items: center; border-radius: 7px; color: #9b231b; background: #ffdfdc; font-size: 9px; font-weight: 900; }
.sd-audit-top-gaps li.is-empty { grid-column: 1 / -1; border-color: var(--sd-line); color: var(--sd-muted); background: var(--sd-soft); font-weight: 500; }
.sd-audit-table-wrap { overflow-x: auto; border: 1px solid var(--sd-line); border-radius: 12px; }
.sd-audit-table { width: 100%; min-width: 980px; border-collapse: collapse; table-layout: fixed; }
.sd-audit-table th { padding: 10px 11px; color: #667085; background: #f5f7fb; font-size: 9px; font-weight: 850; letter-spacing: .04em; text-align: left; text-transform: uppercase; }
.sd-audit-table th:nth-child(1) { width: 19%; }
.sd-audit-table th:nth-child(2) { width: 26%; }
.sd-audit-table th:nth-child(3) { width: 12%; }
.sd-audit-table th:nth-child(4) { width: 27%; }
.sd-audit-table th:nth-child(5) { width: 16%; }
.sd-audit-table td { padding: 12px 11px; border-top: 1px solid var(--sd-line); color: #475467; font-size: 11px; line-height: 1.45; vertical-align: top; overflow-wrap: anywhere; }
.sd-audit-table td > strong { display: block; color: #2e3a52; font-size: 11px; }
.sd-audit-table td .sd-priority-badge { margin-bottom: 7px; }
.sd-audit-table td q { display: block; padding-left: 8px; border-left: 2px solid #afbee8; color: #344054; font-style: normal; }
.sd-audit-table td q::before, .sd-audit-table td q::after { content: none; }
.sd-audit-table td small { display: block; margin-top: 6px; color: var(--sd-muted); font-size: 9px; line-height: 1.45; }
.sd-audit-evidence { min-width: 0; }
.sd-audit-evidence-details { margin-top: 7px; }
.sd-audit-evidence-details summary { width: fit-content; cursor: pointer; color: var(--sd-blue); font-size: 9px; font-weight: 800; line-height: 1.35; user-select: none; }
.sd-audit-evidence-details summary:hover { color: var(--sd-blue-dark); }
.sd-audit-evidence-details summary:focus-visible { outline: 2px solid rgba(49,87,213,.28); outline-offset: 2px; border-radius: 3px; }
.sd-audit-evidence-full { max-height: 230px; margin-top: 8px; overflow: auto; padding: 9px 10px !important; border: 1px solid #dbe2f2 !important; border-left: 3px solid #8399d8 !important; border-radius: 7px; background: #f8faff; white-space: normal; }
.sd-audit-not-found { color: #9b231b; font-weight: 750; }
.sd-audit-status { display: inline-flex; padding: 4px 7px; border-radius: 6px; color: #475467; background: #eef1f5; font-size: 8px; font-weight: 850; line-height: 1.25; text-transform: uppercase; }
.sd-audit-status.is-covered, .sd-audit-status.is-answered, .sd-audit-status.is-complete { color: #11695f; background: #daf4ef; }
.sd-audit-status.is-partial, .sd-audit-status.is-mentioned_only, .sd-audit-status.is-needs_confirmation { color: #8b4d00; background: #fff1d6; }
.sd-audit-status.is-missing, .sd-audit-status.is-contradicted { color: #9b231b; background: #ffebe9; }
.sd-audit-table-empty { color: var(--sd-muted) !important; text-align: center; }
.sd-audit-actions { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; margin-top: 22px; }
.sd-audit-action { min-width: 0; padding: 14px; border: 1px solid var(--sd-line); border-top: 3px solid #7d8ba5; border-radius: 11px; background: #fff; }
.sd-audit-action.is-keep { border-top-color: #2b978a; }
.sd-audit-action.is-change { border-top-color: #df9632; }
.sd-audit-action.is-add { border-top-color: #5275d9; }
.sd-audit-action.is-remove { border-top-color: #d75148; }
.sd-audit-action h4 { margin: 0; font-size: 13px; }
.sd-audit-action > p { min-height: 40px; margin: 5px 0 10px; color: var(--sd-muted); font-size: 9px; line-height: 1.4; }
.sd-audit-action ul { display: grid; gap: 7px; margin: 0; padding: 0; list-style: none; }
.sd-audit-action li { position: relative; padding-left: 12px; color: #475467; font-size: 10px; line-height: 1.45; }
.sd-audit-action li::before { content: ""; position: absolute; left: 0; top: .55em; width: 5px; height: 5px; border-radius: 99px; background: #7d8ba5; }
.sd-audit-action.is-keep li::before { background: #2b978a; }
.sd-audit-action.is-change li::before { background: #df9632; }
.sd-audit-action.is-add li::before { background: #5275d9; }
.sd-audit-action.is-remove li::before { background: #d75148; }
.sd-audit-action-empty { color: #98a2b3; font-size: 9px; font-style: italic; }
.sd-result-section { margin: 0 0 22px; }
.sd-section-title { align-items: end; margin-bottom: 13px; }
.sd-section-title h3 { font-size: 22px; }
.sd-scorecard { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.sd-score { min-width: 0; padding: 17px; border: 1px solid var(--sd-line); border-radius: 14px; background: #fff; }
.sd-score-head { display: flex; justify-content: space-between; gap: 9px; align-items: flex-start; }
.sd-score-head strong { font-size: 13px; line-height: 1.35; }
.sd-score-value { white-space: nowrap; color: var(--sd-blue); font-size: 16px; font-weight: 900; }
.sd-score-track { height: 6px; margin: 13px 0 10px; overflow: hidden; border-radius: 99px; background: #e9edf4; }
.sd-score-track span { display: block; height: 100%; border-radius: inherit; background: var(--sd-blue); }
.sd-score p { margin: 0; color: var(--sd-muted); font-size: 11px; line-height: 1.5; }
.sd-score.is-unknown .sd-score-value { color: var(--sd-muted); }
.sd-score.is-unknown .sd-score-track span { width: 0 !important; }

.sd-result-layout { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(310px, .65fr); gap: 18px; align-items: start; }
.sd-result-main, .sd-result-aside { display: grid; gap: 18px; }
.sd-result-card { padding: 20px; }
.sd-card-head { margin-bottom: 15px; }
.sd-card-head h3 { margin: 4px 0 0; font-size: 18px; }
.sd-empty { margin: 0; padding: 13px; border-radius: 9px; color: var(--sd-muted); background: var(--sd-soft); font-size: 12px; line-height: 1.5; }

.sd-contract { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.sd-contract-item { min-width: 0; padding: 13px; border-radius: 10px; background: var(--sd-soft); }
.sd-contract-item span, .sd-contract-item strong { display: block; }
.sd-contract-item > span { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin-bottom: 5px; color: var(--sd-muted); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; }
.sd-contract-item .sd-inferred-badge { display: inline-flex; align-items: center; margin: 0; padding: 2px 5px; border-radius: 5px; color: #8b4d00; background: #fff1d6; font-size: 8px; font-style: normal; font-weight: 800; letter-spacing: 0; line-height: 1.25; text-transform: none; }
.sd-contract-item strong { color: #344054; font-size: 13px; font-weight: 650; line-height: 1.5; overflow-wrap: anywhere; }

.sd-intents { display: grid; gap: 9px; }
.sd-intent { display: grid; grid-template-columns: auto 1fr; gap: 11px; padding: 13px; border: 1px solid var(--sd-line); border-radius: 11px; }
.sd-intent-index { display: grid; width: 28px; height: 28px; place-items: center; border-radius: 8px; color: var(--sd-blue); background: #edf1ff; font-size: 11px; font-weight: 900; }
.sd-intent strong { display: block; margin-bottom: 3px; font-size: 13px; }
.sd-intent p { margin: 0; color: var(--sd-muted); font-size: 12px; line-height: 1.45; }
.sd-meta-row { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.sd-chip { display: inline-flex; align-items: center; min-height: 23px; padding: 3px 8px; border-radius: 99px; color: #475467; background: #eef1f5; font-size: 10px; font-weight: 700; }
.sd-chip.is-hypothesis { color: #8b4d00; background: #fff1d6; }
.sd-chip.is-confirmed { color: #11695f; background: #daf4ef; }

.sd-priority-legend { display: flex; flex-wrap: wrap; gap: 6px; margin: -3px 0 14px; }
.sd-priority-legend span, .sd-priority-badge { display: inline-flex; padding: 5px 8px; border-radius: 7px; font-size: 10px; font-weight: 800; }
.sd-priority-legend .is-p0, .sd-priority-badge.is-p0 { color: #9b231b; background: #ffebe9; }
.sd-priority-legend .is-p1, .sd-priority-badge.is-p1 { color: #8b4d00; background: #fff1d6; }
.sd-priority-legend .is-p2, .sd-priority-badge.is-p2 { color: #2451a6; background: #e8efff; }
.sd-requirements { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sd-requirement-group { min-width: 0; }
.sd-requirement-group > h4 { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 0 0 8px; font-size: 12px; }
.sd-requirement-group > h4 small { color: var(--sd-muted); font-size: 10px; }
.sd-requirement-list { display: grid; gap: 8px; }
.sd-requirement { padding: 12px; border: 1px solid var(--sd-line); border-left: 3px solid #9ab0ed; border-radius: 10px; }
.sd-requirement.is-p0 { border-left-color: #d75148; }
.sd-requirement.is-p1 { border-left-color: #e49a39; }
.sd-requirement.is-p2 { border-left-color: #6c8be5; }
.sd-requirement strong { display: block; font-size: 12px; line-height: 1.4; }
.sd-requirement p { margin: 6px 0 0; color: var(--sd-muted); font-size: 11px; line-height: 1.45; }
.sd-requirement-status { display: inline-flex; margin-top: 8px; padding: 3px 7px; border-radius: 6px; color: #475467; background: #eef1f5; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sd-requirement-status.is-answered { color: #11695f; background: #daf4ef; }
.sd-requirement-status.is-missing, .sd-requirement-status.is-contradicted { color: #9b231b; background: #ffebe9; }
.sd-requirement-status.is-partial, .sd-requirement-status.is-mentioned_only { color: #8b4d00; background: #fff1d6; }

.sd-blueprint { display: grid; gap: 9px; margin: 0; padding: 0; list-style: none; counter-reset: sd-blueprint; }
.sd-blueprint-item { position: relative; display: grid; grid-template-columns: 35px 1fr; gap: 11px; min-width: 0; padding: 13px; border: 1px solid var(--sd-line); border-radius: 11px; counter-increment: sd-blueprint; }
.sd-blueprint-item::before { content: counter(sd-blueprint); display: grid; width: 31px; height: 31px; place-items: center; border-radius: 9px; color: var(--sd-blue); background: #edf1ff; font-size: 11px; font-weight: 900; }
.sd-blueprint-item strong { display: block; font-size: 13px; }
.sd-blueprint-item p { margin: 4px 0 0; color: var(--sd-muted); font-size: 11px; line-height: 1.5; }
.sd-blueprint-details { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; margin-top: 9px; }
.sd-blueprint-details div { padding: 8px; border-radius: 7px; background: var(--sd-soft); }
.sd-blueprint-details span, .sd-blueprint-details b { display: block; }
.sd-blueprint-details span { margin-bottom: 3px; color: var(--sd-muted); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.sd-blueprint-details b { font-size: 10px; font-weight: 650; line-height: 1.4; }

.sd-draft-summary { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin-bottom: 12px; }
.sd-draft-summary div { padding: 12px; border-radius: 9px; background: var(--sd-soft); }
.sd-draft-summary span, .sd-draft-summary strong { display: block; }
.sd-draft-summary span { color: var(--sd-muted); font-size: 10px; }
.sd-draft-summary strong { margin-top: 3px; font-size: 17px; }
.sd-draft-findings { display: grid; gap: 8px; }
.sd-finding { padding: 11px 12px; border: 1px solid var(--sd-line); border-radius: 9px; }
.sd-finding strong { font-size: 12px; }
.sd-finding p { margin: 4px 0 0; color: var(--sd-muted); font-size: 11px; line-height: 1.45; }

.sd-graph { display: grid; gap: 8px; }
.sd-relation { position: relative; display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); gap: 7px; align-items: center; padding: 11px; border-radius: 10px; background: var(--sd-soft); }
.sd-relation-node { min-width: 0; color: #344054; font-size: 11px; font-weight: 750; line-height: 1.35; overflow-wrap: anywhere; }
.sd-relation-arrow { display: flex; flex-direction: column; align-items: center; color: var(--sd-blue); font-size: 14px; }
.sd-relation-arrow small { max-width: 110px; color: var(--sd-muted); font-size: 8px; font-weight: 700; line-height: 1.2; text-align: center; }
.sd-relation-meta { grid-column: 1 / -1; display: flex; gap: 5px; flex-wrap: wrap; margin-top: 2px; }

.sd-simple-list, .sd-check-list { display: grid; gap: 8px; margin: 0; padding: 0; list-style: none; }
.sd-simple-list li, .sd-check-list li { position: relative; padding: 9px 10px 9px 31px; border-radius: 9px; color: #475467; background: var(--sd-soft); font-size: 11px; line-height: 1.45; }
.sd-simple-list li::before { content: "?"; position: absolute; left: 10px; top: 9px; color: var(--sd-amber); font-weight: 900; }
.sd-simple-list li small, .sd-check-list li small { display: block; margin-top: 4px; color: var(--sd-muted); font-size: 9px; line-height: 1.45; }
.sd-check-list { counter-reset: sd-check; }
.sd-check-list li { counter-increment: sd-check; }
.sd-check-list li::before { content: counter(sd-check); position: absolute; left: 9px; top: 8px; display: grid; width: 16px; height: 16px; place-items: center; border-radius: 5px; color: var(--sd-blue); background: #e3e9ff; font-size: 8px; font-weight: 900; }
.sd-tag-list { display: flex; flex-wrap: wrap; gap: 6px; }
.sd-tag-list span { padding: 6px 9px; border-radius: 7px; color: #5d4632; background: #fff3e5; font-size: 10px; line-height: 1.35; }
.sd-provenance { display: grid; gap: 7px; }
.sd-source { padding: 10px; border: 1px solid var(--sd-line); border-radius: 9px; }
.sd-source strong, .sd-source span { display: block; }
.sd-source strong { font-size: 11px; }
.sd-source span { margin-top: 3px; color: var(--sd-muted); font-size: 10px; line-height: 1.4; overflow-wrap: anywhere; }

.sd-next-step { display: grid; grid-template-columns: 1fr auto; gap: 18px 30px; align-items: center; margin-top: 20px; padding: 23px; border: 1px solid #cfd9fb; border-radius: 16px; background: linear-gradient(135deg, #f7f9ff, #fff); }
.sd-next-step h3 { margin: 5px 0 6px; font-size: 20px; }
.sd-next-step p { margin: 0; color: var(--sd-muted); font-size: 12px; line-height: 1.5; }
.sd-next-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.sd-next-button { min-height: 42px; }
.sd-next-note { grid-column: 1 / -1; min-height: 18px; color: var(--sd-teal) !important; text-align: right; }

.sd-explainer { margin-top: 28px; padding: 24px; }
.sd-explainer-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.sd-explainer-grid article { padding: 15px; border-radius: 11px; background: var(--sd-soft); }
.sd-explainer-grid strong { display: block; font-size: 13px; }
.sd-explainer-grid p { margin: 6px 0 0; color: var(--sd-muted); font-size: 11px; line-height: 1.5; }

@media (max-width: 980px) {
  .sd-main-input-grid { grid-template-columns: 1fr; }
  .sd-audit-actions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-result-layout { grid-template-columns: 1fr; }
  .sd-result-aside { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-scorecard { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-form-grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .sd-form-grid-3 .sd-span-2 { grid-column: span 1; }
}

@media (max-width: 720px) {
  .sd-shell { padding: 24px 14px 60px; }
  .sd-principles, .sd-explainer-grid { grid-template-columns: 1fr; }
  .sd-form-panel, .sd-result-card, .sd-explainer { padding: 17px; }
  .sd-main-input { padding-top: 22px; }
  .sd-advanced-body { padding-right: 13px; padding-left: 13px; }
  .sd-form-grid, .sd-form-grid-3 { grid-template-columns: 1fr; }
  .sd-span-2 { grid-column: span 1; }
  .sd-section-head, .sd-section-title, .sd-result-head, .sd-submit-row { flex-direction: column; }
  .sd-mode-explainer, .sd-audit-head, .sd-audit-block-head { align-items: flex-start; flex-direction: column; }
  .sd-audit { padding: 17px; }
  .sd-audit-alignment { justify-content: flex-start; }
  .sd-audit-block-head p { text-align: left; }
  .sd-audit-top-gaps, .sd-audit-actions { grid-template-columns: 1fr; }
  .sd-audit-table-wrap { overflow: visible; border: 0; }
  .sd-audit-table { display: block; min-width: 0; }
  .sd-audit-table thead { display: none; }
  .sd-audit-table tbody, .sd-audit-table tr, .sd-audit-table td { display: block; width: 100%; }
  .sd-audit-table tr { margin-bottom: 10px; overflow: hidden; border: 1px solid var(--sd-line); border-radius: 11px; }
  .sd-audit-table td { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 9px; padding: 10px 11px; border-top: 1px solid var(--sd-line); }
  .sd-audit-table td:first-child { border-top: 0; }
  .sd-audit-table td::before { content: attr(data-label); color: #7b8495; font-size: 8px; font-weight: 850; letter-spacing: .04em; text-transform: uppercase; }
  .sd-audit-table td > * { grid-column: 2; }
  .sd-audit-table td::before { grid-column: 1; grid-row: 1 / span 3; }
  .sd-audit-table .sd-audit-table-empty { display: block; }
  .sd-audit-table .sd-audit-table-empty::before { content: none; }
  .sd-submit-row { align-items: stretch; }
  .sd-submit-note { max-width: none; text-align: left; }
  .sd-primary { width: 100%; }
  .sd-progress { grid-template-columns: auto 1fr; }
  .sd-progress-meter { grid-column: 1 / -1; }
  .sd-requirements { grid-template-columns: 1fr; }
  .sd-next-step { grid-template-columns: 1fr; }
  .sd-next-actions { justify-content: stretch; }
  .sd-next-actions .sd-primary, .sd-next-actions .sd-secondary { width: 100%; }
  .sd-next-note { grid-column: 1; text-align: left; }
}

@media (max-width: 520px) {
  .sd-hero h1 { font-size: 34px; }
  .sd-scorecard, .sd-contract, .sd-result-aside, .sd-blueprint-details, .sd-draft-summary { grid-template-columns: 1fr; }
  .sd-result-head-actions { width: 100%; }
  .sd-result-head-actions .sd-secondary { flex: 1; }
  .sd-audit-table td { grid-template-columns: 88px minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .sd-shell *, .sd-shell *::before, .sd-shell *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
