/* ---------------------------------------------------------------------------
   How-to guides: the hub's section grid and the guide pages (left navigation,
   reading column, code boxes, tables, keys). Loaded only by how-to pages, after
   site.css, and scoped to html.v2 like the rest of the redesign. Reuses the
   site's components where they exist: .card / .card--soon / .soon,
   .codebox, .prose, .takeaways, .article__meta, .article__cta, .article__foot.
   Pages are generated from ConradCustomerWebsite/HowToGuides (build_howto.py).
--------------------------------------------------------------------------- */

/* ---- hub ---------------------------------------------------------------- */
html.v2 .howto-hero{padding:clamp(36px,5vw,72px) 0 clamp(26px,3.6vw,40px);}
html.v2 .howto-hero h1{max-width:18em;}
html.v2 .howto-hero .lede{margin-top:14px;}

html.v2 .howto-head{display:grid;gap:10px;margin-bottom:clamp(20px,3vw,30px);}
html.v2 .howto-head p{color:var(--muted);max-width:44em;}
html.v2 .howto-grid{display:grid;gap:16px;grid-template-columns:minmax(0,1fr);}
@media (min-width:640px){html.v2 .howto-grid{grid-template-columns:repeat(2,minmax(0,1fr));}}
@media (min-width:1020px){html.v2 .howto-grid{grid-template-columns:repeat(3,minmax(0,1fr));}}
html.v2 .howto-card{display:flex;flex-direction:column;gap:8px;}
html.v2 .howto-card .card__ico{margin-bottom:6px;}
html.v2 .howto-card__top{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;}
html.v2 .howto-card__num{font-family:var(--mono);font-size:.8rem;font-weight:700;color:var(--muted);letter-spacing:.06em;}
html.v2 .howto-card:not(.howto-card--soon) .howto-card__num{color:var(--navy);}
html.v2 .howto-card h3{display:flex;flex-wrap:wrap;align-items:center;gap:6px 0;}
html.v2 .howto-card h3 .soon{margin-left:8px;}
html.v2 .howto-card p{color:var(--muted);font-size:.95rem;}
html.v2 .howto-card__list{list-style:none;margin:8px 0 0;padding:0;border-top:1px solid var(--line);}
html.v2 .howto-card__list li{border-bottom:1px solid var(--line);font-size:.92rem;}
html.v2 .howto-card__list a{display:flex;justify-content:space-between;gap:12px;padding:9px 0;font-weight:600;color:var(--navy);}
html.v2 .howto-card__list a::after{content:"\2192";flex:0 0 auto;}
html.v2 .howto-card__list a:hover{color:var(--navy-dark);}
html.v2 .howto-card--soon .howto-card__list li{padding:8px 0;color:var(--muted);}
/* a live section with guides still to come: the planned ones sit under the written ones, marked soon */
html.v2 .howto-card__list li.is-soon{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;color:var(--muted);}
html.v2 .howto-card__note{font-size:.8rem;color:var(--muted);margin-top:auto;padding-top:6px;}
html.v2 .howto-request{margin-top:clamp(22px,3vw,32px);color:var(--muted);}
html.v2 .howto-request a{font-weight:700;color:var(--navy);}

/* ---- guide layout ------------------------------------------------------- */
html.v2 .doc{padding-block:clamp(22px,3.4vw,44px) clamp(40px,5vw,64px);}
html.v2 .doc__grid{
  width:min(var(--wrap),calc(100% - 2*clamp(18px,5vw,34px)));margin-inline:auto;
  display:grid;grid-template-columns:minmax(0,1fr);gap:clamp(24px,4vw,56px);
}
html.v2 .doc__main{min-width:0;max-width:76ch;}
html.v2 .doc__nav{display:none;}
@media (min-width:1020px){
  html.v2 .doc__grid{grid-template-columns:236px minmax(0,1fr);}
  html.v2 .doc__nav{
    display:block;position:sticky;top:84px;align-self:start;
    max-height:calc(100vh - 104px);overflow:auto;padding:4px 6px 16px 0;
  }
  html.v2 .doc__toc-mobile{display:none;}
}
html.v2 .doc-nav__label{font-size:.8rem;font-weight:700;color:var(--muted);margin:0 0 8px 10px;}
html.v2 .doc-nav__sections{list-style:none;margin:0;padding:0;}
html.v2 .doc-nav__sections > li > a,html.v2 .doc-nav__sections > li > span{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:7px 10px;border-radius:8px;font-size:.92rem;line-height:1.3;color:var(--ink);
}
html.v2 .doc-nav__sections > li > a:hover{background:var(--teal-soft);}
html.v2 .doc-nav__sections li.is-soon > span{color:var(--muted);}
html.v2 .doc-nav__sections li.is-soon > span::after,html.v2 .howto-card__list li.is-soon::after{
  content:"soon";font-size:.68rem;font-weight:700;color:#A04E06;background:rgba(255,131,31,.15);
  border-radius:999px;padding:1px 7px;flex:0 0 auto;
}
html.v2 .doc-nav__sections > li.is-current > a{background:var(--teal-soft);color:var(--navy);font-weight:700;}
/* a section with several guides: each guide under the section, the open one with its headings */
html.v2 .doc-nav__guides{list-style:none;margin:4px 0 8px 14px;padding:0;}
html.v2 .doc-nav__guides > li > a,html.v2 .doc-nav__guides > li > span{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:5px 10px;border-radius:8px;font-size:.88rem;line-height:1.35;color:var(--ink);
}
html.v2 .doc-nav__guides > li > a:hover{background:var(--teal-soft);}
html.v2 .doc-nav__guides > li > a[aria-current="page"]{color:var(--navy);font-weight:700;}
html.v2 .doc-nav__guides .doc-nav__toc{margin:2px 0 8px 10px;}
html.v2 .doc-nav__toc{list-style:none;margin:4px 0 10px 14px;padding:0;border-left:2px solid var(--line);}
html.v2 .doc-nav__toc a{display:block;padding:4px 10px;margin-left:-2px;border-left:2px solid transparent;font-size:.86rem;line-height:1.35;color:var(--muted);}
html.v2 .doc-nav__toc a:hover{color:var(--navy);}
html.v2 .doc-nav__toc a.is-active{color:var(--navy);font-weight:600;border-left-color:var(--navy);}

