:root {
  color-scheme: light;
  --bg: #f6f7f5;
  --surface: #ffffff;
  --surface-soft: #f9faf8;
  --ink: #171b1f;
  --muted: #65716c;
  --line: #dfe5e1;
  --green: #08745b;
  --green-soft: #e7f4ef;
  --blue: #315f91;
  --blue-soft: #e9f1f8;
  --coral: #b85d4d;
  --coral-soft: #faece9;
  --warm: #f2ebe0;
  --shadow: 0 14px 38px rgba(22, 29, 25, 0.08);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: #ffffff;
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
textarea,
input {
  font: inherit;
}

button {
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.42;
}

h1,
h2,
h3,
h4,
p {
  margin-top: 0;
  word-break: keep-all;
  overflow-wrap: break-word;
}

li,
button,
span,
strong,
small {
  word-break: keep-all;
  overflow-wrap: break-word;
}

.shell {
  width: min(1040px, calc(100% - 32px));
  margin: 0 auto;
}

.intake {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  padding: 24px 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 850;
}

.brand-mark {
  width: 32px;
  height: 32px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--green);
  background: var(--surface);
}

.brand svg,
button svg,
.section-title svg,
.notice svg,
.privacy-alert svg {
  width: 18px;
  height: 18px;
  stroke-width: 2;
}

.chat-home {
  width: min(760px, 100%);
  flex: 1;
  display: grid;
  align-content: center;
  gap: 20px;
  margin: 0 auto;
  padding: 0 0 8vh;
}

.eyebrow {
  margin-bottom: 10px;
  color: var(--green);
  font-size: 13px;
  font-weight: 900;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: 34px;
  line-height: 1.18;
  letter-spacing: 0;
  font-weight: 780;
}

.intro p:not(.eyebrow),
.result-header p:not(.eyebrow) {
  max-width: 720px;
  color: var(--muted);
  font-size: 16px;
  line-height: 1.7;
}

.composer,
.result-section,
.notice {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.composer {
  margin-top: 0;
  overflow: hidden;
  border-color: #d9dedb;
  box-shadow: var(--shadow);
}

.use-cases {
  display: grid;
  gap: 12px;
  margin-top: 4px;
}

.use-cases h2 {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  color: #38413d;
  font-size: 14px;
  font-weight: 900;
}

.use-cases h2::after {
  content: "";
  height: 1px;
  flex: 1;
  background: linear-gradient(90deg, rgba(8, 116, 91, 0.24), rgba(223, 229, 225, 0));
}

.use-case-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
}

.use-case-button {
  min-height: 124px;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr) auto;
  align-items: start;
  gap: 11px;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  text-align: left;
  color: #29302c;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 248, 0.96)),
    var(--surface);
  box-shadow: 0 8px 24px rgba(22, 29, 25, 0.045);
  line-height: 1.25;
  transition:
    border-color 160ms ease,
    background 160ms ease,
    box-shadow 160ms ease,
    transform 160ms ease;
}

.use-case-button:hover {
  border-color: rgba(8, 116, 91, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(231, 244, 239, 0.6)),
    var(--surface);
  box-shadow: 0 12px 28px rgba(22, 29, 25, 0.08);
  transform: translateY(-1px);
}

.use-case-icon {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(8, 116, 91, 0.2);
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  margin-top: 2px;
}

.use-case-copy {
  min-width: 0;
  display: grid;
  gap: 5px;
}

.use-case-copy strong {
  color: var(--ink);
  font-size: 13px;
  font-weight: 900;
  line-height: 1.3;
}

.use-case-copy small {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.38;
}

.use-case-copy em {
  display: block;
  margin-top: 2px;
  padding: 7px 8px;
  border-left: 2px solid rgba(8, 116, 91, 0.22);
  border-radius: 6px;
  color: #6d7772;
  background: rgba(246, 247, 245, 0.86);
  font-size: 12px;
  font-style: normal;
  line-height: 1.45;
}

.use-case-badge {
  min-width: 38px;
  min-height: 25px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 4px 7px;
  border-radius: 8px;
  color: var(--green);
  background: rgba(231, 244, 239, 0.86);
  font-size: 11px;
  font-weight: 900;
}

