/* Ledger's landing page (ledger.imemyself.dev for a stranger, /welcome for anyone). Its own sheet: nothing here is
   the app's, and the app loads none of it. No other origin, no inline style. Soul sheet: docs/landing-pages/ledger.md.
   Every size is rem, and from a laptop up the root grows with the window, so a big monitor shows the same page larger. */

/* Newsreader (SIL OFL, fonts/OFL.txt), self-hosted, the version in the file name. Inter is the app's own file. */
@font-face { font-family: "Newsreader"; font-style: normal; font-weight: 400 700; font-display: swap; src: url("fonts/newsreader-v26-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Newsreader"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/newsreader-italic-v26-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter"; font-style: normal; font-weight: 400 800; font-display: swap; src: url("/fonts/inter-var-latin.woff2") format("woff2"); unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- bones: scale, one column, the floating bar, section shape, the close, the scrollbar ---------- */
*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  font-size: 16px;
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
  background: var(--ground);
}
/* From laptop size up the whole page grows with the window, by width and height together. */
@media (min-width: 1024px) {
  html { font-size: clamp(16px, min(1.1111vw, 1.7778vh), 30px); }
}
body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote { margin: 0; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; -webkit-tap-highlight-color: transparent; }
:focus-visible { outline: 2px solid var(--focus, currentColor); outline-offset: 3px; border-radius: 0.375rem; }

:root {
  --column: 70rem;
  --pad: clamp(1.25rem, 4vw, 2.5rem);
  --bar-h: 3.25rem;
  --bar-top: 0.75rem;
  --ease: cubic-bezier(0.32, 0.72, 0, 1);
}

/* The page's own scrollbar (a mouse only; touch screens keep theirs). Sizes in px so it never grows on a big screen. */
@media (hover: hover) and (pointer: fine) {
  html::-webkit-scrollbar { width: 12px; }
  html::-webkit-scrollbar-track { background: var(--sb-lane, var(--ground)); }
  html::-webkit-scrollbar-thumb { min-height: 48px; border: 3px solid transparent; border-radius: 999px; background: var(--sb-thumb) content-box; }
  html::-webkit-scrollbar-thumb:hover { background: var(--sb-thumb-hover) content-box; }
  html::-webkit-scrollbar-thumb:active { background: var(--sb-thumb-active, var(--sb-thumb-hover)) content-box; }
  html::-webkit-scrollbar-button { display: none; }
  @supports not selector(::-webkit-scrollbar) {
    html { scrollbar-width: thin; scrollbar-color: var(--sb-thumb) var(--sb-lane, var(--ground)); }
  }
}

.wrap { width: min(100% - 2 * var(--pad), var(--column)); margin-inline: auto; }

/* ---------- the bar: full width at the top, a centred pill once the page moves ---------- */
.bar {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  padding: var(--bar-top) var(--pad) 0;
  pointer-events: none;
}
.bar-in {
  pointer-events: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.75rem;
  width: 100%; max-width: var(--column); height: var(--bar-h);
  margin-inline: auto; padding-inline: 0;
  border: 1px solid transparent; border-radius: 999px;
  transition: max-width 0.45s var(--ease), padding 0.45s var(--ease), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}
.scrolled .bar-in {
  max-width: 26.5rem;
  padding-inline: 1.125rem 0.4375rem;
  background: var(--pill-bg);
  border-color: var(--pill-line);
  box-shadow: var(--pill-shadow, 0 0.5rem 1.75rem rgb(0 0 0 / 0.12));
  -webkit-backdrop-filter: blur(16px) saturate(1.4);
  backdrop-filter: blur(16px) saturate(1.4);
}
.brand { display: inline-flex; align-items: center; gap: 0.5625rem; font-family: var(--display); font-weight: var(--brand-weight, 700); font-size: 1.1875rem; letter-spacing: -0.02em; min-height: 2.75rem; color: var(--bar-ink, inherit); }
.brand svg { width: 1.5rem; height: 1.5rem; }
.bar-links { display: flex; align-items: center; gap: 1.5rem; }
.signin { display: inline-flex; align-items: center; min-height: 2.75rem; font-weight: 600; font-size: 0.9375rem; color: var(--bar-ink, inherit); white-space: nowrap; }
@media (hover: hover) { .signin:hover { text-decoration: underline; text-underline-offset: 0.25em; } }
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  height: 2.375rem; padding-inline: 1.125rem;
  border-radius: 999px;
  background: var(--btn-bg); color: var(--btn-fg);
  font-weight: 600; font-size: 0.9375rem; letter-spacing: -0.005em; white-space: nowrap;
  transition: transform 0.16s var(--ease), opacity 0.16s ease;
}
.btn:active { transform: scale(0.97); }
@media (hover: hover) { .btn:hover { opacity: 0.88; } }
.btn-lg { height: 3.25rem; padding-inline: 1.75rem; font-size: 1.0625rem; }
@media (max-width: 760px) {
  .bar-in { gap: 1.25rem; }
  .bar-links { gap: 1.25rem; }
  .scrolled .bar-in { max-width: 100%; }
}
/* Three things do not fit a narrow phone with room between them: Sign in moves to the close. */
@media (max-width: 384px) { .bar .signin { display: none; } }

