/* Sun Safe R&D: lab notebook look. Loaded last on every R&D page; overrides rd.css and the pages' own styles.
   Graph paper ground, white sheets with a red margin rule, IBM Plex Serif text, IBM Plex Mono for data and labels. */
:root{--rd-navy:#1E2430;--rd-navy2:#1E2430;--rd-gold:#D9534F;--rd-sun:#B42318;--rd-ink:#1E2430;--rd-soft:#5B6575;--rd-line:#B9C4D2;--rd-bg:#F6F8F4;
 --rd-sans:"IBM Plex Serif",Georgia,serif;--rd-mono:"IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace;
 --navy:#1E2430;--soft:#5B6575;--line:#B9C4D2;--bg:#F6F8F4;--sans:"IBM Plex Serif",Georgia,serif;--mono:"IBM Plex Mono",ui-monospace,Menlo,Consolas,monospace;
 --nb-grid:#DCE5EF;--nb-margin:#D9534F;--nb-link:#1F3A8A}
html body{background-color:#F6F8F4;background-image:linear-gradient(var(--nb-grid) 1px,transparent 1px),linear-gradient(90deg,var(--nb-grid) 1px,transparent 1px);background-size:24px 24px;color:#1E2430;font-family:"IBM Plex Serif",Georgia,serif}
.rd-page{font-size:16.5px;line-height:1.6}
html body a{color:var(--nb-link)}
html body a:hover{color:#B42318}

/* R&D header: its own bar, nothing from the tools site */
.rd-nav{background:#F6F8F4;border-bottom:2px solid #1E2430}
.rd-brand,.rd-nav .rd-brand,.rd-page .rd-nav .rd-brand{font:600 13.5px var(--rd-mono);letter-spacing:.1em;color:#1E2430}
.rd-brand i{color:#B42318}
.rd-nav ul a{font:500 13.5px var(--rd-mono);color:#1E2430;letter-spacing:.02em}
.rd-nav ul a:hover,.rd-nav ul a[aria-current]{color:#B42318}
.rd-nav ul a[aria-current]{text-decoration:underline;text-underline-offset:6px;text-decoration-thickness:2px}

/* Sheets: white paper with the red margin rule */
.rd-hero,.rd-card.wide,html body .wrap>header,.rd-chart{background:#fff linear-gradient(90deg,transparent 30px,var(--nb-margin) 30px,var(--nb-margin) 31.5px,transparent 31.5px) no-repeat;
 border:1px solid #B9C4D2;border-radius:0;box-shadow:0 1px 0 #B9C4D2;padding-left:50px;color:#1E2430}
.rd-hero{padding:26px 26px 26px 50px;gap:24px}
.rd-hero h1{font:600 clamp(28px,5vw,44px)/1.1 var(--rd-sans);color:#1E2430}
.rd-hero p{color:#3A4352;font-size:17.5px;line-height:1.55}
.rd-heroimg>img{display:none}
.rd-hero .rd-heroimg img.ph{border:8px solid #fff;border-radius:0;box-shadow:0 2px 8px rgba(30,36,48,.28);transform:rotate(1.5deg);width:clamp(180px,40vw,300px);height:clamp(140px,30vw,220px)}
.rd-badge{background:transparent;color:#B42318;border:2px solid #B42318;border-radius:0;font:600 12.5px var(--rd-mono);letter-spacing:.06em;padding:5px 10px;transform:rotate(-2deg);margin-top:14px}

.rd-page h2,html body .wrap>h2{font:600 14px var(--rd-mono);letter-spacing:.1em;text-transform:uppercase;color:#1E2430;margin:34px 0 12px;padding-bottom:6px;border-bottom:1.5px solid #1E2430}
.rd-card,html body .card,html body .ref,html body .shock,html body .docs{background:#fff;border:1px solid #B9C4D2;border-left:1px solid #B9C4D2;border-radius:0;box-shadow:0 1px 0 #B9C4D2}
.rd-card h3,html body .card h3,html body .ref h3,html body .shock h3,html body .doc h3,.rd-chart h3{font:600 18px var(--rd-sans);color:#1E2430}
.rd-card.go:hover{transform:none;box-shadow:0 0 0 2px #1E2430}
.rd-card .more{font:600 13.5px var(--rd-mono);color:var(--nb-link)}
.rd-card p,.rd-card ul,.rd-steps,.rd-math dd{font-size:15.5px}

/* Numbers and data in mono */
.rd-stat{background:#fff;border:1px solid #B9C4D2;border-radius:0}
.rd-stat b{font-family:var(--rd-mono);font-weight:600;color:#1E2430}
.rd-stat .st{font:600 14px var(--rd-mono);border-bottom:1.5px solid var(--nb-margin)}
.rd-tbl,html body .vt,html body .ref table{font-family:var(--rd-mono);font-size:13.5px}
.rd-tbl th,.rd-tbl th{background:#fff;color:#1E2430;border:0;border-bottom:2px solid #1E2430;font:600 12px var(--rd-mono);letter-spacing:.04em}
.rd-tbl td{border:0;border-bottom:1px solid var(--nb-grid)}
html body .vt th{background:#fff;border-bottom:2px solid #1E2430}
.rd-scroll{border-radius:0;border-color:#B9C4D2;background:#fff}
.rd-eq{background:#FBFBF8;border-radius:0;font-family:var(--rd-mono)}
.rd-spec th{font-family:var(--rd-mono);font-size:13.5px;color:#1E2430}
.rd-spec td{font-family:var(--rd-mono);font-size:13.5px}

/* Pass/fail as ink stamps */
.rd-pf,html body .card .tag,.rd-pc .tg{font:600 11.5px var(--rd-mono);letter-spacing:.06em;border-radius:0;background:transparent}
.rd-pf.P{color:#146C43;background:transparent}.rd-pf.F{color:#B42318;background:transparent}.rd-pf.V{color:#8A4B12;background:transparent}
.rd-pc .tg.g{background:#1E2430;color:#fff}

/* Timeline: red rule, ink dots */
.rd-tl{border-left:2px solid var(--nb-margin)}
.rd-tl li::before{background:#1E2430;border-color:#F6F8F4}
.rd-tl b{font-family:var(--rd-mono);font-weight:600;color:#1E2430}
.rd-ph::before{content:"Photo · ";font:600 12px var(--rd-mono)}
.rd-ph{color:#1E2430}

/* Margin notes */
.rd-note,html body .note{background:#FFF8D6;border:1px solid #D8C26A;border-radius:0;color:#3B3214}

/* Flat buttons, no bevels */
.rd-btn,html body .btn{background:#fff;color:#1E2430;border:1.5px solid #1E2430;border-radius:0;box-shadow:none;font:600 14px var(--rd-mono)}
.rd-btn:active,html body .btn:active{transform:none;box-shadow:none;background:#EEF2F6}
.rd-btn.pri{background:#1E2430;color:#fff;border-color:#1E2430;box-shadow:none}
.rd-more>summary{color:#1E2430;font:600 14px var(--rd-mono)}
.rd-refs li:target{background:#FFF8D6}

/* Docs page and trial log headers become title sheets */
html body .wrap>header{padding:20px 20px 20px 50px}
html body .wrap>header img{display:none}
html body .wrap>header h1{font:600 clamp(22px,4vw,30px)/1.15 var(--rd-sans);color:#1E2430}
html body .wrap>header p,html body .wrap>header p a{color:#3A4352!important}
html body .wrap>header .side{color:#1E2430}
html body .tlog{border-radius:0;background:#fff}
html body .tlog b{color:#1E2430;font-family:var(--rd-mono)}
html body .doc code{font-family:var(--rd-mono)}

.rd-foot{font-family:var(--rd-mono);font-size:12.5px}
@media(max-width:700px){
 .rd-hero,.rd-card.wide,html body .wrap>header,.rd-chart{background-image:linear-gradient(90deg,transparent 14px,var(--nb-margin) 14px,var(--nb-margin) 15.5px,transparent 15.5px);padding-left:28px}
 .rd-hero{padding:20px 16px 20px 28px}
 .rd-hero .rd-heroimg img.ph{width:100%;height:200px}
}
.rd-hero .rd-heroimg>img{display:none}
.rd-hero .rd-heroimg{order:2;flex:1 1 300px;justify-content:center}
.rd-hero>div:not(.rd-heroimg){flex:999 1 420px;min-width:0}
html body a.rd-badge{color:#B42318;text-decoration:none}
html body .wrap>header{background:#fff linear-gradient(90deg,transparent 30px,#D9534F 30px,#D9534F 31.5px,transparent 31.5px) no-repeat;border-left:1px solid #B9C4D2}
html body .card.wit{border-left:1px solid #B9C4D2}
@media(max-width:700px){html body .wrap>header{background-image:linear-gradient(90deg,transparent 14px,#D9534F 14px,#D9534F 15.5px,transparent 15.5px)}}
html body.rd-page{background-color:#F6F8F4;background-image:linear-gradient(#DCE5EF 1px,transparent 1px),linear-gradient(90deg,#DCE5EF 1px,transparent 1px);background-size:24px 24px}
#tbl td:nth-child(2),#arch td:nth-child(2){white-space:nowrap}
/* No dead space: 8 status tiles as 4 x 2, long cards run full width in two text columns */
.rd-stats.s4{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(min-width:900px){.rd-stats.s4{grid-template-columns:repeat(4,minmax(0,1fr))}
 .rd-card.cols>ul,.rd-card.cols>ol{column-count:2;column-gap:40px}
 .rd-card.cols li{break-inside:avoid}}
/* Two-up rows so no column sits empty */
.nb-two{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:14px;align-items:stretch}
.nb-side{margin-top:12px}
.nb-stack{display:flex;flex-direction:column;gap:14px;min-width:0}
.nb-stack>.nb-fig{flex:1 1 auto}
.nb-fig{margin:0;display:flex;flex-direction:column}
.nb-fig svg{display:block;width:100%;height:auto;margin-top:8px}
.nb-fig figcaption{margin-top:auto;padding-top:8px;font:13px/1.5 var(--rd-mono);color:#5B6575}
.nb-fig figcaption b{color:#1E2430}
@media(max-width:860px){.nb-two{grid-template-columns:1fr}}
.nb-ta{margin-top:0}
.nb-ta .nb-stack>.rd-card{flex:1 1 auto}
.nb-charts{grid-template-columns:repeat(2,minmax(0,1fr))}
@media(max-width:860px){.nb-charts{grid-template-columns:1fr}}
html body .tlogs>.tlog:last-child:nth-child(4n+3){grid-column:span 2}
html body .tlogs>.tlog:last-child:nth-child(4n+2){grid-column:span 3}
html body .tlogs>.tlog:last-child:nth-child(4n+1){grid-column:1/-1}
@media(max-width:1000px){html body .tlogs>.tlog:last-child{grid-column:auto}}
/* Video stills strip */
.nb-strip{margin:10px 0 4px}
.nb-strip>div{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:8px}
.nb-strip img{display:block;width:100%;aspect-ratio:1/1;object-fit:cover;border:5px solid #fff;outline:1px solid #B9C4D2}
.nb-strip figcaption{margin-top:6px;font:12.5px/1.5 var(--rd-mono);color:#5B6575}
.nb-strip figcaption b{color:#1E2430}
@media(max-width:620px){.nb-strip>div{grid-template-columns:repeat(2,minmax(0,1fr))}}
.nb-pair{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;margin-top:10px}
.nb-pair img{display:block;width:100%;aspect-ratio:4/3;object-fit:cover;border:5px solid #fff;outline:1px solid #B9C4D2}
/* Chart text: plain English first, one worked example, log-cell reference folded away */
.rd-chart .nb-plain{margin:4px 0 6px;font:15px/1.6 var(--rd-sans);color:#1E2430}
.rd-chart .nb-ex{margin:0 0 8px;font:14.5px/1.6 var(--rd-sans);color:#1E2430;background:#FFF8D6;border-left:3px solid #D8C26A;padding:6px 10px}
.rd-chart .nb-ex b{font-family:var(--rd-mono);font-size:13px}
.nb-ref{margin-top:8px}
.nb-ref>summary{cursor:pointer;font:600 12.5px var(--rd-mono);color:#5B6575;list-style:none;min-height:32px;display:flex;align-items:center}
.nb-ref>summary::-webkit-details-marker{display:none}
.nb-ref[open]>summary{color:#1E2430}
.nb-ref p{margin:2px 0 0;font:12.5px/1.55 var(--rd-mono);color:#5B6575}
/* Red rubber stamp on the working field log */
.nb-stamp{display:inline-flex;flex-direction:column;align-items:center;gap:2px;padding:8px 16px;margin:4px 8px;border:3px double #C0262D;color:#C0262D;
 font:600 12.5px/1.3 var(--rd-mono);text-transform:uppercase;letter-spacing:.06em;transform:rotate(-4deg);text-align:center;opacity:.92;
 background:repeating-linear-gradient(45deg,transparent 0 3px,rgba(255,255,255,.35) 3px 4px);mix-blend-mode:multiply;flex:0 0 auto}
.nb-stamp b{font-size:17px;letter-spacing:.1em;font-weight:600}
.nb-stamp span{font-size:11px;letter-spacing:.04em}
html body .wrap>header.top{flex-wrap:wrap}
@media(max-width:700px){.nb-stamp{margin:6px auto 2px}}
/* Field photos of the problem */
.nb-field{margin:14px 0 0}
.nb-fgrid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));gap:8px;margin-top:8px}
.nb-fgrid img{display:block;width:100%;aspect-ratio:3/5;object-fit:cover;border:5px solid #fff;outline:1px solid #B9C4D2}
.nb-field figcaption{margin-top:8px;font:13px/1.55 var(--rd-mono);color:#5B6575}
.nb-field figcaption b{color:#1E2430}
@media(max-width:900px){.nb-fgrid{grid-template-columns:repeat(4,minmax(0,1fr))}}
@media(max-width:520px){.nb-fgrid{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:900px){.nb-fgrid>a:last-child{grid-column:span 2}.nb-fgrid>a:last-child img{aspect-ratio:6/5}}
@media(max-width:520px){.nb-fgrid>a:last-child{grid-column:span 3}.nb-fgrid>a:last-child img{aspect-ratio:9/5}}
/* R&D home: final summary */
.rd-stats.s2{grid-template-columns:repeat(2,minmax(0,1fr))}
.nb-sum{display:flex;flex-direction:column;gap:12px;min-width:0}
.nb-sum p{margin:0;background:#fff;border:1px solid #B9C4D2;padding:14px 16px;font-size:15.5px;line-height:1.6;flex:1 1 auto}
#industry li{margin:6px 0}
/* R&D home intro: plain first, science folded */
.nb-intro{margin-top:18px}
.nb-intro p{margin:0 0 10px;font-size:17px;line-height:1.65;max-width:78ch}
.nb-intro .nb-lead{font:600 clamp(21px,3vw,26px)/1.3 var(--rd-sans);color:#1E2430;margin-bottom:12px}
.nb-sci{margin-top:6px;border-top:1px solid #DCE5EF;padding-top:8px}
.nb-sci>summary{cursor:pointer;font:600 13.5px var(--rd-mono);letter-spacing:.06em;text-transform:uppercase;color:#1E2430;min-height:36px;display:flex;align-items:center}
.nb-sci ul{margin:6px 0 8px;padding-left:20px;font-size:15.5px;line-height:1.6}
.nb-sci li{margin:6px 0}
.nb-sci p{font-size:14.5px}
.nb-intro p{max-width:none}
@media(min-width:900px){.nb-intro .nb-cols{column-count:2;column-gap:40px}.nb-intro .nb-cols p{break-inside:auto}}
/* Field strips of five */
.nb-fgrid{grid-template-columns:repeat(5,minmax(0,1fr))}
.nb-field.nb-wide{grid-column:1/-1;margin:0}
@media(max-width:900px){.nb-fgrid{grid-template-columns:repeat(4,minmax(0,1fr))}.nb-fgrid>a:last-child{grid-column:1/-1}.nb-fgrid>a:last-child img{aspect-ratio:12/5}}
@media(max-width:520px){.nb-fgrid{grid-template-columns:repeat(3,minmax(0,1fr))}.nb-fgrid>a:last-child{grid-column:span 2}.nb-fgrid>a:last-child img{aspect-ratio:6/5}}
/* Featured source */
.nb-read{display:flex;flex-direction:column;gap:4px;background:#FFF8D6;border:1px solid #D8C26A;border-left:4px solid #B42318;padding:14px 18px;margin:0 0 14px}
.nb-read-k{font:600 12px var(--rd-mono);letter-spacing:.1em;text-transform:uppercase;color:#B42318}
.nb-read>a{font:600 clamp(19px,2.6vw,23px)/1.3 var(--rd-sans);color:#1E2430}
.nb-read-s{font-size:15px;color:#3A4352}
/* Sun Safe badge on the R&D title sheet, same as the main home, slightly smaller */
.rd-hero .rd-heroimg>img.nb-badge{display:block;width:170px;height:auto;max-width:170px;object-fit:contain;border:0;box-shadow:none;filter:drop-shadow(0 6px 14px rgba(0,0,0,.28));transform:none}
@media(max-width:700px){.rd-hero .rd-heroimg>img.nb-badge{width:118px;max-width:118px}.rd-hero .rd-heroimg{gap:14px}}
.nb-pipv{border-top:3px solid #B42318}
.nb-pipv p,.nb-pipv li{font-size:16px;line-height:1.6}
.nb-pipv ul{margin:6px 0 10px;padding-left:20px}
.nb-pipv li{margin:6px 0;break-inside:avoid}
@media(min-width:900px){.nb-pipv .nb-cols{column-count:2;column-gap:40px}}
@media(min-width:900px){.nb-pipv ul{column-count:2;column-gap:40px}.nb-pipv li:first-child{margin-top:0}}
.nb-mod{margin:0}
.nb-modw{display:grid;align-items:start;grid-template-columns:repeat(2,minmax(0,1fr));gap:0 40px;margin:6px 0 12px}
@media(max-width:760px){.nb-modw{grid-template-columns:1fr}}
/* Collapsible Method sections */
.nb-sec{margin:0}
.nb-sec>summary{list-style:none;cursor:pointer}
.nb-sec>summary::-webkit-details-marker{display:none}
.nb-sec>summary h2{display:flex;align-items:center;justify-content:space-between;gap:12px}
.nb-sec>summary h2::after{content:"+ show";font:600 12px var(--rd-mono);letter-spacing:.06em;color:#B42318;text-transform:none}
.nb-sec[open]>summary h2::after{content:"− hide"}
.nb-sec>summary h2::after{white-space:nowrap;flex:0 0 auto}
.nb-hl{margin:4px 0 10px;padding-left:20px;font-size:16.5px;line-height:1.6}
.nb-hl li{margin:5px 0;break-inside:avoid}
@media(min-width:900px){.nb-hl{column-count:2;column-gap:40px}}
.rd-stats>.rd-stat:last-child:nth-child(odd){grid-column:1/-1}
@media(min-width:900px){.rd-stats>.rd-stat:last-child:nth-child(odd){grid-column:auto}}
/* Trial records: one line per trial, not stacked boxes */
html body .tlogs{display:block;border-top:1px solid #B9C4D2;margin-top:10px}
html body .tlogs>.tlog,html body .tlogs>.tlog:last-child{display:flex;flex-wrap:wrap;align-items:center;gap:4px 14px;border:0;border-bottom:1px solid #DCE5EF;border-radius:0;padding:8px 0;background:transparent;grid-column:auto}
html body .tlog b{flex:0 0 auto;font-size:14.5px;min-width:9.5em}
html body .tlog span{flex:1 1 220px;font-size:13.5px}
html body .tlog .btn{padding:5px 12px;min-height:36px;font-size:13px}
@media(max-width:620px){
 html body .tlogs>.tlog,html body .tlogs>.tlog:last-child{display:grid;grid-template-columns:minmax(0,1fr) auto auto;gap:2px 8px;align-items:center}
 html body .tlog b{grid-column:1;grid-row:1;min-width:0;flex:none}
 html body .tlog span{grid-column:1;grid-row:2;flex:none;font-size:12.5px}
 html body .tlog .btn{grid-row:1/span 2;padding:4px 10px;min-height:34px}
}
/* Method: test circuit drawing */
.nb-sld{margin:0;background:#fff;border:1px solid #B9C4D2;box-shadow:0 1px 0 #B9C4D2;padding:12px}
.nb-sldw{overflow-x:auto}
.nb-sldw svg{display:block;width:100%;height:auto}
.nb-sld figcaption{margin-top:8px;font-size:15.5px;line-height:1.6;color:#1E2430}
.nb-sld figcaption b{font-family:var(--rd-mono);font-size:13.5px}
