/* =============================================
   Tank Logic — guide.css  v5  NATURE THEME
   ============================================= */

.read-progress { position: fixed; top: var(--nav-h); left: 0; right: 0; height: 3px; background: transparent; z-index: 300; pointer-events: none; }
.read-progress__bar { height: 100%; width: 0%; background: linear-gradient(90deg, var(--accent), var(--leaf)); transition: width 0.12s linear; }

.guide-hero { padding-top: calc(var(--nav-h) + 52px); padding-bottom: 48px; border-bottom: 1px solid var(--border); position: relative; overflow: hidden; }
.guide-hero::before { content: ''; position: absolute; width: 560px; height: 560px; border-radius: 50%; background: radial-gradient(circle, rgba(45,122,58,0.05) 0%, transparent 70%); top: -160px; right: -80px; pointer-events: none; }
.guide-hero__inner { max-width: 780px; position: relative; z-index: 1; }
.guide-hero__meta  { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-bottom: 20px; }
.guide-hero h1     { font-family: var(--font-head); font-size: clamp(1.75rem, 4vw, 2.6rem); font-weight: 800; letter-spacing: -0.032em; line-height: 1.18; color: var(--tx-hi); margin-bottom: 16px; }
.guide-hero__desc  { font-size: var(--sz-16); color: var(--tx); line-height: 1.75; max-width: 640px; margin-bottom: 24px; }
.guide-meta-row    { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 18px; border-top: 1px solid var(--border); }
.guide-meta-item   { display: inline-flex; align-items: center; gap: 5px; font-size: var(--sz-12); font-weight: 500; color: var(--tx-lo); background: var(--bg-2); border: 1px solid var(--border); border-radius: 100px; padding: 4px 10px; }
.guide-meta-item strong { color: var(--tx); font-weight: 600; }

.guide-layout { display: grid; grid-template-columns: minmax(0,1fr); gap: 44px; padding-block: 56px; align-items: start; }
.guide-body   { max-width: 740px; }

