/*
  Reevu site: the app's own paper, ink and pencil.
  Three looks, the same as the app: paper (default), light and dark.
  "auto" follows the device: paper by day, dark at night.
*/
@font-face { font-family: Manrope; src: url(assets/fonts/Manrope.ttf) format("truetype"); font-weight: 200 800; font-display: swap }
@font-face { font-family: Caveat; src: url(assets/fonts/Caveat.ttf) format("truetype"); font-weight: 400 700; font-display: swap }

:root {
  --bg: #f1ede4; --paper: #faf7ef; --ink: #1c1a15; --ink-2: #4a463d; --ink-3: #6f6a5e; --ink-4: #c8c3b5;
  --rule: #d9d3c2; --rule-soft: #e6e1d2; --hl: rgb(255 221 68 / .55); --pencil: #c44a3a;
  --nav: rgb(250 247 239 / .88);
  --font: Manrope, ui-sans-serif, system-ui, sans-serif;
  --hand: Caveat, "Bradley Hand", cursive;
  --ease: cubic-bezier(.23, 1, .32, 1);
  color-scheme: light;
}
:root[data-theme="light"] {
  --bg: #f4f4f2; --paper: #fff; --ink: #111; --ink-2: #3a3a3a; --ink-3: #6b6b6b; --ink-4: #c9c9c9;
  --rule: #e5e5e2; --rule-soft: #f0f0ed; --hl: rgb(0 0 0 / .07); --pencil: #111; --nav: rgb(255 255 255 / .88);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]):not([data-theme="paper"]) {
    --bg: #0a0a0a; --paper: #141414; --ink: #f5f5f3; --ink-2: #d0cfcb; --ink-3: #9a9a96; --ink-4: #3a3a38;
    --rule: #262624; --rule-soft: #1b1b19; --hl: rgb(255 255 255 / .12); --pencil: #f5f5f3; --nav: rgb(20 20 20 / .88);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0a0a0a; --paper: #141414; --ink: #f5f5f3; --ink-2: #d0cfcb; --ink-3: #9a9a96; --ink-4: #3a3a38;
  --rule: #262624; --rule-soft: #1b1b19; --hl: rgb(255 255 255 / .12); --pencil: #f5f5f3; --nav: rgb(20 20 20 / .88);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box }
html { scroll-behavior: smooth; scroll-padding-top: 80px }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 16px/1.5 var(--font); letter-spacing: -.005em;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
  transition: background .3s, color .3s;
}
main, footer { width: 100%; max-width: 1180px; margin: 0 auto; padding-inline: 24px }
h1, h2, h3, p { margin: 0 }
a { color: inherit }
button, input, textarea { font: inherit; color: inherit }
button { cursor: pointer }
:focus-visible { outline: 2px solid var(--pencil); outline-offset: 3px }
hr { border: 0; height: 1px; background: var(--rule); margin: 0 }
hr.soft { background: var(--rule-soft) }
mark { color: inherit; background: linear-gradient(180deg, transparent 55%, var(--hl) 55%); padding: 0 2px }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%) }

/* Type */
.caps { font-size: 11px; font-weight: 700; letter-spacing: .24em; text-transform: uppercase; color: var(--ink-3) }
.caps.soft { font-weight: 600; letter-spacing: .1em }
.hand { font-family: var(--hand); font-size: 22px; line-height: 1.3; color: var(--ink-2) }
.display, .display-sm, .display-xl, .display-num {
  font-weight: 800; text-transform: uppercase; letter-spacing: -.045em; line-height: .9; color: var(--ink);
}
.display { font-size: clamp(44px, 6vw, 72px) }
.display-sm { font-size: 40px; margin: 6px 0 14px }
.display-xl { font-size: clamp(84px, 19vw, 240px); line-height: .82; margin: 28px 0 32px; margin-left: -.04em }
.display-num { font-size: 120px; line-height: .85; font-variant-numeric: tabular-nums }
.dim { color: var(--ink-3) }
.rule { flex: 1; height: 1px; background: var(--rule) }

