/* rules.css — Saksham Rule Set page (extends landing3.css tokens/pills/header). */

/* ── Hero ─────────────────────────────────────────────────────────────── */
.lpr-hero {
  background: linear-gradient(135deg, #F2FFF6 0%, #F5F2FF 55%, #EEFBFF 100%);
}
.lpr-hero-inner {
  max-width: 46rem; margin: 0 auto; padding: 4rem 1.5rem 3rem; text-align: center;
}
.lpr-hero-inner .lp3-eyebrow { display: inline-block; }
.lpr-hero-title {
  font-size: clamp(2rem, 4.4vw, 3rem); font-weight: 800; line-height: 1.12;
  letter-spacing: -0.01em; margin-bottom: 1rem;
}
.lpr-hero-desc { color: var(--muted); font-size: 1.05rem; line-height: 1.65; margin-bottom: 2rem; }
.lpr-hero-stats { display: flex; justify-content: center; gap: 2.5rem; flex-wrap: wrap; }
.lpr-hero-stat { display: flex; flex-direction: column; gap: 0.15rem; }
.lpr-hero-stat-num { font-size: 1.6rem; font-weight: 800; color: var(--p-dark); }
.lpr-hero-stat-label { font-size: 0.8rem; color: var(--muted); font-weight: 700; }

/* ── Methodology / trust note ──────────────────────────────────────────── */
.lpr-methodology { background: var(--bg); border-bottom: 1px solid var(--border); }
.lpr-methodology-inner { max-width: 46rem; margin: 0 auto; padding: 3rem 1.5rem; text-align: center; }
.lpr-methodology-title { font-size: 1.35rem; font-weight: 800; margin-bottom: 0.75rem; }
.lpr-methodology-desc { color: var(--muted); font-size: 0.98rem; line-height: 1.65; margin-bottom: 1.5rem; }
.lpr-legend { display: flex; justify-content: center; align-items: center; gap: 0.75rem; flex-wrap: wrap; }

/* ── Toolbar ──────────────────────────────────────────────────────────── */
.lpr-toolbar-wrap {
  position: sticky; top: 4.1rem; z-index: 100;
  background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.lpr-toolbar { max-width: var(--lp3-max); margin: 0 auto; padding: 1.1rem 1.5rem; }
.lpr-search-wrap { position: relative; max-width: 26rem; margin: 0 auto 0.9rem; }
.lpr-search-icon {
  position: absolute; left: 0.9rem; top: 50%; color: var(--muted);
  transform: translateY(-50%) rotate(0deg);
  animation: lpr-search-wiggle 3.4s ease-in-out infinite;
}
@keyframes lpr-search-wiggle {
  0%, 100% { transform: translateY(-50%) rotate(-10deg); }
  50%      { transform: translateY(-50%) rotate(10deg); }
}
.lpr-search {
  width: 100%; padding: 0.6rem 0.9rem 0.6rem 2.4rem;
  border: 1.5px solid var(--border); border-radius: 999px;
  font-family: var(--font); font-size: 0.9rem; color: var(--ink); background: var(--bg);
}
.lpr-search:focus-visible { outline: 3px solid #1a5cff; outline-offset: 1px; }

.lpr-filter-row { display: flex; justify-content: center; flex-wrap: wrap; gap: 0.6rem 1.5rem; margin-bottom: 0.75rem; }
.lpr-filter-group { display: flex; flex-wrap: wrap; gap: 0.4rem; justify-content: center; }
.lpr-filter-btn {
  background: var(--bg); border: 1.5px solid var(--border); border-radius: 999px;
  padding: 0.35rem 0.85rem; font-family: var(--font); font-weight: 700; font-size: 0.8rem;
  color: var(--muted); cursor: pointer; transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.lpr-filter-btn:hover { border-color: var(--p); color: var(--p-dark); }
.lpr-filter-btn.is-active { background: var(--p-dark); border-color: var(--p-dark); color: #fff; }

.lpr-count { text-align: center; font-size: 0.82rem; color: var(--muted); font-weight: 700; }

/* ── Rule groups / list ───────────────────────────────────────────────── */
.lpr-rules { max-width: var(--lp3-max); margin: 0 auto; padding: 3rem 1.5rem 4rem; }
.lpr-empty { text-align: center; color: var(--muted); font-size: 0.98rem; padding: 3rem 1rem; }
.lpr-reset-btn {
  background: none; border: none; color: var(--p-dark); font-weight: 800; cursor: pointer;
  text-decoration: underline; font-size: 0.98rem; font-family: var(--font);
}

.lpr-group { margin-bottom: 3rem; }
.lpr-group.is-hidden { display: none; }
.lpr-group-title {
  display: flex; align-items: baseline; gap: 0.6rem;
  font-size: 1.3rem; font-weight: 800; margin-bottom: 1.25rem;
  padding-bottom: 0.75rem; border-bottom: 2px solid var(--border);
}
.lpr-group-count {
  font-size: 0.78rem; font-weight: 800; color: var(--p-dark);
  background: var(--p-light); padding: 0.2rem 0.55rem; border-radius: 999px;
}

.lpr-rule-list { display: flex; flex-direction: column; gap: 0.75rem; }
.lpr-rule {
  display: grid;
  grid-template-columns: 4.25rem 3rem 1fr;
  column-gap: 0.9rem; row-gap: 0.2rem;
  align-items: start;
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border); border-radius: var(--radius);
  background: var(--bg);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.lpr-rule:hover { border-color: var(--p); box-shadow: 0 0.4rem 1rem rgba(11,31,23,0.06); }
.lpr-rule.is-hidden { display: none; }

.lpr-rule-id {
  grid-row: 1; grid-column: 1;
  font-weight: 800; font-size: 0.92rem; color: var(--ink);
  font-variant-numeric: tabular-nums;
  align-self: center;
}
.lpr-rule-level {
  grid-row: 1; grid-column: 2;
  justify-self: start; align-self: center;
  font-size: 0.68rem; font-weight: 800; padding: 0.2rem 0.5rem; border-radius: 999px;
  white-space: nowrap;
}
.lpr-level-a { background: #E0F2FE; color: #075985; }
.lpr-level-aa { background: var(--p-light); color: var(--p-dark); }
.lpr-rule-manual {
  grid-row: 1; grid-column: 3; justify-self: end;
  font-size: 0.68rem; font-weight: 800; color: #92400E; background: #FEF3C7;
  padding: 0.2rem 0.55rem; border-radius: 999px; white-space: nowrap;
}
.lpr-rule-title { grid-row: 2; grid-column: 1 / -1; font-size: 1rem; font-weight: 800; margin-top: 0.3rem; }
.lpr-rule-desc { grid-row: 3; grid-column: 1 / -1; color: var(--muted); font-size: 0.9rem; line-height: 1.55; }

/* ── Technical Aspects accordion (per rule) ───────────────────────────── */
.lpr-tech-toggle {
  grid-row: 4; grid-column: 1 / -1; justify-self: start;
  display: flex; align-items: center; gap: 0.35rem;
  margin-top: 0.6rem; background: none; border: none; padding: 0;
  font-family: var(--font); font-weight: 800; font-size: 0.78rem;
  color: var(--p-dark); cursor: pointer; text-transform: uppercase; letter-spacing: 0.03em;
}
.lpr-tech-chevron { transition: transform 0.2s ease; }
.lpr-tech-toggle[aria-expanded="true"] .lpr-tech-chevron { transform: rotate(180deg); }

.lpr-tech {
  grid-row: 5; grid-column: 1 / -1;
  margin-top: 0.75rem; padding-top: 0.75rem; border-top: 1px dashed var(--border);
}
.lpr-tech-title {
  font-size: 0.8rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.04em;
  color: var(--p-dark); margin-bottom: 0.6rem;
}
.lpr-tech-title:not(:first-child) {
  margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px dashed var(--border);
}
.lpr-tech-list { display: flex; flex-direction: column; gap: 0.45rem; padding-left: 1.1rem; }
.lpr-tech-list li { list-style: disc; color: var(--ink); font-size: 0.87rem; line-height: 1.55; }
.lpr-tech-list strong { color: var(--p-dark); }
.lpr-code {
  background: var(--p-light); color: var(--p-dark); border-radius: 0.3rem;
  padding: 0.05rem 0.35rem; font-family: 'SFMono-Regular', Consolas, Menlo, monospace; font-size: 0.82em;
}

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 640px) {
  .lpr-toolbar-wrap { position: static; }
  .lpr-rule { grid-template-columns: auto auto 1fr; }
  .lpr-rule-manual { grid-row: 1; grid-column: 3; }
  .lpr-hero-stats { gap: 1.5rem; }
}

@media (prefers-reduced-motion: reduce) {
  .lpr-rule { transition: none; }
  .lpr-search-icon { animation: none; }
}
