:root {
  color-scheme: dark;
  --canvas: #09090b;
  --surface: #111114;
  --surface-strong: #19171a;
  --ink: #f0ece6;
  --muted: #aaa39b;
  --line: #392a2d;
  --line-soft: #242125;
  --accent: #a52432;
  --accent-bright: #c43745;
  --accent-ink: #fff8f4;
  --danger: #e35c64;
  --hope: #d9d5c8;
  --display: "Iowan Old Style", "Palatino Linotype", "Book Antiqua", Palatino, "Times New Roman", serif;
  --sans: Aptos, "Segoe UI", system-ui, sans-serif;
  --max: 1280px;
  --header-height: 76px;
  background: var(--canvas);
  color: var(--ink);
  font-family: var(--sans);
  font-synthesis: none;
}

* {
  box-sizing: border-box;
}

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

body {
  min-width: 320px;
  min-height: 100dvh;
  margin: 0;
  overflow-x: hidden;
  background:
    radial-gradient(circle at 82% 12%, rgba(122, 29, 39, 0.08), transparent 28rem),
    var(--canvas);
  color: var(--ink);
}

body::before {
  position: fixed;
  inset: 0;
  z-index: 4;
  background-image: radial-gradient(rgba(240, 236, 230, 0.12) 0.45px, transparent 0.55px);
  background-size: 5px 5px;
  content: "";
  opacity: 0.11;
  pointer-events: none;
}

