/* Doctor inherits the site's default palette and backdrop. */
.doctor-page { padding-bottom: 64px; }
.doctor-page [hidden] { display: none !important; }
.doctor-page .wrap { max-width: 820px; }
.doctor-head { padding-top: 40px; padding-bottom: 26px; }
.doc-eyebrow { display: flex; align-items: center; gap: 8px; color: var(--grass-dark); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.doc-eyebrow span { font-size: 20px; }
.doctor-head h1 { font-size: clamp(25px, 4vw, 38px); line-height: 1.5; margin: 10px 0 8px; }
.doctor-head .lede { font-size: 16px; color: var(--text-soft); }
.doctor-grid { display: grid; gap: 24px; }
.doc-panel { min-width: 0; padding: 26px; background: var(--card-glass); backdrop-filter: var(--glass-blur); border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.doctor-page h2, .doctor-page h3, .doctor-page h4 { font-family: 'Inter', system-ui, sans-serif; text-transform: none; letter-spacing: -.02em; }
.doc-panel-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 16px; }
.doc-panel h2 { font-size: 21px; line-height: 1.4; margin: 0; }
.doc-drop { position: relative; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 22px 12px; border: 1px dashed var(--grass-line); background: var(--grass-glass); text-align: center; cursor: pointer; }
.doc-drop:hover, .doc-drop.dragging, .doc-drop:focus-within { border-color: var(--grass); background: var(--grass-soft); outline: 2px solid var(--grass); outline-offset: 3px; }
.doc-drop strong { font-size: 16px; color: var(--ink); }
.doc-drop > span, .doc-drop small { font-size: 12px; color: var(--text-soft); }
.doc-drop small { font-size: 11px; margin-top: 4px; }
.doc-upload-icon { width: 30px; height: 30px; color: var(--grass-dark); margin-bottom: 6px; }
.doc-drop input { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; cursor: pointer; }
.doc-sub { font-size: 12px; line-height: 1.6; color: var(--text-soft); overflow-wrap: anywhere; }
#file-note:empty { display: none; }
#file-note { margin-top: 12px; }
.doc-ai-note { margin-top: 12px; font-size: 11px; line-height: 1.8; color: var(--text-soft); }
.doc-ai-note a { color: var(--grass-dark); text-decoration: underline; text-underline-offset: 2px; }
.doc-editor { margin-top: 20px; font-size: 13px; }
.doc-editor summary, .doc-help summary, .doc-evidence summary { cursor: pointer; color: var(--text-soft); }
.doc-editor[open] summary { color: var(--ink); margin-bottom: 12px; }
.doc-label { display: block; font-size: 12px; margin-bottom: 7px; }
#log-text { display: block; width: 100%; height: 150px; min-height: 120px; max-height: 420px; padding: 12px; resize: vertical; border: 1px solid var(--line); background: var(--paper); color: var(--ink); border-radius: 0; font: 12px/1.7 ui-monospace, SFMono-Regular, Consolas, monospace; }
#log-text::placeholder { color: var(--text-soft); opacity: .75; }
#log-text:focus-visible { outline: 2px solid var(--grass); outline-offset: 2px; }
.doc-help { margin-top: 12px; font-size: 13px; }
.doc-help p { color: var(--text-soft); padding-top: 8px; line-height: 1.8; }
.doc-help code { overflow-wrap: anywhere; }
.doc-button { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 10px 20px; border: 1px solid var(--grass); border-radius: 0; font: 600 13px/1.4 'Inter', system-ui, sans-serif; cursor: pointer; }
.doc-primary { background: var(--grass); color: var(--paper); box-shadow: 3px 3px 0 var(--grass-line); }
.doc-primary:hover { background: var(--grass-dark); }
.doc-button:disabled { opacity: .45; cursor: default; box-shadow: none; }
#ai-check { margin-top: 12px; margin-right: 12px; }
.doctor-page button:focus-visible, .doctor-page summary:focus-visible, .doc-ai-note a:focus-visible { outline: 2px solid var(--grass-dark); outline-offset: 4px; }
.doc-link { background: none; border: 0; color: var(--text-soft); padding: 5px 0; min-height: 32px; text-decoration: underline; text-underline-offset: 3px; font: 12px/1.6 'Inter', system-ui, sans-serif; cursor: pointer; }
.doc-link:hover { color: var(--grass-dark); }
.doc-status { font-size: 13px; line-height: 1.7; color: var(--ink); background: var(--grass-glass); padding: 12px; border-left: 2px solid var(--grass); margin: 20px 0 0; overflow-wrap: anywhere; }
.doc-empty { font-size: 13px; color: var(--text-soft); }
.doc-examples { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.doc-examples button { font: 12px/1.4 'Inter', sans-serif; min-height: 40px; padding: 9px 12px; border: 1px solid var(--line); background: var(--paper); color: var(--ink); }
.doc-examples button:hover { border-color: var(--grass); background: var(--grass-soft); }
#doctor-result { scroll-margin-top: 94px; border-top: 3px solid var(--grass); }
.doc-kicker { color: var(--grass-dark); font-size: 12px; }
#result-cause { font-size: clamp(21px, 3vw, 27px); line-height: 1.45; overflow-wrap: anywhere; }
.doc-steps-heading { font-size: 19px; margin: 28px 0 16px; }
.doc-instructions { list-style: decimal; padding-left: 25px; color: var(--ink); }
.doc-instructions li { padding-left: 8px; margin: 0 0 24px; }
.doc-instructions li::marker { color: var(--grass-dark); font-size: 17px; font-weight: 700; }
.doc-instructions h4 { font-size: 16px; line-height: 1.5; font-weight: 650; margin: 0 0 7px; }
.doc-instructions p { font-size: 14px; line-height: 1.9; color: var(--text-soft); white-space: pre-line; overflow-wrap: anywhere; margin-top: 8px; }
.doc-instructions strong, .doc-verify strong { color: var(--ink); font-weight: 650; }
.doc-instructions code, .doc-verify code { color: var(--ink); background: var(--paper); border: 1px solid var(--line); padding: 1px 4px; font: .9em/1.7 ui-monospace, Consolas, monospace; }
.doc-verify { padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px; line-height: 1.8; color: var(--text-soft); }
.doc-verify p + p { margin-top: 12px; }
.doc-evidence { margin-top: 20px; font-size: 12px; }
#result-evidence { max-height: 250px; overflow-y: auto; margin-top: 10px; }
.doc-evidence pre { font: 11px/1.7 ui-monospace, Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; background: var(--paper); color: var(--ink); border-left: 2px solid var(--grass-line); padding: 10px 12px; margin-top: 6px; }
.doc-save { margin-top: 16px; }
.doc-external-links a { color: var(--grass-dark); text-decoration: underline; text-underline-offset: 3px; padding: 6px 0; }
@media (max-width: 480px) {
  .doctor-page .wrap { padding-inline: 18px; }
  .doctor-head { padding-top: 28px; }
  .doctor-head .lede { font-size: 14px; }
  .doc-panel { padding: 18px; }
  .doc-instructions { padding-left: 20px; }
  .doc-instructions li { padding-left: 4px; }
  .doc-instructions p { font-size: 14px; line-height: 1.8; }
}
@media (prefers-reduced-motion: reduce) { .doctor-page *, html { scroll-behavior: auto !important; transition: none !important; animation: none !important; } }
