/* ─── Design tokens ──────────────────────────────────────────────────────── */
:root {
  --navy:        #0a1128;
  --navy-mid:    #1c2d42;
  --accent:      #2563eb;
  --accent-soft: #eff6ff;
  --accent-text: #1d4ed8;
  --success:     #059669;
  --success-soft:#ecfdf5;
  --warn:        #d97706;
  --warn-soft:   #fffbeb;
  --ink:         #0f172a;
  --ink-mid:     #475569;
  --muted:       #64748b;
  --line:        #e2e8f0;
  --line-strong: #cbd5e1;
  --surface:     #ffffff;
  --bg-soft:     #f8fafc;
  --r:           8px;
  --r-lg:        16px;
  --r-xl:        24px;
  --shadow-sm:   0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --shadow:      0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --shadow-lg:   0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.025);
}

/* ─── Reset & base ───────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }

/* ─── Site chrome ────────────────────────────────────────────────────────── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(10, 17, 40, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

.site-header-inner {
  display: flex;
  align-items: center;
  gap: 32px;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px;
  height: 64px;
}

.logo-link {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.logo {
  display: block;
  height: 36px;
  width: auto;
}

.header-nav {
  display: flex;
  gap: 4px;
  align-items: center;
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 14px;
  border-radius: var(--r);
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 150ms ease;
}

.nav-link:hover {
  color: #fff;
  background: rgba(255,255,255,0.1);
}

.nav-link.active {
  color: #fff;
  background: rgba(255,255,255,0.15);
  font-weight: 600;
}

.lang {
  display: flex;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 14px;
  flex-shrink: 0;
  margin-left: auto;
}

.lang select {
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: var(--r);
  padding: 6px 10px;
  font-size: 14px;
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.9);
  cursor: pointer;
  transition: all 150ms ease;
}

.lang select:hover {
  background: rgba(255,255,255,0.1);
}

.lang select option { color: var(--ink); background: var(--surface); }

/* Mobile menu */
.mobile-menu { display: none; }

.mobile-menu summary {
  list-style: none;
  cursor: pointer;
  padding: 8px 12px;
  border-radius: var(--r);
  color: rgba(255,255,255,0.9);
  font-size: 14px;
  font-weight: 600;
  background: rgba(255,255,255,0.1);
}

.mobile-menu summary::-webkit-details-marker { display: none; }
.mobile-menu summary::after { content: "Menu"; }
.mobile-menu[open] summary::after { content: "Close"; }

.mobile-nav {
  position: fixed;
  inset: 64px 0 auto 0;
  z-index: 99;
  display: grid;
  gap: 4px;
  padding: 16px;
  background: var(--navy);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  box-shadow: var(--shadow-lg);
}

.mobile-nav .nav-link {
  display: block;
  padding: 12px 16px;
  border-radius: var(--r);
  color: rgba(255,255,255,0.8);
  font-size: 15px;
}

.mobile-nav .nav-link:hover,
.mobile-nav .nav-link.active { color: #fff; background: rgba(255,255,255,0.15); }

/* ─── Page shell ─────────────────────────────────────────────────────────── */
.wrap {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 32px 80px;
}

/* ─── Hero zone ──────────────────────────────────────────────────────────── */
.page-hero {
  padding: 64px 0 48px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.page-hero h1 {
  font-size: 44px;
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: var(--navy);
  max-width: 800px;
  margin-bottom: 16px;
}

.page-hero .intro {
  font-size: 18px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 700px;
  margin-bottom: 32px;
}

.hero-callout {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 20px;
  background: var(--accent-soft);
  border-radius: 999px;
  font-size: 15px;
  color: var(--accent-text);
  font-weight: 500;
  max-width: 800px;
  text-align: left;
}

.hero-callout strong { font-weight: 700; }

.hero-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 32px;
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
}

.mark-img {
  display: inline-flex;
  background: var(--surface);
  border-radius: 6px;
  padding: 4px;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--line);
}

.mark-img img {
  display: block;
  height: 20px;
  width: auto;
}

/* ─── Sticky search / section nav ───────────────────────────────────────── */
.page-nav-bar {
  position: sticky;
  top: 64px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
  padding: 12px 0;
  margin-bottom: 0;
}

.page-nav-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
}