.use-case-badge.defense {
  color: var(--blue);
  background: rgba(233, 241, 248, 0.92);
}

.use-case-note {
  margin: -2px 0 0;
  color: #8a948f;
  font-size: 12px;
  line-height: 1.5;
}

.input-mascot {
  display: flex;
  justify-content: center;
  padding: 0;
}

.input-mascot img {
  width: 136px;
  height: 136px;
  display: block;
  object-fit: contain;
  object-position: center bottom;
  transform-origin: center bottom;
  image-rendering: pixelated;
  transition: opacity 120ms ease;
}

.input-mascot img.is-working {
  opacity: 0.99;
}

.role-options {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.role-options legend {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
}

.role-option {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  transition:
    border-color 160ms ease,
    background 160ms ease,
    transform 160ms ease;
}

.role-option.active {
  border-color: rgba(8, 116, 91, 0.42);
  background: var(--green-soft);
}

.role-option:hover {
  transform: translateY(-1px);
}

.role-option input {
  width: 16px;
  height: 16px;
  margin: 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.role-option strong {
  display: block;
  font-size: 13px;
}

.role-option small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.2;
}

textarea {
  width: 100%;
  min-height: 112px;
  max-height: 280px;
  resize: vertical;
  border: 0;
  outline: 0;
  padding: 18px 18px 10px;
  color: var(--ink);
  background: transparent;
  font-size: 16px;
  line-height: 1.55;
}

textarea::placeholder {
  color: #96a19b;
}

.privacy-alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 0 14px 10px;
  padding: 11px 12px;
  border: 1px solid rgba(184, 93, 77, 0.28);
  border-radius: 8px;
  color: #884032;
  background: var(--coral-soft);
  font-size: 13px;
  line-height: 1.45;
}

.privacy-alert span {
  flex: 1 1 260px;
}

.legal-consent,
.purchase-ack {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.consent-list {
  display: grid;
  gap: 8px;
  margin: 0 14px 10px;
}

.legal-consent {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.legal-consent input,
.purchase-ack input {
  width: 16px;
  height: 16px;
  margin: 2px 0 0;
  accent-color: var(--green);
  flex: 0 0 auto;
}

.legal-consent a,
.purchase-ack a,
.legal-links a,
.legal-doc a {
  color: var(--green);
  font-weight: 850;
  text-decoration: none;
}

.legal-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px 14px;
  color: var(--muted);
  font-size: 12px;
}

.composer-bar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  padding: 0 12px 12px;
}

.composer-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0;
  border-top: 0;
}

.composer-actions p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.primary-button,
.secondary-button,
.text-button,
.icon-button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  font-weight: 850;
}

.primary-button {
  border: 0;
  padding: 0 15px;
  color: white;
  background: var(--ink);
}

.send-button {
  width: 36px;
  min-width: 36px;
  height: 36px;
  min-height: 36px;
  padding: 0;
  border-radius: 50%;
}

.secondary-button,
.text-button,
.icon-button {
  border: 1px solid var(--line);
  color: var(--ink);
  background: var(--surface);
}

.secondary-button {
  padding: 0 14px;
}

.text-button {
  min-height: 34px;
  padding: 0 10px;
  color: #884032;
  font-size: 12px;
}

.icon-button {
  width: 42px;
  flex: 0 0 auto;
}

.loading {
  min-height: 100vh;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 10px;
  text-align: center;
}

.loading-mascot {
  width: 214px;
  height: 214px;
  display: grid;
  place-items: center;
  overflow: visible;
  contain: layout paint;
}

.loading-mascot img {
  width: 198px;
  height: 198px;
  display: block;
  object-fit: contain;
  object-position: center center;
  image-rendering: pixelated;
  transform-origin: center center;
  transition: opacity 160ms ease;
}

.loading-mascot img.pulse-a {
  opacity: 0.98;
}

.loading-mascot img.pulse-b {
  opacity: 1;
}

.loading-mascot img.pulse-c {
  opacity: 0.99;
}

.loading h2 {
  margin-bottom: 0;
  font-size: 38px;
  line-height: 1.12;
}

