/* capivaras.page
   Plain HTML, no scripts, no web fonts, no third-party requests. The page is a
   spec sheet for a naming scheme, so it is built like one: hard rules, one
   column, monospace wherever a value is literal. */

:root {
  --bg: #ffffff;
  --ink: #101010;
  --muted: #565656;
  --surface: #f2f2f0;
  --mark: #ffe98a;
  --link: #0033cc;
  --visited: #55148b;

  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Helvetica, Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
}

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

body {
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
  max-width: 47rem;
  background: var(--bg);
  color: var(--ink);
  font: 1rem/1.5 var(--sans);
  text-rendering: optimizeLegibility;
}

/* Links stay blue and underlined. Everyone already knows what that means. */
a {
  color: var(--link);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:visited {
  color: var(--visited);
}

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

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  left: 1.25rem;
  top: 0.5rem;
  background: var(--mark);
  color: var(--ink);
  padding: 0.4rem 0.6rem;
  border: 2px solid var(--ink);
}

/* Header and footer are the same object: a row of plain text between rules. */
.bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: center;
  justify-content: space-between;
  padding: 0.7rem 0;
  font: 0.85rem/1 var(--mono);
}

header.bar {
  border-bottom: 3px solid var(--ink);
  margin-bottom: 2.5rem;
}

footer.bar {
  border-top: 3px solid var(--ink);
  margin-top: 3.5rem;
}

.bar-name {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

h1 {
  margin: 0 0 1rem;
  font: 700 clamp(1.6rem, 4.4vw, 2.35rem) / 1.15 var(--sans);
  letter-spacing: -0.02em;
  max-width: 34ch;
}

h2 {
  margin: 3.25rem 0 1.25rem;
  padding-bottom: 0.35rem;
  border-bottom: 3px solid var(--ink);
  font: 700 0.85rem/1 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.14em;
}

h3 {
  margin: 2rem 0 0.75rem;
  font: 700 1rem/1.3 var(--sans);
}

p {
  margin: 0 0 1rem;
  max-width: 68ch;
}

.lede {
  color: var(--muted);
}

code {
  font: 0.9em var(--mono);
  word-break: break-word;
}

pre {
  margin: 0 0 1rem;
  padding: 0.9rem 1rem;
  background: var(--surface);
  border: 1px solid var(--ink);
  overflow-x: auto;
}

pre code {
  font-size: 0.85rem;
  word-break: normal;
}

/* The plate: the whole product is a mapping from a hostname to a branch, so the
   mapping is the loudest thing on the page. */
.plate {
  margin: 2rem 0 0.5rem;
  border: 3px solid var(--ink);
  /* The one flourish on the page, spent on the one thing worth remembering. */
  box-shadow: 9px 9px 0 var(--ink);
}

.plate-row + .plate-row {
  border-top: 1px solid var(--ink);
}

.plate-row {
  padding: 1rem 1.1rem;
}

.addr {
  margin: 0 0 0.35rem;
  max-width: none;
  font: 700 clamp(1.05rem, 3.8vw, 1.9rem) / 1.25 var(--mono);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.addr-from {
  margin: 0;
  max-width: none;
  color: var(--muted);
  font: 0.8rem/1.4 var(--mono);
}

.addr-from code {
  color: var(--ink);
  font-size: 1em;
}

/* Everything a visitor substitutes with their own value is marked the same way,
   in the addresses and in the tables both. */
.slot {
  background: var(--mark);
}

.steps {
  margin: 0 0 1rem;
  padding-left: 1.6rem;
  max-width: 68ch;
}

.steps li {
  margin-bottom: 0.6rem;
  padding-left: 0.2rem;
}

.steps li::marker {
  font: 700 0.95rem var(--mono);
}

table {
  width: 100%;
  margin: 0 0 1.25rem;
  border-collapse: collapse;
  font-size: 0.9rem;
}

th,
td {
  border: 1px solid var(--ink);
  padding: 0.5rem 0.6rem;
  text-align: left;
  vertical-align: top;
}

thead th {
  background: var(--surface);
  font: 700 0.72rem/1.3 var(--mono);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

tbody th {
  width: 12.5rem;
  font-weight: 700;
}

.note {
  padding: 0.8rem 1rem;
  border: 1px solid var(--ink);
  border-left: 8px solid var(--ink);
  background: var(--mark);
  max-width: 68ch;
}

@media (max-width: 34rem) {
  tbody th {
    width: auto;
  }

  table,
  tbody,
  tr,
  th,
  td {
    display: block;
  }

  thead {
    display: none;
  }

  tr + tr {
    border-top: 3px solid var(--ink);
  }

  th,
  td {
    border: none;
    padding: 0.3rem 0;
  }

  tr {
    padding: 0.6rem 0;
  }

  table {
    border: 1px solid var(--ink);
    padding: 0 0.8rem;
  }
}