.search-input {
  width: 260px;
  flex-shrink: 0;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 10px 16px;
  font-size: 14px;
  background: var(--surface);
  color: var(--ink);
  transition: all 150ms ease;
  box-shadow: var(--shadow-sm) inset;
}

.search-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.section-nav {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  overflow-x: auto;
  scrollbar-width: none;
}

.section-nav::-webkit-scrollbar { display: none; }

.section-nav a {
  display: inline-flex;
  padding: 8px 14px;
  border-radius: 999px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 500;
  white-space: nowrap;
  transition: all 150ms ease;
}

.section-nav a:hover { color: var(--ink); background: var(--bg-soft); }

.section-nav a.is-active {
  color: var(--accent-text);
  background: var(--accent-soft);
  font-weight: 600;
}

.jump-nav-mobile {
  display: none;
  border: 1px solid var(--line-strong);
  border-radius: var(--r);
  padding: 10px 14px;
  font-size: 15px;
  background: var(--surface);
  color: var(--ink);
  flex: 1;
}

/* ─── Content sections ───────────────────────────────────────────────────── */
.content-section {
  padding-top: 64px;
}

.content-section + .content-section {
  border-top: 1px solid var(--line);
}

.section-label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.section-label::before {
  content: "";
  display: block;
  width: 24px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}

.section-title {
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--navy);
  margin-bottom: 16px;
}

.section-sub {
  font-size: 16px;
  color: var(--muted);
  line-height: 1.6;
  max-width: 800px;
  margin-bottom: 32px;
}

/* ─── Deadline ribbon ────────────────────────────────────────────────────── */
.deadline-ribbon {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  margin-top: 48px;
  width: 100%;
  text-align: left;
}

.deadline-item {
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  box-shadow: var(--shadow-sm);
  transition: transform 200ms ease, box-shadow 200ms ease;
}

.deadline-item:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow);
}

.deadline-item .icon {
  font-size: 24px;
  margin-bottom: 16px;
  display: block;
}

.deadline-item .date {
  display: inline-block;
  padding: 4px 10px;
  background: var(--bg-soft);
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 12px;
}

.deadline-item h3 {
  font-size: 18px;
  font-weight: 700;
  margin-bottom: 8px;
  color: var(--navy);
}

.deadline-item p {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.5;
}

/* ─── Filter chips ───────────────────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 24px;
}

.filter-chip {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
}

.filter-chip:hover {
  border-color: var(--accent);
  color: var(--accent-text);
  background: var(--bg-soft);
}

.filter-chip.is-active {
  color: var(--accent-text);
  border-color: var(--accent);
  background: var(--accent-soft);
}

/* ─── Requirements matrix ────────────────────────────────────────────────── */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.req-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}

.req-matrix th {
  padding: 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-align: left;
  white-space: nowrap;
}

.req-matrix td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  color: var(--ink);
}

.req-matrix tbody tr:last-child td { border-bottom: 0; }
.req-matrix tbody tr:hover td { background: var(--bg-soft); }
.req-matrix tbody tr.is-hidden { display: none; }

.col-check {
  width: 60px;
  text-align: center !important;
  font-weight: 700;
  color: var(--accent-text);
  font-size: 16px;
}

.col-check.is-empty { color: var(--line-strong); font-weight: 400; }

.col-article { white-space: nowrap; }

.matrix-empty {
  display: none;
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  font-size: 16px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
  margin-top: 16px;
  background: var(--bg-soft);
}

.matrix-empty.is-visible { display: block; }

/* ─── Article chips ──────────────────────────────────────────────────────── */
.article-chip {
  display: inline-block;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--accent-text);
  background: var(--accent-soft);
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 10px;
  white-space: nowrap;
  transition: all 150ms ease;
}

.article-chip:hover { background: #dbeafe; border-color: #93c5fd; }

.source-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

/* ─── Two-pane layout ────────────────────────────────────────────────────── */
.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: start;
}

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 32px;
}

.roles-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
}

/* ─── Note / warn ────────────────────────────────────────────────────────── */
.note {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.6;
  background: var(--success-soft);
  border: 1px solid #a7f3d0;
  color: var(--success);
  display: flex;
  gap: 12px;
}

.note::before {
  content: "💡";
  font-size: 18px;
}

