/* Quantum Ready. Same look as Rolando's Lab (lab.rolandoandrade.me):
   Gabarito for headings, Onest for text, brand cyan, pill buttons, rising blocks. */
@font-face {
  font-family: 'Gabarito';
  font-style: normal;
  font-weight: 500 800;
  font-display: swap;
  src: url('/quantum-ready/fonts/gabarito-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Onest';
  font-style: normal;
  font-weight: 400 600;
  font-display: swap;
  src: url('/quantum-ready/fonts/onest-latin.woff2') format('woff2');
}

:root {
  --background: #ffffff;
  --brand: #04bcd4;
  --brand-ink: #027d8c;
  --tint: #cdeff4;
  --tint-2: #e8f8fa;
  --soft: #f2f4f5;
  --line: #e5e5e5;
  --ink: #0a0a0a;
  --muted-ink: #737373;
  --block: #000;
  --block-a: 0.06;
  /* status colors for this tool */
  --bad: #d93025;
  --bad-ink: #b3261e;
  --bad-tint: #fce8e6;
  --good: #188038;
  --good-tint: #e6f4ea;
  --warn: #b06000;
  --warn-tint: #fef7e0;
  --font-display: 'Gabarito', ui-sans-serif, system-ui, sans-serif;
  --font-sans: 'Onest', ui-sans-serif, system-ui, sans-serif;
  color-scheme: light;
}
.dark {
  --background: #13181a;
  --brand-ink: #4fd3e4;
  --tint: #1d4048;
  --tint-2: #172a2f;
  --soft: #1c2326;
  --line: #2a3236;
  --ink: #f2f4f5;
  --muted-ink: #9aa4a8;
  --block: #fff;
  --block-a: 0.06;
  --bad: #f28b82;
  --bad-ink: #f6aea9;
  --bad-tint: #3a1f1d;
  --good: #81c995;
  --good-tint: #1b3326;
  --warn: #fdd663;
  --warn-tint: #3a3220;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scrollbar-gutter: stable; }
body {
  margin: 0;
  background: var(--background);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  transition: background 0.4s, color 0.4s;
}
a { color: inherit; text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 3px; border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ------------------------------------------------------------ rising blocks */
.blocks { position: fixed; inset: 0; z-index: -1; pointer-events: none; overflow: hidden; margin: 0; padding: 0; }
.blocks li {
  position: absolute;
  bottom: -150px;
  list-style: none;
  background: var(--block);
  animation: rise var(--t) linear var(--at) infinite;
}
@keyframes rise {
  0% { transform: translateY(0) rotate(0); opacity: var(--block-a); border-radius: 0; }
  100% { transform: translateY(-120vh) rotate(720deg); opacity: 0; border-radius: 50%; }
}

/* ------------------------------------------------------------ header */
.lab-bar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  max-width: 1160px; margin: 0 auto; padding: 14px 20px;
  background: color-mix(in srgb, var(--background) 82%, transparent);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 700; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand-icon { width: 30px; height: 30px; fill: none; stroke: var(--ink); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transform-origin: 50% 15%; }
.brand-liquid { fill: var(--brand); stroke: none; }
.brand:hover .brand-icon { animation: swing 0.9s cubic-bezier(0.34, 1.4, 0.5, 1); }
@keyframes swing { 25% { transform: rotate(14deg); } 55% { transform: rotate(-9deg); } 80% { transform: rotate(4deg); } }
.tools { display: flex; align-items: center; gap: 6px; }
.home-link { display: inline-flex; align-items: center; gap: 4px; padding: 8px 12px; border-radius: 999px; color: var(--muted-ink); font-size: 14px; text-decoration: none; transition: color 0.2s, background 0.2s; }
.home-link:hover { color: var(--ink); background: var(--soft); }
.home-link svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; transition: transform 0.25s cubic-bezier(0.34, 1.6, 0.5, 1); }
.home-link:hover svg { transform: translate(2px, -2px); }
.tool { display: grid; place-items: center; width: 40px; height: 40px; border: 0; border-radius: 999px; background: transparent; color: var(--ink); cursor: pointer; transition: background 0.2s, transform 0.3s cubic-bezier(0.34, 1.6, 0.5, 1); }
.tool:hover { background: var(--soft); }
.tool:active { transform: scale(0.88); }
.tool svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
#theme .sun, #theme .moon { transform-origin: 12px 12px; transition: transform 0.5s cubic-bezier(0.34, 1.4, 0.5, 1), opacity 0.3s; }
#theme .moon { opacity: 0; transform: rotate(-90deg) scale(0.5); }
.dark #theme .sun { opacity: 0; transform: rotate(90deg) scale(0.5); }
.dark #theme .moon { opacity: 1; transform: none; }
@media (max-width: 560px) { .home-link span { display: none; } }

/* ------------------------------------------------------------ hero */
main { max-width: 880px; margin: 0 auto; padding: 0 20px; }
.hero { padding: 56px 0 24px; }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  margin: 0 0 22px; padding: 6px 14px; border-radius: 999px;
  background: var(--soft); color: var(--muted-ink); font-size: 14px;
}
.pill strong { color: var(--ink); font-weight: 600; }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--bad); box-shadow: 0 0 0 0 rgb(217 48 37 / 0.55); animation: pulse 2s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 8px rgb(217 48 37 / 0); } 100% { box-shadow: 0 0 0 0 rgb(217 48 37 / 0); } }
h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(44px, 8.4vw, 88px);
  line-height: 1;
  letter-spacing: -0.02em;
  max-width: 11ch;
}
.ch { display: inline-block; animation: drop 0.7s cubic-bezier(0.34, 1.5, 0.5, 1) calc(var(--i) * 32ms) both; transition: transform 0.35s cubic-bezier(0.34, 1.8, 0.5, 1), color 0.2s; }
.ch:hover { transform: translateY(-10px) rotate(-6deg); color: var(--brand); }
.word { display: inline-block; white-space: nowrap; }
@keyframes drop { from { opacity: 0; transform: translateY(-30px) rotate(-8deg); } }
.lead { max-width: 36em; margin: 22px 0 30px; color: var(--muted-ink); font-size: 19px; line-height: 1.6; }