html.v2 .doc__toc-mobile{border:1px solid var(--line);border-radius:12px;background:#fff;margin:0 0 26px;}
html.v2 .doc__toc-mobile summary{cursor:pointer;padding:12px 16px;font-weight:700;color:var(--navy);list-style:none;}
html.v2 .doc__toc-mobile summary::-webkit-details-marker{display:none;}
html.v2 .doc__toc-mobile summary::after{content:"+";float:right;font-weight:700;}
html.v2 .doc__toc-mobile[open] summary::after{content:"\2212";}
html.v2 .doc__toc-mobile ol{margin:0;padding:0 16px 14px 34px;}
html.v2 .doc__toc-mobile li{padding:4px 0;font-size:.92rem;}

/* ---- guide content ------------------------------------------------------ */
/* The v2 layer zeroes p and heading margins (html.v2 p / html.v2 h2 outrank .prose); the blog articles are not v2,
   so their .prose spacing still works. Guides are v2, so the reading rhythm is restored here. */
html.v2 .doc h1{font-size:clamp(1.85rem,4.2vw,2.65rem);margin:0 0 .3em;}
html.v2 .doc .article__dek{max-width:62ch;margin:0 0 16px;}
html.v2 .doc .article__meta{margin:0 0 28px;}
html.v2 .doc .prose p{margin:0 0 1.1rem;}
html.v2 .doc .prose h2{font-size:clamp(1.35rem,2.2vw,1.7rem);margin:2.2em 0 .6em;}
html.v2 .doc .prose h3{font-size:1.15rem;margin:1.8em 0 .5em;}
html.v2 .doc .prose li > p{margin:0;}
html.v2 .doc .prose blockquote p{margin:0;}
html.v2 .doc .takeaways code{background:#fff;}
html.v2 .doc .article__cta p{margin:0;}
html.v2 .doc .prose h2,html.v2 .doc .prose h3{scroll-margin-top:90px;}
html.v2 .doc .takeaways h2{scroll-margin-top:90px;}
html.v2 .doc .prose ol > li::marker{font-weight:700;color:var(--navy);}
html.v2 .doc :not(pre) > code{
  font-family:var(--mono);font-size:.86em;background:var(--teal-soft);color:var(--ink);
  padding:.08em .34em;border-radius:5px;overflow-wrap:anywhere;
}
html.v2 .doc kbd{
  font-family:var(--mono);font-size:.8em;background:#fff;border:1px solid var(--line);
  border-bottom-width:2px;border-radius:5px;padding:0 .4em;white-space:nowrap;
}
html.v2 .doc .codebox{margin:1.1rem 0 1.5rem;}
html.v2 .doc .codebox__h{display:flex;align-items:center;justify-content:space-between;gap:12px;}
/* DAR-C ignores line breaks between commands, so long lines wrap on screen instead of scrolling sideways;
   Copy still copies the text as written. */
html.v2 .doc .codebox pre{font-size:.8rem;line-height:1.7;white-space:pre-wrap;overflow-wrap:anywhere;}
html.v2 .doc .codebox pre code{font:inherit;background:none;padding:0;}
html.v2 .doc .copy-btn{
  font-family:var(--mono);font-size:.6rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;
  color:inherit;background:transparent;border:1px solid currentColor;border-radius:6px;
  padding:3px 9px;cursor:pointer;min-height:24px;
}
html.v2 .doc .copy-btn:hover{background:#fff;}
html.v2 .doc .doc-table{overflow-x:auto;margin:1.1rem 0 1.5rem;-webkit-overflow-scrolling:touch;}
html.v2 .doc .prose .doc-table table{display:table;white-space:normal;margin:0;min-width:100%;}
html.v2 .doc .prose .doc-table--wide table{min-width:600px;}
html.v2 .doc .prose .doc-table th,html.v2 .doc .prose .doc-table td{vertical-align:top;line-height:1.5;}
html.v2 .doc .prose .doc-table thead th{background:var(--ink);font-family:var(--body-font);font-size:.78rem;letter-spacing:0;text-transform:none;}
html.v2 .doc .prose .doc-table td code{white-space:nowrap;}
@media (max-width:559px){html.v2 .doc .prose .doc-table td code{white-space:normal;}}
html.v2 .doc .prose blockquote{background:var(--teal-soft);border-left-color:var(--navy);}
html.v2 .doc .prose img{display:block;max-width:100%;height:auto;border:1px solid var(--line);border-radius:12px;}
html.v2 .doc .article__cta .btn{margin-top:14px;}
html.v2 .doc .article__foot h2{font-size:.95rem;font-family:var(--body-font);margin:0 0 8px;}
html.v2 .doc .article__foot ul{margin:0;padding-left:1.1rem;}
