
*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%;scroll-behavior:smooth;scroll-padding-top:88px}
body{
  font-family:var(--font);
  color:var(--text);
  background:linear-gradient(180deg,var(--surface-soft) 0,var(--bg) 220px,var(--bg) 100%);
  line-height:1.6;
  -webkit-font-smoothing:antialiased;
  min-height:100vh;
  min-height:100dvh;
  display:flex;
  flex-direction:column;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.page-title,
.card-title,
.card h3,
.item-hero h1,
.section-head h2,
.basics-card__title,
.material-card strong,
.overview-tile strong,
.status-banner__text strong{
  font-family:var(--font-display);
}

a{color:inherit;text-decoration:none}
::selection{background:var(--accent);color:#fff}

.wrap{
  max-width:1240px;width:95%;
  width:min(100% - 40px,1240px);
  margin:0 auto;
  padding:16px 0 40px;
  flex:1 0 auto;
}

/* Context-heavy pages can use the desktop canvas without widening reader
   columns. The shell grows in stages so the extra space becomes a second
   information rail instead of a stretched text block. */
.wrap--wide{max-width:1240px}

@media (min-width:1280px){
  .wrap--wide{
    max-width:1440px;
    width:min(100% - 64px,1440px);
  }
}

@media (min-width:2200px){
  .wrap--wide{
    max-width:1680px;
    width:min(100% - 96px,1680px);
  }
}

.trust-ribbon{
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto;
  align-items:center;
  gap:10px;
  min-height:30px;
  margin:8px 2px 12px;
  color:var(--muted);
  font-size:10.5px;
  line-height:1.25;
}

.trust-ribbon__status,
.trust-ribbon__links,
.trust-ribbon__link{
  display:inline-flex;
  align-items:center;
}

.trust-ribbon__status{
  gap:6px;
  min-width:0;
  white-space:nowrap;
}

.trust-ribbon__status strong{
  color:var(--text);
  font-weight:780;
}

.trust-ribbon__dot{
  width:7px;
  height:7px;
  flex:0 0 auto;
  border-radius:50%;
  background:#2aa876;
  box-shadow:0 0 0 3px color-mix(in srgb,#2aa876 14%,transparent);
}

.trust-ribbon__links{
  justify-content:center;
  flex-wrap:wrap;
  gap:5px;
  min-width:0;
}

.trust-ribbon__link{
  min-height:25px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:color-mix(in srgb,var(--card) 78%,transparent);
  color:var(--accent);
  font-size:10.5px;
  font-weight:750;
  line-height:1.15;
  text-decoration:none;
  white-space:nowrap;
  transition:all var(--transition);
}

.trust-ribbon__link:hover,
.trust-ribbon__link:focus-visible{
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent-strong);
}

.trust-ribbon__boundary{
  color:var(--muted);
  font-size:10px;
  text-align:right;
  white-space:nowrap;
}

.connectivity-notice{
  display:flex;
  align-items:center;
  gap:7px;
  margin:0 2px 10px;
  padding:7px 10px;
  border:1px solid color-mix(in srgb,var(--warn) 44%,var(--line));
  border-radius:9px;
  background:color-mix(in srgb,var(--warn-bg) 72%,var(--card));
  color:var(--text);
  font-size:11px;
  line-height:1.35;
}
.connectivity-notice[hidden]{display:none}
.connectivity-notice__dot{
  width:7px;
  height:7px;
  flex:0 0 7px;
  border-radius:50%;
  background:var(--warn);
}
.connectivity-notice[data-state="online"]{display:none}

.hidden{display:none !important}
.sr-only{
  position:absolute!important;
  width:1px!important;
  height:1px!important;
  padding:0!important;
  margin:-1px!important;
  overflow:hidden!important;
  clip:rect(0,0,0,0)!important;
  white-space:nowrap!important;
  border:0!important;
}

.home-load-more-wrap{
  display:flex;
  justify-content:center;
  margin-top:16px;
}

.item-language-notice{
  margin:10px 0 0;
  padding:9px 11px;
  border:1px solid var(--accent-border);
  border-radius:10px;
  background:var(--accent-bg);
  color:var(--text);
  font-size:12.5px;
  line-height:1.5;
}

/* Shared */
.card{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius);
  box-shadow:var(--shadow);
}
a.card,
.card-link{
  display:flex;
  flex-direction:column;
  text-decoration:none;
  color:inherit;
  transition:transform var(--transition), box-shadow var(--transition), border-color var(--transition);
}
a.card:hover,
.card-link:hover{
  transform:translateY(-1px);
  box-shadow:var(--shadow-hover);
  border-color:var(--line-strong);
}

.cards,
.grid{
  display:grid;
  grid-template-columns:repeat(auto-fill,minmax(300px,1fr));
  gap:16px;
}

.card.card-link,
a.card{
  padding:20px 20px 18px;
  gap:10px;
}

.card h3{
  font-size:16.5px;
  line-height:1.34;
  font-weight:500;
  color:var(--text);
  margin:0;
}

.card.card-link > p,
a.card > p{
  font-size:14px;
  color:var(--muted);
  line-height:1.62;
  display:-webkit-box;
  -webkit-line-clamp:3;
  -webkit-box-orient:vertical;
  overflow:hidden;
  flex:1;
}

.card > a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:auto;
  padding-top:2px;
  color:var(--accent);
  font-size:14px;
  font-weight:600;
  transition:gap var(--transition);
}
.card > a::after{content:"\2192"}
.card > a:hover{gap:8px}