.loading p {
  margin: 0;
  color: var(--muted);
}

.loading-steps {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin-top: 2px;
}

.loading-steps span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #cbd5d0;
  transition:
    background 160ms ease,
    transform 160ms ease,
    width 160ms ease;
}

.loading-steps span.is-active {
  width: 18px;
  border-radius: 999px;
  background: var(--green);
  transform: translateY(-1px);
}

.loader {
  width: 42px;
  height: 42px;
  border: 4px solid var(--line);
  border-top-color: var(--green);
  border-radius: 50%;
  animation: spin 900ms linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

.results {
  padding: 24px 0 92px;
}

.results:has(#reviewPanel:not(.hidden)) {
  padding-bottom: 150px;
}

.result-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.result-header h2 {
  margin-bottom: 0;
  font-size: 38px;
  line-height: 1.08;
  letter-spacing: 0;
}

.action-row {
  display: flex;
  gap: 8px;
  flex: 0 0 auto;
}

.notice {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  color: var(--blue);
  background: var(--blue-soft);
}

.notice p {
  margin: 0;
  color: #284d75;
  font-size: 13px;
  line-height: 1.55;
}

.result-funnel {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 6px;
  margin-top: 10px;
  padding: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.result-funnel span {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 6px 8px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 880;
  text-align: center;
}

.result-funnel span.is-done {
  color: var(--green);
  background: var(--green-soft);
}

.result-funnel span.is-active {
  color: #ffffff;
  background: var(--ink);
}

.result-section {
  margin-top: 14px;
  padding: 18px;
}

.section-title {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  color: var(--green);
}

.section-title h3 {
  margin: 0;
  color: var(--ink);
  font-size: 18px;
}

.law-list {
  display: grid;
  gap: 10px;
}

.precedent-list {
  display: grid;
  gap: 10px;
}

.review-panel-head {
  display: flex;
  align-items: flex-start;
  margin-bottom: 18px;
}

.review-panel-head .section-title {
  margin-bottom: 6px;
}

.review-panel-head p {
  max-width: 520px;
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
}

.issue-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 10px;
}

.issue-card {
  min-height: 112px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.issue-card h4 {
  margin: 0 0 7px;
  font-size: 16px;
}

.issue-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.review-main {
  display: grid;
  gap: 20px;
}

.review-evidence-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  align-items: start;
}

.review-evidence-grid.has-precedents {
  grid-template-columns: minmax(0, 0.95fr) minmax(380px, 1.05fr);
}

.review-primary {
  min-width: 0;
  display: grid;
  gap: 16px;
}

.review-cta {
  position: fixed;
  right: 0;
  bottom: max(18px, env(safe-area-inset-bottom));
  left: 0;
  z-index: 40;
  display: flex;
  justify-content: center;
  padding: 0 16px;
  pointer-events: none;
}

.review-continue-button {
  width: min(520px, 100%);
  min-height: 58px;
  border-radius: 14px;
  color: #ffffff;
  background: var(--green);
  font-size: 16px;
  box-shadow: 0 18px 38px rgba(8, 116, 91, 0.24), 0 4px 12px rgba(8, 116, 91, 0.18);
  pointer-events: auto;
}

.review-subsection {
  min-width: 0;
}

.review-subsection .section-title {
  margin-bottom: 10px;
}

.law-card,
.precedent-card,
.draft-block {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface-soft);
}

.law-card,
.precedent-card {
  padding: 14px;
}

.precedent-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: start;
  gap: 12px;
}

.law-card h4,
.precedent-card h4 {
  margin: 0 0 7px;
  font-size: 16px;
}

.precedent-card h4 {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.law-card p,
.precedent-card p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.6;
}

.precedent-meta {
  margin-bottom: 5px !important;
  color: #6d7772 !important;
  font-size: 12px !important;
  font-weight: 780;
}

.precedent-summary {
  display: -webkit-box;
  overflow: hidden;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
}

.precedent-card a {
  min-height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border: 1px solid rgba(8, 116, 91, 0.22);
  border-radius: 8px;
  color: var(--green);
  background: var(--surface);
  font-size: 13px;
  font-weight: 850;
  text-decoration: none;
}

