/*
 * peykmail.com: the public site in the app's own world, "Çini".
 * The ground is the cobalt rail colour laid as a tile wall; every page is a glaze-white
 * sheet on it. Colours are the app's tokens (src/app/globals.css), light and dark.
 */

@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: Onest;
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/fonts/onest-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
/* Arial tuned to Onest's measures, so the swap does not move the page. */
@font-face {
  font-family: "Onest Fallback";
  src: local("Arial"), local("ArialMT");
  ascent-override: 92.2%;
  descent-override: 28.99%;
  line-gap-override: 0%;
  size-adjust: 105.2%;
}

:root {
  color-scheme: light dark;

  --ground: #f4f7fa;
  --surface: #ffffff;
  --surface-2: #edf1f6;
  --ink: #14183a;
  --ink-2: #3f4567;
  --ink-3: #5b6283;
  --line: #dce2ec;
  --line-strong: #bfc8d8;
  --cobalt: #1b3a9e;
  --cobalt-soft: #e3ecff;
  --cobalt-ink: #1b3a9e;
  --cobalt-fill: #1b3a9e;
  --cobalt-fill-hover: #16308a;
  --cobalt-deep: #132b7a;
  --on-cobalt: #ffffff;
  --turq: #16a3a6;
  --bole: #d8452e;
  --bole-soft: #fde8e3;
  --bole-ink: #a52d1a;
  --ochre: #c98a1a;
  --ochre-ink: #7c5206;
  --emerald: #1f8a5b;
  --biscuit: #e6ebf2;
  --biscuit-edge: #c9d1de;
  --focus: #1b3a9e;
  --on-accent: #ffffff;

  /* The wall: the app's rail, laid in tiles. */
  --field: #1b3a9e;
  --grout: #3655b8;
  --field-ink: #dce5ff;
  --field-ink-dim: #afc0f2;
  --field-hover: #2647b0;
  --field-active: #ffffff;
  --field-active-ink: #132b7a;
  --logo-l: #ffffff;
  --logo-turq: #16a3a6;
  /* The mark on a sheet: a cobalt L on light, a white L on dark. */
  --mark-l: #1b3a9e;

  --raise: 0 1px 2px rgb(20 24 58 / 0.05), 0 2px 6px -1px rgb(20 24 58 / 0.08);
  --sheet-shadow: 0 1px 2px rgb(8 14 50 / 0.18), 0 24px 48px -24px rgb(8 14 50 / 0.45);

  --sans: Onest, "Onest Fallback", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "SF Mono", Menlo, Consolas, monospace;
  --pitch: 56px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --sheet-pad: 20px;
  --note-w: 17rem;
  --note-gap: 2.5rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0c0f22;
    --surface: #141933;
    --surface-2: #1a2040;
    --ink: #eef1fb;
    --ink-2: #c3c9e4;
    --ink-3: #98a1c6;
    --line: #262d55;
    --line-strong: #3a4378;
    --cobalt: #86a2ff;
    --cobalt-soft: #1c2759;
    --cobalt-ink: #a9bdff;
    --cobalt-fill: #4a6ee0;
    --cobalt-fill-hover: #3f61d2;
    --cobalt-deep: #3656c4;
    --turq: #3fcdd0;
    --bole: #f27560;
    --bole-soft: #46201a;
    --bole-ink: #ff9d8c;
    --ochre: #e6ae45;
    --ochre-ink: #f3c871;
    --emerald: #4cc38f;
    --biscuit: #1f2647;
    --biscuit-edge: #37407a;
    --focus: #3fcdd0;
    --on-accent: #0c0f22;

    --field: #0f1b52;
    --grout: #1d2c70;
    --field-ink: #cfd9ff;
    --field-ink-dim: #8fa2e0;
    --field-hover: #1a2a6e;
    --field-active: #eef1fb;
    --field-active-ink: #0f1b52;
    --logo-turq: #3fcdd0;
    --mark-l: #ffffff;

    --raise: 0 1px 2px rgb(0 0 0 / 0.35);
    --sheet-shadow: 0 1px 2px rgb(0 0 0 / 0.4), 0 24px 48px -24px rgb(0 0 0 / 0.7);
  }
}

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

