@import url("assets/design-tokens.css");
@import url("assets/admin.css");
* { box-sizing: border-box; border-radius: 0; }
html, body { min-height: 100%; }
body { min-height: 100dvh; margin: 0; background: var(--surface); color: var(--ink); font: 16px/1.55 var(--font-mono); }
::selection { background: var(--ink); color: var(--surface); }
a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { text-decoration-thickness: 2px; }
button { font: inherit; cursor: pointer; }
:focus-visible { outline: 2px solid currentColor; outline-offset: 2px; }

.page { width: min(100% - 56px, 1120px); min-height: 100dvh; margin: 0 auto; padding: 48px 0 var(--space-6); }
.masthead { display: flex; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; gap: var(--space-6); padding-bottom: var(--space-5); }
.masthead > :first-child { min-width: 0; }
.meta, .eyebrow { margin: 0; color: var(--muted); font-size: var(--label-size); font-weight: 600; letter-spacing: var(--label-tracking); text-transform: uppercase; }
h1 { margin: 4px 0 8px; font: 400 clamp(3rem, 7vw, 6.5rem)/.95 var(--font-display); }
.header-actions { display: flex; gap: var(--space-2); }
.theme-toggle, .language-toggle { display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 1px solid var(--ink); background: var(--ink); color: var(--surface); font-size: var(--label-size); font-weight: 600; letter-spacing: var(--label-tracking); text-decoration: none; }
.language-toggle { border-color: var(--border); background: var(--surface); color: var(--ink); }
.language-toggle:hover { border-color: var(--ink); }
.theme-toggle { font-size: 17px; }
.subtitle { max-width: 70ch; margin: 0; color: var(--muted); font-size: var(--label-size); letter-spacing: var(--label-tracking); line-height: 1.45; text-transform: uppercase; }

.link-group { margin-top: var(--space-6); }
.empty-state { margin: var(--space-6) 0; color: var(--muted); }
.directory-head { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: baseline; gap: var(--space-4); margin-bottom: var(--space-3); }
.directory-head h2 { margin: 0; color: var(--ink); font: 400 clamp(2rem, 4vw, 3.6rem)/.95 var(--font-display); letter-spacing: 0; text-transform: none; }
.directory-count { white-space: nowrap; text-align: right; }
.link-list { margin: 0; padding: 0; list-style: none; }
.link-list li + li { margin-top: var(--space-1); }
.link-row { display: flex; align-items: center; justify-content: space-between; gap: var(--space-4); min-height: 56px; padding: var(--space-3) 0; color: var(--ink); font-weight: 600; text-decoration: none; }
.link-row:hover { text-decoration: underline; text-underline-offset: 4px; }
.link-label { display: inline-flex; align-items: center; gap: var(--space-3); min-width: 0; }
.link-icon { display: grid; flex: 0 0 18px; width: 18px; height: 18px; place-items: center; color: var(--muted); }
.link-icon img { grid-area: 1 / 1; width: 18px; height: 18px; }
.link-icon .icon-light { display: none; }
body.theme-invert .link-icon .icon-dark { display: none; }
body.theme-invert .link-icon .icon-light { display: block; }
.link-indicator { display: grid; flex: 0 0 22px; width: 22px; height: 22px; place-items: center; color: var(--muted); }
.link-indicator svg { display: block; width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linecap: square; stroke-linejoin: miter; }

.footer { display: flex; justify-content: space-between; gap: var(--space-4); margin-top: clamp(48px, 8vw, 96px); padding-top: var(--space-4); }
.footer a { text-decoration: none; }.footer a:hover { text-decoration: underline; }

@media (max-width: 719px) {
  .page { width: min(100% - 32px, 1120px); padding-top: var(--space-6); }
  .masthead { gap: var(--space-3); }
  .masthead > :first-child { flex: 1 1 12rem; overflow-wrap: anywhere; }
  .masthead .header-actions { margin-left: auto; }
  .footer { flex-direction: column; }
}

/* Preserve the original palette with legible secondary text. */
body{--muted:#aaa}body.theme-invert{--muted:#626262}
