:root {
  color-scheme: dark;
  --bg: #070403;
  --ink: #fff0dc;
  --muted: rgba(255, 228, 199, .58);
  --soft-line: rgba(255, 220, 184, .12);
  --salmon: #d98270;
  --beige: #ead0ab;
  --amber: #c68a48;
  --brown: #4b2d22;
  --near-black: #050302;
  --shutdown: 0;
  --blackout: 0;
  --drowse: 0;
  --idle-release: 0;
  --control-opacity: .86;
  --button-scale: 1;
  --entry-opacity: 1;
  --stage-brightness: 1;
  --stage-contrast: 1;
  --stage-saturation: 1;
  --field-blur: 2px;
  --drift-duration: 44s;
  --breath-duration: 9.5s;
  --thought-opacity: 1;
}

* {
  box-sizing: border-box;
}

html {
  min-width: 320px;
  min-height: 100%;
  scroll-behavior: smooth;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 222, 190, .14) transparent;
  background: var(--bg);
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  border: 3px solid transparent;
  border-radius: 999px;
  background: rgba(255, 222, 190, .14);
  background-clip: content-box;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  letter-spacing: 0;
}

body.is-softening {
  overflow: hidden;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 1000;
  pointer-events: none;
  background: #000;
  opacity: var(--blackout);
  transition: opacity 1.2s linear;
}

a {
  color: inherit;
}

button,
textarea {
  font: inherit;
  letter-spacing: 0;
}

.suite-topbar {
  position: absolute;
  inset: 0 0 auto;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  min-height: 66px;
  padding: 12px 18px 0;
  color: rgba(255, 237, 216, .24);
  opacity: .2;
  transition: opacity 2.4s ease, transform 2.4s ease, filter 2.4s ease;
}

.suite-topbar::after {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 92px;
  z-index: -1;
  background: linear-gradient(180deg, rgba(7, 4, 3, .34), rgba(7, 4, 3, 0));
}

.suite-brand-cluster,
.suite-app-brand,
.suite-topbar-actions {
  display: inline-flex;
  align-items: center;
}

.suite-brand-cluster {
  gap: 8px;
  min-width: 0;
}

.suite-ao-home,
.suite-app-brand {
  text-decoration: none;
}

.suite-ao-home {
  display: inline-grid;
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  place-items: center;
}

.suite-ao-home img {
  display: block;
  width: 36px;
  height: 36px;
  opacity: .42;
}

.suite-app-brand {
  gap: 8px;
  min-width: 0;
  color: rgba(255, 237, 216, .22);
  font-size: 14px;
  font-weight: 720;
  line-height: 1.18;
  text-transform: lowercase;
}

.suite-app-mark {
  display: block;
  width: 31px;
  height: 31px;
  flex: 0 0 31px;
  object-fit: contain;
  opacity: .42;
  filter: saturate(.72) brightness(.72);
}

.suite-app-name {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.suite-topbar-actions a {
  display: inline-grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: rgba(255, 231, 206, .24);
  text-decoration: none;
}

.record-icon {
  position: relative;
  display: block;
  width: 16px;
  height: 16px;
  opacity: .72;
}

.record-icon::before {
  content: "";
  position: absolute;
  inset: 2px;
  border-radius: 50%;
  border: 1.4px solid currentColor;
}

.record-icon::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 0;
  width: 1.4px;
  height: 16px;
  border-radius: 99px;
  background: currentColor;
  box-shadow: -5px 6px 0 -1px currentColor, 5px 6px 0 -1px currentColor;
  opacity: .72;
}

.paper-icon {
  position: relative;
  display: block;
  width: 12px;
  height: 15px;
  border-radius: 3px;
  border: 1.4px solid currentColor;
  opacity: .72;
}

.paper-icon::before,
.paper-icon::after {
  content: "";
  position: absolute;
  left: 3px;
  right: 3px;
  height: 1.4px;
  border-radius: 99px;
  background: currentColor;
}

.paper-icon::before {
  top: 5px;
}

.paper-icon::after {
  top: 9px;
}

.is-softening .suite-topbar {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-10px);
  filter: blur(5px);
}

main {
  min-height: 100vh;
}

.sleep-experience {
  position: relative;
  min-height: 100svh;
  overflow: hidden;
  isolation: isolate;
  background: #060403;
}