html {
  font-family: var(--sans);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--field);
  scrollbar-color: var(--field-ink-dim) var(--field);
  scrollbar-gutter: stable;
  accent-color: var(--cobalt-fill);
}

body {
  margin: 0;
  min-height: 100dvh;
  position: relative;
  color: var(--field-ink);
  font-size: 1rem;
  line-height: 1.6;
  background-color: var(--field);
  background-image:
    linear-gradient(var(--grout) 1px, transparent 1px),
    linear-gradient(90deg, var(--grout) 1px, transparent 1px);
  background-size: var(--pitch) var(--pitch);
  background-position: -1px -1px;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis: none;
}

::selection {
  background: var(--cobalt);
  color: var(--on-accent);
}

:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
  border-radius: 2px;
}

a {
  color: inherit;
  text-underline-offset: 3px;
  text-decoration-thickness: 1px;
}

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

p,
li {
  text-wrap: pretty;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 10;
  padding: 8px 14px;
  border-radius: 7px;
  background: var(--field-active);
  color: var(--field-active-ink);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
}
.skip:focus-visible {
  top: 12px;
  outline-color: var(--logo-turq);
}

/* ---------------------------------------------------------------- the line on the wall */

.bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 24px;
  padding: 14px 16px 10px;
  max-width: 82rem;
  margin: 0 auto;
}
.bar :focus-visible,
.wall-note :focus-visible,
.toc :focus-visible {
  outline-color: #ffffff;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #ffffff;
  text-decoration: none;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  padding: 4px 2px;
  border-radius: 7px;
}
.brand svg {
  width: 24px;
  height: 24px;
  flex: none;
}

.brand .l {
  fill: var(--logo-l);
}
.brand .away {
  fill: var(--logo-turq);
}

.docs {
  order: 3;
  flex-basis: 100%;
  margin: 0 0 0 -10px;
  font-size: 0.875rem;
}
.docs ul {
  display: flex;
  flex-wrap: wrap;
  gap: 2px 4px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.docs a,
.tools a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 32px;
  padding: 0 10px;
  border-radius: 7px;
  color: var(--field-ink);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 150ms, color 150ms;
}
.docs a:hover,
.tools a:hover {
  background: var(--field-hover);
  color: #ffffff;
}
.docs a[aria-current="page"] {
  background: var(--field-active);
  color: var(--field-active-ink);
  font-weight: 600;
}

.tools {
  display: flex;
  align-items: center;
  gap: 4px;
  margin-left: auto;
  font-size: 0.875rem;
}
.tools .signin {
  box-shadow: inset 0 0 0 1px var(--field-ink-dim);
  color: #ffffff;
}
.tools svg {
  width: 16px;
  height: 16px;
  flex: none;
}

@media (min-width: 900px) {
  .bar {
    flex-wrap: nowrap;
    padding: 14px 28px;
    min-height: 64px;
  }
  .docs {
    order: 0;
    flex-basis: auto;
    margin: 0 0 0 16px;
  }
}

/* The tile that set off: one turquoise tile in the wall, top right, set on the grout lines. */
.departed {
  display: none;
}
@supports (left: round(down, 100% - 10px, 5px)) {
  @media (min-width: 1100px) {
    .departed {
      display: block;
      position: absolute;
      z-index: 0;
      /* Just off the letter's top right corner (the sheet ends at 50% + 212px here). */
      top: var(--pitch);
      left: round(up, 50% + 220px, var(--pitch));
      width: calc(var(--pitch) - 1px);
      height: calc(var(--pitch) - 1px);
      background: var(--logo-turq);
    }
  }
}

/* ---------------------------------------------------------------- the desk and its sheets */

.desk {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 12px 8px 56px;
}

.sheet {
  background: var(--surface);
  color: var(--ink);
  border-radius: 10px;
  box-shadow: var(--sheet-shadow);
  padding: 28px var(--sheet-pad) 0;
  font-size: 1.0625rem;
  line-height: 1.65;
}

.sheet a {
  color: var(--cobalt-ink);
}
.sheet a:hover {
  text-decoration-thickness: 2px;
}

.sheet p {
  margin: 0 0 1em;
}

@media (min-width: 640px) {
  :root {
    --sheet-pad: 40px;
  }
  .desk {
    padding: 16px 24px 72px;
  }
  .sheet {
    padding-top: 44px;
  }
}

