/* Links — flat contact sheet. No cards, glass, or glow. */

@font-face {
  font-family: "Asvestos Caveat";
  src: url("/links/fonts/caveat-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Caveat";
  src: url("/links/fonts/caveat-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Script";
  src: url("/links/fonts/dancing-script-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Script";
  src: url("/links/fonts/dancing-script-latin-700.woff2") format("woff2");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Literary";
  src: url("/links/fonts/cormorant-garamond-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Literary";
  src: url("/links/fonts/cormorant-garamond-latin-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Asvestos Instrument";
  src: url("/links/fonts/instrument-serif-latin-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --ink: #0a0a0b;
  --surface: #121214;
  --parchment: #f2eee6;
  --muted: #c2bcb2;
  --gold: #c9a227;
  --border: rgba(245, 240, 232, 0.16);
  --danger: #e07a7a;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
  --display: Georgia, "Times New Roman", ui-serif, serif;
}

[data-theme="parchment"] {
  --ink: #f2eee6;
  --surface: #e8e2d6;
  --parchment: #1a1814;
  --muted: #5c564c;
  --gold: #8a7020;
  --border: rgba(26, 24, 20, 0.14);
  --danger: #b54a4a;
}

[data-theme="midnight"] {
  --ink: #070b14;
  --surface: #10182a;
  --parchment: #e8eef8;
  --muted: #9aabc4;
  --gold: #6eb6ff;
  --border: rgba(232, 238, 248, 0.14);
  --danger: #e07a7a;
}

[data-theme="rose"] {
  --ink: #12090c;
  --surface: #1c1014;
  --parchment: #f6ebe8;
  --muted: #c4a8a2;
  --gold: #d4a09a;
  --border: rgba(246, 235, 232, 0.14);
  --danger: #e07a7a;
}

[data-theme="forest"] {
  --ink: #08110c;
  --surface: #101a14;
  --parchment: #e8f0e9;
  --muted: #a3b5a8;
  --gold: #c4b07a;
  --border: rgba(232, 240, 233, 0.14);
  --danger: #e07a7a;
}

[data-theme="slate"] {
  --ink: #0e1116;
  --surface: #171b22;
  --parchment: #e6eaf0;
  --muted: #9aa3b2;
  --gold: #a8b4c8;
  --border: rgba(230, 234, 240, 0.14);
  --danger: #e07a7a;
}

[data-theme="sand"] {
  --ink: #f4efe6;
  --surface: #ebe4d6;
  --parchment: #2a241c;
  --muted: #6e6456;
  --gold: #b07a3a;
  --border: rgba(42, 36, 28, 0.12);
  --danger: #b54a4a;
}

[data-theme="ocean"] {
  --ink: #061018;
  --surface: #0c1a24;
  --parchment: #e4f2f6;
  --muted: #8fb0bc;
  --gold: #3ec7c2;
  --border: rgba(228, 242, 246, 0.14);
  --danger: #e07a7a;
}

[data-theme="ember"] {
  --ink: #140a06;
  --surface: #1e100a;
  --parchment: #f6ebe4;
  --muted: #c4a690;
  --gold: #e07a3a;
  --border: rgba(246, 235, 228, 0.14);
  --danger: #e07a7a;
}

[data-theme="violet"] {
  --ink: #0c0814;
  --surface: #151020;
  --parchment: #efe8f8;
  --muted: #b0a0c8;
  --gold: #b48cff;
  --border: rgba(239, 232, 248, 0.14);
  --danger: #e07a7a;
}

[data-theme="mono"] {
  --ink: #0c0c0c;
  --surface: #161616;
  --parchment: #f0f0f0;
  --muted: #a0a0a0;
  --gold: #ffffff;
  --border: rgba(240, 240, 240, 0.14);
  --danger: #e07a7a;
}

[data-theme="contrast"] {
  --ink: #ffffff;
  --surface: #f2f2f2;
  --parchment: #000000;
  --muted: #444444;
  --gold: #000000;
  --border: rgba(0, 0, 0, 0.16);
  --danger: #b00020;
}

[data-font="system"] {
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}
[data-font="serif"] {
  --font: Georgia, "Times New Roman", ui-serif, serif;
}
[data-font="mono"] {
  --font: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-font="rounded"] {
  --font: "Avenir Next", "Segoe UI", system-ui, sans-serif;
}
[data-font="condensed"] {
  --font: "Arial Narrow", "Helvetica Neue Condensed", system-ui, sans-serif;
}
[data-font="hand"] {
  --font: "Asvestos Caveat", "Segoe Print", "Bradley Hand", cursive;
}
[data-font="script"] {
  --font: "Asvestos Script", "Snell Roundhand", "Segoe Script", cursive;
}
[data-font="literary"] {
  --font: "Asvestos Literary", "Asvestos Instrument", Georgia, ui-serif, serif;
}

[data-display="serif"] {
  --display: Georgia, "Times New Roman", ui-serif, serif;
}
[data-display="sans"] {
  --display: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
[data-display="mono"] {
  --display: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
[data-display="display"] {
  --display: "Arial Black", Impact, Haettenschweiler, sans-serif;
}
[data-display="hand"] {
  --display: "Asvestos Caveat", "Segoe Print", "Bradley Hand", cursive;
}
[data-display="script"] {
  --display: "Asvestos Script", "Snell Roundhand", "Segoe Script", cursive;
}
[data-display="literary"] {
  --display: "Asvestos Literary", "Asvestos Instrument", Georgia, ui-serif, serif;
}
[data-display="instrument"] {
  --display: "Asvestos Instrument", "Asvestos Literary", Georgia, ui-serif, serif;
}

/* Handwritten display names breathe a little more. */
html[data-display="hand"] .display-name,
html[data-display="script"] .display-name {
  white-space: normal;
  text-wrap: balance;
  line-height: 1.15;
  letter-spacing: 0.01em;
}
html[data-font="hand"] .bio,
html[data-font="script"] .bio,
html[data-font="hand"] .link-label,
html[data-font="script"] .link-label {
  letter-spacing: 0.01em;
}
html[data-font="hand"] .link-label,
html[data-font="script"] .link-label {
  font-size: 1.02em;
}

/* —— Layout templates ——
   data-layout lives on <html> (and #app). Each template owns identity,
   links, and spacing — and resets .link-row’s default bleed margins. */

html[data-layout="centered"] .wordmark {
  justify-content: center;
}
html[data-layout="centered"] .identity {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
}
html[data-layout="centered"] .identity-text {
  width: 100%;
  align-items: center;
}
html[data-layout="centered"] .avatar-wrap,
html[data-layout="centered"] .avatar-btn,
html[data-layout="centered"] .avatar,
html[data-layout="centered"] .avatar-fallback {
  width: 5.75rem;
  height: 5.75rem;
}
html[data-layout="centered"] .avatar-fallback {
  font-size: 1.45rem;
}
html[data-layout="centered"] .display-name {
  white-space: normal;
  text-wrap: balance;
}
html[data-layout="centered"] .bio,
html[data-layout="centered"] .meta-line,
html[data-layout="centered"] .links-empty {
  text-align: center;
}
html[data-layout="centered"] .actions {
  align-items: stretch;
}
html[data-layout="centered"] .emergency {
  text-align: center;
  align-items: center;
}
html[data-layout="centered"] .emergency-actions {
  justify-content: center;
}

html[data-layout="stack"] .shell {
  gap: 1.25rem;
}
html[data-layout="stack"] .identity {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.95rem;
}
html[data-layout="stack"] .avatar-wrap,
html[data-layout="stack"] .avatar-btn,
html[data-layout="stack"] .avatar,
html[data-layout="stack"] .avatar-fallback {
  width: 5rem;
  height: 5rem;
}
html[data-layout="stack"] .avatar-fallback {
  font-size: 1.3rem;
}
html[data-layout="stack"] .display-name {
  white-space: normal;
}
html[data-layout="stack"] .hairline {
  display: none;
}
html[data-layout="stack"] .links {
  gap: 0.5rem;
}
html[data-layout="stack"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.9rem 0.95rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
}
html[data-layout="stack"] .link-row:hover,
html[data-layout="stack"] .link-row:focus-visible {
  background: color-mix(in srgb, var(--surface) 80%, var(--gold) 8%);
  border-color: color-mix(in srgb, var(--gold) 45%, var(--border));
}
html[data-layout="stack"] .link-icon {
  background: color-mix(in srgb, var(--parchment) 8%, transparent);
}

html[data-layout="compact"] .shell {
  gap: 0.7rem;
  padding-left: 1rem;
  padding-right: 1rem;
}
html[data-layout="compact"] .wordmark-asvestos {
  font-size: 0.88rem;
}
html[data-layout="compact"] .wordmark-links {
  font-size: 0.65rem;
}
html[data-layout="compact"] .identity {
  gap: 0.7rem;
}
html[data-layout="compact"] .avatar-wrap,
html[data-layout="compact"] .avatar-btn,
html[data-layout="compact"] .avatar,
html[data-layout="compact"] .avatar-fallback {
  width: 2.85rem;
  height: 2.85rem;
}
html[data-layout="compact"] .avatar-fallback {
  font-size: 0.9rem;
}
html[data-layout="compact"] .display-name {
  font-size: 1.15rem;
}
html[data-layout="compact"] .handle {
  font-size: 0.8rem;
}
html[data-layout="compact"] .bio {
  font-size: 0.86rem;
  line-height: 1.4;
}
html[data-layout="compact"] .links {
  gap: 0.1rem;
}
html[data-layout="compact"] .link-row {
  margin: 0 -0.35rem;
  width: calc(100% + 0.7rem);
  padding: 0.55rem 0.35rem;
  column-gap: 0.55rem;
  grid-template-columns: 1.85rem minmax(0, 1fr) 0.9rem;
}
html[data-layout="compact"] .link-icon {
  width: 1.85rem;
  height: 1.85rem;
  border-radius: 4px;
}
html[data-layout="compact"] .link-icon .link-glyph {
  width: 1.2rem;
  height: 1.2rem;
}
html[data-layout="compact"] .link-label {
  font-size: 0.98rem;
}
html[data-layout="compact"] .link-sub {
  font-size: 0.7rem;
}
html[data-layout="compact"] .actions {
  margin-top: 0.65rem;
  padding-top: 0.7rem;
  gap: 0.45rem;
}
html[data-layout="compact"] .solid-btn,
html[data-layout="compact"] .danger-btn {
  height: 2.45rem;
  font-size: 0.82rem;
}

html[data-layout="magazine"] .shell {
  gap: 1.35rem;
  width: min(100%, 28rem);
}
html[data-layout="magazine"] .wordmark-asvestos {
  font-size: 0.92rem;
  letter-spacing: 0.01em;
}
html[data-layout="magazine"] .identity {
  flex-direction: row-reverse;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}
html[data-layout="magazine"] .identity-text {
  flex: 1;
  min-width: 0;
  gap: 0.28rem;
}
html[data-layout="magazine"] .display-name {
  font-family: var(--display);
  font-size: clamp(1.75rem, 7vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  font-weight: 400;
  white-space: normal;
  text-wrap: balance;
}
html[data-layout="magazine"] .avatar-wrap,
html[data-layout="magazine"] .avatar-btn,
html[data-layout="magazine"] .avatar,
html[data-layout="magazine"] .avatar-fallback {
  width: 3.25rem;
  height: 3.25rem;
}
html[data-layout="magazine"] .avatar-fallback {
  font-size: 0.95rem;
}
html[data-layout="magazine"] .bio {
  font-size: 1.02rem;
  line-height: 1.55;
  max-width: 36ch;
}
html[data-layout="magazine"] .hairline {
  background: var(--parchment);
  opacity: 0.22;
}
html[data-layout="magazine"] .links {
  gap: 0;
}
html[data-layout="magazine"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.95rem 0;
  border-radius: 0;
  border: 0;
  border-top: 1px solid var(--border);
  grid-template-columns: 2.35rem minmax(0, 1fr) 1.1rem;
  column-gap: 0.75rem;
}
html[data-layout="magazine"] .link-row:last-child {
  border-bottom: 1px solid var(--border);
}
html[data-layout="magazine"] .link-row:hover,
html[data-layout="magazine"] .link-row:focus-visible {
  background: transparent;
  border-color: var(--border);
  border-top-color: var(--border);
}
html[data-layout="magazine"] .link-icon {
  background: transparent;
  border-color: transparent;
}
html[data-layout="magazine"] .link-label {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.2rem;
  letter-spacing: -0.01em;
}
html[data-layout="magazine"] .link-go {
  opacity: 0.4;
}

html[data-layout="terminal"] .shell {
  gap: 0.85rem;
  font-variant-numeric: tabular-nums;
}
html[data-layout="terminal"] .wordmark-asvestos,
html[data-layout="terminal"] .wordmark-links,
html[data-layout="terminal"] .display-name,
html[data-layout="terminal"] .handle,
html[data-layout="terminal"] .bio,
html[data-layout="terminal"] .meta-line,
html[data-layout="terminal"] .link-label,
html[data-layout="terminal"] .link-sub,
html[data-layout="terminal"] .solid-btn,
html[data-layout="terminal"] .ghost-btn {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
html[data-layout="terminal"] .wordmark-asvestos {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
html[data-layout="terminal"] .wordmark-links {
  font-style: normal;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.62rem;
}
html[data-layout="terminal"] .identity {
  align-items: flex-start;
  gap: 0.85rem;
}
html[data-layout="terminal"] .avatar-btn,
html[data-layout="terminal"] .avatar,
html[data-layout="terminal"] .avatar-fallback {
  border-radius: 2px;
}
html[data-layout="terminal"] .avatar-wrap,
html[data-layout="terminal"] .avatar-btn,
html[data-layout="terminal"] .avatar,
html[data-layout="terminal"] .avatar-fallback {
  width: 3.25rem;
  height: 3.25rem;
}
html[data-layout="terminal"] .display-name {
  font-size: 1.05rem;
  letter-spacing: 0.02em;
  white-space: normal;
}
html[data-layout="terminal"] .handle::before {
  content: "> ";
  color: var(--gold);
}
html[data-layout="terminal"] .hairline {
  opacity: 0.55;
}
html[data-layout="terminal"] .links {
  gap: 0.2rem;
}
html[data-layout="terminal"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.55rem 0.65rem;
  border-radius: 0;
  border: 0;
  border-left: 2px solid var(--gold);
  background: color-mix(in srgb, var(--surface) 70%, transparent);
}
html[data-layout="terminal"] .link-row:hover,
html[data-layout="terminal"] .link-row:focus-visible {
  background: color-mix(in srgb, var(--gold) 12%, var(--surface));
  border-color: transparent;
  border-left-color: var(--gold);
}
html[data-layout="terminal"] .link-icon {
  background: transparent;
  border-color: transparent;
  border-radius: 0;
}
html[data-layout="terminal"] .link-icon .link-glyph {
  width: 1.2rem;
  height: 1.2rem;
}
html[data-layout="terminal"] .link-label {
  font-weight: 500;
  font-size: 0.95rem;
}
html[data-layout="terminal"] .solid-btn {
  border-radius: 0;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 0.75rem;
}

html[data-layout="pill"] .wordmark {
  justify-content: center;
}
html[data-layout="pill"] .identity {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 0.9rem;
}
html[data-layout="pill"] .identity-text {
  width: 100%;
  align-items: center;
}
html[data-layout="pill"] .display-name {
  white-space: normal;
  text-wrap: balance;
}
html[data-layout="pill"] .bio,
html[data-layout="pill"] .meta-line {
  text-align: center;
}
html[data-layout="pill"] .avatar-wrap,
html[data-layout="pill"] .avatar-btn,
html[data-layout="pill"] .avatar,
html[data-layout="pill"] .avatar-fallback {
  width: 6rem;
  height: 6rem;
  border-radius: 999px;
}
html[data-layout="pill"] .avatar-fallback {
  font-size: 1.5rem;
}
html[data-layout="pill"] .links {
  gap: 0.55rem;
}
html[data-layout="pill"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.8rem 1.05rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 88%, transparent);
  grid-template-columns: 2.1rem minmax(0, 1fr) 1rem;
  column-gap: 0.7rem;
}
html[data-layout="pill"] .link-row:hover,
html[data-layout="pill"] .link-row:focus-visible {
  background: color-mix(in srgb, var(--surface) 70%, var(--gold) 10%);
  border-color: color-mix(in srgb, var(--gold) 50%, var(--border));
}
html[data-layout="pill"] .link-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
}
html[data-layout="pill"] .link-icon .link-glyph {
  width: 1.25rem;
  height: 1.25rem;
}
html[data-layout="pill"] .solid-btn,
html[data-layout="pill"] .danger-btn {
  border-radius: 999px;
}
html[data-layout="pill"] .ghost-btn {
  text-align: center;
}
html[data-layout="pill"] .emergency {
  text-align: center;
  align-items: center;
}
html[data-layout="pill"] .emergency-actions {
  justify-content: center;
}
html[data-layout="pill"] .emergency-actions .danger-btn {
  border-radius: 999px;
}

html[data-layout="banner"] .identity {
  flex-direction: column;
  align-items: stretch;
  gap: 1rem;
}
html[data-layout="banner"] .avatar-wrap {
  width: 100%;
  aspect-ratio: 2.35 / 1;
  height: auto;
  position: relative;
  flex-shrink: 0;
}
html[data-layout="banner"] .avatar-btn {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border-radius: 8px;
  overflow: hidden;
  cursor: zoom-in;
}
html[data-layout="banner"] .avatar,
html[data-layout="banner"] .avatar-fallback {
  width: 100%;
  height: 100%;
  border-radius: 0;
  object-fit: cover;
}
html[data-layout="banner"] .avatar-fallback {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  background: var(--surface);
}
html[data-layout="banner"] .identity-text {
  gap: 0.2rem;
}
html[data-layout="banner"] .display-name {
  font-size: clamp(1.55rem, 6vw, 1.85rem);
  white-space: normal;
  text-wrap: balance;
}
html[data-layout="banner"] .links {
  gap: 0.4rem;
}
html[data-layout="banner"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.85rem 0.9rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: color-mix(in srgb, var(--surface) 75%, transparent);
}
html[data-layout="banner"] .link-row:hover,
html[data-layout="banner"] .link-row:focus-visible {
  background: color-mix(in srgb, var(--surface) 65%, var(--gold) 8%);
  border-color: color-mix(in srgb, var(--gold) 40%, var(--border));
}

/* Salon — generous, centered, ornamental */
html[data-layout="salon"] .shell {
  gap: 1.5rem;
  width: min(100%, 26rem);
  padding-top: max(2rem, env(safe-area-inset-top));
}
html[data-layout="salon"] .wordmark {
  justify-content: center;
}
html[data-layout="salon"] .wordmark-asvestos {
  font-family: var(--display);
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 400;
}
html[data-layout="salon"] .wordmark-links {
  display: none;
}
html[data-layout="salon"] .identity {
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 1.1rem;
}
html[data-layout="salon"] .identity-text {
  width: 100%;
  align-items: center;
  gap: 0.35rem;
}
html[data-layout="salon"] .avatar-wrap,
html[data-layout="salon"] .avatar-btn,
html[data-layout="salon"] .avatar,
html[data-layout="salon"] .avatar-fallback {
  width: 6.5rem;
  height: 6.5rem;
}
html[data-layout="salon"] .display-name {
  font-family: var(--display);
  font-size: clamp(1.9rem, 7vw, 2.45rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  white-space: normal;
  text-wrap: balance;
  line-height: 1.05;
}
html[data-layout="salon"] .handle {
  letter-spacing: 0.06em;
  font-size: 0.82rem;
  text-transform: lowercase;
}
html[data-layout="salon"] .bio,
html[data-layout="salon"] .meta-line {
  text-align: center;
  max-width: 28ch;
  margin-inline: auto;
}
html[data-layout="salon"] .hairline {
  width: 3.5rem;
  margin-inline: auto;
  background: var(--gold);
  opacity: 0.55;
}
html[data-layout="salon"] .links {
  gap: 0.35rem;
  max-width: 20rem;
  margin-inline: auto;
  width: 100%;
}
html[data-layout="salon"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.75rem 0.5rem;
  justify-items: center;
  text-align: center;
  grid-template-columns: 1fr;
  gap: 0.35rem;
}
html[data-layout="salon"] .link-icon {
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 999px;
  margin-inline: auto;
}
html[data-layout="salon"] .link-icon .link-glyph {
  width: 1.55rem;
  height: 1.55rem;
}
html[data-layout="salon"] .link-go {
  display: none;
}
html[data-layout="salon"] .link-label {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.15rem;
}
html[data-layout="salon"] .link-sub {
  text-align: center;
}
html[data-layout="salon"] .actions {
  max-width: 20rem;
  margin-inline: auto;
  width: 100%;
}
html[data-layout="salon"] .emergency {
  text-align: center;
  align-items: center;
}

/* Rail — timeline links */
html[data-layout="rail"] .shell {
  gap: 1.2rem;
}
html[data-layout="rail"] .identity {
  gap: 1rem;
}
html[data-layout="rail"] .display-name {
  white-space: normal;
}
html[data-layout="rail"] .links {
  gap: 0;
  position: relative;
  padding-left: 0.35rem;
}
html[data-layout="rail"] .links::before {
  content: "";
  position: absolute;
  left: 1.05rem;
  top: 0.4rem;
  bottom: 0.4rem;
  width: 1px;
  background: var(--border);
}
html[data-layout="rail"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.85rem 0.5rem 0.85rem 0;
  border: 0;
  border-radius: 0;
  grid-template-columns: 2.1rem minmax(0, 1fr) 1rem;
  column-gap: 0.75rem;
  background: transparent;
}
html[data-layout="rail"] .link-row:hover,
html[data-layout="rail"] .link-row:focus-visible {
  background: transparent;
  border-color: transparent;
}
html[data-layout="rail"] .link-icon {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--gold);
  position: relative;
  z-index: 1;
}
html[data-layout="rail"] .link-icon .link-glyph {
  width: 1.25rem;
  height: 1.25rem;
}
html[data-layout="rail"] .link-label {
  font-size: 1.05rem;
}

/* Split — asymmetric mark + copy */
html[data-layout="split"] .shell {
  gap: 1.35rem;
  width: min(100%, 28rem);
}
html[data-layout="split"] .identity {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: end;
  column-gap: 1.15rem;
  row-gap: 0.75rem;
  border-left: 2px solid var(--gold);
  padding-left: 1rem;
}
html[data-layout="split"] .avatar-wrap {
  grid-row: 1 / span 2;
}
html[data-layout="split"] .avatar-wrap,
html[data-layout="split"] .avatar-btn,
html[data-layout="split"] .avatar,
html[data-layout="split"] .avatar-fallback {
  width: 4.75rem;
  height: 4.75rem;
  border-radius: 4px;
}
html[data-layout="split"] .identity-text {
  gap: 0.25rem;
}
html[data-layout="split"] .display-name {
  font-size: clamp(1.55rem, 6vw, 1.95rem);
  white-space: normal;
  text-wrap: balance;
  letter-spacing: -0.025em;
}
html[data-layout="split"] .bio {
  max-width: 34ch;
}
html[data-layout="split"] .links {
  gap: 0.25rem;
}
html[data-layout="split"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.8rem 0;
  border-radius: 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  grid-template-columns: 2.35rem minmax(0, 1fr) 1.1rem;
  column-gap: 0.75rem;
}
html[data-layout="split"] .link-icon {
  background: transparent;
  border-color: transparent;
}
html[data-layout="split"] .link-label {
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Marque — oversized name, quiet links */
html[data-layout="marque"] .shell {
  gap: 1.1rem;
  width: min(100%, 30rem);
}
html[data-layout="marque"] .wordmark {
  opacity: 0.7;
}
html[data-layout="marque"] .identity {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.85rem;
}
html[data-layout="marque"] .avatar-wrap,
html[data-layout="marque"] .avatar-btn,
html[data-layout="marque"] .avatar,
html[data-layout="marque"] .avatar-fallback {
  width: 3rem;
  height: 3rem;
}
html[data-layout="marque"] .display-name {
  font-family: var(--display);
  font-size: clamp(2.2rem, 10vw, 3.1rem);
  line-height: 0.95;
  letter-spacing: -0.04em;
  white-space: normal;
  text-wrap: balance;
  font-weight: 400;
  max-width: 12ch;
}
html[data-layout="marque"] .handle {
  font-size: 0.85rem;
  opacity: 0.9;
}
html[data-layout="marque"] .bio {
  font-size: 1rem;
  max-width: 32ch;
}
html[data-layout="marque"] .hairline {
  opacity: 0.35;
}
html[data-layout="marque"] .links {
  gap: 0;
}
html[data-layout="marque"] .link-row {
  margin: 0;
  width: 100%;
  padding: 0.7rem 0;
  border: 0;
  border-radius: 0;
  grid-template-columns: 2.1rem minmax(0, 1fr) auto;
  column-gap: 0.85rem;
}
html[data-layout="marque"] .link-icon {
  width: 2.1rem;
  height: 2.1rem;
  background: transparent;
  border-color: transparent;
}
html[data-layout="marque"] .link-icon .link-glyph {
  width: 1.35rem;
  height: 1.35rem;
}
html[data-layout="marque"] .link-label {
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}
html[data-layout="marque"] .link-sub {
  display: none;
}
html[data-layout="marque"] .link-go {
  font-size: 0.72rem;
  opacity: 0.55;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 500;
}

html, body {
  min-height: 100%;
  font-family: var(--font);
  background: var(--ink);
  color: var(--parchment);
  -webkit-font-smoothing: antialiased;
  font-weight: 300;
}

.shell {
  width: min(100%, 24rem);
  margin: 0 auto;
  padding: max(1.25rem, env(safe-area-inset-top)) 1.25rem max(2.5rem, env(safe-area-inset-bottom));
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
}

.center { text-align: center; }
.muted { color: var(--muted); }

.wordmark {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

.wordmark-asvestos {
  font-family: var(--display);
  font-size: 1.05rem;
  letter-spacing: -0.01em;
}

.wordmark-links {
  font-size: 0.72rem;
  font-style: italic;
  color: var(--muted);
}

.identity {
  display: flex;
  align-items: center;
  gap: 0.95rem;
}

.avatar-wrap,
.avatar-btn,
.avatar,
.avatar-fallback {
  width: 4rem;
  height: 4rem;
  flex-shrink: 0;
}

.avatar-wrap {
  position: relative;
}

.business-badge {
  position: absolute;
  top: -0.15rem;
  left: -0.15rem;
  z-index: 2;
  width: 1.45rem;
  height: 1.45rem;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-family: ui-sans-serif, system-ui, -apple-system, sans-serif;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0;
  line-height: 1;
  color: #050403;
  background: var(--gold);
  border: 2px solid var(--ink);
  pointer-events: none;
  box-sizing: border-box;
}

html[data-layout="compact"] .business-badge,
html[data-layout="marque"] .business-badge,
html[data-layout="magazine"] .business-badge,
html[data-layout="terminal"] .business-badge {
  width: 1.15rem;
  height: 1.15rem;
  font-size: 0.55rem;
  border-width: 1.5px;
}

.avatar-btn {
  appearance: none;
  border: 0;
  padding: 0;
  background: transparent;
  border-radius: 50%;
  cursor: zoom-in;
  display: block;
  -webkit-tap-highlight-color: transparent;
}

.avatar-btn:focus-visible {
  outline: 1px solid var(--gold);
  outline-offset: 3px;
}

.avatar,
.avatar-fallback {
  border-radius: 50%;
  background: #1a1a1c;
  display: block;
}

.avatar {
  object-fit: cover;
}

.avatar-fallback {
  display: grid;
  place-items: center;
  font-family: var(--display);
  font-size: 1.15rem;
  color: var(--gold);
}

.identity-text {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
}

.display-name {
  font-family: var(--display);
  font-size: clamp(1.4rem, 5.5vw, 1.65rem);
  line-height: 1.1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.handle {
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--gold);
}

.meta-line {
  font-size: 0.75rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.bio {
  font-size: 0.95rem;
  line-height: 1.5;
  color: color-mix(in srgb, var(--parchment) 78%, transparent);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.hairline {
  height: 1px;
  width: 100%;
  background: var(--border);
  border: 0;
}

.links {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.link-row {
  display: grid;
  grid-template-columns: 2.35rem minmax(0, 1fr) 1.1rem;
  align-items: center;
  column-gap: 0.85rem;
  width: 100%;
  padding: 0.95rem 0.7rem;
  margin: 0 -0.7rem;
  width: calc(100% + 1.4rem);
  border: 1px solid transparent;
  border-radius: 4px;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
  user-select: none;
  transition:
    background 0.15s ease,
    border-color 0.15s ease,
    transform 0.12s ease;
}

.link-row:hover,
.link-row:focus-visible {
  background: rgba(245, 240, 232, 0.06);
  border-color: rgba(201, 162, 39, 0.35);
  outline: none;
}

.link-row:hover .link-label,
.link-row:focus-visible .link-label {
  color: var(--gold);
}

.link-row:hover .link-go,
.link-row:focus-visible .link-go {
  color: var(--gold);
  opacity: 1;
  transform: translateX(2px);
}

.link-row:hover .link-icon,
.link-row:focus-visible .link-icon {
  transform: scale(1.06);
}

.link-row:active {
  transform: scale(0.985);
  background: rgba(201, 162, 39, 0.1);
  border-color: rgba(201, 162, 39, 0.5);
}

.link-icon {
  width: 2.35rem;
  height: 2.35rem;
  display: grid;
  place-items: center;
  border-radius: 6px;
  background: rgba(245, 240, 232, 0.06);
  border: 1px solid var(--border);
  transition: transform 0.15s ease;
  overflow: hidden;
}

.link-icon.is-light {
  background: rgba(242, 238, 230, 0.94);
  border-color: rgba(242, 238, 230, 0.55);
}

html[data-scheme="light"] .link-icon.is-light {
  background: rgba(26, 24, 20, 0.92);
  border-color: rgba(26, 24, 20, 0.45);
}

html[data-scheme="light"] .link-icon.is-light .link-glyph-local {
  filter: invert(1);
}

html[data-layout="rail"] .link-icon.is-light {
  border-color: var(--gold);
}

.link-icon .link-glyph {
  display: block;
  width: 1.55rem;
  height: 1.55rem;
  border: 0;
  object-fit: contain;
}

/* Official local SVGs: keep full color, push saturation. */
.link-icon .link-glyph-local {
  filter: saturate(1.28) brightness(1.06) contrast(1.04);
}

.link-icon.is-light .link-glyph-local {
  filter: none;
}

/* Simple-Icons path fallbacks still get a vibrance nudge. */
.link-icon .link-glyph-fallback {
  filter: saturate(1.2) brightness(1.08);
}

.link-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.link-label {
  font-weight: 700;
  font-size: 1.12rem;
  letter-spacing: 0.01em;
  line-height: 1.15;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: color 0.15s ease;
}

.link-sub {
  font-size: 0.78rem;
  font-weight: 400;
  color: var(--muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.link-go {
  font-size: 1.35rem;
  font-weight: 300;
  line-height: 1;
  color: var(--muted);
  opacity: 0.55;
  justify-self: end;
  transition: color 0.15s ease, opacity 0.15s ease, transform 0.15s ease;
}

.links-vacant {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
}

.links-empty {
  color: var(--muted);
  font-size: 0.95rem;
  text-align: center;
  padding: 0;
}

.actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  margin-top: 1.15rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
}

.actions .ghost-btn {
  width: 100%;
  justify-content: center;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem;
  align-items: center;
}

.solid-btn,
.ghost-btn,
.danger-btn,
.quiet-btn {
  appearance: none;
  font: inherit;
  cursor: pointer;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  -webkit-tap-highlight-color: transparent;
}

.solid-btn {
  width: 100%;
  height: 2.85rem;
  border: 0;
  border-radius: 2px;
  background: var(--gold);
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 500;
  letter-spacing: 0.04em;
}

.solid-btn:hover,
.solid-btn:focus-visible {
  filter: brightness(1.05);
  outline: none;
}

.ghost-btn,
.quiet-btn {
  border: 0;
  background: transparent;
  color: var(--gold);
  font-size: 0.88rem;
  font-weight: 400;
  padding: 0.2rem 0;
  height: auto;
  letter-spacing: 0.02em;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  text-decoration-thickness: 1px;
  text-decoration-color: rgba(201, 162, 39, 0.45);
}

.ghost-btn:hover,
.quiet-btn:hover,
.ghost-btn:focus-visible,
.quiet-btn:focus-visible {
  text-decoration-color: var(--gold);
  outline: none;
}

.danger-btn {
  width: 100%;
  height: 2.85rem;
  border: 0;
  border-radius: 2px;
  background: var(--danger);
  color: var(--parchment);
  font-size: 0.88rem;
  font-weight: 500;
}

.emergency {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.emergency-kicker {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--danger);
}

.emergency-name {
  font-family: var(--display);
  font-size: 1.1rem;
}

.emergency-phone {
  color: #ffb4ab;
  font-size: 0.9rem;
}

.emergency-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.55rem;
  align-items: center;
}

.emergency-actions .danger-btn {
  width: auto;
  min-width: 6.5rem;
  padding: 0 1rem;
}

.state {
  padding: 2rem 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  align-items: flex-start;
}

.state h1 {
  font-family: var(--display);
  font-size: 1.5rem;
  font-weight: 400;
}

.state.danger h1 { color: var(--danger); }

.state-card {
  padding: 2rem 0 1.25rem;
  gap: 0.85rem;
  flex: 1 0 auto;
}

.state-card-brand {
  display: flex;
  align-items: center;
  gap: 1rem;
  margin-bottom: 0.35rem;
}

.state-card-appicon {
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 1.05rem;
  flex-shrink: 0;
  display: block;
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.28);
}

.state-card-brand-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  min-width: 0;
}

.state-card-appname {
  font-family: var(--display);
  font-size: 1.85rem;
  font-weight: 400;
  line-height: 1.05;
  color: var(--parchment);
}

.state-card-byline {
  font-family: var(--font);
  font-size: 0.98rem;
  line-height: 1.3;
  color: var(--muted);
}

.state-card h1 {
  margin-top: 0.15rem;
}

.store-badges {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  width: 100%;
  margin-top: 1.35rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

.store-badge {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  min-height: 3.25rem;
  padding: 0.72rem 1rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--parchment) 4%, transparent);
  box-sizing: border-box;
}

.store-badge.is-soon {
  opacity: 0.52;
  pointer-events: none;
}

.store-badge-icon {
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  color: var(--parchment);
}

.store-badge-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.store-badge-copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.12rem;
  flex: 1;
  min-width: 0;
}

.store-badge-kicker {
  font-family: var(--font);
  font-size: 0.625rem;
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--parchment);
}

.store-badge-kicker-caps {
  font-weight: 300;
  letter-spacing: 0.02em;
}

.store-badge-name {
  font-family: var(--font);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1;
  color: var(--parchment);
}

.store-badge-soon {
  font-family: var(--font);
  font-size: 0.75rem;
  color: var(--muted);
  white-space: nowrap;
}

.state-card .muted,
.state-card-detail {
  font-size: 1rem;
  line-height: 1.55;
  max-width: none;
}

html.state-card-page .shell,
.shell.state-card-page {
  padding-left: max(1.35rem, env(safe-area-inset-left));
  padding-right: max(1.35rem, env(safe-area-inset-right));
  padding-top: max(1.75rem, env(safe-area-inset-top));
  padding-bottom: max(2.75rem, env(safe-area-inset-bottom));
  min-height: 100vh;
  min-height: 100dvh;
}

.state-card-footer {
  width: 100%;
  margin-top: auto;
  padding-top: 2.5rem;
}

.state-card-motto {
  font-family: var(--font);
  font-size: 0.92rem;
  line-height: 1.45;
  color: var(--muted);
  margin-bottom: 0.4rem;
}

.state-card-copy {
  font-family: var(--font);
  font-size: 0.82rem;
  line-height: 1.3;
  color: color-mix(in srgb, var(--muted) 78%, transparent);
}

@media (min-width: 520px) {
  .store-badges {
    max-width: 18rem;
  }
}

.sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(0, 0, 0, 0.7);
  display: flex;
  align-items: flex-end;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.15s ease;
  padding: 0;
}

.sheet-backdrop.open { opacity: 1; }

.sheet {
  width: min(100%, 24rem);
  background: var(--ink);
  border-top: 1px solid var(--border);
  border-radius: 0;
  padding: 1.1rem 1.25rem max(1.25rem, env(safe-area-inset-bottom));
  transform: translateY(10px);
  transition: transform 0.15s ease;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.sheet-backdrop.open .sheet { transform: translateY(0); }

.sheet-handle {
  display: none;
}

.sheet-kicker {
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  width: 100%;
}

.sheet-title {
  font-family: var(--display);
  font-size: 1.25rem;
  margin: 0.25rem 0 0.85rem;
  width: 100%;
}

.qr-frame {
  background: #f7f3ea;
  border-radius: 2px;
  padding: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.85rem;
  width: 12.5rem;
  max-width: calc(100% - 0.5rem);
  box-sizing: border-box;
}

.qr-frame svg {
  width: 100%;
  height: auto;
  aspect-ratio: 1;
  display: block;
}

.sheet-url {
  font-size: 0.75rem;
  word-break: break-all;
  margin-bottom: 0.9rem;
  color: var(--muted);
  width: 100%;
}

.sheet-actions {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  align-items: stretch;
  width: 100%;
}

.sheet-actions .solid-btn,
.sheet-actions .ghost-btn {
  width: 100%;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(7, 7, 8, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  cursor: zoom-out;
}

.lightbox.open { opacity: 1; }

.lightbox-img {
  max-width: min(92vw, 28rem);
  max-height: min(78vh, 28rem);
  width: auto;
  height: auto;
  object-fit: contain;
  cursor: default;
}

.lightbox-close {
  position: absolute;
  top: max(0.75rem, env(safe-area-inset-top));
  right: max(0.75rem, env(safe-area-inset-right));
  appearance: none;
  background: transparent;
  border: 0;
  color: var(--parchment);
  width: 2.4rem;
  height: 2.4rem;
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: max(1.25rem, env(safe-area-inset-bottom));
  transform: translate(-50%, 8px);
  z-index: 50;
  background: var(--surface);
  color: var(--parchment);
  border: 1px solid var(--border);
  padding: 0.5rem 0.85rem;
  border-radius: 2px;
  font-size: 0.82rem;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.15s ease, transform 0.15s ease;
  max-width: 90vw;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.toast.show {
  opacity: 1;
  transform: translate(-50%, 0);
}

.loading-pulse { color: var(--muted); }

/* —— Skeleton loading state —— */
.skeleton { display: flex; flex-direction: column; gap: 1.15rem; }
.skel-row { display: flex; align-items: center; gap: 0.95rem; }
.skel-bone {
  background: color-mix(in srgb, var(--parchment) 7%, transparent);
  border-radius: 4px;
  animation: shimmer 1.6s ease infinite;
}
.skel-circle { border-radius: 50%; }
.skel-text { height: 0.85rem; width: 100%; }
.skel-text-sm { height: 0.65rem; width: 60%; }
.skel-text-lg { height: 1.3rem; width: 75%; }
.skel-link {
  height: 3rem;
  width: 100%;
  border-radius: 6px;
}
@keyframes shimmer {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.7; }
}

/* —— Profile fade-in —— */
.shell { opacity: 0; transition: opacity 0.18s ease; }
.shell.visible { opacity: 1; }
.shell.instant { opacity: 1; transition: none; }

/* —— Theme color transition —— */
html, body {
  transition: background-color 0.25s ease, color 0.25s ease;
}

/* —— Toast a11y —— */
.toast { pointer-events: none; }

/* —— Empty-state mark —— */
.links-empty-mark {
  width: 3rem;
  height: 3rem;
  margin: 0 auto 0.5rem;
  border-radius: 50%;
  border: 1.5px solid color-mix(in srgb, var(--gold) 35%, transparent);
  display: grid;
  place-items: center;
  color: var(--gold);
  opacity: 0.5;
  font-family: var(--display);
  font-size: 1.2rem;
}

/* —— Link row subtitle —— */
.link-sub:empty { display: none; }

.noscript-msg {
  padding: 2rem 1.25rem;
  color: var(--muted);
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
  }
  .shell { opacity: 1; transition: none; }
}