.warn {
  margin-top: 16px;
  padding: 16px 20px;
  border-radius: var(--r-lg);
  font-size: 14px;
  line-height: 1.6;
  background: var(--warn-soft);
  border: 1px solid #fde68a;
  color: var(--warn);
  display: flex;
  gap: 12px;
}

.warn::before {
  content: "⚠️";
  font-size: 18px;
}

/* ─── Labels, sub, small ─────────────────────────────────────────────────── */
.label {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--ink-mid);
  margin-bottom: 12px;
}

.sub {
  font-size: 15px;
  color: var(--muted);
  line-height: 1.6;
  margin-bottom: 16px;
}

.small {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.5;
  margin-top: 12px;
}

ul {
  margin: 12px 0 0 0;
  padding: 0 0 0 20px;
  line-height: 1.6;
  color: var(--ink);
}

li { margin-bottom: 8px; }
li::marker { color: var(--accent); }

/* ─── Role blocks ────────────────────────────────────────────────────────── */
.role-block {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.role-block h3 {
  font-size: 16px;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.role-block.supplier h3::before { content: "🏭"; }
.role-block.importer h3::before { content: "📦"; }

.role-block ul {
  font-size: 14px;
  color: var(--muted);
}

/* ─── Compare table ──────────────────────────────────────────────────────── */
.compare-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.compare-table th {
  padding: 14px 16px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
  text-align: left;
  font-size: 13px;
  font-weight: 700;
  color: var(--ink-mid);
}

.compare-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink);
}

.compare-table td:first-child {
  font-weight: 600;
  background: var(--bg-soft);
  color: var(--ink-mid);
  width: 180px;
}

.compare-table tbody tr:last-child td { border-bottom: 0; }

/* ─── Copy blocks / pre ──────────────────────────────────────────────────── */
pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  background: var(--navy);
  border-radius: var(--r-lg);
  padding: 20px;
  font: 14px/1.6 "SF Mono", "Fira Code", Menlo, Consolas, monospace;
  color: #e2e8f0;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.2);
}

.copy-block {
  margin-bottom: 24px;
}

.copy-block-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.btn-copy {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 13px;
  font-weight: 600;
  color: var(--ink-mid);
  background: var(--surface);
  cursor: pointer;
  white-space: nowrap;
  transition: all 150ms ease;
}

.btn-copy::before { content: "📋"; font-size: 14px; }

.btn-copy:hover { background: var(--bg-soft); border-color: var(--ink-mid); color: var(--ink); }

.btn-copy.is-copied {
  color: var(--success);
  border-color: #a7f3d0;
  background: var(--success-soft);
}
.btn-copy.is-copied::before { content: "✅"; }

/* ─── Battery cell mockups ───────────────────────────────────────────────── */
.cell {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 24px;
  min-height: 240px;
  display: grid;
  align-content: space-between;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.cell::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
}

.cell.aaa { min-height: 200px; }

.cell-top {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
}

.brand-big {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.type {
  font-size: 24px;
  font-weight: 800;
  opacity: 0.5;
}

.tech {
  font-size: 14px;
  line-height: 1.6;
  opacity: 0.8;
  white-space: pre-line;
  margin-top: 12px;
  font-family: "SF Mono", "Fira Code", monospace;
}

.marks {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 16px;
}

.marks .mark-img { background: rgba(255,255,255,0.9); border: none; }
.marks .mark-img img { height: 24px; }

/* ─── Artwork preview ────────────────────────────────────────────────────── */
.artwork-preview {
  width: 100%;
  height: auto;
  display: block;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--bg-soft);
  box-shadow: var(--shadow-sm);
}

/* ─── QR block ───────────────────────────────────────────────────────────── */
.qr-card {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 48px;
  align-items: center;
  background: var(--bg-soft);
  padding: 32px;
  border-radius: var(--r-xl);
  border: 1px solid var(--line);
}

.qr-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 180px;
  height: 180px;
  border-radius: var(--r-xl);
  background: #fff;
  border: 1px solid var(--line);
  transition: all 200ms ease;
  box-shadow: var(--shadow-sm);
}

.qr-link:hover {
  border-color: var(--accent);
  box-shadow: var(--shadow-lg);
  transform: translateY(-4px);
}

.qr-caption {
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  margin-top: 12px;
  text-align: center;
}

