:root {
  color-scheme: light;
  --ink: #17212b;
  --muted: #647180;
  --line: #dfe5eb;
  --surface: #ffffff;
  --surface-soft: #f5f7f9;
  --surface-blue: #eef6fb;
  --blue: #1261a0;
  --blue-dark: #0c3f6a;
  --green: #28734b;
  --green-soft: #eaf6ee;
  --amber: #915b00;
  --amber-soft: #fff5df;
  --red: #a33b34;
  --red-soft: #fff0ee;
  --shadow: 0 16px 42px rgba(15, 46, 75, 0.08);
  font-family: "Segoe UI", "Hiragino Sans", "Yu Gothic UI", sans-serif;
  font-size: 16px;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: #edf1f4; color: var(--ink); line-height: 1.55; }
button, select, textarea { font: inherit; }
button, select { min-height: 44px; }
button { cursor: pointer; }
a { color: var(--blue); }

.app-shell { min-height: 100vh; }
.topbar { align-items: center; background: var(--surface); border-bottom: 1px solid var(--line); display: flex; gap: 24px; justify-content: space-between; padding: 22px clamp(20px, 4vw, 56px); }
.topbar h1 { font-size: clamp(1.2rem, 2vw, 1.65rem); letter-spacing: -0.02em; margin: 2px 0 0; }
.topbar-actions { align-items: center; display: flex; flex-wrap: wrap; gap: 14px; justify-content: flex-end; }
.eyebrow, .section-kicker { color: var(--muted); font-size: 1rem; font-weight: 700; letter-spacing: 0.14em; margin: 0; text-transform: uppercase; }
.release-label { color: var(--blue-dark); letter-spacing: 0.08em; }
.platform-badge { align-items: center; background: var(--amber-soft); border: 1px solid #e7c777; border-radius: 999px; color: var(--amber); display: inline-flex; font-size: 1rem; font-weight: 700; gap: 5px; padding: 7px 11px; }
.platform-badge code { font-family: inherit; font-size: 1rem; }
.platform-badge-ready { background: var(--green-soft); border-color: #b8ddc5; color: var(--green); }
.platform-badge-failed { border-style: dashed; }
.badge-mark { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; font-size: 1rem; height: 1.15rem; justify-content: center; line-height: 1; width: 1.15rem; }
.language-control select, .composer-controls select { background: var(--surface); border: 1px solid #b9c5d0; border-radius: 9px; color: var(--ink); padding: 8px 34px 8px 10px; }
.notice { display: none; margin: 16px auto 0; max-width: 1440px; padding: 0 20px; }
.notice.visible { display: block; }
.notice-inner { align-items: center; background: var(--amber-soft); border: 1px solid #e7c777; border-radius: 10px; color: #5f430e; display: flex; flex-wrap: wrap; gap: 8px; padding: 11px 14px; }
.notice-symbol { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; flex: 0 0 auto; font-weight: 900; height: 1.25rem; justify-content: center; line-height: 1; width: 1.25rem; }
.notice-label { font-size: 1rem; font-weight: 800; letter-spacing: 0.04em; }
.notice-error .notice-inner { background: var(--red-soft); border-color: #eab9b3; color: var(--red); }
.notice-success .notice-inner { background: var(--green-soft); border-color: #b8ddc5; color: var(--green); }
.notice-info .notice-inner { background: var(--surface-blue); border-color: #cbe0ee; color: var(--blue-dark); }

.layout { display: grid; gap: 0; grid-template-columns: minmax(220px, 285px) minmax(0, 1fr); margin: 24px auto; max-width: 1440px; padding: 0 20px; }
.sidebar { background: var(--surface); border: 1px solid var(--line); border-radius: 14px 0 0 14px; min-height: calc(100vh - 150px); min-width: 0; padding: 20px; }
.sidebar-header, .card-heading-row, .form-footer { align-items: center; display: flex; gap: 12px; justify-content: space-between; }
.sidebar h2, .card-heading-row h2 { font-size: 1.05rem; margin: 4px 0 0; }
.sidebar-note, .small-note { color: var(--muted); font-size: 1rem; }
.sidebar-note { margin: 14px 0 16px; }
.icon-button { align-items: center; background: var(--blue); border: 0; border-radius: 9px; color: #fff; display: inline-flex; font-size: 1.5rem; height: 44px; justify-content: center; width: 44px; }
.icon-button:focus-visible, button:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid #8bc9f2; outline-offset: 2px; }
.chat-list { list-style: none; margin: 0; padding: 0; }
.chat-list button { background: transparent; border: 1px solid transparent; border-radius: 9px; color: var(--ink); display: block; padding: 12px; text-align: left; width: 100%; }
.chat-list button:hover { background: var(--surface-soft); }
.chat-list button.active { background: var(--surface-blue); border-color: #7caecb; border-left-width: 5px; box-shadow: inset 0 0 0 1px #b7d7eb; }
.chat-title { display: block; font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.selection-status { color: var(--blue-dark); display: block; font-size: 1rem; font-weight: 800; margin-top: 3px; }
.chat-time { color: var(--muted); display: block; font-size: 1rem; margin-top: 3px; }

.main-panel { background: #f8fafb; border: 1px solid var(--line); border-left: 0; border-radius: 0 14px 14px 0; min-width: 0; padding: clamp(18px, 3vw, 36px); }
.company-card, .location-card, .composer-card, .boundary-note, .beta-boundary { background: var(--surface); border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 4px 18px rgba(15, 46, 75, 0.03); }
.company-card { padding: 18px; }
.company-copy { min-width: 0; }
.company-copy h2 { font-size: 1.18rem; margin: 0 0 3px; }
.company-copy p { color: var(--muted); margin: 0; }
.state-pill { align-items: center; border: 1px solid transparent; border-radius: 999px; display: inline-flex; font-size: 1rem; font-weight: 800; gap: 5px; letter-spacing: 0.04em; padding: 4px 9px; }
.state-symbol { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; flex: 0 0 auto; font-size: 1rem; height: 1.05rem; justify-content: center; line-height: 1; width: 1.05rem; }
.state-observed { background: var(--green-soft); border-color: #b8ddc5; color: var(--green); }
.state-hold { background: var(--red-soft); border-color: #eab9b3; color: var(--red); }
.state-present { background: var(--green-soft); border-color: #b8ddc5; color: var(--green); }
.state-neutral { background: var(--surface-soft); border-color: var(--line); color: var(--muted); }
.state-candidate { background: var(--amber-soft); border-color: #e7c777; color: var(--amber); }
.state-hold { border-style: dashed; }
.state-review { background: var(--amber-soft); border-color: #e7c777; border-style: dashed; color: var(--amber); }
.state-candidate { border-style: dotted; }
.state-neutral { border-style: double; }
.state-present, .state-observed { border-style: solid; }
.display-legend { align-items: center; background: #f8fafb; border: 1px solid var(--line); border-radius: 10px; display: flex; flex-wrap: wrap; gap: 9px 14px; margin-top: 14px; padding: 11px 14px; }
.display-legend h2 { font-size: 1rem; margin: 0 8px 0 0; }
.display-legend > span:not(.legend-note) { align-items: center; display: inline-flex; font-size: 1rem; font-weight: 700; gap: 5px; }
.legend-symbol { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; font-weight: 900; height: 1.2rem; justify-content: center; line-height: 1; width: 1.2rem; }
.legend-present { color: var(--green); }
.legend-hold { border-style: dashed; color: var(--red); }
.legend-candidate { border-style: dotted; color: var(--amber); }
.legend-neutral { border-style: double; color: var(--muted); }
.legend-note { color: var(--muted); font-size: 1rem; }
.beta-boundary { align-items: baseline; background: var(--amber-soft); border-color: #e7c777; display: flex; gap: 10px; margin-top: 14px; padding: 11px 16px; }
.beta-boundary strong { color: #694300; white-space: nowrap; }
.beta-boundary span { color: #5f4a22; }
.boundary-note { background: #f3f8fc; border-color: #cbe0ee; display: grid; gap: 8px; grid-template-columns: minmax(5rem, auto) minmax(0, 1fr); margin-top: 14px; padding: 13px 16px; }
.boundary-note > strong { color: var(--blue-dark); }
.scope-list { display: grid; gap: 5px; margin: 0; }
.scope-list > div { display: grid; gap: 8px; grid-template-columns: 4.5rem minmax(0, 1fr); }
.scope-list dt { color: var(--blue-dark); font-weight: 800; }
.scope-list dd { color: #40566a; margin: 0; }

.location-card, .composer-card { margin-top: 16px; padding: 18px; }
.mode-bar { align-items: center; background: #fffdf6; border: 1px solid #dacfb9; border-left: 6px solid #0b5f55; border-radius: 12px; display: flex; gap: 18px; justify-content: space-between; margin-top: 16px; padding: 16px 18px; }
.mode-bar h2 { font-size: 1.15rem; margin: 2px 0 5px; }
.mode-bar p { margin: 0; }
.mode-switch { display: flex; flex-wrap: wrap; gap: 7px; }
.mode-button { background: #fff; border: 1px solid #77958e; border-radius: 999px; color: #17443e; font-weight: 800; min-height: 42px; padding: 8px 14px; }
.mode-button.active { background: #0b5f55; border-color: #0b5f55; color: #fff; }
.kyk-suggestion { align-items: center; background: var(--amber-soft); border: 2px solid #b27500; border-radius: 12px; display: flex; gap: 18px; justify-content: space-between; margin-top: 16px; padding: 16px 18px; }
.kyk-suggestion.hidden { display: none; }
.kyk-suggestion h2 { color: #694300; font-size: 1.15rem; margin: 2px 0 6px; }
.kyk-suggestion p { margin: 0; }
.kyk-suggestion-actions { display: flex; flex: 0 0 auto; flex-wrap: wrap; gap: 8px; }
.kyk-suggestion-actions .quiet-button { background: #fff; border-color: #9b7a39; color: #5f4a22; }
.location-card p { color: var(--muted); margin: 11px 0; }
.location-actions { display: flex; flex-wrap: wrap; gap: 9px; }
.secondary-button, .quiet-button, .primary-button { border-radius: 9px; font-weight: 700; padding: 9px 14px; }
.secondary-button { background: var(--surface); border: 1px solid #9ab6c9; color: var(--blue-dark); }
.quiet-button { background: transparent; border: 1px solid transparent; color: var(--muted); }
.primary-button { background: var(--blue); border: 1px solid var(--blue); color: #fff; min-width: 110px; }
.primary-button:disabled { cursor: wait; opacity: 0.6; }

.messages { display: flex; flex-direction: column; gap: 14px; margin: 22px 0; min-height: 140px; }
.empty-state { border: 1px dashed #b9c9d6; border-radius: 12px; color: var(--muted); padding: 28px; text-align: center; }
.message { border-radius: 13px; max-width: 94%; padding: 15px 17px; }
.message.user { align-self: flex-end; background: var(--blue-dark); color: #fff; }
.message.assistant { align-self: flex-start; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow); width: min(100%, 960px); }
.message-meta { align-items: center; color: var(--muted); display: flex; font-size: 1rem; gap: 9px; margin-bottom: 7px; }
.message.user .message-meta { color: #d7e7f2; }
.message-body { white-space: normal; }
.message, .message-body, .message-body dl, .message-body dd, .message-body code {
  min-width: 0;
  overflow-wrap: anywhere;
  word-break: break-word;
}
.message-body p { margin: 0 0 9px; }
.message-body p:last-child { margin-bottom: 0; }
.result-toolbar { align-items: center; border-bottom: 1px solid var(--line); display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 13px; padding-bottom: 10px; }
.toolbar-label { color: var(--muted); font-size: 1rem; font-weight: 800; }
.result-section { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 13px; }
.result-section h3 { font-size: 1rem; margin: 0 0 8px; }
.section-marker { align-items: center; border: 1px solid currentColor; border-radius: 50%; color: var(--amber); display: inline-flex; font-size: 1rem; height: 1.15rem; justify-content: center; width: 1.15rem; }
.module-list, .hold-list, .candidate-list { display: grid; gap: 9px; margin: 0; padding: 0; }
.module-card, .hold-card, .candidate-card { border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; }
.module-card { background: #fbfcfd; }
.module-state-hold { border-left: 5px dashed var(--red); }
.module-state-present { border-left: 5px solid var(--green); }
.module-top { align-items: flex-start; display: flex; gap: 10px; justify-content: space-between; }
.module-name { font-weight: 800; }
.module-detail { border-top: 1px solid #e9eef2; margin-top: 8px; padding-top: 7px; }
.module-detail p, .hold-card p, .candidate-card p { color: var(--muted); font-size: 1rem; margin: 3px 0 0; }
.detail-label { color: var(--blue-dark); display: block; font-size: 1rem; font-weight: 800; }
.detail-label > span, .candidate-card b > span { align-items: center; border: 1px solid currentColor; border-radius: 50%; display: inline-flex; font-size: 1rem; height: 1rem; justify-content: center; line-height: 1; width: 1rem; }
.risk-detail { border-top-style: dashed; }
.risk-detail .detail-label { color: var(--red); }
.hold-card { background: var(--red-soft); border-color: #eab9b3; border-style: dashed; }
.hold-card strong { color: var(--red); }
.hold-card-heading, .candidate-card-heading { align-items: center; display: flex; flex-wrap: wrap; gap: 8px; }
.candidate-card { background: var(--amber-soft); border-color: #e7c777; border-style: dotted; }
.question-list { margin: 0; padding-left: 1.3rem; }
.question-list li + li { margin-top: 4px; }
.reference-search { background: #f7fbfe; border: 1px solid #cbe0ee; border-radius: 11px; padding: 13px; }
.reference-search-heading { align-items: flex-start; display: flex; flex-wrap: wrap; gap: 9px; justify-content: space-between; }
.reference-search-heading h3 { margin: 0; }
.reference-search-summary, .reference-profile dl, .reference-material dl { display: grid; gap: 7px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 11px 0; }
.reference-search-summary > div, .reference-profile dl > div, .reference-material dl > div { background: var(--surface); border: 1px solid var(--line); border-radius: 8px; min-width: 0; padding: 8px 10px; }
.reference-search dt, .reference-profile dt, .reference-material dt { color: var(--blue-dark); font-size: 1rem; font-weight: 800; }
.reference-search dd, .reference-profile dd, .reference-material dd { color: var(--muted); margin: 1px 0 0; overflow-wrap: anywhere; }
.reference-profile { background: var(--surface-blue); border: 1px solid #cbe0ee; border-radius: 9px; margin: 11px 0; padding: 11px; }
.reference-profile h4, .reference-material h4 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.reference-material-list { display: grid; gap: 9px; }
.reference-material { background: var(--surface); border: 1px solid var(--line); border-left: 5px solid var(--blue); border-radius: 9px; min-width: 0; padding: 11px; }
.reference-material p { color: var(--muted); font-size: 1rem; margin: 7px 0 0; max-height: 8.5rem; overflow: auto; white-space: normal; }
.reference-invariants { border-top: 1px dotted #9cb9ca; margin-top: 11px; padding-top: 8px; }
.reference-invariants summary { color: var(--blue-dark); cursor: pointer; font-weight: 800; }
.reference-invariants ul { margin-bottom: 0; }

.major-risk-package { background: linear-gradient(180deg, #fff 0%, #f8fbfd 100%); border: 1px solid #b9cfdd; border-radius: 12px; padding: 15px; }
.major-risk-heading { align-items: flex-start; display: flex; gap: 12px; justify-content: space-between; }
.major-risk-heading h3 { color: var(--blue-dark); font-size: 1.24rem; margin-top: 2px; }
.major-risk-list { display: grid; gap: 11px; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 13px; }
.major-risk-card { background: var(--surface); border: 1px solid #c9d6df; border-left: 6px solid var(--red); border-radius: 10px; min-width: 0; padding: 13px; }
.major-risk-card header { align-items: flex-start; display: flex; gap: 9px; }
.major-risk-card header .state-pill { margin-left: auto; }
.major-risk-card h4 { font-size: 1.08rem; line-height: 1.35; margin: 1px 0 0; }
.risk-rank { align-items: center; background: var(--red); border-radius: 50%; color: #fff; display: inline-flex; flex: 0 0 auto; font-size: 1.05rem; font-weight: 900; height: 2rem; justify-content: center; width: 2rem; }
.risk-kicker { color: var(--red); font-size: .78rem; font-weight: 800; letter-spacing: .08em; margin: 0; text-transform: uppercase; }
.risk-mechanism { border-top: 1px solid var(--line); margin-top: 10px; padding-top: 9px; }
.risk-axis-tags { display: flex; flex-wrap: wrap; gap: 5px; margin: 10px 0; }
.risk-axis-tags span { background: var(--surface-blue); border: 1px solid #cbe0ee; border-radius: 999px; color: var(--blue-dark); font-size: .82rem; font-weight: 700; padding: 3px 7px; }
.risk-outline-grid { display: grid; gap: 9px; grid-template-columns: 1fr; }
.risk-outline-grid > div { background: var(--surface-soft); border-radius: 8px; padding: 9px; }
.risk-outline-grid h5 { font-size: .92rem; margin: 0 0 4px; }
.risk-outline-grid ul { margin: 0; padding-left: 1.2rem; }
.evidence-exists { color: var(--blue-dark); font-size: .88rem; font-weight: 700; margin: 10px 0 0; }
.preserved-unknowns { border-top: 2px dashed #dda9a4; margin-top: 11px; padding-top: 11px; }
.preserved-unknowns h4 { color: var(--red); margin: 0 0 4px; }
.major-unknown-list { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; }
.major-unknown-list > li { background: var(--red-soft); border: 1px dashed #e2aaa4; border-radius: 8px; list-style-position: inside; padding: 9px 10px; }
.major-unknown-list > li > div:first-child { align-items: flex-start; display: flex; gap: 8px; }
.major-unknown-list p, .major-unknown-list ul { margin: 5px 0 0; }
.evidence-presence { align-items: flex-start; background: var(--green-soft); border: 1px solid #b8ddc5; border-radius: 9px; color: #1e5739; display: flex; gap: 10px; margin: 11px 0; padding: 10px 12px; }
.evidence-presence > span { font-size: 1.2rem; }
.evidence-presence p { margin: 2px 0 0; }
.evidence-disclosure { border-top: 1px dashed #8ab3cc; margin-top: 12px; padding-top: 12px; }
.evidence-disclosure h4 { color: var(--blue-dark); margin: 0 0 6px; }
.reference-operations { border-top: 1px dotted #9cb9ca; margin-top: 11px; padding-top: 9px; }
.supplementary-records { background: var(--surface-soft); border: 1px solid var(--line); }
.supplementary-records > summary { color: var(--blue-dark); cursor: pointer; font-size: 1rem; font-weight: 800; }
.supplementary-records[open] > summary { border-bottom: 1px solid var(--line); margin-bottom: 10px; padding-bottom: 10px; }
.supplementary-block + .supplementary-block { border-top: 1px dashed #b7c5cf; margin-top: 13px; padding-top: 13px; }
.reference-material h5 { font-size: 1rem; margin: 0; overflow-wrap: anywhere; }
.markdown-body h3, .markdown-body h4, .markdown-body h5, .markdown-body h6 { color: var(--blue-dark); margin: 14px 0 6px; }
.markdown-body ul, .markdown-body ol { margin: 7px 0; padding-left: 1.35rem; }
.markdown-body blockquote { border-left: 4px solid #9cb9ca; color: var(--muted); margin: 9px 0; padding: 4px 0 4px 11px; }
.markdown-body code { background: #edf1f4; border-radius: 4px; padding: 1px 4px; }
.markdown-table-wrap { margin: 10px 0; max-width: 100%; overflow-x: auto; }
.markdown-table-wrap table { border-collapse: collapse; min-width: 100%; }
.markdown-table-wrap th, .markdown-table-wrap td { border: 1px solid #c9d6df; padding: 8px 9px; text-align: left; vertical-align: top; }
.markdown-table-wrap th { background: var(--surface-blue); color: var(--blue-dark); }
.preserved-safety-ledger > summary, .response-boundary > summary { color: var(--blue-dark); cursor: pointer; font-weight: 800; }
.preserved-safety-ledger > .result-section { margin-left: 4px; }

.composer-controls { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 14px 0; }
.composer-controls label { color: var(--muted); display: grid; font-size: 1rem; gap: 5px; min-width: 0; }
.composer-controls select { min-width: 0; width: 100%; }
.composer-controls .control-inactive { opacity: 0.72; }
.composer-controls select:disabled { background: var(--surface-soft); cursor: not-allowed; }
.kyk-family-list { display: grid; gap: 10px; margin-top: 11px; }
.kyk-family { background: var(--surface-soft); border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
.kyk-family > summary { align-items: center; cursor: pointer; display: flex; flex-wrap: wrap; gap: 8px 12px; list-style-position: inside; padding: 12px; }
.kyk-family[open] > summary { border-bottom: 1px solid var(--line); }
.family-name { color: var(--blue-dark); font-weight: 800; }
.family-count { color: var(--muted); font-size: 1rem; margin-left: auto; }
.kyk-family > .module-list { background: var(--surface); padding: 10px; }
.risk-vector { background: #f3f8fc; border: 1px solid #cbe0ee; border-radius: 8px; display: grid; gap: 5px; grid-template-columns: repeat(2, minmax(0, 1fr)); margin: 9px 0 0; padding: 9px; }
.risk-vector > div { min-width: 0; }
.risk-vector dt { color: var(--blue-dark); font-size: 1rem; font-weight: 800; }
.risk-vector dd { color: var(--muted); font-size: 1rem; margin: 1px 0 0; overflow-wrap: anywhere; }
.module-evidence { border-top: 1px dotted #c4cfd8; margin-top: 9px; padding-top: 8px; }
.module-evidence summary { color: var(--blue-dark); cursor: pointer; font-size: 1rem; font-weight: 800; }
.module-evidence h5 { font-size: 1rem; margin: 10px 0 3px; }
.module-evidence ul { color: var(--muted); font-size: 1rem; margin: 3px 0 0; padding-left: 1.25rem; }
.message-form textarea { border: 1px solid #adbdc9; border-radius: 10px; display: block; min-height: 108px; padding: 12px; resize: vertical; width: 100%; }
.form-footer { align-items: flex-end; margin-top: 10px; }
.form-footer .small-note { max-width: 70%; }
.sr-only { clip: rect(0, 0, 0, 0); clip-path: inset(50%); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; }

@media (max-width: 820px) {
  .topbar { align-items: flex-start; flex-direction: column; }
  .topbar-actions { justify-content: flex-start; }
  .layout { grid-template-columns: minmax(0, 1fr); padding: 0 12px; }
  .sidebar { border-radius: 14px 14px 0 0; min-height: auto; }
  .main-panel { border-left: 1px solid var(--line); border-radius: 0 0 14px 14px; }
  .chat-list { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 3px; }
  .chat-list li { flex: 0 0 min(240px, 75vw); }
  .major-risk-list { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .topbar { padding: 18px 16px; }
  .chat-list { display: grid; grid-template-columns: minmax(0, 1fr); overflow-x: visible; width: 100%; }
  .chat-list li { flex: none; min-width: 0; width: 100%; }
  .chat-list button, .chat-title { min-width: 0; max-width: 100%; }
  .major-input-overlay { background: #fff8e7; border: 2px solid #b27500; border-radius: 10px; margin: 12px 0; padding: 12px; }
  .candidate-card-major { overflow-wrap: anywhere; }

  .main-panel { padding: 14px; }
  .composer-controls { grid-template-columns: 1fr; }
  .form-footer { align-items: stretch; flex-direction: column; }
  .form-footer .small-note { max-width: none; }
  .primary-button { width: 100%; }
  .beta-boundary { align-items: flex-start; flex-direction: column; gap: 4px; }
  .boundary-note { grid-template-columns: 1fr; }
  .scope-list > div { gap: 2px; grid-template-columns: 1fr; }
  .risk-vector { grid-template-columns: 1fr; }
  .reference-search-summary, .reference-profile dl, .reference-material dl { grid-template-columns: 1fr; }
  .mode-bar { align-items: stretch; flex-direction: column; }
  .mode-switch { display: grid; grid-template-columns: 1fr; }
  .kyk-suggestion { align-items: stretch; flex-direction: column; }
  .kyk-suggestion-actions { display: grid; grid-template-columns: 1fr; }
  .major-risk-heading { flex-direction: column; }
}