.is-reading-record .sleep-experience,
.is-reading-paper .sleep-experience,
main:has(.record-section:target) .sleep-experience,
main:has(.paper-section:target) .sleep-experience {
  display: none;
}

.sleep-experience::before {
  content: "";
  position: absolute;
  inset: -12%;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(108deg, transparent 0 31%, rgba(255, 218, 173, .034) 37%, transparent 45%),
    linear-gradient(72deg, transparent 0 48%, rgba(139, 75, 51, .11) 54%, transparent 64%),
    radial-gradient(ellipse at 44% 76%, rgba(242, 161, 116, .11), transparent 46%),
    radial-gradient(ellipse at 70% 30%, rgba(241, 205, 161, .055), transparent 37%);
  filter: blur(20px);
  opacity: calc(.78 - (var(--shutdown) * .48));
  transform: scale(calc(1 + (var(--shutdown) * .12)));
  transition: opacity 1.8s ease, transform 1.8s ease;
}

.sleep-experience::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 4;
  pointer-events: none;
  background:
    radial-gradient(ellipse at 43% 72%, rgba(0, 0, 0, 0) 0 23%, rgba(0, 0, 0, .18) 56%, rgba(0, 0, 0, .9) 100%),
    linear-gradient(180deg, rgba(0, 0, 0, .16), rgba(0, 0, 0, .34) 54%, rgba(0, 0, 0, .72));
  opacity: calc(.58 + (var(--shutdown) * .24));
}

.sleep-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  filter:
    brightness(var(--stage-brightness))
    contrast(var(--stage-contrast))
    saturate(var(--stage-saturation))
    blur(var(--field-blur));
  transform: translateZ(0);
}

.ambient-canvas,
.field,
.grain,
.shade {
  position: absolute;
  inset: 0;
}

.ambient-canvas {
  width: 100%;
  height: 100%;
  opacity: calc(.92 - (var(--shutdown) * .5));
}

.field {
  inset: -18%;
  transform-origin: 50% 50%;
  animation: drift var(--drift-duration) ease-in-out infinite alternate;
  will-change: transform, opacity;
}

.field-a {
  opacity: calc(.84 - (var(--shutdown) * .36));
  background:
    radial-gradient(ellipse at 33% 72%, rgba(231, 145, 113, .34), transparent 31%),
    radial-gradient(ellipse at 72% 34%, rgba(97, 55, 39, .5), transparent 37%),
    radial-gradient(ellipse at 54% 86%, rgba(217, 158, 99, .16), transparent 42%),
    linear-gradient(143deg, rgba(29, 15, 11, .98) 0%, rgba(13, 8, 6, .99) 56%, rgba(5, 3, 2, 1) 100%);
}

.field-b {
  inset: -28%;
  opacity: calc(.5 - (var(--shutdown) * .34));
  mix-blend-mode: screen;
  background:
    conic-gradient(from 224deg at 48% 64%, transparent 0deg, rgba(235, 176, 125, .11) 58deg, transparent 113deg, rgba(214, 115, 95, .15) 181deg, transparent 246deg, rgba(240, 205, 158, .07) 314deg, transparent 360deg);
  animation-name: fold;
}

.field-c {
  inset: -4%;
  opacity: calc(.28 - (var(--shutdown) * .18));
  mix-blend-mode: overlay;
  background:
    repeating-linear-gradient(111deg, rgba(255, 225, 190, .03) 0 1px, transparent 1px 19px),
    repeating-linear-gradient(27deg, rgba(83, 48, 35, .095) 0 1px, transparent 1px 27px);
  animation-name: breatheField;
  animation-duration: var(--breath-duration);
}

.grain {
  opacity: calc(.22 - (var(--shutdown) * .15));
  mix-blend-mode: soft-light;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220' viewBox='0 0 220 220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.68' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='.5'/%3E%3C/svg%3E");
  background-size: 220px 220px;
}

.shade {
  background:
    linear-gradient(90deg, rgba(0, 0, 0, .54), transparent 24%, transparent 70%, rgba(0, 0, 0, .5)),
    linear-gradient(180deg, rgba(255, 202, 152, .026), transparent 42%, rgba(0, 0, 0, .58));
}

.sleep-ui {
  position: relative;
  z-index: 5;
  min-height: 100svh;
  padding: 0;
}

