/* Topbar */
.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  padding:12px 0;
  margin-bottom:14px;
  background:var(--bg);
  border:0;
  border-bottom:1px solid var(--line);
  border-radius:0;
  box-shadow:none;
  position:sticky;
  top:0;
  z-index:100;
}

.brand{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:-webkit-max-content;min-width:max-content;
  font-size:15px;
  font-weight:600;
  line-height:1.25;
}

.brand-mark{
  display:block;
  width:28px;
  height:28px;
  border-radius:6px;
  object-fit:contain;
  flex-shrink:0;
}

.brand .logo{
  width:30px;
  height:30px;
  border-radius:8px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:var(--accent-bg);
  font-size:16px;
  flex-shrink:0;
}

.brand .bname{
  font-weight:600;
  font-size:15px;
  line-height:1.2;
}

.brand .btag{
  font-size:10.5px;
  color:var(--muted);
  line-height:1.2;
}

.nav{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  flex:1;
  min-width:0;
  overflow:visible;
  scrollbar-width:none;
}
.nav::-webkit-scrollbar{display:none}

.nav-chat-action{
  display:none;
}

.nav a,
.nav-dropdown__toggle,
.nav-chat-action{
  min-height:28px;
  padding:5px 10px;
  border-radius:4px;
  border-bottom:2px solid transparent;
  color:var(--muted);
  font-size:13px;
  font-weight:500;
  line-height:var(--pill-line-height);
  white-space:nowrap;
  transition:all var(--transition);
}
.nav a:hover,
.nav-dropdown__toggle:hover,
.nav-chat-action:hover{
  color:var(--text);
  background:var(--pill-hover-bg);
}
.nav a.active,
.nav-dropdown__toggle.active{
  background:transparent;
  border-bottom-color:var(--accent);
  color:var(--accent);
  font-weight:600;
  box-shadow:none;
}

