/* Light and dark palettes: edit all page colors here. */
:root {
  color-scheme: light dark;
  font-size: clamp(.75rem, calc(.5rem + 1vw), 1rem);
  --background: light-dark(#fffdf8, #171c19);
  --text: light-dark(#353a33, #dce3d8);
  --muted: light-dark(#6d7269, #9caa9e);
  --blue: light-dark(#365eaa, #91b8ef);
  --purple: light-dark(#8d378b, #d2a1d2);
  --green: light-dark(#3d713e, #93ad8c);
  --border: light-dark(#e4e5db, #3a443c);
  --underline: light-dark(#8aa582, #789171);
  --link-hover: light-dark(#254f2c, #adc3a5);
  --focus-background: light-dark(#edf0e7, #29362b);
  --selection-text: light-dark(#253e2a, #e4eedf);
  --selection-background: light-dark(#dde8d3, #354c39);
}

/* All dimensions follow the root font size. */
html { background: var(--background); }
body {
  margin: 0;
  color: var(--text);
  font: 1rem/1.75 ui-monospace, "SFMono-Regular", Menlo, Consolas, "Liberation Mono", monospace;
  -webkit-font-smoothing: antialiased;
}
main {
  box-sizing: border-box;
  width: min(56.25rem, 100%);
  padding: 1.5rem 1.5rem 2.5rem;
}
h1 { display: inline; margin: 0; font: inherit; }
.comment { margin: 0; color: var(--muted); font-size: 0.875rem; font-style: italic; }
.masthead { margin-bottom: 2rem; font-size: 1rem; }

/* Keep the DNS columns aligned; wrap text inside the value column. */
.directives {
  display: grid;
  grid-template-columns: 9ch 1fr;
  gap: 0.125rem 2ch;
  margin-bottom: 2.25rem;
}
.record {
  display: grid;
  grid-template-columns: 10ch 2ch 5ch minmax(0, 1fr);
  column-gap: 2ch;
  align-items: baseline;
}
.record-prefix { display: contents; }
.owner { color: var(--blue); }
.keyword { color: var(--purple); }
.value {
  min-width: 0;
  overflow-wrap: anywhere;
  color: var(--green);
}

/* Space between the groups */
.identity .record + .record { margin-top: 0.375rem; }
.contacts { margin-top: 2rem; }
.section-comment { margin-bottom: 0.5625rem; }
.primary { margin-bottom: 1rem; }
.elsewhere { padding-top: 1.0625rem; border-top: 0.0625rem solid var(--border); }
footer { margin-top: 2.1875rem; }

/* Links and their surrounding quotes */
.contact-record { min-height: 3rem; }
.contact-record .value { padding: 0.5rem 0; }
a {
  color: inherit;
  text-decoration: underline var(--underline) 0.0625rem;
  text-underline-offset: 0.3125rem;
}
a:hover { color: var(--link-hover); text-decoration-color: currentColor; }
a:focus-visible { outline: 0.125rem solid var(--blue); outline-offset: 0.3125rem; background: var(--focus-background); }
.email { font-weight: 600; }
.fingerprint { white-space: pre-wrap; }
::selection { color: var(--selection-text); background: var(--selection-background); }

/* More space between blocks as the viewport narrows. */
:root {
  --block-gap: clamp(2rem, calc(5rem - 6vw), 3.5rem);
}

.masthead, .directives { margin-bottom: var(--block-gap); }
.contacts, footer { margin-top: var(--block-gap); }
