/* Fallbacks sit under Apollo core. Core loads after this file and owns the live tokens. */
:root {
  --rgb-theme: 249, 248, 248;
  --rgb-diff: 10, 10, 10;
  --rgb-accent: 237, 172, 65;
  --bg: rgb(var(--rgb-theme));
  --txt-heading: rgb(var(--rgb-diff));
  --muted: rgba(var(--rgb-diff), 0.62);
  --accent: #edac41;
  --primary: #edac41;
  --border: rgba(var(--rgb-diff), 0.12);
  --surface: rgba(var(--rgb-diff), 0.03);
  --surface-3: rgb(var(--rgb-theme));
  --surface-hover: rgba(var(--rgb-diff), 0.06);
  --onyx-900: #141414;
  --ff-main: "Manrope", "Segoe UI", sans-serif;
  --ff-heading: "Manrope", "Segoe UI", sans-serif;
  --ff-mono: "IBM Plex Mono", ui-monospace, monospace;
  --fs-p: 1rem;
  --fs-p3: 0.75rem;
  --fs-h4: 2rem;
  --s-2: 8px;
  --s-4: 16px;
  --s-5: 24px;
  --r-lg: 28px;
  --r-xs: 12px;
  --r-pill: 999px;
  --rad-down: 14px 6px;
  --shadow: 0 24px 60px rgba(10, 10, 10, 0.12);
  --shadow-focus: 0 0 0 3px rgba(237, 172, 65, 0.35);
  --white-1: rgba(255, 255, 255, 0.5);
  --white-2: rgba(255, 255, 255, 0.35);
  --white-5: rgba(10, 10, 10, 0.06);
  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --z-sticky: 20;
  --t-ui: 200ms ease;
  --ease: ease;
  --accent-sunset-red: #b34f3d;
}

html,
body {
  margin: 0;
  height: 100%;
}

button:not(:disabled),
[role="button"]:not(:disabled) {
  cursor: pointer;
}

.stage {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  background: var(--surface-3);
  padding: var(--safe-top) 0 var(--safe-bottom);
}

.stack {
  --p: 0;
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 440px;
  overflow: hidden;
  isolation: isolate;
  background: var(--bg);
}

.stack.turning {
  overflow: hidden;
}

.page.under,
.page.hidden {
  pointer-events: none;
}

@media (min-width: 540px) {
  .stack {
    height: min(100dvh - 48px, 880px);
    border-radius: var(--r-lg);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
  }
}

.page {
  position: absolute;
  inset: 0;
}

.page.hidden {
  visibility: hidden;
}

.page.under {
  z-index: 1;
}

.page.top {
  transform-origin: right center;
  z-index: 2;
}

.stack.turning .page.top {
  transform: translate3d(calc(var(--p) * 100%), 0, 0);
}

.face {
  position: absolute;
  inset: 0;
  background: var(--bg);
}

.face.back {
  display: none;
}

.shade {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(to right, rgba(var(--rgb-diff), 0.16), transparent 60%);
  opacity: calc(var(--p, 0) * 1.15);
}

.page:not(.top) .shade {
  display: none;
}

.page.under::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: rgba(var(--rgb-diff), 1);
  opacity: calc(var(--p, 0) * 0.28);
}

.scroll {
  position: relative;
  height: 100%;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  background: var(--bg);
}

.scroll::-webkit-scrollbar {
  display: none;
}

.edge {
  position: absolute;
  top: 0;
  bottom: 0;
  z-index: 30;
  touch-action: none;
  cursor: grab;
}

.edge-back {
  left: 0;
  width: 28px;
}

.edge[hidden] {
  display: none;
}

.edge::after {
  content: "";
  position: absolute;
  top: 50%;
  width: 2px;
  height: 36px;
  border-radius: var(--r-pill);
  background: var(--muted);
  opacity: 0.45;
  translate: 0 -50%;
  transition: height 250ms ease, opacity 200ms ease, background 200ms ease;
}

.edge-back::after {
  left: 8px;
}

.edge:hover::after,
.edge:active::after {
  height: 56px;
  opacity: 1;
  background: var(--accent);
}

.view {
  --n: 0;
  display: flex;
  flex-direction: column;
  min-height: 100%;
  color: var(--txt-heading);
  font-family: var(--ff-main);
  font-size: var(--fs-p);
  line-height: 1.5;
  background-color: var(--bg);
  background-image: linear-gradient(
    rgba(var(--rgb-accent), calc(0.012 + var(--n) * 0.008)),
    rgba(var(--rgb-accent), calc(0.012 + var(--n) * 0.008))
  );
  padding: 0 var(--s-4) calc(var(--s-5) + var(--safe-bottom));
}

.nav {
  --sp: 0;
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  display: grid;
  grid-template-columns: 44px minmax(0, 1fr) auto;
  align-items: center;
  height: 56px;
  margin: 0 calc(var(--s-4) * -1);
  padding: 0 var(--s-2);
  background: var(--bg);
  border-bottom: 1px solid var(--border);
}

.nav > * {
  position: relative;
}

.nav-title {
  justify-self: center;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 100%;
  overflow: hidden;
  font-family: var(--ff-heading);
  font-size: 1.05rem;
  color: var(--txt-heading);
  letter-spacing: -0.02em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 250ms ease, transform 250ms ease;
}

.nav-title > span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.nav-title.is-locked,
.nav.is-scrolled .nav-title {
  opacity: 1;
  transform: none;
}

