/*
Theme Name: HostCrafter
Theme URI: https://hostcrafter.com
Description: HostCrafter's brand applied to GeneratePress, for the knowledge base at /kb and the blog at /blog. A child theme so a GeneratePress update never overwrites it.
Author: HostCrafter
Template: generatepress
Version: 1.0.0
*/

/* The tokens are copied from the main site's stylesheet rather than re-picked,
   so /kb and /blog are painted in the same colours as hostcrafter.com and stay
   that way when the brand moves. --brand is the panel navy, --go is the one
   orange allowed to be a button, --brand-lite is the logo's own colour and is
   used for artwork and never for a control. */
:root{
  --brand:#062e79; --brand-2:#04205a; --brand-3:#031845;
  --brand-soft:#eaf0fa; --brand-line:#c3d3ea; --brand-tint:#dbe6f6;
  --brand-lite:#5262b8;
  --ink-deep:#062e79; --ink-deep-2:#041d4f;
  --on-deep:#b8c8e6; --on-deep-2:#8d9fc6;
  --go:#c2410c; --go-top:#c94a0d; --go-2:#a5380b; --go-on-deep:#f87b33;
  --go-soft:#fff2e9; --go-line:#f8c7a4;
  --surface:#fff; --canvas:#f4f7fc; --canvas-2:#e8eef7; --line:#dfe6f0;
  --ink:#0f172a; --ink-2:#475569; --ink-3:#64748b;
  --r:10px; --r-lg:16px;
  --shadow:0 1px 2px rgba(6,46,121,.06), 0 8px 24px rgba(6,46,121,.06);
  --wrap:1180px;
}

*{box-sizing:border-box}
body{
  background:var(--canvas); color:var(--ink);
  font:16px/1.65 -apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,sans-serif;
  -webkit-font-smoothing:antialiased;
}
a{color:var(--brand); text-decoration:none}
a:hover{text-decoration:underline}
h1,h2,h3,h4{color:var(--brand-3); font-weight:700; line-height:1.25; text-wrap:balance}
h1{font-size:clamp(1.9rem,4vw,2.6rem); letter-spacing:-.02em}
h2{font-size:clamp(1.4rem,2.6vw,1.85rem); letter-spacing:-.015em}
h3{font-size:1.15rem}

/* Undo two things GeneratePress does to the page shell.
   
   .site-content is display:flex, which is how it puts content and sidebar side
   by side. Our templates emit a full-bleed hero followed by a wrapper, and as
   flex siblings those sat next to each other — the hero squeezed into a 602px
   column with the cards beside it, one card per row. It has to be block.

   The outer .site container is capped at the content width. A hero band that
   is meant to run edge to edge cannot do that inside a 1180px box, so the cap
   is removed here and re-applied by .hc-wrap on the parts that are text. */
.site-content{display:block; padding:0}
.site.grid-container, .site-content > .content-area, .content-area{
  max-width:none; width:100%; padding:0; margin:0; float:none;
}
.inside-article{padding:0}
#primary, .site-main{margin:0; padding:0}

/* ---------- the bar across the top, matching hostcrafter.com ---------- */
.hc-bar{background:var(--ink-deep); border-bottom:1px solid rgba(255,255,255,.08)}
.hc-bar-in{max-width:var(--wrap); margin:0 auto; padding:14px 20px;
  display:flex; align-items:center; gap:26px; flex-wrap:wrap}