@media (min-width: 1100px) {
  :root {
    --sheet-pad: 56px;
  }
  .desk {
    padding-top: 24px;
  }
}

/* ---------------------------------------------------------------- the tile */

.tile {
  display: inline-block;
  flex: none;
  width: 10px;
  height: 10px;
  background: var(--cobalt);
}
.tile--hollow {
  background: var(--biscuit);
  /* The edge carries the meaning (a key on the rules page), so it is drawn at ink strength. */
  box-shadow: inset 0 0 0 1px var(--ink-3);
}
.tile--warn {
  background: linear-gradient(to top, var(--ochre) 0 50%, transparent 50% 100%);
  box-shadow: inset 0 0 0 1px var(--ochre);
}
.tile--danger {
  background: linear-gradient(135deg, var(--bole) 0 62%, transparent 62% 100%);
  box-shadow: inset 0 0 0 1px var(--bole);
}
.tile--engaged {
  background: var(--turq);
}
.tile--ok {
  background: var(--emerald);
}

/* ---------------------------------------------------------------- the letter (home) */

.letter h1 {
  font-size: clamp(1.875rem, 1.2rem + 2.6vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.025em;
  font-weight: 600;
  max-width: 17em;
}

.sender {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin: 28px 0 0;
  padding: 18px 0 20px;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  font-size: 0.9375rem;
  line-height: 1.5;
  color: var(--ink-2);
}
.sheet .sender p {
  margin: 0;
}
.sheet .sender .who {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 6px;
}
.sender .avatar {
  width: 36px;
  height: 36px;
  flex: none;
}
.sender .avatar .l {
  fill: var(--mark-l);
}
.sender .avatar .away {
  fill: var(--turq);
}
.sender strong {
  color: var(--ink);
  font-weight: 600;
}
.sender .addr {
  color: var(--ink-3);
}
.sender .label {
  color: var(--ink-3);
}
.part {
  border-radius: 4px;
  transition: background-color 150ms, box-shadow 150ms;
}
.sender .part {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  column-gap: 8px;
  padding-left: 48px;
}
.sender .who.part {
  padding-left: 0;
}

/* Number tiles: the same square in the letter and in its margin note. */
.mk {
  display: inline-grid;
  place-items: center;
  flex: none;
  width: 18px;
  height: 18px;
  font-size: 0.6875rem;
  line-height: 1;
  font-weight: 600;
  background: var(--cobalt-fill);
  color: var(--on-cobalt);
  vertical-align: 2px;
}
.wall-note .mk {
  background: var(--field-active);
  color: var(--field-active-ink);
}
.mk[data-n="2"] {
  --n: 1;
}
.mk[data-n="3"] {
  --n: 2;
}
.mk[data-n="4"] {
  --n: 3;
}
@media (prefers-reduced-motion: no-preference) {
  .mk {
    animation: glaze-in 150ms var(--ease) both;
    animation-delay: calc(350ms + var(--n, 0) * 150ms);
  }
}
@keyframes glaze-in {
  from {
    background: var(--biscuit);
    color: transparent;
    box-shadow: inset 0 0 0 1px var(--biscuit-edge);
  }
}

.letter .body {
  padding-top: 28px;
}
.letter h2 {
  font-size: 1.25rem;
  line-height: 1.35;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.2em 0 0.5em;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px 20px;
  margin: 20px 0 1.5em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border-radius: 7px;
  background: var(--cobalt-fill);
  color: var(--on-cobalt);
  box-shadow: var(--raise);
  font-size: 1rem;
  font-weight: 500;
  text-decoration: none;
  transition: background-color 150ms;
}
.sheet a.btn {
  color: var(--on-cobalt);
}
.btn:hover {
  background: var(--cobalt-fill-hover);
}
.btn:active {
  background: var(--cobalt-deep);
}
.btn svg {
  width: 16px;
  height: 16px;
  flex: none;
}
@media (max-width: 420px) {
  .btn {
    padding: 0 16px;
    font-size: 0.9375rem;
  }
}

.out-of-sight {
  list-style: none;
  margin: 0 0 1em;
  padding: 0;
  display: grid;
  gap: 10px;
}
.out-of-sight li {
  display: grid;
  grid-template-columns: 10px minmax(0, 1fr);
  column-gap: 14px;
  align-items: baseline;
}
.out-of-sight .tile {
  transform: translateY(1px);
}

.facts {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 2px 32px;
  margin: 0 0 1em;
  font-size: 0.9375rem;
}
.facts div {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}
.facts div:last-child {
  border-bottom: 0;
}
.facts dt {
  color: var(--ink-3);
  font-size: 0.875rem;
}
.facts dd {
  margin: 0;
  color: var(--ink);
  font-weight: 500;
  overflow-wrap: anywhere;
}
@media (min-width: 640px) {
  .facts div {
    grid-template-columns: 12rem minmax(0, 1fr);
    column-gap: 24px;
  }
}

.signoff {
  margin: 2em 0 0;
}
.signoff span {
  display: block;
  font-weight: 600;
}

/* Margin notes. On a narrow screen they sit in the letter, after the part they explain. */
.wall-note {
  margin: 12px 0 0;
  padding: 12px 14px;
  border-radius: 7px;
  background: var(--surface-2);
  color: var(--ink-2);
  font-size: 0.875rem;
  line-height: 1.5;
  display: grid;
  grid-template-columns: 18px minmax(0, 1fr);
  column-gap: 12px;
  transition: background-color 150ms, color 150ms;
}
.wall-note .mk {
  background: var(--cobalt-fill);
  color: var(--on-cobalt);
  margin-top: 1px;
}
.wall-note b {
  display: block;
  color: var(--ink);
  font-weight: 600;
}
.wall-note p {
  margin: 0;
}
.wall-note a {
  color: var(--cobalt-ink);
}
.sender .wall-note {
  order: 2;
}
.sender .wall-note:first-of-type {
  margin-top: 16px;
}

/* From 1100px the notes leave the sheet and sit on the wall beside their part. */
@media (min-width: 1100px) {
  .desk--letter {
    grid-template-columns: minmax(0, 46rem);
    justify-content: center;
    padding-right: calc(var(--note-w) + var(--note-gap) + 24px);
  }
  .sender {
    display: block;
  }
  .sender .part {
    margin: 2px 0;
  }
  .sender .who {
    display: flex;
  }
  .wall-note,
  .sender .wall-note:first-of-type {
    float: right;
    clear: right;
    width: var(--note-w);
    margin: 0 calc(-1 * (var(--note-w) + var(--note-gap) + var(--sheet-pad))) 14px 0;
    padding: 4px 12px 8px 8px;
    background: transparent;
    color: var(--field-ink);
  }
  .wall-note b {
    color: #ffffff;
  }
  .wall-note a {
    color: #ffffff;
  }
  .wall-note .mk {
    background: var(--field-active);
    color: var(--field-active-ink);
  }
}

/* The signature: a note and its part of the letter light up together. */
.letter:has(.wall-note[data-n="1"]:is(:hover, :focus-within)) .part[data-n="1"],
.letter:has(.wall-note[data-n="2"]:is(:hover, :focus-within)) .part[data-n="2"],
.letter:has(.wall-note[data-n="3"]:is(:hover, :focus-within)) .part[data-n="3"],
.letter:has(.wall-note[data-n="4"]:is(:hover, :focus-within)) .part[data-n="4"] {
  background: var(--cobalt-soft);
  box-shadow: -8px 0 0 var(--cobalt-soft), 8px 0 0 var(--cobalt-soft);
}
.letter:has(.part[data-n="1"]:hover) .wall-note[data-n="1"],
.letter:has(.part[data-n="2"]:hover) .wall-note[data-n="2"],
.letter:has(.part[data-n="3"]:hover) .wall-note[data-n="3"],
.letter:has(.part[data-n="4"]:hover) .wall-note[data-n="4"],
.wall-note:is(:hover, :focus-within) {
  background: var(--cobalt-soft);
}
@media (min-width: 1100px) {
  .letter:has(.part[data-n="1"]:hover) .wall-note[data-n="1"],
  .letter:has(.part[data-n="2"]:hover) .wall-note[data-n="2"],
  .letter:has(.part[data-n="3"]:hover) .wall-note[data-n="3"],
  .letter:has(.part[data-n="4"]:hover) .wall-note[data-n="4"],
  .letter .wall-note:is(:hover, :focus-within) {
    background: var(--field-hover);
    color: #ffffff;
  }
}

/* ---------------------------------------------------------------- the footer of every sheet */

.sheet-foot {
  clear: both;
  margin: 40px calc(-1 * var(--sheet-pad)) 0;
  padding: 20px var(--sheet-pad) 24px;
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface-2) 55%, var(--surface));
  border-radius: 0 0 10px 10px;
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--ink-3);
}
.sheet-foot p {
  margin: 0 0 6px;
}
.sheet-foot .part {
  display: block;
}
.sheet-foot nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin: 10px 0 0;
  padding: 0;
  list-style: none;
}
.sheet-foot nav a {
  color: var(--ink-2);
}
.sheet-foot .wall-note {
  margin-bottom: 14px;
}
@media (min-width: 1100px) {
  /* The footer holds its own note, so a tall note never leaves a blank strip under the footer. */
  .sheet-foot {
    display: flow-root;
  }
}
@media (max-width: 1099.98px) {
  .sheet-foot {
    display: flex;
    flex-direction: column;
  }
  .sheet-foot > * {
    order: 3;
  }
  .sheet-foot > .part {
    order: 1;
  }
  .sheet-foot > .wall-note {
    order: 2;
    margin: 4px 0 14px;
  }
}