.sleep-focus {
  position: absolute;
  left: 50%;
  top: 62%;
  z-index: 2;
  width: min(720px, 84vw);
  height: min(360px, 42vh);
  pointer-events: none;
  opacity: calc((.78 - (var(--shutdown) * .26)) * (1 - (var(--idle-release) * .48)));
  transform: translate(-50%, calc(-50% + (var(--drowse) * 18px))) scale(calc(1 + (var(--drowse) * .11)));
  filter: blur(calc(var(--drowse) * 7px)) saturate(calc(1 - (var(--drowse) * .24)));
  transition: opacity 2.2s ease, filter 2.2s ease, transform 2.2s ease;
  animation: sleepyFloat var(--breath-duration) ease-in-out infinite;
}

.focus-haze,
.focus-lid,
.sleep-z {
  position: absolute;
  display: block;
}

.focus-haze {
  inset: 0;
  border-radius: 52% 48% 47% 53% / 54% 46% 58% 42%;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(230, 142, 105, .24), transparent 50%),
    radial-gradient(ellipse at 42% 39%, rgba(248, 210, 165, .11), transparent 34%),
    radial-gradient(ellipse at 70% 78%, rgba(56, 24, 18, .28), transparent 54%);
  filter: blur(22px);
  opacity: calc(.9 - (var(--drowse) * .48));
}

.focus-lid {
  left: 50%;
  top: 54%;
  width: min(520px, 66vw);
  height: min(74px, 9vh);
  border-radius: 50%;
  background:
    radial-gradient(ellipse at 50% 58%, rgba(255, 218, 180, .09), transparent 56%),
    linear-gradient(90deg, transparent, rgba(255, 224, 188, .2) 24%, rgba(218, 134, 98, .23) 52%, transparent 86%);
  box-shadow:
    0 0 24px rgba(226, 139, 101, .08),
    0 18px 42px rgba(50, 19, 15, .22);
  opacity: calc(.74 - (var(--drowse) * .42));
  transform: translate(-50%, -50%) scaleX(calc(1 - (var(--drowse) * .3))) scaleY(calc(1 - (var(--drowse) * .18)));
}

.focus-lid::before,
.focus-lid::after {
  content: "";
  position: absolute;
  left: 50%;
  height: 1px;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, rgba(255, 228, 193, .12), rgba(220, 135, 101, .11), transparent);
  transform: translateX(-50%);
}

.focus-lid::before {
  top: 32%;
  width: 76%;
}

.focus-lid::after {
  bottom: 29%;
  width: 62%;
}

.sleep-z {
  color: rgba(255, 219, 184, .19);
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
  line-height: 1;
  text-shadow: 0 0 24px rgba(226, 138, 103, .08);
  opacity: calc((.34 - (var(--drowse) * .18)) * (1 - var(--idle-release)));
  animation: zDrift 12s ease-in-out infinite;
}

.sleep-z-a {
  left: 38%;
  top: 38%;
  font-size: clamp(18px, 4vw, 34px);
  animation-delay: -2s;
}

.sleep-z-b {
  left: 50%;
  top: 26%;
  font-size: clamp(15px, 3.2vw, 27px);
  opacity: calc((.22 - (var(--drowse) * .13)) * (1 - var(--idle-release)));
  animation-delay: -6s;
}

.sleep-z-c {
  left: 59%;
  top: 18%;
  font-size: clamp(12px, 2.5vw, 21px);
  opacity: calc((.15 - (var(--drowse) * .1)) * (1 - var(--idle-release)));
  animation-delay: -9s;
}

.entry-button {
  position: absolute;
  inset: 0;
  display: block;
  width: auto;
  height: auto;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: rgba(255, 230, 204, .86);
  box-shadow: none;
  cursor: pointer;
  touch-action: manipulation;
  opacity: var(--entry-opacity);
  transform: none;
  transition: opacity 2s ease;
}

.entry-button::before {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 11%;
  width: min(760px, 78vw);
  height: min(340px, 36vh);
  border-radius: 52% 48% 46% 54% / 55% 44% 56% 45%;
  background:
    radial-gradient(ellipse at 48% 58%, rgba(225, 139, 103, .19), transparent 58%),
    radial-gradient(ellipse at 38% 38%, rgba(244, 210, 168, .08), transparent 34%),
    radial-gradient(ellipse at 66% 72%, rgba(70, 32, 24, .18), transparent 46%);
  filter: blur(12px);
  opacity: calc(.46 - (var(--shutdown) * .28));
  transform: translateX(-50%) scale(calc(.92 + (var(--shutdown) * .24)));
  animation: pulse var(--breath-duration) ease-in-out infinite;
}

