/* Page colors. */

:root {
  color-scheme: light;
  --bg: #f4f4f0;
  --ink: #1a1a1a;
  --muted: #333333;
  --link: #0000cc;
  --visited: #551a8b;
  --line: #1a1a1a;
  --spot: #d0d0d0;
  --sign: #fff3a3;
  --sign-ink: #1a1a1a;
  --stripe: #f0c400;
  --placeholder: #555555;
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #141414;
    --ink: #f2f2f2;
    --muted: #c8c8c8;
    --link: #9db4ff;
    --visited: #d7b3ff;
    --line: #f2f2f2;
    --spot: #2a2a2a;
    --sign: #fff3a3;
    --sign-ink: #1a1a1a;
    --stripe: #f0c400;
    --placeholder: #a3a3a3;
  }
}

html {
  background: var(--bg);
}

body {
  max-width: 40rem;
  margin: 0 auto;
  padding: 1rem 1rem 2.5rem;
  background-color: var(--bg);
  background-image: radial-gradient(var(--spot) 1.1px, transparent 1.1px);
  background-size: 16px 16px;
  color: var(--ink);
  font-family: "Times New Roman", Times, "Liberation Serif", serif;
  font-size: 1.125rem;
  line-height: 1.45;
}

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

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

a[aria-current="page"] {
  font-weight: bold;
}

.skip {
  position: absolute;
  left: 0.5rem;
  top: 0.5rem;
  padding: 0.2rem 0.4rem;
  background: var(--bg);
  color: var(--ink);
  border: 1px solid var(--line);
}

.skip:not(:focus) {
  clip-path: inset(50%);
  width: 1px;
  height: 1px;
  overflow: hidden;
  white-space: nowrap;
  padding: 0;
  border: 0;
}

.sign {
  margin: 0;
  font-size: 1.4rem;
}

.sign a,
.sign a:visited {
  color: var(--ink);
}

a.wordmark {
  display: inline-block;
  color: var(--ink);
  font-weight: normal;
  text-decoration: none;
}

.wordmark .art {
  margin: 0 0 0.35rem;
  overflow: visible;
  background: transparent;
  font-size: clamp(0.85rem, 4vw, 1.35rem);
  font-weight: normal;
  line-height: 0.8;
  letter-spacing: 0;
}

nav {
  text-align: center;
}

nav p {
  margin: 0.3rem 0 0.8rem;
}

.tape {
  margin: 0 0 1rem;
  padding: 0.4rem;
  background: repeating-linear-gradient(
    -45deg,
    var(--stripe),
    var(--stripe) 10px,
    #1a1a1a 10px,
    #1a1a1a 20px
  );
}

.tape p {
  margin: 0;
  padding: 0.35rem 0.6rem;
  background: var(--sign);
  color: var(--sign-ink);
  text-align: center;
  font-weight: bold;
}

.art {
  margin: 0.2rem 0 0.8rem;
  overflow-x: auto;
  font-family: "Liberation Mono", "DejaVu Sans Mono", "Courier New", Courier, monospace;
  font-size: 0.8rem;
  line-height: 1.15;
}

h1 {
  font-size: 1.6rem;
  margin: 0.4rem 0;
}

h2 {
  font-size: 1.25rem;
  margin: 1.3rem 0 0.3rem;
}

p {
  margin: 0.55rem 0;
}

.tag {
  font-style: italic;
}

.addresses {
  margin: 0.3rem 0 0.8rem;
}

.addresses dt {
  margin-top: 0.55rem;
  font-family: "Liberation Mono", "DejaVu Sans Mono", "Courier New", Courier, monospace;
  font-size: 0.95rem;
}

.addresses dd {
  margin: 0.1rem 0 0.15rem;
}

code {
  font-family: "Liberation Mono", "DejaVu Sans Mono", "Courier New", Courier, monospace;
  font-size: 0.95em;
}

hr {
  border: 0;
  border-top: 1px dashed var(--line);
  margin: 1rem 0;
}

.muted,
.hint {
  color: var(--muted);
}

.hint {
  margin: 0.2rem 0 0;
  font-size: 1rem;
}

label {
  display: block;
  margin-bottom: 0.15rem;
}

.field {
  margin: 0.7rem 0;
}

input {
  box-sizing: border-box;
  width: 100%;
  max-width: 22rem;
  padding: 0.2rem 0.35rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
}

.address {
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  max-width: 22rem;
}

.address input {
  flex: 1 1 auto;
  width: auto;
  min-width: 0;
  max-width: none;
  border-right: 0;
}

.domain {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  white-space: nowrap;
}

::placeholder {
  color: var(--placeholder);
  opacity: 1;
}

button {
  font: inherit;
  color: var(--ink);
  background: var(--bg);
  border: 1px solid var(--line);
  padding: 0.15rem 0.7rem;
  cursor: pointer;
}

.notice {
  max-width: 22rem;
  margin: 0.7rem 0;
  padding: 0.35rem 0.5rem;
  border: 1px dashed var(--line);
  background: var(--bg);
  color: var(--ink);
}

.notice:empty {
  display: none;
}

.flourish {
  margin: 0;
  letter-spacing: 0.15em;
}

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

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

@media (forced-colors: active) {
  button,
  input,
  .domain,
  .notice,
  .skip,
  .tape p {
    border: 1px solid ButtonText;
  }
}
