/* Vellune site. Palette and rounded titles follow the app (Brand/vellune-icon.svg,
   SPEC-design.md). System fonts only: a web font would mean a third-party request
   or a licence, and the privacy page says the site makes no such request. */

:root {
  --ink: #16211c;
  --muted: #56635c;
  --paper: #fbfaf5;
  --surface: #ffffff;
  --line: #e2e1d6;
  --green: #168655;
  --green-deep: #0f6b45;
  --link: #0f7a4c;
  --soft: #e4f2ea;
  --amber: #ffb02e;
  --plum: #6b3f8f;
  --blue: #0b72bd;
  --title: ui-rounded, "SF Pro Rounded", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --wide: 70rem;
  --measure: 40rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #edf1ee;
    --muted: #a7b2ac;
    --paper: #101512;
    --surface: #18201c;
    --line: #2b3530;
    --link: #55cf94;
    --soft: #17302a;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { color-scheme: light dark; -webkit-text-size-adjust: 100%; scroll-padding-top: 1rem; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 1.0625rem/1.6 var(--text);
}

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

a { color: var(--link); text-underline-offset: .18em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--amber); outline-offset: 2px; border-radius: 4px; }

h1, h2, h3 { font-family: var(--title); font-weight: 700; line-height: 1.12; letter-spacing: -.015em; margin: 0; text-wrap: balance; }
h2 { font-size: clamp(1.9rem, 4.2vw, 2.75rem); }
h3 { font-size: 1.25rem; letter-spacing: -.005em; }
p { margin: 0; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.h3-size { font-size: 1.25rem; letter-spacing: -.005em; }
.page p.spaced { margin-top: 1rem; }

.skip { position: absolute; left: -999px; top: .5rem; background: var(--surface); color: var(--ink); padding: .5rem 1rem; z-index: 3; }
.skip:focus { left: .5rem; }

.wrap { width: min(100% - 2.5rem, var(--wide)); margin-inline: auto; }

/* Header. Sits on the page colour; the hero's own green begins under it on inner
   pages, and it takes the hero's colour on the home page. */
.site-header { padding-block: 1rem; }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.5rem; }
.brand { display: inline-flex; align-items: center; gap: .625rem; font: 700 1.25rem var(--title); color: inherit; text-decoration: none; }
.brand img { width: 2rem; height: 2rem; border-radius: 22.5%; }
.site-nav { display: flex; flex-wrap: wrap; gap: .25rem 1.25rem; margin-inline-start: auto; font-size: .9688rem; }
.site-nav a { color: inherit; text-decoration: none; padding-block: .25rem; }
.site-nav a:hover, .site-nav a[aria-current] { text-decoration: underline; text-underline-offset: .3em; }

.store {
  display: inline-block;
  padding: .75rem 1.375rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--paper);
  font: 600 1rem var(--title);
  text-decoration: none;
}
.store:hover { opacity: .88; }
.store-small { padding: .4rem .9rem; font-size: .9063rem; }

/* Home hero: the app's coloured journal band, at the scale of a page. */
.home-top { background: var(--green-deep); color: #fff; position: relative; overflow: hidden; }
.home-top .store { background: var(--amber); color: #2a1c00; }
.ribbon {
  position: absolute;
  top: 0;
  /* Just past the logo, in the gap the header leaves before the nav. */
  left: calc(50% - 35rem + 10rem);
  width: 2.75rem;
  height: 6.5rem;
  background: var(--amber);
  clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 86%, 0 100%);
}
.hero { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 3rem; align-items: end; padding-block: clamp(3rem, 8vw, 6rem) 0; position: relative; }
.hero-text { padding-bottom: clamp(3rem, 7vw, 5.5rem); }
.hero h1 { font-size: clamp(2.875rem, 7.4vw, 5.25rem); line-height: 1.02; letter-spacing: -.025em; }
.hero .lead { margin-top: 1.5rem; max-width: 33rem; font-size: clamp(1.125rem, 2vw, 1.3125rem); line-height: 1.5; }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.25rem; }
.hero-cta small { font-size: .9375rem; opacity: .9; }
.facts { list-style: none; margin: 2rem 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: .375rem 1.5rem; font-weight: 500; }
.facts li { position: relative; padding-left: 1rem; }
.facts li::before { content: ""; position: absolute; left: 0; top: .55em; width: .5rem; height: .5rem; border-radius: 50%; background: var(--amber); }
.hero .phone { margin-bottom: -5rem; }