.entry-button::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 27%;
  width: min(430px, 48vw);
  height: 1px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 225, 190, .2) 22%, rgba(214, 132, 98, .18) 54%, transparent);
  filter: blur(.4px);
  opacity: calc(.38 - (var(--shutdown) * .3));
  transform: translateX(-50%);
}

.entry-symbol {
  position: absolute;
  left: 50%;
  bottom: calc(26% + env(safe-area-inset-bottom));
  z-index: 1;
  display: block;
  width: min(210px, 38vw);
  height: 1px;
  border-radius: 999px;
  background:
    linear-gradient(90deg, transparent, rgba(255, 226, 190, .1) 38%, rgba(221, 139, 100, .16) 51%, rgba(255, 226, 190, .07) 62%, transparent);
  box-shadow:
    0 0 24px rgba(224, 132, 98, .08);
  opacity: calc(.46 - (var(--shutdown) * .36));
  transform: translateX(-50%) scaleX(var(--button-scale));
  transition: opacity 2s ease, transform 2s ease;
}

.entry-symbol span {
  display: none;
}

.is-softening .entry-button {
  cursor: default;
  pointer-events: none;
}

.is-softening .entry-symbol {
  opacity: calc(var(--entry-opacity) * .24);
  transform: translateX(-50%) translateY(10px) scaleX(calc(var(--button-scale) * .7));
}

.quiet-controls {
  position: absolute;
  left: 50%;
  bottom: max(22px, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  transform: translateX(-50%) scale(calc(.7 + (var(--control-opacity) * .2)));
  opacity: calc(var(--control-opacity) * .52);
  transition: opacity 1.8s linear, transform 1.8s ease, filter 1.8s ease;
}

.icon-button,
.thought-button {
  display: inline-grid;
  width: 39px;
  height: 39px;
  place-items: center;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 228, 195, .018);
  color: rgba(255, 227, 199, .36);
  box-shadow: none;
  cursor: pointer;
  transition: opacity .8s ease, transform .8s ease, background .8s ease, color .8s ease;
}

.icon-button:hover,
.thought-button:hover {
  background: rgba(255, 228, 195, .04);
  color: rgba(255, 227, 199, .48);
}

.icon-button svg {
  display: none;
}

.icon-button::before {
  content: "";
  display: block;
  width: 13px;
  height: 1px;
  border-radius: 999px;
  background: currentColor;
  box-shadow:
    0 -4px 0 rgba(255, 227, 199, .18),
    0 4px 0 rgba(255, 227, 199, .18);
  opacity: .54;
}

.audio-on::before {
  box-shadow:
    0 -5px 0 rgba(255, 227, 199, .24),
    0 5px 0 rgba(255, 227, 199, .24);
  opacity: .72;
}

.thought-shell {
  position: relative;
  display: flex;
  align-items: center;
  min-width: 39px;
  min-height: 39px;
  opacity: var(--thought-opacity);
  transition: opacity 1s ease, filter 1s ease;
}

.thought-button span {
  width: 14px;
  height: 7px;
  border-radius: 60% 40% 64% 36% / 56% 42% 58% 44%;
  background:
    radial-gradient(ellipse at 35% 28%, rgba(255, 231, 190, .46), transparent 34%),
    linear-gradient(145deg, rgba(215, 143, 105, .42), rgba(97, 50, 38, .42));
  opacity: .7;
  transform: rotate(-11deg);
}

.thought-shell textarea {
  position: absolute;
  right: 0;
  bottom: 0;
  width: min(270px, calc(100vw - 36px));
  height: 78px;
  padding: 12px 14px;
  border: 1px solid rgba(255, 224, 190, .075);
  border-radius: 8px;
  outline: none;
  resize: none;
  background: rgba(8, 5, 4, .68);
  color: rgba(255, 232, 205, .76);
  box-shadow:
    0 22px 70px rgba(0, 0, 0, .5),
    inset 0 1px 0 rgba(255, 238, 214, .07);
  opacity: 0;
  pointer-events: none;
  transform: translateY(8px) scale(.96);
  transform-origin: 100% 100%;
  transition: opacity .6s ease, transform .6s ease;
}

