/* ============================================================
   Uptimia — Free HTTP/2, HSTS & IPv6 Protocol Checker (/http-protocol-checker)
   Ported from docs/http-protocol-checker-mockup.html <style> block.

   EVERYTHING is scoped under the root wrapper `.hpc` so it can
   never collide with homepage-v30.css / tools.css (both also
   loaded on the page). The mockup's :root custom properties live
   on `.hpc` instead of :root; generic @keyframes (pulse/rot) are
   renamed hpc-pulse / hpc-rot. The mockup's own site chrome
   (.topbar / .nav / .brand / .dock / .foot) is intentionally
   dropped — the real page provides top_menu + footer. Fonts are
   NOT imported here; the site already loads them and we rely on
   the mockup's font-family stacks. A `.hero-error` banner and the
   `bad`-tone variants (verdict bad-mode, badge-bad, sb/tstep/val
   bad) are added to match the sibling + the render model (§7) —
   the mockup only ever drew the warn/ok result states.
   ============================================================ */

/* scoped reset */
.hpc,
.hpc *,
.hpc *::before,
.hpc *::after{box-sizing:border-box}
.hpc *,
.hpc *::before,
.hpc *::after{margin:0;padding:0}

/* ---- theme tokens (scoped, not on :root) + base typography ---- */
.hpc{
  /* verbatim from www.uptimia.com :root */

  font-family:var(--sans);
  background:var(--bg-2);
  color:var(--ink);
  font-size:15px;line-height:1.55;font-weight:450;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
  font-feature-settings:'cv11','ss01','ss03','tnum';
}
.hpc a{color:inherit;text-decoration:none}
.hpc button{font:inherit;cursor:pointer;background:none;border:0;color:inherit}
.hpc input,.hpc select{font:inherit;color:inherit}
.hpc svg{display:block}
.hpc .wrap{max-width:1120px;margin:0 auto;padding:0 24px}
.hpc .mono{font-family:var(--mono)}
.hpc .micro{font-size:11.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--soft)}

.hpc .view{display:none}
.hpc .view.on{display:block}

/* ============================================================
   HERO (dark)
   ============================================================ */
.hpc .hero-sub{max-width:660px}