/* ─── Legal collapsible ──────────────────────────────────────────────────── */
.detail-panel {
  margin-bottom: 16px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  overflow: hidden;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.detail-panel > summary {
  cursor: pointer;
  padding: 16px 24px;
  font-weight: 600;
  font-size: 15px;
  color: var(--ink);
  list-style-position: inside;
  background: var(--bg-soft);
  border-bottom: 1px solid transparent;
  transition: all 150ms ease;
  display: flex;
  align-items: center;
  gap: 8px;
}

.detail-panel > summary::before {
  content: "▶";
  font-size: 12px;
  color: var(--muted);
  transition: transform 150ms ease;
}

.detail-panel[open] > summary::before {
  transform: rotate(90deg);
}

.detail-panel > summary::-webkit-details-marker { display: none; }

.detail-panel[open] > summary {
  border-bottom-color: var(--line);
}

.detail-panel > .detail-body { padding: 24px; }

.legal-map { display: grid; gap: 16px; margin-top: 16px; }

.legal-row {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.8fr;
  gap: 24px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 20px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.legal-row strong {
  display: block;
  font-size: 14px;
  margin-bottom: 8px;
  color: var(--navy);
}

.legal-row p {
  color: var(--muted);
  font-size: 14px;
  line-height: 1.5;
}

/* ─── Footer ─────────────────────────────────────────────────────────────── */
.footer {
  margin-top: 80px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
  font-size: 14px;
  color: var(--muted);
  text-align: center;
}

/* ─── Utility ────────────────────────────────────────────────────────────── */
.section-anchor { scroll-margin-top: 140px; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0,0,0,0);
  white-space: nowrap;
  border: 0;
}

/* ─── Page-specific extras ───────────────────────────────────────────────── */

/* Device mockups (rechargeable page) */
.device {
  background: linear-gradient(135deg, #334155 0%, #0f172a 100%);
  color: #fff;
  border-radius: var(--r-xl);
  padding: 24px;
  min-height: 240px;
  display: grid;
  align-content: space-between;
  margin-bottom: 20px;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}

.device::after {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,0.2), rgba(255,255,255,0));
}

.device-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.device-name { font-size: 24px; font-weight: 800; letter-spacing: -0.02em; }

/* Replaceable design good/bad panels */
.panel-ok { 
  border: 1px solid #a7f3d0;
  border-left: 4px solid var(--success); 
  background: var(--success-soft); 
  padding: 24px;
  border-radius: var(--r-lg);
}
.panel-bad { 
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626; 
  background: #fef2f2; 
  padding: 24px;
  border-radius: var(--r-lg);
}

/* Panel (still used by replaceable-design etc.) */
.panel {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  padding: 24px;
  box-shadow: var(--shadow-sm);
}

.cell-risk { color: #b91c1c; font-weight: 600; }

/* Legal summary extras */
.btn-link {
  display: inline-flex;
  align-items: center;
  padding: 10px 20px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 15px;
  font-weight: 600;
  color: var(--ink);
  background: var(--surface);
  transition: all 150ms ease;
  box-shadow: var(--shadow-sm);
}

.btn-link:hover { background: var(--bg-soft); border-color: var(--ink-mid); transform: translateY(-1px); box-shadow: var(--shadow); }

.btn-link.primary {
  background: var(--navy);
  border-color: var(--navy);
  color: #fff;
}

.btn-link.primary:hover { background: var(--navy-mid); border-color: var(--navy-mid); }

.hero-actions { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin-top: 32px; }

.core-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.core-card, .xref {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.core-card strong, .xref strong { display: block; font-size: 16px; margin-bottom: 10px; color: var(--navy); }
.core-card p, .xref p { color: var(--muted); font-size: 14px; line-height: 1.6; margin: 0; }

.xref-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
}

.controls-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: center;
  margin: 24px 0;
  padding: 16px;
  background: var(--bg-soft);
  border-radius: var(--r-lg);
  border: 1px solid var(--line);
}

.filter-group { display: flex; flex-wrap: wrap; gap: 8px; }

.filter-group label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 500;
  color: var(--ink-mid);
  background: var(--surface);
  cursor: pointer;
  transition: all 150ms ease;
}

