/* State of the Horizon, and the pages beside it (Host a Horizon, the
   classroom guide): pages to read, in the horizon's night colors. Unlike the
   horizon itself, they scroll. */

/* Hidden means hidden, whatever display a class gives. */
[hidden] {
  display: none !important;
}

:root {
  color-scheme: dark;
  --night: #06070d;
  --panel: #0d0d1b;
  --ink: #ece9f2;
  --ink-2: #bdb9cb;
  --ink-3: #8c88a2;
  --hairline: rgba(236, 233, 242, 0.14);
  --fear: #849fe7;
  --mixed: #ebe7e2;
  --hope: #f1af5d;
  --serif: 'Fraunces', 'Iowan Old Style', 'Palatino Linotype', Georgia, serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  background: var(--night);
  color: var(--ink);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

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

a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: rgba(236, 233, 242, 0.3);
  text-underline-offset: 3px;
}
a:hover {
  text-decoration-color: currentColor;
}

.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  max-width: 800px;
  margin: 0 auto;
  padding: 18px 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--serif);
  font-size: 18px;
  text-decoration: none;
}
.brand i {
  color: var(--ink-2);
}
.back {
  font-size: 13px;
  color: var(--ink-2);
}

.report {
  max-width: 800px;
  margin: 0 auto;
  padding: 8px 20px 64px;
}
h1 {
  margin: 16px 0 8px;
  font-family: var(--serif);
  font-weight: 340;
  font-size: clamp(32px, 6vw, 46px);
  line-height: 1.1;
}
h2 {
  margin: 44px 0 14px;
  font-family: var(--serif);
  font-weight: 360;
  font-size: 26px;
}
h3 {
  margin: 20px 0 8px;
  font-size: 15px;
  font-weight: 600;
}
h3 .count {
  font-weight: 400;
  color: var(--ink-3);
}
p,
li {
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink-2);
}
.lede {
  font-family: var(--serif);
  font-size: 19px;
  line-height: 1.5;
  color: var(--ink);
}
.fine {
  font-size: 13px;
  color: var(--ink-3);
}

.caveat {
  margin-top: 24px;
  padding: 16px 20px;
  border: 1px solid var(--hairline);
  border-radius: 14px;
  background: var(--panel);
}
.caveat p {
  margin: 0 0 8px;
}
.caveat b {
  color: var(--ink);
  font-weight: 600;
}
.polls {
  margin: 0;
  padding-left: 18px;
}

.bar {
  display: flex;
  height: 10px;
  border-radius: 5px;
  overflow: hidden;
  background: rgba(236, 233, 242, 0.06);
}
.bar .part.hope {
  background: var(--hope);
}
.bar .part.both {
  background: var(--mixed);
}
.bar .part.fear {
  background: var(--fear);
}
.legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  margin: 8px 0 0;
  font-size: 13px;
}
.legend .k::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 2px;
  margin-right: 7px;
  vertical-align: middle;
  border-radius: 2px;
  background: currentColor;
}
.legend .k.hope::before {
  background: var(--hope);
}
.legend .k.both::before {
  background: var(--mixed);
}
.legend .k.fear::before {
  background: var(--fear);
}

.theme,
.week {
  padding: 4px 0 18px;
  border-bottom: 1px solid var(--hairline);
}
.ground {
  color: var(--ink);
}
.lens {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}
.quotes {
  display: grid;
  gap: 8px;
  margin-top: 10px;
}
.voice {
  margin: 0;
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--mixed);
  font-family: var(--serif);
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
}
.voice.hope {
  border-color: var(--hope);
}
.voice.fear {
  border-color: var(--fear);
}
.more {
  margin: 10px 0 0;
  font-size: 13px;
}
.lines li {
  color: var(--ink);
}
.downloads a {
  font-weight: 500;
}
.arrow {
  text-decoration: none;
}

/* Host a Horizon and the classroom guide */
.field {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
}
.field label {
  font-size: 14px;
  color: var(--ink-2);
}
.field input {
  width: min(260px, 100%);
  padding: 9px 12px;
  border: 1px solid var(--hairline);
  border-radius: 10px;
  background: var(--panel);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
}
.field input:focus {
  border-color: rgba(236, 233, 242, 0.4);
  outline: none;
}
.links {
  padding-left: 18px;
}
.links a {
  font-weight: 500;
}
.snippet {
  overflow-x: auto;
  padding: 14px 16px;
  border: 1px solid var(--hairline);
  border-radius: 12px;
  background: var(--panel);
  font-size: 12.5px;
  line-height: 1.5;
  color: var(--ink-2);
  white-space: pre-wrap;
  word-break: break-all;
}

.teacher h2 {
  margin-top: 0;
}
.teacher .code {
  margin: 4px 0;
  font-family: var(--serif);
  font-size: 44px;
  letter-spacing: 0.18em;
  color: var(--ink);
}
.teacher .actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.pill,
.print-guide {
  padding: 8px 16px;
  border: 1px solid var(--hairline);
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  cursor: pointer;
}
.pill:hover,
.print-guide:hover {
  border-color: rgba(236, 233, 242, 0.4);
}
.pill.primary {
  border-color: transparent;
  background: var(--hope);
  color: #1d1b28;
  font-weight: 600;
}
.pill[data-sure='1'] {
  border-color: var(--hope);
}
.flow li {
  margin-bottom: 10px;
}
.flow b,
.map b {
  color: var(--ink);
  font-weight: 600;
}
.table-wrap {
  overflow-x: auto;
}
.map {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  line-height: 1.45;
}
.map th,
.map td {
  padding: 10px 12px 10px 0;
  border-bottom: 1px solid var(--hairline);
  text-align: left;
  vertical-align: top;
  color: var(--ink-2);
}
.map th {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.map td:first-child {
  font-family: var(--serif);
  font-style: italic;
  color: var(--ink);
}

@media print {
  html,
  body {
    background: #fff;
    color: #111;
  }
  .top,
  .teacher,
  .print-guide {
    display: none;
  }
  p,
  li,
  td,
  th,
  .lede,
  .map td:first-child,
  .flow b,
  .map b {
    color: #111;
  }
  a {
    color: #111;
  }
}

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