.nb {
  white-space: nowrap;
}

/* ---------------------------------------------------------------- documents */

/* A document is one sheet: its head, its contents (on a narrow screen) and its body. */
.sheet-stack {
  display: none;
}
.desk--doc .sheet {
  box-shadow: none;
}
.doc-head {
  border-radius: 10px 10px 0 0;
  padding-bottom: 12px;
}
.doc-body {
  border-radius: 0 0 10px 10px;
  padding-top: 4px;
}

.draft {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0 0 20px !important;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--ochre-ink);
}
.draft .tile {
  transform: translateY(1px);
}

.doc h1 {
  font-size: clamp(1.75rem, 1.25rem + 1.6vw, 2.5rem);
  line-height: 1.15;
  letter-spacing: -0.02em;
  font-weight: 600;
}
.doc .meta {
  margin: 10px 0 0 !important;
  font-size: 0.9375rem;
  color: var(--ink-3);
}
.doc .lede {
  margin: 18px 0 0 !important;
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--ink-2);
  max-width: 38em;
}
.doc-body {
  max-width: 100%;
}
.doc-body > section {
  scroll-margin-top: 40px;
}
.doc-body h2 {
  font-size: 1.375rem;
  line-height: 1.3;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 2.4em 0 0.6em;
}
.doc-body section:first-child h2 {
  margin-top: 1.2em;
}
.doc-body h3 {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 1.6em 0 0.4em;
}
.doc-body ul,
.doc-body ol {
  margin: 0 0 1em;
  padding-left: 1.25em;
}
.doc-body li {
  margin: 0 0 0.4em;
}
.doc-body li::marker {
  color: var(--ink-3);
}
.doc-body ol {
  padding-left: 1.6em;
}
/* Article 11 of the law is lettered in the Turkish alphabet: a, b, c, ç, d ... ğ. */
@counter-style law-letters {
  system: alphabetic;
  symbols: a b c ç d e f g ğ h ı i j k l m n o ö p r s ş t u ü v y z;
  suffix: ") ";
}
.doc-body ol.article-list {
  list-style: law-letters;
  padding-left: 1.9em;
}
.doc-body strong {
  font-weight: 600;
}

