:root {
  --title-red: #cc0000;
  --page-grey: #c0c0c0;
  --ink: #000000;
  --frame-ink: #111111;
  --rule-grey: #777777;
  --pillar-width: 164px;
  --pillar-cap-height: 52px;
  --pillar-edge-offset: 18px;
  --folio-gutter: 86px;
  --stage-width: min(1480px, 96vw);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  background: var(--page-grey);
}

body {
  min-width: 320px;
  margin: 8px;
  color: var(--ink);
  background: var(--page-grey);
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.5;
}

.skip-link {
  position: fixed;
  top: -5rem;
  left: 1rem;
  z-index: 999;
  padding: .55rem .8rem;
  border: 2px solid #000;
  color: #000;
  background: #fff;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  width: 100%;
  margin: 0 auto;
  padding: 14px 0 0;
  text-align: center;
  background: var(--page-grey);
}

.title-lockup {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 14px;
}

.title-sigil {
  flex: 0 0 auto;
  width: 43px;
  height: 81px;
  transform: skewX(-12deg);
  object-fit: contain;
}

.title-lockup h1 {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: clamp(1.8rem, 4vw, 2.9rem);
  line-height: 1;
  letter-spacing: .2em;
}

.title-lockup p {
  margin: .45rem 0 0;
  color: #000;
  font: .8rem/1.1 Arial, Helvetica, sans-serif;
  letter-spacing: .17em;
  text-transform: uppercase;
}

/* The menu uses exactly the same outer width as the pillar-to-pillar stage. */
.phrase-menu {
  width: var(--stage-width);
  max-width: calc(100vw - 16px);
  margin: 0 auto;
  padding: 11px 18px;
  border: 1px solid var(--rule-grey);
  background: var(--page-grey);
  font: 700 .68rem/1.9 Arial, Helvetica, sans-serif;
  letter-spacing: .025em;
  text-align: center;
  text-transform: uppercase;
}

.phrase-menu a {
  color: #000;
  text-decoration: none;
  white-space: nowrap;
}

.phrase-menu a:hover,
.phrase-menu a:focus {
  color: var(--title-red);
  text-decoration: underline;
}

.phrase-menu span {
  padding: 0 .42rem;
  color: #555;
}

/* One black pillar at each edge; the folio now fills nearly all the space between them. */
.kashkul-stage {
  display: grid;
  grid-template-columns: var(--pillar-width) minmax(0, 1fr) var(--pillar-width);
  align-items: stretch;
  width: var(--stage-width);
  max-width: calc(100vw - 16px);
  margin: 0 auto 36px;
  overflow: visible;
}

.colonnade {
  position: relative;
  min-height: 100%;
  pointer-events: none;
  overflow: visible;
}

.pillar {
  position: absolute;
  top: 0;
  bottom: 0;
  display: flex;
  width: var(--pillar-width);
  flex-direction: column;
}

.colonnade-left .pillar { left: calc(var(--pillar-edge-offset) * -1); }
.colonnade-right .pillar { right: calc(var(--pillar-edge-offset) * -1); }

.pillar-cap,
.pillar-base {
  flex: 0 0 var(--pillar-cap-height);
  width: var(--pillar-width);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 100% 100%;
}

.pillar-cap { background-image: url("assets/pillar-top-mask.png"); }
.pillar-base { background-image: url("assets/pillar-base-mask.png"); }

.pillar-shaft {
  flex: 1 1 auto;
  width: var(--pillar-width);
  min-height: 1px;
  background: url("assets/pillar-shaft-mask.png") center top / 100% 6px repeat-y;
}

.folio-frame {
  position: relative;
  z-index: 2;
  justify-self: center;
  width: calc(100% - var(--folio-gutter));
  min-width: 0;
  border: 2px solid var(--frame-ink);
  outline: 1px solid var(--rule-grey);
  outline-offset: 4px;
  background: var(--page-grey);
  box-shadow: 0 4px 10px rgba(0, 0, 0, .18);
  margin-top: 10px;
}

.folio-inner {
  position: relative;
  z-index: 2;
  padding: 34px 48px 30px;
  background: var(--page-grey);
}


.folio-heading {
  position: relative;
  z-index: 3;
  padding: 4px 55px;
  text-align: center;
}

.folio-heading h2 {
  margin: .2rem 0 .3rem;
  color: var(--title-red);
  font-size: clamp(1.55rem, 3.5vw, 2.25rem);
  line-height: 1.05;
  letter-spacing: .025em;
}

.folio-heading p {
  margin: 0;
  font-weight: 700;
}

