@font-face {
  font-family: Manrope;
  src: url("Manrope-Regular.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: Manrope;
  src: url("Manrope-SemiBold.ttf") format("truetype");
  font-weight: 600 800;
  font-display: swap;
}

@font-face {
  font-family: Spectral;
  src: url("Spectral-SemiBold.ttf") format("truetype");
  font-weight: 600;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --background: #18191b;
  --surface: #222427;
  --text: #f4f0e8;
  --muted: #cbc5b9;
  --accent: #e0c58e;
  --accent-hover: #efe1be;
  --line: #625b4f;
  --ink: #211c15;
}

:root[data-theme="light"] {
  color-scheme: light;
  --background: #f8f4ea;
  --surface: #fffaef;
  --text: #292821;
  --muted: #62594a;
  --accent: #724819;
  --accent-hover: #593616;
  --line: #a1917a;
  --ink: #fffaf0;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  margin: 0;
  background: var(--background);
  color: var(--text);
  font: 400 1rem/1.5 Manrope, system-ui, sans-serif;
}
button, input { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-underline-offset: .2em; }
:focus-visible { outline: 2px solid var(--accent-hover); outline-offset: 3px; }

.skip {
  position: absolute;
  z-index: 1;
  left: 1rem;
  top: .75rem;
  transform: translateY(-160%);
  padding: .5rem .75rem;
  background: var(--surface);
}
.skip:focus { transform: translateY(0); }
.card {
  width: min(32.5rem, calc(100% - 2.5rem));
  margin: clamp(1rem, 8vh, 5rem) auto 2rem;
}
.card-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.header-actions { display: flex; align-items: center; gap: .55rem; }
.ag-mark {
  position: relative;
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  font: 600 1.16rem/1 Spectral, Georgia, serif;
}
.ag-mark svg { position: absolute; inset: 0; width: 100%; fill: none; stroke: var(--accent); stroke-width: 1.5; }
.ag-mark b { color: var(--accent); font-weight: inherit; }
.language {
  display: grid;
  min-width: 2.75rem;
  min-height: 2.75rem;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: .35rem;
  background: transparent;
  color: var(--accent);
  font-size: .8125rem;
  font-weight: 650;
  text-decoration: none;
}
.language:hover { background: var(--surface); }
.language svg { width: 1.15rem; height: 1.15rem; fill: none; stroke: currentColor; stroke-width: 1.5; }
h1 { margin: 1.1rem 0 1rem; font: 600 clamp(2rem, 9vw, 3rem)/1.15 Spectral, Georgia, serif; }
.primary-actions { margin-bottom: 1rem; }
.button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: 3.25rem;
  padding: .55rem 1rem;
  border: 1px solid var(--accent);
  border-radius: .4rem;
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.32;
  text-align: center;
  text-decoration: none;
}
.button svg, .channel svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.save { display: inline-flex; background: var(--accent); color: var(--ink); }
.save:hover { background: var(--accent-hover); }
.share-actions { display: flex; align-items: baseline; flex-wrap: wrap; gap: 0 .85rem; margin-top: .25rem; }
.share { min-height: 2.75rem; border-color: transparent; padding-inline: 0; background: transparent; color: var(--accent); }
.share:hover { text-decoration: underline; }
.share-link { margin: .15rem 0 0; font-size: .875rem; }
.share-link label { display: block; margin-bottom: .35rem; }
.share-link input {
  width: 100%;
  min-width: 0;
  padding: .5rem;
  border: 1px solid var(--line);
  border-radius: .3rem;
  background: var(--background);
  color: var(--text);
  font-size: 1rem;
}
.share-local { color: var(--muted); margin: .5rem 0 0; }
.small-button {
  min-height: 2.75rem;
  min-width: 2.75rem;
  padding: .35rem .4rem;
  color: var(--accent);
  background: transparent;
  border: 0;
  border-radius: .3rem;
  font-size: .8125rem;
}
.small-button:hover { text-decoration: underline; }
.copy-link { padding-inline: 0; }
.feedback { color: var(--accent); font-size: .875rem; margin: 0; min-height: 1.35rem; }

.channels { list-style: none; padding: 0; margin: 0; border-bottom: 1px solid var(--line); }
.channels li { border-top: 1px solid var(--line); }
.copy-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .35rem; align-items: center; }
.copy-row:has(.small-button[hidden]) { grid-template-columns: minmax(0, 1fr); }
.copy-row .channel { grid-template-columns: auto minmax(0, 1fr); }
.copy-row .channel-arrow { display: none; }
.channel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .8rem;
  align-items: center;
  min-height: 3.6rem;
  padding: .38rem .15rem;
  border-radius: .3rem;
  text-decoration: none;
}
.channel:hover { background: var(--surface); }
.channel-icon {
  display: grid;
  place-items: center;
  width: 2.15rem;
  height: 2.15rem;
  background: var(--surface);
  border-radius: .45rem;
  color: var(--accent);
}
.channel-text { overflow-wrap: anywhere; }
.channel-label, .channel-value { display: block; }
.channel-label { font-size: .75rem; color: var(--muted); }
.channel-value { font-size: .9375rem; font-weight: 600; }
.channel-arrow { display: grid; color: var(--accent); }

@media (max-width: 520px) {
  .save { width: 100%; }
}

@media (max-width: 360px) {
  .card { width: calc(100% - 2rem); }
  .channel { gap: .55rem; }
  .copy-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .copy-row .small-button { justify-self: end; }
}

/* Language is a page choice, available before scripts and device preferences. */
.language-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .4rem;
  padding: .3rem;
  margin-bottom: clamp(1rem, 3vw, 1.5rem);
  border: 1px solid var(--line);
  border-radius: .55rem;
}
.language-switch a {
  display: grid;
  place-items: center;
  min-height: 3.25rem;
  padding: .35rem;
  border-radius: .35rem;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 700;
  text-decoration: none;
}
.language-switch a:hover { background: var(--surface); }
.language-switch a[aria-current="page"] { background: var(--accent); color: var(--ink); }