.card-action{
  display:inline-flex;
  align-items:center;
  gap:6px;
  margin-top:auto;
  padding-top:12px;
  color:var(--accent);
  font-size:14px;
  font-weight:600;
}

.card .eyebrow{
  display:inline-block;
  margin-bottom:0;
  font-size:11.5px;
  font-weight:650;
  letter-spacing:0;
  text-transform:none;
  color:var(--accent);
}

.card-flat{
  background:var(--card);
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  padding:14px 16px;
  box-shadow:var(--shadow);
}

.page-header-shell{
  display:grid;
  gap:16px;
}

.page-header-shell--compact{
  gap:12px;
}

.page-header-shell--hero-spacious{
  gap:14px;
}

.page-header-shell--tight{
  gap:10px;
}

.page-header-shell--compact-title-lg .page-header-shell__title{
  font-size:clamp(28px,3vw,38px);
  line-height:1.08;
}

.page-header-shell--compact-title-md .page-header-shell__title{
  font-size:clamp(26px,2.7vw,34px);
  line-height:1.1;
}

.page-header-shell__eyebrow{
  display:inline-flex;
  align-items:center;
  gap:8px;
  width:max-content;
  max-width:100%;
  padding:5px 10px;
  border-radius:999px;
  border:1px solid var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:0;
  text-transform:none;
}

.page-header-shell__title{
  font-size:clamp(28px,4vw,42px);
  line-height:1.06;
  font-weight:800;
  letter-spacing:0;
  color:var(--text);
}

.page-header-shell__subtitle{
  max-width:820px;
  color:var(--muted);
  font-size:15px;
  line-height:1.7;
}

.page-header-shell--compact .page-header-shell__subtitle{
  max-width:78ch;
  font-size:14px;
  line-height:1.58;
}

.surface-link-card{
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-soft);
  text-decoration:none;
  transition:border-color var(--transition),background var(--transition),transform var(--transition);
}

.surface-link-card:hover{
  border-color:var(--accent);
  background:var(--accent-bg);
}

.surface-note{
  padding:10px 12px;
  border-radius:12px;
  background:var(--surface-soft);
  color:var(--muted);
}

.page-header-shell__meta{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

.page-header-shell__meta--stack-mobile{
  width:100%;
}

.page-header-shell__meta--rail-mobile{
  width:100%;
}

.page-header-shell--compact .page-header-shell__meta{
  gap:6px;
}

.page-header-shell__meta-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:30px;
  padding:6px 12px;
  border-radius:999px;
  border:1px solid var(--pill-border);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:1.2;
}

.page-header-shell--compact .page-header-shell__meta-item{
  min-height:24px;
  padding:4px 9px;
  font-size:11px;
}

.mini-metric-strip{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:12px;
}

.mini-metric-card{
  display:grid;
  gap:6px;
  min-height:112px;
  padding:16px 18px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--card);
  box-shadow:var(--shadow);
}

