/* Scoped to N-Lung. Existing application icons and option illustrations are preserved. */
.nlung-body .app-main{max-width:1200px}
.nlung-toolbar{display:flex;align-items:center;gap:18px;flex-wrap:wrap;margin-bottom:20px}
.nlung-toolbar a{color:var(--accent);font-size:14px;text-decoration:underline}
.nlung-workspace{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(320px,1fr);gap:24px;align-items:start}
.nlung-workspace>*{min-width:0}
.nlung-result-column{position:sticky;top:90px;max-height:calc(100vh - 105px);overflow:auto;scrollbar-width:thin;padding:3px}
.nlung-body .app-card{padding:24px}
.nlung-body .app-card-title{font-size:14px;line-height:1.5}
.nlung-body .field-label{font-size:14px;line-height:1.5}
.nlung-body .field-hint,.nlung-body .opt-desc,.nlung-body .rec-note{font-size:13px;line-height:1.55;color:var(--ink-soft)}
.nlung-body .field{min-width:0}
.nlung-body .input-row{gap:12px}
.nlung-body .input-wrap{min-width:0;flex:1}
.nlung-body input[type=text],.nlung-body select{width:100%;min-width:0;min-height:48px;font-size:16px}
.nlung-body input[aria-invalid=true]{outline:2px solid var(--red);outline-offset:-2px}
.nlung-error{font-size:13px;color:var(--red);margin-top:8px;line-height:1.5}
.nlung-confirm{display:flex;gap:12px;font-size:14px;line-height:1.6;margin-top:20px;padding:12px;border:1px solid var(--neutral-300);border-radius:10px;align-items:flex-start;cursor:pointer}
.nlung-confirm input{min-width:20px;height:20px;margin-top:3px;accent-color:var(--accent)}
.nlung-body #risk-field{margin:20px 0 0}
.nlung-body .opt-group{border:0;padding:0;margin:0 0 24px;min-width:0}
.nlung-body .opt-group legend{padding:0;width:100%;margin-bottom:12px}
.nlung-body .opt-list{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px}
.nlung-body .opt{padding:12px;gap:8px;margin:0;min-height:60px;align-items:flex-start}
.nlung-body .opt-name{font-size:14px;line-height:1.45}
.nlung-body .opt-fig{width:48px;height:36px;flex:0 0 48px}
.nlung-body .opt:has(input:focus-visible){outline:3px solid var(--accent);outline-offset:3px}
.nlung-body .opt-group-rule{white-space:normal;font-size:10px}
.nlung-body .opt-group-head{gap:8px;align-items:center}
.nlung-body #pt-flags .opt-fig{display:none}
.nlung-body #pt-flags .opt-list{grid-template-columns:1fr}
.nlung-progress{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:14px 18px;border-radius:12px;background:var(--blue-50);color:var(--ink);margin:20px 0;font-size:14px;line-height:1.4}
.nlung-progress a{white-space:nowrap;color:var(--accent-dark);text-decoration:underline;min-height:44px;display:flex;align-items:center}
.nlung-result,.nlung-empty{padding:24px;border:1px solid var(--neutral-200);border-top:4px solid var(--accent);background:var(--white);border-radius:16px;margin-bottom:16px}
.nlung-result h2,.nlung-empty h2{font-family:var(--font-sans);font-size:25px;line-height:1.25;margin:10px 0 16px}
.nlung-result p,.nlung-empty p{font-size:14px;line-height:1.65;margin:10px 0 0}
.nlung-result .result-kicker{font-size:12px;font-weight:650;color:var(--ink-soft);margin:0}
.nlung-result .result-subtitle{font-weight:600;font-size:16px}
.nlung-result.tr-1,.nlung-result.tr-2,.nlung-result.tone-green{border-top-color:var(--green-700)}
.nlung-result.tr-3,.nlung-result.tone-amber{border-top-color:var(--amber-700)}
.nlung-result.tr-4,.nlung-result.tone-orange{border-top-color:var(--orange-700)}
.nlung-result.tr-5,.nlung-result.tr-6,.nlung-result.tone-red{border-top-color:var(--red)}
.nlung-body .mini-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;margin:0 0 16px}
.nlung-body .mini-card{padding:16px}
.nlung-body .mini-value{font-size:24px;line-height:1.3}
.nlung-body .mini-note{font-size:12px;line-height:1.55;color:var(--ink-soft)}
.nlung-body .inline-note{font-size:13px;line-height:1.6;margin:12px 0;padding:14px}
.nlung-summary h2{font-size:18px;margin-bottom:10px}
.nlung-summary ul{list-style:none;padding:0;margin:12px 0 0}
.nlung-summary li{border-top:1px solid var(--neutral-200);padding:12px 0;display:grid;gap:4px;font-size:13px;line-height:1.5}
.nlung-summary button{text-align:left;border:0;background:none;color:var(--accent);font:inherit;font-weight:650;cursor:pointer}
.nlung-body .nodule-bar{gap:10px;scroll-margin-top:160px}
.nlung-body .nodule-item{display:inline-flex;border:1px solid var(--neutral-300);border-radius:12px;overflow:hidden;background:var(--white)}
.nlung-body .nodule-tab{border:0;border-radius:0}
.nlung-body .nodule-tab.is-active{box-shadow:inset 0 -3px var(--accent)}
.nlung-body .nodule-remove{min-width:44px;border:0;border-left:1px solid var(--neutral-200);background:var(--white);color:var(--ink-soft);font-size:22px;cursor:pointer}
.nlung-body .report-box{font:14px/1.7 var(--font-sans);min-height:260px;margin:14px 0;resize:vertical}
.nlung-body button:disabled{opacity:.5;cursor:not-allowed}
.nlung-undo{display:flex;align-items:center;justify-content:space-between;gap:12px;margin:16px 0;padding:14px;background:var(--blue-50);border-left:3px solid var(--accent);font-size:14px}
.nlung-undo button{padding:8px 14px;background:var(--white);color:var(--accent);border:1px solid var(--accent);border-radius:8px;cursor:pointer}
.nlung-body [hidden]{display:none!important}
.nlung-body :is(button,a,select,input,textarea,summary):focus-visible{outline:3px solid var(--accent);outline-offset:3px}
.nlung-body button,.nlung-body summary{min-height:44px}
.nlung-body .app-lang button{min-width:44px}
.nlung-body .app-theme{width:44px;height:44px}
.nlung-body #results,.nlung-body #references{scroll-margin-top:170px}
.nlung-body .skip-link{position:fixed;top:-100px;left:16px;padding:12px;background:var(--white);color:var(--accent);z-index:100}
.nlung-body .skip-link:focus{top:12px}
.nlung-body .stage-table td{white-space:normal;font-size:13px;line-height:1.6}
.nlung-body .stage-table th,.nlung-body .stage-table td:first-child{overflow-wrap:normal;word-break:normal}
.nlung-body .app-details-body{overflow-wrap:anywhere}
@media(max-width:1000px){.nlung-body .opt-list{grid-template-columns:1fr}}
@media(max-width:850px){.nlung-workspace{grid-template-columns:1fr}.nlung-result-column{position:static;max-height:none;overflow:visible}.nlung-progress{position:sticky;top:70px;z-index:5;box-shadow:0 2px 8px rgb(0 0 0/.06)}.nlung-body .app-main{max-width:720px}.nlung-body .opt-list{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:550px){.nlung-body .app-card{padding:18px}.nlung-body .opt-list{grid-template-columns:1fr}.nlung-body .app-header h1{font-size:26px}.nlung-body .nlung-progress{font-size:12px;padding:10px 12px}.nlung-body .segmented label{white-space:normal;padding:10px;line-height:1.4}.nlung-body .grid-2{grid-template-columns:1fr}.nlung-body .input-row{flex-wrap:nowrap}.nlung-body .unit-toggle{flex:0 0 120px}.nlung-body .app-back span{display:none}.nlung-result h2{font-size:24px}.nlung-body .mini-grid{grid-template-columns:1fr}}
@media(prefers-reduced-motion:reduce){.nlung-body *{scroll-behavior:auto!important;transition:none!important}}
.nlung-patient>summary{cursor:pointer;margin:0;display:list-item;color:var(--accent)}
.nlung-patient[open]>summary{margin-bottom:22px}
.nlung-body .axis-field{flex:1;min-width:0}
.nlung-body .axis-label{display:block;font-size:12px;color:var(--ink-soft);margin-bottom:6px}
.nlung-body .segmented input:focus-visible+label{outline:3px solid var(--accent);outline-offset:-3px}
.nlung-review-link{display:inline-block;color:var(--accent);padding:10px 0;margin-bottom:14px;font-size:14px;text-decoration:underline}
.nlung-body #patient-card{scroll-margin-top:165px}
.nlung-body input[type=date]{display:block;width:100%;min-width:0;min-height:48px;padding:12px;border:1px solid var(--neutral-300);border-radius:8px;background:var(--white);color:var(--ink);font:16px var(--font-sans);color-scheme:light}
.nlung-dates{margin-bottom:0}
.nlung-date-status{font-size:14px;font-weight:600;line-height:1.6;margin:12px 0}
.nlung-vdt{border-top:1px solid var(--neutral-300);margin-top:24px;padding-top:24px}
.nlung-vdt h3{font-family:var(--font-sans);font-size:18px;line-height:1.4;margin:0 0 18px}
.nlung-vdt-value{color:var(--accent);font-size:20px;font-weight:650;line-height:1.5;margin:18px 0 10px}
.nlung-growth-chart{margin:16px 0;padding:14px 4px;border:1px solid var(--neutral-300);border-radius:12px;background:var(--white)}
.nlung-growth-chart svg{display:block;width:100%;height:auto;max-width:600px;margin:0 auto;overflow:visible}
.nlung-growth-chart svg text{fill:var(--ink-soft);font:12px var(--font-sans)}
.nlung-growth-chart .vdt-axis-label,.nlung-growth-chart .vdt-value{fill:var(--ink);font-weight:600}
.nlung-growth-chart .vdt-grid{stroke:var(--neutral-300);stroke-width:1}
.nlung-growth-chart .vdt-line{stroke:var(--accent);stroke-width:2;stroke-dasharray:5 4}
.nlung-growth-chart .vdt-point{fill:var(--accent);stroke:var(--white);stroke-width:2}
.nlung-growth-chart figcaption{padding:8px 14px 0;font-size:12px;line-height:1.6;color:var(--ink-soft)}
.nlung-vdt-summary{font-size:14px;line-height:1.7;margin:12px 0;overflow-wrap:anywhere}

:root[data-theme="dark"] .nlung-body input[type=date]{color-scheme:dark}
@media(max-width:550px){.nlung-growth-chart svg text{font-size:18px}}
/* Result body text stays neutral in both contexts; the tone remains on the accent border/background. */
.nlung-body .nlung-result,.nlung-body .nlung-result h2{color:var(--ink)}
.nlung-body .opt-info{font-weight:600;color:var(--ink-soft)}

.nlung-task-nav,.pc-step-links{display:flex;gap:10px;flex-wrap:wrap;margin:16px 0}.nlung-task-nav a{min-height:44px;padding:10px 14px;border:1px solid var(--neutral-200);border-radius:10px;color:var(--accent);background:var(--white);font-size:14px;font-weight:600;text-decoration:none}