.thought-shell.is-open textarea {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0) scale(1);
}

.thought-shell.is-open .thought-button {
  opacity: 0;
  pointer-events: none;
}

.thought-shell.is-fading textarea {
  opacity: 0;
  transform: translateY(3px) scale(.9);
  transition-duration: 1.8s;
}

.is-finished .quiet-controls,
.is-finished .entry-button,
.is-released .quiet-controls,
.is-released .entry-button {
  pointer-events: none;
}

.is-released .quiet-controls {
  opacity: 0;
  filter: blur(8px);
}

.is-released .sleep-focus {
  opacity: .08;
  filter: blur(16px) saturate(.45);
}

.record-section {
  display: none;
  min-height: 100vh;
  background:
    radial-gradient(circle at 18% 16%, rgba(186, 116, 86, .18), transparent 34%),
    linear-gradient(180deg, #090605 0, #100a08 48%, #080504 100%);
  color: #ffeeda;
  padding: 92px 20px 86px;
}

.record-section.is-visible,
.record-section:target {
  display: block;
}

.record-shell {
  width: min(980px, 100%);
  margin: 0 auto;
}

.record-head {
  display: grid;
  gap: 8px;
  margin: 0 0 22px;
}

.record-head h1 {
  margin: 0;
  font-size: clamp(34px, 6vw, 72px);
  line-height: .98;
  font-weight: 760;
}

.record-head p,
.record-toolbar,
.record-boundary p,
.record-note,
.record-meta {
  color: rgba(255, 231, 206, .62);
}

.record-head p {
  max-width: 640px;
  margin: 0;
  font-size: 16px;
}

.record-token,
.record-toolbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.record-token {
  margin: 18px 0;
}

.record-token[hidden] {
  display: none;
}

.record-token input {
  width: min(360px, 100%);
  min-height: 42px;
  border: 1px solid rgba(255, 228, 199, .18);
  border-radius: 8px;
  background: rgba(0, 0, 0, .28);
  color: #ffeeda;
  padding: 0 12px;
  outline: none;
}

.record-token input:focus {
  border-color: rgba(236, 176, 124, .6);
}

.record-token button,
.record-toolbar button {
  min-height: 42px;
  border: 1px solid rgba(255, 228, 199, .18);
  border-radius: 8px;
  background: rgba(255, 238, 218, .09);
  color: #ffeeda;
  padding: 0 14px;
  cursor: pointer;
}

.record-token button:hover,
.record-toolbar button:hover {
  background: rgba(255, 238, 218, .14);
}

.record-toolbar {
  margin: 0 0 22px;
  font-size: 13px;
}

.record-content {
  display: grid;
  gap: 18px;
}

.record-boundary,
.record-summary,
.record-chart,
.record-list {
  min-width: 0;
  border: 1px solid rgba(255, 228, 199, .12);
  border-radius: 8px;
  background: rgba(255, 238, 218, .055);
}

.record-boundary {
  max-width: 720px;
  padding: 18px;
}

.record-boundary strong {
  display: block;
  margin: 0 0 6px;
  font-size: 16px;
}

.record-boundary p {
  margin: 0;
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.record-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) repeat(2, minmax(210px, .42fr));
  gap: 0;
  overflow: hidden;
}

.record-summary > div {
  min-height: 136px;
  padding: 18px;
  border-left: 1px solid rgba(255, 228, 199, .1);
}

.record-summary > div:first-child {
  border-left: 0;
}

.record-value {
  display: block;
  margin: 4px 0 8px;
  font-size: clamp(30px, 5vw, 54px);
  line-height: 1;
  font-weight: 760;
  white-space: nowrap;
}

.record-summary > div:not(:first-child) .record-value {
  font-size: clamp(30px, 3.8vw, 48px);
}

.record-label {
  display: block;
  color: rgba(255, 231, 206, .55);
  font-size: 12px;
  text-transform: uppercase;
}

.record-chart {
  padding: 18px;
}

.record-chart h2,
.record-list h2 {
  margin: 0 0 16px;
  font-size: 15px;
  font-weight: 760;
}

.night-bars {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(28px, 1fr));
  align-items: end;
  gap: 10px;
  min-height: 190px;
}

.night-bar {
  display: grid;
  grid-template-rows: 1fr auto;
  gap: 8px;
  min-width: 0;
}