.mini-metric-card__label{
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:1.3;
}

.mini-metric-card__value{
  color:var(--text);
  font-size:26px;
  font-weight:800;
  line-height:1;
  letter-spacing:0;
}

.mini-metric-card__subtext{
  color:var(--muted);
  font-size:12.5px;
  line-height:1.45;
}

.pill-tabs-shell{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
}

.pill-tabs-shell a,
.pill-tabs-shell button{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:4px;
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  border:1px solid var(--pill-border);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:11.5px;
  font-weight:500;
  line-height:1.15;
  white-space:nowrap;
  text-decoration:none;
  transition:all var(--transition);
}

.pill-tabs-shell a:hover,
.pill-tabs-shell a.active,
.pill-tabs-shell button:hover,
.pill-tabs-shell button.active{
  color:var(--accent);
  border-color:var(--accent);
  background:var(--pill-hover-bg);
  font-weight:600;
}

.avds-filter-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

.avds-filter-chip-row[data-density="compact"]{
  gap:6px;
}

.avds-filter-chip-row--mobile-scroll{
  width:100%;
}

.avds-filter-chip{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:30px;
  padding:5px 11px;
  border-radius:999px;
  border:1px solid var(--pill-border);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  white-space:nowrap;
  text-decoration:none;
  box-shadow:0 1px 2px rgba(23,32,51,.03);
  transition:background-color var(--transition),border-color var(--transition),color var(--transition),box-shadow var(--transition);
}

.avds-filter-chip:hover,
.avds-filter-chip.active,
.avds-filter-chip[aria-pressed="true"],
.avds-filter-chip[aria-current="true"]{
  color:var(--accent);
  border-color:var(--accent-border);
  background:var(--pill-hover-bg);
  box-shadow:0 2px 6px rgba(23,32,51,.05);
}

.avds-filter-chip--alpha{
  min-width:32px;
  width:32px;
  padding-inline:0;
}

.avds-filter-chip__count{
  font-size:11px;
  color:var(--muted);
}

.avds-filter-chip__badge{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:16px;
  padding:1px 6px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:9px;
  font-weight:700;
  line-height:1;
}

@media (max-width:767px){
  .avds-filter-chip-row--mobile-scroll{
    flex-wrap:nowrap;
    gap:5px;
    padding-bottom:2px;
    overflow-x:auto;
    scrollbar-width:none;
  }

  .avds-filter-chip-row--mobile-scroll::-webkit-scrollbar{display:none}
}

/* Accessibility contrast pass – keep semantic accents legible on every
   light/editorial surface without changing the dark theme palette. */
:root:not([data-theme="dark"]),
[data-theme="light"]{
  --accent-secondary:#0a6d6f;
  --accent-warm:#8a5a12;
  --warn:#8a5a12;
}

