/* Wispling public pages. Colours are the app's Theme.swift palette. No external resources. */
@font-face {
  font-family: "Pixelify Sans";
  src: url("/assets/fonts/PixelifySans.ttf") format("truetype");
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}

:root {
  --parchment: #f7ebd1;
  --parchment-dark: #e6d1ad;
  --wood: #734d38;
  --wood-dark: #4a3029;
  --ink: #3d2b33;
  --ink-soft: #6b5557;
  --plum: #5e3f78;
  --moss: #789e66;
  --pumpkin: #e38c4a;
  --gold: #f2c254;
  --night: #292442;

  --page: var(--parchment-dark);
  --panel: var(--parchment);
  --border: var(--wood-dark);
  --text: var(--ink);
  --text-soft: var(--ink-soft);
  --link: var(--plum);
  --shadow: rgba(61, 43, 51, 0.25);
  --rule: #d9c39c;
  --px: 4px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --page: #1d1930;
    --panel: #332d4d;
    --border: #120f1f;
    --text: #f7ebd1;
    --text-soft: #cdbfa6;
    --link: #f2c254;
    --shadow: rgba(0, 0, 0, 0.45);
    --rule: #4a4368;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.wrap {
  max-width: 720px;
  margin: 0 auto;
  padding: 16px 16px 40px;
}

/* Pixel panel: the four offset shadows draw a border with notched corners, the fifth is the hard drop shadow. */
.panel {
  background: var(--panel);
  margin: calc(var(--px) * 3) var(--px) calc(var(--px) * 6);
  padding: 18px 16px;
  box-shadow:
    0 calc(var(--px) * -1) 0 0 var(--border),
    var(--px) 0 0 0 var(--border),
    calc(var(--px) * -1) 0 0 0 var(--border),
    0 var(--px) 0 0 var(--border),
    0 calc(var(--px) * 2) 0 0 var(--shadow);
}

@media (min-width: 560px) {
  .panel {
    padding: 28px 32px;
  }
}

.pixel {
  image-rendering: pixelated;
  image-rendering: crisp-edges;
}

/* Header */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 4px 4px 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text);
  text-decoration: none;
  font-family: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: 0.02em;
}

.brand img {
  width: 48px;
  height: 48px;
}

.lang {
  font-family: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.9375rem;
  font-weight: 700;
  white-space: nowrap;
}

.lang a,
.lang span {
  display: inline-block;
  padding: 6px 8px;
}

.lang span {
  background: var(--border);
  color: var(--parchment);
}

/* Text */
h1,
h2,
h3 {
  font-family: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  line-height: 1.25;
  overflow-wrap: break-word;
  hyphens: auto;
}

h1 {
  font-size: 1.625rem;
  margin: 0 0 4px;
}

h2 {
  font-size: 1.1875rem;
  margin: 2.2em 0 0.5em;
  padding-top: 1.1em;
  border-top: var(--px) dotted var(--rule);
}

h3 {
  font-size: 1.0625rem;
  margin: 1.6em 0 0.3em;
}

p,
ul,
ol,
dl,
address {
  margin: 0 0 1em;
}

ul,
ol {
  padding-left: 1.3em;
}

li {
  margin-bottom: 0.35em;
}

address {
  font-style: normal;
}

a {
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: 3px;
}

a:hover,
a:focus-visible {
  text-decoration-thickness: 3px;
}

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

.stand {
  color: var(--text-soft);
  font-size: 0.9375rem;
  margin-bottom: 1.4em;
}

.note {
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.summary {
  border-left: var(--px) solid var(--moss);
  padding: 2px 0 2px 14px;
}

.facts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2px 16px;
}

.facts dt {
  font-weight: 700;
}

.facts dd {
  margin: 0 0 0.7em;
}

@media (min-width: 560px) {
  .facts {
    grid-template-columns: 11em 1fr;
  }
}

/* Values the owner still has to fill in (server puts this in for an unset variable). */
.placeholder {
  background: var(--gold);
  color: #3d2b33;
  font-family: "Pixelify Sans", ui-monospace, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;
  font-size: 0.875em;
  font-weight: 700;
  padding: 1px 6px;
  outline: 2px dashed #4a3029;
  outline-offset: 1px;
  overflow-wrap: anywhere;
}

/* Landing page */
.hero {
  text-align: center;
}

.hero .icon {
  width: 96px;
  height: 96px;
  margin-bottom: 8px;
}

.friends {
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 8px;
  margin: 8px 0 12px;
}

.friends img {
  width: 96px;
  height: 96px;
}

.linklist {
  list-style: none;
  padding: 0;
  margin: 0;
}

.linklist li {
  margin: 0;
  border-top: 2px solid var(--rule);
}

.linklist li:first-child {
  border-top: 0;
}

.linklist a {
  display: block;
  padding: 12px 4px;
  font-weight: 600;
}

/* Footer */
.site-footer {
  text-align: center;
  color: var(--text-soft);
  font-size: 0.9375rem;
}

.site-footer img {
  width: 64px;
  height: 64px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0 0 10px;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 2px 6px;
}

.site-footer li {
  margin: 0;
}

.site-footer a {
  display: inline-block;
  padding: 6px 6px;
}

.site-footer p {
  margin: 0;
}

.site-footer .fineprint {
  margin-top: 6px;
  font-size: 0.8125rem;
  line-height: 1.45;
  opacity: 0.85;
}

/* Support pages: contact line and FAQ */
.contact {
  font-size: 1.1875rem;
  font-weight: 700;
  overflow-wrap: anywhere;
}

.faq {
  margin: 0 0 1.4em;
  border-top: 2px solid var(--rule);
}

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

.faq summary {
  cursor: pointer;
  padding: 12px 4px 12px 30px;
  font-weight: 600;
  list-style: none;
  position: relative;
}

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

/* Pixel plus that becomes a minus when open: two bars, the upright one is removed. */
.faq summary::before,
.faq summary::after {
  content: "";
  position: absolute;
  top: calc(12px + 0.8em);
  left: 6px;
  width: 12px;
  height: 4px;
  margin-top: -2px;
  background: var(--link);
}

.faq summary::after {
  left: 10px;
  width: 4px;
  height: 12px;
  margin-top: -6px;
}

.faq details[open] > summary::after {
  display: none;
}

.faq summary:hover {
  color: var(--link);
}

.faq summary:focus-visible {
  outline: 3px solid var(--pumpkin);
  outline-offset: 2px;
}

.faq details > :not(summary) {
  margin-left: 30px;
  margin-right: 4px;
}

.faq details > :last-child {
  margin-bottom: 1.1em;
}