.nav-dropdown{
  position:relative;
  display:inline-flex;
  flex-shrink:0;
}
.nav-dropdown__toggle{
  display:inline-flex;
  align-items:center;
  gap:6px;
  border:0;
  background:transparent;
  cursor:pointer;
  font-family:inherit;
  line-height:1.2;
}
.nav-chat-action{
  appearance:none;
  -webkit-appearance:none;
  display:none;
  align-items:center;
  gap:6px;
  justify-content:center;
  border:1px solid var(--line);
  background:var(--card);
  padding:5px 10px;
  margin:0;
  cursor:pointer;
  font-family:inherit;
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  flex-shrink:0;
  color:var(--muted);
  white-space:nowrap;
}
.nav-chat-action svg{
  display:block;
  width:15px!important;
  height:15px!important;
  max-width:15px!important;
  max-height:15px!important;
  flex:0 0 15px;
  overflow:visible;
}
.nav-chat-action:focus-visible{
  outline:2px solid color-mix(in srgb,var(--accent) 34%,transparent);
  outline-offset:2px;
}
.nav-dropdown__chevron{
  font-size:11px;
  line-height:1;
  transition:transform var(--transition);
}
.nav-dropdown--open .nav-dropdown__chevron{
  transform:rotate(180deg);
}
.nav-dropdown__menu{
  position:absolute;
  top:calc(100% + 8px);
  left:0;
  z-index:120;
  display:none;
  min-width:220px;
  padding:6px;
  border:1px solid var(--line);
  border-radius:14px;
  background:var(--card);
  box-shadow:0 18px 42px rgba(15,23,42,.16);
}
.nav-dropdown--open .nav-dropdown__menu{
  display:flex;
  flex-direction:column;
  gap:2px;
}
.nav-dropdown__menu a{
  width:100%;
  justify-content:flex-start;
  min-height:32px;
  padding:6px 10px;
  border-radius:8px;
  font-size:13px;
  line-height:1.25;
  box-shadow:none;
}
.nav-dropdown__item--featured{
  font-weight:600;
}
.nav-item-icon{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  margin-right:8px;
}
.badge-current{
  display:inline-flex;
  align-items:center;
  background:var(--color-primary,#2563eb);
  color:#fff;
  min-height:14px;
  font-size:9px;
  font-weight:700;
  padding:1px 5px;
  border-radius:999px;
  margin-left:.4em;
  vertical-align:middle;
  text-transform:none;
  letter-spacing:0;
  line-height:1;
}
.badge-current::before{content:attr(aria-label)}
[data-theme="dark"] .badge-current{background:var(--color-primary-hover,var(--accent-strong,#1d4ed8))}
.nav-dropdown__menu a.active{
  background:var(--accent-bg);
  color:var(--accent);
  font-weight:700;
  box-shadow:none;
}
.nav-dropdown__group{
  display:grid;
  gap:2px;
  padding:6px 0 4px;
  border-top:1px solid var(--line);
  border-bottom:1px solid var(--line);
}
.nav-dropdown__group-label{
  padding:4px 12px 2px;
  color:var(--muted);
  font-size:11px;
  font-weight:800;
  letter-spacing:0;
  text-transform:none;
}

.lang-switch{
  display:flex;
  gap:2px;
  padding:3px;
  border:1px solid var(--pill-border);
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
  flex-shrink:0;
}
.lang-switch a{
  min-height:26px;
  padding:4px 8px;
  border-radius:var(--pill-radius);
  color:var(--muted);
  font-size:12px;
  font-weight:600;
  line-height:var(--pill-line-height);
  transition:all var(--transition);
  letter-spacing:.01em;
}
.lang-switch a:hover{color:var(--text)}
.lang-switch a.active{
  color:#fff;
  background:var(--accent);
  box-shadow:0 8px 18px rgba(37,99,235,.22);
}

.theme-toggle{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--card);
  color:var(--text);
  font-size:15px;
  cursor:pointer;
  transition:background var(--transition),border-color var(--transition),color var(--transition),transform var(--transition);
}
.theme-toggle:hover{
  border-color:var(--accent);
  color:var(--accent);
  transform:translateY(-1px);
}
.header-saved{
  position:relative;
  flex:0 0 34px;
  display:inline-flex;
  width:34px;
  height:34px;
  padding:0;
  align-items:center;
  justify-content:center;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--card);
  color:var(--muted);
  cursor:pointer;
  transition:background var(--transition),border-color var(--transition),color var(--transition),transform var(--transition);
}
.header-saved:hover{
  border-color:var(--accent);
  color:var(--accent);
  transform:translateY(-1px);
}
.header-saved svg{width:17px;height:17px}
.header-saved__count{
  position:absolute;
  top:-4px;
  right:-4px;
  display:grid;
  min-width:17px;
  height:17px;
  padding:0 4px;
  place-items:center;
  border:2px solid var(--card);
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:9px;
  font-weight:800;
  line-height:1;
}
.header-saved__count[hidden]{display:none}

/* Compact topbar on scroll – all viewports */
.topbar{
  transition:padding .25s ease, gap .25s ease;
  will-change:padding, gap;
}
.topbar.topbar-compact{
  padding:5px 10px;
  gap:8px;
}
.topbar-compact .brand{
  gap:8px;
}
.topbar-compact .brand-mark{
  width:24px;
  height:24px;
}
.topbar-compact #brandText{
  display:inline-block;
  max-width:148px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.topbar-compact .nav a,
.topbar-compact .nav-dropdown__toggle{
  padding:4px 7px;
  font-size:11.5px;
}
.topbar-compact .nav{
  gap:3px;
}
.topbar-compact .lang-switch{
  width:42px;
  gap:0;
  padding:2px;
  justify-content:center;
}
.topbar-compact .lang-switch a:not(.active){
  display:none;
}
.topbar-compact .lang-switch a.active{
  padding:3px 7px;
  min-height:22px;
}
.topbar-compact .lang-switch.lang-open a:not(.active){
  display:inline-flex;
}
.topbar-compact .lang-switch.lang-open{
  width:auto;
  gap:1px;
  justify-content:flex-start;
}
.topbar-compact .header-saved{
  flex-basis:28px;
  width:28px;
  height:28px;
}

/* Alternative nav systems */
.seg{
  display:flex;
  gap:2px;
  padding:2px;
  border:1px solid var(--pill-border);
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
}
.seg button{
  min-width:34px;
  min-height:26px;
  padding:0 8px;
  border-radius:var(--pill-radius);
  border:none;
  background:none;
  color:var(--muted);
  font-size:11.5px;
  font-weight:600;
  line-height:var(--pill-line-height);
  cursor:pointer;
  transition:all var(--transition);
}
.seg button:hover{color:var(--text)}
.seg button.active{
  color:#fff;
  background:var(--text);
  box-shadow:0 1px 3px rgba(0,0,0,.15);
}





/* Hero */
.hero{
  background:linear-gradient(180deg,var(--surface-soft) 0%,var(--surface-muted) 100%);
  border:1px solid var(--line);
  border-radius:12px;
  padding:34px 34px;
  margin-bottom:18px;
  box-shadow:var(--shadow);
  position:relative;
  overflow:hidden;
}
/* hero-sun removed -- too subtle on light background */
.hero.card{border:1px solid #e3eaf6;box-shadow:var(--shadow)}

/* All .hero blocks: flat/compact on desktop, card on mobile */
@media (min-width:768px){
  .hero:not(.item-hero){
    background:linear-gradient(180deg,rgba(255,255,255,.42) 0%,rgba(255,255,255,0) 100%);
    border:1px solid rgba(219,229,241,.8);
    box-shadow:none;
    padding:20px 22px;
    border-radius:12px;
    margin-bottom:10px;
  }
  .hero:not(.item-hero) h1{
    font-size:25px;
    margin-bottom:6px;
  }
  .hero:not(.item-hero) .lead{
    font-size:15px;
    max-width:70ch;
  }
  .hero:not(.item-hero) .search-form{
    max-width:none;
  }
}

.item-hero{
  grid-area:hero;
  width:100%;
  max-width:none;
  min-height:auto;
}

.hero h1{
  font-size:26px;
  font-weight:500;
  letter-spacing:-.3px;
  margin-bottom:8px;
  line-height:1.2;
}

.item-hero h1{
  font-size:26px;
  font-weight:600;
  letter-spacing:-.3px;
  margin-bottom:8px;
  line-height:1.22;
}

.hero p{
  font-size:15px;
  color:var(--muted);
  line-height:1.6;
}

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

.hero .lead,
.item-hero .lead{
  margin-bottom:0;
  color:var(--muted);
}

.hero .lead{max-width:62ch}
.item-hero .lead{max-width:none}
.implementation-strip{
  display:grid;
  gap:5px;
  margin-top:14px;
  padding:11px 13px;
  border-left:3px solid var(--accent);
  border-radius:0 var(--radius-sm,10px) var(--radius-sm,10px) 0;
  background:var(--surface-soft);
}
.implementation-strip__head{display:flex;align-items:center;gap:6px 8px;flex-wrap:wrap}
.implementation-strip h2{margin:0;font-size:13px;line-height:1.3}
.implementation-strip p{margin:0;font-size:12.5px;line-height:1.48;color:var(--muted)}
.implementation-strip__state,.implementation-strip__date{
  display:inline-flex;align-items:center;min-height:22px;padding:3px 7px;border:1px solid var(--line);border-radius:999px;background:var(--card);font-size:10px;font-weight:750;line-height:1.15
}
.implementation-strip__state[data-state="in_force"],.implementation-strip__state[data-state="partially_in_force"]{color:var(--success);border-color:color-mix(in srgb,var(--success) 28%,var(--line))}
.implementation-strip__state[data-state="scheduled"],.implementation-strip__state[data-state="in_progress"]{color:var(--accent);border-color:var(--accent-border)}
.implementation-strip__next strong{color:var(--text)}
.implementation-strip__verified{font-size:10px;line-height:1.3;color:var(--muted)}
.tl-source{display:inline-flex;margin-top:6px;color:var(--accent);font-size:11px;font-weight:700;text-decoration:none}
.tl-source:hover{text-decoration:underline}

.policy-page{
  display:grid;
  gap:16px;
}
.policy-hero{padding:28px 32px 24px}
.policy-hero .page-header-shell__subtitle{max-width:68ch}

/* Editorial policy routes share the same wide composition as the public
   project page: compact principles first, expandable evidence afterwards. */
.policy-principles{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
}
.policy-principle{min-width:0;padding:19px 22px 19px 0}
.policy-principle + .policy-principle{
  padding-left:22px;
  border-left:1px solid var(--line);
}
.policy-principle h2{
  margin:0 0 7px;
  color:var(--text);
  font-size:16px;
  line-height:1.32;
}
.policy-principle p{
  max-width:46ch;
  margin:0;
  color:var(--muted);
  font-size:13px;
  line-height:1.62;
}
.policy-log.card{
  padding:22px 24px;
  border-radius:12px;
}
.policy-log > h2{
  margin:0;
  color:var(--text);
  font-size:18px;
  line-height:1.3;
}
.policy-log .corrections-log{margin:12px 0 0}
.policy-detail-surface.card{
  padding:0 24px;
  border:0;
  border-radius:0;
  background:transparent;
}
.policy-detail-surface .methodology-provenance{margin:0}
.policy-detail-surface > h2{
  margin:20px 0 0;
  color:var(--text);
  font-size:16px;
  line-height:1.3;
}
.policy-sources{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:0 22px;
  margin:12px 0 18px;
  padding:0;
  list-style:none;
}
.policy-sources li{
  min-width:0;
  padding:9px 0;
  border-top:1px solid var(--line);
  color:var(--muted);
  font-size:13px;
  line-height:1.45;
}
.policy-sources a{color:var(--text);font-weight:700;text-decoration:none}
.policy-sources a:hover{color:var(--accent);text-decoration:underline;text-underline-offset:3px}
.policy-related-surface{margin:0 0 8px}

@media (max-width:1024px){
  .policy-principles{grid-template-columns:repeat(2,minmax(0,1fr))}
  .policy-principle:nth-child(3){grid-column:1 / -1;padding-left:0;border-top:1px solid var(--line);border-left:0}
}

.about-service-disclosure{
  margin-top:12px;
  border-top:1px solid var(--line);
  padding-top:10px;
}

.about-service-disclosure summary{
  color:var(--muted);
  cursor:pointer;
  font-size:12px;
  font-weight:750;
  list-style:none;
}

.about-service-disclosure summary::-webkit-details-marker{display:none}
.about-service-disclosure summary::before{content:'+';display:inline-block;width:16px;color:var(--accent);font-size:16px;line-height:1;vertical-align:-1px}
.about-service-disclosure[open] summary::before{content:'–'}

.about-service-disclosure__links{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:9px;
}

.error-page{
  display:flex;
  align-items:flex-start;
  justify-content:center;
  padding:48px 20px 56px;
  min-height:calc(100vh - 220px);
}

.error-panel{
  width:min(100%,560px);
  text-align:center;
  padding:36px 28px 32px;
  background:linear-gradient(180deg,var(--surface-soft) 0%,var(--card) 100%);
}

.error-code{
  font-size:72px;
  font-weight:800;
  color:var(--accent);
  margin-bottom:8px;
  line-height:1;
}

.error-title{
  font-size:18px;
  font-weight:600;
  margin-bottom:8px;
}

.error-msg{
  color:var(--muted);
  margin-bottom:24px;
  line-height:1.65;
}

.error-actions{
  display:flex;
  gap:10px;
  justify-content:center;
  flex-wrap:wrap;
}

.hero-actions{
  margin-top:16px;
  display:flex;
  gap:10px;
  flex-wrap:wrap;
}

.hero-actions--compact{
  min-width:0;
  max-width:100%;
  gap:8px;
}

.hero-home{
  margin-bottom:14px;
}

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

.hero-home .page-header-shell__subtitle{
  max-width:760px;
}

.hero-role-entry{
  display:grid;
  gap:7px;
  margin-top:1px;
}

.hero-role-entry__label{
  color:var(--muted);
  font-size:10px;
  font-weight:800;
  letter-spacing:0;
  line-height:1.25;
  text-transform:none;
}

.hero-role-entry__links{
  display:flex;
  flex-wrap:wrap;
  gap:0;
}

.hero-role-entry__link{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:1px 10px;
  border:0;
  border-left:1px solid var(--line);
  border-radius:0;
  background:transparent;
  color:var(--accent);
  font-size:11px;
  font-weight:750;
  line-height:1.2;
  text-decoration:underline;
  text-decoration-color:transparent;
  text-underline-offset:3px;
  transition:color var(--transition),text-decoration-color var(--transition);
}

.hero-role-entry__link:first-child{padding-left:0;border-left:0}

.hero-role-entry__link:hover,
.hero-role-entry__link:focus-visible{
  color:var(--accent-strong);
  text-decoration-color:currentColor;
}

.hero-actions .btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:44px;
  padding:10px 18px;
  border-radius:10px;
  border:1px solid var(--line-strong);
  background:var(--card);
  color:var(--accent);
  font-size:14px;
  font-weight:700;
  transition:all var(--transition);
}

.hero-actions--compact .btn{
  max-width:100%;
  min-height:30px;
  padding:6px 11px;
  font-size:12px;
  white-space:normal;
  text-align:center;
}

.hero-actions .btn:hover{
  background:var(--accent-strong);
  color:#fff;
  border-color:var(--accent-strong);
}

.hero-actions .btn-secondary{
  background:color-mix(in srgb,var(--card) 72%,transparent);
}
.hero-actions .btn-primary{background:var(--accent);color:#fff;border-color:var(--accent)}
.hero-actions .btn-primary:hover{opacity:.96;transform:translateY(-1px);background:var(--accent-strong);border-color:var(--accent-strong);color:#fff}
.hero-actions .btn-outline{background:transparent;color:var(--accent);border-color:var(--accent)}
.hero-actions .btn-outline:hover{background:var(--accent-strong);border-color:var(--accent-strong);color:#fff}

.section-head--status{
  margin-top:14px;
}

.status-banner{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:12px;
  margin:0 0 18px;
}

.status-tile{
  display:flex;
  gap:12px;
  min-width:0;
  padding:16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  box-shadow:var(--shadow);
}

.status-tile--accent{
  border-color:rgba(37,99,235,.22);
  background:linear-gradient(180deg,var(--accent-bg) 0%,var(--card) 100%);
}

.status-tile__icon{
  flex:0 0 34px;
  width:34px;
  height:34px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:10px;
  background:rgba(37,99,235,.1);
  color:var(--accent);
  font-size:18px;
  font-weight:800;
}

.status-tile__body{
  min-width:0;
}

.status-tile__topline{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
}

.status-tile h3{
  margin:1px 0 6px;
  font-size:16px;
  font-weight:800;
  line-height:1.25;
}

.status-tile p{
  margin:0;
  color:var(--muted);
  font-size:13.5px;
  line-height:1.5;
}

.status-badge{
  flex-shrink:0;
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border-radius:999px;
  background:var(--accent);
  color:#fff;
  font-size:12px;
  font-weight:800;
  white-space:nowrap;
}

.status-banner[data-constitution-status]{
  --sb-bg:var(--card);
  --sb-border:var(--line);
  display:flex;
  align-items:center;
  gap:14px;
  margin:0 0 16px;
  padding:16px 18px;
  border:1px solid var(--sb-border);
  border-radius:var(--radius);
  background:var(--sb-bg);
  box-shadow:var(--shadow);
}

.status-banner[data-constitution-status] .status-banner__icon{
  display:grid;
  place-items:center;
  flex:0 0 42px;
  width:42px;
  height:42px;
  border-radius:14px;
  background:var(--accent-bg,#eef2ff);
  color:var(--accent);
  font-size:22px;
  font-weight:800;
}

.status-banner[data-constitution-status] .status-banner__text{
  display:grid;
  gap:3px;
  min-width:0;
  flex:1;
}

.status-banner[data-constitution-status] .status-banner__text strong{
  color:var(--text);
  font-size:16px;
  line-height:1.3;
}

.status-banner[data-constitution-status] .status-banner__text span{
  color:var(--muted);
  font-size:13.5px;
  line-height:1.45;
}

.status-banner[data-constitution-status] .status-banner__cta{
  flex:0 0 auto;
  text-decoration:none;
}

.status-banner--elections[data-constitution-status] .status-banner__icon{
  background:rgba(202,138,4,.14);
  color:#a16207;
}

.status-banner--effective{
  --sb-bg:oklch(0.94 0.06 145 / 0.15);
  --sb-border:oklch(0.48 0.16 145);
  background:oklch(0.94 0.06 145 / 0.15);
  border-color:oklch(0.48 0.16 145);
}

.status-banner--effective[data-constitution-status] .status-banner__icon{
  background:rgba(22,163,74,.12);
  color:#15803d;
}

.status-banner--elections{
  --sb-bg:oklch(0.94 0.04 250 / 0.15);
  --sb-border:oklch(0.48 0.12 250);
  background:oklch(0.94 0.04 250 / 0.15);
  border-color:oklch(0.48 0.12 250);
}

.status-banner--kurultai{
  --sb-bg:oklch(0.93 0.03 200 / 0.15);
  --sb-border:oklch(0.48 0.10 200);
  background:oklch(0.93 0.03 200 / 0.15);
  border-color:oklch(0.48 0.10 200);
}

.status-banner--kurultai[data-constitution-status] .status-banner__icon{
  background:rgba(14,116,144,.12);
  color:#0f766e;
}

.hero .links{
  margin-top:10px;
  display:flex;
  gap:8px;
  flex-wrap:wrap;
}

.hero .links a{
  padding:5px 10px;
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
  border:1px solid var(--pill-border);
  color:var(--accent);
  font-size:12px;
  font-weight:700;
  line-height:var(--pill-line-height);
  transition:all var(--transition);
}

.hero .links a:hover{
  background:var(--accent);
  color:#fff;
}

.section-head{
  display:flex;
  align-items:end;
  justify-content:space-between;
  gap:12px;
  margin:8px 0 12px;
}
.section-head--home{
  gap:24px;
  margin:0;
}
.section-head h2{
  font-size:18px;
  line-height:1.2;
  font-weight:600;
  color:var(--text);
}
.section-head--home h2{
  font-size:20px;
}
.section-head--home p{
  max-width:64ch;
  color:var(--muted);
  font-size:12.5px;
  line-height:1.5;
  text-align:right;
}

/* Filter / sections */
.filter-bar{
  display:flex;
  gap:6px;
  overflow-x:auto;
  -webkit-overflow-scrolling:touch;
  scrollbar-width:none;
  padding:4px 0 8px;
  margin-bottom:12px;
  position:relative;
  z-index:1;
  background:transparent;
}
.filter-bar::-webkit-scrollbar{display:none}
.filter-bar .avds-filter-chip{
  flex-shrink:0;
  font-family:inherit;
  cursor:pointer;
}

.sec-head{
  display:flex;
  justify-content:space-between;
  align-items:baseline;
  gap:6px;
  margin:14px 0 8px;
}
.sec-head h2{
  font-size:15px;
  font-weight:600;
  color:var(--muted);
}
.sec-head .count{
  font-size:11.5px;
  color:var(--muted);
  font-weight:600;
}
.sec-block{margin-bottom:16px}

/* Search / forms */
.search-form{
  display:grid;
  grid-template-columns:minmax(0,1fr) 118px;
  gap:12px;
  margin-bottom:16px;
}
.search-form input,
.g-filter input{
  width:100%;
  padding:14px 16px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--card);
  font-size:15px;
  color:var(--text);
  transition:all var(--transition);
}
.search-form input:focus,
.g-filter input:focus{
  outline:none;
  border-color:var(--accent);
  box-shadow:0 0 0 3px var(--accent-bg);
}
.search-form button{
  width:100%;
  border:none;
  border-radius:12px;
  background:var(--accent);
  color:#fff;
  font-size:15px;
  font-weight:700;
  cursor:pointer;
  transition:all var(--transition);
}
.search-form button:hover{background:#1d4ed8}

.search-results-head{
  display:flex;
  align-items:baseline;
  justify-content:space-between;
  gap:12px;
  margin:18px 0 10px;
}
.search-results-head h2{
  margin:0;
  color:var(--text);
  font-size:18px;
  font-weight:800;
  line-height:1.25;
}
.search-results-head__meta{
  color:var(--muted);
  font-size:12px;
  line-height:1.4;
  white-space:nowrap;
}
@media(max-width:767px){
  .search-results-head{margin:14px 0 8px}
  .search-results-head h2{font-size:16px}
  .search-results-head__meta{font-size:11px}
}

/* Prose / markdown */
.card.prose,
.prose-block{
  padding:22px 24px;
  box-shadow:var(--shadow);
}
.prose-block + .prose-block{
  margin-top:8px;
}

.prose-block{
  padding:16px 18px;
}

.card.prose h2{
  font-size:20px;
  font-weight:600;
  margin-bottom:12px;
  color:var(--text);
}
.card.prose h3{
  font-size:17px;
  font-weight:600;
  margin-bottom:8px;
}
.card.prose p{
  font-size:16px;
  color:var(--text);
  line-height:1.8;
  display:block;
  -webkit-line-clamp:unset;
  margin-bottom:14px;
}
.card.prose ul,
.card.prose ol{
  margin:8px 0 14px 22px;
  font-size:16px;
  line-height:1.7;
}
.card.prose li{margin:4px 0}
.card.prose li::marker{color:var(--accent)}
.card.prose table{
  width:100%;
  border-collapse:collapse;
  font-size:14px;
  margin:12px 0;
}
.card.prose th{
  text-align:left;
  padding:9px 12px;
  font-weight:600;
  border-bottom:2px solid var(--line);
  font-size:13px;
  color:var(--muted);
}
.card.prose td{
  padding:9px 12px;
  border-bottom:1px solid var(--line);
}
.card.prose tr:hover{background:rgba(0,0,0,.015)}

.prose{min-width:0}

.md,
.prose{
  font-size:16px;
  line-height:1.76;
  color:#222;
}
.md p,
.prose p{margin:0 0 12px}
.md ul,.md ol,
.prose ul,.prose ol{margin:8px 0 14px 22px}
.md li,
.prose li{margin:4px 0;line-height:1.66}
.md li::marker,
.prose li::marker{color:#555}
.md a,
.prose a{
  color:var(--accent);
  text-decoration:underline;
  text-underline-offset:2px;
}
.md strong,
.prose strong{font-weight:600;color:#111}
.md blockquote,
.prose blockquote{
  margin:14px 0;
  padding:12px 14px;
  border-left:3px solid var(--accent);
  background:var(--surface-soft);
  border-radius:0 8px 8px 0;
  color:var(--text);
}
.md h2,
.prose h2{
  font-size:19px;
  line-height:1.35;
  font-weight:600;
  color:var(--text);
  margin:30px 0 10px;
}
.md h3,
.prose h3{
  font-size:16px;
  line-height:1.45;
  font-weight:600;
  color:var(--text);
  margin:22px 0 8px;
}
.md table,
.prose table{
  width:100%;
  border-collapse:collapse;
  margin:14px 0 20px;
  background:var(--card);
  border:1px solid var(--line);
}
.md th,.md td,
.prose th,.prose td{
  border:1px solid var(--line);
  padding:9px 11px;
  text-align:left;
  vertical-align:middle;
}
.md th,
.prose th{
  background:var(--surface-soft);
  font-size:13px;
  font-weight:600;
  color:var(--muted);
}
.md td,
.prose td{
  font-size:14px;
  color:var(--text);
}
.md tr:hover,
.prose tr:hover{background:var(--surface-hover)}

.section{padding-top:4px}

/* Status / empty */
.status{
  font-size:13px;
  color:var(--muted);
  min-height:16px;
}
.status.error{color:var(--danger)}

.page-status--degraded{
  border-color:color-mix(in srgb,var(--accent-warm) 42%,var(--line));
  background:color-mix(in srgb,var(--accent-warm) 8%,var(--card));
  color:var(--text);
}

.empty{
  text-align:center;
  padding:32px 18px;
  color:var(--muted);
}
.empty .icon{
  font-size:38px;
  margin-bottom:8px;
}
.empty p{
  font-size:14px;
  line-height:1.65;
}
.empty .suggestions{
  margin-top:12px;
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  justify-content:center;
}

.empty .suggestions button,
.popular .tags button{
  min-height:28px;
  padding:5px 10px;
  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);
  cursor:pointer;
  transition:all var(--transition);
}
.empty .suggestions button:hover,
.popular .tags button:hover{
  background:var(--accent-bg);
  color:var(--accent);
}

.result-count,
.g-count{
  font-size:13px;
  color:var(--muted);
}

.result-group{margin-bottom:14px}
.result-group-title{
  font-size:11.5px;
  color:var(--muted);
  font-weight:600;
  margin-bottom:5px;
}

.popular{margin-top:16px}
.popular h3{
  font-size:18px;
  font-weight:600;
  margin-bottom:10px;
}
.popular .tags{
  display:flex;
  flex-wrap:wrap;
  gap:8px;
}

mark{
  background:rgba(37,99,235,.12);
  color:var(--accent);
  font-weight:700;
  border-radius:2px;
  padding:0 1px;
}

/* Item page */
.item-page{
  margin-top:4px;
}

.item-shell{
  background:transparent;
  border:none;
  box-shadow:none;
}

.item-layout{
  display:grid;
  grid-template-columns:minmax(0,1fr) 280px;
  grid-template-areas:
    "hero aside"
    "main aside";
  gap:12px;
  align-items:start;
  margin-top:8px;
  background:transparent;
  border:none;
  box-shadow:none;
  padding:0;
}

.item-hero{
  grid-area:hero;
  width:100%;
  min-width:0;
  padding:28px 32px 20px;
  border-radius:24px;
  background:linear-gradient(135deg,var(--accent-bg) 0%,var(--surface-soft) 52%,var(--card) 100%);
  border:1px solid var(--line-strong);
  border-left:4px solid var(--accent);
  box-shadow:var(--shadow);
}

.item-hero .eyebrow{
  margin-bottom:12px;
  font-size:13px;
  font-weight:600;
  text-transform:none;
  letter-spacing:0;
  color:var(--accent);
}

.item-hero h1{
  font-size:28px;
  line-height:1.2;
  font-weight:600;
  letter-spacing:-0.3px;
  margin-bottom:10px;
  color:var(--text);
}

.item-hero .lead{
  font-size:17px;
  line-height:1.7;
  color:var(--muted);
  max-width:none;
}

.source-passport{
  display:grid;
  gap:11px;
  margin-top:16px;
  padding:13px 14px 12px;
  border:1px solid var(--line);
  border-radius:12px;
  background:var(--surface-soft,var(--surface-hover,#f8fafc));
}

.source-passport__head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.source-passport__head h2{
  margin:0;
  font-size:13px;
  line-height:1.25;
  font-weight:800;
  letter-spacing:.01em;
}

.source-passport__head p{
  margin:3px 0 0;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.4;
}

.source-passport__status{
  flex:0 0 auto;
  min-height:24px;
  padding:5px 8px;
  border:1px solid color-mix(in srgb,var(--accent) 30%,var(--line));
  border-radius:999px;
  background:var(--card);
  color:var(--accent);
  font-size:10px;
  line-height:1.1;
  font-weight:800;
  white-space:nowrap;
}

.source-passport__status[data-state="review_needed"]{
  border-color:color-mix(in srgb,var(--warn) 38%,var(--line));
  color:var(--warn);
}

.source-passport__status[data-state="editorial_baseline"]{
  border-color:var(--line);
  color:var(--muted);
}

/* Source health is a compact freshness signal, not a second quality score. */
.source-passport__health{
  display:inline-flex;
  align-items:center;
  min-height:22px;
  padding:4px 7px;
  border:1px solid color-mix(in srgb,var(--success) 30%,var(--line));
  border-radius:999px;
  background:var(--card);
  color:var(--success);
  font-size:9.5px;
  line-height:1.1;
  font-weight:800;
  white-space:nowrap;
}

.source-passport__health[data-state="stale"]{
  border-color:color-mix(in srgb,var(--warn) 38%,var(--line));
  color:var(--warn);
}

.source-passport__health[data-state="missing_checked_at"]{
  border-color:var(--line);
  color:var(--muted);
}

.source-passport__facts{
  display:grid;
  grid-template-columns:minmax(170px,1.8fr) repeat(3,minmax(70px,1fr));
  gap:7px;
}

.source-passport__fact{
  display:grid;
  gap:3px;
  min-width:0;
  padding-left:9px;
  border-left:1px solid var(--line);
}

.source-passport__fact:first-child{padding-left:0;border-left:0}

.source-passport__fact span,
.source-passport__downloads>span{
  color:var(--muted);
  font-size:9.5px;
  line-height:1.2;
  font-weight:750;
  letter-spacing:0;
  text-transform:none;
}

.source-passport__fact strong{
  min-width:0;
  overflow-wrap:anywhere;
  color:var(--text);
  font-size:12px;
  line-height:1.25;
  font-weight:800;
}

.source-passport__downloads{
  display:flex;
  align-items:center;
  gap:10px;
  min-width:0;
  padding-top:9px;
  border-top:1px solid var(--line);
}

.source-passport__links{
  display:flex;
  flex-wrap:wrap;
  gap:5px;
  min-width:0;
}

.source-passport__links a{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:4px 8px;
  border:1px solid var(--line);
  border-radius:999px;
  background:var(--card);
  color:var(--accent);
  font-size:10.5px;
  line-height:1.1;
  font-weight:750;
  text-decoration:none;
}

.source-passport__links a:hover,
.source-passport__links a:focus-visible{
  border-color:var(--accent-2);
  background:var(--surface-hover);
}

.source-passport--disclosure{
  display:grid;
  gap:0;
  padding:0;
  overflow:hidden;
}
.source-passport--disclosure > summary{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:42px;
  padding:10px 13px;
  cursor:pointer;
  list-style:none;
}
.source-passport--disclosure > summary::-webkit-details-marker{display:none}
.source-passport--disclosure > summary::after{
  content:"+";
  display:inline-grid;
  place-items:center;
  width:22px;
  height:22px;
  margin-left:0;
  border:1px solid var(--line);
  border-radius:999px;
  color:var(--accent);
  font-size:16px;
  font-weight:500;
  line-height:1;
}
.source-passport--disclosure[open] > summary::after{content:"−"}
.source-passport--disclosure > summary:hover{background:color-mix(in srgb,var(--accent-bg) 56%,transparent)}
.source-passport__summary-title{
  min-width:0;
  color:var(--text);
  font-size:12.5px;
  font-weight:800;
  line-height:1.25;
}
.source-passport--disclosure .source-passport__status{margin-left:auto}
.source-passport--disclosure .source-passport__health{margin-left:0}
.source-passport--disclosure .source-passport__body{
  display:grid;
  gap:11px;
  padding:0 13px 12px;
}
.source-passport__note{
  margin:0;
  color:var(--muted);
  font-size:11.5px;
  line-height:1.4;
}

.item-main,
.item-content{
  grid-area:main;
  min-width:0;
}

.item-main{
  display:flex;
  flex-direction:column;
  gap:18px;
}

.item-aside,
.item-side{
  grid-area:aside;
  width:100%;
  min-width:0;
  position:sticky;
  top:96px;
  align-self:start;
  margin-top:0;
}

.sidebar-sticky{
  position:static;
}

.side-card{
  padding:18px 20px;
  border-radius:12px;
  box-shadow:none;
}

.item-aside .side-card + .side-card,
.item-side .side-card + .side-card{
  margin-top:14px;
}

.toc-title,
.toc-title{
  font-size:13px;
  font-weight:600;
  letter-spacing:0;
  color:#5b6674;
  margin-bottom:10px;
  text-transform:none;
}

.item-main .prose-block,
.item-main .statement-context,
.item-main .feedback-block,
.item-page-footer .card-link,
.item-page-footer a.card{
  box-shadow:none;
}

.item-main .prose-block,
.item-main .statement-context,
.item-main .feedback-block,
.item-page-footer .card-link,
.item-page-footer a.card,
.side-card{
  border-color:var(--line);
}

.item-page-footer{
  margin-top:30px;
  padding-top:18px;
  border-top:1px solid var(--line);
}

.item-page-footer [data-related-card="grid"]{
  margin-top:8px;
}

.item-page-footer .related-grid{
  gap:12px;
}

.item-page-footer .card-link,
.item-page-footer a.card{
  background:var(--surface-soft);
}

[data-related-card="side"]{
  display:none !important;
}

.toc-links{
  display:flex;
  flex-direction:column;
  gap:4px;
}

.toc a,
.toc-links a{
  display:block;
  color:#556070;
  font-size:13.5px;
  line-height:1.45;
  padding:4px 0;
  font-weight:500;
  transition:color var(--transition);
}

.toc a:hover,
.toc a.active,
.toc-links a:hover,
.toc-links a.active{
  color:var(--accent);
}

.toc-empty{
  font-size:13px;
  color:var(--muted);
  line-height:1.5;
}

.item-actions{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px;
  margin-top:2px;
  margin-bottom:0;
}

.item-actions #copyBtn,
.item-actions #copyCitationBtn{
  width:100%;
  justify-content:center;
}
.item-page:not([data-kind="fulltext"]) #copyBtn{display:none}

.prose-block{
  padding:28px 30px;
  border-radius:22px;
}

.prose-block h2{
  font-size:22px;
  line-height:1.26;
  font-weight:600;
  letter-spacing:-0.15px;
  margin:0 0 16px;
}

.prose-block .prose{
  font-size:16px;
  line-height:1.78;
  color:#1f2937;
}

.prose-block .prose p{
  margin:0 0 14px;
}

.prose-block .prose p:last-child{
  margin-bottom:0;
}

.prose-block .prose ul,
.prose-block .prose ol{
  margin:8px 0 16px 22px;
}

.prose-block .prose li{
  margin:5px 0;
  line-height:1.7;
}

.prose-block .prose h2{
  font-size:20px;
  font-weight:600;
  margin:28px 0 12px;
}

.prose-block .prose h2:first-child{
  margin-top:0;
}

.prose-block .prose h3{
  font-size:17px;
  font-weight:600;
  margin:22px 0 8px;
}

.prose-block .prose table{
  width:100%;
  border-collapse:collapse;
  margin:16px 0 18px;
  display:table;
}

.prose-block .prose th,
.prose-block .prose td{
  padding:10px 14px;
  vertical-align:top;
}

.share-bar{
  display:none;
}

/* Sharing is reserved for complete reader pages, full-text articles and an
   intentional text selection — never injected into every navigation card. */
.share-action{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:36px;
  padding:7px 11px;
  white-space:nowrap;
}
.share-action svg{
  width:15px;
  height:15px;
  flex:0 0 15px;
}
.share-action--compact{
  width:29px;
  min-height:28px;
  height:28px;
  padding:4px;
  border-radius:8px;
}
.share-action--compact span{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.article-heading{
  display:flex;
  align-items:center;
  gap:8px;
}
.article-heading>.share-action--compact{margin-left:auto}
.article-heading>.saved-fragment-button{margin-left:0}
.share-selection-action{
  position:fixed;
  z-index:var(--z-dialog);
  right:14px;
  bottom:calc(76px + env(safe-area-inset-bottom));
  box-shadow:0 10px 28px rgba(15,23,42,.18);
}
.share-selection-action[hidden]{display:none}

@media(max-width:767px){
  .share-action{
    min-height:40px;
    padding:8px 12px;
  }
  .share-selection-action{right:10px}
}

@media (max-width:980px){
  .item-layout{
    grid-template-columns:minmax(0,1fr);
    grid-template-areas:
      "hero"
      "aside"
      "main"
      "footer";
    gap:14px;
  }

  .item-page[data-kind="fulltext"] .item-layout{
    grid-template-areas:
      "hero"
      "main"
      "aside"
      "footer";
  }

  .item-aside,
  .item-side{
    position:static;
    top:auto;
  }

  .item-aside{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:12px;
    align-items:start;
  }

  .item-aside .side-card,
  .item-side .side-card{
    margin-top:0 !important;
  }

  .item-page[data-kind="fulltext"] .item-aside{
    grid-template-columns:minmax(0,1fr);
    gap:10px;
  }

  .item-hero h1{
    max-width:none;
  }
}

@media (max-width:767px){
  .item-page{
    margin-top:0;
  }

  .item-layout{
    display:block;
  }

  .item-hero{
    padding:20px 16px 18px;
    margin-bottom:12px;
    border-radius:12px;
    border-left-width:3px;
  }

  .item-hero .eyebrow{
    font-size:11px;
    margin-bottom:8px;
  }

  .item-hero h1{
    max-width:none;
    font-size:20px;
    line-height:1.22;
    letter-spacing:-0.2px;
    margin-bottom:8px;
  }

  .item-hero .lead{
    font-size:14px;
    line-height:1.62;
  }

  .item-aside,
  .item-side{
    display:none;
    position:static;
    margin:0 0 12px;
  }

  .side-card{
    padding:14px 14px;
    border-radius:12px;
  }

  .item-aside .side-card + .side-card,
  .item-side .side-card + .side-card{
    margin-top:10px !important;
  }

  .toc-title{
    font-size:12px;
    margin-bottom:8px;
  }

  .toc a,
  .toc-links a{
    font-size:13px;
    line-height:1.42;
    padding:2px 0;
  }

  .item-actions{
    grid-template-columns:1fr;
    gap:8px;
  }

  .item-actions #copyBtn,
  .item-actions #copyCitationBtn{
    min-height:40px;
    font-size:12.5px;
    border-radius:20px;
    padding:9px 12px;
  }

  .item-main{
    gap:12px;
  }

  .item-page-footer{
    margin-top:24px;
    padding-top:14px;
  }

  .item-page-footer .back-nav{
    flex-wrap:wrap;
    gap:10px;
    margin-bottom:14px;
  }

  .item-page-footer .related-grid{
    gap:10px;
  }

  .prose-block{
    padding:20px 16px;
    border-radius:12px;
  }

  .prose-block h2{
    font-size:17px;
    line-height:1.3;
    margin-bottom:10px;
  }

  .prose-block .prose{
    font-size:15px;
    line-height:1.72;
  }

  .prose-block .prose p{
    margin:0 0 12px;
  }

  .prose-block .prose ul,
  .prose-block .prose ol{
    margin:8px 0 12px 20px;
  }

  .prose-block .prose table{
    display:block;
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    white-space:nowrap;
    width:max-content;
    min-width:560px;
    max-width:none;
    margin:12px -2px 4px;
  }

  .prose-block .prose th,
  .prose-block .prose td{
    padding:9px 10px;
    font-size:13px;
  }
}

/* Local saved-fragment workspace. */
.item-saved-actions{
  display:flex;
  align-items:center;
  gap:6px;
  margin-top:8px;
}
.item-saved-actions .saved-fragment-button,
.item-saved-actions .saved-open-link{min-height:28px;padding:5px 8px;font-size:11px}
.saved-fragment-button.is-saved{
  color:var(--accent);
  border-color:var(--accent-border);
  background:var(--accent-bg);
}
.article-heading{position:relative}
.article-heading>.saved-fragment-button{
  width:28px;
  height:28px;
  margin-left:auto;
  flex:0 0 28px;
}
.article-heading>.saved-fragment-button svg{width:14px;height:14px}
.cmp-card{position:relative}
.cmp-card>.cmp-save-button{
  position:absolute;
  z-index:2;
  top:10px;
  right:44px;
  width:26px;
  height:26px;
}
.cmp-card>.cmp-save-button svg{width:13px;height:13px}
.cmp-card>.cmp-header{padding-right:78px}
.saved-fragments-dialog{
  width:min(720px,calc(100vw - 24px));
  max-height:min(760px,calc(100vh - 32px));
  padding:0;
  border:1px solid var(--line);
  border-radius:var(--radius);
  background:var(--card);
  color:var(--text);
  box-shadow:0 24px 70px rgba(15,23,42,.2);
}
.saved-fragments-dialog::backdrop{background:rgba(15,23,42,.38);backdrop-filter:blur(2px)}
.saved-fragments-shell{display:grid;grid-template-rows:auto minmax(0,1fr) auto;max-height:inherit}
.saved-fragments-header,.saved-fragments-actions{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:8px;
  padding:12px 14px;
}
.saved-fragments-header{border-bottom:1px solid var(--line)}
.saved-fragments-header h2{margin:0;font-size:18px;line-height:1.2}
.saved-fragments-actions{justify-content:flex-start;flex-wrap:wrap;border-top:1px solid var(--line)}
.saved-fragments-export{display:flex;flex:1 1 420px;align-items:end;gap:7px}
.saved-fragments-export label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
.saved-fragments-format{
  min-width:210px;
  min-height:34px;
  padding:6px 32px 6px 9px;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  background:var(--card);
  color:var(--text);
  font:inherit;
  font-size:12px;
}
.saved-fragments-format:focus-visible{outline:2px solid var(--ring);outline-offset:2px}
.saved-fragments-list{min-height:120px;overflow:auto;padding:4px 14px}
.saved-fragment-row{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:12px;
  align-items:start;
  padding:11px 0;
  border-bottom:1px solid var(--line);
}
.saved-fragment-row:last-child{border-bottom:0}
.saved-fragment-row a{display:block;margin:2px 0 3px;color:var(--text);font-weight:700;text-decoration:none}
.saved-fragment-row a:hover{color:var(--accent)}
.saved-fragment-row p{
  display:-webkit-box;
  margin:0;
  overflow:hidden;
  color:var(--muted);
  font-size:12px;
  line-height:1.45;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}
.saved-fragment-type{color:var(--accent);font-size:10px;font-weight:800;text-transform:none;letter-spacing:0}
.saved-fragments-empty{margin:0;padding:24px 0;color:var(--muted);text-align:center}
@media(max-width:767px){
  .item-saved-actions{margin-top:6px}
  .cmp-card>.cmp-header{padding-right:70px}
  .cmp-card>.cmp-save-button{top:8px;right:38px;width:24px;height:24px}
  .saved-fragments-dialog{width:calc(100vw - 16px);max-height:calc(100vh - 24px);border-radius:12px}
  .saved-fragments-header,.saved-fragments-actions{padding:10px}
  .saved-fragments-export{display:grid;grid-template-columns:minmax(0,1fr) auto;flex-basis:100%;gap:6px}
  .saved-fragments-format{min-width:0;width:100%}
  .saved-fragments-list{padding:2px 10px}
  .saved-fragment-row{grid-template-columns:minmax(0,1fr);gap:7px;padding:10px 0}
  .saved-fragment-row>.btn{justify-self:start}
}

@media(max-width:767px){
  .item-page:not([data-kind="fulltext"]) .item-aside{
    display:block;
    margin:0 0 12px;
    overflow:hidden;
  }
  .item-page:not([data-kind="fulltext"]) .item-aside>.side-card:first-child,
  .item-page:not([data-kind="fulltext"]) .item-aside>.side-related{display:none!important}
  .item-page:not([data-kind="fulltext"]) #copyBtn{display:none}
}

/* Glossary */
#glossaryGrid{
  display:flex;
  flex-direction:column;
  gap:8px;
}
.g-card{
  padding:0;
  overflow:hidden;
  border:1px solid var(--line);
  border-radius:var(--radius-sm);
  box-shadow:var(--shadow);
  background:var(--card);
  cursor:pointer;
  transition:all var(--transition);
}
.g-card:hover{
  border-color:var(--accent);
  box-shadow:var(--shadow-hover);
}
.g-card.open{
  border-color:var(--accent);
  box-shadow:var(--shadow-hover);
}

.g-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:10px;
  padding:13px 16px;
  -webkit-appearance:none;
  appearance:none;
  background:none;
  border:none;
  font-family:inherit;
  font-size:inherit;
  color:inherit;
  text-align:left;
  cursor:pointer;
  width:100%;
}
.g-head > span:first-child{
  display:flex;
  flex-direction:column;
  gap:3px;
  min-width:0;
  flex:1;
}
.g-head .g-title{
  font-size:14px;
  font-weight:600;
  color:var(--text);
  line-height:1.35;
}
.g-head .g-preview{
  font-size:13px;
  color:var(--muted);
  font-weight:500;
  line-height:1.5;
  display:-webkit-box;
  -webkit-line-clamp:2;
  -webkit-box-orient:vertical;
  overflow:hidden;
}
.g-card.open .g-preview{display:none}
.g-toggle{
  width:22px;
  height:22px;
  border-radius:50%;
  background:var(--accent-bg);
  display:flex;
  align-items:center;
  justify-content:center;
  flex-shrink:0;
  transition:transform .2s ease;
}
.g-toggle svg{
  width:13px;
  height:13px;
  color:var(--accent);
  transition:transform .2s ease;
}
.g-card.open .g-toggle svg{transform:rotate(180deg)}

.g-body{
  max-height:0;
  overflow:hidden;
  transition:max-height .3s ease;
  background:var(--card);
}
.g-card.open .g-body{
  max-height:700px;
}
.g-body-inner{
  padding:0 16px 16px;
  border-top:1px solid var(--line);
  margin-top:0;
  padding-top:14px;
}
.g-body .g-def{
  font-size:14.5px;
  color:#334155;
  line-height:1.72;
  margin-bottom:10px;
}
.g-body .g-section{margin-bottom:8px}
.g-body .g-section-title{
  font-size:12px;
  color:var(--muted);
  font-weight:600;
  text-transform:none;
  letter-spacing:0;
  margin-bottom:4px;
}
.g-body .g-example{
  padding:10px 14px;
  border-left:3px solid var(--accent);
  border-radius:0 var(--radius-sm) var(--radius-sm) 0;
  background:var(--accent-bg);
  font-size:13.5px;
  color:#475569;
  line-height:1.6;
}
@media (max-width:767px){
  .g-head{padding:12px 14px}
  .g-head .g-title{font-size:13.5px}
  .g-head .g-preview{font-size:12.5px}
  .g-body-inner{padding:0 14px 13px;padding-top:13px}
}
.g-body .g-ref{
  font-size:13px;
  margin-top:3px;
}
.g-body .g-ref a{
  color:var(--accent);
  text-decoration:underline;
}
.g-body .g-related{
  display:flex;
  flex-wrap:wrap;
  gap:6px;
  margin-top:6px;
}
.g-body .g-related a{
  display:inline-flex;
  align-items:center;
  min-height:26px;
  padding:4px 9px;
  border:1px solid var(--pill-border);
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
  font-size:12px;
  font-weight:600;
  line-height:var(--pill-line-height);
  transition:all var(--transition);
}
.g-body .g-related a:hover{
  background:var(--accent-bg);
  color:var(--accent);
}
.g-filter{margin-bottom:12px}

/* Glossary toolbar */
.glossary-toolbar{
  display:flex;
  align-items:center;
  gap:12px;
  margin-bottom:12px;
  flex-wrap:wrap;
}
.glossary-search-wrap{
  position:relative;
  flex:1;
  min-width:200px;
}
.glossary-search-icon{
  position:absolute;
  left:12px;
  top:50%;
  transform:translateY(-50%);
  color:var(--muted);
  pointer-events:none;
}
.glossary-search-input{
  width:100%;
  padding:10px 14px 10px 38px;
  border:1.5px solid var(--line);
  border-radius:var(--radius);
  font-size:15px;
  background:var(--bg);
  color:var(--text);
  transition:border-color .2s;
  outline:none;
  font-family:inherit;
}
.glossary-search-input:focus{
  border-color:var(--accent);
}
.glossary-search-input::placeholder{
  color:var(--muted);
}
.glossary-count{
  font-size:13px;
  color:var(--muted);
  font-weight:600;
  white-space:nowrap;
}

/* Alphabet nav */
.alpha-nav{
  display:flex;
  flex-wrap:wrap;
  gap:4px;
  margin-bottom:14px;
}
.alpha-btn{
  min-width:32px;
  height:32px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border:1.5px solid var(--line);
  border-radius:20px;
  background:var(--card);
  color:var(--muted);
  font-size:13px;
  font-weight:500;
  cursor:pointer;
  transition:all var(--transition);
  font-family:inherit;
  padding:0 8px;
}
.alpha-btn:hover{
  border-color:var(--accent);
  color:var(--accent);
  background:var(--accent-bg);
}
.alpha-btn.active{
  border-color:var(--accent);
  color:var(--accent);
  background:var(--accent-bg);
  font-weight:600;
}

/* Timeline */
.progress-bar{
  display:grid;
  grid-template-columns:repeat(8,minmax(0,1fr));
  gap:6px;
  margin:10px 0 20px;
}
.progress-bar .step{
  height:8px;
  border-radius:20px;
  background:var(--line);
}
.progress-bar .step.done{background:var(--accent)}
.progress-bar .step.current{
  background:linear-gradient(90deg,var(--warn),#fbbf24);
}

.legend{
  display:flex;
  flex-wrap:wrap;
  gap:14px;
  margin:6px 0 6px;
  color:var(--muted);
  font-size:13px;
  font-weight:600;
}
.legend span{
  display:flex;
  align-items:center;
  gap:6px;
}
.legend .dot-leg{
  width:9px;
  height:9px;
  border-radius:50%;
  display:inline-block;
}

.tl-item{
  position:relative;
  padding-left:42px;
  padding-bottom:22px;
  border-left:2px solid var(--line);
  margin-left:16px;
  cursor:pointer;
  transition:all var(--transition);
}
.tl-item:last-child{
  border-left-color:transparent;
  padding-bottom:0;
}
.tl-item .tl-num{
  position:absolute;
  left:-16px;
  top:0;
  width:30px;
  height:30px;
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  display:flex;
  align-items:center;
  justify-content:center;
  font-size:13px;
  font-weight:700;
  box-shadow:0 3px 10px rgba(37,99,235,.18);
}
.tl-item:hover .tl-num{transform:scale(1.05)}
.tl-item .tl-title{
  font-size:18px;
  line-height:1.3;
  font-weight:600;
  margin-bottom:4px;
}
.tl-item .tl-desc{
  font-size:15px;
  color:var(--muted);
  line-height:1.65;
}
.tl-item .tl-meta{
  display:flex;
  gap:8px;
  flex-wrap:wrap;
  margin-top:6px;
}
.tl-item .tl-badge{
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:3px 8px;
  border:1px solid var(--pill-border);
  border-radius:var(--pill-radius);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:11px;
  font-weight:700;
  line-height:var(--pill-line-height);
}
.tl-item .tl-badge.time{
  background:rgba(22,163,74,.08);
  color:var(--success);
}
.tl-item .tl-extra{
  max-height:0;
  overflow:hidden;
  opacity:0;
  transition:max-height .3s ease, opacity .3s ease;
}
.tl-item.open .tl-extra{
  max-height:420px;
  opacity:1;
  margin-top:10px;
}
.tl-extra-inner{
  padding:12px 14px;
  border-radius:12px;
  background:rgba(15,23,42,.03);
  font-size:14px;
  color:#475569;
  line-height:1.65;
  border:1px solid #edf1f6;
}
.tl-extra-inner ul{margin:6px 0 0 16px}
.tl-extra-inner li{margin:3px 0}

/* Buttons */
.btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  min-height:40px;
  padding:0 14px;
  border:1px solid transparent;
  border-radius:12px;
  background:var(--card);
  color:var(--text);
  font-size:13px;
  font-weight:700;
  line-height:1.2;
  cursor:pointer;
  transition:background var(--transition),border-color var(--transition),color var(--transition),transform var(--transition),box-shadow var(--transition);
}
.btn svg{
  width:16px;
  height:16px;
  flex-shrink:0;
}
.btn:hover{
  transform:translateY(-1px);
  border-color:var(--line-strong);
  background:var(--surface-soft);
}
.btn:focus-visible,
.icon-btn:focus-visible,
.pill-button:focus-visible{
  outline:2px solid var(--ring);
  outline-offset:2px;
}
.btn-sm{
  min-height:32px;
  padding:0 12px;
  border-radius:10px;
  font-size:12px;
}
.btn-pill{
  border-radius:999px;
}
.btn.primary{
  background:var(--accent);
  color:#fff;
  border-color:var(--accent);
  box-shadow:0 8px 18px rgba(37,99,235,.16);
}
.btn.primary:hover{background:var(--accent-strong);border-color:var(--accent-strong)}
.btn-primary{
  background:var(--accent);
  color:#fff;
  border:1px solid var(--accent);
  border-color:var(--accent);
  box-shadow:0 8px 18px rgba(37,99,235,.16);
}
.btn-primary:hover{background:var(--accent-strong);border-color:var(--accent-strong);color:#fff}
.btn-secondary{
  background:var(--pill-bg);
  color:var(--accent);
  border-color:var(--pill-border);
}
.btn-secondary:hover{
  background:var(--accent-bg);
  border-color:var(--accent-border);
  color:var(--accent);
}
.btn-outline{
  background:transparent;
  color:var(--accent);
  border:1px solid var(--accent);
}
.btn-outline:hover{background:var(--accent);border-color:var(--accent);color:#fff}
.btn-ghost{
  background:transparent;
  color:var(--muted);
  border-color:transparent;
}
.btn-ghost:hover{
  background:var(--accent-bg);
  color:var(--accent);
  border-color:transparent;
}
.icon-btn{
  display:inline-flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border:1px solid var(--pill-border);
  border-radius:10px;
  background:var(--pill-bg);
  color:var(--muted);
  cursor:pointer;
  transition:background var(--transition),border-color var(--transition),color var(--transition),transform var(--transition);
}
.icon-btn:hover{
  transform:translateY(-1px);
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
}
.icon-btn svg{
  width:18px;
  height:18px;
}
.icon-btn--positive:hover{
  border-color:#22c55e;
  color:#22c55e;
  background:#f0fdf4;
}
.icon-btn--negative:hover{
  border-color:#ef4444;
  color:#ef4444;
  background:#fef2f2;
}

/* Footer */
.foot{
  width:100%;
  margin-top:auto;
  padding:8px 0 18px;
  border-top:1px solid var(--line);
  background:color-mix(in srgb,var(--card) 50%,transparent);
  flex-shrink:0;
}

.foot-inner{
  width:min(100% - 40px,1240px);
  margin:0 auto;
  padding:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
}

.foot-top{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:16px;
  width:100%;
}

.foot-nav{
  display:flex;
  flex-wrap:wrap;
  gap:4px 12px;
  width:100%;
}
.foot-nav a{
  padding:0;
  border-radius:0;
  background:none;
  color:#8b97a8;
  font-size:12.5px;
  font-weight:600;
  transition:color var(--transition);
}
.foot-nav a:hover{
  color:var(--accent);
  background:none;
}

.foot-meta{
  display:flex;
  align-items:center;
  flex-wrap:wrap;
  gap:4px 8px;
  font-size:12.5px;
  color:#8b97a8;
  line-height:1.6;
}

.foot-meta a{
  color:#8b97a8;
  transition:color var(--transition);
}
.foot-meta a:hover{color:var(--accent)}

.foot-links{
  display:flex;
  flex-wrap:wrap;
  gap:4px 8px;
}

.foot-note{
  color:#8b97a8;
}

.foot-copy{
  color:#8b97a8;
}

.foot-sep{
  color:#c5cdd8;
}
.foot-social{
  display:flex;
  gap:6px;
  flex-shrink:0;
}
.foot-social a{
  display:flex;
  align-items:center;
  justify-content:center;
  width:34px;
  height:34px;
  border-radius:10px;
  background:#eef2f6;
  color:#8a909a;
  transition:all var(--transition);
}
.foot-social a:hover{
  color:var(--accent);
  background:var(--accent-bg);
}

.foot-bot{
  margin-top:2px;
  padding-top:12px;
  border-top:1px solid var(--line);
  display:flex;
  justify-content:space-between;
  gap:12px;
  color:#9aa1ad;
  font-size:11.5px;
  line-height:1.6;
  width:100%;
}

/* Cookie */
.cookie-banner{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  z-index:200;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:12px;
  flex-wrap:wrap;
  padding:12px 16px;
  background:var(--card);
  border-top:1px solid var(--line);
  box-shadow:0 -4px 20px rgba(0,0,0,.08);
}

.cookie-banner p{
  max-width:520px;
  color:var(--muted);
  font-size:13px;
  line-height:1.5;
}

.cookie-banner a{
  color:var(--accent);
  text-decoration:underline;
}

.cookie-banner button{
  flex-shrink:0;
  padding:8px 16px;
  border:none;
  border-radius:20px;
  background:var(--accent);
  color:#fff;
  font-size:13px;
  font-weight:700;
  cursor:pointer;
}
.cookie-banner button:hover{background:#1d4ed8}
.cookie-banner.dismissed{display:none}

/* Back to top */
.btt,
.back-to-top{
  position:fixed;
  right:24px;
  bottom:24px;
  width:38px;
  height:38px;
  border:none;
  border-radius:50%;
  background:#f1f5f9;
  color:#7b8694;
  cursor:pointer;
  display:flex;
  align-items:center;
  justify-content:center;
  box-shadow:none;
  opacity:0;
  transform:translateY(8px);
  transition:all .22s ease;
  z-index:100;
}
.btt.show,
.back-to-top.visible{
  opacity:1;
  transform:translateY(0);
}
.btt:hover,
.back-to-top:hover{
  background:var(--accent-bg);
  color:var(--accent);
}

/* Tablet */
@media (max-width:900px){
  .wrap{
    width:min(100% - 24px,980px);
    padding-top:16px;
  }

  .cards,
  .grid{
    grid-template-columns:1fr 1fr;
    gap:12px;
  }

  .topbar{
    flex-wrap:wrap;
    gap:6px 10px;
    padding:8px 12px;
  }
  .brand{
    font-size:13px;
  }
  .brand .bname{
    font-size:13px;
  }
  .brand-mark{
    width:24px;
    height:24px;
  }
  .brand .logo{
    width:24px;
    height:24px;
  }

  .nav{
    order:3;
    flex:none;
    width:100%;
    justify-content:flex-start;
    gap:3px;
  }

  .nav a{
    padding:6px 9px;
    font-size:12.5px;
  }

  .hero h1,
  .item-hero h1{font-size:26px}

  .hero p,
  .item-hero p,
  .hero .lead,
  .item-hero .lead{font-size:15px}
}

/* Chip buttons */
.chip{
  display:inline-flex;
  align-items:center;
  min-height:28px;
  padding:var(--pill-pad-y) var(--pill-pad-x);
  border-radius:var(--pill-radius);
  border:1px solid var(--pill-border);
  background:var(--pill-bg);
  color:var(--muted);
  font-size:var(--pill-font-size);
  font-weight:500;
  font-family:inherit;
  cursor:pointer;
  transition:all var(--transition);
  line-height:var(--pill-line-height);
  white-space:nowrap;
}
.chip:hover,
.chip:focus-visible{
  border-color:var(--accent);
  color:var(--accent);
  background:var(--accent-bg);
  font-weight:600;
}

/* Keyboard focus outlines */
:focus-visible{
  outline:2px solid var(--accent);
  outline-offset:2px;
}

/* Buttons & inputs inherit font */
button,
input,
select,
textarea{
  font-family:inherit;
}


/* Safe-area for notched phones */
@supports(padding:env(safe-area-inset-bottom)){
  .foot{padding-bottom:calc(24px + env(safe-area-inset-bottom))}
  .topbar{padding-left:calc(14px + env(safe-area-inset-left));padding-right:calc(14px + env(safe-area-inset-right))}
}

/* Mobile */
@media (max-width:767px){
  .wrap{
    width:min(100% - 20px,767px);
    padding-top:12px;
    padding-bottom:88px;
  }

  .topbar{
    flex-wrap:wrap;
    gap:4px;
    padding:10px 12px 8px;
  }

  .brand{
    flex:1 1 auto;
    min-width:0;
    font-size:14px;
    gap:8px;
  }

  #brandText{
    min-width:0;
    overflow:hidden;
    text-overflow:ellipsis;
    white-space:nowrap;
  }

  .nav{
    order:3;
    flex:none;
    width:100%;
    justify-content:flex-start;
    gap:2px;
    overflow-x:auto;
    overflow-y:visible;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    margin-top:2px;
  }
  .nav::-webkit-scrollbar{display:none}

  .nav a{
    font-size:13px;
    padding:6px 10px;
    white-space:nowrap;
    min-height:36px;
    display:inline-flex;
    align-items:center;
  }

  .lang-switch{
    margin-left:auto;
    gap:1px;
    padding:2px;
  }
  .lang-switch a{
    font-size:11px;
    padding:4px 6px;
    min-height:28px;
    display:inline-flex;
    align-items:center;
  }

  .theme-toggle{
    width:28px;
    height:28px;
    margin-right:6px;
    font-size:12px;
  }

  .hero,
  .item-hero{
    padding:16px 14px;
    border-radius:var(--radius-sm);
  }

  .hero h1{
    font-size:22px;
    margin-bottom:6px;
  }

  .item-hero h1{
    font-size:20px;
  }

  .hero p,
  .hero .lead{
    font-size:14px;
  }

  .hero-home{
    margin-bottom:12px;
  }

  .policy-page{gap:12px}
  .policy-hero{padding:18px 16px 16px}
  .policy-principles{grid-template-columns:1fr}
  .policy-principle{padding:14px 0}
  .policy-principle + .policy-principle,
  .policy-principle:nth-child(3){
    grid-column:auto;
    padding-left:0;
    border-top:1px solid var(--line);
    border-left:0;
  }
  .policy-principle h2{margin-bottom:5px;font-size:15px}
  .policy-principle p{max-width:none;font-size:12.5px;line-height:1.56}
  .policy-log.card{padding:16px 14px;border-radius:10px}
  .policy-log > h2{font-size:16px}
  .policy-detail-surface.card{padding:0 14px}
  .policy-detail-surface > h2{margin-top:15px;font-size:15px}
  .policy-sources{grid-template-columns:1fr;margin:9px 0 13px}
  .policy-sources li{padding:8px 0;font-size:12px}
  .policy-related-surface{margin-bottom:6px;padding:16px 0}

  .about-service-disclosure{margin-top:10px;padding-top:9px}
  .about-service-disclosure__links{display:grid;grid-template-columns:1fr;gap:5px}

  .error-page{
    padding:28px 12px 28px;
    min-height:calc(100vh - 170px);
  }

  .error-panel{
    padding:28px 18px 24px;
  }

  .error-code{
    font-size:56px;
  }

  .error-title{
    font-size:17px;
  }

  .hero-actions .btn{
    font-size:13px;
    padding:9px 14px;
    min-height:42px;
  }

  .hero-actions{
    display:grid;
    grid-template-columns:1fr;
    gap:8px;
  }

  .hero-actions .btn{
    width:100%;
  }

  .status-banner{
    grid-template-columns:1fr;
    gap:8px;
  }

  .status-banner[data-constitution-status]{
    display:grid;
    grid-template-columns:auto 1fr;
    align-items:start;
    gap:10px 12px;
    margin-bottom:12px;
    padding:14px;
  }

  .status-banner[data-constitution-status] .status-banner__icon{
    flex-basis:38px;
    width:38px;
    height:38px;
    border-radius:12px;
    font-size:20px;
  }

  .status-banner[data-constitution-status] .status-banner__text strong{
    font-size:15px;
    line-height:1.25;
  }

  .status-banner[data-constitution-status] .status-banner__text span{
    font-size:13px;
    line-height:1.4;
  }

  .status-banner[data-constitution-status] .status-banner__cta{
    grid-column:1 / -1;
    width:100%;
    min-height:36px;
    padding:8px 12px;
    font-size:12.5px;
  }

  .status-tile{
    padding:14px;
  }

  .status-tile__topline{
    flex-direction:column;
    gap:6px;
  }

  .status-badge{
    align-self:flex-start;
  }

  .cards,
  .grid{
    grid-template-columns:1fr;
    gap:10px;
  }

  .card{
    border-radius:var(--radius-sm);
  }

  .card.card-link,
  a.card{
    padding:15px 15px 14px;
    gap:8px;
  }

  .hero-search{
    flex-direction:column;
    max-width:100%;
  }
  .hero-search input{
    min-height:44px;
  }
  .hero-search button{
    min-height:44px;
    width:100%;
  }

  .search-form{
    grid-template-columns:minmax(0,1fr);
  }
  .search-form input{
    min-height:44px;
  }
  .search-form button{
    width:100%;
    min-height:44px;
  }

  .stat-strip{
    grid-template-columns:repeat(2,1fr);
  }
  .stat-strip .stat-num{
    font-size:20px;
  }

  .stat-grid{
    grid-template-columns:repeat(2,1fr);
  }

  /* section-nav stays horizontal scroll on mobile -- no grid override */

  .filter-bar{
    flex-wrap:wrap;
    gap:6px;
    padding-bottom:6px;
  }

  .item-layout{
    display:flex;
    flex-direction:column;
    gap:14px;
  }

  .item-aside{
    order:99;
  }

  .basics-grid{
    grid-template-columns:1fr;
  }
  .basics-side{
    position:static;
  }

  .related-grid{
    grid-template-columns:1fr;
  }

  /* Footer mobile – ultra-compact */
  .foot{
    margin-top:24px;
    padding:12px 0 14px;
  }
  .foot-inner{
    width:min(100% - 20px,767px);
    gap:8px;
  }
  .foot-top{
    flex-direction:row;
    align-items:center;
    gap:8px;
  }
  .foot-nav{
    gap:2px 10px;
    flex-wrap:wrap;
  }
  .foot-nav a{
    font-size:12px;
  }
  .foot-social a{
    width:28px;
    height:28px;
    border-radius:8px;
  }
  .foot-social a svg{
    width:15px;
    height:15px;
  }
  .foot-meta{
    flex-direction:row;
    flex-wrap:wrap;
    align-items:center;
    gap:2px 6px;
  }
  .foot-sep{
    display:inline;
  }
  .foot-note{
    font-size:10.5px;
    line-height:1.4;
  }
  .foot-copy{
    font-size:10.5px;
  }

  /* Timeline mobile */
  .tl-line{left:18px}
  .tl-event{padding-left:44px}
  .tl-dot{left:12px;width:12px;height:12px}

  /* Compact topbar on scroll – mobile overrides */
  .topbar.topbar-compact{
    flex-wrap:nowrap;
    gap:4px;
    padding:5px 8px;
  }
  .topbar-compact .brand{
    gap:4px;
    min-width:auto;
  }
  .topbar-compact .brand-mark{
    width:22px;
    height:22px;
  }
  .topbar-compact .brand .logo{
    width:22px;
    height:22px;
    font-size:13px;
  }
  .topbar-compact #brandText{display:inline-block;max-width:128px}
  .topbar-compact .nav{
    order:0;
    width:auto;
    flex:1;
    min-width:0;
    margin-top:0;
    gap:2px;
    overflow-x:auto;
    overflow-y:visible;
  }
  .topbar-compact .nav a{
    font-size:11px;
    padding:4px 6px;
    min-height:26px;
  }
  .topbar-compact .lang-switch a{
    font-size:10px;
    padding:2px 5px;
    min-height:22px;
  }
}

/* Small phones */
@media (max-width:380px){
  .topbar{padding:8px 10px 6px}
  .brand{
    font-size:13px;
    gap:6px;
  }
  .brand-mark{
    width:24px;
    height:24px;
  }
  .brand .bname{
    font-size:13px;
  }
  .nav a{
    font-size:13px;
    padding:5px 8px;
    min-height:32px;
  }
  .lang-switch{
    gap:0;
    padding:2px;
  }
  .lang-switch a{
    font-size:10.5px;
    padding:3px 6px;
    min-height:24px;
  }

  .hero,
  .item-hero{
    padding:16px 14px;
  }

  .hero h1{
    font-size:22px;
  }

  .item-hero h1{
    font-size:18px;
  }

  .hero-actions .btn{
    font-size:13px;
    padding:8px 12px;
  }

  .card h3{font-size:15px}
  .card > p{font-size:13.5px;line-height:1.58}
}

/* ── Hamburger menu button ── */
.hamburger{
  display:none;
  width:36px;
  height:36px;
  border:none;
  background:none;
  cursor:pointer;
  padding:6px;
  border-radius:8px;
  color:var(--text);
  transition:background var(--transition);
  flex-shrink:0;
}
.hamburger:hover{background:var(--surface-hover)}
.hamburger svg{display:block;width:24px;height:24px}

@media(max-width:980px){
  .hamburger{display:flex;align-items:center;justify-content:center}
  .topbar{flex-wrap:nowrap}
  .nav{
    display:none;
    position:absolute;
    top:100%;
    left:0;
    right:0;
    flex-direction:column;
    background:var(--card);
    border:1px solid var(--line);
    border-radius:0 0 12px 12px;
    box-shadow:var(--shadow-hover);
    padding:8px;
    margin:0;
    width:auto;
    order:0;
    z-index:99;
    gap:2px;
  }
  .nav.nav-open{
    display:flex;
  }
  .nav a,
  .nav-dropdown,
  .nav-dropdown__toggle{
    width:100%;
  }
  .nav a,
  .nav-dropdown__toggle{
    padding:10px 14px;
    border-radius:10px;
    font-size:14px;
    text-align:left;
    justify-content:space-between;
  }
  .nav-dropdown{
    display:flex;
    flex-direction:column;
  }
  .nav-dropdown__menu{
    position:static;
    min-width:0;
    width:100%;
    margin:2px 0 4px;
    padding:4px 0 0 10px;
    border:0;
    border-left:2px solid var(--line);
    border-radius:0;
    background:transparent;
    box-shadow:none;
  }
  .nav-dropdown:not(.nav-dropdown--open) .nav-dropdown__menu{
    display:none;
  }
  .nav-dropdown.nav-dropdown--open .nav-dropdown__menu{
    display:flex;
  }
  .nav-dropdown__menu a{
    min-height:32px;
    padding:6px 10px;
  }
  .topbar{position:sticky;top:8px}
}

@media(max-width:420px){
  .lang-switch{
    width:42px;
    justify-content:center;
    gap:0;
  }
  .lang-switch a:not(.active){display:none}
  .lang-switch a.active{min-height:24px;padding:3px 7px}
  .lang-switch.lang-open{
    width:auto;
    justify-content:flex-start;
    gap:1px;
  }
  .lang-switch.lang-open a:not(.active){display:inline-flex}
}

/* Skip-to-content link (accessibility) */
.skip-link{position:absolute;top:-40px;left:0;background:var(--accent);color:#fff;padding:8px 16px;z-index:var(--z-skip-link);font-size:14px;font-weight:600;border-radius:0 0 8px 0;transition:top .2s;text-decoration:none}
.skip-link:focus{top:0}
/* ═══════════════════════════════════════════════════════════ */
/* COMPAT: flex-gap fallback (Chrome <84, Safari iOS <14.1)   */
/* JS adds .no-fg to <html> when flex gap is not supported    */
/* ═══════════════════════════════════════════════════════════ */

/* --- row containers --- */
.no-fg .topbar>*+*{margin-left:24px}
.no-fg .brand>*+*{margin-left:10px}
.no-fg .nav>*+*{margin-left:8px}
.no-fg .lang-switch>*+*{margin-left:2px}
.no-fg .seg>*+*{margin-left:2px}
.no-fg .foot-top>*+*{margin-left:16px}
.no-fg .foot-social>*+*{margin-left:6px}
.no-fg .foot-bot>*+*{margin-left:12px}
.no-fg .section-head>*+*{margin-left:12px}
.no-fg .filter-bar>*+*{margin-left:6px}
.no-fg .sec-head>*+*{margin-left:6px}
.no-fg .g-head>*+*{margin-left:10px}
.no-fg .legend span>*+*{margin-left:6px}

/* --- column containers --- */
.no-fg .foot-inner>*+*{margin-top:12px}
.no-fg #glossaryGrid>*+*{margin-top:8px}
.no-fg .item-main>*+*{margin-top:18px}
.no-fg .item-layout>*+*{margin-top:14px}
.no-fg .item-actions>*+*{margin-top:10px}
.no-fg .toc-links>*+*{margin-top:4px}
.no-fg .g-head>span:first-child>*+*{margin-top:3px}

/* --- wrap containers (use both margin-left and margin-top for wrapping) --- */
.no-fg .hero-actions>*{margin:0 10px 10px 0}
.no-fg .hero .links>*{margin:0 8px 8px 0}
.no-fg .foot-nav>*{margin:4px 12px 0 0}
.no-fg .foot-meta>*{margin:4px 8px 0 0}
.no-fg .alpha-nav>*{margin:0 4px 4px 0}
.no-fg .popular .tags>*{margin:0 8px 8px 0}
.no-fg .glossary-toolbar>*{margin:0 12px 12px 0}
.no-fg .legend>*{margin:0 14px 14px 0}
.no-fg .tl-item .tl-meta>*{margin:0 8px 8px 0}
.no-fg .empty .suggestions>*{margin:0 6px 6px 0}
.no-fg .g-body .g-related>*{margin:0 6px 6px 0}
.no-fg .cookie-banner>*{margin:0 12px 12px 0}

/* ═══════════════════════════════════════════════════════
   Section color accents – subtle tints per content category
   ═══════════════════════════════════════════════════════ */

/* Category left border accents on cards – uses box-shadow to avoid border shorthand conflict */
.card[data-section="rights"]      { box-shadow: inset 3px 0 0 rgba(37,99,235,.55), var(--shadow) }
.card[data-section="power"]       { box-shadow: inset 3px 0 0 rgba(124,58,237,.5), var(--shadow) }
.card[data-section="about"]       { box-shadow: inset 3px 0 0 rgba(14,165,133,.5), var(--shadow) }
.card[data-section="history"]     { box-shadow: inset 3px 0 0 rgba(161,98,7,.5), var(--shadow) }
.card[data-section="referendum"],
.card[data-section="post_referendum"] { box-shadow: inset 3px 0 0 rgba(220,38,38,.4), var(--shadow) }
.card[data-section="myths"]       { box-shadow: inset 3px 0 0 rgba(236,72,153,.45), var(--shadow) }
.card[data-section="participation"]{ box-shadow: inset 3px 0 0 rgba(5,150,105,.5), var(--shadow) }
.card[data-section="practical"]   { box-shadow: inset 3px 0 0 rgba(100,116,139,.45), var(--shadow) }
.card[data-section="local"]       { box-shadow: inset 3px 0 0 rgba(217,119,6,.5), var(--shadow) }
.card[data-section="constitutional_laws"] { box-shadow: inset 3px 0 0 rgba(79,70,229,.45), var(--shadow) }

/* Eyebrow color per section */
.card[data-section="rights"] .eyebrow      { color: #2563eb }
.card[data-section="power"] .eyebrow       { color: #7c3aed }
.card[data-section="about"] .eyebrow       { color: #0ea585 }
.card[data-section="history"] .eyebrow     { color: #a16207 }
.card[data-section="referendum"] .eyebrow,
.card[data-section="post_referendum"] .eyebrow { color: #dc2626 }
.card[data-section="myths"] .eyebrow       { color: #db2777 }
.card[data-section="participation"] .eyebrow{ color: #059669 }
.card[data-section="practical"] .eyebrow   { color: #64748b }
.card[data-section="local"] .eyebrow       { color: #d97706 }
.card[data-section="constitutional_laws"] .eyebrow { color: #4f46e5 }

/* ═══════════════════════════════════════════════════════
   Glossary – alphabet group headers
   ═══════════════════════════════════════════════════════ */
.g-letter-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 10px;
  font-size: 15px;
  font-weight: 700;
  color: var(--accent);
}
.g-letter-header::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}

/* ═══════════════════════════════════════════════════════
   Featured → All cards divider on homepage
   ═══════════════════════════════════════════════════════ */
.section-divider {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 28px 0 18px;
}
.section-divider::before,
.section-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--line);
}
.section-divider h2 {
  font-size: 16px;
  font-weight: 700;
  color: var(--muted);
  white-space: nowrap;
}

/* ═══════════════════════════════════════════════════════
   Disclaimer footer – subtle accent background
   ═══════════════════════════════════════════════════════ */
.disclaimer-bar {
  background: rgba(37,99,235,.04);
  border-top: 1px solid rgba(37,99,235,.08);
  padding: 14px 0;
  margin-top: 32px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
}

/* Preserve inset accent on hover */
a.card[data-section]:hover,
.card-link[data-section]:hover {
  box-shadow: inset 3px 0 0 currentColor, var(--shadow-hover);
}
.card[data-section="rights"]:hover      { box-shadow: inset 3px 0 0 rgba(37,99,235,.6), var(--shadow-hover) }
.card[data-section="power"]:hover       { box-shadow: inset 3px 0 0 rgba(124,58,237,.5), var(--shadow-hover) }
.card[data-section="about"]:hover       { box-shadow: inset 3px 0 0 rgba(14,165,133,.5), var(--shadow-hover) }
.card[data-section="history"]:hover     { box-shadow: inset 3px 0 0 rgba(161,98,7,.5), var(--shadow-hover) }
.card[data-section="referendum"]:hover,
.card[data-section="post_referendum"]:hover { box-shadow: inset 3px 0 0 rgba(220,38,38,.4), var(--shadow-hover) }
.card[data-section="myths"]:hover       { box-shadow: inset 3px 0 0 rgba(236,72,153,.5), var(--shadow-hover) }
.card[data-section="participation"]:hover{ box-shadow: inset 3px 0 0 rgba(5,150,105,.5), var(--shadow-hover) }
.card[data-section="practical"]:hover   { box-shadow: inset 3px 0 0 rgba(100,116,139,.5), var(--shadow-hover) }
.card[data-section="local"]:hover       { box-shadow: inset 3px 0 0 rgba(217,119,6,.5), var(--shadow-hover) }
.card[data-section="constitutional_laws"]:hover { box-shadow: inset 3px 0 0 rgba(79,70,229,.5), var(--shadow-hover) }

/* Inline footer */
.foot-meta--inline {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px 8px;
  flex-wrap: wrap;
  width: 100%;
  max-width: 1120px;
  padding: 0;
  font-size: 12.5px;
  color: var(--muted);
}
.foot-meta--inline .foot-copy {
  font-weight: 600;
  color: var(--text);
}
.foot-meta--inline .foot-copy-link{
  color:inherit;
  text-decoration:none;
}
.foot-meta--inline .foot-copy-link:hover{
  color:var(--accent);
}
.foot-meta--inline .foot-system{
  color:var(--muted);
  opacity:.82;
  font-size:11.5px;
  font-weight:600;
  letter-spacing:.02em;
}
.foot-meta--inline .foot-link{
  color:var(--accent);
  text-decoration:none;
  font-weight:600;
}
.foot-meta--inline .foot-link:hover{
  text-decoration:underline;
}
.foot-meta--inline .foot-sep {
  opacity: .32;
}
.foot-meta--inline .foot-note {
  opacity: .88;
}
.foot-note--block{
  text-align:center;
  font-size:12px;
  line-height:1.6;
  color:var(--muted);
}
.foot-controls{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  width:100%;
}
.foot-controls button.foot-link{
  appearance:none;
  min-height:44px;
  padding:4px 8px;
  border:0;
  border-radius:4px;
  background:transparent;
  color:var(--accent);
  font:inherit;
  font-size:12px;
  font-weight:600;
  line-height:1.4;
  cursor:pointer;
}
.foot-controls button.foot-link:hover{
  text-decoration:underline;
}
.foot-avds-badge{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  padding:0 8px;
  border:1px solid var(--line);
  border-radius:7px;
  background:color-mix(in srgb,var(--card) 74%,transparent);
  color:var(--muted);
  font-size:10.5px;
  font-weight:700;
  line-height:1;
  letter-spacing:.025em;
  text-decoration:none;
  white-space:nowrap;
  transition:background-color var(--transition),border-color var(--transition),color var(--transition);
}
.foot-avds-badge:hover,
.foot-avds-badge:focus-visible{
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
}
.foot-theme-toggle{
  width:30px;
  height:30px;
}

[data-theme="dark"] footer,
[data-theme="dark"] .site-footer,
[data-theme="dark"] .foot {
  background: var(--color-surface, oklch(0.18 0.01 250));
  color: var(--color-text-muted, oklch(0.75 0.01 250));
  border-top: 1px solid var(--color-border, oklch(0.30 0.01 250));
}

[data-theme="dark"] .foot-meta,
[data-theme="dark"] .foot-copy,
[data-theme="dark"] .foot-note,
[data-theme="dark"] .foot-sep {
  color: var(--color-text-muted, oklch(0.75 0.01 250));
}

[data-theme="dark"] .foot-meta--inline {
  color: var(--color-text-muted, oklch(0.75 0.01 250));
}

[data-theme="dark"] .foot-meta--inline .foot-copy {
  color: var(--text);
}

[data-theme="dark"] .foot-avds-badge{
  border-color:var(--line);
  background:color-mix(in srgb,var(--card) 82%,transparent);
  color:var(--muted);
}

[data-theme="dark"] .foot-avds-badge:hover,
[data-theme="dark"] .foot-avds-badge:focus-visible{
  border-color:var(--accent-border);
  background:var(--accent-bg);
  color:var(--accent);
}

[data-theme="dark"] .foot a,
[data-theme="dark"] .site-footer a {
  color: var(--color-primary, oklch(0.72 0.12 250));
}

/* ═══════════════════════════════════════════════════════
   Unification fixes – mobile overflow, tap targets, spacing
   ═══════════════════════════════════════════════════════ */

/* Fix mobile overflow on /p/* pages */
.item-main,
.prose-block,
.card.prose {
  max-width: 100%;
  overflow-x: auto;
  overflow-wrap: break-word;
  word-break: break-word;
}

.card.prose table {
  display: block;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* Prevent any child from pushing beyond viewport */
@media (max-width: 767px) {
  .item-layout,
  .item-main,
  .item-main > *,
  .prose-block,
  .prose {
    min-width: 0;
    width: auto;
    max-width: 100%;
    box-sizing: border-box;
  }
  .item-main { overflow-x: clip; }
  .prose-block {
    padding: 16px 14px;
  }
  .card.prose pre,
  .card.prose code {
    white-space: pre-wrap;
    word-break: break-all;
  }
}

/* Chat widget – prevent overlap with content */
.wrap {
  padding-bottom: 48px;
}

/* TOC tap targets – minimum 44px per Apple HIG */
.toc-links a {
  min-height: 44px;
  display: flex;
  align-items: center;
  padding: 6px 0;
}

/* Footer · separator – ensure it renders */
.foot-sep {
  display: inline;
  margin: 0 4px;
  opacity: .4;
  font-weight: 400;
}

/* Mobile footer – allow wrapping */
@media (max-width: 600px) {
  .foot-meta--inline {
    gap: 4px 8px;
    text-align: center;
    padding: 0;
    justify-content: center;
  }
  .foot-meta--inline .foot-copy {
    font-size: 11.5px;
  }
  .foot-note--block {
    font-size: 11.5px;
    line-height: 1.45;
  }
  .foot-sep {
    display: none;
  }
}

/* Skeleton loader */
.skeleton-card{padding:20px;border-radius:var(--radius-sm,10px);background:var(--card);border:1px solid var(--line)}
.skeleton-line{height:14px;background:linear-gradient(90deg,var(--line) 25%,var(--bg) 50%,var(--line) 75%);background-size:200% 100%;animation:shimmer 1.5s infinite;border-radius:6px;margin-bottom:10px}
.skeleton-line.short{width:60%}
.skeleton-line.medium{width:80%}
.skeleton-line.title{height:18px;width:70%;margin-bottom:14px}
@keyframes shimmer{0%{background-position:200% 0}to{background-position:-200% 0}}

/* Article-level TOC in sidebar */
.toc-articles{display:flex;flex-wrap:wrap;gap:2px 4px;padding:2px 0 6px 8px}
.toc-article-link{font-size:10px;padding:2px 6px;color:var(--muted);border-radius:4px;text-decoration:none;white-space:nowrap;transition:all var(--transition)}
.toc-article-link:hover{background:var(--accent-bg);color:var(--accent)}
.toc-article-link.active{color:var(--accent);font-weight:700;background:var(--accent-bg)}

/* ═══════════════════════════════════════════════════════════
   WCAG 2.1 AA – added 2026-03-31
   ═══════════════════════════════════════════════════════════ */

/* Focus indicators (WCAG 2.4.7) */
:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:4px}
a:focus-visible,button:focus-visible{outline:2px solid var(--accent);outline-offset:2px}

/* Keep compact pills aligned without forcing tall visual chips. */
.nav a,.nav-dropdown__toggle,.lang-switch a,.filter-bar button{display:inline-flex;align-items:center}

/* Reduced motion (WCAG 2.3.3) */
@media(prefers-reduced-motion:reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}

[data-theme="dark"]{
  color-scheme:dark;
}
[data-theme="light"]{
  color-scheme:light;
}
[data-theme="dark"] .topbar{
  background:rgba(26,26,26,.86);
  border-color:var(--line);
  box-shadow:0 10px 28px rgba(0,0,0,.28);
}
[data-theme="dark"] .brand-mark{
  box-shadow:0 0 0 1px var(--line);
}
[data-theme="dark"] .nav a:hover,
[data-theme="dark"] .nav-dropdown__toggle:hover,
[data-theme="dark"] .hamburger:hover{
  background:rgba(255,255,255,.08);
}
[data-theme="dark"] .nav a.active,
[data-theme="dark"] .nav-dropdown__toggle.active{
  color:var(--accent);
}
[data-theme="dark"] .lang-switch a.active{
  color:#07111f;
  box-shadow:0 8px 18px rgba(96,165,250,.22);
}
[data-theme="dark"] .lang-switch{
  background:rgba(255,255,255,.06);
}
[data-theme="dark"] .toc-title,
[data-theme="dark"] .toc a,
[data-theme="dark"] .toc-links a{
  color:var(--muted);
}
[data-theme="dark"] .toc a:is(:hover,.active),
[data-theme="dark"] .toc-links a:is(:hover,.active){
  color:var(--accent);
}
[data-theme="dark"] .avds-filter-chip__badge{
  color:var(--bg);
}
[data-theme="dark"] .nav-dropdown__menu,
[data-theme="dark"] .nav{
  background:var(--card);
}
[data-theme="dark"] .hero,
[data-theme="dark"] .hero.card,
[data-theme="dark"] .item-hero,
[data-theme="dark"] .error-panel,
[data-theme="dark"] .home-promo{
  background:linear-gradient(180deg,var(--surface-soft) 0%,var(--card) 100%);
  border-color:var(--line);
}
[data-theme="dark"] .card > p,
[data-theme="dark"] .hero p,
[data-theme="dark"] .hero .lead,
[data-theme="dark"] .item-hero p,
[data-theme="dark"] .item-hero .lead,
[data-theme="dark"] .status-banner__text span,
[data-theme="dark"] .status-tile p,
[data-theme="dark"] .press-copy,
[data-theme="dark"] .press-download-desc{
  color:var(--muted);
}
[data-theme="dark"] .hero-actions .btn,
[data-theme="dark"] .hero .links a,
[data-theme="dark"] .press-download,
[data-theme="dark"] .item-resource-list a{
  background:var(--card);
  border-color:var(--line);
}
[data-theme="dark"] .hero-actions .btn-primary,
[data-theme="dark"] .status-badge,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .search-form button{
  background:var(--accent);
  border-color:var(--accent);
  color:#07111f;
}
[data-theme="dark"] input,
[data-theme="dark"] textarea,
[data-theme="dark"] select,
[data-theme="dark"] .g-filter input,
[data-theme="dark"] .search-form input{
  background:var(--color-surface-offset);
  border-color:var(--line);
  color:var(--text);
}
[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder{
  color:var(--muted);
}
[data-theme="dark"] .md,
[data-theme="dark"] .prose,
[data-theme="dark"] .card.prose p,
[data-theme="dark"] .md strong,
[data-theme="dark"] .prose strong{
  color:var(--text);
}
[data-theme="dark"] .md blockquote,
[data-theme="dark"] .prose blockquote,
[data-theme="dark"] .item-resource-links,
[data-theme="dark"] .item-freshness-note,
[data-theme="dark"] .legal-basis,
[data-theme="dark"] .status-tile--accent{
  background:var(--color-surface-offset);
  border-color:var(--line);
}
[data-theme="dark"] .g-card,
[data-theme="dark"] .g-body-inner{
  border-color:var(--line);
}
[data-theme="dark"] .g-head .g-title,
[data-theme="dark"] .g-body .g-def,
[data-theme="dark"] .g-body .g-example{
  color:var(--text);
}
[data-theme="dark"] .g-head .g-preview,
[data-theme="dark"] .g-body .g-ref,
[data-theme="dark"] .g-body .g-section-title{
  color:var(--muted);
}
[data-theme="dark"] .g-toggle{
  background:rgba(96,165,250,.12);
}
[data-theme="dark"] .alert,
[data-theme="dark"] .status-banner[data-constitution-status],
[data-theme="dark"] .status-tile,
[data-theme="dark"] .press-stat{
  background:var(--card);
  border-color:var(--line);
}
[data-theme="dark"] .status-banner--effective{
  --sb-bg:oklch(0.22 0.05 145 / 0.30);
  --sb-border:oklch(0.55 0.14 145);
  background:oklch(0.22 0.05 145 / 0.30);
  border-color:oklch(0.55 0.14 145);
}
[data-theme="dark"] .status-banner--elections{
  --sb-bg:oklch(0.22 0.04 250 / 0.30);
  --sb-border:oklch(0.55 0.12 250);
  background:oklch(0.22 0.04 250 / 0.30);
  border-color:oklch(0.55 0.12 250);
}
[data-theme="dark"] .status-banner--kurultai{
  --sb-bg:oklch(0.22 0.03 200 / 0.30);
  --sb-border:oklch(0.55 0.10 200);
  background:oklch(0.22 0.03 200 / 0.30);
  border-color:oklch(0.55 0.10 200);
}
[data-theme="dark"] .feedback-btn:hover{
  color:#07111f;
}

/* Feedback block */
.feedback-block{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
  text-align:left;
  padding:12px 16px;
  margin:16px 0;
  border-radius:14px;
  background:var(--surface-soft);
  border:1px solid color-mix(in srgb, var(--line) 82%, white 18%);
  box-shadow:none;
}
.feedback-question{font-size:13px;font-weight:600;color:var(--text);margin:0;line-height:1.4}
.feedback-buttons{display:flex;gap:10px;justify-content:flex-end;flex-shrink:0}
.feedback-btn{width:40px;height:40px;border-radius:999px}
.feedback-thanks{font-size:13px;color:var(--muted);font-style:normal;margin:0 0 0 auto;line-height:1.4}
.feedback-block.is-answered{
  justify-content:flex-start;
  padding:10px 14px;
}
.feedback-block.is-answered .feedback-thanks{
  margin-left:0;
  color:var(--text);
  font-weight:600;
}

/* Print button */
.print-btn{font-size:12px;line-height:1}

/* Print layout lives in print.css. */

/* The assistant shell is intentionally tiny. Its full CSS and JavaScript are
   fetched only after the user asks for it. */
.assistant-launcher{
  position:fixed;
  right:24px;
  bottom:24px;
  z-index:var(--z-dialog);
  display:grid;
  width:46px;
  height:46px;
  place-items:center;
  border:1px solid color-mix(in srgb,var(--accent) 78%,var(--line));
  border-radius:50%;
  background:var(--accent);
  color:#fff;
  box-shadow:0 8px 24px rgba(37,99,235,.22);
  cursor:pointer;
  transition:transform var(--transition),box-shadow var(--transition),background var(--transition);
}
.assistant-launcher svg{width:20px;height:20px}
.assistant-launcher:hover,
.assistant-launcher:focus-visible{
  background:var(--accent-strong);
  box-shadow:0 10px 28px rgba(37,99,235,.28);
  transform:translateY(-1px);
}
.assistant-launcher:focus-visible{outline:3px solid var(--ring);outline-offset:3px}
.assistant-launcher[aria-busy="true"]{cursor:progress;opacity:.78}
.assistant-launcher[aria-busy="true"] svg{animation:assistant-loading 1s ease-in-out infinite alternate}
@keyframes assistant-loading{to{opacity:.45;transform:scale(.88)}}

@media (max-width:1024px){
  .assistant-launcher{display:none}
}

@media (prefers-reduced-motion:reduce){
  .assistant-launcher,
  .assistant-launcher svg{animation:none!important;transition:none!important}
}
