/* Shared identity across Home, News and HSK. Keep the same space for every
   account state so signing in does not move the neighbouring controls. */
#account-open.site-account-button,
#home-account.site-account-button {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  flex:0 0 var(--account-width, 104px);
  width:var(--account-width, 104px);
  min-width:var(--account-width, 104px);
  height:40px;
  min-height:40px;
  padding:0 10px;
  border:0;
  border-radius:8px;
  background:transparent;
  color:var(--secondary, #62666b);
  font:500 13px/1.2 -apple-system,BlinkMacSystemFont,"Segoe UI",sans-serif;
  text-align:center;
  text-decoration:none;
  white-space:nowrap;
  cursor:pointer;
  touch-action:manipulation;
}
#account-open.site-account-button:hover,
#home-account.site-account-button:hover { background:var(--wash, #f5f5f5); }
#account-open.site-account-button[data-account-state="active"],
#home-account.site-account-button[data-account-state="active"] {
  background:var(--account-tint, #e9f5ee);
  color:var(--account-ink, #2d6648);
}
#account-open.site-account-button[data-account-state="active"]:hover,
#home-account.site-account-button[data-account-state="active"]:hover {
  background:var(--account-hover, #dfefe5);
}
#account-open.site-account-button:focus-visible,
#home-account.site-account-button:focus-visible { outline:2px solid var(--accent, #842b39); outline-offset:2px; }
.home-header .brand,.site-header .wordmark,.topbar .brand { font-size:26px; line-height:1; }
.home-nav .site-nav-link,.header-links .site-nav-link,.topbar .site-nav-link {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  min-height:40px;
  padding:0 4px;
  border:0;
  border-radius:8px;
  color:var(--muted, #73777c);
  font-size:13px;
  font-weight:500;
  line-height:1.2;
  text-decoration:none;
  white-space:nowrap;
}
.home-nav .site-nav-link:hover,.header-links .site-nav-link:hover,.topbar .site-nav-link:hover {
  color:var(--accent, #842b39);
}
.header-links #home-settings { font-size:13px; font-weight:500; }
/* One height and gap rhythm keeps text, theme and account controls on a line. */
.site-header { gap:12px; }
.site-header .header-links { gap:12px; }
.site-header .header-links > :is(a,button) { min-height:40px; padding-block:0; }
.site-header .header-links .theme-toggle { width:36px; }
/* The reader account occupies three toolbar columns, including their gutters. */
.topbar #account-open.site-account-button {
  width:100%;
  max-width:116px;
  min-width:0;
  justify-self:center;
  height:44px;
  min-height:44px;
  padding-inline:4px;
}

#home-account-session {
  position:fixed;
  width:1px;
  height:1px;
  overflow:hidden;
  clip-path:inset(50%);
  pointer-events:none;
}
@media(max-width:600px) {
  #articles-open .article-chooser-copy { display:none; }
  .article-chooser-short { display:block; font-size:12px; font-weight:500; }
  .home-nav { gap:10px; }
  .home-header .brand,.site-header .wordmark,.topbar .brand { font-size:24px; }
  .home-header,.site-header { --account-width:88px; }
  .site-header { gap:8px; }
  .site-header .header-links { gap:6px; }
  .site-header .header-links .theme-toggle { width:32px; }
  #account-open.site-account-button,#home-account.site-account-button { font-size:12px; padding-inline:6px; }
  .topbar #account-open.site-account-button { padding-inline:2px; }
  .home-nav .site-nav-link,.header-links .site-nav-link,.topbar .site-nav-link,.header-links #home-settings { font-size:12px; }
}

@media(max-width:360px) {
  .home-header,.site-header { --account-width:80px; }
  .site-header { gap:4px; }
  .site-header .header-links { gap:4px; }
  .site-header .header-links .theme-toggle { width:28px; }
  .site-header .header-links .site-nav-link { padding-inline:2px; }
  #account-open.site-account-button,#home-account.site-account-button { font-size:11px; }
}
