/* Shared look for the Phenomemental pages, taken from the Wholeless Nights cover. */

:root {
  --paper: #efe7d8;
  --page: #f6f0e4;
  --ink: #1d1a17;
  --muted: #6a6158;
  --rule: #a8323a;
  --frame: #b9ad9a;
  --crimson: #c21d4e;
}
@media (prefers-color-scheme: dark) {
  :root {
    --paper: #16130f;
    --page: #1d1914;
    --ink: #ede4d3;
    --muted: #a79c8b;
    --rule: #d0525a;
    --frame: #4a4237;
    --crimson: #ef5d85;
  }
}
* { box-sizing: border-box; }
html, body {
  margin: 0;
  padding: 0;
}
/* Everything on these pages is sized in rem, so the root size sets the
   scale. Phones (up to 480px wide) stay at 16px, as they always were;
   from there the type grows smoothly with the window, to 21px on a wide
   desktop, and the headings, spacing and column grow with it. */
html {
  font-size: clamp(16px, calc(16px + (100vw - 480px) * 0.0055), 21px);
}
body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Cormorant Garamond", Garamond, "Times New Roman", serif;
  font-size: 1.2rem;
  line-height: 1.55;
  display: flex;
  justify-content: center;
  min-height: 100vh;
}
main {
  width: 100%;
  /* 620px on a phone; widens with the type to about 810px on desktop,
     keeping the same comfortable line length. */
  max-width: 38.75rem;
  padding: 1.5rem 1rem 3rem;
}
a {
  color: var(--crimson);
  text-decoration: none;
  border-bottom: 1px solid transparent;
}
a:hover {
  border-bottom-color: currentColor;
}
.sheet {
  background: var(--page);
  border: 1px solid var(--frame);
  outline: 1px solid var(--frame);
  outline-offset: 6px;
  margin: 6px;
  padding: 2.5rem 1.5rem 2rem;
  text-align: center;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.rule {
  width: 5rem;
  height: 0;
  border: 0;
  border-top: 1.5px solid var(--rule);
  margin: 1.3rem auto;
}
section {
  text-align: left;
  margin: 0 auto;
  max-width: 30rem;
}
h2 {
  font-weight: 500;
  font-size: 1rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-align: center;
  color: var(--muted);
  margin: 0 0 0.8rem;
}
p {
  margin: 0 0 0.9rem;
}
ul {
  list-style: none;
  padding: 0;
  margin: 0;
}
li {
  padding-left: 1.4rem;
  position: relative;
  margin-bottom: 0.35rem;
}
li::before {
  content: "";
  position: absolute;
  left: 0.2rem;
  top: 0.62em;
  width: 0.5rem;
  height: 0.36rem;
  border-radius: 50%;
  background: var(--crimson);
}
.closing {
  font-style: italic;
  text-align: center;
  margin: 0;
}
code {
  font-family: "Cormorant Garamond", Garamond, serif;
  font-style: normal;
  font-weight: 600;
  white-space: nowrap;
}
.live-note {
  text-align: center;
  color: var(--muted);
  font-size: 0.9rem;
  font-style: italic;
  margin: 1.8rem 0 0;
}
.thread {
  margin: 0 0 1.2rem;
}
.thread-empty {
  font-style: italic;
  color: var(--muted);
  text-align: center;
}
.comment {
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--frame);
}
.comment:first-child {
  padding-top: 0;
}
.comment-meta {
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.2rem;
}
.comment-meta strong {
  color: var(--ink);
  font-weight: 600;
}
.comment-text {
  white-space: pre-line;
  overflow-wrap: anywhere;
  margin: 0;
}
.replies {
  margin: 0.7rem 0 0 0.9rem;
  padding-left: 0.9rem;
  border-left: 2px solid var(--frame);
}
.comment.reply {
  padding: 0.5rem 0;
  border-bottom: 0;
}
.comment-more {
  background: none;
  border: 0;
  padding: 0;
  margin: 0.3rem 0 0;
  font: inherit;
  font-style: italic;
  color: var(--crimson);
  cursor: pointer;
}
form label {
  display: block;
  font-size: 0.95rem;
  color: var(--muted);
  margin: 0 0 0.25rem;
}
form input,
form textarea {
  display: block;
  width: 100%;
  font: inherit;
  font-size: 1.1rem;
  color: var(--ink);
  background: var(--paper);
  border: 1px solid var(--frame);
  border-radius: 2px;
  padding: 0.5rem 0.65rem;
  margin: 0 0 0.9rem;
}
form textarea {
  min-height: 7rem;
  resize: vertical;
}
form input:focus,
form textarea:focus {
  outline: 2px solid var(--crimson);
  outline-offset: 1px;
}
.trap {
  position: absolute;
  left: -9999px;
}
form button {
  font: inherit;
  font-size: 1.1rem;
  letter-spacing: 0.08em;
  color: var(--page);
  background: var(--crimson);
  border: 0;
  border-radius: 2px;
  padding: 0.5rem 1.4rem;
  cursor: pointer;
}
/* The microphone beside a text box: quieter than the send button. */
form button.mic {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.95rem;
  letter-spacing: 0.04em;
  color: var(--crimson);
  background: transparent;
  border: 1px solid var(--crimson);
  padding: 0.25rem 0.8rem;
}
form button.mic.listening {
  color: var(--page);
  background: var(--crimson);
}
form button.mic.listening svg {
  animation: mic-pulse 1.2s ease-in-out infinite;
}
@keyframes mic-pulse {
  50% { opacity: 0.35; }
}
@media (prefers-reduced-motion: reduce) {
  form button.mic.listening svg { animation: none; }
}
.mic-row {
  margin: -0.4rem 0 0.9rem;
}
.mic-note {
  font-size: 0.9rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.35rem 0 0;
}
.mic-note:empty {
  display: none;
}
form button:disabled {
  opacity: 0.6;
  cursor: default;
}
.form-status {
  font-size: 1rem;
  margin: 0.6rem 0 0;
  min-height: 1.5em;
}
.form-foot {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  margin: 0.4rem 0 0;
}
.site-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.3rem 1.4rem;
  font-size: 1rem;
  font-style: italic;
  margin: 0 0 1.5rem;
}
/* The page you're on, or the project the page belongs to. */
.site-nav a[aria-current] {
  color: var(--ink);
}
/* A project's own pages: a quieter second line just under the header,
   a label and then the project's parts, the current one marked.
     <nav class="sub-nav" aria-label="Project name">
       <span class="sub-nav-label">In Project name:</span>
       <a href="…" aria-current="page">A part</a> <a href="…">Another part</a>
     </nav> */