.poem {
  width: min(100%, 820px);
  margin: 0 auto 28px;
  padding: 0 25px 18px;
  background: var(--page-grey);
}

.poem > .section-heading { margin-top: 4px; }

.poem-lines {
  text-align: center;
  line-height: 1.16;
}

.poem-lines p { margin: 0 0 .18rem; }
.poem-lines a { color: inherit; }

.text-section {
  position: relative;
  margin: 28px auto;
  padding: 25px 36px 24px;
  scroll-margin-top: 1rem;
  background: var(--page-grey);
}

/* Framed and frameless modes are retained, but now contain quotations rather than link lists. */
.text-panel {
  width: min(100%, 900px);
  border: 3px double var(--frame-ink);
  box-shadow: inset 0 0 0 1px var(--rule-grey);
}

.text-shelf {
  width: min(100%, 960px);
  border-top: 1px solid var(--rule-grey);
  border-bottom: 1px solid var(--rule-grey);
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 13px;
  margin: 3px 0 18px;
  color: var(--title-red);
  font-weight: 700;
  text-align: center;
}

.section-heading::before,
.section-heading::after {
  content: "";
  flex: 0 0 54px;
  width: 54px;
  height: 1px;
  background: var(--frame-ink);
}

.section-heading span {
  font-size: 1.04rem;
  letter-spacing: .025em;
}

.tribes-quotation {
  position: relative;
  width: min(100%, 780px);
  margin: 0 auto;
  padding: 4px 20px 2px 38px;
  text-align: justify;
  text-wrap: pretty;
}

.tribes-quotation::before {
  content: "“";
  position: absolute;
  top: -.28em;
  left: 0;
  color: #555;
  font-size: 4rem;
  font-weight: 700;
  line-height: 1;
}

.tribes-quotation p {
  margin: 0 0 .9rem;
  font-size: 1rem;
}

.tribes-quotation p:last-of-type { margin-bottom: .4rem; }

.lineated-quotation {
  text-align: center;
  font-size: 1.06rem !important;
  line-height: 1.65;
}

.quote-source {
  margin-top: 0;
  padding-top: 0;
  font-size: .82rem;
  line-height: 1.35;
  text-align: right;
}

.quote-source cite { font-style: normal; }
.quote-source a {
  color: #000;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

.quote-source a:hover,
.quote-source a:focus {
  color: var(--title-red);
}


.folio-footer {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 3px double var(--frame-ink);
  text-align: center;
  background: var(--page-grey);
}

.folio-footer p {
  margin: 0 0 18px;
  color: #000;
  font-size: .78rem;
}

.ending-ornament {
  display: block;
  width: 237px;
  max-width: 70%;
  height: 27px;
  margin: 0 auto;
  object-fit: contain;
}

.placeholder-folio {
  width: min(980px, 92vw);
  min-height: 280px;
  margin: 32px auto;
  padding: 44px;
  border: 2px solid var(--frame-ink);
  outline: 1px solid var(--rule-grey);
  outline-offset: 4px;
  text-align: center;
}

.placeholder-folio h2 { color: var(--title-red); }

.placeholder-home {
  font: .75rem/1.4 Arial, Helvetica, sans-serif;
  text-align: left;
}

.placeholder-home a { color: #000; }

@media (max-width: 1100px) {
  :root {
    --stage-width: 98vw;
    --folio-gutter: 104px;
  }

  .folio-inner { padding: 30px 34px 28px; }
  .phrase-menu { font-size: .64rem; }
}

@media (max-width: 820px) {
  :root {
    --pillar-width: 104px;
    --pillar-cap-height: 35px;
    --pillar-edge-offset: 12px;
    --folio-gutter: 20px;
  }

  .phrase-menu a,
  .phrase-menu span { white-space: normal; }

  .folio-inner { padding: 24px 18px; }
  .folio-heading { padding-right: 18px; padding-left: 18px; }
  .text-section { padding-right: 20px; padding-left: 20px; }
  .section-heading::before,
  .section-heading::after { flex-basis: 28px; width: 28px; }
  .tribes-quotation { padding-left: 28px; padding-right: 8px; }
}

@media (max-width: 600px) {
  .kashkul-stage {
    display: block;
    width: 94vw;
  }

  .colonnade { display: none; }
  .folio-frame { width: 100%; }
  .phrase-menu { width: 94vw; }
  .text-section { padding: 22px 14px 20px; }
  .tribes-quotation { text-align: left; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

.quote-source .source-note {
  display: inline-block;
  font-style: normal;
}
