/* A wireframe of black lines and text on white: one font, normal and bold, in three sizes, which
 * are of headers, of labels and of text. */

:root {
  --ink: #000;
  --paper: #fff;
  --grey: #999;
  --font: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --size-header: 1.375rem;
  --size-label: 0.75rem;
  --size-text: 0.9375rem;
  --line: 1px solid var(--ink);
  --header-height: 3.5rem;
  --footer-height: 2.75rem;
  --gap: 0.75rem;
  /* Of the cards and the states, which are as wide everywhere, at most. */
  --card-width: 15rem;
  /* Of a radio button: three of them and the gaps between them are 6px shorter than a state of two
     lines, which is its name and its time. */
  --choice-size: 1.1875rem;
  /* Space between the side of a card or a state and what is in it. */
  --card-pad-x: 0.75rem;
  /* Room between the outline of a group and its column, on both sides, and on the right of it, where
     the radio buttons are, and their room. */
  --group-pad: 0.25rem;
  --group-pad-end: calc(0.375rem + var(--choice-size) + var(--group-pad));
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

html {
  scroll-padding-top: calc(var(--header-height) + var(--gap));
  scroll-padding-bottom: var(--footer-height);
}

/* The line of the moment is as wide as the screen, its scrollbar included, which is clipped, as it
   is not to be scrolled to. */
.shell {
  overflow-x: clip;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: var(--size-text);
  font-weight: 400;
  line-height: 1.4;
}

h1,
h2,
h3 {
  margin: 0;
  font-size: var(--size-header);
  font-weight: 700;
  line-height: 1.2;
}

h3 {
  font-size: var(--size-text);
}

p {
  margin: 0;
}

/* A moment: the day on the left and the time on the right, which stays on the right when it
   doesn't fit next to the day. */
.when {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.5rem;
  font-variant-numeric: tabular-nums;
}

.when-clock {
  margin-left: auto;
}

.label {
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* Controls */

button,
input {
  font: inherit;
  color: inherit;
}

button {
  border: var(--line);
  background: var(--paper);
  padding: 0.5rem 0.875rem;
  cursor: pointer;
  border-radius: 0;
  transition: background 0.15s, color 0.15s;
}

button:hover:not(:disabled) {
  background: var(--ink);
  color: var(--paper);
}

button.primary {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

button.primary:hover:not(:disabled) {
  background: var(--paper);
  color: var(--ink);
}

button:disabled {
  cursor: default;
  opacity: 0.4;
}

button.primary.confirmed {
  opacity: 1;
}

button.primary.confirmed::after {
  content: " ✓";
}

button.link {
  border: none;
  padding: 0;
  background: none;
  text-decoration: underline;
}

button.link:hover:not(:disabled) {
  background: none;
  color: var(--ink);
}

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

input {
  width: 100%;
  border: var(--line);
  background: var(--paper);
  padding: 0.5rem 0.625rem;
  border-radius: 0;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  margin: 0;
  border: none;
  padding: 0;
  min-width: 0;
}

.problem {
  border-left: 3px solid var(--ink);
  padding-left: 0.625rem;
  font-weight: 700;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

/* Choices, of which one is chosen */

.choices {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  gap: 0;
}

.choices legend {
  width: 100%;
  margin-bottom: 0.25rem;
  padding: 0;
}

.choice {
  position: relative;
  border: var(--line);
  margin: 0 -1px -1px 0;
  padding: 0.5rem 0.75rem;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}

.choice input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.choice.chosen {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
}

.choice:focus-within {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  z-index: 1;
}

/* Pages of who isn't logged in */

.public {
  display: flex;
  justify-content: center;
  padding: 4rem 1rem;
}

.sheet,
.stack {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 100%;
  max-width: 22rem;
}

.sheet {
  border: var(--line);
  padding: 1.5rem;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
}

.sheet .link {
  align-self: flex-start;
}

/* The backgrounds of the states of the employee, which fade into one another */

.backgrounds {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
}

.background {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s var(--ease);
}

.background.shown {
  opacity: 1;
}

.background-none {
  background: var(--paper);
}

.background-work {
  background: repeating-linear-gradient(45deg, #000 0 1px, #fff 1px 22px);
}

.background-on-call {
  background: repeating-linear-gradient(0deg, #000 0 1px, #fff 1px 22px);
}

.background-vacation {
  background: radial-gradient(#000 1px, #fff 1.5px) 0 0 / 18px 18px;
}

.background-sick-leave {
  background:
    linear-gradient(#000 1px, transparent 1px) 0 0 / 22px 22px,
    linear-gradient(90deg, #000 1px, #fff 1px) 0 0 / 22px 22px;
}

.background-parenting {
  background: repeating-linear-gradient(90deg, #000 0 1px, #fff 1px 22px);
}

.background-leave {
  background: repeating-linear-gradient(-45deg, #000 0 1px, #fff 1px 22px);
}

/* The header, which stays where it is, even over an overlay */

.header {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 40;
  height: var(--header-height);
  /* The brand on the left, the card of the work state in the middle, and the user on the right,
     which are as wide as each other, so the card is in the middle of the screen. */
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gap);
  padding: 0 1rem;
  background: var(--paper);
  border-bottom: var(--line);
}

/* The footer, which stays where it is, as the header does, even over an overlay: the links to the
   pages, on both sides of the middle, which is left for what the page has to offer. */
.footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 40;
  height: var(--footer-height);
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--gap);
  padding: 0 1rem;
  background: var(--paper);
  border-top: var(--line);
}

.footer-links {
  display: flex;
  gap: 1rem;
  min-width: 0;
}

.footer-links-end {
  justify-content: flex-end;
}

.footer .link.current {
  font-weight: 700;
  text-decoration: none;
}

.footer-options {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* The radio buttons that force what every group shows, side by side. */
.forced {
  display: flex;
  gap: 0.5rem;
}

/* Where the app is: its name, and the title of the page on the right of it. */
.where {
  display: flex;
  align-items: center;
  gap: var(--gap);
  min-width: 0;
}

.brand {
  font-size: var(--size-header);
  font-weight: 700;
  letter-spacing: -0.02em;
}

/* Cut short where it doesn't fit, so it never goes under the card of the work state. */
.page-title {
  min-width: 0;
  padding: 0.25rem 0.5rem;
  border: var(--line);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.state-card {
  grid-column: 2;
  display: flex;
  align-items: stretch;
}

.user-menu {
  grid-column: 3;
  justify-self: end;
}

.state-card .state-action {
  white-space: nowrap;
}

.state-card.working .state-action::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.5rem;
  border-radius: 50%;
  background: currentColor;
  vertical-align: 0.05em;
  animation: pulse 1.6s ease-in-out infinite;
}

.state-card .dropdown-toggle {
  margin-left: -1px;
  white-space: nowrap;
}

.caret {
  display: inline-block;
  width: 0;
  height: 0;
  margin-left: 0.375rem;
  border-left: 0.3rem solid transparent;
  border-right: 0.3rem solid transparent;
  border-top: 0.35rem solid currentColor;
  vertical-align: 0.1em;
}

.dropdown {
  position: relative;
  display: flex;
}

.menu-dismiss {
  position: fixed;
  inset: 0;
  z-index: 1;
}

.menu {
  position: absolute;
  top: calc(100% + 0.375rem);
  right: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  min-width: 12rem;
  background: var(--paper);
  border: var(--line);
  box-shadow: 4px 4px 0 var(--ink);
  animation: drop 0.16s var(--ease);
}

.menu button {
  border: none;
  border-top: var(--line);
  text-align: left;
  white-space: nowrap;
}

.menu > :first-child {
  border-top: none;
}

.menu-title {
  padding: 0.5rem 0.875rem;
  font-weight: 700;
}

.thumbnail {
  width: 2.25rem;
  height: 2.25rem;
  padding: 0;
  border-radius: 50%;
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.04em;
}

.connection {
  position: fixed;
  top: calc(var(--header-height) - 1px);
  left: 50%;
  z-index: 35;
  transform: translateX(-50%);
  padding: 0.25rem 0.75rem;
  border: var(--line);
  background: var(--paper);
  font-size: var(--size-label);
  font-weight: 700;
}

/* Pages */

.main {
  max-width: 72rem;
  margin: 0 auto;
  padding: calc(var(--header-height) + 1.25rem) 1rem calc(var(--footer-height) + 1.25rem);
}

.page {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.page-enter {
  animation: enter 0.32s var(--ease);
}

.empty {
  align-self: flex-start;
  padding: 0.75rem 1rem;
  border: var(--line);
  background: var(--paper);
}

/* The state list */

/* A group of the state list has one column, in the middle of the screen, right below the card of the
   work state, which is as wide as a card where it fits, and narrower where it doesn't. What is in
   it is what the radio buttons right of it pick: the states, which the moments are in too, on their
   line, what the card of the work state makes, which is the absences and the work done, or the
   plans of work. */
.group,
.month-mark {
  display: grid;
  grid-template-columns: minmax(0, var(--card-width));
  justify-content: center;
}

.group {
  margin: 0.375rem 0;
  /* What is placed in it by its columns and rows, which is the radio buttons, and the outline. */
  position: relative;
  grid-auto-rows: minmax(1.25rem, auto);
  /* Tall enough for the radio buttons, which are out of the rows, so that a group with little in it
     doesn't have them over those of the next one, and a few pixels from them, as the cards are from
     the outline. */
  min-height: calc(3 * var(--choice-size) + 2 * 0.125rem + 0.5rem);
}

/* One thing to show has nothing to pick, so it has no radio buttons, and no room for them. */
.group.single {
  min-height: 0;
}

/* A group is outlined by a grey dashed line, a few pixels from its column, which is as wide as a card and
   narrower where that doesn't fit, and from the radio buttons right of it, which are in the outline.
   The column is in the middle of the group, so the outline is drawn from it. */
.group::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - min(var(--card-width), 100%) / 2 - var(--group-pad) - 1px);
  width: calc(
    min(var(--card-width), 100%) + var(--group-pad) + var(--group-pad-end) + 2px
  );
  border: 1px dashed var(--grey);
  pointer-events: none;
}

.group.single::before {
  width: calc(min(var(--card-width), 100%) + 2 * var(--group-pad) + 2px);
}

/* What a group has to show is in layers, one for each radio button, which are one on top of the
   other in its column, with the rows of all of them, so the group is as tall whatever is shown. The
   layers aren't boxes, so what is in them is placed in the grid of the group, and only the one
   picked is visible, which is neither seen, nor reached, nor snapped to. */
.layer {
  display: contents;
}

.layer-off {
  visibility: hidden;
}

.states .layer-off .card,
.states .layer-off .state {
  scroll-snap-align: none;
}

/* Radio buttons, stacked at the bottom left of the room right of the column, in the outline of the
   group. They are out of the rows, which they don't make taller. */
.group-picks {
  position: absolute;
  grid-column: 2;
  grid-row: 1;
  align-self: end;
  justify-self: start;
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin: 0 0 0.25rem 0.375rem;
}

/* The radio buttons of the groups and of the footer are drawn here, as the browser draws one that
   can't be picked too faintly to be seen: a square, with a smaller one in it if it is picked, and in
   grey if it can't be, which is when there is nothing to show of it. */
.pick {
  appearance: none;
  width: var(--choice-size);
  height: var(--choice-size);
  margin: 0;
  padding: 0;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  cursor: pointer;
}

.pick:checked {
  background: linear-gradient(var(--ink), var(--ink)) center / 55% 55% no-repeat, var(--paper);
}

.pick:disabled {
  border-color: var(--grey);
  cursor: not-allowed;
}

/* A month that finished, or that starts, said between the groups, in their column, in a box like a
   moment but in bold, whose left border is part of the line through the column. */
.month-label {
  grid-column: 1;
  justify-self: start;
  margin-left: 2px;
  border-left-width: 2px;
  /* Broken where it doesn't fit its column. */
  max-width: calc(100% - 2px);
  overflow-wrap: anywhere;
  padding: 0.125rem 0.5rem;
  border: var(--line);
  background: var(--paper);
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card,
.state {
  margin: 0.25rem 0;
  padding: 0.625rem var(--card-pad-x);
  background: var(--paper);
  border: var(--line);
  /* The left side is bold, which is where the line through the column goes. */
  border-left-width: 6px;
  min-width: 0;
}

.card h3 {
  margin-bottom: 0.375rem;
}

.when + dl {
  margin-top: 0.375rem;
}

.card dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.125rem 0.625rem;
  margin: 0;
  align-items: baseline;
}

.card dd {
  margin: 0;
}

.card-absence-plan {
  border-style: dashed;
  /* Its bold side is not dashed. */
  border-left-style: solid;
}

/* The work done has its title at the bottom right, after what else is in it, and is told from the
   plans by it, which is underlined. */
.card-work-done {
  display: flex;
  flex-direction: column;
}

.card-work-done h3 {
  order: 1;
  align-self: flex-end;
  margin: auto 0 0;
  text-align: right;
  text-decoration: underline;
  text-decoration-thickness: 3px;
  text-underline-offset: 0.2em;
}

/* The title is last, so what is above it keeps its distance from it. */
.card-work-done .when:last-of-type {
  margin-bottom: 0.375rem;
}

.state {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.state-none {
  border-left-width: 1px;
  border-style: dotted;
}

/* What doesn't say when it is, as the cards to its left do, has no outline, but for its bold left
   side, and no background of its own, so the one of the page shows through, but for its
   title, which is stamped: white on a rounded black background. The border stays, so that what is
   in it doesn't move. */
.card.bare,
.state.bare {
  border-color: transparent;
  background: transparent;
}

.card.bare h3,
.state.bare .state-name {
  width: fit-content;
  padding: 0.125rem 0.5rem;
  background: var(--ink);
  color: var(--paper);
  border-radius: 0.5rem;
  /* The stamp tells the work done from the plans, so it isn't underlined. */
  text-decoration: none;
}

/* The stamp of a state goes left, to the bold side of it, which is on the line, so it touches it.
   What is in it stays where it was, and its corners on the line are square. */
.state.bare .state-name {
  align-self: flex-start;
  margin-left: calc(-1 * var(--card-pad-x));
  padding-left: calc(0.5rem + var(--card-pad-x));
  border-radius: 0 0.5rem 0.5rem 0;
}

/* The tags of a stamped name are lines of its text, which is white. */
.state.bare .tag,
.state.bare .duration {
  border-color: currentColor;
}

.card.bare,
.state.bare {
  border-left-color: var(--ink);
}

/* The name, the box of how long the state lasts and the tags are in a line of text, so what follows
   a name that is broken goes on right after the end of it, where there is room, and not below. */
.state-name {
  display: block;
}

.state-name > strong,
.state-name > .tag,
.state-name > .duration {
  margin-right: 0.5rem;
}

.state-name > :last-child {
  margin-right: 0;
}

.state-name > .tag,
.state-name > .duration {
  display: inline-block;
  margin-block: 0.125rem;
}

/* How long the state lasts, right of its name and before its tags, in a box like theirs. */
.duration {
  font-size: var(--size-label);
  font-weight: 700;
  white-space: nowrap;
  border: var(--line);
  padding: 0 0.3rem;
}

.tag {
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  border: var(--line);
  padding: 0 0.3rem;
}

.state-span {
  font-size: var(--size-label);
}

/* A moment is in the column of the states, over the border of the card at the edge it says, which
   is a card's margin inside the row it is in, whether the border is shown or not. Its left border
   is part of the line through the states. */
.moment {
  align-self: start;
  justify-self: start;
  position: relative;
  z-index: 2;
  max-width: calc(100% - 2px);
  margin-left: 2px;
  padding: 0 0.375rem;
  border: var(--line);
  border-left-width: 2px;
  background: var(--paper);
  font-size: var(--size-label);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  transform: translateY(calc(-50% + 0.25rem));
}

.moment-end {
  align-self: end;
  transform: translateY(calc(50% - 0.25rem));
}

.now-line .label {
  background: var(--ink);
  color: var(--paper);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.card {
  position: relative;
  z-index: 1;
}

/* The line of the moment is where the moment is, in a group or between them, and is drawn from
   the page, which is in the middle of the screen, over the whole screen and over the cards. */
.now-line {
  align-self: start;
  height: 0;
}

.page > .now-line {
  margin-top: var(--gap);
}

.now-rule {
  position: absolute;
  z-index: 3;
  left: calc(50% - 50vw);
  width: 100vw;
  height: 2px;
  margin-top: -1px;
  background: var(--ink);
}

.now-rule .label {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  padding: 0.0625rem 0.5rem;
  white-space: nowrap;
}

/* The work being done, said after the moment as text is. */
.now-working {
  font-weight: 400;
  letter-spacing: 0;
  text-transform: none;
}

/* Room below the last card, so that any card can be scrolled to the top. The line of the moment
   is drawn from it. */
.states {
  position: relative;
  padding-bottom: 70vh;
}

/* A line, 2px thick, from the top of the page to the bottom, through the middle of the bold left
   side of the cards and the states, which is where the column starts: it is in the middle of the
   page, and as wide as a card, or as wide as it gets where that doesn't fit, see `.group`, which is
   what is said here. It is under them, which have a background of their own, and the left border of
   the moments is part of it. */
.states::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: calc(50% - min(var(--card-width), 100%) / 2 + 2px);
  width: 2px;
  background: var(--ink);
}

.states .state {
  position: relative;
  z-index: 1;
}

/* Scrolling the state list always ends at the top of a card or of a state, right below the header.
   One taller than the screen is scrolled through. Only the state list snaps, as a page without the
   cards would not scroll at all. */
html:has(.states) {
  scroll-snap-type: y mandatory;
}

.states .card,
.states .state {
  scroll-snap-align: start;
}

/* The events of the ledger */

.ledger {
  border-collapse: collapse;
  background: var(--paper);
  border: var(--line);
  width: 100%;
  max-width: 40rem;
}

.ledger th,
.ledger td {
  border-bottom: var(--line);
  padding: 0.375rem 0.75rem;
  text-align: left;
}

.ledger td:first-child {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.row-enter {
  animation: enter 0.32s var(--ease);
}

/* The document every user shares, which is a sheet as wide as a page of text, and as long as its
   text, or the screen, where it is shorter. */

.document {
  align-items: center;
}

.document-text {
  display: block;
  width: 100%;
  max-width: 44rem;
  min-height: calc(100dvh - var(--header-height) - var(--footer-height) - 3.25rem);
  field-sizing: content;
  resize: none;
  border: var(--line);
  border-radius: 0;
  padding: 1.5rem 1.75rem;
  background: var(--paper);
  box-shadow: 6px 6px 0 var(--ink);
  color: var(--ink);
  font: inherit;
  line-height: 1.6;
  overflow-wrap: break-word;
}

/* Focused, its line is thicker, which doesn't move the text. */
.document-text:focus-visible {
  outline: none;
  box-shadow: inset 0 0 0 1px var(--ink), 6px 6px 0 var(--ink);
}

/* Until its text is received. */
.document-text:disabled {
  opacity: 0.4;
}

.document-text::placeholder {
  color: var(--ink);
  opacity: 0.4;
}

/* Overlays, between the header and the footer */

.overlay {
  position: fixed;
  inset: var(--header-height) 0 var(--footer-height) 0;
  z-index: 30;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 2.5rem 1rem;
  overflow-y: auto;
}

.overlay-backdrop {
  position: fixed;
  inset: var(--header-height) 0 var(--footer-height) 0;
  background: rgba(255, 255, 255, 0.82);
}

.overlay-panel {
  position: relative;
  width: 100%;
  max-width: 28rem;
}

.overlay-enter .overlay-backdrop {
  animation: fade-in 0.2s ease-out;
}

.overlay-enter .overlay-panel {
  animation: enter 0.28s var(--ease);
}

.overlay-leave .overlay-backdrop {
  animation: fade-out 0.2s ease-in forwards;
}

.overlay-leave .overlay-panel {
  animation: leave 0.2s ease-in forwards;
}

.dialog {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  background: var(--paper);
  border: var(--line);
  box-shadow: 6px 6px 0 var(--ink);
}

.dialog-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--gap);
}

.dialog-header .close {
  font-size: var(--size-label);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 0.25rem 0.5rem;
}

.reveal {
  animation: enter 0.24s var(--ease);
}

/* Motion */

@keyframes enter {
  from {
    opacity: 0;
    transform: translateY(0.5rem);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes leave {
  to {
    opacity: 0;
    transform: translateY(0.5rem);
  }
}

@keyframes fade-in {
  from {
    opacity: 0;
  }
}

@keyframes fade-out {
  to {
    opacity: 0;
  }
}

@keyframes drop {
  from {
    opacity: 0;
    transform: translateY(-0.25rem);
  }
}

@keyframes pulse {
  50% {
    opacity: 0.25;
  }
}

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

/* On a phone the same things are next to each other, only smaller */

@media (max-width: 40rem) {
  :root {
    --size-header: 1.125rem;
    --size-text: 0.875rem;
    --size-label: 0.6875rem;
    --gap: 0.5rem;
    --header-height: 3.25rem;
  }

  .header,
  .footer {
    padding: 0 0.5rem;
  }

  .brand {
    display: none;
  }

  /* The room left of the card of the work state is narrow. */
  .page-title {
    font-size: var(--size-text);
    padding: 0.125rem 0.25rem;
  }

  button {
    padding: 0.4375rem 0.625rem;
  }

  .main {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  /* The shadow of the sheet stays on the screen. */
  .document-text {
    padding: 1rem;
    box-shadow: 4px 4px 0 var(--ink);
    width: calc(100% - 4px);
    align-self: flex-start;
  }

  .document-text:focus-visible {
    box-shadow: inset 0 0 0 1px var(--ink), 4px 4px 0 var(--ink);
  }

  .overlay {
    padding: 1rem 0.5rem;
  }
}