body,
button,
input,
select,
textarea {
  font: inherit;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

a {
  color: inherit;
}

img {
  display: block;
  max-width: 100%;
}

[hidden] {
  display: none !important;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: fixed;
  top: 0.75rem;
  left: 0.75rem;
  z-index: 20;
  padding: 0.75rem 1rem;
  border: 1px solid var(--accent-bright);
  background: var(--ink);
  color: var(--canvas);
  font-weight: 750;
  text-decoration: none;
  transform: translateY(-150%);
  transition: transform 180ms ease;
}

.skip-link:focus {
  transform: translateY(0);
}

.site-header {
  width: min(calc(100% - 3rem), var(--max));
  min-height: var(--header-height);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.public-site .site-header {
  position: absolute;
  inset: 0 0 auto;
  z-index: 3;
  border-bottom: 1px solid rgba(240, 236, 230, 0.17);
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.8rem;
  color: var(--ink);
  font-weight: 740;
  letter-spacing: 0.01em;
  text-decoration: none;
}

.brand-mark {
  position: relative;
  display: grid;
  width: 40px;
  height: 40px;
  place-items: center;
  border: 1px solid rgba(240, 236, 230, 0.44);
  color: var(--ink);
  font-family: var(--display);
  font-size: 1.05rem;
  font-weight: 700;
  letter-spacing: -0.06em;
}

.brand-mark::before {
  position: absolute;
  inset: -1px auto -1px -1px;
  width: 4px;
  background: var(--accent);
  content: "";
}

nav {
  display: flex;
  align-items: center;
  gap: clamp(1.25rem, 3vw, 2.75rem);
}

nav a,
.desk-header > a,
.desk-link {
  color: #d4cec7;
  font-size: 0.84rem;
  font-weight: 760;
  letter-spacing: 0.08em;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease;
}

nav a:hover,
nav a:focus-visible,
.desk-header > a:hover,
.desk-link:hover {
  color: var(--ink);
}

.hero {
  position: relative;
  min-height: 100dvh;
  display: grid;
  align-items: center;
  isolation: isolate;
  overflow: hidden;
}

.hero-image,
.hero-shade {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-image {
  z-index: -3;
  object-fit: cover;
  object-position: 55% center;
  filter: saturate(0.78) contrast(1.06);
}

.hero-shade {
  z-index: -2;
  background:
    linear-gradient(90deg, rgba(5, 5, 7, 0.95) 0%, rgba(5, 5, 7, 0.72) 42%, rgba(5, 5, 7, 0.12) 76%),
    linear-gradient(0deg, rgba(9, 9, 11, 0.74) 0%, transparent 34%, rgba(9, 9, 11, 0.3) 100%);
}

.hero-copy {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding-top: min(6rem, 12vh);
}

.eyebrow {
  margin: 0 0 1.1rem;
  color: #ddc9c5;
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.19em;
  text-transform: uppercase;
}

h1,
h2,
h3 {
  margin: 0;
  color: var(--ink);
  font-family: var(--display);
  font-weight: 600;
  letter-spacing: -0.047em;
  text-wrap: balance;
}

h1 {
  max-width: 11.5ch;
  font-size: clamp(4rem, 7vw, 7.2rem);
  line-height: 0.88;
  text-shadow: 0 14px 50px rgba(7, 5, 7, 0.52);
}

.hero-summary {
  max-width: 36ch;
  margin: 1.5rem 0 2rem;
  color: #d2cbc3;
  font-size: clamp(1.02rem, 1.5vw, 1.25rem);
  line-height: 1.55;
  text-wrap: pretty;
}

.button {
  display: inline-flex;
  min-height: 49px;
  align-items: center;
  justify-content: center;
  padding: 0.82rem 1.25rem;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
  font-size: 0.79rem;
  font-weight: 820;
  letter-spacing: 0.09em;
  line-height: 1;
  text-decoration: none;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 200ms ease, border-color 200ms ease, transform 200ms ease;
}

.button:hover {
  border-color: var(--accent-bright);
  background: var(--accent-bright);
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  cursor: wait;
  opacity: 0.62;
}

.button-secondary {
  border-color: #55484a;
  background: transparent;
  color: var(--ink);
}

.button-secondary:hover {
  border-color: #77676a;
  background: var(--surface-strong);
}

.text-button {
  border: 0;
  background: transparent;
  color: var(--muted);
  font-weight: 720;
  cursor: pointer;
}

.button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 3px solid #e26f79;
  outline-offset: 4px;
}

.section {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding: clamp(6rem, 11vw, 10.5rem) 0;
}

.section-heading {
  max-width: 48rem;
  margin-bottom: clamp(3.5rem, 7vw, 6rem);
}

.section h2 {
  font-size: clamp(3.1rem, 6.7vw, 6.5rem);
  line-height: 0.93;
}

.section-heading p,
.about-copy p {
  color: var(--muted);
  line-height: 1.7;
  text-wrap: pretty;
}

.section-heading p {
  max-width: 43ch;
  margin: 1.35rem 0 0;
  font-size: 1.05rem;
}

.catalog {
  position: relative;
}

.catalog::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 1px;
  background: linear-gradient(90deg, var(--accent) 0 11%, var(--line-soft) 11% 100%);
  content: "";
}

.catalog-status {
  min-height: 30rem;
  display: grid;
  grid-template-columns: minmax(200px, 0.7fr) minmax(0, 1.3fr);
  align-items: center;
  gap: clamp(2rem, 6vw, 7rem);
}

.skeleton-cover,
.skeleton-copy {
  display: block;
  background: var(--surface-strong);
}

.skeleton-cover {
  width: min(100%, 31rem);
  aspect-ratio: 1;
}

.skeleton-copy {
  width: min(100%, 38rem);
  height: 10rem;
  background: linear-gradient(90deg, var(--surface) 25%, var(--surface-strong) 50%, var(--surface) 75%);
  background-size: 200% 100%;
}

.empty-state,
.error-state {
  min-height: 16rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 0.55rem;
  border-left: 4px solid var(--accent);
  padding: clamp(2rem, 5vw, 4rem);
  background: var(--surface);
}

.empty-state strong,
.error-state strong {
  color: var(--ink);
  font-family: var(--display);
  font-size: clamp(1.7rem, 3vw, 2.6rem);
  font-weight: 600;
}

.empty-state span,
.error-state span {
  color: var(--muted);
}

.error-state {
  color: var(--danger);
}

.book-grid {
  display: grid;
  gap: clamp(6rem, 12vw, 12rem);
}

.book-card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(260px, 0.76fr) minmax(0, 1.24fr);
  align-items: center;
  gap: clamp(2.5rem, 8vw, 8.5rem);
}

.book-card:nth-child(even) {
  grid-template-columns: minmax(0, 1.24fr) minmax(260px, 0.76fr);
}

.book-card:nth-child(even) .book-cover {
  grid-column: 2;
  grid-row: 1;
}

.book-card:nth-child(even) .book-copy {
  grid-column: 1;
  grid-row: 1;
}

.book-cover {
  position: relative;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border: 1px solid #44383a;
  background: #0d0d0f;
  box-shadow: 0 30px 80px rgba(38, 7, 12, 0.3);
}

.book-cover::after {
  position: absolute;
  inset: 0;
  border: 1px solid rgba(240, 236, 230, 0.09);
  content: "";
  pointer-events: none;
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  transition: transform 700ms cubic-bezier(0.16, 1, 0.3, 1), filter 700ms ease;
}