.hpc .testbar{
  max-width:640px;margin:34px auto 0;
  display:flex;align-items:stretch;gap:0;
  background:#fff;border-radius:12px;padding:6px;
  box-shadow:0 1px 0 rgba(255,255,255,.06), 0 24px 60px -24px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.08);
}
.hpc .testbar .field{flex:1;display:flex;align-items:center;gap:11px;padding:0 8px 0 14px;min-width:0}
.hpc .testbar .field svg{color:var(--soft);flex:none}
.hpc .testbar input{flex:1;border:0;outline:0;background:none;min-width:0;font-size:16.5px;font-weight:450;color:var(--ink);height:48px}
.hpc .testbar input::placeholder{color:var(--soft)}
.hpc .testbar .btn-run{
  display:inline-flex;align-items:center;gap:8px;padding:0 22px;border-radius:8px;
  background:var(--cta);color:var(--cta-ink);font-size:15px;font-weight:650;letter-spacing:-.01em;white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.22), 0 6px 18px -6px rgba(78,201,126,.55);
  transition:filter .15s,transform .1s;
}
.hpc .testbar .btn-run:hover{filter:brightness(1.05)}
.hpc .testbar .btn-run:active{transform:scale(.99)}
.hpc .adv-strip{
  display:inline-flex;align-items:center;flex-wrap:wrap;justify-content:center;gap:8px 16px;margin:26px auto 0;
  border:1px solid var(--dark-line-2);border-radius:10px;padding:9px 16px;
  background:rgba(255,255,255,.03);
  font-family:var(--mono);font-size:12px;color:var(--dark-muted);
}
.hpc .adv-strip .lbl{font-size:10.5px;font-weight:600;letter-spacing:.09em;text-transform:uppercase;color:var(--dark-soft)}
.hpc .adv-strip b{color:#fff;font-weight:600}
.hpc .adv-strip a{color:var(--accent-bright);font-weight:600}

/* hero error banner (real tool — matches sibling posture).
   Colours are the dark-hero pair the sibling tools use, NOT --bad-soft/--bad:
   those resolve from homepage-v30.css :root to a near-white pink on near-black
   text, built for the light body sections — on this dark hero the banner read
   as a pale slab. */
.hpc .hero-error{
  max-width:640px;margin:16px auto 0;display:flex;align-items:center;gap:10px;
  border:1px solid rgba(255,122,104,.4);background:rgba(255,122,104,.12);
  border-radius:var(--radius-sm);padding:11px 16px;font-size:14px;color:#ffb4a8;
  text-align:left;
}
/* display:flex above out-specifies the UA's [hidden]{display:none}, so without
   this the empty banner rendered as a bare slab under the input on every page
   load. Any .hero-error rule that sets `display` needs this companion. */
.hpc .hero-error[hidden]{display:none}

/* ============================================================
   Light sections
   ============================================================ */
.hpc .sec{padding:72px 0 0}
.hpc .sec:last-child{padding-bottom:72px}
.hpc .sec-head{max-width:640px;margin:0 0 34px}
.hpc .sec-head.center{margin:0 auto 38px;text-align:center}
.hpc .sec-head .micro{display:block;margin-bottom:12px;color:var(--accent)}
.hpc .sec-head h2{font-size:31px;line-height:1.15;font-weight:700;letter-spacing:-.022em;color:var(--ink)}
.hpc .sec-head p{margin-top:12px;font-size:15.5px;color:var(--muted)}

.hpc .note-mono{font-family:var(--mono);font-size:12px;color:var(--soft)}

/* the-four quad */

/* readout decoder (err-grid recipe + variants) */

/* one-afternoon duo */
.hpc .duo{display:grid;grid-template-columns:1fr 1fr;gap:14px;align-items:start}
.hpc .duo-side h3{font-size:22px;line-height:1.2;font-weight:700;letter-spacing:-.018em;margin-bottom:10px}
.hpc .duo-side p{font-size:14.5px;line-height:1.65;color:var(--muted);margin-bottom:12px}
.hpc .duo-side ul{list-style:none;display:grid;gap:8px;margin:16px 0 20px}
.hpc .duo-side li{display:flex;gap:9px;font-size:13.5px;color:var(--muted)}
.hpc .duo-side li svg{color:var(--accent);flex:none;margin-top:3px}
.hpc .port-row{display:flex;align-items:center;gap:12px;padding:11px 0;border-bottom:1px solid var(--bg-3)}
.hpc .port-row:last-child{border-bottom:0}
.hpc .port-row .pt{flex:none;min-width:170px;font-family:var(--mono);font-size:12px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.hpc .port-row .pd{flex:1;font-size:12.5px;color:var(--muted)}

/* terminal cheatsheet */
.hpc .cheat{max-width:860px;margin:0 auto;display:grid;gap:8px}
.hpc .ch-row{display:flex;align-items:center;gap:14px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius-sm);padding:12px 16px;flex-wrap:wrap}
.hpc .ch-row b{flex:1;font-size:13.5px;font-weight:600;letter-spacing:-.01em;color:var(--ink-2);min-width:190px}
.hpc .cmd{
  display:inline-flex;align-items:center;gap:8px;max-width:100%;
  font-family:var(--mono);font-size:11.5px;color:var(--ink-3);
  background:var(--bg-3);border:1px solid var(--line-2);border-radius:7px;padding:5px 10px;
}
.hpc .cmd .c{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.hpc .cmd button{color:var(--accent);font-weight:600;font-size:11px;flex:none}

/* FAQ */
.hpc .faq{max-width:760px;margin:0 auto}
.hpc .faq-item{border-bottom:1px solid var(--line)}
.hpc .faq-item:first-child{border-top:1px solid var(--line)}
.hpc .faq-q{width:100%;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:18px 2px;text-align:left;font-size:15.5px;font-weight:600;letter-spacing:-.01em;color:var(--ink-2)}
.hpc .faq-q .pm{flex:none;width:22px;height:22px;border-radius:50%;border:1px solid var(--line-2);display:flex;align-items:center;justify-content:center;color:var(--soft);font-size:14px;transition:transform .18s var(--ease)}
.hpc .faq-item.open .pm{transform:rotate(45deg);color:var(--accent);border-color:var(--accent-line);background:var(--accent-soft)}
/* The open state animates grid-template-rows, NOT a fixed max-height. The 340px
   cap this used to carry was ALREADY CLIPPING — measured 2026-08-03 in Playwright
   against the served page at 1440/768/600/480/390/360/320. At 360px, an ordinary
   phone width, "Is HTTP/2 actually faster?" and "What does HSTS do — and should I
   preload?" both measured 353px against the 340px container, losing their closing
   line: the HTTP/3 sentence and "Ramp first, preload when certain" — the actual
   prescription. At 320px the same two lost 85px (four lines) and "Why bother with
   IPv6 if IPv4 works?" lost 37px. overflow:hidden, no scrollbar, no symptom.
   These answers are controller copy (WebsiteHttpProtocolController::faqs()), so
   any future edit that adds a clause re-breaks a pixel cap. Do NOT reintroduce one. */
.hpc .faq-a{display:grid;grid-template-rows:0fr;overflow:hidden;transition:grid-template-rows .25s var(--ease)}
/* The closing gap is a pseudo-element, NOT padding-bottom: a border-box element
   can never shrink below its own padding, so an 18px bottom padding would leave
   an 18px ghost row under every CLOSED question. */
.hpc .faq-a p{min-height:0;overflow:hidden;padding:0 40px 0 2px;font-size:14.5px;line-height:1.65;color:var(--muted)}
.hpc .faq-a p::after{content:'';display:block;height:18px}
.hpc .faq-item.open .faq-a{grid-template-rows:1fr}

/* other tools */
.hpc .tools-row{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.hpc .tool-link{display:flex;flex-direction:column;gap:5px;padding:17px 18px 15px;border:1px solid var(--line);border-radius:var(--radius-sm);background:var(--surface);transition:border-color .15s, box-shadow .15s}
.hpc .tool-link:hover{border-color:var(--accent-line);box-shadow:0 8px 24px -14px rgba(15,23,42,.18)}
.hpc .tool-link b{font-size:14px;font-weight:600;letter-spacing:-.01em;color:var(--ink-2);display:flex;align-items:center;gap:7px}
.hpc .tool-link b svg{color:var(--accent)}
.hpc .tool-link span{font-size:12.5px;color:var(--soft)}
.hpc .tool-link.featured{border-color:var(--accent-line);background:linear-gradient(180deg,#fff,var(--accent-soft))}

/* CTA band */
.hpc .band{margin-top:80px;background:var(--dark);color:var(--dark-ink);position:relative;overflow:hidden}
.hpc .band::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 640px 320px at 82% 130%, rgba(78,201,126,.14), transparent 60%);pointer-events:none}
.hpc .band-in{max-width:1120px;margin:0 auto;padding:58px 24px;display:grid;grid-template-columns:1.05fr .95fr;gap:48px;align-items:center;position:relative}
.hpc .band h2{font-size:30px;line-height:1.14;font-weight:700;letter-spacing:-.022em;color:#fff}
.hpc .band p{margin-top:12px;font-size:15px;line-height:1.6;color:var(--dark-muted);max-width:46ch}
.hpc .band-form{display:flex;gap:8px;background:#fff;border-radius:12px;padding:6px;box-shadow:0 20px 50px -22px rgba(0,0,0,.5)}
.hpc .band-form input{flex:1;border:0;outline:0;background:none;padding:0 14px;height:44px;font-size:14.5px;color:var(--ink);min-width:0}
.hpc .band-form input::placeholder{color:var(--soft)}
.hpc .band-form .btn-run{display:inline-flex;align-items:center;padding:0 18px;border-radius:8px;background:var(--cta);color:var(--cta-ink);font-size:14px;font-weight:650;white-space:nowrap;box-shadow:inset 0 1px 0 rgba(255,255,255,.22)}
.hpc .band-trust{display:flex;gap:20px;margin-top:14px;font-family:var(--mono);font-size:11.5px;color:var(--dark-soft)}
.hpc .band-trust span{display:inline-flex;align-items:center;gap:6px;white-space:nowrap}
.hpc .band-trust svg{color:var(--accent-bright)}

/* ============================================================
   CHECKING view
   ============================================================ */
.hpc .runhead{background:var(--dark);color:var(--dark-ink);position:relative;overflow:hidden}
.hpc .runhead::before{content:'';position:absolute;inset:0;background:radial-gradient(ellipse 700px 300px at 50% 130%, rgba(78,201,126,.10), transparent 60%);pointer-events:none}
.hpc .runhead-in{max-width:1120px;margin:0 auto;padding:30px 24px 26px;position:relative}
.hpc .runrow{display:flex;align-items:center;gap:16px;flex-wrap:wrap}
.hpc .urlchip{display:inline-flex;align-items:center;gap:10px;background:rgba(255,255,255,.05);border:1px solid var(--dark-line-2);border-radius:10px;padding:9px 14px;font-family:var(--mono);font-size:14px;color:#fff}
.hpc .urlchip .fav{width:18px;height:18px;border-radius:5px;background:linear-gradient(135deg,#8f7ee8,#5a4fb8);display:flex;align-items:center;justify-content:center;font-size:9px;font-weight:700;color:#fff;font-family:var(--sans)}
/* Real favicon of the checked site (loaded into the .fav box; falls back to the initial). */
.hpc .urlchip .fav img{width:16px;height:16px;object-fit:contain;border-radius:3px;display:block}
.hpc .urlchip .fav[data-favicon]{background:#fff}
.hpc .urlchip .rt{color:var(--accent-bright);font-size:12px;font-weight:600}
.hpc .runrow .spacer{flex:1}
.hpc .run-status{display:inline-flex;align-items:center;gap:9px;font-size:13.5px;color:var(--dark-muted)}
.hpc .run-status .hit{color:var(--amber-bright);font-weight:600}
.hpc .pbar i{display:block;height:100%;width:0%;border-radius:999px;background:linear-gradient(90deg,var(--accent),var(--accent-bright))}
.hpc .live-zone{padding:34px 0 0}

/* four test tracks */
.hpc .tracks{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.hpc .trk{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:16px 18px 14px;box-shadow:0 1px 2px rgba(15,23,42,.04), 0 12px 32px -18px rgba(15,23,42,.12)}
.hpc .trk-head{display:flex;align-items:center;gap:10px;margin-bottom:8px}
.hpc .trk-head .glyph{flex:none;width:30px;height:30px;border-radius:8px;display:flex;align-items:center;justify-content:center;background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent)}
.hpc .trk-head b{font-size:15px;font-weight:650;letter-spacing:-.01em}
.hpc .trk-head .tc{font-family:var(--mono);font-size:10.5px;color:var(--soft);white-space:nowrap}
.hpc .trk-head .tv{margin-left:auto}
.hpc .tstep{display:flex;align-items:baseline;gap:9px;padding:8px 0;border-bottom:1px dashed var(--bg-3);font-size:12.5px}
.hpc .tstep:last-child{border-bottom:0}
.hpc .tstep .td{flex:none;width:7px;height:7px;border-radius:50%;transform:translateY(-1px)}
.hpc .tstep.ok .td{background:var(--accent)}
.hpc .tstep.warn .td{background:var(--amber)}
.hpc .tstep.bad .td{background:var(--bad)}
.hpc .tstep.pend .td{background:none;border:1.5px dashed var(--line-3)}
.hpc .tstep .tt{flex:1;color:var(--muted)}
.hpc .tstep.pend .tt{color:var(--soft)}
.hpc .tstep .tr{font-family:var(--mono);font-size:11px;color:var(--ink-3);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:46%}
.hpc .tstep.warn .tr{color:var(--warn);font-weight:600}
.hpc .tstep.bad .tr{color:var(--bad);font-weight:600}
.hpc .tstep.pend .tr{color:var(--soft)}

/* ============================================================
   RESULT views
   ============================================================ */
.hpc .verdict-zone.bad-mode::before{background:radial-gradient(ellipse 760px 360px at 18% 145%, rgba(192,56,43,.15), transparent 62%)}

/* results body */

/* scoreboard */
.hpc .sb-grid{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.hpc .sb{border-radius:var(--radius-sm);padding:14px 16px;border:1px solid}
.hpc .sb.ok{background:var(--accent-soft);border-color:var(--accent-line)}
.hpc .sb.warn{background:var(--warn-soft);border-color:var(--warn-line)}
.hpc .sb.bad{background:var(--bad-soft);border-color:var(--bad-line)}
.hpc .sb .st{display:flex;justify-content:space-between;align-items:center;gap:10px}
.hpc .sb .st b{font-size:14.5px;font-weight:700;letter-spacing:-.01em;color:var(--ink-2)}
.hpc .sb .sm{display:block;font-family:var(--mono);font-size:10.5px;color:var(--soft);margin-top:1px}
.hpc .sb p{margin-top:8px;font-size:12.5px;line-height:1.5;color:var(--muted)}

/* what-we-checked kv */
.hpc .kv .v.warn{color:var(--warn);font-weight:550}

/* fix list */
.hpc .opp:last-child{border-bottom:0}
.hpc .opp p b{display:inline;font-size:inherit;color:var(--ink-2)}
.hpc .opp p .mono{font-size:11.5px;color:var(--ink-3)}
.hpc .opp .act{display:inline-block;margin-top:8px;font-family:var(--mono);font-size:11px;font-weight:600;color:var(--accent);background:var(--accent-soft);border:1px solid var(--accent-line);border-radius:6px;padding:2px 8px;white-space:nowrap}
.hpc .opp .act.warn{color:var(--warn);background:var(--warn-soft);border-color:var(--warn-line)}

/* capture cards */
.hpc .capture.warn{border-color:var(--warn-line);background:linear-gradient(180deg,#fff,var(--warn-soft));box-shadow:0 1px 2px rgba(15,23,42,.04), 0 16px 40px -22px rgba(182,120,0,.22)}
.hpc .capture h3 em{font-family:var(--serif);font-style:italic;font-weight:500;color:var(--warn)}
.hpc .cap-form .btn-warn{
  display:inline-flex;align-items:center;gap:7px;padding:0 16px;border-radius:8px;
  background:var(--warn);color:#fff;font-size:13.5px;font-weight:650;white-space:nowrap;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.15);transition:filter .15s;
}
.hpc .cap-form .btn-warn:hover{filter:brightness(1.08)}
.hpc .owner-line{margin-top:14px;padding-top:14px;border-top:1px dashed var(--warn-line);font-size:13px;color:var(--muted)}
.hpc .owner-line b{color:var(--ink-2)}
.hpc .owner-line a{color:var(--accent);font-weight:600}

/* share / badge */

/* cross-sell */
.hpc .deep-link{
  display:flex;align-items:center;gap:14px;padding:16px 18px;
  border:1px solid var(--accent-line);border-radius:var(--radius-sm);
  background:linear-gradient(180deg,#fff,var(--accent-soft));transition:box-shadow .15s;
}
.hpc .deep-link:hover{box-shadow:0 10px 26px -16px rgba(0,126,66,.35)}
.hpc .deep-link .glyph{flex:none;width:36px;height:36px;border-radius:9px;background:var(--accent-soft);border:1px solid var(--accent-line);color:var(--accent);display:flex;align-items:center;justify-content:center}
.hpc .deep-link b{display:block;font-size:13.5px;font-weight:650;color:var(--ink-2)}
.hpc .deep-link span{font-size:12px;color:var(--muted)}
.hpc .deep-link svg.arr{margin-left:auto;color:var(--accent);flex:none}

.hpc .foot-pad{height:74px}

/* ============================================================
   Narrow-viewport containment (2026-07-29 review).
   tools.css clips body overflow-x, so an overflowing result view
   is INVISIBLY cut off rather than scrolling. Offenders measured
   at a 360px viewport: the shared .permalink recipe (absolute
   max-width:360px exceeds the ~312px content box), the nowrap
   .upt-badge share pill, .badge-code embed line, and .port-row
   (min-width:170px label + desc + pill can't fit one row).
   ============================================================ */
.hpc .verdict-hero > *{min-width:0}
.hpc .permalink{max-width:100%;min-width:0}
.hpc .badge-code{white-space:normal;overflow-wrap:anywhere}
/* Long unbroken hostnames (crumb tail, verdict copy) must wrap, not push. */
.hpc .verdict-line,.hpc .crumb{overflow-wrap:anywhere}
/* curl cheat-sheet: grid items default min-width:auto, so a nowrap command
   chip dictates ~577px min-content and drags the whole landing wide. */
.hpc .cheat > *{min-width:0}
.hpc .ch-row > *{min-width:0}
@media (max-width:960px){
  /* tools-page.css stacks .verdict-hero to a column but keeps
     align-items:flex-start, so children size to MAX-CONTENT and a long
     permalink lays the hero out ~600px wide (invisibly clipped). */
  .hpc .verdict-main,.hpc .v-side{width:100%}
}
@media (max-width:620px){
  .hpc .upt-badge{max-width:100%;flex-wrap:wrap;height:auto;min-height:30px;row-gap:2px;white-space:normal}
  .hpc .port-row{flex-wrap:wrap}
  .hpc .port-row .pt{min-width:0}
  .hpc .port-row .pd{flex:1 1 100%;order:3}
}

/* responsive */
@media (max-width:960px){
    .hpc .duo,.hpc .res-grid{grid-template-columns:1fr}
  .hpc .quad{grid-template-columns:1fr 1fr}
  .hpc .err-grid{grid-template-columns:1fr 1fr}
  .hpc .tools-row{grid-template-columns:1fr 1fr}
  .hpc .band-in{grid-template-columns:1fr;gap:28px}
        }
@media (max-width:620px){
    .hpc .testbar{flex-direction:column;gap:6px}
  .hpc .testbar .btn-run{height:46px;justify-content:center}
  .hpc .quad,.hpc .err-grid,.hpc .tools-row{grid-template-columns:1fr}
  .hpc .tracks,.hpc .sb-grid{grid-template-columns:1fr}
}