@media (min-width: 901px) {
  .review-evidence-grid.has-precedents .precedent-list {
    max-height: 560px;
    overflow: auto;
    padding-right: 4px;
  }
}

.precedent-card-muted {
  grid-template-columns: 1fr;
  background: #fbfcfb;
}

.precedent-card-muted h4 {
  color: #38413d;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 11px;
}

.tag-row span {
  min-height: 28px;
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 8px;
  color: var(--green);
  background: var(--green-soft);
  font-size: 12px;
  font-weight: 850;
}

.question-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}

.question-panel-head .section-title {
  margin-bottom: 0;
}

.question-panel-head p {
  max-width: 360px;
  margin: 1px 0 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.55;
  text-align: right;
}

.question-list {
  display: grid;
  gap: 10px;
}

.question-card {
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(231, 244, 239, 0.5), rgba(255, 255, 255, 0) 68%),
    var(--surface-soft);
}

.question-card.needs-answer {
  border-color: rgba(136, 64, 50, 0.36);
  background:
    linear-gradient(180deg, rgba(255, 245, 241, 0.72), rgba(255, 255, 255, 0) 70%),
    var(--surface-soft);
}

.question-head {
  display: flex;
  align-items: flex-start;
  gap: 11px;
}

.question-head > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--green);
  background: var(--green-soft);
  font-size: 13px;
  font-weight: 900;
}

.question-head p {
  margin: 0 0 3px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
}

.question-head h4 {
  margin: 0;
  font-size: 16px;
  line-height: 1.45;
}

.question-helper {
  margin: 8px 0 0 39px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.choice-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
  padding-left: 39px;
}

.choice-pill {
  min-height: 36px;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
  font-weight: 760;
}

.choice-pill input {
  width: 15px;
  height: 15px;
  margin: 0;
  accent-color: var(--green);
}

.choice-pill:has(input:checked) {
  border-color: rgba(8, 116, 91, 0.42);
  background: var(--green-soft);
}

.followup-other {
  min-height: 36px;
  min-width: min(210px, 100%);
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  background: var(--surface);
  color: var(--ink);
  font-size: 13px;
}

.conditional-detail {
  margin: 10px 0 0 39px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.conditional-detail label {
  display: block;
  margin-bottom: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 850;
}

.conditional-detail input {
  width: 100%;
  min-height: 40px;
  padding: 0 11px;
  border: 1px solid var(--line);
  border-radius: 8px;
  outline: 0;
  color: var(--ink);
  background: var(--surface-soft);
  font-size: 14px;
}

.followup-error {
  margin: 12px 0 -3px;
  color: #884032;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.5;
}

.question-textarea {
  min-height: 86px;
  margin-top: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  font-size: 14px;
}

.followup-form {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface);
}

.followup-form textarea {
  min-height: 96px;
  font-size: 15px;
}

.followup-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  padding: 12px;
  border-top: 1px solid var(--line);
  background: var(--surface-soft);
}

.draft {
  display: grid;
  gap: 10px;
}

.locked-result-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(320px, 390px);
  align-items: start;
  gap: 14px;
}

.locked-preview-wrap {
  min-width: 0;
}

.locked-preview-label {
  margin: 0 0 9px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.final-document {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
  box-shadow: 0 12px 32px rgba(22, 29, 25, 0.055);
}

.final-document-content {
  max-width: 760px;
  margin: 0 auto;
  color: var(--ink);
  font-size: 15px;
  line-height: 1.82;
  white-space: pre-wrap;
  word-break: keep-all;
  overflow-wrap: anywhere;
}

.locked-preview {
  position: relative;
  max-height: 430px;
  display: grid;
  gap: 10px;
  overflow: hidden;
  padding: 2px;
}

.locked-preview::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 128px;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0), var(--surface) 76%);
}

.preview-section {
  position: relative;
  min-height: 114px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #ffffff;
}

.preview-section h4 {
  position: relative;
  z-index: 3;
  margin: 0 0 12px;
  color: var(--green);
  font-size: 14px;
}

