:root {
  color-scheme: dark;
  --page: #08111f;
  --panel: #101d2e;
  --panel-raised: #142338;
  --line: #273951;
  --text: #edf4ff;
  --muted: #a7b6c9;
  --mint: #65e0bf;
  --blue: #79baff;
  --focus: #ffd166;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeLegibility;
}

* { box-sizing: border-box; }
html { background: var(--page); scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--text);
  background:
    radial-gradient(ellipse at 86% 9%, rgba(35, 91, 124, .22), transparent 34rem),
    radial-gradient(ellipse at 7% 48%, rgba(22, 98, 91, .12), transparent 32rem),
    var(--page);
  line-height: 1.55;
}
a { color: var(--blue); }
a:hover { color: var(--mint); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.skip-link {
  position: fixed;
  z-index: 20;
  top: 8px;
  inset-inline-start: 8px;
  padding: .65rem 1rem;
  transform: translateY(-160%);
  border-radius: 8px;
  color: #06121d;
  background: var(--focus);
  font-weight: 750;
}
.skip-link:focus { transform: translateY(0); }
.site-header {
  width: min(1200px, calc(100% - 48px));
  min-height: 82px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  border-bottom: 1px solid rgba(164, 191, 220, .16);
}
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--text); text-decoration: none; }
.brand img { display: block; width: 43px; height: 43px; }
.brand strong { display: block; letter-spacing: .16em; font-size: .86rem; }
.brand small { display: block; color: var(--muted); font-size: .68rem; letter-spacing: .04em; }
.header-nav { display: flex; flex-wrap: wrap; gap: 10px 24px; }
.header-nav a { color: #c4d2e3; text-decoration: none; font-size: .9rem; }
main { width: min(1200px, calc(100% - 48px)); margin: auto; }
.hero {
  position: relative;
  min-height: 365px;
  padding: 66px 0 56px;
  display: flex;
  align-items: center;
  overflow: hidden;
}
.hero-copy { position: relative; z-index: 1; width: min(790px, 75%); }
.eyebrow {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0 0 14px;
  color: var(--mint);
  font-size: .73rem;
  font-weight: 800;
  letter-spacing: .16em;
}
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 14px var(--mint); }
h1 { max-width: 830px; margin: 0; font-size: clamp(2rem, 4.1vw, 3.55rem); line-height: 1.12; letter-spacing: -.04em; }
.intro { max-width: 710px; margin: 22px 0 0; color: #bdcadd; font-size: clamp(1rem, 1.5vw, 1.15rem); }
.hero-meta { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin-top: 24px; color: var(--muted); font-size: .84rem; }
.meta-chip { display: inline-flex; gap: 8px; align-items: center; padding: 6px 11px; border: 1px solid #335347; border-radius: 99px; color: #c4f6e5; background: rgba(36, 119, 96, .14); }
.orbit-art { position: absolute; width: 360px; height: 360px; inset-inline-end: -12px; top: 8px; }
.orbit { position: absolute; inset: 45px; border: 1px solid rgba(106, 190, 202, .18); border-radius: 50%; transform: rotate(-24deg) scaleY(.42); }
.orbit-two { inset: 20px 70px; transform: rotate(38deg) scaleY(.56); border-color: rgba(103, 163, 232, .25); }
.orbit-three { inset: 68px 8px; transform: rotate(72deg) scaleY(.72); border-style: dashed; border-color: rgba(102, 222, 189, .28); }
.orbit-core { position: absolute; inset: 128px; display: grid; place-items: center; border: 1px solid rgba(128, 207, 220, .4); border-radius: 50%; background: radial-gradient(circle, rgba(42, 99, 126, .45), rgba(11, 25, 42, .93) 70%); box-shadow: 0 0 45px rgba(53, 160, 173, .17); }
.orbit-core img { width: 65px; height: 65px; }
.orbit-node { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--mint); box-shadow: 0 0 18px var(--mint); }
.node-a { inset-inline-start: 73px; top: 85px; }
.node-b { inset-inline-end: 39px; top: 169px; background: var(--blue); box-shadow: 0 0 18px var(--blue); }
.node-c { inset-inline-start: 155px; bottom: 30px; width: 7px; height: 7px; }
.directory { padding: 30px 0 20px; border-top: 1px solid rgba(164, 191, 220, .16); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 22px; }
.section-heading .eyebrow { margin-bottom: 6px; }
h2 { margin: 0; font-size: clamp(1.45rem, 2.4vw, 1.95rem); letter-spacing: -.025em; }
.language-control { display: grid; gap: 4px; color: var(--muted); font-size: .75rem; }
select, input, button { font: inherit; }
select {
  min-height: 42px;
  min-width: 150px;
  padding: 7px 34px 7px 12px;
  border: 1px solid #40536b;
  border-radius: 9px;
  color: var(--text);
  background: #101d2e;
}
.tools { display: flex; align-items: center; gap: 12px; margin: 22px 0 18px; }
.search-control { position: relative; flex: 1 1 350px; max-width: 460px; }
.search-icon { position: absolute; inset-inline-start: 14px; top: 50%; transform: translateY(-55%); color: #91a5bd; font-size: 1.45rem; pointer-events: none; }
input[type="search"] {
  width: 100%;
  min-height: 46px;
  padding: 10px 14px 10px 43px;
  border: 1px solid #344861;
  border-radius: 10px;
  color: var(--text);
  background: rgba(16, 29, 46, .84);
}
input::placeholder { color: #90a0b5; }
button {
  min-height: 44px;
  padding: 7px 15px;
  border: 1px solid #435a75;
  border-radius: 9px;
  color: #d7e5f4;
  background: #132239;
  cursor: pointer;
}
button:hover:not(:disabled) { border-color: var(--mint); color: var(--mint); }
:disabled { cursor: not-allowed; opacity: .58; }
.results-status { margin: 0 0 0 auto; color: var(--muted); font-size: .84rem; text-align: end; }
.authority-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.authority-card {
  min-width: 0;
  border: 1px solid rgba(130, 163, 198, .2);
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(20, 35, 56, .96), rgba(13, 25, 41, .96));
  transition: border-color .18s ease, transform .18s ease, box-shadow .18s ease;
}
.authority-card:hover { transform: translateY(-2px); border-color: rgba(101, 224, 191, .58); box-shadow: 0 12px 30px rgba(0, 0, 0, .2); }
.card-link { display: flex; min-height: 195px; height: 100%; padding: 17px; flex-direction: column; color: inherit; text-decoration: none; }
.card-top { display: flex; min-height: 32px; align-items: center; gap: 10px; }
.flag-wrap { display: inline-grid; position: relative; width: 29px; height: 21px; flex: 0 0 29px; place-items: center; overflow: hidden; border-radius: 3px; background: #1b2c42; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.flag-icon { display: block; width: 100%; height: 100%; line-height: 21px; font-size: 29px; }
.flag-emoji { display: none; font-size: 23px; line-height: 1; }
.flag-icons-unavailable .flag-icon { display: none; }
.flag-icons-unavailable .flag-emoji { display: inline; }
.card-region { min-width: 0; color: #b6c7da; font-size: .83rem; font-weight: 680; overflow-wrap: anywhere; }
.arrow { margin-inline-start: auto; color: #7d93ad; }
.authority-name { display: block; margin-top: 14px; color: #f0f6ff; font-weight: 760; line-height: 1.35; overflow-wrap: anywhere; }
.card-description { display: block; margin-top: 8px; color: #aebdd0; font-size: .87rem; line-height: 1.5; }
.card-footer { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; color: #82e1c4; font-size: .73rem; font-weight: 720; letter-spacing: .025em; }
.nunavut-flag { width: 29px; height: 21px; flex: 0 0 29px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(255,255,255,.16); }
.globe-icon { display: grid; width: 29px; height: 21px; flex: 0 0 29px; place-items: center; font-size: 1.35rem; }
.empty-state { padding: 28px; border: 1px dashed #51647c; border-radius: 12px; color: var(--muted); text-align: center; }
.notice { display: flex; gap: 15px; margin: 30px 0; padding: 20px; border: 1px solid rgba(255, 209, 102, .3); border-radius: 14px; background: rgba(72, 60, 31, .22); }
.notice-icon { display: grid; width: 27px; height: 27px; flex: 0 0 27px; place-items: center; border: 1px solid #e6bd60; border-radius: 50%; color: #ffda7f; font-weight: 800; }
.notice h2 { margin: 0 0 6px; color: #ffdc8d; font-size: 1rem; letter-spacing: 0; }
.notice p { margin: 0; color: #d4ccba; font-size: .9rem; }
.page-footer { display: flex; justify-content: space-between; gap: 15px; padding: 20px 0 30px; border-top: 1px solid rgba(164, 191, 220, .16); color: var(--muted); font-size: .8rem; }
.page-footer a { color: #b9d8fa; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
[hidden] { display: none !important; }
html[dir="rtl"] .tools .search-control input { padding-inline: 43px 14px; }
html[dir="rtl"] .search-icon { inset-inline-start: auto; inset-inline-end: 14px; }
html[dir="rtl"] .card-top .arrow { transform: scaleX(-1); }
@media (max-width: 900px) {
  .authority-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .orbit-art { inset-inline-end: -105px; opacity: .6; }
  .hero-copy { width: min(740px, 88%); }
}
@media (max-width: 620px) {
  .site-header, main { width: min(100% - 32px, 1200px); }
  .site-header { min-height: 72px; flex-wrap: wrap; gap: 10px 16px; padding: 12px 0; }
  .brand { min-width: 0; }
  .brand img { width: 38px; height: 38px; }
  .brand > span { min-width: 0; overflow-wrap: anywhere; }
  .header-nav { width: 100%; min-width: 0; gap: 8px 16px; justify-content: flex-start; }
  .header-nav a { min-width: 0; max-width: 100%; font-size: .78rem; white-space: normal; }
  .hero { min-height: 0; padding: 48px 0 40px; }
  .hero-copy { width: 100%; min-width: 0; }
  h1 { font-size: clamp(1.85rem, 8vw, 2.55rem); overflow-wrap: normal; word-break: normal; }
  .orbit-art { width: 260px; height: 260px; top: 8px; inset-inline-end: -180px; opacity: .35; }
  .orbit-core { inset: 95px; }
  .orbit-core img { width: 50px; height: 50px; }
  .section-heading { align-items: start; flex-direction: column; }
  .section-heading > div, .language-control { width: 100%; min-width: 0; }
  .language-control select { width: 100%; min-width: 0; }
  .tools { align-items: stretch; flex-wrap: wrap; }
  .search-control { min-width: 0; flex-basis: 100%; max-width: none; }
  .results-status { min-width: 0; flex: 1; align-self: center; overflow-wrap: anywhere; }
  .authority-grid { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .authority-card, .card-link, .card-top { min-width: 0; }
  .card-link { min-height: 174px; }
  .card-footer { flex-wrap: wrap; }
  .notice > div { min-width: 0; overflow-wrap: anywhere; }
  .page-footer, .page-footer > * { min-width: 0; overflow-wrap: anywhere; }
  .page-footer { flex-direction: column; }
}
@media (max-width: 360px) {
  .site-header, main { width: calc(100% - 24px); }
  .site-header { gap: 8px 12px; }
  .header-nav { gap: 8px 12px; }
  .hero h1 {
    font-size: clamp(1.45rem, 7vw, 1.75rem);
    line-height: 1.2;
  }
  .notice { gap: 10px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
@media (forced-colors: active) {
  .authority-card, .notice, select, input, button { border: 1px solid CanvasText; }
  .status-dot, .orbit-node { background: Highlight; }
}