.night-bar-stack {
  display: flex;
  flex-direction: column-reverse;
  height: 160px;
  overflow: hidden;
  border-radius: 7px;
  background: rgba(255, 238, 218, .06);
}

.night-segment {
  min-height: 2px;
}

.night-segment.sleeping,
.night-segment.light {
  background: #c98a6b;
}

.night-segment.deep {
  background: #7f6ca7;
}

.night-segment.rem {
  background: #d7b06c;
}

.night-segment.awake,
.night-segment.outOfBed {
  background: rgba(255, 238, 218, .44);
}

.night-segment.unknown {
  background: rgba(255, 238, 218, .2);
}

.night-date {
  overflow: hidden;
  color: rgba(255, 231, 206, .52);
  font-size: 11px;
  text-align: center;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.record-list {
  overflow: hidden;
}

.record-list h2 {
  margin: 0;
  padding: 18px 18px 0;
}

.night-row {
  display: grid;
  grid-template-columns: minmax(92px, .72fr) minmax(130px, 1fr) repeat(4, minmax(64px, .5fr));
  gap: 0;
  border-top: 1px solid rgba(255, 228, 199, .1);
}

.night-row > span {
  min-width: 0;
  padding: 13px 12px;
  color: rgba(255, 231, 206, .72);
  font-size: 13px;
}

.night-row > span:not(:first-child) {
  border-left: 1px solid rgba(255, 228, 199, .08);
}

.night-row .night-primary {
  color: #ffeeda;
  font-weight: 720;
}

.night-header > span {
  color: rgba(255, 231, 206, .46);
  font-size: 11px;
  font-weight: 760;
  text-transform: uppercase;
}

.paper-section {
  display: none;
  min-height: 100vh;
  background:
    linear-gradient(180deg, #090605 0, #19100c 72px, #efe4d2 73px, #eee1cd 100%);
  color: #211713;
  padding: 86px 22px 96px;
}

.paper-section.is-visible,
.paper-section:target {
  display: block;
}

.paper {
  width: min(900px, 100%);
  margin: 0 auto;
}

.paper-kicker,
.paper-meta {
  color: rgba(33, 23, 19, .62);
}

.paper-kicker {
  margin: 0 0 14px;
  font-size: 12px;
  font-weight: 760;
  text-transform: uppercase;
}

.paper h1 {
  max-width: 880px;
  margin: 0 0 16px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(31px, 4.4vw, 54px);
  line-height: 1.04;
  font-weight: 700;
}

.paper-meta {
  max-width: 700px;
  margin: 0 0 42px;
  font-size: 15px;
}

.paper section {
  padding: 28px 0;
  border-top: 1px solid rgba(68, 45, 35, .16);
}

.paper h2 {
  margin: 0 0 14px;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(23px, 3vw, 32px);
  line-height: 1.1;
}

.paper h3 {
  margin: 0 0 8px;
  color: #7c4b2e;
  font-size: 13px;
  text-transform: uppercase;
}

.paper p,
.paper li {
  color: rgba(33, 23, 19, .83);
  font-size: clamp(16px, 1.45vw, 18px);
  line-height: 1.6;
}

.paper p {
  margin: 0 0 14px;
}

.paper a {
  color: #6c3d25;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.mechanism-figure,
.placeholder-figure {
  margin: 18px 0 0;
  border: 1px solid rgba(68, 45, 35, .14);
  border-radius: 8px;
  background: rgba(255, 249, 238, .56);
}

.mechanism-figure {
  padding: 18px;
}

figcaption {
  margin: 0 0 14px;
  color: rgba(33, 23, 19, .58);
  font-size: 13px;
  line-height: 1.4;
}

.mechanism-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.mechanism-grid div,
.measure-grid div {
  min-width: 0;
  border: 1px solid rgba(68, 45, 35, .12);
  border-radius: 8px;
  background: rgba(255, 253, 248, .56);
  padding: 14px;
}

.mechanism-grid strong {
  display: block;
  margin-bottom: 7px;
  color: #7c4b2e;
  font-size: 13px;
  text-transform: uppercase;
}

.mechanism-grid span {
  color: rgba(33, 23, 19, .72);
  font-size: 14px;
  line-height: 1.4;
}

.placeholder-figure {
  min-height: 180px;
  display: grid;
  place-items: end start;
  padding: 18px;
  background:
    linear-gradient(90deg, rgba(116, 76, 55, .12) 1px, transparent 1px),
    linear-gradient(180deg, rgba(116, 76, 55, .1) 1px, transparent 1px),
    rgba(255, 249, 238, .58);
  background-size: 64px 64px;
}

.principles,
.references {
  margin: 0;
  padding-left: 22px;
}

.principles li + li,
.references li + li {
  margin-top: 11px;
}

.measure-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.measure-grid p {
  margin: 0;
  font-size: 15px;
}

@keyframes drift {
  0% {
    transform: translate3d(-1.2%, -1%, 0) rotate(-1.5deg) scale(1.02);
  }
  100% {
    transform: translate3d(1%, 1.3%, 0) rotate(1.8deg) scale(1.07);
  }
}

@keyframes fold {
  0% {
    transform: translate3d(1%, -1%, 0) rotate(0deg) scale(1.04);
  }
  100% {
    transform: translate3d(-1%, 1%, 0) rotate(5deg) scale(1.1);
  }
}

@keyframes breatheField {
  0%,
  100% {
    transform: scale(1);
    opacity: calc(.18 - (var(--shutdown) * .12));
  }
  50% {
    transform: scale(1.022);
    opacity: calc(.32 - (var(--shutdown) * .2));
  }
}

@keyframes pulse {
  0%,
  100% {
    transform: scale(.88);
    opacity: .34;
  }
  50% {
    transform: scale(1.08);
    opacity: .64;
  }
}

@keyframes sleepyFloat {
  0%,
  100% {
    transform: translate(-50%, calc(-50% + (var(--drowse) * 18px))) scale(calc(.985 + (var(--drowse) * .08)));
  }
  50% {
    transform: translate(-50%, calc(-50% - 8px + (var(--drowse) * 22px))) scale(calc(1.025 + (var(--drowse) * .1)));
  }
}

@keyframes zDrift {
  0% {
    transform: translate3d(-6px, 9px, 0) rotate(-8deg);
  }
  45% {
    transform: translate3d(3px, -10px, 0) rotate(3deg);
  }
  100% {
    transform: translate3d(7px, -21px, 0) rotate(8deg);
  }
}

@media (max-width: 760px) {
  .suite-topbar {
    min-height: 54px;
    padding: 9px 12px 0;
    opacity: .14;
  }

  .suite-ao-home {
    width: 31px;
    height: 31px;
    flex-basis: 31px;
  }

  .suite-ao-home img {
    width: 30px;
    height: 30px;
  }

  .suite-app-mark {
    width: 27px;
    height: 27px;
    flex-basis: 27px;
  }

  .suite-app-brand {
    font-size: 12px;
  }

  .suite-topbar-actions a {
    width: 29px;
    height: 29px;
  }

  .sleep-experience,
  .sleep-ui {
    min-height: 100svh;
  }

  .entry-button {
    width: auto;
  }

  .quiet-controls {
    bottom: max(22px, env(safe-area-inset-bottom));
  }

  .sleep-focus {
    top: 58%;
    width: min(390px, 94vw);
    height: min(350px, 44vh);
  }

  .focus-lid {
    width: min(330px, 78vw);
    height: min(92px, 11vh);
  }

  .sleep-z-a {
    font-size: clamp(22px, 7vw, 32px);
  }

  .sleep-z-b {
    font-size: clamp(18px, 5.5vw, 25px);
  }

  .sleep-z-c {
    font-size: clamp(14px, 4.4vw, 20px);
  }

  .mechanism-grid,
  .measure-grid {
    grid-template-columns: 1fr;
  }

  .record-section {
    padding: 76px 14px 64px;
  }

  .record-summary {
    grid-template-columns: 1fr;
  }

  .record-summary > div,
  .record-summary > div:first-child {
    min-height: 0;
    border-left: 0;
    border-top: 1px solid rgba(255, 228, 199, .1);
  }

  .record-summary > div:first-child {
    border-top: 0;
  }

  .night-row {
    grid-template-columns: 1fr 1fr;
  }

  .night-row > span:nth-child(n + 3) {
    display: none;
  }

  .paper-section {
    padding: 70px 18px 72px;
  }

  .paper h1 {
    font-size: clamp(29px, 8.2vw, 36px);
    line-height: 1.08;
  }
}

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

  *,
  *::before,
  *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
}