/* Feature rows: text beside a coloured stage, the phone cut by the stage's edge
   as the hero's is cut by the band. */
.feature { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: clamp(2rem, 6vw, 5rem); align-items: center; padding-block: clamp(3rem, 7vw, 5.5rem); }
.feature.flip > .stage { order: -1; }
.feature p { margin-top: 1rem; max-width: 30rem; }
.feature ul { margin: 1.25rem 0 0; padding: 0; list-style: none; max-width: 30rem; }
.feature ul li { padding-block: .5rem; border-top: 1px solid var(--line); }
.feature .more { display: inline-block; margin-top: 1.25rem; font-weight: 600; }
.stage { border-radius: 2rem; height: 32rem; overflow: hidden; display: flex; justify-content: center; align-items: flex-start; padding-top: 3rem; }
.stage-blue { background: #cfe5f5; }
.stage-amber { background: #fde7bc; }
.stage-plum { background: #e6daf0; }
.stage-green { background: #cfe9da; }

/* Phone and Mac illustrations: the app's layout in HTML, so they stay sharp and
   carry no real journal. Always light: they show the app, not the page's theme. */
.phone {
  flex: none;
  width: min(18.5rem, 100%);
  color: #16211c;
  background: #fff;
  border: .5rem solid #16211c;
  border-radius: 2.75rem;
  overflow: hidden;
  font-size: .8125rem;
  line-height: 1.35;
  height: 37rem;
  position: relative;
}
.phone::before { content: ""; position: absolute; z-index: 1; top: .5rem; left: 50%; width: 5.25rem; height: 1.375rem; margin-left: -2.625rem; border-radius: 1rem; background: #16211c; }
.band { padding: 2.75rem 1rem .75rem; color: #fff; background: var(--blue); }
.band-green { background: var(--green); }
.band-plum { background: var(--plum); }
.band strong { display: block; font: 700 1.625rem/1.1 var(--title); }
.band span { font-size: .75rem; opacity: .92; }
.segments { display: flex; margin-top: .625rem; padding: .125rem; border-radius: 1rem; background: rgb(255 255 255 / .16); font-size: .75rem; text-align: center; }
.segments i { flex: 1; font-style: normal; padding: .2rem 0; border-radius: 1rem; }
.segments i.on { background: rgb(255 255 255 / .3); font-weight: 600; }
.month { padding: .875rem 1rem .375rem; font: 700 1rem var(--title); color: #6d7671; }
.card { padding: 0 .75rem .75rem; }
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; border-radius: .75rem; overflow: hidden; position: relative; }
.tiles img { width: 100%; height: 5.25rem; object-fit: cover; }
.chip { position: absolute; left: .4rem; top: .4rem; background: #fff; border-radius: .5rem; padding: .15rem .45rem; text-align: center; font: 700 1rem/1.05 var(--title); color: var(--blue); }
.chip small { display: block; font-size: .5625rem; color: #6d7671; }
.count { position: absolute; right: .375rem; bottom: .375rem; background: rgb(0 0 0 / .62); color: #fff; font-size: .625rem; padding: .05rem .4rem; border-radius: .5rem; }
.card b, .row b { display: block; margin-top: .375rem; font: 700 .9375rem/1.2 var(--title); }
.card p, .row p { margin: .125rem 0 0; color: #6d7671; }
.meta { display: block; margin-top: .125rem; font-size: .6875rem; color: #6d7671; }
.row { display: grid; grid-template-columns: 2.75rem 1fr; gap: .625rem; padding: .25rem .75rem .625rem; }
.row b { margin-top: 0; }
.day { border-radius: .5rem; background: #dcebf6; padding: .25rem 0; text-align: center; font: 700 1.0625rem/1.05 var(--title); color: var(--blue); height: 2.75rem; }
.day small { display: block; font-size: .5625rem; color: #6d7671; }
.day-green { background: var(--soft); color: var(--green); }
.day-plum { background: #e9dff2; color: var(--plum); }
.row p .hit { color: #16211c; }
/* The search field sits under the band here: the stage crops the phone's bottom, where iOS 26 puts it. */
.searchbar { margin: .625rem .75rem .125rem; display: flex; align-items: center; gap: .4rem; padding: .5rem .75rem; border-radius: 1.25rem; background: #f1f2f1; box-shadow: 0 1px 4px rgb(0 0 0 / .12); color: #16211c; }
.searchbar::before { content: ""; width: .7rem; height: .7rem; border: 2px solid #6d7671; border-radius: 50%; flex: none; }
.searchbar .token { padding: .1rem .5rem; border-radius: .75rem; background: var(--green); color: #fff; font-size: .75rem; font-weight: 600; }
.grid-media { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.grid-media img { width: 100%; height: 5.5rem; object-fit: cover; }
.cover { position: relative; height: 15rem; }
.cover img { width: 100%; height: 100%; object-fit: cover; }
.cover div { position: absolute; inset: auto 0 0; padding: 2rem 1rem .75rem; color: #fff; background: linear-gradient(transparent, rgb(0 0 0 / .62)); }
.cover strong { display: block; font: 700 1.3125rem/1.1 var(--title); }
.cover span { font-size: .6875rem; }
.page { padding: .875rem 1rem; }
.page h4 { margin: 0 0 .5rem; font: 700 1.125rem/1.15 var(--title); }
.page p { margin: 0 0 .5rem; }
.page blockquote { margin: 0 0 .5rem; padding-left: .625rem; border-left: 3px solid var(--blue); color: #56635c; }
.check { display: flex; gap: .4rem; align-items: center; margin-bottom: .2rem; }
.check i { flex: none; width: .875rem; height: .875rem; border-radius: .2rem; border: 1.5px solid #8b938f; }
.check i.on { background: var(--blue); border-color: var(--blue); }

.mac-section { padding-block: clamp(2.5rem, 6vw, 4.5rem); background: var(--soft); }
.mac-head { max-width: var(--measure); margin-bottom: 2.5rem; }
.mac-head p { margin-top: 1rem; }
.mac { display: grid; grid-template-columns: 11rem 16rem minmax(0, 1fr); height: 28rem; border-radius: .875rem; overflow: hidden; color: #16211c; background: #fff; font-size: .8125rem; line-height: 1.35; border: 1px solid #c9cfc9; box-shadow: 0 1.25rem 3rem -1.5rem rgb(10 40 25 / .5); }
.mac-side { background: #eef1ee; padding: 1rem .625rem; border-right: 1px solid #dde1dd; }
.mac-dots { display: flex; gap: .375rem; margin: 0 .25rem 1.125rem; }
.mac-dots i { width: .75rem; height: .75rem; border-radius: 50%; background: #c6cbc7; }
.mac-side em { display: block; font-style: normal; font-size: .6875rem; font-weight: 600; color: #6d7671; margin: .875rem .375rem .25rem; }
.side-item { display: flex; align-items: center; gap: .5rem; padding: .25rem .375rem; border-radius: .375rem; }
.side-item.on { background: #d9e6f1; }
.side-item i { flex: none; width: 1.1875rem; height: 1.1875rem; border-radius: .3rem; background: var(--green); color: #fff; font: 700 .6875rem/1.1875rem var(--title); text-align: center; }
.side-item i.b { background: var(--blue); }
.side-item i.p { background: var(--plum); }
.side-item i.o { background: #c2540a; }
.mac-list { border-right: 1px solid #e3e6e3; overflow: hidden; }
.mac-list .card { padding-top: .75rem; }
.mac-list .tiles img { height: 4.25rem; }
.mac-entry { overflow: hidden; }
.mac-entry .cover { height: 11.5rem; }

/* Recap */
.recap { padding-block: clamp(3rem, 7vw, 5.5rem); }
.recap-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 2.5rem clamp(2rem, 4vw, 3.5rem); margin-top: 2.5rem; }
.recap-grid h3 { padding-bottom: .5rem; border-bottom: 2px solid var(--ink); }
.recap-grid ul { list-style: none; margin: .25rem 0 0; padding: 0; font-size: 1rem; }
.recap-grid li { padding-block: .4375rem; border-bottom: 1px solid var(--line); }
.tag { display: inline-block; margin-inline-start: .25rem; padding: 0 .4rem; border-radius: .3rem; background: var(--soft); color: var(--link); font: 700 .75rem/1.4 var(--title); vertical-align: .05em; }
.note { margin-top: 1.5rem; color: var(--muted); font-size: .9375rem; }

/* Price blocks */
.pricing { padding-block: clamp(3rem, 7vw, 5rem); border-top: 1px solid var(--line); }
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); margin-top: 2.5rem; border-block: 2px solid var(--ink); }
.plan { padding: 1.5rem 1.5rem 1.75rem 0; }
.plan + .plan { padding-left: 1.5rem; border-left: 1px solid var(--line); }
.plan .price { display: block; margin-top: .625rem; font: 700 2.25rem/1.1 var(--title); letter-spacing: -.02em; }
.plan .price small { font-size: 1rem; font-weight: 600; letter-spacing: 0; }
.plan p { margin-top: .625rem; color: var(--muted); font-size: 1rem; }

/* Tables */
.table-wrap { overflow-x: auto; margin-top: 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 1rem; }
th, td { text-align: left; vertical-align: top; padding: .75rem 1rem .75rem 0; border-bottom: 1px solid var(--line); }
thead th { font: 700 1.0625rem var(--title); border-bottom: 2px solid var(--ink); }
tbody th { font-weight: 500; }
.group th { padding-top: 1.75rem; font: 700 1.125rem var(--title); border-bottom: 2px solid var(--ink); }
.col-a { min-width: 11rem; }

/* Band linking to another page */
.pointer { background: var(--plum); color: #fff; padding-block: clamp(3rem, 7vw, 5rem); }
.pointer a { color: #fff; font-weight: 600; }
.pointer p { margin-top: 1rem; max-width: var(--measure); }

/* FAQ */
.faq { padding-block: clamp(3rem, 7vw, 5rem); }
.faq details { border-bottom: 1px solid var(--line); max-width: 48rem; }
.faq h2 { margin-bottom: 1.5rem; }
.faq summary { cursor: pointer; padding-block: 1rem; font: 600 1.125rem/1.3 var(--title); }
.faq details p { padding-bottom: 1.125rem; }

.download { background: var(--green-deep); color: #fff; padding-block: clamp(3.5rem, 8vw, 6rem); }
.download .store { margin-top: 1.5rem; background: var(--amber); color: #2a1c00; }
.download p { margin-top: 1rem; max-width: var(--measure); }
.download a:not(.store) { color: #fff; }

/* Inner pages */
.page-head { padding-block: clamp(2.5rem, 7vw, 5rem) clamp(1.5rem, 4vw, 2.5rem); }
.page-head h1 { font-size: clamp(2.5rem, 6.4vw, 4.25rem); line-height: 1.04; letter-spacing: -.02em; }
.page-head .lead { margin-top: 1.25rem; max-width: 42rem; font-size: clamp(1.125rem, 2vw, 1.25rem); line-height: 1.5; }
.page-head .date { margin-top: 1rem; color: var(--muted); font-size: .9375rem; }

.prose { padding-bottom: clamp(3rem, 7vw, 5rem); }
.prose > * { max-width: var(--measure); }
.prose > .table-wrap { max-width: 52rem; }
.prose h2 { font-size: 1.625rem; margin-top: 2.75rem; }
.prose h3 { margin-top: 1.75rem; }
.prose p, .prose ul, .prose ol { margin-top: 1rem; }
.prose ul, .prose ol { padding-left: 1.25rem; }
.prose li + li { margin-top: .375rem; }
.callout { margin-top: 1.5rem; padding: 1rem 1.25rem; border-left: 4px solid var(--green); background: var(--soft); }
.callout p:first-child { margin-top: 0; }
mark.todo { background: var(--amber); color: #2a1c00; padding: 0 .3em; border-radius: .2em; font-weight: 600; }

.side-by-side { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(2rem, 5vw, 4rem); padding-block: 1rem clamp(2rem, 5vw, 3.5rem); }
.side-by-side h2 { font-size: 1.625rem; }
.side-by-side ul { margin: 1rem 0 0; padding: 0; list-style: none; }
.side-by-side li { padding-block: .625rem; border-top: 1px solid var(--line); }
.section-gap { padding-block: clamp(2rem, 5vw, 3.5rem); }
.section-gap > p { margin-top: 1rem; max-width: var(--measure); }
.sources { margin-top: 2rem; color: var(--muted); font-size: .9375rem; max-width: 52rem; }
.sources ul { margin: .5rem 0 0; padding-left: 1.25rem; }

.mailto { display: inline-block; margin-top: 1.5rem; font: 700 clamp(1.375rem, 4vw, 2rem) var(--title); overflow-wrap: anywhere; }

/* Footer */
.site-footer { padding-block: 3rem; border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.foot-grid { display: grid; grid-template-columns: 1.6fr repeat(2, 1fr); gap: 2rem; }
.site-footer .brand { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li { padding-block: .1875rem; }
.site-footer a { color: inherit; }
.foot-title { color: var(--ink); font-weight: 600; margin-bottom: .375rem; }
.legal-line { margin-top: 2rem; font-size: .8438rem; max-width: 52rem; }

/* Below this the nav reaches the logo and the ribbon would cross it. */
@media (max-width: 72rem) {
  .ribbon { display: none; }
}

@media (max-width: 58rem) {
  .site-nav { order: 3; width: 100%; margin-inline-start: 0; }
  .site-header .store { margin-inline-start: auto; }
  .hero { grid-template-columns: minmax(0, 1fr); justify-items: center; gap: 0; }
  .hero-text { justify-self: stretch; padding-bottom: 3rem; }
  .hero .phone { height: 26rem; margin-bottom: 0; border-bottom: 0; border-radius: 2.75rem 2.75rem 0 0; }
  .feature { grid-template-columns: minmax(0, 1fr); }
  .feature.flip > .stage { order: 0; }
  .stage { height: 26rem; padding-top: 2rem; }
  .mac { grid-template-columns: 9rem minmax(0, 1fr); }
  .mac-entry { display: none; }
  .recap-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 40rem) {
  .recap-grid, .plans, .side-by-side, .foot-grid { grid-template-columns: 1fr; }
  .plan { padding: 1.25rem 0; }
  .plan + .plan { padding-left: 0; border-left: 0; border-top: 1px solid var(--line); }
  .mac { grid-template-columns: 1fr; }
  .mac-side { display: none; }
  th, td { padding-right: .625rem; }
  .col-a { min-width: 7.5rem; }
}

/* On the narrowest phones the header's button can't sit beside the logo. */
@media (max-width: 24rem) {
  .site-header .store { display: none; }
}
