/* Nautile's site. Colours, radii and spacing come from the app's design/tokens.json:
   paper and ink for the page, the deep for the opening panel, ember for links.
   Type follows the app's rule: New York for the words of an entry, SF for everything Nautile says. */

:root {
  --bg: #F5F1EA;
  --surface: #FFFCF7;
  --sunk: #ECE5D9;
  --ink: #16212C;
  --ink2: #5A6672;
  --ink3: #6F7882;
  --hairline: #16212C1F;
  --link: #B3421E;
  --deep-top: #10243A;
  --deep-bottom: #08121C;
  --deep-edge: transparent;
  --deep-text: #F1EADF;
  --deep-text2: #9FB0C0;
  --mood-calm: #C7AE6E;
  --dot-ring: #16212C;
  --ui: -apple-system, BlinkMacSystemFont, "SF Pro Text", system-ui, "Segoe UI", Roboto, sans-serif;
  --words: ui-serif, "New York", "Iowan Old Style", Georgia, serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0E1823;
    --surface: #16222F;
    --sunk: #1F2C3B;
    --ink: #EFE9DF;
    --ink2: #A9B1B9;
    --ink3: #8A949E;
    --hairline: #EFE9DF24;
    --link: #EE7A4E;
    --deep-top: #0A1826;
    --deep-bottom: #04090F;
    --deep-edge: #F1EADF2E;
    --mood-calm: #CDB577;
    --dot-ring: #0E1823;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 17px/26px var(--ui);
}

main { max-width: 640px; margin: 0 auto; padding: 20px 20px 64px; }
@media (min-width: 720px) { main { padding: 32px 32px 64px; } }

a { color: var(--link); text-underline-offset: 2px; }
a:focus-visible { outline: 2px solid var(--link); outline-offset: 3px; border-radius: 4px; }

/* Top bar: the icon and name go home; the two pages App Store review asks for sit on the right. */
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 32px; min-height: 44px; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 20px; line-height: 25px; }
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.top nav { display: flex; gap: 4px; }
.top nav a { color: var(--ink2); text-decoration: none; font-size: 15px; line-height: 20px; padding: 12px 8px; }
.top nav a[aria-current="page"] { color: var(--ink); font-weight: 600; }

h1 { font-size: 34px; line-height: 41px; font-weight: 700; margin: 0 0 8px; letter-spacing: -0.01em; }
h2 { font-size: 20px; line-height: 25px; font-weight: 600; margin: 40px 0 8px; scroll-margin-top: 16px; }
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 22px; }
li + li { margin-top: 6px; }
.lead { font-size: 19px; line-height: 28px; margin-bottom: 24px; }
.meta { color: var(--ink2); font-size: 15px; line-height: 20px; margin-bottom: 20px; }
.note { color: var(--ink2); font-size: 15px; line-height: 22px; }
.ui { font-weight: 600; }

/* Home: the opening panel is the app's deep, where an entry is recorded. */
.deep {
  background: linear-gradient(var(--deep-top), var(--deep-bottom));
  border: 1px solid var(--deep-edge);
  color: var(--deep-text);
  border-radius: 34px;
  padding: 24px 24px 32px;
  display: grid;
  gap: 8px;
}
.deep img { width: 176px; height: 176px; justify-self: center; margin-bottom: -16px; }
.deep .prompt { font: italic 17px/22px var(--words); color: var(--deep-text2); margin: 0; }
.deep h1 { font-family: var(--words); font-weight: 400; font-size: 30px; line-height: 36px; margin: 0; letter-spacing: 0; }
.deep p:last-child { color: var(--deep-text); margin: 4px 0 0; }
@media (min-width: 600px) {
  .deep { grid-template-columns: 1fr 200px; align-items: center; padding: 32px 32px 36px; column-gap: 24px; }
  .deep img { width: 200px; height: 200px; margin: 0; grid-column: 2; grid-row: 1 / span 3; }
  .deep h1 { font-size: 36px; line-height: 42px; }
}

.steps { list-style: none; padding: 0; margin: 32px 0 0; display: grid; gap: 20px; counter-reset: step; }
.steps li { counter-increment: step; margin: 0; display: grid; grid-template-columns: 32px 1fr; column-gap: 12px; }
.steps li::before {
  content: counter(step);
  width: 28px; height: 28px; border-radius: 999px;
  background: var(--sunk); color: var(--ink2);
  font-size: 13px; line-height: 28px; font-weight: 600; text-align: center;
  grid-row: span 2; margin-top: 0;
}
.steps b { font-weight: 600; }
.steps span { color: var(--ink2); }

/* An entry as the journal lists it: time, title and summary in New York, the mood as a dot. */
.entry { margin: 32px 0 0; }
.entry figcaption { font-size: 15px; line-height: 20px; font-weight: 600; color: var(--ink2); margin-bottom: 8px; }
.entry .row {
  background: var(--surface); border: 1px solid var(--hairline); border-radius: 26px;
  padding: 16px 20px; display: grid; grid-template-columns: 52px 1fr; column-gap: 12px;
}
.entry .time { font-size: 13px; line-height: 22px; color: var(--ink3); font-variant-numeric: tabular-nums; }
.entry .title { font: 600 17px/22px var(--words); margin: 0 0 4px; }
.entry .summary { font: 15px/20px var(--words); color: var(--ink2); margin: 0 0 8px; }
.entry .mood { font-size: 13px; line-height: 18px; color: var(--ink2); display: flex; align-items: center; gap: 6px; margin: 0; }
.dot { width: 10px; height: 10px; border-radius: 999px; background: var(--mood-calm); box-shadow: 0 0 0 1.5px var(--dot-ring); display: inline-block; }

.callout { background: var(--sunk); border-radius: 24px; padding: 20px; margin: 32px 0 0; }
.callout h2 { margin: 0 0 4px; font-size: 17px; line-height: 22px; }
.callout p:last-child { margin-bottom: 0; }

/* A plain list of links, like a settings group. */
.links { background: var(--surface); border: 1px solid var(--hairline); border-radius: 26px; padding: 0 20px; margin: 32px 0 0; }
.links a { display: flex; justify-content: space-between; align-items: center; min-height: 52px; font-weight: 600; text-decoration: none; }
.links a::after { content: "\203A"; color: var(--ink3); font-size: 22px; font-weight: 400; }
.links a + a { border-top: 1px solid var(--hairline); }

/* Privacy: the four answers first, each linking to its full section. */
.glance { background: var(--surface); border: 1px solid var(--hairline); border-radius: 24px; padding: 4px 20px; margin: 0 0 8px; }
.glance div { padding: 14px 0; }
.glance div + div { border-top: 1px solid var(--hairline); }
.glance dt { font-size: 13px; line-height: 18px; font-weight: 600; color: var(--ink2); margin-bottom: 2px; }
.glance dd { margin: 0; }
@media (min-width: 600px) {
  .glance div { display: grid; grid-template-columns: 140px 1fr; column-gap: 16px; }
  .glance dt { font-size: 15px; line-height: 26px; margin: 0; }
}

footer { margin-top: 56px; padding-top: 20px; border-top: 1px solid var(--hairline); color: var(--ink2); font-size: 14px; line-height: 20px; }
footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; margin-bottom: 8px; }
footer a { color: var(--ink2); }
footer p { margin: 0; }
.note.after { margin-top: 24px; }
