/* ---------------------------------------------------------------------------
   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;}
}
/* The sidebar's search results open wider than the sidebar, over the guide. So the sidebar itself doesn't clip
   (overflow visible, above the guide), and only its list of guides scrolls within the sidebar's height. */
@media (min-width:1020px){
  html.v2 .doc__nav{overflow:visible;display:flex;flex-direction:column;z-index:5;}
  html.v2 .doc__nav > .doc-back{align-self:flex-start;}
  html.v2 .doc__nav > .doc-nav__sections{flex:1 1 auto;min-height:0;overflow:auto;}
}
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;}
/* previous and next guide, in build order */
html.v2 .doc-pager{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin:2.6rem 0 0;}
html.v2 .doc-pager a{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border:1px solid var(--line);border-radius:12px;background:#fff;color:var(--ink);}
html.v2 .doc-pager a:hover{border-color:var(--navy);}
html.v2 .doc-pager span{font-family:var(--mono);font-size:.66rem;font-weight:700;letter-spacing:.11em;text-transform:uppercase;color:var(--muted);}
html.v2 .doc-pager b{font-size:.98rem;line-height:1.3;color:var(--navy);}
html.v2 .doc-pager__next{grid-column:2;text-align:right;}
@media (max-width:559px){
  html.v2 .doc-pager{grid-template-columns:minmax(0,1fr);}
  html.v2 .doc-pager__next{grid-column:auto;}
}
html.v2 .doc .article__cta .btn{margin-top:14px;}
/* Fix flags (span.fix): text that describes how a release behaves where a bug is logged (Bugs/BUGS.md). Ordinary text
   unless docs.js adds show-fixes, which it does only with ?fixes in the address. */
html.v2.show-fixes .doc .fix{color:#b42318;background:rgba(240,68,56,.09);border-radius:3px;-webkit-box-decoration-break:clone;box-decoration-break:clone;}
html.v2.show-fixes .doc .fix code{color:inherit;}
html.v2.show-fixes .doc .fix::after{content:" bug " attr(data-bug);font-family:var(--mono);font-size:.68em;font-weight:700;letter-spacing:.04em;white-space:nowrap;}
html.v2 .doc .fix-note{margin:-12px 0 24px;padding:10px 14px;border-left:3px solid #b42318;border-radius:0 8px 8px 0;background:rgba(240,68,56,.07);color:#b42318;font-size:.9rem;line-height:1.5;}
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;}

/* ---------------------------------------------------------------- search and filters: the hub's form, and the compact
   field on every guide page (in the sidebar on wide screens, above the contents on phones) */
html.v2 .visually-hidden{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;}
html.v2 .hsearch{max-width:760px;}
html.v2 .hsearch--hub{max-width:none;margin:0 0 clamp(16px,2.5vw,24px);scroll-margin-top:110px;}   /* spans the section like the card grid below it */
html.v2 .hsearch__field{max-width:none;background:#fff;}
html.v2 .hsearch__row{display:flex;align-items:flex-start;gap:10px;margin-top:12px;}
html.v2 .hsearch__lbl{flex:0 0 46px;padding-top:7px;font-size:.84rem;font-weight:600;color:var(--muted);}
html.v2 .hsearch .rsearch__chips{margin-top:0;}
html.v2 .hsearch .rchip{padding:6px 12px;font-size:.84rem;background:#fff;}
html.v2 .hsearch .rchip.is-on{background:var(--ink);color:#fff;}
html.v2 .hsearch__status{margin:12px 0 0;font-size:.9rem;color:var(--muted);min-height:1.4em;}
html.v2 .hresults{margin-top:14px;}
html.v2 .hresults__list{list-style:none;margin:0;padding:0;display:grid;gap:10px;}
html.v2 .hresult{background:#fff;border:1px solid var(--line);border-radius:12px;padding:14px 16px;}
html.v2 .hresult__title{font-weight:700;color:var(--ink);text-decoration:none;font-size:1.02rem;}
html.v2 .hresult__title:hover{color:var(--navy);text-decoration:underline;}
html.v2 .hresult__stage{margin-left:8px;font-size:.78rem;color:var(--muted);white-space:nowrap;}
html.v2 .hresult__dek{margin:4px 0 0;color:var(--muted);font-size:.92rem;}
html.v2 .hresult__heads{list-style:none;margin:8px 0 0;padding:0;display:flex;flex-wrap:wrap;gap:6px;}
html.v2 .hresult__heads a{display:inline-block;background:var(--teal-soft);color:var(--navy);border-radius:8px;padding:4px 10px;font-size:.84rem;text-decoration:none;}
html.v2 .hresult__heads a:hover{background:var(--ink);color:#fff;}
html.v2 .hresults mark{background:#FFE4C7;color:inherit;border-radius:3px;padding:0 1px;}
html.v2 .hsearch--doc{position:relative;margin:0 0 14px;}
html.v2 .hsearch--side{margin:0 0 12px;}
html.v2 .doc-back{display:inline-flex;align-items:center;gap:5px;margin:0 0 14px;padding:7px 12px 7px 8px;border:1px solid var(--line);border-radius:999px;background:#fff;font-size:.84rem;font-weight:600;line-height:1;color:var(--navy);text-decoration:none;}
html.v2 .doc-back svg{width:14px;height:14px;flex:0 0 auto;}
html.v2 .doc-back:hover{border-color:var(--navy);background:var(--teal-soft);}
html.v2 .doc-back--side{margin-bottom:16px;}
@media (min-width:1020px){html.v2 .hsearch--mobile,html.v2 .doc-back--mobile{display:none;}}
html.v2 .hsearch--doc .rsearch__field{padding:0 6px 0 12px;border-radius:10px;}
html.v2 .hsearch--doc .rsearch__field input{padding:9px 0;font-size:.9rem;}
html.v2 .hsearch--doc .rsearch__field svg{width:15px;height:15px;}
html.v2 .hresults--drop{position:absolute;left:0;top:calc(100% + 6px);z-index:40;width:min(460px,calc(100vw - 48px));background:#fff;border:1px solid var(--line);border-radius:12px;box-shadow:0 18px 50px rgba(22,52,60,.14);padding:8px;max-height:min(70vh,520px);overflow:auto;margin:0;}
html.v2 .hsearch--mobile .hresults--drop{right:0;width:auto;}
html.v2 .hresults--drop .hresults__list{gap:2px;}
html.v2 .hresults--drop .hresult{border:0;padding:8px 10px;border-radius:8px;}
html.v2 .hresults--drop .hresult:hover,html.v2 .hresults--drop .hresult:focus-within{background:var(--paper);}
html.v2 .hresults--drop .hresult__title{font-size:.92rem;}
html.v2 .hresults--drop .hresult__heads{margin-top:6px;}
html.v2 .hresults--drop .hresult__heads a{font-size:.8rem;padding:3px 8px;}
html.v2 .hsearch a:focus-visible,html.v2 .hsearch .rsearch__clear:focus-visible,html.v2 .hsearch .rchip:focus-visible{outline:2px solid var(--navy);outline-offset:2px;}
html.v2 .hsearch .rsearch__field input:focus,html.v2 .hsearch .rsearch__field input:focus-visible{outline:none;}   /* the pill shows focus (:focus-within ring), so the input draws no box of its own */
@media (max-width:559px){
  html.v2 .hsearch__row{flex-direction:column;gap:6px;}
  html.v2 .hsearch__lbl{padding-top:0;}
}

/* On-screen names. A guide writes every label on the screen in bold and the build sorts them (HowToGuides/README.md,
   "How a guide marks what is on the screen"). ui-do, a thing to click, pick or tick, is drawn as a small button, and
   ui-path is a command as a path. ui-name, any other name on the screen, and ui-lead, a run-in label, are darker text
   that is not bold. Three inline boxes stay apart by shape: a button is a white pill in the text face, typed text is a
   tinted box in the code face, and a key is a white box with a heavy foot. */
html.v2 .doc b.ui-name,html.v2 .doc b.ui-lead{font-weight:500;color:var(--ink);}
html.v2 .doc b.ui-do{
  font-weight:600;font-size:.9em;line-height:1.2;color:var(--ink);background:#fff;
  border:1px solid #B7C6CA;border-radius:999px;padding:.08em .58em .12em;
  box-shadow:0 1px 0 rgba(22,52,60,.08);white-space:nowrap;
}
html.v2 .doc b.ui-do .ui-sep{color:var(--navy);font-weight:400;}
html.v2 .doc strong.keep{font-weight:700;color:var(--ink);}
/* on a phone a long path, or a button in a table cell, may need a second line */
@media (max-width:559px){
  html.v2 .doc b.ui-path,html.v2 .doc .doc-table b.ui-do{white-space:normal;-webkit-box-decoration-break:clone;box-decoration-break:clone;}
}
