/*
  Theme: wet concrete, low cloud, copper wire, stove light.
  Slate ground, bone text at a readable weight, copper and verdigris
  for the machine furniture, a warm ember for the fire is.
*/

:root {
  --bg: #0b1012;
  --bg-2: #11171a;
  --panel: #11171a;
  --line: #2c383c;
  --line-hard: #47575c;
  --text: #e3e8e6;
  --dim: #aab5b4;
  --faint: #78868a;
  --copper: #c2764a;
  --verdigris: #6cab97;
  --brass: #cf9f56;
  --slate: #7ea7c0;
  --serif: "Literata", Georgia, serif;
  --mono: "IBM Plex Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas,
    monospace;
  --wrap: 50rem;
  --pad: 1.5rem;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 1.5rem;
}

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: var(--serif);
  font-size: 1.15rem;
  line-height: 1.7;
  text-wrap: pretty;
  overflow-x: hidden;
  min-height: 100vh;
}

h1,
h2,
h3 {
  text-wrap: balance;
}

a {
  color: var(--verdigris);
  text-decoration: none;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.24em;
}

a:hover,
a:focus-visible {
  text-decoration: underline;
}

/* a link that stays on this page is dashed, a link that opens another file is solid */

.toc a:hover,
.toc a:focus-visible,
a[href^="#"]:hover,
a[href^="#"]:focus-visible {
  text-decoration-style: dashed;
}

a[href$=".html"]:hover,
a[href$=".html"]:focus-visible,
a[href^="images/"]:hover,
a[href^="images/"]:focus-visible {
  text-decoration-style: solid;
}

/* masthead */

.mast {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--pad) var(--pad) 1rem;
  border-bottom: 1px solid var(--line-hard);
}

.mast h1 {
  font-family: var(--serif);
  font-weight: 600;
  font-size: clamp(2.1rem, 5.5vw, 2.9rem);
  letter-spacing: -0.015em;
  color: #f0f4f3;
  line-height: 1.12;
}

.mast .dek {
  margin-top: 0.55rem;
  color: var(--dim);
  font-size: 1.12rem;
}

.mast .meta {
  margin-top: 0.85rem;
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  color: var(--faint);
  text-transform: uppercase;
}

/* page frame, equal margins on every side */

main {
  position: relative;
  z-index: 2;
  max-width: var(--wrap);
  margin: 0 auto;
  padding: var(--pad);
}

.standfirst {
  border-left: 3px solid var(--copper);
  padding-left: 1rem;
  color: var(--dim);
  font-size: 1.08rem;
}

.standfirst p {
  margin-bottom: 0.6rem;
}

.standfirst p:last-child {
  margin-bottom: 0;
}

/* contents */

.toc {
  margin-top: 1.5rem;
  border: 1px solid var(--line);
  background: var(--bg-2);
  padding: 1rem 1.1rem;
}

.toc h2 {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--faint);
  margin-bottom: 0.7rem;
  text-transform: uppercase;
}

.toc ol {
  list-style: none;
}

.toc > ol {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.2rem 2rem;
  align-items: start;
}

.toc > ol > li {
  min-width: 0;
}

.toc .part-name {
  display: block;
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  color: var(--verdigris);
  padding-bottom: 0.3rem;
  border-bottom: 1px solid var(--line);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
}

.toc ol ol li {
  font-size: 1.05rem;
  line-height: 1.45;
  padding: 0.08rem 0;
}

.toc a {
  color: var(--dim);
}

.toc a:hover {
  color: var(--text);
}

/* parts and sections */

.part {
  margin-top: 2rem;
  padding-top: 0.8rem;
  border-top: 2px solid var(--line-hard);
  text-transform: uppercase;
}

.part h2 {
  font-family: var(--mono);
  font-size: 0.8rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  color: var(--copper);
}

section.sub {
  margin-top: 1.5rem;
}

section.sub h3 {
  font-family: var(--serif);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #f0f4f3;
  line-height: 1.25;
  padding-bottom: 0.35rem;
  margin-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}

.permalink {
  text-decoration: none;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.78rem;
  opacity: 0;
  padding-left: 0.4rem;
}

section.sub h3:hover .permalink,
.permalink:focus {
  opacity: 1;
  color: var(--copper);
}

/* dialogue */

.turn {
  margin-bottom: 1.3rem;
}

.sp {
  font-family: var(--mono);
  font-size: 0.82rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  margin-bottom: 0.22rem;
  text-transform: uppercase;
}

.sp.raduj {
  color: var(--slate);
}

.sp.nila {
  color: var(--brass);
}

.sp.mirena {
  color: var(--verdigris);
}

.ln {
  font-weight: 400;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.ln:last-child {
  margin-bottom: 0;
}

.ln em {
  font-style: italic;
  color: var(--dim);
}

/* scene blocks */

.scene {
  margin: 1.5rem 0;
  padding: 1rem 1.15rem;
  border: 1px solid var(--line);
  border-left: 3px solid var(--faint);
  background: var(--panel);
  color: var(--dim);
  font-size: 1.08rem;
}

.scene p {
  margin-bottom: 0.6rem;
}

.scene p:last-child {
  margin-bottom: 0;
}

.scene::before {
  content: "Scene";
  display: block;
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  color: var(--faint);
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

/* footer */

.colophon {
  border-top: 1px solid var(--line);
  margin-top: 0;
  padding-top: 0.9rem;
  color: var(--faint);
  font-family: var(--mono);
  font-size: 0.7rem;
  line-height: 1.55;
}

.colophon p {
  margin-bottom: 0.25rem;
}

.colophon p:last-child {
  margin-bottom: 0;
}

/* part navigation and colophon references */

.pager {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  margin-top: 1.6rem;
  padding-top: 0.9rem;
  padding-bottom: 0.9rem;
  border-top: 2px solid var(--line-hard);
  font-family: var(--mono);
  font-size: 0.74rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pager .cur {
  color: var(--faint);
}

.pager a {
  color: var(--copper);
}

.pager a:hover {
  color: var(--text);
}

.colophon .pref a {
  color: var(--dim);
}

.colophon .pref a:hover {
  color: var(--text);
}

/* status notice */

.notice {
  display: flex;
  align-items: baseline;
  gap: 1.2ch;
  border: 1px solid var(--line-hard);
  border-left: 3px solid var(--copper);
  padding: 0.8rem 1rem;
  font-family: var(--mono);
  text-transform: uppercase;
}

.notice .nlabel {
  font-size: 0.66rem;
  letter-spacing: 0.2em;
  color: var(--faint);
}

.notice .ntext {
  font-size: 0.82rem;
  letter-spacing: 0.14em;
  color: var(--copper);
}

@media (max-width: 560px) {
  .toc > ol {
    grid-template-columns: minmax(0, 1fr);
  }

  :root {
    --pad: 1rem;
  }

  body {
    font-size: 1rem;
  }
}