/* ---------- sections: a centred headline, then one object ---------- */
.sec { padding-block: clamp(4.5rem, 10vw, 8.5rem); }
.head { max-width: 46rem; margin: 0 auto clamp(2rem, 4.5vw, 3.5rem); text-align: center; }
.head h2 { font-family: var(--display); font-weight: var(--h-weight, 700); font-size: clamp(1.875rem, 4.4vw, 3.25rem); line-height: 1.08; letter-spacing: var(--h-track, -0.03em); text-wrap: balance; }
.head p { margin: 1rem auto 0; max-width: 36rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.1875rem); line-height: 1.5; text-wrap: pretty; }
.chunk { margin-inline: auto; }
.chunk-mid { max-width: 50rem; }
.chunk-small { max-width: 34rem; }

/* ---------- small facts, as ruled lines ---------- */
.lines { border-top: 1px solid var(--line); max-width: 54rem; margin-inline: auto; }
.lines li { display: grid; grid-template-columns: minmax(0, 17rem) minmax(0, 1fr); gap: 0.25rem 2.5rem; align-items: baseline; padding: 1.25rem 0.25rem; border-bottom: 1px solid var(--line); }
.lines b { font-family: var(--display); font-weight: var(--h-weight, 700); font-size: 1.1875rem; letter-spacing: -0.015em; }
.lines span { color: var(--muted); font-size: 1.0625rem; text-wrap: pretty; }
@media (max-width: 700px) { .lines li { grid-template-columns: minmax(0, 1fr); padding: 1.125rem 0; } .lines span { font-size: 1rem; } }

/* ---------- the close ---------- */
.close { padding-block: clamp(5rem, 11vw, 9rem) clamp(2.5rem, 5vw, 4rem); text-align: center; border-top: 1px solid var(--line); }
.close h2 { font-family: var(--display); font-weight: var(--h-weight, 700); font-size: clamp(2.25rem, 6vw, 4.5rem); line-height: 1.02; letter-spacing: var(--h-track, -0.035em); text-wrap: balance; }
.close p { margin: 1.25rem auto 0; max-width: 34rem; color: var(--muted); font-size: clamp(1rem, 1.5vw, 1.1875rem); text-wrap: pretty; }
.close-go { margin-top: 2.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 0.75rem 1.75rem; }
.close-go .signin { color: inherit; }
.foot { margin-top: clamp(4rem, 8vw, 6.5rem); display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 1.75rem; color: var(--subtle); font-size: 0.8125rem; }
.foot a { text-decoration: underline; text-underline-offset: 0.2em; text-decoration-color: color-mix(in oklab, currentColor 40%, transparent); }

/* ---------- a row of choices ---------- */
.seg { display: inline-flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: var(--seg-bg); }
.seg button { height: 2.75rem; padding-inline: 1.125rem; border-radius: 999px; font-weight: 600; font-size: 0.9375rem; color: var(--seg-ink); white-space: nowrap; transition: background-color 0.2s ease, color 0.2s ease; }
.seg button[aria-pressed="true"] { background: var(--seg-on); color: var(--seg-on-ink); }

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

/* ---------- pieces of Ledger, drawn in the page in the app's own tokens (src/index.css, the light theme) ----------
   Sizes in rem so they scale with the page. Inter is the app's face and lives only in here. */
