/* v4 page "guide" (21 articles): page-only rules. The article body is the old guide body, so this file restyles the
   class names those bodies use (.warning-box, .step-item, .stat-box, .faq-item ...) in the V4 tokens, scoped to .g-body.
   No orange except the one main button. Shared components come from v4.css / v4-components.css. */
.g-head{background:var(--pale);border-bottom:1px solid var(--line);padding:44px 0 34px}
.g-kind{font:600 16px/1.3 var(--body);color:var(--muted);margin-bottom:14px}
.g-kind a{color:var(--navy-2)}
.g-head h1{font-size:clamp(32px,4.2vw,48px);font-weight:620;max-width:20em;line-height:1.1}
.g-head .sub{font-size:20px;line-height:1.5;color:var(--ink);max-width:46em;margin-top:16px}
.g-meta{list-style:none;margin:22px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:10px 28px;color:var(--muted);font-size:16px}
.g-meta li{display:flex;align-items:center;gap:10px}
.g-meta .ic-tile{margin:0}

.g-main{background:#fff;padding:48px 0 36px}
.g-layout{display:grid;grid-template-columns:260px minmax(0,780px);gap:56px;justify-content:center;align-items:start}
.g-toc{position:sticky;top:20px}
.g-toc-box{max-height:calc(100vh - 40px);overflow-y:auto;overscroll-behavior:contain;background:var(--sand);border-radius:var(--radius);padding:16px 20px;border-top:3px solid var(--navy)}
.g-toc-box summary{display:flex;align-items:center;gap:12px;cursor:pointer;list-style:none;font:600 19px/1.2 var(--head);color:var(--navy);min-height:44px}
.g-toc-box summary::-webkit-details-marker{display:none}
.g-toc-box .ic-tile{margin:0}
.g-toc ol{margin:8px 0 0;padding-left:20px;font-size:16px}
.g-toc li{padding:0}
.g-toc li::marker{color:var(--navy);font-weight:700}
.g-toc a{display:flex;align-items:center;min-height:44px;line-height:1.3;color:var(--ink);text-decoration:none}
.g-toc a:hover{color:var(--navy);text-decoration:underline;text-decoration-thickness:2px;text-underline-offset:4px}

.g-article{min-width:0;font-size:18px;line-height:1.7;color:var(--ink)}
.g-article.solo{grid-column:1/-1;max-width:780px;margin:0 auto}
.g-note{font-size:16px;color:var(--muted);margin:32px 0 0}

/* byline partial (its own inline <style> is removed by the builder) */
.g-article .eeat-wrap{margin:0 0 28px;padding:0}
.g-article .eeat-byline{display:flex;align-items:center;gap:14px;background:var(--pale);border:1px solid var(--line);border-radius:12px;padding:12px 16px;font-size:16px;line-height:1.5;color:var(--ink)}
.g-article .eeat-byline img{width:56px;height:56px;border-radius:50%;object-fit:cover;flex:0 0 56px}
.g-article .eeat-byline p{margin:0;color:var(--ink)}
.g-article .eeat-byline a{color:var(--navy-2);font-weight:600}
.g-article .eeat-byline .eeat-meta{color:var(--muted);font-size:15px}

/* the old body */
.g-body{max-width:none}
.g-body :is(.container,.guide-content,.faq-section,.sources-section){max-width:none;padding:0}
.g-body>*:first-child{margin-top:0}
.g-body p,.g-body li,.g-body td,.g-body th,.g-body dd{color:var(--ink);font-size:inherit}
.g-body p{margin:0 0 1.1em;line-height:1.7}
.g-body h2{font-size:clamp(26px,2.6vw,33px);font-weight:620;margin:2em 0 .6em;padding-top:18px;border-top:2px solid var(--line);scroll-margin-top:16px}
.g-body h3{font-size:21px;margin:1.5em 0 .4em;color:var(--navy)}
.g-body h4{font:650 18px/1.3 var(--body);color:var(--navy);margin:1.2em 0 .3em}
.g-body ul,.g-body ol{margin:0 0 1.2em;padding-left:1.4em}
.g-body li{margin:.35em 0;line-height:1.6}
.g-body li::marker{color:var(--navy)}
.g-body a{color:var(--navy-2);overflow-wrap:anywhere}
.g-body a:hover{color:var(--navy);text-decoration-thickness:2px;background:#E8EEF6;border-radius:3px}
.g-body strong{color:var(--navy)}
.g-body img{border-radius:var(--radius);margin:1.2em 0}
.g-body input,.g-body select,.g-body textarea{width:100%;min-height:44px;padding:9px 12px;border:1.5px solid #8795A8;border-radius:8px;background:#fff;color:var(--ink);font-size:17px}
.g-body label{display:block;font-size:16px;font-weight:650;color:var(--navy);margin-bottom:6px}
.g-body button,.g-body a.btn{display:inline-flex;align-items:center;justify-content:center;min-height:44px;padding:10px 22px;border:2px solid var(--navy);border-radius:8px;background:var(--navy);color:#fff;font-weight:650;font-size:17px;text-decoration:none;cursor:pointer}
.g-body button:hover,.g-body a.btn:hover{background:var(--navy-2);color:#fff}
.g-body .faq-q{display:flex;align-items:center;min-height:44px;width:100%;cursor:default;justify-content:flex-start;text-align:left;background:transparent;color:var(--navy);border:0;border-radius:0;padding:12px 0;font:650 18px/1.35 var(--body)}
.g-body .faq-q:hover{background:transparent;color:var(--navy)}
.g-body .faq-chevron{display:none}
.g-body .faq-a{display:block!important;max-height:none!important;padding:0 0 10px!important}

/* tables scroll sideways on a phone (wrapper from prepare_body) */
.b-tablewrap,.g-body .mat-table-wrap,.g-body .license-table-wrap{overflow-x:auto;margin:1.5em 0;border:1px solid var(--line);border-radius:var(--radius);-webkit-overflow-scrolling:touch}
.b-tablewrap:focus-visible{outline:3px solid var(--ring)}
.g-body table{border-collapse:collapse;width:100%;min-width:520px;margin:0;font-size:16px;line-height:1.4}
.g-body caption{padding:14px 16px 10px;font:600 18px/1.3 var(--head);color:var(--navy);text-align:left}
.g-body th{background:var(--navy);color:#fff;border:0;padding:11px 14px;font-weight:650;text-align:left}
.g-body td{border:0;border-top:1px solid var(--line);padding:10px 14px;vertical-align:top}
.g-body tbody tr:nth-child(even){background:var(--pale)}
.g-body .example-box table{min-width:0}
.g-body .example-box .b-tablewrap{border:0}

/* boxes: one family, differing only by the border and the tint */
.g-body :is(.warning-box,.disclaimer-box,.example-box,.calc-box,.tldr-box,.note-box,.info-box,.coverage-box,.covered-card,.class-box,
  .test-box,.mistakes-box,.steps-box,.hail-box,.letter-template,.license-box,.license-card,.doi-card,.flag-card,.stat-box,.check-item,
  .line-item,.checklist-section,.questions-list,.ask-list){background:var(--pale);border:1px solid var(--line);border-radius:var(--radius);padding:20px 24px;margin:1.5em 0}
.g-body :is(.warning-box,.mistakes-box,.flag-card,.coverage-box.no,.covered-card.no){background:var(--sand);border-color:#C9B48F;border-left:5px solid #8A5A00}
.g-body :is(.warning-box,.mistakes-box,.flag-card,.coverage-box.no,.covered-card.no) h3{color:#6B4400}
.g-body :is(.coverage-box.yes,.covered-card.yes,.tldr-box,.class-box.c4){border-left:5px solid var(--navy)}
.g-body :is(.disclaimer-box,.note-box,.info-box){border-left:5px solid #546073}
.g-body :is(.warning-box,.disclaimer-box,.example-box,.calc-box,.tldr-box,.note-box,.info-box,.coverage-box,.covered-card,.class-box,.test-box,
  .mistakes-box,.steps-box,.hail-box,.license-box,.license-card,.doi-card,.flag-card,.stat-box,.check-item,.line-item) :is(h3,h4):first-child{margin-top:0}
.g-body :is(.warning-box,.tldr-box,.note-box,.info-box,.disclaimer-box) p:last-child{margin-bottom:0}
.g-body .tag{display:inline-block;padding:2px 10px;border-radius:999px;background:#fff;border:1px solid var(--line);font-size:14px;font-weight:650;color:var(--navy)}
.g-body .tag.critical{background:#FBE9E7;border-color:#B3261E;color:#8C1D18}

/* grids */
.g-body :is(.calc-grid,.coverage-grid,.covered-grid,.class-compare,.flag-grid,.license-grid,.doi-grid,.stat-row){display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:16px;margin:1.2em 0}
.g-body .stat-row{grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.g-body :is(.coverage-grid,.covered-grid,.class-compare,.flag-grid,.license-grid,.doi-grid,.stat-row)>*{margin:0}
.g-body .stat-box{text-align:left}
.g-body .stat-box .num{display:block;font:650 34px/1.1 var(--head);color:var(--navy)}
.g-body .stat-box .label{display:block;font-size:15px;color:var(--muted)}

/* calculator */
.g-body .calc-result{display:none;margin-top:18px;padding:16px 18px;background:#fff;border:1px solid var(--line);border-radius:10px}
.g-body .calc-result.show{display:block}
.g-body .calc-result .row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--line)}
.g-body .calc-result .row:last-child{border-bottom:0;font-weight:700}

/* numbered steps */
.g-body .steps-list{list-style:none;margin:1.4em 0;padding:0}
.g-body .step-item{display:flex;gap:16px;align-items:flex-start;padding:16px 0;border-top:1px solid var(--line)}
.g-body .step-item:first-child{border-top:0}
.g-body .step-circle{flex:0 0 40px;width:40px;height:40px;display:grid;place-items:center;border-radius:50%;background:var(--navy);color:#fff;font-weight:700}
.g-body .step-body{min-width:0;flex:1}
.g-body .step-body h3{margin:0 0 4px}
.g-body .step-body .tip{margin-top:8px;padding:10px 14px;background:#fff;border:1px solid var(--line);border-radius:8px;font-size:16px}
.g-body .check-item .num{color:var(--navy);font-weight:700}
.g-body .check-icon{display:inline-block;margin-right:8px;color:var(--navy)}
.g-body .yes{color:var(--navy);font-weight:650}
.g-body .no{color:#6B4400;font-weight:650}
.g-body .rating-row{display:flex;justify-content:space-between;gap:12px;padding:6px 0;border-bottom:1px solid var(--line)}
.g-body .rating-row:last-child{border-bottom:0}

/* old call-to-action card: a quiet card, never a second orange button */
.g-body .guide-cta{background:var(--sand);border:1px solid var(--line);border-radius:var(--radius);padding:24px 26px;margin:2em 0}
.g-body .guide-cta h2{margin:0 0 8px;padding:0;border:0;font-size:26px}
.g-body .guide-cta p{margin-bottom:16px}
.g-body .guide-cta .cta-links{display:flex;flex-wrap:wrap;gap:4px 18px}
.g-body .guide-cta .cta-links a{display:inline-flex;align-items:center;min-height:44px}
.g-body .city-links{display:flex;flex-wrap:wrap;gap:4px 16px}
.g-body .city-links a{display:inline-flex;align-items:center;min-height:44px}
.g-body .faq-section{margin-top:2.4em}
.g-body .faq-item{padding:14px 0;border-top:1px solid var(--line)}
.g-body .faq-item h3{margin:0 0 6px;font-size:19px}
.g-body .faq-item p{margin:0}
.g-body .sources-section ul{font-size:16px;line-height:1.6;overflow-wrap:anywhere}
.g-body .sources-section li{margin:.5em 0}
.g-body pre,.g-body .letter-template{white-space:pre-wrap;font:16px/1.6 var(--body)}

/* related */
.g-related{background:var(--sand);padding:56px 0}
.g-related .section-head{margin-bottom:24px}
.g-cards{list-style:none;margin:0;padding:0;display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:20px}
.g-card{display:flex;flex-direction:column;gap:6px;height:100%;min-height:44px;padding:20px 22px;background:#fff;border:1px solid var(--line);border-radius:var(--radius);text-decoration:none;color:var(--ink)}
.g-card:hover{border-color:var(--navy)}
.g-card b{font:600 21px/1.25 var(--head);color:var(--navy)}
.g-card-k{font-size:15px;color:var(--muted)}
.g-card-b{font-size:16px;line-height:1.5;color:var(--muted)}
.g-all{margin-top:22px}
.g-all .text-link{display:inline-flex;align-items:center;min-height:44px}

.g-end{background:var(--pale);padding:48px 0;border-top:1px solid var(--line)}
.g-end-row{display:flex;align-items:center;gap:24px}
.g-end-row .ic-tile{margin:0;flex:0 0 48px}
.g-end-row h2{font-size:clamp(26px,2.6vw,34px)}
.g-end-row p{margin-top:8px;max-width:58ch;color:var(--ink)}
.g-end-actions{margin-left:auto;display:flex;flex-direction:column;align-items:flex-start;gap:6px}
.g-end-actions .text-link{display:inline-flex;align-items:center;min-height:44px}

@media (max-width:1100px){
 .g-layout{grid-template-columns:minmax(0,780px);gap:24px}
 .g-toc{position:static}
 .g-cards{grid-template-columns:1fr 1fr}
}
@media (max-width:700px){
 .g-head{padding:30px 0 26px}
 .g-head .sub{font-size:18px}
 .g-main{padding-top:28px}
 .g-article{font-size:17.5px}
 .g-body :is(.calc-grid,.coverage-grid,.covered-grid,.class-compare,.flag-grid,.license-grid,.doi-grid){grid-template-columns:1fr}
 .g-body :is(.warning-box,.disclaimer-box,.example-box,.calc-box,.tldr-box,.note-box,.info-box,.coverage-box,.covered-card,.class-box,.test-box,.mistakes-box,.steps-box,.hail-box,.letter-template,.license-box,.license-card,.doi-card,.flag-card,.stat-box,.check-item,.line-item,.checklist-section){padding:16px 16px}
 .g-cards{grid-template-columns:1fr}
 .g-end-row{flex-direction:column;align-items:flex-start}
 .g-end-actions{margin-left:0;width:100%}
 .g-end-actions .button{width:100%}
}
