/* Page styles for verify.html — tokens from tokens.css */
@import url("tokens.css?v=r10");

:root {
  --bg-primary: var(--color-bg);
  --bg-surface: var(--color-surface);
  --bg-card: var(--color-surface-2);
  --bg-elevated: #222236;
  --green: #10b981;
  --green-bg: rgba(16, 185, 129, 0.1);
  --red: #ef4444;
  --red-bg: rgba(239, 68, 68, 0.1);
  --purple: #8b5cf6;
  --font: var(--font-sans);
}
    *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
    body {
      font-family: var(--font);
      background: var(--bg-primary);
      color: var(--color-text);
      min-height: 100vh;
      display: flex;
      flex-direction: column;
      -webkit-font-smoothing: antialiased;
    }
    a { color: var(--gold); text-decoration: none; }
    a:hover { color: var(--gold-light); }

    /* Nav */
    .navbar {
      position: fixed; top: 0; left: 0; right: 0; z-index: 100;
      background: rgba(10,10,20,0.92);
      backdrop-filter: blur(20px);
      border-bottom: 1px solid var(--color-border);
      padding: 0.75rem 0;
    }
    .container { max-width: 1100px; margin: 0 auto; padding: 0 1.5rem; }
    .nav-container { display: flex; align-items: center; justify-content: space-between; }
    .nav-brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
    .nav-brand-text { font-weight: 700; font-size: 1rem; color: var(--color-text); }
    .nav-logo { border-radius: 8px; }
    .nav-links { display: flex; list-style: none; gap: 1.75rem; align-items: center; margin: 0; padding: 0; }
    .nav-links a { color: var(--color-text-dim); font-size: 0.9rem; font-weight: 500; transition: var(--transition); text-decoration: none; }
    .nav-links a:hover { color: var(--color-text); }
    .nav-toggle {
      display: none; flex-direction: column; gap: 5px;
      background: none; border: none; cursor: pointer; padding: 4px;
      position: relative;
    }
    .nav-toggle span { display: block; width: 24px; height: 2px; background: var(--color-text); border-radius: 2px; transition: var(--transition); }
    .nav-toggle.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
    .nav-toggle.active span:nth-child(2) { opacity: 0; }
    .nav-toggle.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

    @media (max-width: 768px) {
      .nav-toggle { display: flex; z-index: 1002; }
      .nav-links {
        position: fixed; top: 0; right: -100%; width: min(280px, 86vw); height: 100vh; height: 100dvh;
        background: var(--bg-surface); flex-direction: column; justify-content: center;
        padding: 2rem 1.5rem; gap: 1.25rem; transition: var(--transition);
        border-left: 1px solid var(--color-border); z-index: 1001; overflow-y: auto;
      }
      .nav-links.open { right: 0; box-shadow: -12px 0 40px rgba(0,0,0,.35); }
    }

    /* Main content */
    .page-main {
      flex: 1;
      display: flex;
      flex-direction: column;
      align-items: center;
      padding: 6rem 1.5rem 3rem;
    }
    .verify-container {
      max-width: 560px;
      width: 100%;
    }

    /* Header area */
    .verify-header {
      text-align: center;
      margin-bottom: 2.5rem;
    }
    .verify-logo {
      width: 80px; height: 80px;
      border-radius: 16px;
      margin-bottom: 1.25rem;
    }
    .verify-header h1 {
      font-size: 1.75rem;
      font-weight: 800;
      margin-bottom: 0.5rem;
    }
    .verify-header h1 .gold { color: var(--gold); }
    .verify-header p {
      font-size: 0.9rem;
      color: var(--color-text-dim);
      line-height: 1.6;
    }

    /* Input card */
    .verify-card {
      background: var(--bg-card);
      border: 1px solid var(--color-border);
      border-radius: 16px;
      padding: 2rem;
      transition: var(--transition);
    }
    .verify-card:focus-within {
      border-color: var(--gold);
      box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
    }
    .input-group { margin-bottom: 1.25rem; }
    .input-group label {
      display: block;
      font-size: 0.8rem;
      font-weight: 600;
      color: var(--color-text-dim);
      letter-spacing: 0.5px;
      text-transform: uppercase;
      margin-bottom: 0.5rem;
    }
    .input-wrapper {
      position: relative;
      display: flex;
      align-items: center;
    }
    .input-icon {
      position: absolute;
      left: 14px;
      color: var(--color-text-dim);
      pointer-events: none;
    }
    .verify-input {
      width: 100%;
      padding: 0.85rem 1rem 0.85rem 2.75rem;
      font-family: 'JetBrains Mono', 'Fira Code', monospace;
      font-size: 1.05rem;
      letter-spacing: 1.5px;
      background: var(--bg-elevated);
      border: 1px solid var(--color-border);
      border-radius: 10px;
      color: var(--color-text);
      outline: none;
      transition: var(--transition);
    }
    .verify-input::placeholder { color: var(--color-text-dim); opacity: 0.5; letter-spacing: 1px; font-size: 0.9rem; }
    .verify-input:focus { border-color: var(--gold); background: var(--bg-surface); }
    .input-hint {
      font-size: 0.75rem;
      color: var(--color-text-dim);
      margin-top: 0.4rem;
      opacity: 0.7;
    }

    .btn-verify {
      width: 100%;
      padding: 0.85rem;
      background: linear-gradient(135deg, var(--gold-dark), var(--gold), var(--gold-light));
      color: #1a1a2e;
      font-size: 0.95rem;
      font-weight: 700;
      font-family: var(--font);
      border: none;
      border-radius: 10px;
      cursor: pointer;
      transition: var(--transition);
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 0.5rem;
    }
    .btn-verify:hover { opacity: 0.9; transform: translateY(-1px); box-shadow: 0 4px 20px rgba(212,175,55,0.3); }
    .btn-verify:active { transform: translateY(0); }
    .btn-verify:disabled { opacity: 0.6; cursor: not-allowed; transform: none; box-shadow: none; }
    .btn-verify .spinner {
      display: none;
      width: 18px; height: 18px;
      border: 2px solid rgba(26,26,46,0.3);
      border-top-color: #1a1a2e;
      border-radius: 50%;
      animation: spin 0.6s linear infinite;
    }
    .btn-verify.loading .spinner { display: block; }
    .btn-verify.loading .btn-text { display: none; }
    @keyframes spin { to { transform: rotate(360deg); } }

    /* Result cards */
    .result-area { margin-top: 1.5rem; display: none; }
    .result-area.show { display: block; animation: fadeSlideIn 0.4s ease; }
    @keyframes fadeSlideIn {
      from { opacity: 0; transform: translateY(12px); }
      to { opacity: 1; transform: translateY(0); }
    }

    /* Valid result */
    .result-valid {
      background: var(--bg-card);
      border: 1px solid var(--green);
      border-radius: 16px;
      overflow: hidden;
    }
    .result-valid-header {
      background: var(--green-bg);
      border-bottom: 1px solid rgba(16,185,129,0.2);
      padding: 1.25rem 1.5rem;
      display: flex;
      align-items: center;
      gap: 0.75rem;
    }
    .result-valid-header .check-icon {
      width: 40px; height: 40px;
      background: var(--green);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      flex-shrink: 0;
    }
    .result-valid-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--green); }
    .result-valid-header p { font-size: 0.8rem; color: var(--color-text-dim); margin-top: 0.15rem; }

    .result-body { padding: 1.5rem; }
    .result-site {
      display: flex; align-items: center; gap: 1rem;
      margin-bottom: 1.25rem;
      padding-bottom: 1.25rem;
      border-bottom: 1px solid var(--color-border);
    }
    .result-site-favicon {
      width: 48px; height: 48px;
      border-radius: 12px;
      background: var(--bg-elevated);
      display: flex; align-items: center; justify-content: center;
      overflow: hidden;
      flex-shrink: 0;
      border: 1px solid var(--color-border);
    }
    .result-site-favicon img {
      width: 100%; height: 100%; object-fit: contain;
    }
    .result-site-favicon .placeholder-icon { color: var(--gold); font-size: 1.5rem; }
    .result-site-info h4 { font-size: 1.15rem; font-weight: 700; color: var(--color-text); }
    .result-site-info p { font-size: 0.82rem; color: var(--color-text-dim); margin-top: 0.2rem; }

    .result-details {
      display: grid;
      grid-template-columns: 1fr 1fr;
      gap: 0.75rem;
    }
    .detail-item {
      background: var(--bg-elevated);
      border-radius: 10px;
      padding: 0.85rem 1rem;
    }
    .detail-item .label {
      font-size: 0.7rem;
      font-weight: 600;
      color: var(--color-text-dim);
      text-transform: uppercase;
      letter-spacing: 0.5px;
      margin-bottom: 0.3rem;
    }
    .detail-item .value {
      font-size: 0.9rem;
      font-weight: 600;
      color: var(--color-text);
    }

    .newer-version-notice {
      margin-top: 1rem;
      padding: 0.85rem 1rem;
      background: rgba(245, 158, 11, 0.1);
      border: 1px solid rgba(245, 158, 11, 0.3);
      border-radius: 10px;
      display: flex;
      align-items: flex-start;
      gap: 0.6rem;
    }
    .newer-version-notice .warn-icon { color: #f59e0b; font-size: 1.15rem; flex-shrink: 0; margin-top: 1px; }
    .newer-version-notice p { font-size: 0.82rem; color: var(--color-text-dim); line-height: 1.5; }
    .newer-version-notice strong { color: #f59e0b; }

    /* Score display in verified result */
    .result-score-section {
      display: flex;
      align-items: center;
      gap: 1.5rem;
      margin-bottom: 1.25rem;
      padding-bottom: 1.25rem;
      border-bottom: 1px solid var(--color-border);
    }
    .result-grade-badge {
      width: 80px; height: 80px;
      border-radius: 16px;
      display: flex; flex-direction: column;
      align-items: center; justify-content: center;
      flex-shrink: 0;
      line-height: 1;
    }
    .result-grade-badge .grade-letter {
      font-size: 2rem; font-weight: 800; color: #fff;
    }
    .result-grade-badge .grade-score {
      font-size: 0.65rem; font-weight: 600; color: rgba(255,255,255,0.9); margin-top: 2px;
    }
    .result-score-info {
      flex: 1;
    }
    .result-score-info h4 {
      font-size: 1rem; font-weight: 700; color: var(--color-text); margin-bottom: 0.25rem;
    }
    .result-score-info p {
      font-size: 0.8rem; color: var(--color-text-dim);
    }
    .assurance-disclaimer {
      margin-top: 1rem;
      padding: 0.85rem 1rem;
      border-radius: 10px;
      border: 1px solid rgba(253, 203, 110, 0.35);
      background: rgba(253, 203, 110, 0.08);
      font-size: 0.82rem;
      color: var(--color-text-dim);
      line-height: 1.55;
    }
    .assurance-disclaimer strong { color: #f4d03f; }
    .critical-reasons { margin-top: 1.1rem; text-align: left; }
    .critical-reasons h5 {
      font-size: 0.85rem; font-weight: 700; color: var(--color-white); margin-bottom: 0.55rem;
    }
    .critical-reason {
      padding: 0.65rem 0.8rem; border-radius: 8px; border-left: 3px solid #ef4444;
      background: rgba(239, 68, 68, 0.08); margin-bottom: 0.45rem;
    }
    .critical-reason.high { border-left-color: #f97316; background: rgba(249, 115, 22, 0.08); }
    .critical-reason .cr-title { font-size: 0.82rem; font-weight: 600; color: var(--color-white); }
    .critical-reason .cr-sev { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.04em; margin-left: 0.4rem; opacity: 0.85; }
    .critical-reason .cr-desc { font-size: 0.75rem; color: var(--color-text-dim); margin-top: 0.25rem; line-height: 1.45; }
    .type-pill {
      display: inline-block; margin-top: 0.35rem; padding: 0.15rem 0.55rem; border-radius: 999px;
      font-size: 0.68rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase;
    }
    .type-pill.website { background: rgba(108,92,231,0.15); color: #a29bfe; border: 1px solid rgba(108,92,231,0.3); }
    .type-pill.app { background: rgba(0,206,201,0.12); color: #00cec9; border: 1px solid rgba(0,206,201,0.3); }

    /* Invalid result */
    .result-invalid {
      background: var(--bg-card);
      border: 1px solid var(--red);
      border-radius: 16px;
      overflow: hidden;
    }
    .result-invalid-header {
      background: var(--red-bg);
      border-bottom: 1px solid rgba(239,68,68,0.2);
      padding: 1.5rem;
      text-align: center;
    }
    .result-invalid-header .x-icon {
      width: 48px; height: 48px;
      background: var(--red);
      border-radius: 50%;
      display: flex; align-items: center; justify-content: center;
      margin: 0 auto 0.75rem;
    }
    .result-invalid-header h3 { font-size: 1.1rem; font-weight: 700; color: var(--red); }
    .result-invalid-body {
      padding: 1.5rem;
      text-align: center;
    }
    .result-invalid-body p {
      font-size: 0.88rem;
      color: var(--color-text-dim);
      line-height: 1.6;
      margin-bottom: 0.5rem;
    }
    .result-invalid-body .warning-text {
      font-size: 0.8rem;
      color: var(--red);
      font-weight: 600;
      margin-top: 0.75rem;
    }

    /* Error (rate limit etc) */
    .result-error {
      background: var(--bg-card);
      border: 1px solid #f59e0b;
      border-radius: 16px;
      padding: 1.5rem;
      text-align: center;
    }
    .result-error h3 { color: #f59e0b; font-size: 1rem; margin-bottom: 0.5rem; }
    .result-error p { color: var(--color-text-dim); font-size: 0.85rem; }

    /* Footer */
    .page-footer {
      text-align: center;
      padding: 1.5rem;
      border-top: 1px solid var(--color-border);
      font-size: 0.78rem;
      color: var(--color-text-dim);
    }
    .page-footer a { color: var(--gold); }

    /* ---- Grade Explanation Section ---- */
    .grades-section {
      margin-top: 3rem;
      padding: 0 0.5rem;
    }
    .grades-section h2 {
      text-align: center;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--color-text);
      margin-bottom: 0.4rem;
    }
    .grades-section .section-subtitle {
      text-align: center;
      font-size: 0.84rem;
      color: var(--color-text-dim);
      line-height: 1.6;
      margin-bottom: 1.5rem;
      max-width: 560px;
      margin-left: auto;
      margin-right: auto;
    }
    .grade-grid {
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
      gap: 0.75rem;
    }
    .grade-card {
      background: var(--bg-card);
      border: 1px solid var(--color-border);
      border-radius: 12px;
      padding: 1rem 0.75rem;
      text-align: center;
      transition: border-color 0.25s, transform 0.2s;
    }
    .grade-card:hover {
      transform: translateY(-2px);
    }
    .grade-card .grade-badge {
      display: inline-flex;
      align-items: center;
      justify-content: center;
      width: 44px;
      height: 44px;
      border-radius: 50%;
      font-size: 1.1rem;
      font-weight: 800;
      color: #fff;
      margin-bottom: 0.5rem;
    }
    .grade-card .grade-label {
      font-size: 0.82rem;
      font-weight: 700;
      margin-bottom: 0.25rem;
    }
    .grade-card .grade-range {
      font-size: 0.72rem;
      color: var(--color-text-dim);
      font-family: 'JetBrains Mono', monospace;
      margin-bottom: 0.4rem;
    }
    .grade-card .grade-desc {
      font-size: 0.72rem;
      color: var(--color-text-dim);
      line-height: 1.5;
    }
    .grade-card.grade-aplus { border-color: rgba(16,185,129,0.3); }
    .grade-card.grade-aplus:hover { border-color: rgba(16,185,129,0.6); }
    .grade-card.grade-aplus .grade-badge { background: #10b981; }
    .grade-card.grade-aplus .grade-label { color: #10b981; }

    .grade-card.grade-a { border-color: rgba(16,185,129,0.2); }
    .grade-card.grade-a:hover { border-color: rgba(16,185,129,0.5); }
    .grade-card.grade-a .grade-badge { background: #059669; }
    .grade-card.grade-a .grade-label { color: #059669; }

    .grade-card.grade-b { border-color: rgba(6,182,212,0.2); }
    .grade-card.grade-b:hover { border-color: rgba(6,182,212,0.5); }
    .grade-card.grade-b .grade-badge { background: #06b6d4; }
    .grade-card.grade-b .grade-label { color: #06b6d4; }

    .grade-card.grade-c { border-color: rgba(234,179,8,0.2); }
    .grade-card.grade-c:hover { border-color: rgba(234,179,8,0.5); }
    .grade-card.grade-c .grade-badge { background: #eab308; }
    .grade-card.grade-c .grade-label { color: #eab308; }

    .grade-card.grade-d { border-color: rgba(249,115,22,0.2); }
    .grade-card.grade-d:hover { border-color: rgba(249,115,22,0.5); }
    .grade-card.grade-d .grade-badge { background: #f97316; }
    .grade-card.grade-d .grade-label { color: #f97316; }

    .grade-card.grade-e { border-color: rgba(239,68,68,0.2); }
    .grade-card.grade-e:hover { border-color: rgba(239,68,68,0.5); }
    .grade-card.grade-e .grade-badge { background: #ef4444; }
    .grade-card.grade-e .grade-label { color: #ef4444; }

    .scoring-note {
      margin-top: 1.5rem;
      background: var(--bg-card);
      border: 1px solid var(--color-border);
      border-radius: 12px;
      padding: 1.25rem 1.25rem;
    }
    .scoring-note h3 {
      font-size: 0.88rem;
      font-weight: 700;
      color: var(--gold);
      margin-bottom: 0.5rem;
    }
    .scoring-note p {
      font-size: 0.78rem;
      color: var(--color-text-dim);
      line-height: 1.7;
      margin-bottom: 0.4rem;
    }
    .scoring-note ul {
      list-style: none;
      padding: 0;
      margin: 0.5rem 0;
      display: grid;
      grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
      gap: 0.3rem;
    }
    .scoring-note ul li {
      font-size: 0.75rem;
      color: var(--color-text-dim);
      padding: 0.2rem 0;
    }
    .scoring-note ul li::before {
      content: '•';
      color: var(--gold);
      margin-right: 0.4rem;
      font-weight: 700;
    }

    /* ---- What We Test Section ---- */
    .what-we-test {
      margin-top: 2rem;
    }
    .what-we-test h2 {
      text-align: center;
      font-size: 1.25rem;
      font-weight: 700;
      color: var(--color-text);
      margin-bottom: 0.25rem;
    }
    .what-we-test .test-subtitle {
      text-align: center;
      font-size: 0.84rem;
      color: var(--color-text-dim);
      line-height: 1.6;
      margin-bottom: 1.25rem;
    }
    .what-we-test .test-subtitle strong { color: var(--gold); }
    .test-loading {
      text-align: center;
      padding: 2rem 0;
      color: var(--color-text-dim);
      font-size: 0.82rem;
    }
    .test-categories { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 0.5rem; }
    .test-category {
      background: var(--bg-card);
      border: 1px solid var(--color-border);
      border-radius: 10px;
      overflow: hidden;
      transition: border-color 0.25s;
    }
    .test-category-header {
      display: flex;
      align-items: center;
      gap: 0.6rem;
      padding: 0.75rem 1rem;
    }
    .test-category-icon {
      font-size: 1rem;
      width: 28px;
      text-align: center;
      flex-shrink: 0;
    }
    .test-category-name {
      font-size: 0.82rem;
      font-weight: 600;
      color: var(--color-text);
      flex: 1;
    }
    .test-category-count {
      font-size: 0.68rem;
      font-weight: 600;
      color: var(--gold);
      background: rgba(212,175,55,0.1);
      padding: 0.15rem 0.45rem;
      border-radius: 6px;
      min-width: 24px;
      text-align: center;
    }
    /* Responsive */
    @media (max-width: 480px) {
      .verify-header h1 { font-size: 1.4rem; }
      .verify-card { padding: 1.5rem; }
      .result-details { grid-template-columns: 1fr; }
      .verify-input { font-size: 0.95rem; }
      .grade-grid { grid-template-columns: repeat(2, 1fr); }
      .scoring-note ul { grid-template-columns: 1fr; }
      .test-category-header { padding: 0.65rem 0.75rem; }
    }

/* Phase 4 a11y: grade badges keep white text at AA contrast; hint text lifted */
.grade-card.grade-aplus .grade-badge { background: #047857; }
.grade-card.grade-a .grade-badge { background: #065f46; }
.grade-card.grade-b .grade-badge { background: #0e7490; }
.grade-card.grade-c .grade-badge { background: #a16207; }
.grade-card.grade-d .grade-badge { background: #c2410c; }
.grade-card.grade-e .grade-badge { background: #b91c1c; }
.input-hint { color: #a1a1b5; opacity: 1; }
.grade-card.grade-a .grade-label { color: #10b981; }
.grade-card.grade-e .grade-label { color: #f87171; }
.grade-card.grade-d .grade-label { color: #fb923c; }

/* Current page in the nav */
.nav-links a[aria-current="page"] { color: var(--color-text); }