.book-card:hover .book-cover img {
  transform: scale(1.018);
  filter: contrast(1.04);
}

.cover-placeholder {
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
  background:
    linear-gradient(135deg, rgba(165, 36, 50, 0.2), transparent 45%),
    var(--surface);
  color: var(--ink);
}

.cover-placeholder span {
  font-family: var(--display);
  font-size: clamp(5rem, 11vw, 10rem);
  font-weight: 600;
}

.book-state {
  margin: 0 0 1.15rem;
  color: #e09ca3;
  font-size: 0.71rem;
  font-weight: 820;
  letter-spacing: 0.17em;
  text-transform: uppercase;
}

.book-copy h3 {
  max-width: 12ch;
  font-size: clamp(3rem, 6vw, 6.3rem);
  line-height: 0.93;
}

.book-subtitle,
.book-author,
.book-meta {
  color: var(--muted);
}

.book-subtitle {
  max-width: 40ch;
  margin: 1rem 0 0;
  font-family: var(--display);
  font-size: 1.25rem;
}

.book-author {
  max-width: 48ch;
  margin: 1.5rem 0 0;
  line-height: 1.65;
}

.book-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 1.35rem;
  margin: 1rem 0 0;
  font-size: 0.86rem;
}

.book-meta span + span {
  position: relative;
  padding-left: 1.35rem;
}

.book-meta span + span::before {
  position: absolute;
  top: 50%;
  left: 0;
  width: 1px;
  height: 1rem;
  background: var(--line);
  content: "";
  transform: translateY(-50%);
}

.book-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  margin-top: 2rem;
  border-bottom: 1px solid var(--accent-bright);
  color: var(--ink);
  font-size: 0.83rem;
  font-weight: 820;
  letter-spacing: 0.08em;
  padding-bottom: 0.32rem;
  text-decoration: none;
  text-transform: uppercase;
  transition: color 180ms ease, border-color 180ms ease;
}

.book-link span {
  color: var(--accent-bright);
  font-size: 1rem;
  transition: transform 180ms ease;
}

.book-link:hover {
  color: #f8cfd2;
  border-color: #f8cfd2;
}

.book-link:hover span {
  transform: translate(2px, -2px);
}

.manifesto {
  position: relative;
  min-height: min(78dvh, 54rem);
  display: grid;
  place-items: center;
  padding: clamp(7rem, 15vw, 13rem) 1.5rem;
  overflow: hidden;
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background:
    radial-gradient(circle at 50% 120%, rgba(165, 36, 50, 0.22), transparent 52%),
    #0c0b0e;
}

.manifesto::before {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 10vw;
  width: 1px;
  background: linear-gradient(transparent, var(--accent), transparent);
  content: "";
  opacity: 0.75;
}

.manifesto p {
  max-width: 15ch;
  margin: 0;
  color: var(--hope);
  font-family: var(--display);
  font-size: clamp(3.6rem, 8.3vw, 8.6rem);
  font-weight: 600;
  letter-spacing: -0.052em;
  line-height: 0.92;
  text-align: center;
  text-wrap: balance;
}

.about {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(280px, 0.65fr);
  gap: clamp(3rem, 10vw, 10rem);
  align-items: end;
}

.about h2 {
  max-width: 12ch;
  font-size: clamp(3.2rem, 6.8vw, 6.8rem);
}

.about-copy {
  padding-left: 1.75rem;
  border-left: 4px solid var(--accent);
}

.about-copy p {
  max-width: 44ch;
  margin: 0;
}

.about-copy p + p {
  margin-top: 1.4rem;
}

footer {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding: 2.5rem 0 3rem;
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(260px, 1fr) auto;
  align-items: center;
  gap: 2rem;
  border-top: 1px solid var(--line);
  color: var(--muted);
}

footer p {
  margin: 0;
  text-align: center;
}

.footer-brand .brand-mark {
  width: 36px;
  height: 36px;
}

.js .reveal-pending {
  opacity: 0;
  transform: translateY(28px);
}

.js .reveal-pending.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 800ms cubic-bezier(0.16, 1, 0.3, 1), transform 800ms cubic-bezier(0.16, 1, 0.3, 1);
}

.js .book-card.reveal-pending.is-visible {
  transition-delay: min(calc(var(--book-index) * 80ms), 240ms);
}

/* Private publishing desk */
.desk-body {
  background:
    radial-gradient(circle at 15% 5%, rgba(165, 36, 50, 0.09), transparent 24rem),
    var(--canvas);
}