html[data-theme="light"] .overview-tile span,
html[data-theme="light"] .basics-card__content{color:#5c6775}
html[data-theme="light"] .item-page[data-kind="fulltext"] .side-card .toc-title,
html[data-theme="light"] .item-page[data-kind="constitution-1995"] .side-card .toc-title{color:#5b6674}

.accent-panel{
  border:1px solid var(--accent-border);
  background:linear-gradient(180deg,var(--accent-bg),transparent 100%);
}

.provenance-panel{
  display:grid;
  gap:16px;
  padding:20px 22px;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  box-shadow:var(--shadow);
}

.provenance-panel__header{
  display:grid;
  gap:6px;
}

.provenance-panel__title{
  font-size:18px;
  line-height:1.25;
  font-weight:700;
  color:var(--text);
}

.provenance-panel__summary{
  color:var(--muted);
  font-size:14px;
  line-height:1.65;
}

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

.provenance-panel__item{
  display:grid;
  gap:6px;
  padding:14px 15px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--surface-soft);
}

.provenance-panel__label{
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  line-height:1.2;
  letter-spacing:0;
  text-transform:none;
}

.provenance-panel__text{
  color:var(--text);
  font-size:13.5px;
  line-height:1.58;
}

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

.provenance-panel__links a{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:30px;
  padding:6px 12px;
  border:1px solid var(--pill-border);
  border-radius:999px;
  background:var(--pill-bg);
  color:var(--accent);
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  text-decoration:none;
}

.provenance-panel__links a:hover{
  border-color:var(--accent);
  background:var(--pill-hover-bg);
}

.quick-links-rail{
  display:flex;
  align-items:center;
  gap:8px;
  max-width:100%;
  overflow-x:auto;
  padding:2px 0 4px;
  scrollbar-width:thin;
  -webkit-overflow-scrolling:touch;
}

.quick-links-rail--wrap{
  flex-wrap:wrap;
  overflow:visible;
  padding-bottom:0;
}

.quick-links-rail--compact{
  gap:6px;
}

.quick-links-rail--mobile-scroll{
  width:100%;
}

.content-rail--mobile-scroll{
  width:100%;
}

.scroll-inline-rail{
  min-width:0;
  overflow-x:auto;
  scrollbar-width:none;
  -webkit-overflow-scrolling:touch;
}

.scroll-inline-rail::-webkit-scrollbar{display:none}

.pill-link-inline{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  border:1px solid var(--pill-border);
  border-radius:999px;
  background:var(--pill-bg);
  color:var(--muted);
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  flex-shrink:0;
  transition:color var(--transition),border-color var(--transition),background var(--transition),transform var(--transition);
}

.pill-link-inline:hover,
.pill-link-inline[aria-current="page"],
.pill-link-inline.is-active{
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
}

.mini-pill-link{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 7px;
  border:1px solid var(--pill-border);
  border-radius:999px;
  background:var(--pill-bg);
  color:var(--accent);
  font-size:10.5px;
  font-weight:700;
  line-height:1.2;
  text-decoration:none;
  transition:color var(--transition),border-color var(--transition),background var(--transition);
}

.mini-pill-link:hover{
  border-color:var(--accent-border);
  background:var(--accent-bg);
}

.quick-links-rail__link{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:30px;
  max-width:100%;
  padding:6px 11px;
  border:1px solid var(--pill-border);
  border-radius:999px;
  background:var(--pill-bg);
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
  transition:color var(--transition),border-color var(--transition),background var(--transition),transform var(--transition);
}

.quick-links-rail--compact .quick-links-rail__link{
  min-height:28px;
  padding:5px 8px;
  font-size:11px;
}

.quick-links-rail__link:hover,
.quick-links-rail__link[aria-current="page"]{
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
}

@media (hover:hover){
  .quick-links-rail__link:hover{
    transform:translateY(-1px);
  }
}

.quick-links-rail__meta{
  display:inline-flex;
  align-items:center;
  min-height:18px;
  padding:2px 6px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--surface-soft);
  color:var(--muted);
  font-size:10.5px;
  font-weight:700;
  line-height:1.1;
}

.quick-links-rail--compact .quick-links-rail__meta{
  font-size:10px;
}

@media (max-width:767px){
  .quick-links-rail--compact{
    gap:5px;
  }

  .quick-links-rail--compact .quick-links-rail__link{
    min-height:26px;
    padding:4px 8px;
    font-size:11px;
  }

  .quick-links-rail--compact .quick-links-rail__meta{
    display:none;
  }

  .quick-links-rail--mobile-scroll{
    gap:5px;
    flex-wrap:nowrap;
    overflow-x:auto;
    padding-bottom:2px;
    scrollbar-width:none;
  }

  .quick-links-rail--mobile-scroll::-webkit-scrollbar{display:none}

  .quick-links-rail--mobile-scroll .quick-links-rail__link{
    flex:0 0 auto;
    min-height:27px;
    padding:4px 8px;
    font-size:10.5px;
  }

  .content-rail--mobile-scroll{
    flex-wrap:nowrap;
    gap:5px;
    padding-bottom:2px;
    overflow-x:auto;
    scrollbar-width:none;
  }

  .content-rail--mobile-scroll::-webkit-scrollbar{display:none}
}

.source-policy-badges{
  display:flex;
  flex-wrap:wrap;
  gap:7px;
}

.source-policy-badge{
  --policy-accent:var(--accent);
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-height:25px;
  padding:4px 9px;
  border:1px solid color-mix(in srgb,var(--policy-accent) 22%,var(--line));
  border-radius:999px;
  background:color-mix(in srgb,var(--policy-accent) 8%,var(--card));
  color:var(--text);
  font-size:11.5px;
  font-weight:650;
  line-height:1.15;
}

