/* The playtest page. Palette, faces and controls follow public/styles.css;
   see docs/visual-design.md. Only the fonts this page uses are copied. */
@font-face {
  font-family: "EB Garamond";
  src: url("./fonts/eb-garamond.woff2") format("woff2");
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Newsreader";
  src: url("./fonts/newsreader-italic.woff2") format("woff2");
  font-weight: 200 800;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("./fonts/fira-sans-400.woff2") format("woff2");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("./fonts/fira-sans-500.woff2") format("woff2");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Fira Sans";
  src: url("./fonts/fira-sans-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

:root {
  color-scheme: light dark;
  --paper: #f0e7d5;
  --ink: #1b1914;
  --quiet: #6b6254;
  --rule: #c9bca4;
  --accent: #7e2e22;
  --font-display: "EB Garamond", Georgia, serif;
  --font-text: "Newsreader", "EB Garamond", Georgia, serif;
  --font-ui: "Fira Sans", system-ui, sans-serif;
  --weight-display: 400;
  --weight-text: 400;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1513;
    --ink: #e9e0cf;
    --quiet: #8f9b92;
    --rule: #2b3630;
    --accent: #c6a15b;
    --weight-display: 450;
    --weight-text: 450;
  }
}

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-ui);
  font-synthesis: none;
  line-height: 1.5;
}

p {
  text-wrap: pretty;
}

main {
  max-width: 36rem;
  margin: 0 auto;
  padding: 1.5rem 1rem 3rem;
}
@media (min-width: 40rem) {
  main {
    padding-inline: 1.5rem;
  }
}

.masthead {
  border-block-start: 3px solid var(--accent);
  padding-block-start: 1rem;
}
.masthead h1 {
  margin: 0;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  font-size: 2.25rem;
  line-height: 1.05;
  text-wrap: balance;
}
@media (min-width: 40rem) {
  .masthead h1 {
    font-size: 2.75rem;
  }
}

section {
  margin-block-start: 2rem;
  padding-block-start: 1rem;
  border-block-start: 1px solid var(--rule);
}
h2 {
  margin-block: 0 0.75rem;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 1.25rem;
  line-height: 1.2;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.05em;
}
p,
ul {
  margin-block: 0 0.5rem;
}
ul {
  padding-inline-start: 1.25rem;
}
li::marker {
  color: var(--quiet);
}

.voice {
  margin-block: 1rem;
  padding-inline-start: 0.875rem;
  border-inline-start: 2px solid var(--accent);
  font-family: var(--font-text);
  font-weight: var(--weight-text);
  font-optical-sizing: auto;
  font-size: 1.1875rem;
  line-height: 1.4;
}

a {
  color: var(--ink);
  text-decoration-color: var(--accent);
  text-underline-offset: 0.15em;
}

/* Controls, as the check-in's buttons. */
.board,
button,
input,
textarea {
  font: inherit;
  border: 1px solid var(--quiet);
  border-radius: 2px;
  background: var(--paper);
  color: var(--ink);
}
.board,
button {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  text-decoration: none;
}
.board {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
  font-weight: 600;
}
button:hover,
input:hover,
textarea:hover {
  border-color: var(--ink);
}
.board:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
}
button:disabled {
  color: var(--quiet);
  cursor: progress;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin-block-end: 1rem;
}
.field label {
  font-weight: 500;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.06em;
  color: var(--quiet);
}
.field .hint {
  margin: 0;
  font-size: 0.875rem;
  color: var(--quiet);
}
input,
textarea {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.625rem;
}
textarea {
  min-height: 10rem;
  resize: vertical;
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.4;
}

.status {
  margin-block-start: 0.75rem;
  font-family: var(--font-text);
  font-style: italic;
}
.status:empty {
  display: none;
}

/* Present to screen readers, absent from the page. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

@media (forced-colors: active) {
  .board,
  button,
  input,
  textarea {
    border-color: ButtonText;
  }
  .board {
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
}

@supports (font: -apple-system-body) and (-webkit-touch-callout: default) {
  html {
    font: -apple-system-body;
  }
}
