:root {
  --field: #121416;
  --ink: #e7e2d6;
  --muted: #a39e93;
  --line: #3c4146;
  --gold: #c4a35a;
  --crimson: #8f2d2d;
  --measure: 42rem;
}

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

html {
  background: var(--field);
  color-scheme: dark;
  scrollbar-color: #3c4146 var(--field);
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--field);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
}

.mast,
footer {
  max-width: 72rem;
  margin: 0 auto;
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.mast {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  padding-top: 1.25rem;
  padding-bottom: 1.25rem;
  border-bottom: 1px solid var(--line);
  box-shadow: 0 4px 0 0 var(--field), 0 5px 0 0 var(--line);
}

.mast-tools {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: 1.25rem 1.75rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  color: inherit;
  text-decoration: none;
}

.brand img {
  width: 148px;
  height: 148px;
  flex: none;
}

.wordmark {
  display: block;
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-size: 1.85rem;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.bureau {
  display: block;
  margin-top: 0.25rem;
  color: var(--muted);
  font-size: 0.82rem;
}

nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.25rem;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  padding-bottom: 0.1rem;
}

nav a[aria-current="page"] {
  border-bottom-color: var(--gold);
}

main {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 2.75rem 1.5rem 4.5rem;
}

h1,
h2,
h3 {
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-weight: 500;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

h1 {
  margin: 0 0 1rem;
  font-size: 2.35rem;
}

.title-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  margin: 0 0 1.25rem;
}

.title-row .folio {
  margin: 0;
  padding-right: 1rem;
  border-right: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.title-row h1 {
  margin: 0;
}

h2 {
  margin: 2.5rem 0 0;
  padding-top: 0.4rem;
  font-size: 1.55rem;
  border-top: 1px solid var(--line);
}

h2 .count {
  margin-left: 0.65rem;
  color: var(--muted);
  font-family: "Atkinson Hyperlegible", "Segoe UI", sans-serif;
  font-size: 0.85rem;
  letter-spacing: 0;
}

h3 {
  margin: 0.2rem 0 0.4rem;
  font-size: 1.2rem;
}

p {
  margin: 0 0 1rem;
}

.dochead {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.2rem 1.25rem;
  margin: 0 0 1.75rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.84rem;
}

.dochead dt {
  margin: 0;
}

.dochead dd {
  margin: 0;
}

.clauses {
  list-style: none;
  margin: 1.25rem 0 0;
  padding: 0;
}

.clauses li {
  display: grid;
  grid-template-columns: 4.5rem 1fr;
  gap: 0.35rem 1rem;
  border-top: 1px solid var(--line);
  padding: 0.95rem 0;
}

.clauses .art {
  color: var(--gold);
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-size: 1.05rem;
}

body.register-page main {
  max-width: 56rem;
}

.register-head,
.register li {
  display: grid;
  grid-template-columns: 4.75rem 12rem 1fr;
  gap: 0.5rem 1.25rem;
  align-items: baseline;
}

.register-head {
  margin: 1.75rem 0 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.register {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.register li {
  border-top: 1px solid var(--line);
  padding: 1.05rem 0;
}

.register .num {
  color: var(--gold);
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-size: 1.85rem;
  line-height: 1;
}

.register h2 {
  margin: 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
}

.register p {
  margin: 0;
}

.staff-head,
.staff-roll li {
  display: grid;
  grid-template-columns: 3.25rem minmax(8rem, 12rem) minmax(10rem, 14rem) 1fr;
  gap: 0.45rem 1rem;
  align-items: baseline;
}

.staff-head {
  margin: 0.75rem 0 0;
  padding-bottom: 0.45rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.staff-roll {
  list-style: none;
  margin: 0 0 1.5rem;
  padding: 0;
}

.staff-roll li {
  border-top: 1px solid var(--line);
  padding: 0.85rem 0;
}

.staff-roll .num {
  color: var(--gold);
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-size: 1.15rem;
}

.staff-roll p {
  margin: 0;
}

.address {
  margin: 0 0 1.5rem;
  padding: 0.15rem 0 0.15rem 1rem;
  border-left: 1px solid var(--gold);
  color: var(--ink);
  font-style: normal;
}

body.desk main {
  max-width: 76rem;
}

.desk-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.5rem;
  margin: 0.25rem 0 1.75rem;
  border-bottom: 1px solid var(--line);
}

.desk-tabs button {
  margin: 0;
  padding: 0.35rem 0 0.6rem;
  border: 0;
  border-bottom: 1px solid transparent;
  background: transparent;
}

.desk-tabs button[aria-selected="true"] {
  border-bottom-color: var(--gold);
}

#tab-chats {
  position: relative;
}

.chat-alert {
  position: absolute;
  top: 0;
  left: 50%;
  width: 0.42rem;
  height: 0.42rem;
  transform: translate(-50%, -35%);
  border-radius: 50%;
  background: #c53636;
}

.materials-link {
  margin-left: auto;
  padding: 0.35rem 0 0.6rem;
  border-bottom: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
}

.materials-link:hover {
  border-bottom-color: var(--crimson);
}

.news-sheet {
  background: #f3f6fa;
  color: #152033;
  padding: 1.5rem 1.25rem 2rem;
  border-top: 4px solid #163e78;
}

.news-sheet .meta,
.news-sheet .pane-empty {
  color: #2f5f9a;
}

.news-sheet h3,
.news-sheet .news-list button {
  color: #152033;
}

.news-sheet .news-list button,
.news-sheet .chat-thread-col {
  border-color: #c5d4e8;
}

.news-sheet .news-list button[aria-expanded="true"] {
  border-bottom-color: #163e78;
  background: #e4edf7;
}

.news-sheet .chat-split {
  grid-template-columns: minmax(20rem, 28rem) minmax(0, 1fr);
  align-items: stretch;
  height: min(28rem, calc(100dvh - 12rem));
  min-height: 16rem;
  gap: 0 1.25rem;
}

.news-sheet .chat-split > :first-child {
  display: flex;
  flex-direction: column;
  min-height: 0;
  overflow: hidden;
}

.news-sheet .chat-thread-col {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #8eabc9 transparent;
}

.news-order {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0 0 0.35rem;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #2f5f9a;
}

.news-order select {
  width: auto;
  max-width: 15rem;
  margin: 0;
  padding: 0.1rem 0;
  border: 0;
  border-bottom: 1px solid #c5d4e8;
  border-radius: 0;
  background: transparent;
  color: #152033;
  font: inherit;
  font-size: 0.85rem;
  letter-spacing: 0;
  text-transform: none;
}

.news-sheet .news-list {
  flex: 1;
  margin: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: #8eabc9 transparent;
}

.news-sheet .news-list button {
  min-width: 0;
  padding: 0.38rem 0.15rem;
}

#panel-email .chat-split {
  grid-template-columns: minmax(18rem, 26rem) minmax(0, 1fr);
  align-items: stretch;
  height: min(28rem, calc(100dvh - 12rem));
  min-height: 16rem;
  gap: 0 1.25rem;
}

#panel-email .news-list {
  margin: 0;
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

#panel-email .chat-thread-col {
  min-height: 0;
  overflow: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--gold) transparent;
}