.guide-body h2 { font-family: var(--font-head); font-size: clamp(1.15rem, 2.2vw, 1.4rem); font-weight: 800; letter-spacing: -0.022em; line-height: 1.28; color: var(--tx-hi); margin-top: 56px; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.guide-body h2:first-child { margin-top: 0; }
.guide-body h3 { font-family: var(--font-head); font-size: var(--sz-16); font-weight: 700; letter-spacing: -0.018em; line-height: 1.35; color: var(--tx-hi); margin-top: 36px; margin-bottom: 12px; }
.guide-body p  { font-size: var(--sz-16); color: var(--tx); line-height: 1.82; margin-bottom: 20px; }
.guide-body ul, .guide-body ol { padding-left: 22px; margin-bottom: 22px; display: flex; flex-direction: column; gap: 9px; }
.guide-body ul { list-style: disc; }
.guide-body ol { list-style: decimal; }
.guide-body li { font-size: var(--sz-16); color: var(--tx); line-height: 1.76; padding-left: 4px; }
.guide-body strong { color: var(--tx-hi); font-weight: 600; }
.guide-body em     { color: var(--accent); font-style: normal; font-weight: 600; }
.guide-body a  { color: var(--water); text-decoration: underline; text-underline-offset: 2px; text-decoration-thickness: 1px; text-decoration-color: rgba(42,127,168,0.35); transition: color var(--t), text-decoration-color var(--t); }
.guide-body a:hover { color: var(--accent); text-decoration-color: var(--accent); }

/* Callouts */
.callout { border-radius: var(--r-lg); padding: 16px 18px; margin-block: 26px; display: flex; gap: 14px; align-items: flex-start; }
.callout-icon { font-size: 1.25rem; flex-shrink: 0; line-height: 1.5; margin-top: 1px; }
.callout-body { flex: 1; }
.callout-body strong { display: block; font-family: var(--font-head); font-size: var(--sz-13); font-weight: 700; margin-bottom: 5px; }
.callout-body p { font-size: var(--sz-13); margin-bottom: 0 !important; line-height: 1.68; }

.callout-tip { background: var(--accent-lo); border: 1px solid var(--accent-mid); border-left: 3px solid var(--accent); }
.callout-tip .callout-body strong { color: var(--accent); }
.callout-tip .callout-body p      { color: var(--tx); }

.callout-warning { background: rgba(200,134,10,0.06); border: 1px solid rgba(200,134,10,0.2); border-left: 3px solid var(--gold); }
.callout-warning .callout-body strong { color: var(--gold); }
.callout-warning .callout-body p      { color: var(--tx); }

.callout-info { background: var(--water-lo); border: 1px solid var(--water-mid); border-left: 3px solid var(--water); }
.callout-info .callout-body strong { color: var(--water); }
.callout-info .callout-body p      { color: var(--tx); }

/* Tables */
.guide-table-wrap { overflow-x: auto; margin-block: 26px; border: 1px solid var(--border); border-radius: var(--r-lg); }
.guide-table { width: 100%; border-collapse: collapse; font-size: var(--sz-13); }
.guide-table th { background: var(--bg-2); padding: 11px 15px; text-align: left; font-family: var(--font-head); font-size: var(--sz-10); font-weight: 700; text-transform: uppercase; letter-spacing: 0.07em; color: var(--tx-lo); border-bottom: 1px solid var(--border); }
.guide-table td { padding: 11px 15px; color: var(--tx); border-bottom: 1px solid var(--border); vertical-align: top; line-height: 1.6; }
.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:nth-child(even) td { background: var(--bg-2); }
.guide-table tr:hover td { background: rgba(45,122,58,0.03); }
.td-good    { color: var(--accent) !important; font-weight: 600; }
.td-bad     { color: var(--red)    !important; font-weight: 600; }
.td-neutral { color: var(--gold)   !important; font-weight: 600; }

/* Steps */
.steps-list { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; margin-block: 26px; }
.step-item  { display: flex; gap: 14px; align-items: flex-start; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 18px; box-shadow: var(--shadow-sm); transition: border-color 160ms, box-shadow 160ms; }
.step-item:hover { border-color: var(--accent-mid); box-shadow: var(--shadow-md); }
.step-num { flex-shrink: 0; width: 34px; height: 34px; border-radius: 50%; background: var(--accent); color: #fff; font-weight: 800; font-family: var(--font-head); font-size: var(--sz-12); display: flex; align-items: center; justify-content: center; transition: box-shadow 160ms var(--ease), transform 160ms var(--ease); }
.step-item:hover .step-num { box-shadow: 0 0 14px rgba(45,122,58,0.4); transform: scale(1.06); }
.step-body strong { display: block; font-family: var(--font-head); font-size: var(--sz-14); font-weight: 700; color: var(--tx-hi); margin-bottom: 5px; }
.step-body p { font-size: var(--sz-14); color: var(--tx); margin-bottom: 0 !important; line-height: 1.68; }

/* TOC */
.toc-panel { background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-xl); padding: 18px 20px; position: sticky; top: calc(var(--nav-h) + 14px); box-shadow: var(--shadow-sm); }
.toc-title { font-family: var(--font-head); font-size: var(--sz-10); font-weight: 700; text-transform: uppercase; letter-spacing: 0.09em; color: var(--tx-lo); margin-bottom: 12px; }
.toc-list  { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.toc-list a { display: flex; align-items: center; gap: 7px; font-size: var(--sz-12); color: var(--tx-lo); padding: 6px 8px; border-radius: var(--r-md); transition: background 120ms, color 120ms, border-left-color 120ms; line-height: 1.4; border-left: 2px solid transparent; }
.toc-list a::before { content: ''; width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: 0.3; flex-shrink: 0; transition: opacity 120ms; }
.toc-list a:hover        { background: var(--bg-2); color: var(--tx); }
.toc-list a:hover::before { opacity: 0.6; }
.toc-list a.active { color: var(--accent); background: var(--accent-lo); border-left-color: var(--accent); padding-left: 6px; font-weight: 600; }
.toc-list a.active::before { background: var(--accent); opacity: 1; }

.guide-sidebar { display: flex; flex-direction: column; gap: 16px; }

/* Related guides */
.related-guides { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--border); }
.related-guides h2 { font-family: var(--font-head); font-size: var(--sz-18); margin-bottom: 18px; }
.related-grid { display: grid; grid-template-columns: 1fr; gap: 10px; }
.related-card { display: flex; align-items: flex-start; gap: 12px; background: var(--bg-1); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px; box-shadow: var(--shadow-sm); transition: border-color 160ms, transform 160ms, box-shadow 160ms; }
.related-card:hover { border-color: var(--border-mid); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.related-card__icon { font-size: 1.2rem; flex-shrink: 0; width: 38px; height: 38px; background: var(--bg-2); border-radius: var(--r-md); display: flex; align-items: center; justify-content: center; transition: background 160ms; }
.related-card:hover .related-card__icon { background: var(--accent-lo); }
.related-card h4 { font-family: var(--font-head); font-size: var(--sz-13); font-weight: 700; color: var(--tx-hi); margin-bottom: 3px; }
.related-card p  { font-size: var(--sz-12); color: var(--tx-lo); margin: 0; line-height: 1.5; }

/* SEO section */
.seo-content { background: var(--bg-2); border-top: 1px solid var(--border); }
.seo-content__inner     { max-width: 720px; }
.seo-content__inner h2  { font-family: var(--font-head); font-size: var(--sz-18); margin-bottom: 14px; color: var(--tx-hi); }
.seo-content__inner h3  { font-family: var(--font-head); font-size: var(--sz-15); margin-top: 28px; margin-bottom: 9px; color: var(--tx-hi); }
.seo-content__inner p   { font-size: var(--sz-15); color: var(--tx); line-height: 1.78; margin-bottom: 10px; }
.seo-list { list-style: decimal; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.seo-list li { font-size: var(--sz-15); color: var(--tx); line-height: 1.7; padding-left: 4px; }
.guide-table td { font-size: var(--sz-13); }

@media (prefers-reduced-motion: reduce) {
  .step-item, .related-card, .toc-list a { transition: none !important; }
  .step-item:hover .step-num { transform: none !important; box-shadow: none !important; }
}
@media (min-width: 960px) { .guide-layout { grid-template-columns: minmax(0,1fr) 272px; } .related-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) { .guide-hero h1 { font-size: 1.7rem; } .guide-body p, .guide-body li { font-size: var(--sz-15); } .step-item { padding: 14px 15px; } .guide-layout { padding-block: 36px; } }

/* ── Author byline + bio (E-E-A-T) · added for AdSense authorship pass ── */
.byline{display:flex;align-items:center;gap:13px;margin:20px 0 0;flex-wrap:wrap}
.byline .avatar{width:42px;height:42px;border-radius:50%;background:var(--accent,#6FBF8E);color:#fff;font-family:var(--font-head,'Inter',sans-serif);font-weight:700;font-size:1.05rem;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.byline .who{display:flex;flex-direction:column;line-height:1.42}
.byline .name{color:var(--tx-hi,#FCFCFC);font-weight:600}
.byline .name a{color:var(--tx-hi,#FCFCFC);border-bottom:1px solid rgba(255,255,255,.22)}
.byline .name a:hover{border-color:var(--accent,#6FBF8E)}
.byline .cred{color:var(--tx-lo,#A8B5AA);font-size:.84rem}
.author-bio{display:flex;gap:16px;margin:40px 0 8px;padding:20px 22px;background:var(--bg-2,#101609);border:1px solid var(--border,rgba(255,255,255,.08));border-radius:12px;align-items:flex-start}
.author-bio .avatar{width:56px;height:56px;border-radius:50%;background:var(--accent,#6FBF8E);color:#fff;font-family:var(--font-head,'Inter',sans-serif);font-weight:700;font-size:1.4rem;display:flex;align-items:center;justify-content:center;flex:0 0 auto}
.author-bio .who{color:var(--accent,#6FBF8E);font-size:.72rem;letter-spacing:.12em;text-transform:uppercase;margin-bottom:5px}
.author-bio h3{font-family:var(--font-head,'Inter',sans-serif);color:var(--tx-hi,#FCFCFC);font-size:1.18rem;margin:0 0 7px}
.author-bio p{color:var(--tx,#C7D0C8);font-size:.93rem;line-height:1.65;margin:0}
.author-bio a{color:var(--accent,#6FBF8E)}
@media(max-width:640px){.author-bio{flex-direction:column}}

/* ── "From the fishroom" first-hand note (E-E-A-T, dark theme) ── */
.field-log{position:relative;margin:26px 0;padding:18px 20px 18px 22px;background:rgba(61,158,74,.07);border:1px solid var(--green-mid,rgba(61,158,74,.22));border-left:3px solid var(--accent,#6FBF8E);border-radius:10px}
.field-log__label{font-family:var(--font-head,'Inter',sans-serif);font-size:.7rem;letter-spacing:.14em;text-transform:uppercase;color:var(--leaf,#6FBF8E);margin-bottom:9px;font-weight:700}
.field-log p{margin:0 0 10px;color:var(--tx,#C7D0C8);line-height:1.65}
.field-log p:last-child{margin-bottom:0}
.field-log em{color:var(--tx-hi,#FCFCFC);font-style:italic}


/* ── v7 editorial refinement (section rules above headings, lead para, blockquote) ── */
.guide-body h2{ font-size:clamp(1.5rem,1rem + 1.4vw,2rem); font-weight:600; line-height:1.12;
  letter-spacing:-0.015em; margin-top:52px; margin-bottom:18px;
  padding-top:26px; padding-bottom:0; border-bottom:none; border-top:1px solid var(--border); }
.guide-body h2:first-child{ border-top:none; padding-top:0; margin-top:6px; }
.guide-body h3{ font-size:1.26rem; font-weight:600; margin-top:34px; letter-spacing:-0.012em; }
.guide-body > p:first-of-type{ font-size:1.16rem; color:var(--tx-hi); line-height:1.7; }
.guide-body blockquote{ margin:28px 0; padding:6px 0 6px 22px; border-left:3px solid var(--accent);
  font-family:var(--font-head); font-style:italic; font-size:1.28rem; line-height:1.4; color:var(--tx-hi); }

/* ── Editorial reading polish (light "Field Reference") ── */
.guide-body{ font-size:1rem; line-height:1.6; }
.guide-body > p:first-of-type{ font-size:1.16rem; color:var(--tx-hi); }
.guide-body h2{ font-family:var(--font-head); font-weight:600;
  font-size:clamp(1.5rem,1rem + 1.3vw,1.95rem); line-height:1.12; letter-spacing:-.01em;
  margin:2.7rem 0 1rem; padding-top:1.5rem; border-top:1px solid var(--border); scroll-margin-top:90px; }
.guide-body h2:first-of-type{ border-top:none; padding-top:0; margin-top:1.2rem; }
.guide-body h3{ font-family:var(--font-head); font-weight:600; font-size:1.28rem; margin:1.9rem 0 .55rem; }
.guide-body p{ margin:0 0 1.2rem; }
.guide-body ul, .guide-body ol{ margin:0 0 1.2rem; padding-left:1.35rem; }
.guide-body li{ margin:.42rem 0; }
.guide-body li::marker{ color:var(--accent); }
.guide-body blockquote{ border-left:3px solid var(--accent); padding:.3rem 0 .3rem 1.3rem;
  margin:1.7rem 0; font-family:var(--font-head); font-style:italic; font-size:1.2rem; color:var(--tx-hi); }
.guide-body a{ color:var(--water); border-bottom:1px solid rgba(21,105,126,.3); text-decoration:none; }
.guide-body a:hover{ border-color:var(--water); }
.crumbs, .breadcrumb, .guide-breadcrumb{ font-family:var(--font-mono); }

/* ── Mobile fit: nothing may exceed the viewport ── */
.guide-body, .guide-sidebar { min-width:0; max-width:100%; }
.guide-body img, .guide-body figure { max-width:100%; height:auto; }
.guide-body pre, .guide-body code { white-space:pre-wrap; word-break:break-word; }
@media (max-width:700px){
  .guide-body table { width:100%; table-layout:fixed; font-size:.74rem; }
  .guide-body th, .guide-body td { padding:7px 6px; overflow-wrap:break-word; }
  .guide-meta-row { flex-wrap:wrap; }
}
@media (max-width:700px){
  .guide-table { table-layout:fixed; font-size:.72rem; }
  .guide-table th, .guide-table td { padding:7px 6px; word-break:break-word; overflow-wrap:anywhere; }
}

/* ── Mobile tables: fit the screen, never scroll sideways ── */
@media (max-width: 640px){
  .guide-body table { width: 100%; table-layout: fixed; font-size: 0.82rem; }
  .guide-body th, .guide-body td { padding: 8px 6px; word-break: break-word; overflow-wrap: anywhere; }
}

/* ── Comparison tables (guide-body) ── */
.guide-body .table-wrap{ overflow-x:auto; margin:1.6rem 0; border:1px solid var(--border); border-radius:10px; }
.guide-body .table-wrap table{ margin:0; border:none; min-width:480px; }
.guide-body table{ width:100%; border-collapse:collapse; font-size:.94rem; margin:1.6rem 0; }
.guide-body thead th{ background:var(--bg-2); color:var(--tx-hi); font-weight:700; text-align:left; }
.guide-body th,.guide-body td{ padding:11px 14px; border-bottom:1px solid var(--border); vertical-align:top; }
.guide-body tbody tr:last-child td{ border-bottom:none; }
.guide-body tbody td:first-child{ background:var(--bg-1); }

/* ── FAQ accordion (guide-body) ── */
.guide-faq{ margin:1.2rem 0 0; border-top:1px solid var(--border); }
.guide-faq details{ border-bottom:1px solid var(--border); }
.guide-faq summary{ cursor:pointer; padding:15px 2px; font-weight:600; color:var(--tx-hi); list-style:none;
  display:flex; justify-content:space-between; gap:14px; align-items:center; font-size:1.02rem; }
.guide-faq summary::-webkit-details-marker{ display:none; }
.guide-faq summary::after{ content:"+"; color:var(--accent); font-size:1.3rem; flex:0 0 auto; transition:transform .2s; }
.guide-faq details[open] summary::after{ transform:rotate(45deg); }
.guide-faq .faq-a{ padding:0 2px 16px; color:var(--tx); line-height:1.6; }

/* ── Author bio block ── */
.author-bio{ display:flex; gap:16px; align-items:flex-start; margin:2.4rem 0 0; padding:20px;
  background:var(--bg-1); border:1px solid var(--border); border-radius:14px; }
.author-bio__avatar{ width:44px; height:44px; border-radius:50%; background:var(--accent); color:#fff;
  display:flex; align-items:center; justify-content:center; font-weight:700; flex:0 0 auto; }
.author-bio__text{ font-size:.94rem; color:var(--tx); line-height:1.6; }
.author-bio__text strong{ color:var(--tx-hi); }
