/* RUN195 independent unsigned controller scratch. NOT APPROVED FOR PRODUCTION. */
:root { color-scheme:light; font-family:system-ui,Arial,sans-serif; }
body { margin:0; background:#f6f8fb; color:#18253c; font-size:16px; line-height:1.6 }
main { margin:0 auto; padding:clamp(14px,3vw,28px); max-width:900px; background:#fff }
header { margin:0 auto; padding:14px 24px; max-width:900px }
a { color:#164f94 } a:focus-visible { outline:3px solid #d78f32; outline-offset:3px }
h1 { font-size:clamp(24px,4vw,36px); line-height:1.25 } h2 { font-size:22px; line-height:1.3 }
nav { padding:12px 0; display:flex; flex-wrap:wrap; gap:14px }
.law { border-top:2px solid #253e65; padding-top:12px }
.law p { font-size:16px; line-height:1.72; white-space:normal }
.guide { border:1px solid #ccd3df; background:#f8fafc; padding:14px 20px; margin:16px 0 }
.guide li { margin:0 0 9px }
figure { margin:20px auto; break-inside:avoid }
figure img { max-width:100%; display:block; height:auto; margin:auto }
figcaption { font-size:14px; color:#444; margin-top:8px }
footer { color:#444; font-size:13px; margin-top:16px }
.skip:not(:focus) { position:absolute; left:-10000px }
@page { size:6in 9in; margin:.45in }
@media print {
 html,body { background:#fff!important; color:#000!important; margin:0 }
 header,nav,.skip { display:none!important }
 main { max-width:none; margin:0; padding:0 }
 h1 { font-size:18pt; margin-top:0 } h2 { font-size:13pt }
 .law p { font-size:10pt; line-height:1.45 }
 .guide { padding:8px 12px; border:1px solid #888; background:#fff }
 .guide,.guide p,.guide li { font-size:10pt; line-height:1.42 }
 figure { page-break-inside:avoid; break-inside:avoid }
 figure img { max-height:7.65in; width:auto; max-width:100%; object-fit:contain }
 footer { font-size:8pt }
 a { color:inherit; text-decoration:none }
}

/* RUN195 V3 6x9 paper repair: keep heading+figure+caption together and avoid print orphans. */
@media print {
  #figure { break-before: page; page-break-before: always; }
  #figure h2 { break-after: avoid; page-break-after: avoid; font-size:12pt; margin-bottom:4pt; }
  #figure figure { break-inside: avoid; page-break-inside: avoid; margin:3pt 0; }
  #figure figure img { max-height:6.0in; max-width:100%; width:auto; object-fit:contain; }
  #figure figcaption { font-size:8.8pt; line-height:1.2; margin-top:3pt; }
  footer { font-size:8pt; line-height:1.2; margin-top:6pt; break-before:avoid; page-break-before:avoid; }
}

/* Chat2 exclusive owner: accessible native reader, responsive dark/light and full in-page zoom. */
:root{color-scheme:light;--reader-bg:#fff;--reader-fg:#142927;--reader-soft:#eaf2f0;--reader-line:#819d95;--reader-accent:#145c72}
html[data-reader-theme="dark"]{color-scheme:dark;--reader-bg:#112421;--reader-fg:#e5f2ee;--reader-soft:#223e38;--reader-line:#a7c7bd;--reader-accent:#82daf1}
html,body{min-width:0;background:var(--reader-bg);color:var(--reader-fg);overflow-x:clip}
body{font:16px/1.6 system-ui,-apple-system,"Segoe UI",Arial,sans-serif}
main{background:var(--reader-bg);color:var(--reader-fg);overflow-wrap:anywhere}
header{display:flex;justify-content:space-between;align-items:center;gap:12px;flex-wrap:wrap}
header a{font-size:16px;font-weight:700}
a{color:var(--reader-accent);text-underline-offset:.13em}
a:focus-visible,button:focus-visible,.c2-pan:focus-visible{outline:3px solid #d18b3a;outline-offset:3px}
.law{border-color:var(--reader-line)}
.guide{background:var(--reader-soft);border-color:var(--reader-line)}
.guide li{font-size:16px;line-height:1.6}
figcaption{font-size:16px;color:var(--reader-fg)}
.c2-theme,.c2-tools button,.c2-open{font:inherit;color:var(--reader-fg);cursor:pointer}
.c2-theme,.c2-tools button{padding:7px 11px;border:1px solid var(--reader-line);border-radius:6px;background:var(--reader-soft);min-height:42px}
.c2-open{display:block;padding:0;border:0;background:transparent;width:100%;cursor:zoom-in}
.c2-open img{display:block;max-width:100%;max-height:740px;width:auto;height:auto;margin:auto}
.c2-dialog{width:min(97vw,940px);max-width:97vw;height:min(95vh,960px);max-height:95vh;background:var(--reader-bg);color:var(--reader-fg);border:2px solid var(--reader-line);border-radius:8px;padding:12px}
.c2-dialog::backdrop{background:rgba(0,0,0,.86)}
.c2-tools{display:flex;justify-content:center;align-items:center;flex-wrap:wrap;gap:7px}
.c2-pan{height:calc(100% - 105px);overflow:auto;overscroll-behavior:contain;min-height:45vh}
.c2-pan img{display:block;width:100%;max-width:none;height:auto}
@media(max-width:390px){main{padding:12px} .guide{padding:10px 12px}.c2-tools{gap:4px}.c2-tools button,.c2-tools a{font-size:14px;min-height:36px}}
@media print{
 html,body,main{background:white!important;color:#111!important;overflow:visible}
 header,.c2-theme,.c2-dialog{display:none!important}
 .guide{background:white!important;border-color:#888}
 .c2-open{display:block!important}
 .c2-open img{max-height:6.95in!important;width:auto!important;height:auto!important;object-fit:contain!important}
 figcaption{font-size:9.5pt;color:#333!important}
}

/* Chat2 V2 print-only: preserve original law and diagram, resolve Rule221 lone bullet page. */
@media print{
  h1 {font-size:16.5pt!important;line-height:1.18!important;margin:2pt 0 6pt!important}
  h2 {font-size:11.5pt!important;line-height:1.2!important;margin:4pt 0!important}
  main>p {font-size:9.8pt!important;margin:3pt 0!important}
  nav {padding:3pt 0!important}
  .law {padding-top:5pt!important}
  .law p{font-size:9.9pt!important;line-height:1.34!important;margin:5pt 0!important}
  .guide {padding:5pt 9pt!important;margin:7pt 0!important}
  .guide p {font-size:9.6pt!important;line-height:1.25!important;margin:2pt 0!important}
  .guide li{font-size:9.7pt!important;line-height:1.23!important;margin:0 0 3pt!important}
  #figure h2{margin-bottom:3pt!important}
}

/* Chat2 print-only scope: native law and readable original C3 sheets, web picture unaltered */
.c2-print-sheet {display:none}
@media print {
 #figure{break-before:page!important;page-break-before:always!important;break-inside:auto!important}
 #figure>h2,#figure>.c2-web-figure{display:none!important}
 #figure>.c2-print-sheet{display:block!important;break-inside:avoid!important;page-break-inside:avoid!important;margin:0 auto 3pt!important;width:100%!important;max-width:100%!important}
 #figure>.c2-print-sheet-1{break-before:auto!important}
 #figure>.c2-print-sheet-2{break-before:page!important;page-break-before:always!important}
 #figure>.c2-print-sheet img{display:block!important;width:auto!important;max-width:100%!important;height:auto!important;max-height:7.42in!important;object-fit:contain!important;margin:0 auto!important}
 #figure>.c2-print-sheet figcaption{font-size:9pt!important;line-height:1.2!important;margin:2pt 0!important;text-align:center!important}
 footer{display:none!important}
}