#panel-email .news-list button {
  min-width: 0;
  padding: 0.38rem 0.15rem;
}

#panel-email .mail-copy {
  display: flex;
  flex: 1;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  min-width: 0;
}

#panel-email .mail-copy > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#panel-email .mail-copy .meta {
  flex: none;
  font-size: 0.78rem;
}

.news-sheet .news-copy {
  flex: 1;
  flex-direction: row;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.news-sheet .news-copy > span:first-child {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.news-sheet .news-copy .meta {
  flex: none;
  font-size: 0.78rem;
}

body.materials {
  background: #0c0c0c;
  color: #e7e2d6;
  color-scheme: dark;
  scrollbar-color: #6e3030 #0c0c0c;
}

body.materials::-webkit-scrollbar {
  width: 14px;
  height: 14px;
}

body.materials::-webkit-scrollbar-track,
body.materials::-webkit-scrollbar-corner {
  background: #0c0c0c;
}

body.materials::-webkit-scrollbar-thumb {
  background: #6e3030;
  border: 3px solid #0c0c0c;
}

body.materials::-webkit-scrollbar-button {
  background: #0c0c0c;
  height: 14px;
  width: 14px;
}

body.materials .mast {
  border-bottom-color: #8f2d2d;
  box-shadow: 0 4px 0 0 #0c0c0c, 0 5px 0 0 #8f2d2d;
}

body.materials .warning {
  margin: 0 0 1.5rem;
  padding: 1rem 1.1rem;
  border: 1px solid #8f2d2d;
}

body.materials input {
  color: #e7e2d6;
  border-bottom-color: #8f2d2d;
}

body.materials .room-note {
  max-width: 62ch;
  color: #c9b4b4;
}

body.materials .dossier {
  max-width: 62ch;
  margin-top: 1.75rem;
  padding-top: 1rem;
  border-top: 1px solid #8f2d2d;
}

body.materials .dossier .when {
  margin: 0 0 0.35rem;
  color: #d26a6a;
  font-size: 0.82rem;
}

body.materials .dossier h2 {
  margin: 0 0 0.75rem;
  padding: 0;
  border: 0;
  font-size: 1.45rem;
}

body.materials .dossier p {
  line-height: 1.55;
}

.chat-split {
  display: grid;
  grid-template-columns: 16rem minmax(0, 1fr);
  gap: 1.25rem 2rem;
  align-items: start;
}

.chat-thread-col {
  min-height: 10rem;
  padding-left: 1.25rem;
  border-left: 1px solid var(--line);
}

.chat-compose {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
  margin-top: 1.25rem;
}

.chat-compose[hidden] {
  display: none;
}

.chat-compose label {
  flex: 1;
  margin-top: 0;
}

.chat-compose button {
  margin-top: 0;
}

.chat-list,
.news-list {
  list-style: none;
  margin: 0.75rem 0 0;
  padding: 0;
}

.chat-list button,
.news-list button {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 0.15rem;
  width: 100%;
  margin: 0;
  padding: 0.7rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  background: transparent;
  text-align: left;
}

.news-list button {
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}

.news-copy {
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  min-width: 0;
}

.tier-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.85rem;
  height: 1.85rem;
  padding: 0 0.2rem;
  flex: none;
  border: 0;
  background: #163e78;
  color: #f4f7fb;
  font-family: Newsreader, "Palatino Linotype", Palatino, serif;
  font-size: 0.72rem;
  font-weight: 600;
  line-height: 1;
}

.news-kicker {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 0 0 0.75rem;
}

.chat-list button[aria-expanded="true"],
.news-list button[aria-expanded="true"] {
  border-bottom-color: var(--gold);
}

.chat-list button[data-closed="1"] {
  color: var(--muted);
}

.chat-list button[data-closed="1"] .chat-name {
  text-decoration: line-through;
  text-decoration-thickness: 1px;
}

.chat-list button[data-closed="1"] .meta {
  color: #d26a6a;
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.chat-thread,
.news-reading {
  margin-top: 1rem;
}

.pane-empty {
  margin: 0.85rem 0 0;
  color: var(--muted);
  font-size: 0.92rem;
}

body.gate main {
  max-width: 68rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: 2.5rem;
  align-items: start;
}

body.gate .title-row,
body.gate .dochead {
  grid-column: 1 / -1;
}

body.gate form {
  margin: 0;
  padding-left: 2.5rem;
  border-left: 1px solid var(--line);
}

label {
  display: block;
  margin-top: 1.35rem;
  font-size: 0.85rem;
}

input {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.55rem 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
}

button {
  margin-top: 1.5rem;
  padding: 0.55rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
}

button:hover {
  border-color: var(--gold);
}

.mast button {
  margin-top: 0;
}

input:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid var(--gold);
  outline-offset: 3px;
}

.error {
  margin-top: 1.25rem;
  padding: 0.65rem 0.75rem;
  background: var(--crimson);
  color: var(--ink);
}

.entry {
  border-top: 1px solid var(--line);
  padding: 1rem 0 0.25rem;
}

.meta {
  margin: 0;
  color: var(--muted);
  font-size: 0.85rem;
}

.thread {
  list-style: none;
  margin: 0.5rem 0 0;
  padding: 0 0 0 1rem;
  border-left: 1px solid var(--line);
}

.thread li + li {
  margin-top: 0.75rem;
}

footer {
  border-top: 1px solid var(--line);
  padding-top: 1rem;
  padding-bottom: 2rem;
  color: var(--muted);
  font-size: 0.82rem;
}

.colophon {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  margin: 0;
}

.colophon span + span {
  margin-left: 0.85rem;
  padding-left: 0.85rem;
  border-left: 1px solid var(--line);
}

@media (max-width: 720px) {
  .mast {
    flex-direction: column;
    align-items: flex-start;
  }

  .brand img {
    width: 112px;
    height: 112px;
  }

  h1 {
    font-size: 1.9rem;
  }

  .title-row {
    flex-wrap: wrap;
  }

  .clauses li {
    grid-template-columns: 2.5rem 1fr;
  }

  .register-head {
    display: none;
  }

  .register li {
    grid-template-columns: 2.5rem 1fr;
  }

  .register p {
    grid-column: 2;
  }

  body.gate main {
    display: block;
    max-width: var(--measure);
  }

  body.gate form {
    margin-top: 0.5rem;
    padding-top: 0.25rem;
    padding-left: 0;
    border-left: 0;
  }

  .staff-head {
    display: none;
  }

  .staff-roll li {
    grid-template-columns: 2.5rem 1fr;
  }

  .staff-roll li span:nth-child(3),
  .staff-roll li p {
    grid-column: 2;
  }

  .chat-split {
    grid-template-columns: 1fr;
  }

  .chat-thread-col {
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--line);
    padding-top: 0.75rem;
  }

  .news-sheet .chat-split {
    height: auto;
    min-height: 0;
  }

  .news-sheet .chat-split > :first-child {
    height: 16rem;
    max-height: none;
  }

  .news-sheet .chat-thread-col {
    max-height: 18rem;
    border-top-color: #c5d4e8;
  }

  #panel-email .chat-split {
    height: auto;
    min-height: 0;
  }

  #panel-email .news-list {
    height: 16rem;
    max-height: none;
  }

  #panel-email .chat-thread-col {
    max-height: 18rem;
  }
}
