/* GPG cheat sheet — engraved seal on passport-blue paper.
   pathLength="1" on the ring paths, so a dash of 1 is the whole stroke. */

:root {
  --paper: #102033;
  --plate: #17304a;
  --ink: #f4efe6;
  --muted: #9aafc0;
  --brass: #d4a656;
  --wax: #9c3d45;
  --steel: #8eabbc;
  --line: rgba(244, 239, 230, 0.14);
  --display: "Cormorant Garamond", "Palatino Linotype", Palatino, serif;
  --sans: "Figtree", "Segoe UI", sans-serif;
  --mono: "Red Hat Mono", ui-monospace, monospace;
  --bar-h: 64px;
  --spis-h: 48px;
}

*, *::before, *::after { box-sizing: border-box; }

[hidden] { display: none !important; }

html { color-scheme: dark; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
}

::selection {
  background: var(--brass);
  color: var(--paper);
}

:focus-visible {
  outline: 2px solid var(--brass);
  outline-offset: 3px;
}

a { color: inherit; }

code {
  font-family: var(--mono);
  font-size: 0.92em;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip {
  position: absolute;
  left: 12px;
  top: 8px;
  transform: translateY(-140%);
  background: var(--plate);
  color: var(--ink);
  padding: 8px 12px;
  z-index: 20;
}
.skip:focus { transform: none; }

.wrap {
  width: min(760px, calc(100% - 32px));
  margin: 0 auto;
}

.bar {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.bar__row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 64px;
}

.back {
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--muted);
}
.back:hover { color: var(--ink); }

h1 {
  margin: 0;
  padding-right: 0.12em;
  font-family: var(--display);
  font-weight: 500;
  font-style: italic;
  font-size: 32px;
  letter-spacing: 0.14em;
  line-height: 1;
}

.find { margin-left: auto; }

.find input {
  width: 220px;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--ink);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  padding: 8px 2px;
}
.find input::placeholder { color: var(--steel); }
.find input:focus-visible { outline-offset: 4px; }

.mast {
  padding: 36px 0 8px;
  text-align: center;
}

.seal {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
}

.seal__ring {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.seal__ring:empty {
  border: 1px solid var(--brass);
  border-radius: 50%;
}

.seal__ring path {
  fill: none;
  stroke-width: 1.15;
  stroke-linecap: round;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: engrave 1.7s cubic-bezier(0.2, 0.7, 0.2, 1) forwards;
}
.seal__ring path.brass { stroke: var(--brass); }
.seal__ring path.dim { stroke: var(--brass); opacity: 0.4; animation-delay: 0.12s; }
.seal__ring path.steel { stroke: var(--steel); opacity: 0.8; animation-delay: 0.24s; }

@keyframes engrave { to { stroke-dashoffset: 0; } }

.fp {
  position: relative;
  z-index: 1;
  display: grid;
  justify-items: center;
  gap: 10px;
  max-width: 78%;
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
  font: inherit;
}

.fp__kicker,
.archive__kicker,
.fp__hint {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.fp__kicker { color: var(--brass); }

.fp__rows {
  display: grid;
  gap: 1px;
  font-family: var(--display);
  font-weight: 600;
  font-size: clamp(20px, 4.2vw, 28px);
  letter-spacing: 0.14em;
  line-height: 1.02;
  font-variant-numeric: lining-nums tabular-nums;
}

.fp__hint { color: var(--muted); }
.fp:hover .fp__hint,
.fp:focus-visible .fp__hint,
.fp__hint.is-done { color: var(--brass); }

.archive {
  display: grid;
  justify-items: center;
  gap: 6px;
  width: min(100%, 40em);
  margin: 8px auto 0;
  padding: 8px;
  border: 0;
  background: none;
  color: var(--steel);
  cursor: pointer;
  font: inherit;
}

.archive__id {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.03em;
  line-height: 1.45;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.archive:hover .archive__id,
.archive:focus-visible .archive__id,
.archive.is-done .archive__id { color: var(--ink); }

.lede {
  margin: 14px auto 0;
  max-width: 38em;
  color: var(--muted);
  font-size: 15px;
}

.spis {
  position: sticky;
  top: var(--bar-h);
  z-index: 4;
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  padding: 12px 0;
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.spis a {
  flex: none;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--muted);
}
.spis a:hover { color: var(--ink); }
.spis a.is-current {
  color: var(--brass);
  text-decoration: underline;
  text-underline-offset: 6px;
}
.spis a.is-dim { opacity: 0.35; }

.empty {
  margin: 28px 0 0;
  color: var(--muted);
}
.empty button {
  margin-left: 8px;
  font: inherit;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  background: none;
  border: 1px solid var(--line);
  padding: 6px 8px;
  cursor: pointer;
}

.group {
  margin-top: 36px;
  scroll-margin-top: calc(var(--bar-h) + var(--spis-h) + 12px);
}

h2 {
  margin: 0 0 12px;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brass);
}

.slip {
  background: var(--plate);
  border: 1px solid var(--line);
  padding: 12px 14px 14px;
}
.slip + .slip { margin-top: 8px; }
.slip--danger { box-shadow: inset 3px 0 0 var(--wax); }
.slip--mine { box-shadow: inset 3px 0 0 var(--brass); }

.slip__top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.slip__label {
  margin: 0;
  font-family: var(--mono);
  font-size: 12px;
  letter-spacing: 0.04em;
  color: var(--muted);
}

.copy {
  flex: none;
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: 6px 8px;
  cursor: pointer;
}
.copy:hover,
.copy:focus-visible,
.copy.is-done {
  border-color: var(--brass);
  color: var(--brass);
}

.cmd {
  margin: 8px 0 0;
  font-family: var(--mono);
  font-size: 14.5px;
  line-height: 1.5;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.slip__note {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 14px;
}

.session {
  margin: 8px 0 0;
  padding-left: 12px;
  border-left: 1px solid var(--line);
  color: var(--steel);
  font-family: var(--mono);
  font-size: 13.5px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.rules {
  list-style: none;
  margin: 0 0 12px;
  padding: 0;
  display: grid;
  gap: 10px;
}

.rules li {
  display: grid;
  grid-template-columns: 8px 1fr;
  gap: 12px;
  align-items: start;
}

.rules li::before {
  content: "";
  width: 8px;
  height: 8px;
  margin-top: 7px;
  background: var(--wax);
}

.colophon {
  margin: 48px 0 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}

.colophon a {
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.06em;
  text-decoration: none;
  color: var(--brass);
}
.colophon a:hover { color: var(--ink); }

@media (max-width: 640px) {
  .bar__row {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 8px 16px;
    min-height: 0;
    padding: 12px 0;
  }
  .find { grid-column: 1 / -1; margin: 0; }
  .find input { width: 100%; }
  .mast { padding-top: 24px; }
  .fp { max-width: 86%; }
}

@media (prefers-reduced-motion: reduce) {
  .seal__ring path {
    animation: none;
    stroke-dashoffset: 0;
  }
}