.preview-text-lines {
  position: relative;
  z-index: 0;
  display: grid;
  gap: 6px;
  padding-right: 8px;
  color: #20262a;
  filter: blur(1.45px);
  opacity: 0.68;
  user-select: none;
}

.preview-text-lines p {
  margin: 0;
  font-size: 13px;
  font-weight: 760;
  line-height: 1.5;
  white-space: nowrap;
}

.mosaic-lines {
  position: absolute;
  z-index: 2;
  inset: 48px 14px 14px;
  display: grid;
  align-content: start;
  gap: 10px;
  pointer-events: none;
}

.mosaic-line {
  width: var(--w, 64%);
  height: 16px;
  display: block;
  border-radius: 5px;
  opacity: 0.58;
  background: rgba(23, 27, 31, 0.28);
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.38) inset;
}

.preview-section:nth-child(even) .mosaic-line {
  background: rgba(8, 116, 91, 0.28);
}

.mosaic-veil {
  position: absolute;
  z-index: 1;
  inset: 38px 10px 10px;
  border-radius: 7px;
  border: 1px solid rgba(255, 255, 255, 0.58);
  background: rgba(255, 255, 255, 0.58);
  backdrop-filter: blur(2.4px);
  pointer-events: none;
}

.paywall-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 16px;
  padding: 18px;
  border: 1px solid rgba(49, 95, 145, 0.22);
  border-radius: 8px;
  background: linear-gradient(180deg, #ffffff, var(--blue-soft));
}

.locked-result-shell .paywall-card {
  position: sticky;
  top: 16px;
  grid-template-columns: auto 1fr;
  align-items: start;
}

.locked-result-shell .pay-button,
.locked-result-shell .payment-caption,
.locked-result-shell .purchase-ack {
  grid-column: 1 / -1;
}

.locked-result-shell .pay-button {
  width: 100%;
}

.locked-result-shell .payment-caption {
  margin: -4px 0 0;
}

.locked-result-shell .purchase-ack {
  padding: 12px;
  border: 1px solid rgba(49, 95, 145, 0.2);
  border-radius: 8px;
  background: #ffffff;
}

.paywall-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(49, 95, 145, 0.18);
  border-radius: 50%;
  color: var(--blue);
  background: var(--surface);
}

.paywall-icon svg {
  width: 21px;
  height: 21px;
}

.paywall-copy {
  min-width: 0;
}

.paywall-kicker {
  margin: 0 0 4px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 900;
}

.paywall-copy h4 {
  margin: 0 0 6px;
  color: var(--ink);
  font-size: 17px;
}

.paywall-copy p:not(.paywall-kicker) {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.55;
}

.paywall-copy strong {
  display: block;
  margin-top: 9px;
  color: var(--ink);
  font-size: 20px;
}

.pay-button {
  min-width: 178px;
}