/* Nav */
.nav {
  position: fixed; inset: 14px 16px auto; z-index: 10; max-width: 1148px; margin: 0 auto;
  display: flex; align-items: center; gap: 2px; padding: 6px 6px 6px 16px;
  background: var(--nav); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border: 1px solid var(--rule); border-radius: 4px;
}
.nav a, .nav button {
  min-height: 36px; display: flex; align-items: center; padding: 0 12px; border: 0; background: none;
  text-decoration: none; font-size: 13px; font-weight: 600; color: var(--ink-2); border-radius: 2px;
}
.nav a:hover, .nav button:hover { color: var(--ink); background: var(--rule-soft) }
.nav .wordmark { padding: 0; font-size: 22px; font-weight: 800; letter-spacing: -.045em; color: var(--ink); background: none }
.nav #theme {
  margin-left: 6px; border: 1px solid var(--rule); font-size: 10px; font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--ink-3); min-width: 72px; justify-content: center;
}
.spacer { flex: 1 }
@media (max-width: 560px) { .nav .wide { display: none } }

/* Hero */
.hero { padding: 132px 0 72px; border-bottom: 1px solid var(--rule) }
.hero-foot { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 28px 48px }
.lede { max-width: 30ch; font-size: clamp(19px, 2.2vw, 26px); font-weight: 500; line-height: 1.35; color: var(--ink-2) }
.hero-actions { display: flex; align-items: center; gap: 18px; flex-wrap: wrap }
.btn {
  display: inline-flex; align-items: center; gap: 10px; padding: 15px 22px; border-radius: 2px;
  font-size: 12px; font-weight: 700; letter-spacing: .16em; text-transform: uppercase; text-decoration: none;
  transition: transform .15s var(--ease), opacity .15s;
}
.btn.ink { background: var(--ink); color: var(--paper) }
.btn.line { border: 1px solid var(--ink); color: var(--ink) }
.btn.line:hover { background: var(--rule-soft) }
.btn:active { transform: scale(.97); opacity: .7 }

/* Paper sheets */
.sheet {
  background: var(--paper); border: 1px solid var(--rule); border-radius: 3px;
  box-shadow: 0 1px 0 var(--rule-soft), 0 18px 40px -24px rgb(28 26 21 / .25);
}

/* The live Today page */
.today-wrap {
  display: grid; grid-template-columns: minmax(0, 440px) minmax(0, 1fr); gap: 56px;
  align-items: start; padding: 72px 0;
}
.today { padding: 28px 24px 22px }
.day-head { display: flex; align-items: center; gap: 12px }
.day-big { display: flex; align-items: end; justify-content: space-between; margin: 6px 0 16px }
.tally { text-align: right; padding-bottom: 8px }
.tally .caps { display: block }
.tally b { font-size: 32px; font-weight: 700; letter-spacing: -.03em; font-variant-numeric: tabular-nums }
.tally b span { color: var(--ink-4); font-weight: 500 }

.bullets { list-style: none; margin: 0; padding: 10px 0 0 }
.bullets button {
  position: relative; width: 100%; display: flex; gap: 12px; align-items: baseline; padding: 7px 0 7px 25px;
  border: 0; background: none; text-align: left; font-size: 15px; line-height: 1.4;
  transition: color .2s, opacity .12s;
}
.bullets button:active { opacity: .5 }
.bullets button::before { content: ""; position: absolute; left: 0; top: 11px; width: 13px; height: 13px }
.bullets button.important::after { content: "!"; margin-left: -6px; color: var(--pencil); font-weight: 700; font-size: 12px }
.bullets [data-kind="done"] { color: var(--ink-3); text-decoration: line-through; text-decoration-color: var(--ink-3) }
.bullets [data-kind="done"].just { text-decoration: none }
.bullets [data-kind="done"].just .txt { position: relative }
.bullets [data-kind="done"].just .txt::after {
  content: ""; position: absolute; left: -2px; right: -2px; top: 55%; height: 1.5px; background: currentColor;
  transform-origin: left; animation: strike .35s ease-out;
}
@keyframes strike { from { transform: scaleX(0) } }