.sub-nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 0.2rem 0;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  margin: -0.9rem 0 1.5rem;
}
.sub-nav a {
  color: var(--muted);
}
.sub-nav-label {
  color: var(--muted);
  font-style: italic;
  margin-right: 0.45rem;
}
.sub-nav a + a::before {
  content: "\00b7";
  display: inline-block;
  color: var(--frame);
  padding: 0 0.7rem;
}
.sub-nav a:hover {
  border-bottom-color: transparent;
  color: var(--crimson);
}
.sub-nav a[aria-current="page"] {
  color: var(--ink);
  font-style: italic;
}
/* Where a page sits: Phenomemental › Project › Page, at the top of the
   content. Every part but the last is a link. */
.breadcrumb {
  font-size: 0.9rem;
  color: var(--muted);
  margin: -0.8rem 0 1.4rem;
}
.breadcrumb ol {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  row-gap: 0.1rem;
}
.breadcrumb li {
  padding: 0;
  margin: 0;
}
.breadcrumb li::before {
  content: none;
}
/* The separator ends its item, so a wrapped line never starts with one. */
.breadcrumb li:not(:last-child)::after {
  content: "\203a";
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  border-radius: 0;
  background: none;
  color: var(--frame);
  padding: 0 0.5rem;
}
.breadcrumb [aria-current] {
  color: var(--ink);
  font-style: italic;
}
/* Cards that open onto what's inside: the homepage's "What's here", and
   a project's landing page, one card for each of its parts. */
.doors {
  display: grid;
  gap: 0.9rem;
  margin: 0 0 1rem;
}
.doors li {
  padding: 0;
  margin: 0;
}
.doors li::before {
  content: none;
}
.door {
  display: block;
  border: 1px solid var(--frame);
  background: var(--paper);
  padding: 1rem 1.1rem 1.05rem;
  color: var(--ink);
  transition: border-color 0.2s;
}
.door:hover,
.door:focus-visible {
  border-color: var(--crimson);
}
.door-title {
  display: block;
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.2;
  color: var(--crimson);
  margin: 0 0 0.3rem;
}
.door-text {
  display: block;
}
.doors-later {
  font-style: italic;
  color: var(--muted);
  text-align: center;
  font-size: 1rem;
  margin: 0;
}
.links li {
  margin-bottom: 0.6rem;
}
.links .hint {
  display: block;
  color: var(--muted);
  font-size: 1rem;
  font-style: italic;
}
.site-footer {
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
  font-style: italic;
  margin-top: 2rem;
}
.site-footer p {
  margin: 0 0 0.3rem;
}
@media (min-width: 560px) {
  .sheet { padding: 3rem 3rem 2.5rem; }
}

/* Beside a note box: a door for those with a handle on the beach, to
   answer as themselves, with the line their AI can use beneath it. */
.answer-door {
  margin: 1.4rem 0 0;
}
.answer-door .door-ai {
  font-size: 0.95rem;
  font-style: italic;
  color: var(--muted);
  overflow-wrap: anywhere;
  margin: 0.45rem 0 0;
}
/* A link to talk live in a room, and who is there now. */
.talk-live {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.7rem;
  margin: 1rem 0 0;
}
.here-now {
  font-style: italic;
  color: var(--muted);
}
.here-now::before {
  content: "";
  display: inline-block;
  width: 0.45rem;
  height: 0.45rem;
  margin: 0 0.35rem 0.1rem 0;
  border-radius: 50%;
  background: var(--crimson);
}
.here-now:empty {
  display: none;
}
/* At the foot of a page: where it lives on the beach. */
.site-where {
  overflow-wrap: anywhere;
}