.payment-caption {
  grid-column: 2 / -1;
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.payment-caption.error {
  color: #884032;
}

.legal-doc {
  width: min(820px, calc(100% - 32px));
  margin: 0 auto;
  padding: 48px 0 72px;
}

.legal-doc header {
  display: grid;
  gap: 10px;
  margin-bottom: 28px;
}

.legal-doc h1 {
  text-align: left;
  font-size: 32px;
}

.legal-doc h2 {
  margin: 32px 0 10px;
  font-size: 18px;
}

.legal-doc p,
.legal-doc li {
  color: #38413d;
  font-size: 15px;
  line-height: 1.75;
}

.legal-doc ul {
  margin: 0;
  padding-left: 20px;
}

.legal-doc .legal-note {
  padding: 14px;
  border: 1px solid rgba(184, 93, 77, 0.22);
  border-radius: 8px;
  background: var(--coral-soft);
  color: #884032;
}

.support-panel {
  margin-top: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.support-panel summary {
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: space-between;
  padding: 0 16px;
  list-style: none;
  cursor: pointer;
}

.support-panel summary::-webkit-details-marker {
  display: none;
}

.support-panel summary::after {
  content: "보기";
  min-width: 44px;
  color: var(--green);
  font-size: 12px;
  font-weight: 900;
  text-align: right;
}

.support-panel[open] summary {
  border-bottom: 1px solid var(--line);
}

.support-panel[open] summary::after {
  content: "접기";
}

.support-panel summary span {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
}

.support-panel summary small {
  margin-left: auto;
  color: var(--muted);
  font-size: 12px;
  font-weight: 760;
}

.support-content {
  display: grid;
  gap: 16px;
  padding: 16px;
}

.support-section {
  margin-top: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.draft-block {
  padding: 14px;
}

.draft-block h4 {
  margin: 0 0 9px;
  color: var(--green);
  font-size: 14px;
}

.draft-block p,
.draft-block li {
  color: var(--ink);
  line-height: 1.7;
}

.draft-block p {
  margin-bottom: 0;
}

.draft-block ul {
  margin: 0;
  padding-left: 18px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.hidden {
  display: none !important;
}

@media (max-width: 720px) {
  .shell {
    width: min(100% - 24px, 980px);
  }

  .intake {
    padding-top: 22px;
  }

  .chat-home {
    align-content: start;
    gap: 16px;
    padding: 56px 0 0;
  }

  .input-mascot img {
    width: 110px;
    height: 110px;
  }

  .loading-mascot {
    width: 168px;
    height: 168px;
  }

  .loading-mascot img {
    width: 156px;
    height: 156px;
  }

  h1 {
    font-size: 29px;
  }

  .composer-bar {
    align-items: stretch;
    flex-direction: column;
  }

  .role-options {
    justify-content: flex-start;
  }

  .use-case-list {
    grid-template-columns: 1fr;
  }

  .use-case-button {
    min-height: 72px;
  }

  .result-header,
  .question-panel-head,
  .followup-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .result-funnel {
    gap: 5px;
  }

  .result-funnel span {
    min-height: 34px;
    padding: 6px 5px;
    font-size: 12px;
  }

  .question-panel-head p {
    max-width: none;
    text-align: left;
  }

  .review-panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .issue-list,
  .review-evidence-grid {
    grid-template-columns: 1fr;
  }

  .review-evidence-grid.has-precedents {
    grid-template-columns: 1fr;
  }

  .choice-grid,
  .question-helper,
  .conditional-detail {
    padding-left: 0;
    margin-left: 0;
  }

  .choice-pill,
  .followup-other {
    width: 100%;
  }

  .paywall-card {
    grid-template-columns: 1fr;
  }

  .locked-result-shell {
    grid-template-columns: 1fr;
  }

  .locked-result-shell .paywall-card {
    position: static;
    grid-template-columns: 1fr;
  }

  .locked-preview {
    max-height: 260px;
  }

  .support-panel summary {
    min-height: 54px;
    padding: 10px 12px;
  }

  .support-panel summary small {
    display: none;
  }

  .precedent-card {
    grid-template-columns: 1fr;
  }

  .paywall-icon {
    width: 42px;
    height: 42px;
  }

  .payment-caption {
    grid-column: auto;
    margin-top: -2px;
  }

  .final-document {
    padding: 18px;
  }

  .final-document-content {
    font-size: 14px;
    line-height: 1.78;
    word-break: normal;
  }

  .primary-button:not(.send-button),
  .secondary-button {
    width: 100%;
  }

  .composer-actions {
    align-items: center;
    flex-direction: row;
  }

  .send-button {
    width: 36px;
    min-width: 36px;
  }

  .action-row {
    justify-content: flex-start;
  }

  .result-header h2 {
    font-size: 30px;
  }

  .review-cta {
    bottom: max(14px, env(safe-area-inset-bottom));
    padding: 0 14px;
  }

  .review-continue-button {
    min-height: 56px;
    border-radius: 12px;
  }

}

@media print {
  body {
    background: white;
  }

  .composer,
  .action-row,
  .followup-form,
  .review-cta {
    display: none;
  }

  .shell {
    width: 100%;
  }

  .results {
    padding: 0;
  }

  .result-section,
  .notice,
  .support-panel,
  .law-card,
  .final-document,
  .draft-block {
    break-inside: avoid;
    box-shadow: none;
  }
}