/* The contents: on the wall beside the sheet from 1100px, at the top of the sheet below that. */
.toc {
  background: var(--surface);
  color: var(--ink-2);
  padding: 4px var(--sheet-pad) 12px;
  font-size: 0.9375rem;
}
.toc h2 {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--ink-3);
  margin: 0 0 6px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 0;
}
.toc a {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 34px;
  padding: 4px 8px;
  margin: 0 -8px;
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  line-height: 1.35;
  transition: background-color 150ms, color 150ms;
}
.toc a::before {
  content: "";
  width: 8px;
  height: 8px;
  flex: none;
  box-shadow: inset 0 0 0 1px var(--line-strong);
}
.toc a:hover {
  background: var(--surface-2);
  color: var(--ink);
}

@media (min-width: 1100px) {
  .desk--doc {
    grid-template-columns: 15rem minmax(0, 46rem);
    grid-template-rows: auto 1fr;
    column-gap: 2.5rem;
    justify-content: center;
    padding-right: calc(15rem + 2.5rem);
  }
  .sheet-stack {
    display: block;
    grid-column: 2;
    grid-row: 1 / 3;
    background: var(--surface);
    border-radius: 10px;
    box-shadow: var(--sheet-shadow);
  }
  .doc-head,
  .doc-body {
    grid-column: 2;
    background: transparent;
  }
  .doc-head {
    grid-row: 1;
  }
  .doc-body {
    grid-row: 2;
  }
  .toc {
    grid-column: 1;
    grid-row: 1 / 3;
    align-self: start;
    position: sticky;
    top: 20px;
    background: transparent;
    color: var(--field-ink);
    padding: 40px 0 0;
  }
  .toc h2 {
    color: var(--field-ink-dim);
    border-top: 0;
    padding-top: 0;
    margin-bottom: 10px;
  }
  .toc a::before {
    box-shadow: inset 0 0 0 1px var(--field-ink-dim);
  }
  .toc a:hover {
    background: var(--field-hover);
    color: #ffffff;
  }
  .toc a:hover::before {
    background: #ffffff;
    box-shadow: none;
  }
}

