/* ============================================================
   /website-check -- the free website check. Sits on top of guides.css
   (tokens, nav, footer, buttons, FAQ); everything here is wc-*.
   ============================================================ */

.wc-hero { margin-bottom: 18px; }
.wc-hero h1 { margin-bottom: 6px; }
.wc-lede { margin: 0; font-size: 1.15rem; color: var(--muted); }
.wc-tool {
    background: var(--surface);
    border: 1px solid var(--mist);
    border-radius: 12px;
    padding: 24px;
    margin: 8px 0 40px;
    font-family: "Instrument Sans", system-ui, sans-serif;
}
@media (max-width: 640px) { .wc-tool { padding: 18px; } }
/* Same look wherever the module sits: inside a guide the article's larger
   serif text and paragraph spacing would otherwise leak in. */
.wc-tool { font-size: 1rem; line-height: 1.5; max-width: none; }
.wc-tool p { margin: 0; }

.wc-tool .wc-form label { display: block; font-weight: 600; font-size: 0.95rem; margin-bottom: 8px; }
.wc-tool .wc-form-row { display: flex; gap: 10px; flex-wrap: wrap; }
.wc-tool .wc-form-row input, .wc-tool .wc-report-form input {
    flex: 1 1 240px;
    min-width: 0;
    min-height: 48px;
    padding: 0 14px;
    border: 1.5px solid var(--mist);
    border-radius: 8px;
    background: var(--input-bg);
    color: var(--ink);
    font: inherit;
    font-size: 1.05rem;
}
.wc-tool .wc-form-row input:focus, .wc-tool .wc-report-form input:focus { border-color: var(--brass); outline: 2px solid var(--brass); outline-offset: 1px; }
.wc-tool .wc-form-row input::placeholder, .wc-tool .wc-report-form input::placeholder { color: var(--muted); opacity: 1; }
.wc-tool .wc-form-row .btn, .wc-tool .wc-report-form .btn { flex: 0 0 auto; }
.wc-tool .wc-form-row .btn:disabled, .wc-tool .wc-report-form .btn:disabled { opacity: 0.7; cursor: progress; }
.wc-tool .wc-input { position: relative; flex: 1 1 240px; min-width: 0; display: flex; }
.wc-tool .wc-input i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); pointer-events: none; }
.wc-tool .wc-input input { flex: 1 1 auto; width: 100%; padding-left: 40px !important; }
.wc-tool .wc-form-note { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 12px 0 0; font-size: 0.85rem; color: var(--muted); }
.wc-tool .wc-form-note span::before { content: "\2713"; color: var(--pine); font-weight: 700; margin-right: 6px; }
.wc-tool .wc-form-error { margin: 10px 0 0; font-size: 0.92rem; font-weight: 600; color: var(--danger); }
.wc-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Progress: four steps, each a circle that spins while active. */


.wc-tool .wc-progress { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--mist); }

/* Loading: site + percent, a thin bar, the steps, and a rotating fact. */

