/**
 * site.css
 * Styles for the afrogamous.org site, laid out as a Unix manual page:
 * dark ground, amber accent, Martian Mono throughout.
 *
 * Created: 2026-11-02
 * Last modified: 2026-11-02
 */

/* Self-hosted so the page loads nothing from other sites. Licence: fonts/OFL.txt */
@font-face {
  font-family: 'Martian Mono';
  font-style: normal;
  font-weight: 100 800;
  font-stretch: 75% 112.5%;
  font-display: swap;
  src: url('/assets/fonts/martian-mono-latin.woff2') format('woff2');
}

:root {
  --bg: #121412;
  --text: #ddd8cc;
  --text-bright: #f3eee3;
  --text-dim: #8f8b80;
  --accent: #f2b84b;
  --rule: #2b2f2b;
  --rule-dotted: #3a3e39;
  --leader: #4a4e47;
  --label-width: 200px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Martian Mono', ui-monospace, Menlo, Consolas, monospace;
  font-size: 15px;
  line-height: 1.7;
  font-stretch: 87.5%;
  -webkit-text-size-adjust: 100%;
}

a {
  color: var(--accent);
  text-underline-offset: 4px;
  text-decoration-thickness: 1px;
}

a:hover {
  text-decoration-thickness: 2px;
}

a:focus-visible,
summary:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

::selection {
  background: var(--accent);
  color: var(--bg);
}

.page {
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Manual page header and footer lines */

.man-line {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--text-dim);
}

.man-line--top {
  padding: 20px 0 6px;
}

.man-line--bottom {
  padding: 18px 0 28px;
  border-top: 1px solid var(--rule);
}

.site-nav {
  display: flex;
  flex-wrap: wrap;
  column-gap: 24px;
  font-size: 13px;
  border-bottom: 1px solid var(--rule);
}

.site-nav a {
  display: inline-block;
  padding: 12px 0;
}

/* Sections: a label column on the left, the entry on the right */

.entry {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 48px;
  padding: 44px 0;
  border-top: 1px solid var(--rule);
}

.entry--name {
  align-items: flex-start;
  padding: 72px 0 60px;
  border-top: 0;
}

.entry--last {
  padding-bottom: 56px;
}

.entry > h2 {
  flex: 0 0 var(--label-width);
  margin: 0;
  font-size: 13px;
  line-height: 1.7;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--accent);
}

.entry-body {
  flex: 999 1 480px;
  min-width: 0;
  max-width: 700px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.entry-body p {
  margin: 0;
  text-wrap: pretty;
}

.dim {
  color: var(--text-dim);
}

/* NAME */

.entry--name .entry-body {
  gap: 28px;
}

h1 {
  margin: 0;
  font-size: clamp(28px, 3.8vw, 46px);
  line-height: 1.12;
  font-weight: 650;
  font-stretch: 75%;
  letter-spacing: -0.01em;
  color: var(--text-bright);
  text-wrap: balance;
}

.cursor {
  display: inline-block;
  width: 0.48em;
  height: 0.86em;
  margin-left: 0.18em;
  vertical-align: -0.06em;
  background: var(--accent);
  animation: blink 1.1s steps(1) infinite;
}

@keyframes blink {
  50% {
    opacity: 0;
  }
}

.lede {
  max-width: 60ch;
}

.facts {
  display: flex;
  flex-direction: column;
  gap: 2px;
  max-width: 520px;
  margin: 0;
  font-size: 14px;
}

.fact {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.fact dt {
  flex: 1;
  display: flex;
  align-items: baseline;
  gap: 10px;
  color: var(--text-dim);
}

.fact dt::after {
  content: "";
  flex: 1;
  border-bottom: 1px dotted var(--leader);
}

.fact dd {
  margin: 0;
}

.frog {
  flex: 0 0 auto;
  margin: 0;
  padding-top: 6px;
  font-family: inherit;
  font-size: 17px;
  line-height: 1.2;
  font-stretch: 100%;
  color: var(--accent);
}

/* SYNOPSIS */

.synopsis {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 4px 16px;
  font-size: clamp(17px, 2vw, 22px);
  font-stretch: 100%;
  color: var(--text-bright);
}

.synopsis-local {
  color: var(--accent);
}

/* DESCRIPTION and RULES lists */

.steps,
.rules {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.steps {
  gap: 28px;
}

.rules {
  gap: 12px;
}

.steps li,
.rules li {
  display: flex;
  gap: 16px;
}

.marker {
  flex: 0 0 2ch;
  color: var(--accent);
}

.step-text {
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-wrap: pretty;
}

.step-text strong {
  font-weight: 650;
  color: var(--text-bright);
}

/* EXAMPLES */

.table-scroll {
  overflow-x: auto;
}

.aliases {
  width: 100%;
  min-width: 600px;
  border-collapse: collapse;
  font-size: 14px;
}

.aliases th {
  padding: 0 16px 10px 0;
  border-bottom: 1px solid var(--rule);
  text-align: left;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.1em;
  color: var(--text-dim);
}

.aliases td {
  padding: 10px 16px 10px 0;
  border-bottom: 1px dotted var(--rule-dotted);
}

.aliases tr:last-child td {
  border-bottom: 0;
}

.aliases th:last-child,
.aliases td:last-child {
  padding-right: 0;
}

.alias-name {
  color: var(--text-bright);
}

.alias-state {
  color: var(--accent);
}

.is-off .alias-name {
  color: var(--text-dim);
  text-decoration: line-through;
}

.is-off .alias-state {
  color: var(--text-dim);
}

/* REPORTING ABUSE */

.entry-body .callout {
  font-weight: 600;
  color: var(--text-bright);
}

.abuse-address {
  align-self: flex-start;
  display: inline-block;
  padding: 6px 0;
  font-size: clamp(20px, 2.6vw, 30px);
  font-weight: 650;
  font-stretch: 75%;
}

/* QUESTIONS */

.faq {
  border-top: 1px solid var(--rule);
  gap: 0;
}

.faq details {
  border-bottom: 1px solid var(--rule);
}

.faq summary {
  display: flex;
  align-items: baseline;
  gap: 16px;
  padding: 12px 0;
  list-style: none;
  cursor: pointer;
  color: var(--text-bright);
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq-mark {
  display: inline-block;
  flex: 0 0 2ch;
  color: var(--accent);
  transition: transform 0.15s;
}

.faq details[open] .faq-mark {
  transform: rotate(90deg);
}

.faq details p {
  max-width: 60ch;
  margin: 0 0 18px;
  padding-left: calc(2ch + 16px);
}

/* Between phone and wide desktop the frog drops below the entry; keep it in the entry column */
@media (min-width: 641px) and (max-width: 1100px) {
  .frog {
    margin-left: calc(var(--label-width) + 48px);
  }
}

/* 404 */

.not-found {
  min-height: 60vh;
}

@media (max-width: 640px) {
  .page {
    padding: 0 16px;
  }

  .man-line > :nth-child(2) {
    display: none;
  }

  .entry {
    padding: 32px 0;
  }

  .entry--name {
    padding: 44px 0 36px;
  }

  .frog {
    font-size: 15px;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .cursor {
    animation: none;
  }

  .faq-mark {
    transition: none;
  }
}