.desk-header {
  border-bottom: 1px solid var(--line);
}

.desk-shell {
  width: min(calc(100% - 3rem), var(--max));
  margin: 0 auto;
  padding: clamp(3.5rem, 7vw, 7rem) 0;
}

.login-panel {
  max-width: 36rem;
  margin: 4vh auto 0;
  padding: clamp(2rem, 5vw, 4rem);
  border-top: 4px solid var(--accent);
  background: var(--surface);
  box-shadow: 0 30px 80px rgba(38, 7, 12, 0.22);
}

.login-panel h1,
.desk-title-row h1 {
  font-size: clamp(3.2rem, 6vw, 6rem);
  line-height: 0.92;
}

.login-panel > p:not(.eyebrow) {
  color: var(--muted);
}

.login-form {
  display: grid;
  gap: 0.75rem;
  margin-top: 2rem;
}

.login-form .button {
  margin-top: 0.5rem;
}

label {
  color: #d8d1ca;
  font-weight: 720;
}

input,
select,
textarea {
  width: 100%;
  min-height: 48px;
  padding: 0.78rem 0.88rem;
  border: 1px solid #4c4244;
  border-radius: 0;
  background: #0d0d10;
  color: var(--ink);
}

input::placeholder,
textarea::placeholder {
  color: #817a74;
}

textarea {
  min-height: 7rem;
  resize: vertical;
}

.form-error {
  margin: 0.25rem 0 0;
  color: #ff9299;
  font-weight: 680;
}

.desk-title-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
}

.desk-actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.ledger-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  margin: 3.5rem 0;
  overflow: hidden;
  border: 1px solid var(--line);
  background: var(--line);
}

.ledger-summary div {
  padding: 1.6rem;
  background: var(--surface);
}

.ledger-summary strong {
  display: block;
  font-family: var(--display);
  font-size: clamp(2rem, 4vw, 3.7rem);
  font-weight: 600;
}

.ledger-summary span {
  color: var(--muted);
}

