:root {
  --case-blue: #2563EB;
  --case-blue-dark: #1d4ed8;
}

.case-page { --blue: var(--case-blue); --blue-dark: var(--case-blue-dark); background: #fff; }
.case-container { width: min(900px, calc(100% - 48px)); }
.case-intro { padding: 38px 0 58px; background: #fff; }
.case-back-link { display: inline-flex; align-items: center; gap: 7px; margin-bottom: 31px; color: #647087; font-size: 12px; font-weight: 600; }
.case-back-link:hover { color: var(--case-blue); }
.case-back-link span { font-size: 16px; }
.case-intro > .container > .section-kicker { margin-bottom: 8px; }
.case-intro h1 { margin: 0 0 9px; color: var(--ink); font-family: var(--font-heading); font-size: clamp(33px, 5vw, 42px); font-weight: 800; letter-spacing: -1.7px; }
.case-lede { max-width: 700px; margin-bottom: 25px; color: #748098; font-size: 14px; line-height: 1.6; }
.case-card { padding: 27px; border: 1px solid #e8edf5; border-radius: 14px; background: #fff; box-shadow: 0 14px 40px rgba(34,58,108,.07); }
.case-card-heading { display: flex; align-items: center; gap: 13px; margin-bottom: 23px; }
.case-heading-icon { width: 44px; height: 44px; display: grid; flex: none; place-items: center; border: 1px solid #e1eaff; border-radius: 11px; color: var(--case-blue); background: #f2f6ff; }
.case-heading-icon svg { width: 25px; height: 25px; }
.case-card-heading h2 { margin: 0 0 4px; font-family: var(--font-heading); font-size: 17px; font-weight: 800; letter-spacing: -.3px; }
.case-card-heading p { margin: 0; color: #8490a2; font-size: 11px; }
.case-field-label { display: block; margin-bottom: 8px; color: #536078; font-size: 12px; font-weight: 700; }
.case-textarea { width: 100%; min-height: 190px; display: block; resize: vertical; padding: 13px 14px; border: 1px solid #dfe5ef; border-radius: 9px; outline: none; color: var(--ink); background: #fff; font: inherit; font-size: 13px; line-height: 1.65; overflow-wrap: anywhere; tab-size: 4; }
.case-textarea:focus { border-color: #9ab5ff; box-shadow: 0 0 0 3px #edf2ff; }
.case-textarea::placeholder { color: #a3adbd; }
.case-editor-footer, .case-preview-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.case-editor-footer { margin-top: 11px; }
.case-stats { display: flex; flex-wrap: wrap; gap: 16px; color: #8490a2; font-size: 10px; }
.case-stats strong { color: #4b5a73; font-weight: 700; font-variant-numeric: tabular-nums; }
.case-editor-actions, .case-output-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; }
.case-button { min-height: 39px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 0 13px; border: 1px solid transparent; border-radius: 7px; font: inherit; font-size: 11px; font-weight: 700; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.case-button:focus-visible, .case-mode:focus-visible { outline: 3px solid #dce7ff; outline-offset: 2px; }
.case-button:disabled { cursor: not-allowed; opacity: .48; }
.case-button-quiet, .case-button-copy { border-color: #e4e9f1; color: #66738a; background: #fff; }
.case-button-quiet:hover:not(:disabled), .case-button-copy:hover:not(:disabled) { background: #f7f9fc; }
.case-modes-section { margin-top: 25px; padding-top: 21px; border-top: 1px solid #edf0f5; }
.case-modes-section h3, .case-preview-heading h3 { margin: 0; font-family: var(--font-heading); font-size: 13px; font-weight: 800; letter-spacing: -.2px; }
.case-modes { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.case-mode { min-width: 0; min-height: 40px; padding: 7px 8px; border: 1px solid #e4e9f1; border-radius: 8px; color: #66738a; background: #fff; font: inherit; font-size: 10px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; transition: background .18s ease, border-color .18s ease, color .18s ease; }
.case-mode:hover { border-color: #cbd9ff; color: var(--case-blue); }
.case-mode.is-active { border-color: #cbd9ff; color: var(--case-blue); background: #f4f7ff; box-shadow: inset 0 0 0 1px #e4ecff; }
.case-preview-section { margin-top: 24px; padding-top: 21px; border-top: 1px solid #edf0f5; }
.case-preview-heading { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 10px; }
.case-preview-heading > span { flex: none; color: #647087; font-size: 9px; font-weight: 800; letter-spacing: .55px; }
.case-output { min-height: 170px; background: #fbfcfe; }
.case-output[readonly] { resize: vertical; }
.case-preview-footer { margin-top: 11px; }
.case-status { min-height: 15px; margin: 0; color: #218c68; font-size: 10px; line-height: 1.5; }
.case-status.is-error { color: #c34848; }
.case-button-copy svg, .case-button-download svg { width: 16px; height: 16px; flex: none; }
.case-button-download { color: #fff; background: var(--case-blue); }
.case-button-download:hover:not(:disabled) { background: var(--case-blue-dark); }
.case-privacy { display: flex; align-items: center; justify-content: center; gap: 7px; margin: 15px 0 0; color: #7e899c; font-size: 10px; }
.case-privacy .status-dot { width: 6px; height: 6px; }
.case-faq-section { padding: 48px 0 72px; border-top: 1px solid #f0f2f6; background: #fff; }
.case-faq-section > .container > .section-kicker { margin-bottom: 7px; }
.case-faq-section h2 { margin: 0 0 21px; font-family: var(--font-heading); font-size: 25px; font-weight: 800; letter-spacing: -.8px; }
.case-faq-list { border-top: 1px solid #edf0f5; }
.case-faq-item { border-bottom: 1px solid #edf0f5; }
.case-faq-item summary { position: relative; padding: 17px 32px 17px 0; color: #26334c; font-size: 13px; font-weight: 700; cursor: pointer; list-style: none; }
.case-faq-item summary::-webkit-details-marker { display: none; }
.case-faq-item summary::after { position: absolute; top: 14px; right: 3px; color: var(--case-blue); content: "+"; font-size: 19px; font-weight: 500; }
.case-faq-item[open] summary::after { content: "−"; }
.case-faq-item p { max-width: 700px; margin: -3px 30px 17px 0; color: #788398; font-size: 12px; line-height: 1.7; }

@media (max-width: 700px) {
  .case-container { width: min(100% - 36px, 540px); }
}

@media (max-width: 560px) {
  .case-container { width: calc(100% - 32px); }
  .case-intro { padding: 27px 0 42px; }
  .case-back-link { margin-bottom: 23px; }
  .case-lede { margin-bottom: 20px; font-size: 13px; }
  .case-card { padding: 20px 16px; border-radius: 12px; }
  .case-card-heading { margin-bottom: 19px; }
  .case-textarea { min-height: 170px; padding: 11px; font-size: 12px; }
  .case-editor-footer, .case-preview-footer { align-items: flex-start; flex-direction: column; }
  .case-editor-actions, .case-output-actions { width: 100%; justify-content: stretch; }
  .case-editor-actions .case-button, .case-output-actions .case-button { flex: 1; }
  .case-stats { gap: 11px; }
  .case-modes { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 7px; }
  .case-mode { min-height: 42px; padding: 7px 5px; font-size: 9px; }
  .case-status { min-height: 0; }
  .case-faq-section { padding: 38px 0 54px; }
  .case-faq-section h2 { font-size: 22px; }
  .case-faq-item summary { font-size: 12px; }
}

@media (max-width: 360px) {
  .case-button { padding: 0 8px; font-size: 10px; }
  .case-mode { font-size: 8.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .case-button, .case-mode { transition-duration: .01ms; }
}