.ui {
  --u-surface: #FFFFFF; --u-field: #F1F3F2; --u-field-strong: #E6E9E8; --u-ink: #151917; --u-muted: #667069; --u-faint: #9AA39E; --u-rule: #E6EAE8;
  --u-pill: #151917; --u-on-pill: #FFFFFF; --u-accent: #2F6BE6; --u-accent-soft: #E7EEFC;
  --u-pos: #1E8A5A; --u-pos-soft: #DFF3E8; --u-neg: #C9463D; --u-neg-soft: #FAE3E1; --u-warn: #A66A12; --u-warn-soft: #FBEFD9; --u-gold: #B8860B; --u-gold-soft: #FBF1D6;
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; color: var(--u-ink); font-size: 0.9375rem; line-height: 1.4; text-align: left;
}
.ui .num, .ui-chart svg text { font-variant-numeric: tabular-nums; }
.ui .pos { color: var(--u-pos); }
.ui .neg { color: var(--u-neg); }
.ui-stack { display: grid; }
.ui-stack > [data-v] { grid-area: 1 / 1; min-width: 0; visibility: hidden; }
.ui-stack > [data-v].is-on { visibility: visible; }
.ui-card { background: var(--u-surface); border-radius: 1.25rem; box-shadow: 0 1px 2px rgb(0 0 0 / 0.04); }

/* ---------- one trade: its head, its chart, what happened after, and the journal ---------- */
.ui-trade {
  display: grid; grid-template-columns: minmax(0, 1fr) 19rem; grid-template-rows: auto minmax(0, 1fr) auto;
  grid-template-areas: "head journal" "chart journal" "note journal"; column-gap: 1.5rem; padding: 1.25rem; min-height: 0;
}
.ui-trade-h { grid-area: head; display: flex; align-items: center; gap: 0.75rem; min-width: 0; padding-left: 0.25rem; }
.ui-tile { flex: none; display: grid; place-items: center; width: 2.5rem; height: 2.5rem; border-radius: 0.75rem; background: var(--u-gold-soft); color: var(--u-gold); }
.ui-tile svg { width: 1.375rem; height: 1.375rem; fill: currentColor; }
.ui-trade-t { flex: 1; min-width: 0; }
.ui-trade-t b { font-size: 1.1875rem; font-weight: 700; letter-spacing: -0.015em; white-space: nowrap; }
.ui-trade-t b i { font-style: normal; }
.ui-trade-t small { margin-top: 0.0625rem; color: var(--u-muted); font-size: 0.8125rem; white-space: nowrap; }
.ui-trade-r { flex: none; text-align: right; }
.ui-trade-r { justify-items: end; }
.ui-trade-r .ui-stack { justify-items: end; }
.ui-trade-r b { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; line-height: 1.15; }
.ui-trade-r small { color: var(--u-muted); font-size: 0.8125rem; white-space: nowrap; }
.ui-chart { grid-area: chart; position: relative; min-height: 9rem; margin-top: 0.75rem; }
.ui-chart svg { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; }
.ui-note { grid-area: note; margin: 0.625rem 0 0 0.25rem; color: var(--u-muted); font-size: 0.875rem; text-wrap: pretty; }
.ui-journal { grid-area: journal; align-self: stretch; display: flex; flex-direction: column; margin: 0; padding: 0.875rem 1.125rem; border-radius: 0.875rem; background: var(--u-field); }
.ui-journal h3 { margin-bottom: 0.25rem; font-size: 0.9375rem; font-weight: 700; }
.ui-journal > div { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; padding: 0.5625rem 0; border-bottom: 1px solid var(--u-field-strong); font-size: 0.875rem; }
.ui-journal > div:last-child { border-bottom: 0; }
.ui-journal > div > span { flex: none; color: var(--u-muted); }
.ui-journal > div > b { min-width: 0; font-weight: 600; text-align: right; justify-items: end; }
.ui-journal > .long { display: block; }
.ui-journal > .long > span { display: block; }
.ui-journal > .long > b { margin-top: 0.1875rem; font-weight: 500; text-align: left; justify-items: start; text-wrap: pretty; }
.ui-chip { display: inline-block; padding: 0.125rem 0.5625rem; border-radius: 999px; font-size: 0.75rem; font-weight: 600; white-space: nowrap; }
.ui-chip.bad { background: var(--u-neg-soft); color: var(--u-neg); }
.ui-chip.good { background: var(--u-pos-soft); color: var(--u-pos); }
.ui-chip.warn { background: var(--u-warn-soft); color: var(--u-warn); }

