:root{--green:#123d35;--green-2:#1e5a4c;--mint:#e8f3ed;--ink:#172520;--muted:#66736d;--line:#dce5df;--paper:#fff;--bg:#f2f5f2;--red:#a63f39;--amber:#8a5a13;--shadow:0 5px 24px rgba(24,48,39,.06)}
*{box-sizing:border-box}html{background:var(--bg);scroll-behavior:smooth}body{margin:0;color:var(--ink);font-family:Inter,-apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;font-size:15px;line-height:1.45;padding-bottom:env(safe-area-inset-bottom)}button,input,textarea{font:inherit}.topbar{height:70px;background:var(--green);color:white;display:flex;align-items:center;justify-content:space-between;padding:0 max(22px,calc((100vw - 1100px)/2));position:sticky;top:0;z-index:4;box-shadow:0 3px 16px #0b2b2480}.brand{display:flex;align-items:center;gap:11px}.brand-mark{width:35px;height:35px;display:grid;place-items:center;border-radius:11px;background:#c8e3d5;color:var(--green);font-size:23px;font-weight:800}.brand strong,.brand small{display:block}.brand small{font-size:12px;color:#c8d8d1}.page{max-width:1100px;margin:32px auto 20px;padding:0 22px}.intro{display:flex;justify-content:space-between;align-items:flex-end;gap:22px;margin-bottom:22px}.eyebrow{font-size:10px;letter-spacing:.13em;font-weight:800;color:var(--green-2);margin:0 0 4px}.intro h1{font-size:clamp(26px,4vw,36px);line-height:1.1;margin:0 0 7px;letter-spacing:-.035em}.muted{color:var(--muted);margin:0}.toolbar{display:flex;align-items:center;justify-content:flex-end;gap:9px;flex-wrap:wrap}.save-status{font-size:12px;color:var(--muted);margin-right:4px}.button{border:0;border-radius:10px;padding:11px 15px;font-weight:700;cursor:pointer;white-space:nowrap;transition:transform .15s,background .15s}.button:active{transform:scale(.98)}.button-primary{background:var(--green);color:#fff}.button-primary:hover{background:var(--green-2)}.button-secondary{background:var(--mint);color:var(--green)}.button-quiet{border:1px solid #ffffff60;background:transparent;color:#fff}.card{background:var(--paper);border:1px solid var(--line);border-radius:16px;padding:22px;margin:15px 0;box-shadow:var(--shadow)}.section-heading{display:flex;align-items:center;justify-content:space-between;gap:15px;margin-bottom:16px}.section-heading h2{font-size:20px;letter-spacing:-.02em;margin:0}.form-grid{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px}.form-grid label,.full-label{display:grid;gap:6px;font-size:12px;font-weight:700;color:#485750}.form-grid input,.check-note,.full-label textarea{width:100%;border:1px solid var(--line);border-radius:9px;background:#fff;padding:11px 12px;color:var(--ink);outline:0}.form-grid input:focus,.check-note:focus,.full-label textarea:focus{border-color:#6e9b88;box-shadow:0 0 0 3px #d8ebe0}.intervention-type{display:flex;align-items:center;gap:9px;padding:0;border:0;margin:18px 0 0}.intervention-type legend{font-size:12px;font-weight:700;color:#485750;margin-bottom:7px}.choice-chip{cursor:pointer}.choice-chip input{position:absolute;opacity:0}.choice-chip span{display:block;border:1px solid var(--line);border-radius:999px;padding:8px 14px;font-size:13px;font-weight:650;color:#485750}.choice-chip input:checked+span{color:var(--green);border-color:#90b6a1;background:var(--mint)}.check-section{padding:0;overflow:hidden}.check-section .section-heading{background:#f8faf8;padding:19px 22px;margin:0;border-bottom:1px solid var(--line)}.section-number{width:34px;height:34px;border-radius:10px;background:var(--green);color:white;display:grid;place-items:center;font-size:14px;font-weight:800;margin-right:12px;flex:none}.section-headline{display:flex;align-items:center}.section-headline h2{font-size:18px}.section-headline .eyebrow{margin:0}.table-head,.check-row{display:grid;grid-template-columns:minmax(230px,1fr) 182px minmax(190px,.55fr);gap:12px;align-items:center;padding:12px 22px}.table-head{font-size:10px;text-transform:uppercase;letter-spacing:.1em;font-weight:800;color:#75827a;background:#fff}.check-row{border-top:1px solid #edf1ee;min-height:58px}.check-label{font-size:14px}.check-label b{display:inline-block;color:var(--green-2);min-width:38px;font-size:12px}.answer-group{display:flex;gap:5px}.answer{flex:1;position:relative;cursor:pointer}.answer input{position:absolute;opacity:0;inset:0}.answer span{display:grid;place-items:center;min-height:34px;padding:0 7px;border:1px solid var(--line);border-radius:8px;font-size:11px;font-weight:750;color:#65726b}.answer input:checked+span{background:var(--mint);color:var(--green);border-color:#9abca9}.answer input[value="KO"]:checked+span{background:#fff0ef;color:var(--red);border-color:#e8b8b5}.answer input[value="N.A."]:checked+span{background:#f3f1eb;color:#686351;border-color:#cbc7b7}.answer input:focus-visible+span{outline:2px solid #559075;outline-offset:2px}.check-note{font-size:12px;padding:9px 10px}.full-label textarea{resize:vertical;font-size:14px;font-weight:400}.photo-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(145px,1fr));gap:12px;margin-top:15px}.photo-item{position:relative;overflow:hidden;border:1px solid var(--line);border-radius:10px;background:#f8faf8}.photo-item img{width:100%;aspect-ratio:4/3;object-fit:cover;display:block}.photo-caption{display:block;width:100%;border:0;border-top:1px solid var(--line);padding:8px;font-size:12px}.photo-remove{position:absolute;right:7px;top:7px;border:0;border-radius:50%;width:28px;height:28px;background:#172520dc;color:#fff;cursor:pointer;font-size:16px}.upload-button{position:relative}.upload-button input{position:absolute;width:1px;height:1px;opacity:0;overflow:hidden}.signature-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:14px}.signature-box{min-width:0}.signature-title{display:flex;justify-content:space-between;gap:5px;align-items:center;font-size:13px;margin-bottom:6px}.text-button{border:0;background:transparent;color:var(--green-2);font-size:12px;font-weight:700;cursor:pointer}.signature-box canvas{display:block;width:100%;height:120px;border:1px dashed #afc0b6;border-radius:9px;background:#fbfdfb;touch-action:none}.signature-box small{font-size:10px;color:var(--muted)}.history-list{display:grid;gap:8px}.history-item{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:11px 12px;border:1px solid var(--line);border-radius:10px}.history-item strong,.history-item small{display:block}.history-item small{color:var(--muted);font-size:11px}.history-actions{display:flex;gap:7px}.history-actions button{border:1px solid var(--line);background:#fff;border-radius:8px;padding:7px 9px;font-size:11px;font-weight:700;color:var(--green);cursor:pointer}.history-actions .delete-record{color:var(--red)}.fine-print{font-size:11px;color:var(--muted);margin:12px 0 0}footer{text-align:center;color:#829087;font-size:11px;padding:22px}.toast{position:fixed;z-index:8;left:50%;bottom:22px;transform:translate(-50%,20px);opacity:0;background:#172520;color:white;border-radius:10px;padding:10px 15px;box-shadow:var(--shadow);transition:all .2s;pointer-events:none}.toast.show{transform:translate(-50%,0);opacity:1}
@media(max-width:760px){.topbar{height:62px;padding:0 16px}.page{margin:21px auto;padding:0 13px}.intro{display:block}.intro .muted{font-size:13px}.toolbar{justify-content:flex-start;margin-top:14px}.save-status{width:100%;margin:0 0 2px}.card{border-radius:13px;padding:17px;margin:12px 0}.form-grid{grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}.check-section .section-heading{padding:16px}.table-head{display:none}.check-row{grid-template-columns:1fr;gap:8px;padding:13px 16px}.check-label{font-size:14px}.answer-group{max-width:300px}.answer span{min-height:36px;font-size:12px}.check-note{font-size:13px}.signature-grid{grid-template-columns:1fr}.signature-box canvas{height:125px}.section-heading h2{font-size:18px}}
@media(max-width:380px){.form-grid{grid-template-columns:1fr}.toolbar .button{flex:1;padding:10px}.history-item{align-items:flex-start;flex-direction:column}.history-actions{width:100%}}
@media print{@page{size:A4;margin:14mm}html,body{background:#fff;font-size:10pt;color:#111}.topbar{position:static;height:auto;background:#fff;color:#111;box-shadow:none;padding:0 0 8mm;border-bottom:2px solid #123d35}.brand small{color:#555}.brand-mark{background:#e8f3ed;-webkit-print-color-adjust:exact;print-color-adjust:exact}.page{max-width:none;margin:0;padding:0}.intro{display:block;margin:8mm 0}.intro h1{font-size:22pt}.toolbar,.save-status,.upload-button,.text-button,.history-card,footer,.toast{display:none!important}.card{box-shadow:none;border:1px solid #bbb;border-radius:0;padding:5mm;margin:4mm 0;break-inside:avoid}.form-grid{grid-template-columns:repeat(4,1fr);gap:3mm}.form-grid input,.check-note,.full-label textarea{border:0;border-bottom:1px solid #aaa;border-radius:0;padding:2px 0;background:transparent;box-shadow:none;font-size:9pt;min-height:0}.form-grid label,.full-label{font-size:8pt}.check-section{break-inside:auto}.check-section .section-heading{padding:3mm 5mm;background:#edf3ef!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}.check-row{grid-template-columns:minmax(200px,1fr) 135px minmax(130px,.5fr);padding:2.2mm 5mm;min-height:0;break-inside:avoid}.check-label{font-size:9pt}.answer span{min-height:0;padding:2px 4px;font-size:7pt;border-color:#aaa}.answer input:not(:checked)+span{color:transparent}.check-note{font-size:8pt}.photo-item{break-inside:avoid}.photo-list{grid-template-columns:repeat(4,1fr)}.signature-box canvas{height:28mm;background:#fff}.signature-grid{gap:5mm}.muted{font-size:9pt}.section-heading h2{font-size:13pt}.eyebrow{font-size:7pt}}
.button-quiet-dark{border:1px solid var(--line);background:#fff;color:var(--green)}
.guide-card{padding:17px 21px}.guide-top{display:flex;justify-content:space-between;align-items:center;gap:14px}.guide-top strong{font-size:16px}.progress-track{height:9px;border-radius:10px;background:#e8eeea;overflow:hidden;margin:12px 0 8px}.progress-track span{display:block;width:0;height:100%;border-radius:inherit;background:linear-gradient(90deg,#1e5a4c,#72aa86);transition:width .25s}.guide-hint{font-size:12px;color:var(--muted);margin:0}.section-progress{font-size:12px;font-weight:750;color:var(--green-2);padding:6px 10px;border-radius:20px;background:#e8f3ed;white-space:nowrap}
.history-actions button[data-share-record]{background:var(--mint);border-color:transparent}
@media(max-width:760px){.toolbar{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));width:100%}.toolbar .save-status{grid-column:1/-1}.toolbar .button{width:100%;white-space:normal}.guide-card{padding:15px}.guide-top{align-items:flex-start}.guide-top .button{padding:9px 11px}.section-progress{font-size:11px}}
.book-shell{margin-top:12px}.chapter-nav{display:flex;gap:8px;overflow-x:auto;scrollbar-width:thin;padding:5px 2px 12px;margin-bottom:4px;overscroll-behavior-x:contain}.chapter-tab{flex:none;display:flex;align-items:center;gap:8px;max-width:235px;border:1px solid #d7e0d9;background:#fff;color:#53635b;border-radius:999px;padding:8px 13px;font-size:12px;font-weight:700;cursor:pointer;white-space:nowrap}.chapter-tab span{display:grid;place-items:center;width:22px;height:22px;border-radius:50%;background:#edf2ee;color:#5e7167;font-size:11px}.chapter-tab.active{background:var(--green);color:#fff;border-color:var(--green)}.chapter-tab.active span{background:#d6e9dd;color:var(--green)}.book-paper{background:linear-gradient(90deg,#e7ebe7,#f4f6f3 38px,#f4f6f3);border:1px solid #dce4de;border-radius:18px;padding:16px 19px 8px;box-shadow:0 8px 26px rgba(35,55,45,.08)}.book-running-head{display:flex;justify-content:space-between;align-items:center;border-bottom:1px solid #dbe3dd;padding:0 5px 11px;margin-bottom:5px;color:#6c7972;font-size:11px;font-weight:700;letter-spacing:.04em}.book-page[hidden]{display:none!important}.book-page.page-enter{animation:pageTurn .22s ease-out}@keyframes pageTurn{from{opacity:.35;transform:translateX(9px)}to{opacity:1;transform:translateX(0)}}.book-paper>.book-page>.card,.book-paper>.book-page>.check-section{margin:11px 0}.chapter-page .section-headline h2,.final-page .section-heading h2{font-family:Georgia,"Times New Roman",serif;font-size:23px;letter-spacing:-.02em}.page-turner{display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:12px;padding:13px 4px 3px}.page-turner button:first-child{justify-self:start}.page-turner button:last-child{justify-self:end}.page-turner button:disabled{opacity:.45;cursor:not-allowed}.page-turner span{font-size:12px;color:var(--muted);font-weight:700}.archive-page .history-card{margin-bottom:4px}
@media(max-width:760px){.book-paper{padding:12px 10px 4px;border-radius:14px;background:linear-gradient(90deg,#e7ebe7,#f7f8f6 20px,#f7f8f6)}.book-running-head{padding:0 4px 9px;margin-bottom:2px}.chapter-tab{padding:7px 11px;font-size:11px}.chapter-tab span{width:20px;height:20px}.page-turner{position:sticky;bottom:0;z-index:3;background:#f2f5f2ed;backdrop-filter:blur(8px);margin:0 -4px;padding:10px 4px calc(10px + env(safe-area-inset-bottom));border-top:1px solid var(--line)}.page-turner button{padding:10px 13px}.chapter-page .section-headline h2,.final-page .section-heading h2{font-size:20px}}

/* The contents behave like a compact book index on desktop and a swipeable
   chapter rail on phones. */
.chapter-nav{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px;padding:4px 0 12px;overflow:visible}
.chapter-tab{max-width:none;min-width:0;min-height:44px;white-space:normal;line-height:1.25;border-radius:12px;padding:8px 10px;justify-content:flex-start}
.chapter-tab span{flex:none}
.book-paper{padding:17px 21px 9px}
.book-running-head{padding:0 7px 12px}
.chapter-page .check-section{overflow:hidden}
.chapter-page .section-heading{min-height:76px}
.check-row:nth-of-type(even){background:#fbfcfb}
.page-turner{min-height:60px}
@media(max-width:760px){
  .chapter-nav{display:flex;gap:7px;overflow-x:auto;scrollbar-width:none;padding:4px 0 11px;scroll-snap-type:x proximity}
  .chapter-nav::-webkit-scrollbar{display:none}
  .chapter-tab{min-height:38px;max-width:230px;white-space:nowrap;border-radius:999px;padding:7px 10px;scroll-snap-align:start}
  .book-paper{padding:12px 10px 4px}
  .book-running-head{padding:0 4px 9px}
  .chapter-page .section-heading{min-height:66px}
}
@media(max-width:430px){
  .guide-top{display:grid;grid-template-columns:1fr;gap:10px}
  .guide-top .button{width:100%}
  .chapter-tab{max-width:205px}
  .page-turner{grid-template-columns:1fr auto 1fr;gap:6px}
  .page-turner button{font-size:13px;padding:10px 9px}
}
.progress-meter{display:flex;align-items:center;gap:12px}
.progress-meter .progress-track{flex:1;min-width:0;margin:12px 0 8px}
.progress-value{display:grid;justify-items:end;gap:2px;min-width:54px}
.progress-percent{color:var(--green-2);font-size:13px;line-height:1;font-variant-numeric:tabular-nums}
.progress-value small{color:var(--muted);font-size:9px;line-height:1}
.chapter-page .section-headline{min-width:0}
.chapter-page .section-headline>div{min-width:0}
.chapter-page .section-number{width:38px;height:38px;border-radius:12px;margin-right:12px;font-size:15px}
.chapter-page .section-headline h2,.final-page .section-heading h2{font-family:inherit;font-size:clamp(19px,2.2vw,22px);font-weight:750;line-height:1.2;letter-spacing:-.025em;color:var(--ink);text-wrap:balance}
.chapter-page .section-headline .eyebrow{margin-bottom:4px;font-size:10px}
.chapter-page .section-progress{margin-top:4px}
@media(max-width:760px){
  .chapter-page .section-heading{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:start;gap:7px 10px;min-height:0;padding:17px 18px}
  .chapter-page .section-headline{grid-column:1/-1;align-items:flex-start}
  .chapter-page .section-headline h2,.final-page .section-heading h2{font-size:20px;line-height:1.22}
  .chapter-page .section-progress{grid-column:2;grid-row:2;margin:0}
}
.chapter-page .section-heading,.chapter-page .section-headline,.chapter-page .section-headline>div{min-width:0;max-width:100%}
.chapter-page .section-headline h2{overflow-wrap:anywhere}
.form-grid label,.form-grid input{min-width:0;max-width:100%}
.form-grid input{width:100%}
.toolbar,.toolbar .button{min-width:0}
@media(max-width:430px){
  .metadata .form-grid{grid-template-columns:minmax(0,1fr)}
  .chapter-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:4px 0 11px;overflow:visible;scroll-snap-type:none}
  .chapter-tab{width:100%;max-width:none;min-width:0;min-height:42px;white-space:normal;border-radius:11px;padding:8px 9px;line-height:1.2}
  .chapter-tab-label{min-width:0;overflow-wrap:anywhere}
  .toolbar .button{overflow-wrap:anywhere}
}

/* Keep book pages and native mobile inputs inside the phone viewport. */
.book-shell,.book-paper,.book-page,.metadata.card,.metadata .form-grid{min-width:0;max-width:100%}
.metadata .form-grid>label{min-width:0}
.metadata .form-grid input{display:block;min-width:0;max-width:100%;width:100%}
.book-running-head>span{min-width:0;overflow-wrap:anywhere}
@media(max-width:480px){
  .metadata .form-grid{grid-template-columns:minmax(0,1fr)}
  .chapter-nav{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:4px 0 11px;overflow:visible;scroll-snap-type:none}
  .chapter-tab{width:100%;max-width:none;min-width:0;min-height:42px;white-space:normal;border-radius:11px;padding:8px 9px;line-height:1.2}
  .chapter-tab-label{min-width:0;overflow-wrap:anywhere}
}

@media(max-width:480px){
  .page{width:100%;max-width:100%;padding-left:12px;padding-right:12px}
  .book-shell,.book-paper,.book-page,.book-page>.card,.book-page>.check-section{width:100%;max-width:100%;min-width:0}
  .book-paper{padding-left:9px;padding-right:9px}
  .book-running-head{gap:8px}
  .book-running-head>span:last-child{flex:none;white-space:nowrap}
  .chapter-page .section-heading{grid-template-columns:minmax(0,1fr) auto}
  .chapter-page .section-headline{width:100%;max-width:100%}
  .chapter-page .section-headline h2{font-size:19px;overflow-wrap:anywhere}
  .chapter-page .section-number{margin-right:9px;flex:0 0 36px}
}

/* The shared span rule is only for the circular chapter number/icon. */
.chapter-tab>.chapter-tab-label{display:block;width:auto;height:auto;min-width:0;flex:1;border-radius:0;background:transparent;color:inherit;font-size:inherit;line-height:inherit;text-align:left;overflow-wrap:anywhere}
.chapter-tab.active>.chapter-tab-label{background:transparent;color:inherit}

/* JUCLAS brand lockup */
.brand{gap:12px;min-width:0}
.brand-logo{display:block;width:150px;height:auto;max-height:42px;object-fit:contain;background:#fff;border-radius:7px;padding:5px 7px;flex:none}
.brand-copy{min-width:0}
.brand-copy strong{font-size:15px;line-height:1.2}
.brand-copy small{font-size:11px;line-height:1.25}
@media(max-width:480px){
  .topbar{padding-left:14px;padding-right:14px}
  .brand{gap:9px}
  .brand-logo{width:126px;max-height:37px;padding:4px 6px}
  .brand-copy strong{font-size:13px}
  .brand-copy small{font-size:10px}
}

.report-reference{margin:7px 0 10px;color:var(--green-2);font-size:13px;font-weight:750;overflow-wrap:anywhere}.history-item>div:first-child{min-width:0;overflow-wrap:anywhere}.history-item>div>span{display:block;font-size:13px}.history-item strong{overflow-wrap:anywhere}