.wc-tool .wc-progress-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin-bottom: 8px; }
.wc-tool .wc-progress-site { margin: 0; font-weight: 600; overflow-wrap: anywhere; min-width: 0; }
.wc-tool .wc-progress-pct { font-size: 0.85rem; font-weight: 600; color: var(--muted); font-variant-numeric: tabular-nums; }
.wc-tool .wc-progress-bar { height: 6px; border-radius: 999px; background: var(--mist); overflow: hidden; margin-bottom: 12px; }
.wc-tool .wc-progress-bar span { display: block; height: 100%; width: 0; border-radius: 999px; background: linear-gradient(90deg, var(--pine), var(--brass)); transition: width 0.35s ease; }
.wc-tool .wc-fact { display: flex; gap: 10px; align-items: flex-start; margin: 14px 0 0; padding: 12px 14px; border-radius: 8px; background: var(--paper); font-size: 0.9rem; line-height: 1.45; min-height: 3.6em; }
.wc-tool .wc-fact i { color: var(--brass); margin-top: 3px; }
.wc-tool .wc-fact span { opacity: 0; transform: translateY(4px); transition: opacity 0.3s ease, transform 0.3s ease; }
.wc-tool .wc-fact span.is-in { opacity: 1; transform: none; }
.wc-tool .wc-steps li.is-done::before { animation: wc-pop 0.3s ease; }
.wc-tool .wc-steps { list-style: none; margin: 0; padding: 0; }
.wc-tool .wc-steps li {
    position: relative;
    padding: 6px 0 6px 32px;
    color: var(--muted);
}
.wc-tool .wc-steps li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 9px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    border: 2px solid var(--mist);
    box-sizing: border-box;
}
.wc-tool .wc-steps li.is-active { color: var(--ink); font-weight: 600; }
.wc-tool .wc-steps li.is-active::before { border-color: var(--mist); border-top-color: var(--pine); animation: wc-spin 0.8s linear infinite; }
.wc-tool .wc-steps li.is-done { color: var(--ink); }
.wc-tool .wc-steps li.is-done::before {
    border-color: var(--pine-fill);
    background: var(--pine-fill) center / 11px 11px no-repeat url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3 8.5l3.2 3.2L13 5' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}
@keyframes wc-spin { to { transform: rotate(360deg); } }

/* Result: a score ring, the site and verdict, and count pills. */


.wc-tool .wc-result { margin-top: 24px; padding-top: 22px; border-top: 1px solid var(--mist); }
.wc-tool .wc-score-row { display: flex; align-items: center; gap: 22px; scroll-margin-top: 16px; }
.wc-tool .wc-ring { --wc-color: var(--brass); position: relative; flex: 0 0 auto; width: 116px; height: 116px; }
.wc-tool .wc-ring.is-good { --wc-color: #15803D; }
.wc-tool .wc-ring.is-ok { --wc-color: var(--brass); }
.wc-tool .wc-ring.is-low { --wc-color: #C2410C; }
.wc-tool .wc-ring svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.wc-tool .wc-ring circle { fill: none; stroke-width: 10; }
.wc-tool .wc-ring-track { stroke: var(--mist); }
.wc-tool .wc-ring-fill {
    stroke: var(--wc-color);
    stroke-linecap: round;
    stroke-dasharray: 326.73;
    stroke-dashoffset: calc(326.73 * (1 - var(--wc-pct) / 100));
    transition: stroke-dashoffset 0.8s ease, stroke 0.3s ease;
}
.wc-tool .wc-ring-num {
    position: absolute;
    inset: 0;
    margin: 0;
    display: grid;
    place-items: center;
    font-family: "Newsreader", Georgia, serif;
    font-weight: 600;
    font-size: 2.5rem;
    color: var(--ink);
}
.wc-tool .wc-score-text { min-width: 0; }
.wc-tool .wc-site { margin: 0; font-size: 0.88rem; color: var(--muted); overflow-wrap: anywhere; }
.wc-tool .wc-verdict { margin: 2px 0 10px; font-family: "Newsreader", Georgia, serif; font-size: 1.3rem; line-height: 1.25; }
.wc-tool .wc-pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; }
.wc-tool .wc-pill { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: 999px; font-size: 0.82rem; font-weight: 600; background: var(--paper); border: 1px solid var(--mist); }
.wc-tool .wc-pill i { font-size: 0.75rem; }
.wc-tool .wc-pill.is-pass i { color: #15803D; }
.wc-tool .wc-pill.is-warn i { color: var(--brass); }
.wc-tool .wc-pill.is-fail i { color: var(--danger); }
@media (max-width: 480px) {
    .wc-tool .wc-score-row { gap: 16px; }
    .wc-tool .wc-ring { width: 96px; height: 96px; }
    .wc-tool .wc-ring-num { font-size: 2.1rem; }
    .wc-tool .wc-verdict { font-size: 1.1rem; }
}

/* Mobile load time: their time as a bar next to Google's 2.5s mark. */

.wc-tool .wc-load { margin-top: 18px; padding: 14px 16px; border: 1px solid var(--mist); border-radius: 10px; background: var(--paper); }
.wc-tool .wc-load-title { margin: 0; font-weight: 600; }
.wc-tool .wc-load-page { margin: 2px 0 10px; font-size: 0.82rem; color: var(--muted); overflow-wrap: anywhere; }
.wc-tool .wc-load-title i { color: var(--pine); margin-right: 4px; }
.wc-tool .wc-bar-row { display: grid; grid-template-columns: 112px minmax(0, 1fr) 44px; align-items: center; gap: 10px; margin: 6px 0; font-size: 0.88rem; }
.wc-tool .wc-bar-label { color: var(--muted); }
.wc-tool .wc-bar { height: 12px; border-radius: 999px; background: var(--mist); overflow: hidden; }
.wc-tool .wc-bar-fill { display: block; height: 100%; width: 0; border-radius: 999px; background: var(--brass); transition: width 0.8s ease; }
.wc-tool .wc-bar-fill.is-pass { background: #15803D; }
.wc-tool .wc-bar-fill.is-warn { background: var(--brass); }
.wc-tool .wc-bar-fill.is-fail { background: #C2410C; }
.wc-tool .wc-bar-fill.is-bench { background: var(--muted); }
.wc-tool .wc-bar-val { font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.wc-tool .wc-load-note { margin: 8px 0 0; font-size: 0.88rem; color: var(--muted); }
@media (prefers-reduced-motion: reduce) { .wc-tool .wc-bar-fill { transition: none; } }

/* Reveal: each visible card fades up in turn (--wc-d set by the script). */


@keyframes wc-up { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes wc-pop { 0% { transform: scale(0.6); } 70% { transform: scale(1.12); } 100% { transform: scale(1); } }
.wc-tool .wc-result.is-revealing [data-reveal]:not([hidden]) { animation: wc-up 0.5s ease both; animation-delay: calc(var(--wc-d, 0) * 140ms); }
.wc-tool .wc-result.is-revealing .wc-pill { animation: wc-pop 0.35s ease both; }
.wc-tool .wc-result.is-revealing .wc-pill:nth-child(1) { animation-delay: 0.45s; }
.wc-tool .wc-result.is-revealing .wc-pill:nth-child(2) { animation-delay: 0.55s; }
.wc-tool .wc-result.is-revealing .wc-pill:nth-child(3) { animation-delay: 0.65s; }
.wc-tool .wc-result.is-revealing .wc-fixes-list li { animation: wc-up 0.45s ease both; animation-delay: calc(var(--wc-d, 0) * 140ms + 120ms + var(--wc-i, 0) * 110ms); }
.wc-tool .wc-ring-fill { transition: stroke-dashoffset 1.1s cubic-bezier(.2,.8,.2,1), stroke 0.3s ease; }

/* Measuring: a shimmering bar and a running seconds count while the phone test runs. */


@keyframes wc-shimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }
.wc-tool .wc-load.is-measuring [data-wc="loadYou"] {
    width: 100% !important;
    background: linear-gradient(90deg, var(--mist) 0%, var(--pine) 50%, var(--mist) 100%);
    background-size: 200% 100%;
    opacity: 0.55;
    animation: wc-shimmer 1.6s linear infinite;
}
.wc-tool .wc-load.is-measuring [data-wc="loadYouVal"] { color: var(--muted); font-weight: 400; }

/* Fix these first: icon, title + tag, one line. */


.wc-tool .wc-fixes { margin-top: 24px; }
.wc-tool .wc-fixes-title { font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.82rem; font-weight: 600; text-transform: none; color: var(--muted); margin: 0 0 4px; }
.wc-tool .wc-fixes-list { margin: 0; padding: 0; list-style: none; }
.wc-tool .wc-fixes-list li { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--mist); }
.wc-tool .wc-fixes-list li:last-child { border-bottom: 0; }
.wc-tool .wc-fix-icon {
    flex: 0 0 auto;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    display: grid;
    place-items: center;
    font-size: 1rem;
    background: var(--paper);
    border: 1px solid var(--mist);
}
.wc-tool .wc-fixes-list li.is-missing .wc-fix-icon { color: var(--danger); }
.wc-tool .wc-fixes-list li.is-partial .wc-fix-icon { color: var(--brass); }
.wc-tool .wc-fix-body { min-width: 0; }
.wc-tool .wc-fix-title { margin: 0; font-weight: 600; font-size: 1rem; }
.wc-tool .wc-fix-text { margin: 2px 0 0; font-size: 0.92rem; color: var(--muted); }
.wc-tool .wc-tag { display: inline-block; margin-left: 2px; padding: 0 7px; border-radius: 999px; font-size: 0.7rem; font-weight: 600; vertical-align: 2px; border: 1px solid currentColor; }
.wc-tool .wc-fixes-list li.is-missing .wc-tag { color: var(--danger); }
.wc-tool .wc-fixes-list li.is-partial .wc-tag { color: var(--brass); }
.wc-tool { --wc-image: #1D4ED8; --wc-image-bg: #EFF6FF; --wc-image-border: #BFDBFE; }
@media (prefers-color-scheme: dark) { body.guide-page:not([data-theme="light"]) .wc-tool { --wc-image: #60A5FA; --wc-image-bg: #13233A; --wc-image-border: #1E3A5F; } }
body.guide-page[data-theme="dark"] .wc-tool { --wc-image: #60A5FA; --wc-image-bg: #13233A; --wc-image-border: #1E3A5F; }
.wc-tool .wc-fixes-list li.is-image .wc-fix-icon, .wc-tool .wc-fixes-list li.is-image .wc-tag { color: var(--wc-image); }
.wc-tool .wc-images-alert {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    margin: 20px 0 0;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--wc-image-bg);
    border: 1px solid var(--wc-image-border);
    border-left: 5px solid var(--wc-image);
}
.wc-tool .wc-images-alert[hidden] { display: none; }
.wc-tool .wc-images-icon {
    flex: 0 0 auto;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    background: var(--wc-image);
    color: #fff;
    font-size: 1.05rem;
}
.wc-tool .wc-images-title { margin: 0; font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.wc-tool .wc-images-lead { margin: 4px 0 0; font-size: 0.92rem; }
.wc-tool .wc-images-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0 0; }
.wc-tool .wc-images-chip { padding: 3px 10px; border-radius: 999px; background: var(--surface); border: 1px solid var(--wc-image-border); font-size: 0.86rem; font-weight: 600; color: var(--ink); }
.wc-tool .wc-images-fix { margin: 10px 0 0; font-size: 0.9rem; line-height: 1.5; color: var(--ink); }
.wc-tool .wc-allgood { margin: 18px 0 0; font-weight: 600; color: var(--pine); }

/* Full report: one line, one field. */


.wc-tool .wc-report { margin-top: 20px; padding: 16px 18px; background: var(--paper); border: 1px solid var(--mist); border-radius: 10px; }
.wc-tool .wc-report-title { margin: 0 0 10px; font-weight: 600; }
.wc-tool .wc-report-title i { color: var(--brass); margin-right: 4px; }
.wc-tool .wc-report-more { font-weight: 400; color: var(--muted); font-size: 0.88rem; }
.wc-tool .wc-report-form { display: flex; gap: 10px; flex-wrap: wrap; }
.wc-tool .wc-report-form[hidden] { display: none; }
.wc-tool .wc-report-note { margin: 8px 0 0; font-size: 0.8rem; color: var(--muted); }
.wc-tool .wc-report-done { margin: 4px 0 0 !important; font-weight: 600; color: var(--pine); }
.wc-tool .wc-report-done i { color: var(--success-icon); margin-right: 6px; }

/* What we check: three columns of icon + name. */


.wc-section { margin-bottom: 40px; }
.wc-section h2 { font-family: "Newsreader", Georgia, serif; font-size: 1.5rem; margin: 0 0 14px; }
.wc-groups { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
@media (max-width: 720px) { .wc-groups { grid-template-columns: minmax(0, 1fr); } }
.wc-group { background: var(--surface); border: 1px solid var(--mist); border-radius: 10px; padding: 14px 16px; }
.wc-group h3 { margin: 0 0 8px; font-family: "Instrument Sans", system-ui, sans-serif; font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.wc-group ul { list-style: none; margin: 0; padding: 0; }
.wc-group li { display: flex; align-items: center; gap: 10px; padding: 5px 0; font-size: 0.94rem; }
.wc-group li i { width: 18px; text-align: center; color: var(--pine); }

/* Related guide: a card linking to the guide (opens in a new tab). */

body.guide-page a.wc-guide-card {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 14px;
    padding: 16px 18px;
    background: var(--surface);
    border: 1px solid var(--mist);
    border-left: 4px solid var(--brass);
    border-radius: 10px;
    color: var(--ink);
    text-decoration: none;
    transition: border-color 0.15s ease;
}
body.guide-page a.wc-guide-card:hover { border-color: var(--pine); border-left-color: var(--brass); }
body.guide-page a.wc-guide-card:focus-visible { outline: 2px solid var(--brass); outline-offset: 2px; }
.wc-guide-icon { flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px; display: grid; place-items: center; background: var(--paper); border: 1px solid var(--mist); color: var(--pine); }
.wc-guide-text { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.wc-guide-label { font-size: 0.78rem; font-weight: 600; color: var(--muted); }
.wc-guide-title { font-family: "Newsreader", Georgia, serif; font-weight: 600; font-size: 1.12rem; color: var(--ink); }
.wc-guide-sub { font-size: 0.88rem; color: var(--muted); }
.wc-guide-arrow { flex: 0 0 auto; color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
    .wc-tool .wc-steps li.is-active::before, .wc-tool .wc-steps li.is-done::before, .wc-tool .wc-result.is-revealing [data-reveal]:not([hidden]), .wc-tool .wc-result.is-revealing .wc-pill, .wc-tool .wc-result.is-revealing .wc-fixes-list li, .wc-tool .wc-load.is-measuring [data-wc="loadYou"] { animation: none; }
    .wc-tool .wc-ring-fill, .wc-tool .wc-progress-bar span, .wc-tool .wc-fact span, .wc-tool .wc-bar-fill { transition: none; }
    .wc-tool .wc-fact span { opacity: 1; transform: none; }
}

/* ── Featured placement inside a guide ──────────────────────
   A pine panel with its own heading; the white tool card sits inside. */
.wc-feature {
    margin: 2em 0 2.4em;
    padding: 26px 26px 24px;
    border-radius: 16px;
    background: linear-gradient(160deg, var(--pine-fill) 0%, var(--pine-deep) 100%);
    border: 1px solid rgba(165, 126, 46, 0.35);
    box-shadow: 0 6px 16px rgba(23, 44, 38, 0.10);
    font-family: "Instrument Sans", system-ui, sans-serif;
    scroll-margin-top: 16px;
}
.g-article .wc-feature h2 {
    margin: 0 0 6px;
    color: #fff;
    font-size: 1.7rem;
    line-height: 1.2;
}
.g-article .wc-feature h2 i { color: var(--brass); margin-right: 6px; font-size: 0.85em; }
.g-article .wc-feature .wc-feature-lede { margin: 0 0 18px; color: rgba(255, 255, 255, 0.88); font-size: 1rem; line-height: 1.5; }
.wc-feature .wc-tool { margin: 0; box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); border-color: transparent; }
@media (max-width: 640px) {
    .wc-feature { padding: 20px 14px 14px; border-radius: 14px; }
    .g-article .wc-feature h2 { font-size: 1.4rem; }
    .wc-feature .wc-tool { padding: 16px; }
}

/* Email-first copy: a lighter panel, so a second module doesn't read as a repeat. */
.wc-feature.wc-feature-light {
    background: var(--paper);
    border: 1px solid var(--mist);
    border-top: 4px solid var(--brass);
    box-shadow: 0 12px 30px rgba(23, 44, 38, 0.10);
}
.g-article .wc-feature-light h2 { color: var(--ink); }
.g-article .wc-feature-light h2 i { color: var(--brass); }
.g-article .wc-feature-light .wc-feature-lede { color: var(--ink); }
.wc-feature-light .wc-tool { border-color: var(--mist); box-shadow: none; }
.wc-tool .wc-report-status { margin: 0; font-size: 0.92rem; color: var(--muted); }
.wc-tool .wc-report-status[hidden] { display: none; }

/* Blocked by the site's bot filter: a notice above the results. While
   Google's test runs (.is-partial) only the notice and the measuring load
   card show; then the score and top fixes from the tests that ran. */
.wc-tool .wc-result.is-partial [data-wc="scoreRow"],
.wc-tool .wc-result.is-partial [data-wc="fixesWrap"],
.wc-tool .wc-result.is-partial [data-wc="report"],
.wc-tool .wc-result.is-partial [data-wc="imagesNote"],
.wc-tool .wc-result.is-partial [data-wc="allGood"] { display: none; }
.wc-tool .wc-blocked {
    display: flex;
    gap: 14px;
    align-items: flex-start;
    padding: 16px 18px;
    border-radius: 10px;
    background: var(--paper);
    border: 1px solid var(--mist);
    border-left: 5px solid var(--brass);
}
.wc-tool .wc-blocked[hidden] { display: none; }
.wc-tool .wc-blocked:not([hidden]) + * { margin-top: 18px; }
.wc-tool .wc-blocked-icon { flex: 0 0 auto; width: 40px; height: 40px; border-radius: 50%; display: grid; place-items: center; background: var(--brass); color: #fff; }
.wc-tool .wc-blocked-title { margin: 0; font-weight: 700; font-size: 1.05rem; }
.wc-tool .wc-blocked-text { margin: 4px 0 0; font-size: 0.92rem; line-height: 1.5; }

/* The friendly mobile load time label on the card. */
.wc-tool .wc-load-label { display: inline-block; margin-left: 6px; padding: 1px 9px; border-radius: 999px; font-size: 0.78rem; font-weight: 700; color: #fff; vertical-align: 1px; }
.wc-tool .wc-load-label[hidden] { display: none; }
.wc-tool .wc-load-label.is-pass { background: #15803D; }
.wc-tool .wc-load-label.is-warn { background: #8A6824; }
.wc-tool .wc-load-label.is-fail { background: #C2410C; }
.wc-tool .wc-bars[hidden], .wc-tool .wc-load-key[hidden], .wc-tool [data-wc="loadMeasure"][hidden] { display: none; }
.wc-tool .wc-load-key { margin: 6px 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--muted); }