@media (max-width: 900px) {
  .ui-trade { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto minmax(0, 1fr) auto auto; grid-template-areas: "head" "chart" "note" "journal"; padding: 0.875rem; }
  .ui-trade-h { padding-left: 0; }
  .ui-tile { width: 2.25rem; height: 2.25rem; border-radius: 0.6875rem; }
  .ui-trade-t b { font-size: 1.0625rem; }
  .ui-trade-r b { font-size: 1.1875rem; }
  .ui-chart { margin-top: 0.5rem; }
  .ui-note { margin: 0.5rem 0 0; font-size: 0.8125rem; }
  .ui-journal { margin-top: 0.5rem; padding: 0.375rem 0.875rem; }
  .ui-journal h3, .ui-journal .j-conf, .ui-journal .j-state, .ui-journal .j-why, .ui-journal .j-mistakes { display: none; }
  .ui-journal > div { padding: 0.4375rem 0; font-size: 0.8125rem; }
}
@media (min-width: 600px) and (max-width: 900px) {
  .ui-journal .j-state, .ui-journal .j-mistakes, .ui-journal .j-why { display: flex; }
  .ui-journal > .j-why { display: block; }
}

/* narrow phones: the head keeps to one line */
@media (max-width: 400px) { .ui-trade-t .acct { display: none; } }
@media (max-width: 360px) {
  .ui-trade-h { gap: 0.5rem; }
  .ui-trade-t b { font-size: 0.9375rem; }
  .ui-trade-r b { font-size: 1.0625rem; }
}
@media (max-width: 340px) {
  .ui-trade .ui-tile { display: none; }
}

/* ---------- the page: white paper and a reading serif. What leads is a month of trading days; tap one and read it ---------- */
:root {
  --ground: #FFFFFF; --ink: #17191A; --muted: #5A625E; --subtle: #5A625E; --line: #E2E6E4;
  --font: "Newsreader", "Iowan Old Style", Georgia, serif; --display: var(--font);
  --h-weight: 500; --h-track: -0.022em; --brand-weight: 600;
  --pill-bg: rgb(255 255 255 / 0.88); --pill-line: rgb(23 25 26 / 0.1); --pill-shadow: 0 0.5rem 1.75rem rgb(23 25 26 / 0.1);
  --btn-bg: #17191A; --btn-fg: #FFFFFF; --bar-ink: #17191A; --focus: #2F6BE6;
  --pos: #1E8A5A; --pos-soft: #E3F4EB; --pos-mid: #BFE6D1; --neg: #C9463D; --neg-soft: #FBE7E5; --neg-mid: #F4C8C4; --blank: #F4F6F5;
  --sb-thumb: #CDD3D0; --sb-thumb-hover: #B3BBB7; --sb-thumb-active: #99A29D;
}
body { font-size: 1.0625rem; }
.brand { font-size: 1.3125rem; letter-spacing: -0.015em; }
.btn, .signin { font-size: 1.0625rem; }
.btn-lg { font-size: 1.1875rem; }
.head p, .close p, .lines span { font-size: clamp(1.0625rem, 1.6vw, 1.25rem); }
.lines b { font-weight: 600; font-size: 1.3125rem; }

/* ---------- the first screen: the words and the day you picked on the left, the month on the right ---------- */
.hero { min-height: 100svh; display: flex; }
.hero-in {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); grid-template-areas: "text month" "entry month";
  grid-template-rows: auto auto; align-content: center; column-gap: 4.5rem; row-gap: 2.25rem;
  padding-top: calc(var(--bar-top) + var(--bar-h) + 1rem); padding-bottom: 2rem;
}
.hero-text { grid-area: text; }
h1 { font-family: var(--display); font-weight: 500; font-size: 4.5rem; line-height: 1; letter-spacing: -0.03em; text-wrap: balance; }
.lede { margin-top: 1.375rem; max-width: 31rem; color: var(--muted); font-size: 1.375rem; line-height: 1.4; text-wrap: pretty; }