/* The rules: what the sender does and what PeykMail does, side by side. */
.key {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 18px 0 0;
  padding: 0;
  font-size: 0.9375rem;
  color: var(--ink-2);
}
.key li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.rule {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px 32px;
}
.rule h2 {
  grid-column: 1 / -1;
}
.duty h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0.8em 0 0.35em;
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--ink);
}
.duty ul {
  margin: 0;
  padding-left: 1.1em;
}
.duty li {
  margin-bottom: 0.45em;
}
.duty + .duty {
  margin-top: 0.4em;
}

.lawyer {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  margin-left: 4px;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--ochre-ink);
  white-space: nowrap;
}
.lawyer::before {
  content: "";
  width: 10px;
  height: 10px;
  flex: none;
  transform: translateY(1px);
  background: linear-gradient(to top, var(--ochre) 0 50%, transparent 50% 100%);
  box-shadow: inset 0 0 0 1px var(--ochre);
}

.table-wrap {
  overflow-x: auto;
  margin: 0 0 1.2em;
  border: 1px solid var(--line);
  border-radius: 7px;
}
.table-wrap:focus-visible {
  outline-offset: 2px;
}
table {
  width: 100%;
  min-width: 30rem;
  border-collapse: collapse;
  font-size: 0.9375rem;
  line-height: 1.5;
}
th,
td {
  text-align: left;
  vertical-align: top;
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
}
tr:last-child td {
  border-bottom: 0;
}
th {
  font-weight: 500;
  font-size: 0.875rem;
  color: var(--ink-3);
  background: var(--surface-2);
}
td:first-child {
  color: var(--ink);
  font-weight: 500;
  width: 42%;
}

/* ---------------------------------------------------------------- the bounce (not found) */

.bounce .reason {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 18px !important;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--bole-ink);
}
.bounce .header {
  margin: 24px 0;
  padding: 14px 16px;
  border-radius: 7px;
  background: var(--surface-2);
  font-family: var(--mono);
  font-size: 0.8125rem;
  line-height: 1.7;
  color: var(--ink-2);
  overflow-x: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

/* ---------------------------------------------------------------- forced colours, print */

@media (forced-colors: active) {
  .sheet,
  .wall-note {
    border: 1px solid CanvasText;
  }
  .tile,
  .mk,
  .lawyer::before,
  .toc a::before {
    forced-color-adjust: none;
    background: CanvasText;
    color: Canvas;
  }
}

@media print {
  body {
    background: #ffffff;
    color: #000000;
  }
  .bar,
  .toc,
  .departed,
  .skip {
    display: none;
  }
  .desk {
    display: block;
    padding: 0;
  }
  .sheet {
    box-shadow: none;
    padding: 0;
  }
  .wall-note {
    float: none;
    width: auto;
    margin: 8px 0;
    color: #000000;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-delay: 0s !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