.nav-tools {
  display: inline-flex;
  align-items: center;
}

.nav-out {
  display: inline-flex;
  color: inherit;
  text-decoration: none;
}

.nav-progress {
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 2px;
  background: var(--accent);
  transform: scaleX(var(--sp));
  transform-origin: left center;
  opacity: calc(var(--sp) * 8);
}

.icon-btn {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: var(--r-pill);
  background: transparent;
  color: var(--txt-heading);
  transition: background var(--t-ui), transform 150ms var(--ease);
}

.icon-btn:hover {
  background: var(--surface-hover);
}

.icon-btn:active {
  transform: scale(0.96);
}

.icon-btn[aria-disabled="true"] {
  opacity: 0;
  pointer-events: none;
}

.hero {
  padding: 28px 0 8px;
}

.eyebrow {
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.eyebrow b {
  color: var(--accent);
  font-weight: 500;
}

.hero h1 {
  margin: 12px 0 0;
  font-family: var(--ff-heading);
  font-size: var(--fs-h4);
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: -0.03em;
  color: var(--txt-heading);
  overflow-wrap: anywhere;
}

.lede {
  margin: 12px 0 0;
  max-width: 36ch;
  color: var(--muted);
  font-size: 1.05rem;
  line-height: 1.45;
}

.locks {
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-2);
  margin-top: var(--s-4);
}

.lock {
  display: inline-flex;
  align-items: center;
  height: 32px;
  padding: 0 12px;
  border: 1px solid var(--border);
  border-radius: var(--r-pill);
  color: var(--txt-heading);
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.lock.is-on {
  border-color: transparent;
  background: var(--primary);
  color: var(--onyx-900);
}

button.lock {
  background: transparent;
}

button.lock.is-on {
  background: var(--primary);
}

.fine {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.45;
}

.field {
  display: flex;
  align-items: center;
  gap: var(--s-2);
  height: 48px;
  margin: var(--s-4) 0 var(--s-2);
  padding: 0 14px;
  border: 1px solid var(--border);
  border-radius: var(--r-xs);
  background: var(--surface);
  color: var(--muted);
}

.field:focus-within {
  border-color: var(--accent);
  box-shadow: var(--shadow-focus);
  color: var(--accent);
}

.field input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--txt-heading);
  font: inherit;
  font-size: 1.05rem;
}

.field input::placeholder {
  color: var(--muted);
}

.btn-primary,
.btn-quiet {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 48px;
  margin-top: 8px;
  padding: 0 14px;
  border-radius: var(--r-xs);
  font-family: var(--ff-heading);
  font-size: 1.05rem;
  font-weight: 500;
  text-decoration: none;
  box-sizing: border-box;
  transition: transform 200ms ease, filter 200ms ease;
}

.btn-primary {
  border: 0;
  background: var(--primary);
  color: var(--onyx-900);
}

.btn-quiet {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--txt-heading);
}

.btn-primary:hover,
.btn-quiet:hover {
  filter: brightness(1.08);
}

.btn-primary:active,
.btn-quiet:active {
  transform: scale(0.985);
}

.section-title {
  margin: 28px 0 8px;
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.section-title b {
  color: var(--accent);
  font-weight: 500;
}

.list {
  border-top: 1px solid var(--border);
}

.row {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 14px 0;
  border: 0;
  border-bottom: 1px solid var(--border);
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
  transition: padding 250ms ease;
}

.row:hover {
  padding-left: 6px;
}

.mark {
  display: grid;
  flex: none;
  place-items: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: var(--rad-down);
  background: var(--white-1);
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  letter-spacing: 0.04em;
  color: var(--accent);
}

.mark img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  box-shadow: none;
}

.row h3 {
  margin: 0;
  font-family: var(--ff-heading);
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.2;
  color: var(--txt-heading);
}

.row small {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.35;
}

.row .grow {
  min-width: 0;
  flex: 1;
}

.chev {
  flex: none;
  color: var(--muted);
  transition: transform 250ms ease, color 200ms ease;
}

.row:hover .chev {
  transform: translateX(3px);
  color: var(--accent);
}

.note {
  margin-top: 16px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: var(--rad-down);
}

.note strong {
  display: block;
  margin-bottom: 4px;
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-sunset-red);
}

.note p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

.skel {
  height: 14px;
  margin: 14px 0;
  border-radius: var(--r-pill);
  background: var(--white-5);
}

.skel.wide {
  width: 72%;
}

.meta-line {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 16px;
  color: var(--muted);
  font-size: 0.95rem;
}

.empty {
  margin-top: 8px;
  color: var(--muted);
}

.row.is-muted {
  opacity: 0.38;
}

.row.is-muted h3,
.row.is-muted small {
  color: var(--muted);
}

.row.is-done {
  opacity: 0.72;
}

.row.is-done h3 {
  text-decoration: line-through;
  color: var(--muted);
}

.tag-muted {
  margin: 10px 0 0;
  color: var(--muted);
  font-family: var(--ff-mono);
  font-size: var(--fs-p3);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.view i[class^="ri-"] {
  font-size: 1.25rem;
  line-height: 1;
}

.view button,
.view a {
  font-family: inherit;
}

@media (prefers-reduced-motion: reduce) {
  .row,
  .btn-primary,
  .btn-quiet,
  .icon-btn,
  .nav-title,
  .edge::after,
  .chev {
    transition: none;
  }
}