.month { grid-area: month; align-self: center; }
.month-h { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: 0.875rem; }
.month-h b { font-family: var(--display); font-weight: 500; font-size: 1.75rem; letter-spacing: -0.02em; }
.month-h span { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.month-wd, .month-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 0.5rem; }
.month-wd { margin-bottom: 0.5rem; color: var(--muted); font-size: 0.8125rem; text-align: center; }
.day { position: relative; display: flex; flex-direction: column; justify-content: space-between; align-items: flex-start; height: 5.25rem; padding: 0.625rem 0.75rem; border-radius: 0.875rem; background: var(--blank); text-align: left; }
.day i { font-style: normal; font-size: 0.875rem; font-weight: 500; color: var(--muted); }
.day b { font-size: 1rem; font-weight: 700; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.day.out { background: none; }
.day.out i { opacity: 0.55; }
.day.pos { background: var(--pos-soft); } .day.pos b { color: var(--pos); }
.day.neg { background: var(--neg-soft); } .day.neg b { color: var(--neg); }
button.day { transition: background-color 0.18s ease, box-shadow 0.18s ease; }
button.day[aria-pressed="true"] { box-shadow: inset 0 0 0 2px var(--ink); }
button.day.pos[aria-pressed="true"] { background: var(--pos-mid); }
button.day.neg[aria-pressed="true"] { background: var(--neg-mid); }
@media (hover: hover) { button.day.pos:hover { background: var(--pos-mid); } button.day.neg:hover { background: var(--neg-mid); } }

.entry { grid-area: entry; max-width: 31rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.entry-d { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.entry-d b { font-weight: 600; font-size: 1.375rem; letter-spacing: -0.015em; }
.entry-d span { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-t { margin-top: 0.75rem; }
.entry-t li { display: flex; align-items: baseline; justify-content: space-between; gap: 0.75rem; padding: 0.375rem 0; font-size: 0.9375rem; }
.entry-t li span { min-width: 0; color: var(--muted); white-space: nowrap; }
.entry-t li span b { color: var(--ink); font-weight: 600; }
.entry-t li > b { flex: none; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.entry-q { margin-top: 0.75rem; font-style: italic; font-size: 1.375rem; line-height: 1.35; text-wrap: pretty; }
.entry-q small { display: block; margin-bottom: 0.125rem; color: var(--muted); font-style: normal; font-size: 0.8125rem; }
.pos { color: var(--pos); } .neg { color: var(--neg); }

/* ---------- the findings, read back as plain statements ---------- */
.reads { max-width: 54rem; margin-inline: auto; border-top: 1px solid var(--line); }
.reads li { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 0.5rem 3rem; align-items: baseline; padding: 1.75rem 0.25rem; border-bottom: 1px solid var(--line); }
.reads h3 { font-weight: 500; font-size: clamp(1.5rem, 3vw, 2.125rem); line-height: 1.12; letter-spacing: -0.02em; text-wrap: balance; }
.reads p { color: var(--muted); font-size: 1rem; line-height: 1.5; font-variant-numeric: tabular-nums; text-wrap: pretty; }
.reads p span { font-weight: 700; }
@media (max-width: 700px) { .reads li { grid-template-columns: minmax(0, 1fr); padding: 1.375rem 0; } }

.is-free .ui-chart { min-height: 15rem; }

@media (min-width: 901px) and (max-height: 700px) {
  h1 { font-size: 3.375rem; }
  .lede { margin-top: 0.75rem; font-size: 1.1875rem; }
  .hero-in { row-gap: 1.25rem; padding-bottom: 1rem; }
  .day { height: 3.875rem; padding: 0.4375rem 0.625rem; }
  .month-h { margin-bottom: 0.5rem; }
  .entry { padding-top: 1.125rem; }
}
@media (max-width: 1023px) and (min-width: 761px) {
  h1 { font-size: 3.5rem; }
  .hero-in { column-gap: 2rem; }
  .lede { font-size: 1.1875rem; }
  .day { height: 4.5rem; padding: 0.5rem; }
  .day b { font-size: 0.875rem; }
  .entry-t li { font-size: 0.875rem; }
}

/* ---------- phones: their own layout, one screen ---------- */
@media (max-width: 760px) {
  .hero { min-height: 0; height: 100svh; }
  .hero-in { display: flex; flex-direction: column; justify-content: center; row-gap: 0; padding-top: calc(var(--bar-top) + var(--bar-h) + 0.5rem); padding-bottom: 0.75rem; }
  h1 { font-size: clamp(1.875rem, 9.4vw, 2.5rem); line-height: 1.02; }
  .lede { margin-top: 0.5rem; max-width: none; font-size: 1.0625rem; line-height: 1.35; }
  .month { align-self: stretch; margin-top: 0.75rem; display: flex; flex-direction: column; flex: 0 1 19.5rem; min-height: 0; }
  .month-h { margin-bottom: 0.375rem; }
  .month-h b { font-size: 1.3125rem; }
  .month-h span { font-size: 0.8125rem; }
  .month-wd { margin-bottom: 0.25rem; gap: 0.25rem; font-size: 0.75rem; }
  .month-grid { flex: 1; min-height: 0; gap: 0.25rem; grid-auto-rows: minmax(0, 1fr); }
  .day { height: auto; min-height: 2.75rem; padding: 0.25rem 0.4375rem; border-radius: 0.625rem; }
  .day i { font-size: 0.75rem; line-height: 1.1; }
  .day b { font-size: 0.8125rem; line-height: 1.15; }
  .entry { max-width: none; margin-top: 0.625rem; padding-top: 0.5rem; }
  .entry-d b { font-size: 1.125rem; }
  .entry-d span { font-size: 0.8125rem; }
  .entry-t { margin-top: 0.25rem; }
  .entry-t li { padding: 0.1875rem 0; font-size: 0.8125rem; }
  .entry-t li:nth-child(n+2) { display: none; }
  .entry-q { margin-top: 0.25rem; font-size: 1.0625rem; line-height: 1.3; }
  .entry-q small { display: none; }
}
@media (max-width: 760px) and (max-height: 620px) {
  .lede { display: none; }
  .entry-t { display: none; }
}

/* ---------- the trade: a piece of the app, so its section takes the app's own surroundings ----------
   Ledger's cool near-white ground as a full-width band, the white card on it, the grey journal block inside, the
   black pill of four choices above. The headline stays the page's serif. */
.sec-app { background: #F2F4F3; }
.sec-app .head { margin-bottom: clamp(1.5rem, 3vw, 2.25rem); }

.pick-row { display: flex; justify-content: center; margin-bottom: 1rem; --seg-bg: #E4E8E6; --seg-ink: #151917; --seg-on: #151917; --seg-on-ink: #FFFFFF; }
.pick-row .seg button { font-size: 0.9375rem; }

/* from a laptop up the card has a set height and the chart takes what is left; on phones the chart keeps its own */
@media (min-width: 901px) { #trade { height: 29.5rem; } }
@media (max-width: 900px) {
  .is-free .ui-journal .j-mistakes { display: flex; }
  .is-free .ui-journal .j-why { display: block; }
}
@media (max-width: 760px) {
  .pick-row { margin-bottom: 0.75rem; }
  #pick { display: flex; width: 100%; }
  #pick button { flex: 1; padding-inline: 0.125rem; font-size: 0.875rem; }
}
@media (max-width: 360px) { #pick button { font-size: 0.8125rem; } }

/* the first screen, from a tablet up: the words, then the day you picked right under them, level with the top of
   the month. Without this the month's extra height opened a gap between the two (seen with a two-line headline). */
@media (min-width: 761px) {
  .hero { align-items: center; }                 /* the block keeps its own height and sits in the middle of the screen */
  .hero-in { grid-template-rows: auto 1fr; }     /* the month's extra height goes under the day, not between the words and it */
  .month, .entry { align-self: start; }
}

/* a section's head is never more than three lines: the headline on one line from a tablet up, one short line under it */
.head { max-width: 58rem; }
@media (max-width: 760px) { .close h2 { font-size: clamp(1.5rem, 7.6vw, 2.25rem); } }
@media (max-width: 340px) { .head p { font-size: 0.9375rem; } }