.hc-logo{display:flex; align-items:center; flex:none}
.hc-logo img{height:38px; width:auto; display:block}
.hc-bar nav{display:flex; align-items:center; gap:22px; margin-left:auto; flex-wrap:wrap}
.hc-bar nav a{color:var(--on-deep); font-size:14.5px; font-weight:500; white-space:nowrap}
.hc-bar nav a:hover{color:#fff; text-decoration:none}
.hc-bar nav a.here{color:#fff; font-weight:600}
.hc-cta{
  background:linear-gradient(180deg,var(--go-top),var(--go));
  color:#fff !important; padding:9px 18px; border-radius:var(--r);
  font-weight:650 !important; font-size:14.5px;
  box-shadow:0 1px 0 rgba(255,255,255,.18) inset, 0 6px 16px rgba(194,65,12,.28);
}
.hc-cta:hover{background:linear-gradient(180deg,var(--go),var(--go-2)); text-decoration:none}

/* ---------- the hero band each front page opens with ---------- */
.hc-hero{
  background:linear-gradient(170deg,var(--ink-deep) 0%,var(--ink-deep-2) 100%);
  color:#fff; padding:64px 20px 72px; position:relative; overflow:hidden;
}
.hc-hero::after{
  /* A soft light behind the heading so the band is not a flat slab. Drawn in
     the logo colour, which is the one place --brand-lite belongs. */
  content:""; position:absolute; inset:-40% 30% auto -10%; height:420px;
  background:radial-gradient(closest-side,rgba(82,98,184,.45),transparent 70%);
  pointer-events:none;
}
.hc-hero-in{max-width:840px; margin:0 auto; text-align:center; position:relative; z-index:1}
.hc-hero h1{color:#fff; margin:0 0 14px}
.hc-hero p{color:var(--on-deep); font-size:1.12rem; margin:0 auto; max-width:620px}
.hc-eyebrow{
  display:inline-block; margin-bottom:16px; padding:5px 13px; border-radius:999px;
  background:rgba(255,255,255,.09); border:1px solid rgba(255,255,255,.16);
  color:var(--on-deep); font-size:12.5px; font-weight:600;
  text-transform:uppercase; letter-spacing:.07em;
}

/* search sits in the hero, because on a knowledge base search IS the navigation */
.hc-search{margin:28px auto 0; max-width:560px; display:flex; gap:10px}
.hc-search input[type=search]{
  flex:1; padding:14px 18px; border-radius:var(--r); border:1px solid rgba(255,255,255,.2);
  background:rgba(255,255,255,.97); font-size:16px; color:var(--ink);
}
.hc-search input[type=search]:focus{outline:3px solid rgba(248,123,51,.45); outline-offset:1px}
.hc-search button{
  padding:14px 24px; border:0; border-radius:var(--r); cursor:pointer;
  background:linear-gradient(180deg,var(--go-top),var(--go)); color:#fff;
  font-weight:650; font-size:15px;
}
.hc-search button:hover{background:linear-gradient(180deg,var(--go),var(--go-2))}

/* ---------- content shell ---------- */
.hc-wrap{max-width:var(--wrap); margin:0 auto; padding:0 20px}
.hc-section{padding:56px 0}
.hc-section-head{margin-bottom:26px}
.hc-section-head p{color:var(--ink-2); margin:6px 0 0}

/* ---------- cards ---------- */
.hc-cards{display:grid; gap:18px; grid-template-columns:repeat(auto-fill,minmax(290px,1fr))}
.hc-card{
  background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:24px; box-shadow:var(--shadow); display:block; color:inherit;
  transition:border-color .15s, box-shadow .15s, transform .15s;
}
a.hc-card:hover{
  text-decoration:none; border-color:var(--brand-line); transform:translateY(-2px);
  box-shadow:0 2px 4px rgba(6,46,121,.07), 0 14px 34px rgba(6,46,121,.10);
}
.hc-card h3{margin:0 0 8px}
.hc-card p{margin:0; color:var(--ink-2); font-size:15px}
.hc-card-ico{
  width:42px; height:42px; border-radius:11px; display:grid; place-items:center;
  background:var(--brand-soft); color:var(--brand); margin-bottom:14px;
}
.hc-card-ico svg{width:22px; height:22px; stroke-width:1.7; fill:none; stroke:currentColor}
.hc-count{
  display:inline-block; margin-top:12px; font-size:12.5px; font-weight:600;
  color:var(--brand); background:var(--brand-soft); padding:3px 9px; border-radius:999px;
}

/* ---------- article list ---------- */
.hc-list{list-style:none; margin:0; padding:0}
.hc-list li{border-bottom:1px solid var(--line)}
.hc-list li:last-child{border-bottom:0}
.hc-list a{display:flex; gap:12px; align-items:baseline; padding:13px 2px; color:var(--ink)}
.hc-list a:hover{color:var(--brand); text-decoration:none}
.hc-list a::before{content:"›"; color:var(--brand-lite); font-size:19px; line-height:1; flex:none}

/* ---------- article body ---------- */
.hc-article{background:var(--surface); border:1px solid var(--line); border-radius:var(--r-lg);
  padding:clamp(24px,4vw,48px); box-shadow:var(--shadow)}
.hc-article p, .hc-article li{color:#1e293b}
.hc-article h2{margin:2em 0 .6em; padding-top:.2em}
.hc-article h3{margin:1.6em 0 .5em}
.hc-article code{background:var(--canvas-2); padding:2px 6px; border-radius:5px;
  font:13.5px/1.5 ui-monospace,Menlo,Consolas,monospace; color:var(--brand-3)}
.hc-article pre{background:var(--brand-3); color:#dbe6f6; padding:16px 18px; border-radius:var(--r);
  overflow-x:auto; font:13.5px/1.6 ui-monospace,Menlo,Consolas,monospace}
.hc-article pre code{background:none; color:inherit; padding:0}
.hc-article blockquote{border-left:3px solid var(--brand-lite); margin:1.4em 0;
  padding:2px 0 2px 18px; color:var(--ink-2)}
.hc-article table{width:100%; border-collapse:collapse; margin:1.4em 0; font-size:15px}
.hc-article th,.hc-article td{border:1px solid var(--line); padding:9px 12px; text-align:left}
.hc-article th{background:var(--canvas); color:var(--brand-3)}

.hc-crumbs{font-size:13.5px; color:var(--ink-3); margin:0 0 18px}
.hc-crumbs a{color:var(--ink-2)}
.hc-crumbs span{margin:0 7px; color:var(--brand-line)}

/* ---------- the strip that sends people to support ---------- */
.hc-help{
  background:var(--brand-soft); border:1px solid var(--brand-line); border-radius:var(--r-lg);
  padding:28px; text-align:center; margin-top:40px;
}
.hc-help h3{margin:0 0 6px}
.hc-help p{margin:0 0 16px; color:var(--ink-2)}
.hc-btn{
  display:inline-block; padding:11px 22px; border-radius:var(--r); font-weight:650;
  background:linear-gradient(180deg,var(--go-top),var(--go)); color:#fff !important;
}
.hc-btn:hover{background:linear-gradient(180deg,var(--go),var(--go-2)); text-decoration:none}
.hc-btn-quiet{background:var(--surface); color:var(--brand) !important; border:1px solid var(--brand-line); box-shadow:none}
.hc-btn-quiet:hover{background:var(--brand-soft)}

/* ---------- footer ---------- */
.hc-foot{background:var(--ink-deep-2); color:var(--on-deep); margin-top:64px; padding:48px 20px 26px}
.hc-foot-in{max-width:var(--wrap); margin:0 auto}
.hc-foot-cols{display:grid; gap:32px; grid-template-columns:repeat(auto-fit,minmax(180px,1fr))}
.hc-foot h4{color:#fff; font-size:13px; text-transform:uppercase; letter-spacing:.07em; margin:0 0 12px}
.hc-foot ul{list-style:none; margin:0; padding:0}
.hc-foot li{margin-bottom:9px}
.hc-foot a{color:var(--on-deep); font-size:14.5px}
.hc-foot a:hover{color:#fff}
.hc-foot-base{
  border-top:1px solid rgba(255,255,255,.10); margin-top:34px; padding-top:20px;
  display:flex; justify-content:space-between; gap:14px; flex-wrap:wrap;
  font-size:13.5px; color:var(--on-deep-2);
}

/* GeneratePress chrome we replace with our own bar and footer */
.site-header, .site-footer, .site-info{display:none !important}

@media (max-width:782px){
  .hc-bar-in{gap:14px}
  .hc-bar nav{gap:14px; width:100%; margin-left:0; justify-content:flex-start}
  .hc-bar nav a{font-size:14px}
  .hc-hero{padding:44px 20px 52px}
  .hc-search{flex-direction:column}
}

/* ---------- article components ----------
   Everything below is used by the how-to articles. They are plain classes on
   plain HTML rather than blocks, because the articles are imported by
   `wp eval-file` and re-imported whenever the text changes: block markup would
   have to be regenerated byte-perfect each time, and a block plugin that is
   ever deactivated takes its own stylesheet — and the layout — with it.
   GenerateBlocks is installed for pages built by hand in the editor; these
   classes are what the imported articles use. */

/* A screenshot. Bordered and tinted, because a screenshot of a white panel on
   a white page has no edge and reads as part of the article rather than as a
   picture of something else. */
.hc-fig{margin:1.8em 0; padding:0}
.hc-fig img{
  display:block; width:100%; height:auto; border-radius:var(--r);
  border:1px solid var(--line); background:var(--canvas);
}
.hc-fig figcaption{
  margin-top:10px; font-size:14px; color:var(--ink-3); line-height:1.55;
}
/* A dialog is 496 CSS pixels wide in the panel. Shown at the article's full
   1030px it is upscaled to twice its real size and stops reading as a dialog —
   it reads as a mockup of one. Left-aligned rather than centred so it lines up
   with the step text beside it; a centred one drifts right of the reading
   column and looks like it belongs to something else. */
.hc-fig.narrow img{max-width:560px}

/* Callouts. Three of them, and the colour is the whole message:
   note = ordinary aside, tip = do it this way, warn = you can lose something.
   Orange is the brand's action colour and is deliberately NOT used for a
   warning — red is, because a warning is not an invitation. */
.hc-cal{
  margin:1.6em 0; padding:16px 18px; border-radius:var(--r);
  border:1px solid var(--brand-line); background:var(--brand-soft);
  font-size:15.5px; line-height:1.6;
}
.hc-cal > :first-child{margin-top:0}
.hc-cal > :last-child{margin-bottom:0}
.hc-cal b:first-child{color:var(--brand-3)}
.hc-cal.tip{border-color:var(--go-line); background:var(--go-soft)}
.hc-cal.tip b:first-child{color:var(--go-2)}
.hc-cal.warn{border-color:#f5c2c2; background:#fef4f4}
.hc-cal.warn b:first-child{color:#b91c1c}

/* Numbered steps. The number is drawn rather than listed, so a step can hold a
   screenshot and a paragraph without the marker drifting up the side of it. */
.hc-steps{list-style:none; margin:1.6em 0; padding:0; counter-reset:hcstep}
.hc-steps > li{
  position:relative; counter-increment:hcstep;
  padding:0 0 4px 52px; margin:0 0 26px;
}
.hc-steps > li::before{
  content:counter(hcstep); position:absolute; left:0; top:1px;
  width:34px; height:34px; border-radius:50%;
  background:var(--brand); color:#fff;
  font-weight:700; font-size:15px; line-height:34px; text-align:center;
}
.hc-steps > li > h3:first-child{margin-top:3px; margin-bottom:.4em; font-size:1.15rem}
.hc-steps > li > :last-child{margin-bottom:0}

/* The summary above the fold: how long, what it costs, what it risks. Somebody
   who arrived from a search wants those three before the first heading. */
.hc-facts{
  display:grid; gap:1px; grid-template-columns:repeat(auto-fit,minmax(150px,1fr));
  background:var(--line); border:1px solid var(--line); border-radius:var(--r);
  overflow:hidden; margin:0 0 1.8em;
}
.hc-facts div{background:var(--canvas); padding:12px 14px}
.hc-facts dt{
  font-size:11.5px; text-transform:uppercase; letter-spacing:.06em;
  color:var(--ink-3); font-weight:700; margin:0 0 3px;
}
.hc-facts dd{margin:0; font-size:15px; font-weight:600; color:var(--brand-3)}

/* On-page contents. Long enough articles need it, and the anchor links are
   what Google shows as jump-to links under the result. */
.hc-toc{
  border:1px solid var(--line); border-radius:var(--r); background:var(--canvas);
  padding:16px 20px; margin:0 0 2em;
}
.hc-toc h2{font-size:12px !important; text-transform:uppercase; letter-spacing:.07em;
  color:var(--ink-3) !important; margin:0 0 10px !important; padding:0 !important}
.hc-toc ol{margin:0; padding-left:20px; font-size:15px}
.hc-toc li{margin:5px 0; color:var(--ink-2)}

/* A heading somebody landed on from a jump link must not sit under the sticky
   bar at the top of the page. */
.hc-article h2[id], .hc-article h3[id]{scroll-margin-top:84px}

/* Questions and answers at the foot of an article. */
.hc-faq{margin-top:.5em}
.hc-faq h3{font-size:1.08rem; margin:1.4em 0 .35em}
.hc-faq h3:first-child{margin-top:.6em}
.hc-faq p{margin:0}

/* Where to read next. Every article ends with two or three of these, because a
   knowledge base with no path through it is a pile of pages. */
.hc-rel{margin:2.4em 0 0; padding-top:1.6em; border-top:1px solid var(--line)}
.hc-rel h2{font-size:1.15rem !important; margin:0 0 .7em !important}
.hc-rel ul{list-style:none; margin:0; padding:0}
.hc-rel li{margin:0 0 8px}
.hc-rel a::before{content:"› "; color:var(--brand-lite)}

@media (max-width:600px){
  .hc-steps > li{padding-left:42px}
  .hc-steps > li::before{width:28px; height:28px; line-height:28px; font-size:13.5px}
}

/* A table too wide to fold scrolls inside its own box. See the `the_content`
   filter in functions.php for why this is not done in the article markup. */
.hc-tw{overflow-x:auto; margin:1.4em 0; -webkit-overflow-scrolling:touch}
.hc-tw table{margin:0; min-width:min(520px,100%)}

/* ---------- the measure ----------
   Text stops at about 72 characters; screenshots, tables and callouts do not.

   The article card is 1180px wide because a screenshot of the panel needs that
   much to be legible. Text set across the same 1180px is roughly 130 characters
   a line, which is about twice what anyone reads comfortably — the eye loses
   the start of the next line on every return sweep. So the two are decoupled:
   the reading column is a column, and the pictures are as wide as they need to
   be. This is why the right-hand side of a paragraph is empty; it is deliberate. */
.hc-article > p,
.hc-article > ul,
.hc-article > ol:not(.hc-steps),
.hc-article > h2,
.hc-article > h3,
.hc-article > blockquote,
.hc-article .hc-faq > *,
.hc-steps > li > p,
.hc-steps > li > ul{max-width:72ch}

/* A callout is an interruption and reads better slightly narrower than the
   text it interrupts is wide — but not narrower than the text itself. */
.hc-cal{max-width:76ch}

/* ---------- blog: cards with pictures ----------
   The knowledge base lists; the blog shows. Both use .hc-card for the frame,
   so a change to the shadow or the border reaches both, and .hc-post adds the
   picture and the padding change that a full-bleed image needs. */
.hc-post{padding:0; overflow:hidden; display:flex; flex-direction:column}
.hc-post-img{display:block; background:var(--canvas-2)}
/* aspect-ratio, not a fixed height. The cards sit in an auto-fill grid so
   their width varies with the viewport, and a fixed height would letterbox the
   picture differently in every column. */
.hc-post-img img{
  display:block; width:100%; height:auto; aspect-ratio:760/399; object-fit:cover;
  border-bottom:1px solid var(--line);
}
.hc-post-body{display:block; padding:20px 22px 24px}
.hc-post-meta{
  display:flex; gap:10px; align-items:center; flex-wrap:wrap;
  font-size:12.5px; color:var(--ink-3); margin-bottom:9px;
}
.hc-post-meta b{
  color:var(--brand); background:var(--brand-soft); padding:3px 9px;
  border-radius:999px; font-size:11.5px; font-weight:700;
  text-transform:uppercase; letter-spacing:.05em;
}
.hc-post h3{margin:0 0 8px; font-size:1.14rem}
.hc-post p{margin:0; color:var(--ink-2); font-size:15px}

/* The picture at the top of a blog post. Full width of the article card, and
   it is the Largest Contentful Paint element on the page — see single.php. */
.hc-lede{margin:0 0 2em; padding:0}
.hc-lede img{
  display:block; width:100%; height:auto; border-radius:var(--r);
  border:1px solid var(--line); background:var(--canvas);
}

/* ---------- a measured comparison, drawn ----------
   NOT `.hc-bar`. That name is already the bar across the top of every page
   (see the top of this file), and a second `.hc-bar{}` further down the same
   stylesheet silently repainted the site's navigation — 26px tall, indigo,
   with the logo in it — on every knowledge base and blog page. It looked like
   a header that had collapsed rather than like a stylesheet collision, which
   is the kind of bug that gets attributed to the wrong change.

   Two or three numbers that differ by orders of magnitude do not fit in a
   chart with a linear axis: one bar is the width of the column and the other
   is invisible. So the width is a class chosen for legibility and the NUMBER
   is printed beside it in full. The bar says one is much larger; the figure is
   the claim. Anything needing a readable axis is a table instead. */
.hc-meters{margin:1.6em 0; max-width:76ch; display:grid; gap:12px}
.hc-meters > div{display:grid; grid-template-columns:minmax(88px,auto) 1fr; gap:6px 14px; align-items:center}
/* wpautop leaves an empty <p> wherever the imported HTML had a blank line
   before a closing tag. In a grid that is a whole extra row of gap. */
.hc-meters > p:empty{display:none}
.hc-meter-l{font-size:13.5px; font-weight:650; color:var(--ink-2)}
.hc-meter{
  display:block; height:26px; border-radius:5px; min-width:3px;
  background:var(--brand-lite);
}
/* Widths are classes, not an inline custom property. Post content is written
   by an importer and passes through WordPress's own HTML filtering on the way
   into the database; that filter keeps a whitelist of CSS properties and a
   custom property is not on it, so `style="--w:2%"` is exactly the kind of
   thing that would be dropped silently and leave every bar the same size. */
.hc-meter.w2{width:2%}
.hc-meter.w25{width:25%}
.hc-meter.w50{width:50%}
.hc-meter.w75{width:75%}
.hc-meter.w100{width:100%}
.hc-meter-go{background:linear-gradient(90deg,var(--go-top),var(--go))}
.hc-meters b{grid-column:2; font-size:15px; color:var(--brand-3); line-height:1.3}
@media (max-width:600px){
  .hc-meters > div{grid-template-columns:1fr}
  .hc-meters b{grid-column:1}
}