.source-policy-badge::before{
  content:"";
  width:6px;
  height:6px;
  border-radius:999px;
  background:var(--policy-accent);
  flex:0 0 auto;
}

.source-policy-badge--yes{--policy-accent:var(--success)}
.source-policy-badge--attribution{--policy-accent:var(--accent)}

.corrections-log{display:grid;gap:12px;margin:12px 0 24px}
.correction-entry{padding:16px 0;border-top:1px solid var(--line)}
.correction-entry time{display:block;margin-bottom:5px;color:var(--accent);font-size:12px;font-weight:700}
.correction-entry h3{margin:0 0 7px;font-size:17px;line-height:1.3}
.correction-entry p{margin:0 0 11px;max-width:82ch}
.source-policy-badge--review{--policy-accent:var(--warn)}

.methodology-provenance{
  margin:22px 0 4px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.methodology-provenance > summary{
  display:flex;
  align-items:center;
  gap:12px;
  min-height:48px;
  cursor:pointer;
  list-style:none;
  color:var(--text);
  font-size:14px;
  font-weight:750;
}
.methodology-provenance > summary::-webkit-details-marker{display:none}
.methodology-provenance > summary::after{
  content:"+";
  display:grid;
  place-items:center;
  width:22px;
  height:22px;
  margin-left:auto;
  border:1px solid var(--line);
  border-radius:50%;
  color:var(--accent);
  font-size:16px;
  font-weight:500;
  line-height:1;
}
.methodology-provenance[open] > summary::after{content:"−"}
.methodology-provenance > summary small{
  color:var(--muted);
  font-size:11px;
  font-weight:600;
}
.methodology-provenance__body{padding:0 0 12px}
.methodology-provenance table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
  font-size:12.5px;
  line-height:1.45;
}
.methodology-provenance th,
.methodology-provenance td{
  padding:9px 12px 9px 0;
  border-top:1px solid var(--line);
  text-align:left;
  vertical-align:top;
}
.methodology-provenance thead th{
  color:var(--muted);
  font-size:10px;
  font-weight:750;
  letter-spacing:0;
  text-transform:none;
}
.methodology-provenance tbody th{width:31%;font-weight:700}
.methodology-provenance td{padding-right:0;color:var(--muted)}
.methodology-provenance a{color:var(--text);text-decoration-color:var(--accent-border)}
.methodology-provenance a:hover{color:var(--accent)}

@media (max-width:640px){
  .methodology-provenance{margin-top:18px}
  .methodology-provenance > summary{min-height:44px;gap:8px;font-size:13px}
  .methodology-provenance > summary small{font-size:10px}
  .methodology-provenance table{font-size:11.5px}
  .methodology-provenance th,
  .methodology-provenance td{padding:8px 8px 8px 0}
  .methodology-provenance tbody th{width:37%}
}

.myths-card{
  border-left:4px solid var(--warn);
  background:linear-gradient(135deg,var(--warn-bg),var(--card) 46%);
}

.pill{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:26px;
  padding:4px 9px;
  border:1px solid var(--pill-border);
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:var(--pill-line-height);
}

@media (max-width:960px){
  .mini-metric-strip{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }

  .provenance-panel__grid{
    grid-template-columns:1fr;
  }
}

@media (max-width:640px){
  .page-header-shell__title{
    font-size:clamp(24px,8vw,32px);
  }

  .mini-metric-strip{
    grid-template-columns:1fr;
  }

  .mini-metric-card{
    min-height:auto;
  }

  .page-header-shell__meta{
    gap:8px;
  }
}
.pill-accent{
  color:var(--accent);
  background:var(--accent-bg);
  border-color:var(--accent-border);
  font-weight:700;
}
.pill-sm{
  min-height:24px;
  padding:3px 8px;
  font-size:11px;
}
.pill-button{
  cursor:pointer;
  transition:all var(--transition);
}
.pill-button:hover,
.pill-button.active{
  color:var(--accent);
  border-color:var(--accent-border);
  background:var(--pill-hover-bg);
}
.pill .dot{
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--accent);
}
