/* App shell styles. Tokens match the hub (wizetool.com) so every tool feels like one product. */
:root {
  --ink: #101828; --text: #344054; --muted: #667085; --line: #e4e7ec; --soft: #f7f8fc;
  --brand: #5b4dff; --brand-dark: #4538e0; --tint: #efedff;
  --ok: #067647; --ok-bg: #ecfdf3; --warn: #93370d; --warn-bg: #fef0c7; --bad: #b42318; --bad-bg: #fee4e2;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --bar: 44px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 16px; line-height: 1.55; color: var(--text); background: var(--soft); }
a { color: var(--brand); text-underline-offset: 3px; }
:focus-visible { outline: 3px solid var(--brand); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); letter-spacing: -0.02em; line-height: 1.2; margin: 0; }
kbd { font: inherit; font-size: .85em; background: #fff; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; }

/* ---- network bar ---- */
.netbar { height: var(--bar); display: flex; align-items: center; gap: 16px; padding: 0 16px; background: var(--ink); color: #d0d5dd; font-size: .9rem; }
.netbar a { color: #d0d5dd; text-decoration: none; }
.netbar a:hover { color: #fff; }
.netbar-logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 750; color: #fff !important; }
.netbar-back { display: inline-flex; align-items: center; gap: 5px; min-height: 22px; padding: 3px 8px; border: 1px solid rgba(208,213,221,.35); border-radius: 6px; color: #eaecf0 !important; font-size: .72rem; font-weight: 600; line-height: 1; transition: background .15s, border-color .15s, color .15s; }
.netbar-back svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.netbar-back:hover { background: rgba(255,255,255,.1); border-color: rgba(208,213,221,.65); color: #fff !important; }
.netbar-back-short { display: none; }
.netbar-help { margin-left: auto; }

.netbar-menu { display: none; align-items: center; justify-content: center; width: 38px; height: 38px; margin-left: auto; background: transparent; border: 1px solid rgba(208,213,221,.4); border-radius: 8px; color: #d0d5dd; cursor: pointer; }
.netbar-menu:hover { background: rgba(255,255,255,.1); color: #fff; }
.netbar-menu svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.netbar-dropdown { display: none; position: absolute; top: var(--bar); right: 12px; z-index: 60; min-width: 200px; background: #fff; border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 12px 32px -12px rgba(16,24,40,.3); padding: 6px; }
.netbar-dropdown.open { display: block; }
.netbar-dropdown a { display: block; padding: 9px 12px; border-radius: 7px; color: var(--ink); text-decoration: none; font-size: .92rem; font-weight: 560; }
.netbar-dropdown a:hover { background: var(--soft); }

/* ---- single-screen workspace ---- */
.app { display: grid; grid-template-columns: 360px minmax(0, 1fr); height: calc(100vh - var(--bar)); height: calc(100dvh - var(--bar)); min-height: 560px; position: relative; overflow: hidden; }
.sidebar, .workspace { min-height: 0; }
.sidebar { background: #fff; border-right: 1px solid var(--line); padding: 20px; overflow-y: auto; display: flex; flex-direction: column; }
.sidebar-tabs { display: flex; gap: 4px; padding: 4px; margin: 0 0 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--soft); flex: none; }
.sidebar-tab { flex: 1; min-width: 0; padding: 10px 8px; border: 0; border-radius: 9px; background: transparent; color: var(--text); font: inherit; font-size: .9rem; font-weight: 650; cursor: pointer; }
.sidebar-tab.is-active { background: #fff; color: var(--brand-dark); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.sidebar-tab:focus-visible { position: relative; z-index: 1; }
.sidebar-panel { flex: 1; overflow: visible; }
.sidebar h1 { color: var(--brand); font-size: 1.4rem; font-weight: 750; }
.sub { margin: 5px 0 16px; color: var(--muted); font-size: .9rem; line-height: 1.45; }
label { display: block; margin: 14px 0 6px; font-weight: 650; color: var(--ink); font-size: .92rem; }
.opt { font-weight: 500; color: var(--muted); }
input[type="text"], select, textarea { width: 100%; font: inherit; font-size: .95rem; color: var(--ink); padding: 10px 12px; background: #fff; border: 1px solid #cfd4dc; border-radius: 10px; }
textarea { resize: vertical; min-height: 180px; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); }
.counter { margin-top: 6px; color: var(--muted); font-size: .85rem; text-align: right; }
.row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.btn { font: inherit; font-weight: 650; padding: 10px 18px; border-radius: 10px; border: 1px solid transparent; cursor: pointer; }
.btn-primary { background: var(--brand); color: #fff; flex: 1; }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: #fff; color: var(--ink); border-color: #cfd4dc; }
.btn-ghost:hover { border-color: var(--ink); }
.privacy { margin: 10px 0 0; color: var(--muted); font-size: .82rem; line-height: 1.45; }

/* One reserved horizontal ad strip, below the app and away from its controls. */
.ad-slot { width: min(970px, calc(100% - 32px)); margin: 18px auto 28px; padding: 8px 14px; background: #fff; border: 1px dashed #cfd4dc; border-radius: 10px; text-align: center; }
.ad-slot[hidden] { display: none; }
.ad-label { display: block; margin-bottom: 4px; color: var(--muted); font-size: .7rem; letter-spacing: .04em; }
.ad-box { min-height: 90px; overflow: hidden; }

/* ---- results ---- */
.workspace { overflow-y: auto; padding: 28px clamp(16px, 3vw, 40px) 40px; }
.empty { max-width: 560px; margin: 8vh auto 0; text-align: center; }
.empty h2 { font-size: 1.4rem; margin-bottom: 8px; }
#results[hidden], .empty[hidden] { display: none; }
.summary { display: flex; flex-wrap: wrap; gap: 28px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 24px; }
.summary h2 { font-size: 1.5rem; }
.pills { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { font-size: .82rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; }
.pill-pass { background: var(--ok-bg); color: var(--ok); }
.pill-partial { background: var(--warn-bg); color: var(--warn); }
.pill-fail { background: var(--bad-bg); color: var(--bad); }
.stats { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }

.panel { margin-top: 18px; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px 22px; }
.panel h3 { font-size: 1.1rem; margin-bottom: 10px; }
.group { margin-top: 22px; }
.group > h3 { font-size: .95rem; color: var(--muted); font-weight: 650; margin-bottom: 8px; }
.check { display: grid; grid-template-columns: 26px 1fr auto; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin-bottom: 8px; }
.check h4 { margin: 0; font-size: 1rem; color: var(--ink); }
.check p { margin: 2px 0 0; font-size: .92rem; }
.check .tip { color: var(--text); margin-top: 6px; }
.check .tip b { color: var(--ink); }
.dot { width: 18px; height: 18px; border-radius: 50%; margin-top: 3px; }
.dot-pass { background: #12b76a; } .dot-partial { background: #f79009; } .dot-fail { background: #f04438; }
.pts { font-size: .85rem; color: var(--muted); white-space: nowrap; }
.disclaimer { margin-top: 20px; color: var(--muted); font-size: .88rem; }
.result-count { color: var(--muted); font-size: .85rem; font-weight: 600; }

/* ---- crawlable text below the app ---- */
.about { background: #fff; border-top: 1px solid var(--line); padding: 40px 20px 56px; }
.about-inner { max-width: 760px; margin: 0 auto; }
.about h2 { font-size: 1.3rem; margin-bottom: 10px; }

@media (max-width: 1240px) {
  .app { grid-template-columns: 360px minmax(0, 1fr); }
}
@media (max-width: 860px) {
  .app { display: block; height: auto; min-height: 0; overflow: visible; }
  .sidebar { border-right: 0; border-bottom: 1px solid var(--line); overflow: visible; }
  .workspace { overflow: visible; }
  .netbar-help { display: none; }
  .netbar { gap: 10px; padding: 0 12px; }
  .check { grid-template-columns: 22px 1fr; }
  .pts { grid-column: 2; }
}
@media (max-width: 420px) {
  .netbar { gap: 8px; }
  .netbar-back { padding: 3px 7px; }
  .netbar-back-label { display: none; }
  .netbar-back-short { display: inline; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; scroll-behavior: auto !important; } }

/* ---- app footer ---- */
.app-footer { margin-top: 32px; padding: 24px 20px 28px; background: var(--ink); color: #cfd5df; font-size: .88rem; }
.app-footer-inner { max-width: 900px; margin: 0 auto; text-align: center; }
.app-footer-brand { color: #fff; font-weight: 700; font-size: .95rem; margin-bottom: 6px; }
.app-footer-heart { display: inline-block; color: var(--brand); animation: heartbeat 1.4s ease-in-out infinite; }
.app-footer-links { margin-top: 10px; }
.app-footer-links a { color: #cfd5df; text-decoration: none; margin: 0 8px; }
.app-footer-links a:hover { color: #fff; }
.app-footer-copy { margin-top: 12px; color: #8a93a3; font-size: .8rem; }

@keyframes heartbeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.15); }
  50% { transform: scale(0.92); }
  75% { transform: scale(1.08); }
}

/* ---- additions ---- */
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tabs { display: flex; gap: 4px; padding: 4px; background: var(--soft); border: 1px solid var(--line); border-radius: 12px; margin-bottom: 4px; }
.tab { flex: 1; font: inherit; font-weight: 650; font-size: .92rem; padding: 8px 10px; border: 0; border-radius: 9px; background: transparent; color: var(--text); cursor: pointer; }
.tab.is-active { background: #fff; color: var(--ink); box-shadow: 0 1px 2px rgba(16,24,40,.12); }
.hint { margin: 6px 0 0; color: var(--muted); font-size: .85rem; }
[hidden] { display: none !important; }
.error { max-width: 640px; margin: 8vh auto 0; padding: 18px 20px; background: var(--bad-bg); border: 1px solid #fda29b; color: #7a271a; border-radius: 12px; }
.error strong { display: block; margin-bottom: 4px; color: var(--bad); }
.noscript { padding: 20px; text-align: center; }
.btn-sm { padding: 7px 12px; font-size: .88rem; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.url-line { word-break: break-all; color: var(--muted); font-size: .88rem; margin: 6px 0 0; }

/* ---- scan progress ---- */
.progress-track { width: 100%; height: 10px; background: var(--line); border-radius: 6px; overflow: hidden; margin: 8px 0 4px; }
.progress-bar { height: 100%; width: 0%; background: var(--brand); border-radius: 6px; transition: width 0.3s ease; }
.progress-text { font-size: .9rem; color: var(--muted); margin: 0 0 10px; }
.summary-pills { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 10px; }
.result-header { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin: 0 0 12px; }
.result-count { color: var(--muted); font-size: .85rem; font-weight: 600; }