.filter-group label:hover { border-color: var(--accent); color: var(--ink); }
.filter-group input { accent-color: var(--accent); width: 16px; height: 16px; }

.article-list { display: grid; gap: 16px; }

.article-card {
  border: 1px solid var(--line);
  border-radius: var(--r-xl);
  background: var(--surface);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: box-shadow 200ms ease;
}

.article-card:hover { box-shadow: var(--shadow); }

.article-card.key { border-color: #bfdbfe; box-shadow: inset 4px 0 0 var(--accent), var(--shadow-sm); }

.article-top {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 16px;
  align-items: start;
  padding: 16px 24px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--line);
}

.article-top h3 { font-size: 18px; color: var(--navy); font-weight: 700; }

.article-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
  padding: 24px;
  font-size: 14px;
  line-height: 1.6;
}

.article-body p { color: var(--muted); margin: 0; }
.article-meta { color: var(--muted); font-size: 13px; font-weight: 500; }

.empty-state {
  padding: 48px 24px;
  text-align: center;
  color: var(--muted);
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-xl);
  background: var(--bg-soft);
}

.chapter {
  margin-top: 32px;
  padding: 16px 24px;
  border-radius: var(--r-lg);
  background: var(--navy);
  color: #fff;
  font-size: 18px;
  font-weight: 600;
}

.chapter span {
  display: block;
  color: rgba(255,255,255,0.7);
  font-size: 13px;
  margin-top: 4px;
  font-weight: 400;
}

.mini {
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 16px;
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}

.mini strong {
  display: block;
  margin-bottom: 8px;
  color: var(--navy);
  font-size: 14px;
  font-weight: 700;
}

.mini p, .mini li { color: var(--muted); font-size: 14px; line-height: 1.5; margin: 0; }

.badge {
  display: inline-flex;
  border: 1px solid #bfdbfe;
  border-radius: 999px;
  padding: 4px 10px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

.badges { display: flex; flex-wrap: wrap; gap: 8px; justify-content: flex-end; }

.source-link {
  display: inline-flex;
  align-items: center;
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  color: var(--ink-mid);
  background: var(--surface);
  font-size: 14px;
  font-weight: 600;
  transition: all 150ms ease;
}

.source-link:hover { background: var(--bg-soft); border-color: var(--ink); color: var(--ink); }

.filters { display: flex; flex-wrap: wrap; gap: 8px; }

.filter {
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  padding: 6px 14px;
  background: var(--surface);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  transition: all 150ms ease;
}

.filter.active { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }

.links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.hidden { display: none; }

/* QR example page — layout shell (detail in qr-local.css) */
.page-qr .wrap {
  padding-top: 24px;
}

/* ─── Responsive ─────────────────────────────────────────────────────────── */
@media (max-width: 1024px) {
  .site-header-inner { gap: 16px; padding: 0 24px; }
  .header-nav { gap: 0; }
  .nav-link { padding: 8px 10px; font-size: 13px; }
  .wrap { padding: 0 24px 64px; }
}

@media (max-width: 820px) {
  .site-header-inner { gap: 12px; padding: 0 16px; }
  .header-nav { display: none; }
  .mobile-menu { display: block; }
  .lang label { display: none; }

  .page-hero { padding: 48px 0 32px; }
  .page-hero h1 { font-size: 32px; }
  .page-hero .intro { font-size: 16px; }
  
  .deadline-ribbon { grid-template-columns: 1fr; gap: 16px; }

  .two-col, .grid, .roles-grid, .qr-card,
  .legal-row, .core-grid, .xref-grid,
  .controls-row { grid-template-columns: 1fr; }

  .section-nav { display: none; }
  .jump-nav-mobile { display: block; }

  .page-nav-bar-inner { gap: 12px; }
  .search-input { width: 100%; flex: 1; }

  .badges { justify-content: flex-start; }
  .article-body { grid-template-columns: 1fr; }
  
  .qr-card { padding: 24px; }
  .qr-link { width: 140px; height: 140px; margin: 0 auto; }
}

@media (max-width: 520px) {
  .wrap { padding: 0 16px 48px; }
  .page-hero { padding: 32px 0 24px; }
  .page-hero h1 { font-size: 28px; }
  .req-matrix th, .req-matrix td { padding: 12px 10px; }
  .col-check { width: 40px; }
}