.ledger-controls {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(180px, 0.3fr);
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.field {
  display: grid;
  gap: 0.5rem;
}

.compact-field label {
  color: var(--muted);
  font-size: 0.85rem;
}

.ledger {
  display: grid;
  gap: 0.85rem;
}

.ledger-book {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(220px, 0.7fr) auto;
  gap: 1.5rem;
  align-items: center;
  padding: 1.4rem;
  border: 1px solid var(--line);
  background: var(--surface);
}

.ledger-main h2 {
  margin-top: 0.4rem;
  font-size: clamp(1.45rem, 2.5vw, 2.15rem);
}

.ledger-main p {
  margin: 0.35rem 0 0;
  color: var(--muted);
}

.status-label {
  display: inline-block;
  color: #d6cfc9;
  font-size: 0.7rem;
  font-weight: 820;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.status-published,
.status-forthcoming {
  color: #e09ca3;
}

.ledger-meta {
  display: grid;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.ledger-book-actions {
  display: flex;
  gap: 0.75rem;
}

.ledger-book-actions button,
.dialog-close {
  border: 0;
  background: transparent;
  color: #eee7e1;
  font-weight: 740;
  text-decoration: underline;
  text-underline-offset: 0.22em;
  cursor: pointer;
}

.ledger-book-actions [data-delete] {
  color: #ff9299;
}

dialog {
  width: min(calc(100% - 2rem), 760px);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 0;
  background: var(--surface);
  color: var(--ink);
  box-shadow: 0 34px 100px rgba(0, 0, 0, 0.55);
}

dialog::backdrop {
  background: rgba(3, 3, 5, 0.82);
}

dialog form {
  padding: clamp(1.5rem, 4vw, 2.7rem);
}

.dialog-heading,
.dialog-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dialog-heading h2 {
  font-size: 2.6rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  margin: 2rem 0;
}

.span-2 {
  grid-column: span 2;
}

.check-field {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: start;
  gap: 0.75rem;
  color: var(--muted);
  font-weight: 600;
}

.check-field input {
  width: 1.1rem;
  min-height: 1.1rem;
  margin-top: 0.15rem;
  accent-color: var(--accent);
}

.dialog-actions {
  justify-content: flex-end;
  margin-top: 1.5rem;
}

.error-page {
  display: grid;
  place-items: center;
  padding: 1.5rem;
}

.error-page .login-panel {
  width: min(100%, 42rem);
  margin: 0;
}

@media (prefers-reduced-motion: no-preference) {
  .skeleton-copy {
    animation: skeleton-shift 1.6s ease-in-out infinite;
  }

  @keyframes skeleton-shift {
    to {
      background-position: -200% 0;
    }
  }
}

@media (max-width: 860px) {
  .hero-copy,
  .section,
  .site-header,
  .desk-shell,
  footer {
    width: min(calc(100% - 2rem), var(--max));
  }

  .hero-image {
    object-position: 68% center;
  }

  .hero-shade {
    background:
      linear-gradient(90deg, rgba(5, 5, 7, 0.92) 0%, rgba(5, 5, 7, 0.63) 70%, rgba(5, 5, 7, 0.2) 100%),
      linear-gradient(0deg, rgba(9, 9, 11, 0.78) 0%, transparent 42%, rgba(9, 9, 11, 0.38) 100%);
  }

  h1 {
    max-width: 9.5ch;
    font-size: clamp(4rem, 12vw, 6.5rem);
  }

  .book-card,
  .book-card:nth-child(even) {
    grid-template-columns: minmax(200px, 0.8fr) minmax(0, 1.2fr);
    gap: clamp(2rem, 5vw, 4rem);
  }

  .book-card:nth-child(even) .book-cover,
  .book-card:nth-child(even) .book-copy {
    grid-column: auto;
    grid-row: auto;
  }

  .about {
    grid-template-columns: 1fr;
  }

  .about-copy {
    max-width: 42rem;
  }

  .desk-title-row {
    align-items: flex-start;
    flex-direction: column;
  }

  .ledger-book {
    grid-template-columns: 1fr;
  }

  .ledger-book-actions {
    justify-self: start;
  }

  footer {
    grid-template-columns: 1fr auto;
  }

  footer p {
    grid-column: 1 / -1;
    grid-row: 2;
    text-align: left;
  }
}

@media (max-width: 620px) {
  :root {
    --header-height: 66px;
  }

  .site-header {
    gap: 1rem;
  }

  .brand-name {
    max-width: 8rem;
    font-size: 0.88rem;
    line-height: 1.05;
  }

  .brand-mark {
    width: 35px;
    height: 35px;
  }

  nav {
    gap: 1rem;
  }

  nav a {
    font-size: 0.73rem;
  }

  .hero {
    min-height: 100svh;
    align-items: end;
  }

  .hero-copy {
    padding-top: 6rem;
    padding-bottom: 3.5rem;
  }

  .hero-image {
    object-position: 72% center;
  }

  .hero-shade {
    background:
      linear-gradient(0deg, rgba(7, 7, 9, 0.95) 0%, rgba(7, 7, 9, 0.61) 59%, rgba(7, 7, 9, 0.3) 100%),
      linear-gradient(90deg, rgba(7, 7, 9, 0.65), transparent);
  }

  h1 {
    max-width: 8.4ch;
    font-size: clamp(3.6rem, 17vw, 5.5rem);
  }

  .hero-summary {
    max-width: 31ch;
    font-size: 1rem;
  }

  .section {
    padding: 6.5rem 0;
  }

  .section-heading {
    margin-bottom: 3.5rem;
  }

  .section h2,
  .about h2 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .catalog-status {
    min-height: 22rem;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 1.25rem;
  }

  .book-grid {
    gap: 7rem;
  }

  .book-card,
  .book-card:nth-child(even) {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .book-card:nth-child(even) .book-cover,
  .book-card:nth-child(even) .book-copy {
    grid-column: 1;
  }

  .book-cover {
    width: min(100%, 30rem);
  }

  .book-copy h3 {
    font-size: clamp(3rem, 14vw, 4.8rem);
  }

  .manifesto {
    min-height: 70dvh;
  }

  .manifesto p {
    font-size: clamp(3.4rem, 15vw, 5.5rem);
  }

  .manifesto::before {
    left: 1rem;
  }

  .about-copy {
    padding-left: 1.25rem;
  }

  footer {
    grid-template-columns: 1fr;
    align-items: start;
  }

  footer p,
  .desk-link {
    grid-column: 1;
    grid-row: auto;
  }

  .ledger-summary,
  .ledger-controls,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .span-2 {
    grid-column: auto;
  }

  .desk-actions {
    width: 100%;
  }

  .desk-actions .button {
    flex: 1 1 auto;
  }

  .dialog-actions {
    align-items: stretch;
    flex-direction: column-reverse;
  }

  .dialog-actions .button {
    width: 100%;
  }
}

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

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .js .reveal-pending {
    opacity: 1;
    transform: none;
  }
}