.check { display: flex; gap: 10px; max-width: 620px; padding: 6px; border-radius: 999px; background: var(--soft); border: 2px solid transparent; transition: border-color 0.2s, background 0.2s; }
.check:focus-within { border-color: var(--brand); background: var(--background); }
.check input {
  flex: 1; min-width: 0; padding: 10px 16px; border: 0; background: transparent;
  color: var(--ink); font: inherit; font-size: 18px; outline: none;
}
.check input::placeholder { color: var(--muted-ink); }
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 12px 22px; border: 0; border-radius: 999px;
  font: inherit; font-weight: 600; font-size: 16px; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: transform 0.3s cubic-bezier(0.34, 1.6, 0.5, 1), background 0.2s, box-shadow 0.2s;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: scale(0.95); }
.btn.primary { background: var(--ink); color: var(--background); box-shadow: 0 6px 0 -2px color-mix(in srgb, var(--brand) 70%, transparent); }
.btn.primary:hover { box-shadow: 0 9px 0 -2px var(--brand); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn[disabled] { opacity: 0.75; cursor: progress; transform: none; }
.atom { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.atom circle { fill: currentColor; stroke: none; }
.btn:hover .atom, .busy .atom { animation: spin 2.4s linear infinite; }
.busy .atom { animation-duration: 0.9s; }
@keyframes spin { to { transform: rotate(360deg); } }
.examples { margin: 16px 0 0 18px; color: var(--muted-ink); font-size: 15px; }
.examples button { padding: 0; border: 0; background: none; color: var(--ink); font: inherit; text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; cursor: pointer; }
.examples button:hover { text-decoration-color: var(--brand); }
@media (max-width: 560px) {
  .check { flex-direction: column; border-radius: 28px; }
  .check .btn { justify-content: center; }
}

/* ------------------------------------------------------------ result */
.result { padding: 24px 0 8px; }
.verdict {
  position: relative; overflow: hidden;
  padding: 30px 32px; border-radius: 32px;
  background: var(--soft);
  animation: land 0.55s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes land { from { opacity: 0; transform: translateY(16px) scale(0.98); } }
.verdict.bad { background: var(--bad-tint); }
.verdict.good { background: var(--good-tint); }
.verdict.warn { background: var(--warn-tint); }
.verdict .host { margin: 0 0 6px; color: var(--muted-ink); font-size: 15px; overflow-wrap: anywhere; }
.verdict h2 { margin: 0; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4.6vw, 44px); line-height: 1.08; letter-spacing: -0.01em; max-width: 20ch; }
.verdict.bad h2 { color: var(--bad-ink); }
.verdict.good h2 { color: var(--good); }
.verdict.warn h2 { color: var(--warn); }
.verdict .sub { margin: 12px 0 0; max-width: 40em; }
.verdict .share { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.verdict .share .btn { padding: 9px 16px; font-size: 15px; background: var(--background); color: var(--ink); }
.verdict .share .btn svg { width: 16px; height: 16px; fill: currentColor; }

.findings { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 10px; }
.findings li { display: grid; grid-template-columns: 22px 1fr; gap: 12px; align-items: start; }
.findings .mark { width: 22px; height: 22px; margin-top: 2px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-size: 13px; font-weight: 700; }
.findings .mark svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.findings .bad .mark { background: var(--bad); }
.findings .good .mark { background: var(--good); }
.findings .warn .mark { background: var(--warn); }
.findings .info .mark { background: var(--muted-ink); }
.dark .findings .mark { color: var(--background); }

/* The chain, drawn as a ladder from your site up to the root Chrome trusts. */
.chain-head { margin: 44px 0 6px; font-family: var(--font-display); font-weight: 700; font-size: 24px; }
.chain-note { margin: 0 0 18px; color: var(--muted-ink); font-size: 15px; }
.chain { list-style: none; margin: 0; padding: 0; position: relative; display: flex; flex-direction: column-reverse; gap: 14px; }
.link {
  position: relative; margin-left: 34px; padding: 18px 22px; border-radius: 24px;
  background: color-mix(in srgb, var(--soft) 88%, transparent); border: 2px solid transparent;
  animation: land 0.5s cubic-bezier(0.22, 1, 0.36, 1) calc(var(--n) * 90ms) both;
}
.link::before {
  /* node on the rail */
  content: ''; position: absolute; left: -30px; top: 26px; width: 14px; height: 14px; border-radius: 50%;
  background: var(--background); border: 3px solid var(--line);
}
.link:not(:first-child)::after {
  /* rail segment down to the previous link (the chain is drawn bottom up) */
  content: ''; position: absolute; left: -24px; top: 44px; width: 3px; height: calc(100% - 4px);
  background: var(--line);
}
.link.p256 { border-color: var(--bad); background: var(--bad-tint); }
.link.p256::before { border-color: var(--bad); background: var(--bad); }
.link.root::before { border-color: var(--brand); }
.link .role { margin: 0; color: var(--muted-ink); font-size: 14px; }
.link h3 { margin: 2px 0 10px; font-family: var(--font-display); font-weight: 700; font-size: 21px; line-height: 1.2; overflow-wrap: anywhere; }
.link .meta { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; color: var(--muted-ink); font-size: 14px; }
.stamp {
  display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px; border-radius: 999px;
  background: var(--background); color: var(--ink); font-weight: 600; font-size: 14px; border: 2px solid var(--line);
}
.stamp.p256 {
  color: #fff; border-color: var(--bad);
  background: repeating-linear-gradient(-45deg, var(--bad) 0 6px, color-mix(in srgb, var(--bad) 82%, #000) 6px 12px);
}
.dark .stamp.p256 { color: #2a0b09; }
.stamp.pq { border-color: var(--brand); color: var(--brand-ink); }
.link details { margin-top: 10px; font-size: 14px; color: var(--muted-ink); }
.link summary { cursor: pointer; width: fit-content; }
.link dl { display: grid; grid-template-columns: max-content 1fr; gap: 4px 14px; margin: 10px 0 0; }
.link dt { color: var(--muted-ink); }
.link dd { margin: 0; color: var(--ink); overflow-wrap: anywhere; }
.link code { font-size: 12.5px; }

.alts { margin: 18px 0 0; color: var(--muted-ink); font-size: 15px; }
.tls { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 10px; margin: 18px 0 0; }
.tls div { padding: 14px 18px; border-radius: 20px; background: color-mix(in srgb, var(--soft) 88%, transparent); }
.tls dt { color: var(--muted-ink); font-size: 14px; }
.tls dd { margin: 2px 0 0; font-weight: 600; font-size: 15px; word-break: break-word; }
.tls dd.pq { color: var(--brand-ink); }

.error { padding: 26px 30px; border-radius: 28px; background: var(--soft); animation: land 0.45s cubic-bezier(0.22, 1, 0.36, 1) both; }
.error h2 { margin: 0 0 6px; font-family: var(--font-display); font-size: 26px; }
.error p { margin: 0; }

.loading { display: flex; align-items: center; gap: 14px; padding: 22px 26px; border-radius: 28px; background: var(--soft); color: var(--muted-ink); }
.loading .bar { flex: 1; height: 6px; border-radius: 999px; background: var(--line); overflow: hidden; }
.loading .bar::after { content: ''; display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--brand); animation: scan 1.1s ease-in-out infinite alternate; }
@keyframes scan { from { transform: translateX(-10%); } to { transform: translateX(160%); } }

/* ------------------------------------------------------------ faq */
.faq { padding: 64px 0 0; }
.faq h2 { margin: 0 0 18px; font-family: var(--font-display); font-weight: 800; font-size: clamp(28px, 4vw, 38px); }
.faq details { border-top: 2px solid var(--line); }
.faq details:last-of-type { border-bottom: 2px solid var(--line); }
.faq summary {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 18px 2px; cursor: pointer; list-style: none;
  font-family: var(--font-display); font-weight: 700; font-size: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; font-size: 26px; font-weight: 500; color: var(--muted-ink); transition: transform 0.3s cubic-bezier(0.34, 1.6, 0.5, 1); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq details p { margin: 0 0 20px; max-width: 40em; color: var(--muted-ink); }
.faq details p a { color: var(--ink); }

.lab-foot { max-width: 880px; margin: 0 auto; padding: 56px 20px 64px; color: var(--muted-ink); font-size: 14px; text-align: center; }
.lab-foot a { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; }
  .blocks { display: none; }
}
.findings.quantum strong { font-weight: 600; }
