:root {
  --background: hsl(220 14% 96%);
  --foreground: hsl(222 22% 14%);
  --card: #fff;
  --muted-foreground: hsl(220 9% 42%);
  --border: hsl(220 13% 87%);
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --header: hsl(215 45% 22%);
  --header-foreground: hsl(210 40% 98%);
  --radius: 12px;
  --shadow: 0 1px 3px rgb(15 23 42 / .08), 0 1px 2px rgb(15 23 42 / .04);
  --shadow-lg: 0 14px 30px rgb(15 23 42 / .12);
  font-family: ui-sans-serif, system-ui, sans-serif, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--background); color: var(--foreground); line-height: 1.5; }
body, button, input, textarea, select { font-family: inherit; }
a { color: inherit; text-decoration: none; }
button, input, textarea, select { font-size: 100%; }
button { cursor: pointer; }
img, svg { display: block; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.container { width: 100%; max-width: 1280px; margin-inline: auto; padding-inline: 16px; }

/* Header and shared controls */
.site-header { position: sticky; top: 0; z-index: 40; background: var(--header); color: var(--header-foreground); box-shadow: 0 1px 3px rgb(0 0 0 / .12); }
.header-inner { display: flex; align-items: center; gap: 16px; height: 64px; max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.brand { display: inline-flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.brand-mark { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 8px; background: rgb(255 255 255 / .1); color: #fff; }
.brand-name { display: block; color: #fff; font-size: 18px; font-weight: 600; letter-spacing: -.01em; }
.desktop-nav { display: flex; align-items: center; gap: 2px; flex: 1; margin-left: 6px; }
.desktop-nav a { border-radius: 6px; padding: 8px 12px; color: rgb(239 246 255 / .82); font-size: 14px; font-weight: 500; transition: background .18s, color .18s; }
.desktop-nav a:hover, .desktop-nav a.active { background: rgb(255 255 255 / .1); color: #fff; }
.header-tools { display: flex; align-items: center; gap: 8px; margin-left: auto; }
.header-search, .search-inline, .hero-search, .mobile-search form { position: relative; }
.header-search input { width: 256px; height: 36px; border: 1px solid rgb(255 255 255 / .1); border-radius: 6px; padding: 0 12px 0 36px; background: rgb(255 255 255 / .96); color: #1f2937; outline: 0; }
.header-search input::placeholder { color: #9ca3af; }
.header-search .icon, .search-inline .icon, .hero-search .icon, .mobile-search .icon { position: absolute; top: 50%; left: 12px; transform: translateY(-50%); color: #9ca3af; pointer-events: none; }
.icon-button { display: inline-grid; place-items: center; width: 36px; height: 36px; border: 0; border-radius: 6px; background: transparent; color: var(--header-foreground); }
.icon-button:hover { background: rgb(255 255 255 / .1); }
.profile-button { display: inline-flex; align-items: center; gap: 8px; border: 0; border-radius: 999px; padding: 4px 10px 4px 6px; background: rgb(255 255 255 / .1); color: #fff; }
.profile-button:hover { background: rgb(255 255 255 / .2); }
.avatar { display: grid; place-items: center; width: 28px; height: 28px; flex: 0 0 auto; border: 1px solid rgb(255 255 255 / .2); border-radius: 50%; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; }
.profile-menu { position: absolute; top: 56px; right: 16px; z-index: 60; width: 240px; padding: 6px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: #475569; box-shadow: var(--shadow-lg); }
.profile-menu[hidden], .mobile-menu[hidden], .mobile-search[hidden] { display: none; }
.profile-label { padding: 7px 10px; color: var(--muted-foreground); font-size: 12px; }
.profile-menu hr { border: 0; border-top: 1px solid #f1f5f9; margin: 4px 0; }
.profile-menu a { display: block; border-radius: 6px; padding: 8px 10px; font-size: 14px; }
.profile-menu a:hover { background: #eff6ff; color: #1d4ed8; }
.profile-menu .danger { color: #dc2626; }
.mobile-tools { display: none; align-items: center; gap: 2px; margin-left: auto; }
.mobile-menu, .mobile-search { display: none; }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 40px; border: 1px solid transparent; border-radius: 6px; padding: 0 16px; font-size: 14px; font-weight: 600; transition: background .18s, border-color .18s, color .18s, box-shadow .18s; }
.button.primary { background: var(--primary); color: #fff; }
.button.primary:hover { background: var(--primary-dark); }
.button.light { background: #fff; color: var(--header); }
.button.light:hover { background: #f8fafc; }
.button.outline { border-color: #dbe1e8; background: #fff; color: #475569; }
.button.outline:hover { border-color: #93c5fd; color: #1d4ed8; }
.button.ghost { border-color: transparent; background: transparent; color: #475569; }
.button.ghost:hover { background: #f8fafc; }
.button.small { min-height: 34px; padding-inline: 12px; font-size: 13px; }
.button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 2px solid #60a5fa; outline-offset: 2px; }

/* Layout, cards and labels */
.page-heading { border-bottom: 1px solid #e5e7eb; background: #fff; }
.page-heading-inner { padding-top: 40px; padding-bottom: 40px; }
.page-heading h1 { margin: 0; color: #111827; font-size: 32px; line-height: 1.15; letter-spacing: -.02em; }
.page-heading p { max-width: 720px; margin: 8px 0 0; color: var(--muted-foreground); font-size: 16px; }
.heading-action { margin-top: 20px; }
.section { padding-top: 40px; padding-bottom: 40px; }
.section.compact { padding-top: 24px; padding-bottom: 24px; }
.section-title { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-title h2 { margin: 0; color: #111827; font-size: 24px; line-height: 1.2; letter-spacing: -.015em; }
.section-title p { margin: 4px 0 0; color: var(--muted-foreground); font-size: 14px; }
.section-title .button { flex: 0 0 auto; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.card { min-width: 0; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.card-link { display: block; height: 100%; padding: 20px; transition: border-color .18s, box-shadow .18s, background .18s; }
.card-link:hover { border-color: #bfdbfe; box-shadow: 0 7px 18px rgb(15 23 42 / .09); }
.card h3, .card h4 { margin: 12px 0 0; color: #111827; font-size: 16px; line-height: 1.35; }
.card-link:hover h3, .card-link:hover h4 { color: #1d4ed8; }
.card p { margin: 5px 0 0; color: #4b5563; font-size: 14px; }
.muted { color: var(--muted-foreground) !important; }
.tiny { font-size: 12px !important; }
.meta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 12px; }
.push { margin-left: auto; }
.divider-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; border-top: 1px solid #f1f5f9; padding-top: 12px; color: var(--muted-foreground); font-size: 12px; }
.divider-meta span { display: inline-flex; align-items: center; gap: 4px; }
.badge { display: inline-flex; align-items: center; min-height: 22px; border: 1px solid transparent; border-radius: 6px; padding: 1px 8px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge.france { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.badge.europe { border-color: #a7f3d0; background: #ecfdf5; color: #047857; }
.badge.type { background: #f8fafc; color: #475569; }
.badge.status { background: #f3f4f6; color: #475569; }
.badge.status.applicable, .badge.status.promulgue { border-color: #bbf7d0; background: #f0fdf4; color: #15803d; }
.badge.status.avenir { border-color: #fde68a; background: #fffbeb; color: #b45309; }
.impact { display: inline-flex; align-items: center; gap: 6px; color: #15803d; font-size: 12px; font-weight: 600; }
.impact::before { width: 8px; height: 8px; border-radius: 50%; background: #22c55e; content: ""; }
.impact.notable { color: #ca8a04; }
.impact.notable::before { background: #eab308; }
.impact.important { color: #c2410c; }
.impact.important::before { background: #f97316; }
.impact.majeur { color: #b91c1c; }
.impact.majeur::before { background: #ef4444; }
.ad-slot { display: flex; align-items: center; justify-content: center; width: 100%; height: 90px; border: 1px dashed #d1d5db; background: rgb(249 250 251 / .6); color: #9ca3af; font-size: 10px; letter-spacing: .14em; text-transform: uppercase; }
.ad-slot.tall { height: 120px; }
.ad-slot.side { height: 600px; }

/* Home */
.hero { position: relative; overflow: hidden; background: var(--header); color: var(--header-foreground); }
.hero::before { position: absolute; inset: 0; opacity: .1; background-image: radial-gradient(circle at 20% 20%, #fff 0, transparent 40%), radial-gradient(circle at 80% 60%, #fff 0, transparent 35%); content: ""; }
.hero-inner { position: relative; padding-top: 64px; padding-bottom: 64px; text-align: center; }
.hero-inner > div { max-width: 760px; margin-inline: auto; }
.hero-pill { display: inline-flex; align-items: center; border-radius: 999px; padding: 4px 12px; background: rgb(255 255 255 / .1); color: #eff6ff; font-size: 12px; font-weight: 500; }
.hero h1 { margin: 20px 0 0; color: #fff; font-size: 48px; line-height: 1.12; letter-spacing: -.025em; }
.hero .lead { margin: 14px auto 0; color: rgb(239 246 255 / .8); font-size: 18px; }
.hero-search { max-width: 672px; margin: 32px auto 0; }
.hero-search input { width: 100%; height: 56px; border: 0; border-radius: 6px; padding: 0 18px 0 48px; background: #fff; color: #1f2937; box-shadow: 0 10px 20px rgb(15 23 42 / .18); }
.popular { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px; margin-top: 20px; }
.popular-label { color: rgb(239 246 255 / .55); font-size: 14px; }
.popular a { border-radius: 999px; padding: 4px 12px; background: rgb(255 255 255 / .1); color: rgb(239 246 255 / .9); font-size: 14px; }
.popular a:hover { background: rgb(255 255 255 / .2); }
.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 32px; }
.home-ad { padding-top: 24px; padding-bottom: 24px; }
.profile-grid a, .topic-tile { display: block; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 20px; transition: border-color .18s, box-shadow .18s; }
.profile-grid a:hover, .topic-tile:hover { border-color: #bfdbfe; box-shadow: 0 7px 18px rgb(15 23 42 / .07); }
.profile-grid p:first-child { margin: 0; color: #111827; font-size: 14px; font-weight: 600; }
.profile-grid a:hover p:first-child, .topic-tile:hover .topic-name { color: #1d4ed8; }
.topic-tile { text-align: center; }
.topic-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-inline: auto; border-radius: 50%; background: #eff6ff; color: #2563eb; }
.topic-tile:hover .topic-icon { background: #dbeafe; }
.topic-name { display: block; margin-top: 12px; color: #111827; font-size: 14px; font-weight: 500; }
.rank-layout { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px; }
.rank-list { display: grid; gap: 8px; }
.rank-item { display: flex; align-items: center; gap: 16px; border: 1px solid #e8ebef; border-radius: 8px; background: #fff; padding: 16px; }
.rank-item:hover { border-color: #bfdbfe; }
.rank-number { display: grid; place-items: center; width: 32px; height: 32px; flex: 0 0 auto; border-radius: 50%; background: #f3f4f6; color: #4b5563; font-size: 14px; font-weight: 700; }
.rank-copy { min-width: 0; flex: 1; }
.rank-copy strong { display: block; overflow: hidden; color: #111827; font-size: 14px; text-overflow: ellipsis; white-space: nowrap; }
.rank-copy span { color: var(--muted-foreground); font-size: 12px; }
.rank-views { display: flex; align-items: center; gap: 4px; flex: 0 0 auto; color: var(--muted-foreground); font-size: 12px; }
.list-card { display: flex; align-items: center; gap: 20px; border-top: 1px solid #f1f5f9; padding: 16px; transition: background .18s; }
.list-card:first-child { border-top: 0; }
.list-card:hover { background: #f8fafc; }
.list-card-kind { display: flex; align-items: center; gap: 8px; width: 160px; flex: 0 0 160px; }
.list-card-copy { min-width: 0; flex: 1; }
.list-card-copy strong, .list-card-copy span, .list-card-copy p { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-card-copy strong { color: #111827; font-size: 14px; }
.list-card-copy span { color: var(--muted-foreground); font-size: 12px; }
.list-card-copy p { margin: 4px 0 0; color: #4b5563; font-size: 14px; }
.list-card-status { display: flex; align-items: center; justify-content: flex-end; gap: 16px; width: 256px; flex: 0 0 256px; }

/* Lists, filters, community */
.search-inline { max-width: 672px; margin-top: 20px; }
.search-inline input { width: 100%; height: 44px; border: 1px solid #d1d5db; border-radius: 6px; padding: 0 12px 0 36px; background: #fff; color: #1f2937; }
.notice { border: 1px solid #d1fae5; border-radius: var(--radius); background: rgb(236 253 245 / .55); padding: 16px; color: #064e3b; font-size: 14px; }
.notice strong { display: block; }
.notice p { margin: 4px 0 0; }
.notice .badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 8px; }
.filters { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 16px; }
.filters-label { display: inline-flex; align-items: center; gap: 8px; color: #4b5563; font-size: 14px; font-weight: 600; }
.filter-control { display: inline-flex; align-items: center; gap: 8px; color: var(--muted-foreground); font-size: 14px; }
.filter-control select { min-height: 32px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 0 10px; background: #fff; color: #374151; }
.result-count { margin: 16px 0 0; color: var(--muted-foreground); font-size: 14px; }
.law-results { display: grid; gap: 16px; margin-top: 16px; }
.law-result { display: block; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 20px; box-shadow: var(--shadow); transition: border-color .18s, box-shadow .18s; }
.law-result:hover { border-color: #bfdbfe; box-shadow: 0 7px 18px rgb(15 23 42 / .08); }
.law-result h3 { margin: 12px 0 0; color: #111827; font-size: 18px; line-height: 1.3; }
.law-result:hover h3 { color: #1d4ed8; }
.law-result .official { margin: 2px 0 0; color: var(--muted-foreground); font-size: 12px; }
.law-result .summary { margin: 8px 0 0; color: #4b5563; font-size: 14px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; min-height: 220px; border: 1px dashed #d1d5db; border-radius: var(--radius); background: rgb(255 255 255 / .5); padding: 32px; text-align: center; }
.empty-state h3 { margin: 12px 0 0; color: #374151; font-size: 18px; }
.empty-state p { max-width: 420px; margin: 4px 0 0; color: var(--muted-foreground); font-size: 14px; }
.community-tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 24px; }
.pill-tab { border: 1px solid #e5e7eb; border-radius: 999px; padding: 6px 16px; background: #fff; color: #4b5563; font-size: 14px; font-weight: 600; }
.pill-tab:hover, .pill-tab.active { border-color: var(--primary); background: var(--primary); color: #fff; }
.poll-options { display: grid; gap: 8px; margin-top: 16px; }
.poll-option-head { display: flex; justify-content: space-between; color: #4b5563; font-size: 12px; }
.progress { height: 6px; overflow: hidden; margin-top: 4px; border-radius: 999px; background: #f3f4f6; }
.progress span { display: block; height: 100%; border-radius: inherit; background: #3b82f6; }
.progress.orange span { background: #f97316; }
.progress.gray span { background: #9ca3af; }
.guide-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 8px; background: #eff6ff; color: #2563eb; }

/* Law detail */
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 4px; color: var(--muted-foreground); font-size: 14px; }
.breadcrumb a:hover { color: #1d4ed8; }
.detail-header { border-bottom: 1px solid #e5e7eb; background: #fff; }
.detail-header-inner { padding-top: 24px; padding-bottom: 24px; }
.detail-kicker { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; }
.detail-header h1 { max-width: 930px; margin: 12px 0 0; color: #111827; font-size: 36px; line-height: 1.2; letter-spacing: -.025em; }
.detail-official { max-width: 900px; margin: 8px 0 0; color: var(--muted-foreground); font-size: 14px; }
.detail-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 16px; color: var(--muted-foreground); font-size: 13px; }
.detail-stats span { display: inline-flex; align-items: center; gap: 4px; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 20px; }
.detail-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 32px; padding-top: 32px; padding-bottom: 48px; }
.detail-main { display: grid; gap: 48px; min-width: 0; }
.detail-sidebar { display: grid; gap: 24px; align-self: start; }
.sticky-side { position: sticky; top: 96px; }
.side-box { border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 16px; box-shadow: var(--shadow); }
.side-box h3 { margin: 0; color: #111827; font-size: 14px; }
.side-box ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; color: #4b5563; font-size: 14px; }
.side-box li a:hover { color: #1d4ed8; }
.brief { border: 2px solid #dbeafe; border-radius: 16px; background: linear-gradient(135deg, rgb(239 246 255 / .6), #fff); padding: 24px; }
.brief h2 { display: flex; align-items: center; gap: 8px; margin: 0; color: #111827; font-size: 24px; line-height: 1.2; }
.brief ul { display: grid; gap: 12px; margin: 20px 0 0; padding: 0; list-style: none; }
.brief li { display: flex; gap: 12px; align-items: flex-start; color: #374151; font-size: 16px; }
.number { display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; margin-top: 2px; border-radius: 50%; background: #2563eb; color: #fff; font-size: 11px; font-weight: 700; }
.detail-section > h2 { margin: 0; color: #111827; font-size: 24px; line-height: 1.2; }
.section-intro { margin: 4px 0 0; color: var(--muted-foreground); font-size: 14px; }
.summary-switch { display: inline-flex; margin-top: 16px; border: 1px solid #e5e7eb; border-radius: 8px; background: #fff; padding: 4px; }
.summary-switch button { border: 0; border-radius: 6px; padding: 6px 16px; background: transparent; color: #4b5563; font-size: 14px; font-weight: 600; }
.summary-switch button.active { background: #2563eb; color: #fff; }
.summary-box { margin-top: 16px; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 24px; box-shadow: var(--shadow); }
.summary-box p { margin: 0; color: #374151; font-size: 16px; line-height: 1.7; }
.disclaimer { margin-top: 12px; border-radius: 8px; background: #fffbeb; padding: 8px 12px; color: #92400e; font-size: 12px; }
.change-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.change-box { border: 1px solid; border-radius: var(--radius); padding: 24px; }
.change-box.before { border-color: #fecaca; background: rgb(254 242 242 / .5); }
.change-box.after { border-color: #bbf7d0; background: rgb(240 253 244 / .5); }
.change-box.same { grid-column: 1 / -1; border-color: #e5e7eb; background: #fff; }
.change-box label { color: #6b7280; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.change-box.before label { color: #dc2626; }
.change-box.after label { color: #16a34a; }
.change-box p { margin: 8px 0 0; color: #374151; font-size: 14px; }
.concerned-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.concerned-card { border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 20px; box-shadow: var(--shadow); }
.round-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #eff6ff; color: #2563eb; }
.concerned-card strong { display: block; margin-top: 12px; color: #111827; font-size: 14px; }
.concerned-card p { margin: 4px 0 0; color: var(--muted-foreground); font-size: 14px; }
.timeline { display: grid; gap: 16px; margin: 20px 0 0 8px; border-left: 2px solid #dbeafe; padding-left: 24px; }
.timeline-item { position: relative; }
.timeline-item::before { position: absolute; top: 3px; left: -33px; width: 12px; height: 12px; border: 2px solid #60a5fa; border-radius: 50%; background: #fff; content: ""; }
.timeline-date { color: #2563eb; font-size: 12px; font-weight: 600; }
.timeline-step { color: #111827; font-size: 14px; font-weight: 700; }
.timeline-item p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 14px; }
.accordion-list { display: grid; gap: 12px; margin-top: 20px; }
.accordion { overflow: hidden; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; }
.accordion-trigger { display: flex; align-items: center; justify-content: space-between; gap: 16px; width: 100%; border: 0; background: #fff; padding: 16px 20px; text-align: left; }
.accordion-trigger:hover { background: #f8fafc; }
.accordion-trigger strong { display: block; color: #111827; font-size: 14px; }
.accordion-trigger .trigger-copy { display: block; }
.accordion-trigger .trigger-copy span { display: block; margin-top: 2px; color: var(--muted-foreground); font-size: 14px; }
.accordion-content { display: none; border-top: 1px solid #f1f5f9; padding: 0 20px 16px; color: #4b5563; font-size: 14px; }
.accordion.open .accordion-content { display: block; }
.accordion.open .chevron { transform: rotate(180deg); }
.example-grid, .source-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 20px; }
.example-card { border: 1px solid #dbeafe; border-radius: var(--radius); background: rgb(239 246 255 / .4); padding: 24px; }
.example-card strong { color: #111827; font-size: 14px; }
.example-card p { margin: 8px 0 0; color: #374151; font-size: 14px; }
.complete-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 32px; margin-top: 20px; }
.toc { position: sticky; top: 96px; align-self: start; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 16px; }
.toc strong { color: #6b7280; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.toc ul { display: grid; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; color: #4b5563; font-size: 13px; }
.prose { color: #374151; font-size: 16px; line-height: 1.75; }
.prose h3 { margin: 24px 0 0; color: #111827; font-size: 18px; line-height: 1.3; }
.prose p { margin: 8px 0 0; }
.callout { margin: 20px 0; border-left: 4px solid #60a5fa; border-radius: 8px; background: rgb(239 246 255 / .55); padding: 16px; color: #1e3a8a; font-size: 14px; }
.official-toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 16px; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 12px; }
.official-toolbar input { flex: 1 1 220px; min-height: 36px; border: 1px solid #e5e7eb; border-radius: 6px; padding: 0 10px; }
.official-item { margin-top: 12px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 16px; }
.official-item summary { display: flex; align-items: center; justify-content: space-between; cursor: pointer; color: #111827; font-size: 14px; font-weight: 700; }
.official-item p { margin: 12px 0 0; color: #4b5563; font-size: 14px; }
.source-card { display: flex; align-items: center; gap: 12px; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 16px; }
.source-copy { min-width: 0; flex: 1; }
.source-copy strong, .source-copy span { display: block; }
.source-copy strong { color: #111827; font-size: 14px; }
.source-copy span { color: var(--muted-foreground); font-size: 12px; }
.rating-box { border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 24px; }
.rating-buttons { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.comment-list { display: grid; gap: 12px; margin-top: 20px; }
.comment { display: flex; gap: 12px; border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 20px; }
.comment .avatar { background: #e5e7eb; color: #374151; }
.comment-copy { min-width: 0; flex: 1; }
.comment-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.comment-meta strong { color: #111827; font-size: 14px; }
.comment p { margin: 4px 0 0; color: #374151; font-size: 14px; }
.comment-actions { display: flex; gap: 16px; margin-top: 8px; color: var(--muted-foreground); font-size: 12px; }

/* Forms, footer and cookie banner */
.content-narrow { max-width: 840px; }
.content-card { border: 1px solid #e8ebef; border-radius: var(--radius); background: #fff; padding: 24px; box-shadow: var(--shadow); }
.content-card h2 { margin: 0 0 12px; color: #111827; font-size: 24px; }
.content-card h3 { margin: 24px 0 0; color: #111827; font-size: 18px; }
.content-card p, .content-card li { color: #374151; font-size: 15px; }
.content-card p { margin: 12px 0 0; }
.content-card ul, .content-card ol { padding-left: 22px; }
.content-card li { margin-top: 8px; }
.guide-label { display: inline-flex; align-items: center; gap: 7px; color: #2563eb; font-size: 13px; font-weight: 700; }
.key-points { margin-top: 24px; border: 1px solid #bfdbfe; border-radius: var(--radius); background: #eff6ff; padding: 18px 20px; color: #1e3a8a; }
.key-points strong { color: #1e3a8a; font-size: 14px; }
.key-points ul { display: grid; gap: 10px; margin: 12px 0 0; padding: 0; list-style: none; }
.key-points li { display: flex; align-items: flex-start; gap: 8px; margin: 0; color: #1e40af; font-size: 14px; }
.key-points svg { flex: 0 0 auto; margin-top: 2px; }
.member-page { min-height: calc(100vh - 64px); background: #f4f5f7; padding: 32px 0 64px; }
.member-shell { max-width: 1240px; }
.member-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.member-heading h1 { margin: 0; color: #111827; font-size: 32px; line-height: 1.2; }
.member-heading p { margin: 7px 0 0; color: var(--muted-foreground); font-size: 15px; }
.member-notice-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; }
.member-notice { min-height: 118px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 20px; box-shadow: var(--shadow); }
.member-notice .round-icon { float: left; margin: 0 12px 28px 0; background: #eff6ff; color: #2563eb; }
.member-notice strong { display: block; color: #1f2937; font-size: 14px; line-height: 1.45; }
.member-notice p { clear: both; margin: 10px 0 0; color: var(--muted-foreground); font-size: 12px; line-height: 1.45; }
.member-shortcuts { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; margin-top: 28px; }
.member-shortcuts a { display: flex; align-items: center; gap: 12px; min-height: 80px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 16px; color: #64748b; box-shadow: var(--shadow); }
.member-shortcuts a:hover { border-color: #bfdbfe; color: #2563eb; }
.member-shortcuts .round-icon { background: #f8fafc; color: #64748b; }
.member-shortcuts span:nth-child(2) { min-width: 0; flex: 1; }
.member-shortcuts strong, .member-shortcuts small { display: block; }
.member-shortcuts strong { color: #1f2937; font-size: 14px; }
.member-shortcuts small { margin-top: 3px; color: var(--muted-foreground); font-size: 12px; }
.member-block { margin-top: 40px; }
.member-block > h2 { margin: 0 0 16px; color: #111827; font-size: 21px; }
.member-list { display: grid; gap: 12px; }
.member-law-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 20px; box-shadow: var(--shadow); }
.member-law-main { min-width: 0; flex: 1; }
.member-law-main a { color: #111827; }
.member-law-main a:hover { color: #2563eb; }
.member-law-main strong { font-size: 16px; }
.member-law-main p { margin: 5px 0 0; color: var(--muted-foreground); font-size: 13px; }
.member-law-main .member-update { color: #2563eb; font-size: 12px; }
.member-law-side { display: flex; align-items: center; gap: 12px; flex: 0 0 auto; }
.member-tabs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-bottom: 20px; border-bottom: 1px solid #e5e7eb; padding-bottom: 8px; }
.member-tabs a, .member-tabs button { display: inline-flex; align-items: center; justify-content: center; min-height: 36px; border: 0; border-radius: 6px; background: transparent; padding: 0 13px; color: #64748b; font-size: 14px; font-weight: 600; }
.member-tabs a:hover, .member-tabs button:hover, .member-tabs a.active, .member-tabs button.active { background: #eaf2ff; color: #1d4ed8; }
.profile-summary { display: flex; align-items: center; gap: 20px; }
.profile-avatar { width: 76px; height: 76px; background: #dbeafe; color: #1d4ed8; font-size: 22px; }
.profile-summary h1 { margin: 0; color: #111827; font-size: 32px; }
.profile-summary p { margin: 5px 0 0; color: var(--muted-foreground); font-size: 14px; }
.profile-stats { display: flex; flex-wrap: wrap; gap: 24px; margin: 28px 0; border-top: 1px solid #e5e7eb; border-bottom: 1px solid #e5e7eb; padding: 18px 0; }
.profile-stats span { display: grid; gap: 3px; color: var(--muted-foreground); font-size: 12px; }
.profile-stats strong { color: #111827; font-size: 20px; }
.profile-content { min-height: 180px; }
.notification-row { display: flex; align-items: center; gap: 14px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 16px 20px; box-shadow: var(--shadow); }
.notification-row .round-icon { flex: 0 0 auto; background: #eff6ff; color: #2563eb; }
.notification-row > div { min-width: 0; flex: 1; }
.notification-row strong { color: #1f2937; font-size: 14px; }
.notification-row p { margin: 4px 0 0; color: var(--muted-foreground); font-size: 13px; }
.notification-row time { flex: 0 0 auto; color: #94a3b8; font-size: 12px; }
.member-settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 28px; align-items: start; }
.settings-nav { display: grid; gap: 4px; }
.settings-nav a, .settings-nav button { border: 0; border-radius: 6px; background: transparent; padding: 11px 14px; color: #64748b; text-align: left; font-size: 14px; }
.settings-nav a:hover, .settings-nav button:hover, .settings-nav a.active, .settings-nav button.active { background: #eaf2ff; color: #1d4ed8; font-weight: 600; }
.settings-panel { max-width: 720px; }
.settings-panel h2 { margin-bottom: 20px; }
.settings-avatar { display: flex; align-items: center; gap: 14px; margin-bottom: 24px; }
.settings-options { max-width: 560px; }
.danger-panel { border: 1px solid #fecaca; border-radius: var(--radius); background: #fff7f7; padding: 20px; }
.danger-panel p { margin: 0 0 18px; color: #991b1b; }
.danger-button { border-color: #dc2626; background: #dc2626; color: #fff; }
.danger-button:hover { border-color: #b91c1c; background: #b91c1c; }
.moderation-stats { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 12px; }
.moderation-stats span { display: grid; gap: 5px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 16px; color: var(--muted-foreground); font-size: 12px; box-shadow: var(--shadow); }
.moderation-stats strong { color: #111827; font-size: 24px; }
.moderation-list { display: grid; gap: 12px; }
.moderation-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; padding: 18px 20px; box-shadow: var(--shadow); }
.moderation-copy { min-width: 0; flex: 1; }
.moderation-copy p { margin: 8px 0 0; color: #1f2937; font-size: 14px; }
.moderation-copy small { display: block; margin-top: 5px; color: #dc2626; font-size: 12px; }
.moderation-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 6px; }
.admin-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.admin-tabs button { border: 1px solid #e5e7eb; border-radius: 6px; background: #fff; padding: 9px 13px; color: #64748b; font-size: 13px; font-weight: 600; }
.admin-tabs button:hover, .admin-tabs button.active { border-color: #bfdbfe; background: #eff6ff; color: #1d4ed8; }
.admin-tabs button.primary { border-color: #2563eb; background: #2563eb; color: #fff; }
.admin-tabs small { margin-left: 4px; color: inherit; opacity: .75; }
.admin-toolbar { display: flex; gap: 8px; margin-bottom: 12px; }
.admin-toolbar input, .admin-toolbar select { min-height: 40px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; padding: 0 12px; color: #374151; }
.admin-toolbar input { flex: 1; }
.table-wrap { overflow-x: auto; border: 1px solid #e5e7eb; border-radius: var(--radius); background: #fff; box-shadow: var(--shadow); }
.table-wrap table { width: 100%; border-collapse: collapse; min-width: 680px; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid #f1f5f9; padding: 14px 16px; text-align: left; font-size: 13px; }
.table-wrap th { background: #f8fafc; color: #64748b; font-size: 12px; text-transform: uppercase; }
.table-wrap td { color: #374151; }
.table-wrap tr:last-child td { border-bottom: 0; }
.member-form { max-width: 880px; }
.member-form .form-field + .form-field { margin-top: 18px; }
.member-form .form-field input, .member-form .form-field textarea, .member-form .form-field select { background: #fff; }
.form-rules { margin-top: 20px; border-radius: 8px; background: #f8fafc; padding: 16px; color: #475569; font-size: 13px; }
.form-rules ul { display: grid; gap: 6px; margin: 9px 0 0; padding-left: 18px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 24px; }
.checkbox-row { display: flex; align-items: center; gap: 8px; margin-top: 12px; color: #374151; font-size: 14px; }
.form { display: grid; gap: 20px; }
.form-field { display: grid; gap: 6px; }
.form-field label { color: #374151; font-size: 14px; font-weight: 600; }
.form-field input, .form-field textarea, .form-field select { width: 100%; min-height: 40px; border: 1px solid #d1d5db; border-radius: 6px; padding: 8px 12px; background: #fff; color: #1f2937; }
.form-field textarea { min-height: 130px; resize: vertical; }
.footer { margin-top: 64px; border-top: 1px solid #e5e7eb; background: #fff; }
.footer-main { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 32px; padding-top: 48px; padding-bottom: 48px; }
.footer-brand p { max-width: 190px; margin: 12px 0 0; color: var(--muted-foreground); font-size: 14px; }
.footer h4 { margin: 0; color: #6b7280; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.footer ul { display: grid; gap: 8px; margin: 12px 0 0; padding: 0; list-style: none; }
.footer li a { color: #4b5563; font-size: 14px; }
.footer li a:hover { color: #1d4ed8; }
.footer-bottom { display: flex; align-items: center; justify-content: space-between; gap: 16px; border-top: 1px solid #f1f5f9; padding-top: 24px; padding-bottom: 24px; color: var(--muted-foreground); font-size: 12px; }
.footer-bottom p { margin: 0; }
.footer-bottom-links { display: flex; flex-wrap: wrap; gap: 16px; }
.footer-bottom a:hover { color: #1d4ed8; }
.cookie-banner { position: fixed; right: 0; bottom: 0; left: 0; z-index: 50; border-top: 1px solid #e5e7eb; background: rgb(255 255 255 / .96); padding: 12px; box-shadow: 0 -4px 18px rgb(15 23 42 / .08); backdrop-filter: blur(8px); }
.cookie-inner { display: flex; align-items: center; gap: 12px; max-width: 1280px; margin: 0 auto; }
.cookie-inner > .icon { flex: 0 0 auto; color: #2563eb; }
.cookie-copy { flex: 1; color: #4b5563; font-size: 14px; }
.cookie-copy p { margin: 0; }
.cookie-copy a { color: #1d4ed8; font-weight: 600; }
.cookie-actions { display: flex; flex: 0 0 auto; gap: 8px; }
.cookie-preferences { position: fixed; inset: 0; z-index: 60; display: grid; place-items: center; background: rgb(0 0 0 / .4); padding: 16px; }
.cookie-modal { width: min(100%, 512px); border-radius: 16px; background: #fff; padding: 24px; box-shadow: var(--shadow-lg); }
.cookie-modal-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.cookie-modal h3 { margin: 0; color: #111827; font-size: 18px; }
.cookie-choice { display: flex; align-items: flex-start; gap: 12px; margin-top: 12px; border: 1px solid #e8ebef; border-radius: 8px; padding: 12px; }
.cookie-choice input { margin-top: 3px; accent-color: #2563eb; }
.cookie-choice strong { color: #111827; font-size: 14px; }
.cookie-choice p { margin: 2px 0 0; color: var(--muted-foreground); font-size: 12px; }
.cookie-modal-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 20px; }
.toast { position: fixed; right: 16px; bottom: 16px; z-index: 80; max-width: min(360px, calc(100% - 32px)); transform: translateY(18px); border-radius: 8px; background: #111827; color: #fff; padding: 12px 16px; opacity: 0; pointer-events: none; font-size: 14px; box-shadow: var(--shadow-lg); transition: opacity .2s, transform .2s; }
.toast.show { transform: translateY(0); opacity: 1; }

@media (max-width: 1279px) { .desktop-nav a { padding-inline: 8px; } .header-search input { width: 220px; } }
@media (max-width: 1023px) {
  .desktop-nav, .header-tools { display: none; }
  .mobile-tools { display: flex; }
  .mobile-menu { position: fixed; inset: 64px 0 0; z-index: 35; display: block; overflow: auto; background: var(--header); padding: 16px; }
  .mobile-menu nav { display: grid; gap: 4px; }
  .mobile-menu a { border-radius: 8px; padding: 12px 16px; color: rgb(239 246 255 / .9); font-size: 16px; font-weight: 500; }
  .mobile-menu a:hover, .mobile-menu a.active { background: rgb(255 255 255 / .1); color: #fff; }
  .mobile-menu hr { border: 0; border-top: 1px solid rgb(255 255 255 / .1); margin: 10px 0; }
  .mobile-menu .account-link { font-size: 14px; color: rgb(239 246 255 / .75); }
  .mobile-search { display: block; border-top: 1px solid rgb(255 255 255 / .1); padding: 12px 16px; }
  .mobile-search input { width: 100%; height: 40px; border: 1px solid rgb(255 255 255 / .1); border-radius: 6px; padding: 0 12px 0 36px; background: rgb(255 255 255 / .96); color: #1f2937; }
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .list-card-status { width: auto; flex: 0 0 auto; }
  .detail-layout { grid-template-columns: 1fr; }
  .detail-sidebar { display: none; }
  .concerned-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-brand { grid-column: span 2; }
}
@media (max-width: 767px) {
  .hero-inner { padding-top: 48px; padding-bottom: 48px; }
  .hero h1 { font-size: 38px; }
  .hero .lead { font-size: 16px; }
  .section { padding-top: 32px; padding-bottom: 32px; }
  .section-title { align-items: flex-start; flex-direction: column; }
  .grid-2, .grid-3, .grid-4, .grid-6, .rank-layout, .change-grid, .example-grid, .source-grid { grid-template-columns: 1fr; }
  .concerned-grid { grid-template-columns: 1fr; }
  .list-card { align-items: flex-start; flex-direction: column; gap: 10px; }
  .list-card-kind { width: auto; flex: 0 0 auto; }
  .list-card-status { flex-wrap: wrap; justify-content: flex-start; width: auto; }
  .page-heading-inner { padding-top: 32px; padding-bottom: 32px; }
  .detail-header h1 { font-size: 28px; }
  .detail-stats { gap: 10px; }
  .brief { padding: 20px; }
  .complete-layout { grid-template-columns: 1fr; }
  .toc { display: none; }
  .footer-main { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 16px; }
  .footer-brand { grid-column: span 2; }
  .footer-bottom { align-items: flex-start; flex-direction: column; }
  .cookie-inner { align-items: flex-start; flex-direction: column; }
  .cookie-actions { width: 100%; flex-wrap: wrap; }
  .cookie-actions .button { flex: 1; }
}
@media (max-width: 480px) { .grid-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .brand-name { display: none; } }
@media (max-width: 767px) {
  .member-page { padding-top: 24px; }
  .member-heading { align-items: stretch; flex-direction: column; gap: 14px; }
  .member-heading h1, .profile-summary h1 { font-size: 28px; }
  .member-notice-grid, .member-shortcuts, .moderation-stats { grid-template-columns: 1fr; }
  .member-law-row, .moderation-row { align-items: stretch; flex-direction: column; }
  .member-law-side { justify-content: space-between; }
  .notification-row { align-items: flex-start; }
  .notification-row time { margin-left: auto; }
  .member-settings { grid-template-columns: 1fr; }
  .settings-nav { display: flex; overflow-x: auto; }
  .settings-nav a, .settings-nav button { flex: 0 0 auto; white-space: nowrap; }
  .admin-toolbar { align-items: stretch; flex-direction: column; }
  .profile-summary { align-items: flex-start; }
  .profile-stats { gap: 16px; }
  .profile-stats span { min-width: 82px; }
}
