/* enterdeck.app: the app's design language on a web page (docs/03). Black, amber phosphor,
   the system monospace, hairlines in the key-edge grey, red only for what must be fixed.
   No glow, no scanlines, nothing that moves. */

:root {
  --bg: #000000;
  --phosphor: #FFB000;
  --phosphor-dim: #8A5F00;
  --key-edge: #2A2A2A;
  --error: #E24B4A;
  color-scheme: dark;
}

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0 auto;
  padding: 1.25rem 1rem 2.5rem;
  max-width: 66ch;
  background: var(--bg);
  color: var(--phosphor);
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, "DejaVu Sans Mono", "Liberation Mono", monospace;
  font-size: 1rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  padding-bottom: 0.75rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--key-edge);
  font-size: 0.875rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

nav a {
  text-decoration: none;
}

nav a[aria-current] {
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

nav .brand {
  margin-right: auto;
  font-weight: 700;
}

h1 {
  margin: 0 0 1rem;
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.25;
}

h2 {
  margin: 2.25rem 0 0.75rem;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1rem;
}

p, ul {
  margin: 0 0 1rem;
}

ul {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: inherit;
  overflow-wrap: anywhere;
  text-decoration: underline;
  text-decoration-color: var(--phosphor-dim);
  text-underline-offset: 0.2em;
}

a:hover, a:focus-visible {
  text-decoration-color: var(--phosphor);
}

a:focus-visible {
  outline: 1px solid var(--phosphor);
  outline-offset: 2px;
}

strong {
  font-weight: 700;
}

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

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

th {
  font-size: 0.75rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

tbody tr:last-child td {
  border-bottom: 1px solid var(--key-edge);
}

/* A placeholder the owner must fill before publishing: [contact address], [date of publication]. */
.placeholder {
  background: none;
  color: var(--error);
  font-weight: 700;
  outline: 1px dashed var(--error);
  outline-offset: 2px;
  padding: 0 0.15em;
}

footer {
  margin-top: 3rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--key-edge);
  font-size: 0.8125rem;
}

/* On a phone the tables stack: one block per row, each cell under its column's label. */
@media (max-width: 48rem) {
  table, tbody, tr, td {
    display: block;
  }

  thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
  }

  tr {
    padding: 0.75rem 0;
    border-top: 1px solid var(--key-edge);
  }

  tbody tr:last-child {
    border-bottom: 1px solid var(--key-edge);
  }

  td, tbody tr:last-child td {
    padding: 0.15rem 0 0.5rem;
    border: 0;
  }

  td::before {
    content: attr(data-label);
    display: block;
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
  }

  td:empty {
    display: none;
  }
}