/* Bullet glyphs, drawn with masks so they take the ink color. */
.g, .bullets button::before { background: currentColor; -webkit-mask: var(--m) center / contain no-repeat; mask: var(--m) center / contain no-repeat }
[data-kind="task"]::before, .g.task { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='2.2'/%3E%3C/svg%3E") }
[data-kind="done"]::before, .g.done { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M3 3l8 8M11 3l-8 8' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") }
[data-kind="note"]::before, .g.note { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M2.5 7h9' stroke='%23000' stroke-width='1.6' stroke-linecap='round'/%3E%3C/svg%3E") }
[data-kind="event"]::before, .g.event { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Ccircle cx='7' cy='7' r='4.2' fill='none' stroke='%23000' stroke-width='1.5'/%3E%3C/svg%3E") }
[data-kind="migrated"]::before, .g.migrated { --m: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 14 14'%3E%3Cpath d='M5 3l5 4-5 4' fill='none' stroke='%23000' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") }

.add { display: flex; align-items: center; gap: 12px; padding: 4px 0 12px; color: var(--ink-4) }
.add .plus { width: 13px; text-align: center; font-size: 17px; line-height: 1 }
.add input { flex: 1; border: 0; background: none; padding: 6px 0; font-size: 15px; color: var(--ink) }
.add input::placeholder { color: var(--ink-4) }
.add input:focus-visible { outline: none }
.label { margin: 20px 0 10px; font-size: 10px }
.reflect {
  width: 100%; resize: none; padding: 12px 14px; border: 1px solid var(--rule); border-radius: 2px; background: none;
  font-family: var(--hand); font-size: 22px; line-height: 1.3; color: var(--ink-2); field-sizing: content; min-height: 76px;
}
.reflect::placeholder { color: var(--ink-4); font-style: italic }
.hint { text-align: center; margin-top: 20px; font-size: 10px; font-weight: 600; letter-spacing: .2em; color: var(--ink-4) }

.today-notes { padding-top: 12px }
.key { list-style: none; margin: 16px 0 32px; padding: 0 }
.key li {
  display: grid; grid-template-columns: 24px 88px 1fr; align-items: center; gap: 8px;
  padding: 12px 0; border-bottom: 1px solid var(--rule-soft);
}
.key .g { width: 14px; height: 14px }
.key b { font-weight: 700 }
.key span { color: var(--ink-2) }
.margin { max-width: 28ch; padding: 16px; border: 1px solid var(--rule); font-size: 22px }

/* Sections */
.section { padding: 72px 0; border-top: 1px solid var(--rule) }
.section-head { display: flex; align-items: baseline; gap: 18px }
.intro { margin: 10px 0 36px; font-size: 11px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--ink-3) }

.pages { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px }
.card { display: flex; flex-direction: column; padding: 22px 20px 18px }
.card-foot { margin-top: auto; padding-top: 18px; font-size: 13px; color: var(--ink-2) }
.n { font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; color: var(--ink-2); min-width: 22px }
.n.boxed { color: var(--pencil); box-shadow: 0 0 0 1.5px var(--pencil); border-radius: 2px; padding: 0 3px; min-width: 0 }

.month, .index { list-style: none; margin: 0; padding: 0 }
.month li, .index li {
  display: grid; grid-template-columns: 30px 1px 1fr; gap: 10px; align-items: center;
  padding: 7px 0; border-bottom: 1px solid var(--rule-soft); font-size: 14px;
}
.month li::after, .index li::after { content: none }
.month li > .t, .index li > span:last-child { grid-column: 3 }
.month li::before, .index li::before { content: ""; grid-column: 2; grid-row: 1; width: 1px; height: 14px; background: var(--ink-3) }
.month li > .n, .index li > .n { grid-column: 1; grid-row: 1 }
.month li.q { opacity: .5 }
.month li.q::before { opacity: .3 }
.index li { padding: 10px 0 }
.index small { display: block; font-size: 11px; color: var(--ink-3) }

.future .tab {
  display: flex; justify-content: space-between; margin: 12px 0 4px; padding: 5px 10px;
  background: var(--rule-soft); border-left: 3px solid var(--ink); font-size: 12px; font-weight: 700;
}
.future .tab:first-child { margin-top: 0 }
.future .tab span { font-size: 10px; color: var(--ink-3) }
.future .row { display: flex; gap: 14px; align-items: center; padding: 5px 10px; border-bottom: 1px solid var(--rule-soft); font-size: 14px }

.habit p { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 10px; font-size: 14px }
.habit p span { font-size: 11px; font-weight: 600; letter-spacing: .08em; color: var(--ink-3); font-variant-numeric: tabular-nums }
.cells { display: grid; grid-template-columns: repeat(8, 1fr); gap: 4px }
.cells button {
  aspect-ratio: 1; display: grid; place-items: center; padding: 0; border: 1px solid var(--rule); border-radius: 1px;
  background: none; font-size: 9px; font-weight: 600; color: var(--ink-4); font-variant-numeric: tabular-nums;
  transition: background .2s, transform .12s;
}
.cells button:active { transform: scale(.88) }
.cells button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink) }
.cells button.today { border-color: var(--pencil) }
.cells button:disabled { cursor: default; opacity: .6 }

/* Sizes */
.sizes { display: grid; grid-template-columns: 1fr 1.5fr 2fr; gap: 24px; align-items: end; margin-top: 36px }
.sizes figure { margin: 0 }
.sizes figcaption { margin-top: 14px; font-size: 14px; color: var(--ink-2) }
.sizes figcaption b { display: block; color: var(--ink) }
.frame { display: flex; gap: 6px; padding: 8px; border: 1.5px solid var(--ink); border-radius: 10px; background: var(--paper) }
.frame i { display: block; border-radius: 2px }
.frame .col { flex: 1; background: repeating-linear-gradient(180deg, transparent 0 13px, var(--rule) 13px 14px) }
.frame .side { width: 22%; background: var(--rule-soft) }
.frame .week { width: 26%; background: repeating-linear-gradient(180deg, transparent 0 22px, var(--rule) 22px 23px); border-left: 1px solid var(--rule) }
.frame.phone { flex-direction: column; aspect-ratio: 9 / 18; max-width: 150px; border-radius: 22px; padding: 14px 10px }
.frame.phone .tabs { height: 12px; border-top: 1px solid var(--rule) }
.frame.tablet { aspect-ratio: 4 / 3; border-radius: 14px }
.frame.desk { aspect-ratio: 16 / 10; border-radius: 6px }

/* Privacy */
.privacy { display: grid; grid-template-columns: 1fr 1.2fr; gap: 48px; margin-top: 36px; align-items: start }
.big { font-size: clamp(30px, 4vw, 44px); line-height: 1.15 }
.plain { list-style: none; margin: 0; padding: 0 }
.plain li { padding: 14px 0; border-bottom: 1px solid var(--rule-soft); color: var(--ink-2) }
.plain b { color: var(--ink) }

/* Get it */
.get { padding-bottom: 96px }
.get-card { max-width: 640px; padding: 32px 28px; display: grid; gap: 14px }
.get-card p:not(.caps):not(.hand) { color: var(--ink-2); font-size: 17px }

footer {
  display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: baseline; padding-block: 28px 40px;
  border-top: 1px solid var(--rule); font-size: 13px; color: var(--ink-3);
}
footer a { color: var(--ink-2); text-decoration: underline; text-decoration-color: var(--rule); text-underline-offset: 3px }
footer a:hover { color: var(--ink) }
footer .wordmark { font-size: 18px; font-weight: 800; letter-spacing: -.045em; color: var(--ink) }

/* Phones */
@media (max-width: 820px) {
  .today-wrap, .privacy { grid-template-columns: 1fr; gap: 40px }
  .sizes { grid-template-columns: 1fr 1fr }
  .sizes figure:last-child { grid-column: 1 / -1 }
}
@media (max-width: 480px) {
  main, footer { padding-inline: 16px }
  .nav { inset: 10px 10px auto; padding-left: 12px }
  .hero { padding-top: 104px }
  .display-num { font-size: 96px }
  .today { padding: 22px 18px 18px }
  .key li { grid-template-columns: 24px 70px 1fr }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto }
  *, *::before, *::after { animation: none !important; transition: none !important }
}
