/*
  Simplified Investment: shared styles for every page. The look is called "Soft blue".

  Where to find what, in the order of this file. Search for a heading to jump to it.
    Colours and sizes ..................... ":root", right below
    Basics, Buttons and links
    Header and menu, Footer
    Title areas (home and the other pages), Ate Joy's card and round picture
    Sections and cards, Numbered steps, Symbols, Check lists, Questions
    Forms, Boxes that end a page
    Home page (promises, see what you get, mission, people, scam checklist)
    Learn, Portfolios, Digital Advisor, Market Update
    Calculators, Pricing, Log in and account

  Five habits keep this file healthy:
    1. Use the colour names from :root, never a colour number.
    2. A new look gets a new class. Do not change a class that other pages use.
    3. Sizes are in rem and written for phones first. Wider screens add to them with @media (min-width: ...).
    4. No shadows and no colour fades. Depth comes from white next to pale blue.
    5. Never count on words being short. Some visitors enlarge the text, and a translation can be longer.
       A box that stacks its parts names its one column: grid-template-columns: minmax(0, 1fr). Then the
       column is exactly as wide as the box. A row whose parts may not fit gets flex-wrap: wrap.
       The tests open every page with the text enlarged by half and fail when something sticks out.

  After a change: python3 tests/check_files.py (it finds a missing brace, an unknown colour name, an unknown class).
*/

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url("fonts/atkinson-hyperlegible-next-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;
}

/*
  Colours. The site is white and pale blue. Navy is for headings, blue for everything a visitor
  can press, and for the lines in Tagalog. The red and gold of the logo appear only in the logo
  and in the charts. Change a colour here and it changes everywhere.
*/
:root {
  --paper: #FFFFFF;          /* white bands and white cards */
  --mist: #EEF3FC;           /* pale blue: header, title areas, every second band, cards on white */
  --blue-soft: #DCE6F9;      /* deeper pale blue: picture areas, video frames, the "Free" badge */
  --navy: #0A1F52;           /* headings, the "Members" badge */
  --ink: #16213D;            /* running text */
  --muted: #4E5A75;          /* small print and quiet text */
  --blue: #0038A8;           /* buttons, links, symbol tiles, lines in Tagalog */
  --blue-dark: #002C85;      /* a button while the pointer is on it */
  --numeral: #6F8FDB;        /* the big step numbers (decoration) */
  --line: #DCE3F0;           /* thin lines on white */
  --line-strong: #C5D1E8;    /* the line above each step and around questions */
  --line-mist: #D3DDF0;      /* thin lines on pale blue */
  --field: #7C879E;          /* the border of form fields */
  --red: #CE1126;            /* the border of an error message */
  --error: #A50E1F;          /* the words of an error message */

  /* Sizes that repeat. */
  /* min(..., vw): on a narrow phone a title stops growing when the text is enlarged, so its longest word still fits. */
  --h1: min(clamp(2.25rem, 1rem + 4.1vw, 4.75rem), 13vw);
  --h2: min(clamp(2.125rem, 1.4rem + 2.6vw, 3.5rem), 12vw);
  --lede: clamp(1.125rem, 1rem + .4vw, 1.3125rem);
  --round-s: .875rem;        /* form fields, small boxes */
  --round-m: 1.5rem;         /* cards */
  --round-l: 1.75rem;        /* large cards */
  --round-xl: 2.25rem;       /* the big boxes: Ate Joy's card, forms, the box that ends a page */
}

/* ---------- Basics ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Atkinson Hyperlegible Next", system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.5;
  /* A word that is too long for its box (a web address, a long word in very large text) breaks instead of leaving the box. */
  overflow-wrap: break-word;
  /* The footer always sits at the bottom of the window, also on short pages. */
  min-height: 100vh; min-height: 100dvh;
  display: flex; flex-direction: column;
}
main { flex: 1 0 auto; display: flex; flex-direction: column; }
/* On pages that are only a title area (log in, sign up, page not found), pale blue fills the space. */
main > .page-hero:only-child { flex: 1 0 auto; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3 { margin: 0; color: var(--navy); font-weight: 700; text-wrap: balance; }
h1 { font-size: var(--h1); line-height: 1.02; letter-spacing: -.035em; }
h2 { font-size: var(--h2); line-height: 1.08; letter-spacing: -.03em; }
h3 { font-size: 1.375rem; line-height: 1.25; letter-spacing: -.015em; }
p { margin: 0; text-wrap: pretty; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
[id] { scroll-margin-top: 1.5rem; }
[hidden] { display: none !important; }
.nowrap { white-space: nowrap; }   /* keeps a pair of words such as "long-term" on one line */
/* For screen readers only: on the page but not visible. */
.visually-hidden { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }

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

/* ---------- Buttons and links ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 3.25rem; max-width: 100%; padding: .5rem 1.75rem;
  border: 1.5px solid transparent; border-radius: 999px;
  background: var(--blue); color: #fff;
  font: inherit; font-size: 1.125rem; font-weight: 600; line-height: 1.2; text-align: center;
  text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--blue-dark); }
.btn:disabled { opacity: .7; cursor: progress; }
.btn-small { min-height: 2.75rem; padding: .375rem 1.25rem; font-size: .9375rem; }
/* The second button of a pair: an outline. */
.btn-quiet { background: transparent; border-color: var(--blue); color: var(--blue); }
.btn-quiet:hover { background: var(--blue); color: #fff; }

/*
  A link that stands alone ("Start learning"). It is 2.75rem (44 px) high, so it is easy to tap.
  A link inside a sentence gets the class in-text as well: it is underlined and flows with the words.
*/
.text-link {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-weight: 600; color: var(--blue); text-decoration: none; text-underline-offset: .2em;
}
.text-link:hover { text-decoration: underline; }
.text-link.in-text { display: inline; min-height: 0; text-decoration: underline; }
/* A button that looks like a link ("Start over", "Clear all numbers"). */
.link-button {
  min-height: 2.75rem; padding: 0; border: 0; background: none;
  font: inherit; font-weight: 600; color: var(--blue); text-underline-offset: .2em; cursor: pointer;
}
.link-button:hover { text-decoration: underline; }

/* ---------- Header and menu (pale blue, together with the title area below it) ---------- */

/*
  Phones and tablets: the logo and a "Menu" button. The button opens the menu (js/site.js).
                      Without scripts there is no button and the menu simply shows.
                      Tablets have room for the "Join the waitlist" button beside it; on phones it sits in the open menu.
  Laptops:            the logo and the button on the first line, the whole menu on the second.
  Wide screens:       everything on one line, and the header stays in view while the page scrolls.
  The menu wraps onto another line when it runs out of room, so adding a menu item never breaks the layout.
*/
.site-head { position: relative; z-index: 20; background: var(--mist); }
.head-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 1rem; padding-block: .75rem; }
/*
  The name may break into two lines on a narrow phone. min(..., vw): on the narrowest phones the
  logo, its name and the Menu button shrink with the screen, so they never run into each other,
  also when the text is enlarged. From 360 px on they have their full size.
*/
.brand {
  justify-self: start;
  display: inline-flex; align-items: center; gap: min(.625rem, 2.8vw); min-height: 2.75rem;
  color: var(--navy); font-size: min(1.125rem, 5vw); font-weight: 700; line-height: 1.05; letter-spacing: -.01em;
  text-decoration: none;
}
.mark { width: min(2.5rem, 11.2vw); height: min(2.5rem, 11.2vw); flex: none; }
.head-cta, .menu-button { grid-column: 2; grid-row: 1; }
.nav { grid-column: 1 / -1; display: flex; flex-wrap: wrap; column-gap: 1.625rem; }
.nav a {
  display: inline-flex; align-items: center; min-height: 2.75rem;
  font-size: .9375rem; color: var(--ink); text-decoration: none; white-space: nowrap;
}
.nav a:hover { color: var(--blue); }
.nav a[aria-current="page"] { color: var(--blue); font-weight: 700; }
.menu-button {
  display: none; align-items: center; min-height: 2.75rem; padding: 0 min(1.125rem, 5vw);
  border: 0; border-radius: 999px; background: var(--paper); color: var(--navy);
  font: inherit; font-size: min(.9375rem, 4.5vw); font-weight: 600; cursor: pointer;
}
/* Without scripts the header button would crowd the logo on the narrowest phones. */
@media (max-width: 22.99rem) { .head-cta { display: none; } }
/* js/site.js adds has-menu to the header once the Menu button works, and menu-open while the menu is open. */
@media (max-width: 61.99rem) {
  .menu-button { display: inline-flex; }
  .has-menu .nav { display: none; }
  .has-menu.menu-open .nav { display: flex; flex-direction: column; padding-top: .5rem; }
  .has-menu.menu-open .nav a { min-height: 3rem; border-top: 1px solid var(--line-mist); font-size: 1.0625rem; white-space: normal; }
}
@media (max-width: 47.99rem) {
  .has-menu .head-cta { display: none; }
  .has-menu.menu-open .head-cta { display: inline-flex; grid-column: 1 / -1; grid-row: auto; justify-self: start; margin-block: .75rem .25rem; }
}
@media (min-width: 48rem) and (max-width: 61.99rem) {
  .has-menu .head-row { grid-template-columns: minmax(0, 1fr) auto auto; }
  .has-menu .menu-button { grid-column: 3; }
}
@media (min-width: 90rem) {
  .head-row { grid-template-columns: auto minmax(0, 1fr) auto; column-gap: 1.75rem; }
  .nav { grid-column: 2; grid-row: 1; justify-content: center; }
  .head-cta { grid-column: 3; }
}
/* The header stays in view on a screen that is wide and tall enough to spare the room. */
@media (min-width: 90rem) and (min-height: 45rem) {
  .site-head { position: sticky; top: 0; }
  [id] { scroll-margin-top: 6rem; }
  @supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
    .site-head { background: rgba(238, 243, 252, .86); -webkit-backdrop-filter: saturate(1.6) blur(16px); backdrop-filter: saturate(1.6) blur(16px); }
  }
}

/* ---------- Footer (white, with a thin line above it) ---------- */

.foot { padding-block: 3.5rem; background: var(--paper); border-top: 1px solid var(--line); font-size: .9375rem; color: var(--muted); }
.foot-row { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem; }
.foot-top { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 1.75rem 4rem; }
/* Two columns of links. With very large text on a narrow phone there is room for one only. */
.foot-nav { flex: 0 1 26rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 7.75rem), 1fr)); column-gap: 1.5rem; }
.foot-nav a { display: flex; align-items: center; min-height: 2.75rem; color: var(--ink); text-decoration: none; }
.foot-nav a:hover { color: var(--blue); }
.foot-contact { flex: 0 1 18.75rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .875rem; font-style: normal; }
.foot-contact p { display: flex; flex-direction: column; align-items: flex-start; }
.foot-contact strong { color: var(--navy); }
/* overflow-wrap: the long email address may break on a very narrow phone instead of pushing the page wider. */
.foot-contact a { display: inline-flex; align-items: center; min-height: 2.25rem; font-weight: 600; color: var(--blue); text-decoration: none; overflow-wrap: anywhere; }
.foot-contact a:hover { text-decoration: underline; }
.foot-reg { font-weight: 600; color: var(--navy); }
.foot-risk { padding-top: 1.75rem; border-top: 1px solid var(--line); }

/* ---------- Title areas (pale blue) ---------- */

/*
  Home: the words, Ate Joy, the promises. Ate Joy stands beside the words when both fit
  (tablets and wider) and below them when they do not: on phones, and when someone has made
  the text much larger. No screen width is written down here: the two decide by their own size.
*/
.hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5rem); background: var(--mist); --card: var(--paper); --inset: var(--mist); --hair: var(--line); }
.hero-grid { display: flex; flex-wrap: wrap; align-items: center; gap: clamp(2.5rem, 5vw, 4rem) clamp(2rem, 5vw, 4.5rem); }
/* 999 to 1: on a shared line the words take all the room that is left, and her card keeps its width. */
.hero-copy { flex: 999 1 22rem; max-width: 100%; }
/* Her card is narrower on a tablet than on a computer. */
.hero-grid .joy-intro { flex: 1 1 clamp(19rem, 34vw, 26.25rem); }
/* The promises always get a line of their own. */
.hero-grid .promises { flex: 1 1 100%; }
.hero h1 { font-size: min(clamp(2.75rem, 1rem + 5vw, 5.5rem), 16vw); line-height: 1; }
.tagline { margin-top: 1.5rem; font-size: clamp(1.375rem, 1rem + 1vw, 1.875rem); line-height: 1.25; font-weight: 600; color: var(--blue); }
.lede { margin-top: 1.25rem; max-width: 41rem; font-size: var(--lede); line-height: 1.45; color: var(--muted); }
.hero .lede { max-width: 34rem; }
.for { margin-top: .875rem; max-width: 41rem; color: var(--muted); }
.hero-cta { margin-top: 2rem; display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1rem; }
.fine { font-size: .9375rem; color: var(--muted); }

/* The other pages */
.page-hero { padding-block: clamp(2.5rem, 5vw, 4.5rem) clamp(3rem, 6vw, 5.5rem); background: var(--mist); --card: var(--paper); --inset: var(--mist); --hair: var(--line); }
/* Titles are written with a line break for wide screens. On phones the words find their own lines. */
@media (max-width: 47.99rem) { .page-hero h1 br { display: none; } }
/* Small line above a page title, such as "For members" and "New every week". */
.kicker { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: 1.25rem; font-size: 1rem; font-weight: 600; color: var(--muted); }

/* ---------- Ate Joy ---------- */

/*
  Her card: the picture on a deeper pale blue, the words below. Used on the home page (.joy-intro)
  and on the Digital Advisor page (.profile). The picture ends at the waist and stands on the edge.
*/
.joy-intro { margin: 0; width: 100%; max-width: 26.25rem; overflow: hidden; border-radius: var(--round-xl); background: var(--card); }
.joy-stage { display: flex; align-items: flex-end; justify-content: center; padding-top: 1.75rem; background: var(--blue-soft); }
.joy-stage img { width: min(15.625rem, 64%); height: auto; }
.joy-says { display: flex; flex-direction: column; align-items: flex-start; padding: 1.75rem clamp(1.5rem, 6vw, 2rem) 1.25rem; }
.joy-says strong { font-size: clamp(1.25rem, 6.2vw, 1.75rem); line-height: 1.15; letter-spacing: -.02em; font-weight: 700; color: var(--navy); }
.joy-says small { margin-top: .5rem; font-size: .9375rem; color: var(--muted); }
.joy-says span { margin-top: .75rem; }
.joy-says .text-link { margin-top: .375rem; }

/* Her round picture: beside her name, in the chat, in a box that asks "Which plan fits you?". */
/* object-fit: a photo of any shape fills the circle without being squeezed. */
.avatar { width: 3rem; height: 3rem; flex: none; border-radius: 50%; background: var(--blue-soft); object-fit: cover; }
.avatar.large { width: 4.5rem; height: 4.5rem; }
.avatar.xl { width: 5.5rem; height: 5.5rem; }

/* ---------- Sections and cards ---------- */

/*
  A page is a pile of bands: white, pale blue, white ... Add the class tint for a pale blue band.
  Cards take the other colour by themselves: pale blue cards on a white band, white cards on a pale
  blue band. They read these three names, so a card never needs to know where it stands:
    --card   the background of a card
    --inset  the background of a box inside a card
    --hair   a thin line inside a card
*/
.section { padding-block: clamp(4rem, 8.5vw, 7.5rem); --card: var(--mist); --inset: var(--paper); --hair: var(--line-mist); }
.section.tint { background: var(--mist); --card: var(--paper); --inset: var(--mist); --hair: var(--line); }
/* close: no space above, for a part that belongs to the part before it. */
.section.close { padding-top: 0; }
.intro { margin-top: .875rem; max-width: 42rem; font-size: var(--lede); line-height: 1.45; color: var(--muted); }
.note { margin-top: 1.25rem; max-width: 56rem; font-size: .9375rem; color: var(--muted); }
.notice { margin-top: 1.5rem; padding: 1.125rem 1.25rem; border-radius: 1rem; background: var(--card); }
.notice .btn { margin-top: 1rem; }
.badge { display: inline-block; padding: .125rem .625rem; border-radius: 999px; font-size: .9375rem; font-weight: 600; line-height: 1.5; white-space: nowrap; }
.badge.free, .badge.info { background: var(--blue-soft); color: var(--blue); }
.badge.member { background: var(--navy); color: #fff; }

/* Heading beside content */
.split { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2rem 4rem; }
@media (min-width: 56rem) { .split { grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); align-items: start; } }

/* Two cards side by side, each with a picture or a symbol on top */
.audience { margin-top: 2.5rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 48rem) { .audience { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.audience > div { display: flex; flex-direction: column; align-items: flex-start; padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--round-l); background: var(--card); }
.audience h3 { margin-top: 1.375rem; font-size: 1.625rem; line-height: 1.2; }
.audience p { margin-top: .75rem; color: var(--muted); }
.audience .text-link { margin-top: auto; padding-top: .375rem; }

/* ---------- Numbered steps (real sequences only) ---------- */

/*
  Each step has a thin line on top, a blue tile with a symbol, a big pale number, a title and words.
  The browser counts the number (1, 2, 3 ...). It is never typed, so it can never be wrong.
  It is decoration: screen readers get the order from the <ol> itself. To add a step, copy one <li>.
*/
.steps { counter-reset: step; list-style: none; margin: 3rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 3rem; }
@media (min-width: 48rem) { .steps { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 40rem) { .steps.four { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2.5rem; } }
@media (min-width: 64rem) { .steps.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.steps > li { counter-increment: step; position: relative; display: flex; flex-direction: column; align-items: flex-start; padding-top: 1.75rem; border-top: 1px solid var(--line-strong); }
.steps > li::after {
  content: counter(step); content: counter(step) / "";
  position: absolute; top: 1.75rem; right: 0; height: 3.75rem; display: flex; align-items: center;
  font-size: 3.5rem; line-height: 1; letter-spacing: -.03em; font-weight: 700; color: var(--numeral);
}
.steps h3 { margin-top: 1.625rem; max-width: 100%; font-size: 1.625rem; line-height: 1.2; }
.steps.four h3 { font-size: 1.3125rem; line-height: 1.25; }
.steps p { margin-top: .625rem; color: var(--muted); }
/* The link sits at the bottom of its step, so the links of a row line up. */
.steps .text-link { margin-top: auto; padding-top: .375rem; }

/* ---------- Symbols ---------- */

/* Symbols are small line drawings (24 by 24), written straight into the page. They take the colour of the text around them. */
.icon { width: 1.875rem; height: 1.875rem; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
/* A blue tile with a white symbol in it. */
.icon-tile { display: grid; place-items: center; width: 3.75rem; height: 3.75rem; flex: none; border-radius: 1.125rem; background: var(--blue); color: #fff; }
.icon-tile.large { width: 4.5rem; height: 4.5rem; border-radius: 1.375rem; }
.icon-tile.large .icon { width: 2.25rem; height: 2.25rem; }

/* ---------- Check lists ---------- */

.checks { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 3rem; }
.checks li { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr); column-gap: .875rem; align-items: start; align-content: start; }
.checks .tick { width: 1.75rem; height: 1.75rem; grid-row: span 2; }
.checks h3 { font-size: 1.25rem; line-height: 1.3; }
.checks p { margin-top: .25rem; color: var(--muted); }
/* compact: one line of words per tick. */
.checks.compact { gap: .75rem; }
.checks.compact li { grid-template-columns: 1.5rem minmax(0, 1fr); column-gap: .75rem; }
.checks.compact .tick { width: 1.5rem; height: 1.5rem; margin-top: .0625rem; grid-row: auto; }
/* boxed: the list stands in a card, two by two when there is room. */
.checks.boxed { padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--round-l); background: var(--card); }
@media (min-width: 40rem) { .checks.boxed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ---------- Questions, and every other part that opens when it is tapped ---------- */

.faq { border-top: 1px solid var(--line-strong); }
.faq details { border-bottom: 1px solid var(--line-strong); }
.faq summary { display: block; padding: 1.25rem 2.75rem 1.25rem 0; font-size: 1.25rem; line-height: 1.35; font-weight: 700; color: var(--navy); }
.faq details p { padding: 0 2.5rem 1.375rem 0; max-width: 42rem; color: var(--muted); }
/*
  The small arrow that turns when the part opens. It is placed by position, not with flex:
  older versions of Safari cannot lay out the title of an opening part with flex.
*/
.faq summary, .lesson summary, .calc-details summary { position: relative; list-style: none; cursor: pointer; }
.faq summary::-webkit-details-marker, .lesson summary::-webkit-details-marker, .calc-details summary::-webkit-details-marker { display: none; }
.faq summary::after, .lesson summary::after, .calc-details summary::after {
  content: ""; position: absolute; right: .375rem; top: 50%; width: .625rem; height: .625rem; margin-top: -.5rem;
  border-right: 2px solid var(--blue); border-bottom: 2px solid var(--blue); transform: rotate(45deg);
}
.faq details[open] > summary::after, .lesson details[open] > summary::after, .calc-details[open] > summary::after { margin-top: -.125rem; transform: rotate(-135deg); }
/* A short title ("Read the lesson"): the arrow follows the words. */
.lesson summary, .calc-details summary { display: inline-block; padding: .625rem 1.625rem .625rem 0; font-weight: 600; line-height: 1.5; color: var(--blue); }

/* ---------- Forms ---------- */

/* The big box that holds words on one side and a form on the other. */
.panel { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.5rem 4.5rem; align-items: center; padding: clamp(1.75rem, 4.5vw, 4rem); border-radius: var(--round-xl); background: var(--card); }
/* min-content: the column of words is never narrower than its longest word, also with very large text. */
@media (min-width: 56rem) { .panel { grid-template-columns: minmax(min-content, .85fr) minmax(0, 1fr); } }
/* top: for a long form, the words stay at the top instead of the middle. */
.panel.top { align-items: start; }
.panel-copy p { margin-top: .875rem; max-width: 26rem; font-size: var(--lede); line-height: 1.45; color: var(--muted); }
.panel-form { min-width: 0; }
.form { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
/* "> label": the name of a field. The answers inside .choices are labels too and keep their own look. */
.field > label, .field > legend { display: block; margin-bottom: .5rem; font-size: 1rem; font-weight: 600; color: var(--navy); }
.opt { font-weight: 400; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="password"], .field select, .field textarea {
  width: 100%; min-height: 3.25rem; padding: .625rem 1rem;
  border: 1px solid var(--field); border-radius: var(--round-s);
  background: #fff; color: var(--ink); font: inherit;
}
.field input:focus-visible, .field select:focus-visible, .field textarea:focus-visible { outline-offset: 1px; border-color: var(--blue); }
.field textarea { resize: vertical; line-height: 1.5; }
.field select { -webkit-appearance: none; appearance: none; padding-right: 2.75rem; background: #fff url("chevron.svg") no-repeat right 1rem center / 1.25rem; }
.field .hint { margin-top: .375rem; font-size: .9375rem; color: var(--muted); }
fieldset.field { margin: 0; padding: 0; border: 0; min-width: 0; }
fieldset.field legend { padding: 0; }
/* Answers to pick from. They stand side by side when both fit on one line, and below one another when they do not. */
.choices { display: grid; gap: .625rem; grid-template-columns: repeat(auto-fit, minmax(min(14rem, 100%), 1fr)); }
.choices.three { grid-template-columns: repeat(auto-fit, minmax(min(9rem, 100%), 1fr)); }
.choice {
  display: flex; flex-wrap: wrap; align-items: center; gap: 0 .625rem;
  min-height: 3.25rem; padding: .5rem 1rem; margin: 0;
  border: 1px solid var(--field); border-radius: var(--round-s);
  background: #fff; cursor: pointer;
}
.choice:has(input:checked) { border-color: var(--blue); outline: 1px solid var(--blue); outline-offset: -2px; }
.choice input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--blue); flex: none; }
.form .btn { justify-self: start; }
.form-error { padding: .75rem 1rem; border-radius: var(--round-s); background: #fff; border: 1.5px solid var(--red); color: var(--error); font-weight: 600; }
/* A field that people never see. Robots fill it in, and their message is thrown away. */
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.done h3 { font-size: 1.625rem; line-height: 1.2; }
.done p { margin-top: .625rem; max-width: 28rem; color: var(--muted); }
.done .btn { margin-top: 1.5rem; }
.done:focus { outline: none; }
/* A browser without scripts sends a form itself. Our server stores it and sends the browser back to the page:
   to the thank-you box (index.html#waitlist-done) or to the message above the button (index.html#waitlist-problem).
   The address then names that part, and these lines show it. With scripts, js/waitlist.js and js/consultation.js do this. */
#waitlist-done:target, #consult-done:target, #waitlist-problem:target, #consult-problem:target { display: block !important; }
.panel-form:has(> .done:target) > .form { display: none; }
#waitlist-problem:target, #consult-problem:target { scroll-margin-top: 40vh; }   /* the fields above the message stay in view */
/* A tick box with its words */
.check { display: flex; align-items: center; gap: .625rem; min-height: 2.75rem; font-weight: 600; cursor: pointer; }
.check input { width: 1.25rem; height: 1.25rem; margin: 0; accent-color: var(--blue); flex: none; }
/* An amount of money: the peso sign sits inside the field. */
.money { display: flex; align-items: center; border: 1px solid var(--field); border-radius: var(--round-s); background: #fff; }
.money:focus-within { border-color: var(--blue); outline: 3px solid var(--blue); outline-offset: 1px; }
.money span { padding-left: 1rem; font-weight: 600; color: var(--muted); }
.money input[type="text"] { width: 100%; min-width: 0; min-height: 3.125rem; padding: .5rem .875rem .5rem .375rem; border: 0; border-radius: var(--round-s); background: none; color: var(--ink); font: inherit; outline: none; }
.field output { float: right; font-weight: 700; color: var(--blue); }
.field input[type="range"] { display: block; width: 100%; height: 2.75rem; margin: 0; accent-color: var(--blue); }

/* ---------- The box that ends a page ---------- */

.cta-band { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1.5rem 3rem; padding: clamp(2rem, 5vw, 4rem); border-radius: var(--round-xl); background: var(--card); }
.cta-band h2 { font-size: clamp(1.875rem, 1.3rem + 2.1vw, 2.875rem); line-height: 1.1; }
/* A title with words under it (or with Ate Joy's picture beside it) leaves room for the buttons on the same line. */
.cta-band > div:first-child { flex: 1 1 27.5rem; min-width: 0; }
.cta-band .intro { margin-top: .75rem; max-width: 35rem; }
/* slim: a lower box in the middle of a page. */
.cta-band.slim { padding-block: clamp(1.75rem, 4vw, 3rem); }
.cta-band.slim h2 { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.5rem); }
/* The title stands beside the picture when it fits, otherwise below it. */
.cta-lead { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.375rem; }
.cta-lead h2 { flex: 1 1 8rem; min-width: 0; }
.cta-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 1.75rem; }
.cta-actions .text-link { font-size: 1.125rem; }

/* ---------- Home page ---------- */

/* Three promises, on a white strip inside the title area */
.promises { list-style: none; margin: 0; padding: 1.75rem clamp(1.5rem, 3vw, 2.25rem); display: flex; flex-wrap: wrap; gap: 1.5rem clamp(1.25rem, 3vw, 2.5rem); border-radius: var(--round-m); background: var(--card); }
/*
  Three beside one another when the box is at least 42rem wide inside, otherwise one below
  the other (never two and one). How it works: in a narrow box the wished width is huge, so
  each promise takes a line; in a wide box it is zero, so the three share one line equally.
*/
.promises li { flex: 1 1 calc((42rem - 100%) * 999); display: grid; grid-template-columns: 1.625rem minmax(0, 1fr); column-gap: .875rem; align-items: start; }
.promises .tick { width: 1.625rem; height: 1.625rem; margin-top: .0625rem; }
.promises strong { display: block; font-size: 1.125rem; line-height: 1.35; color: var(--navy); }
.promises span { display: block; margin-top: .125rem; font-size: 1rem; color: var(--muted); }

/* One line under the steps that leads to the calculator */
.teaser { margin-top: 3rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1.5rem; padding: .875rem clamp(1.25rem, 3vw, 2rem); border-radius: 1.25rem; background: var(--card); font-size: 1.125rem; font-weight: 600; color: var(--navy); }

/*
  See what you get: three cards, each with a picture area on top and words below.
  The facts in these cards are typed by hand and must match the data files
  (js/lessons.js, js/portfolios.js, js/market-example.js). The tests compare them.
*/
.peeks { margin-top: 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 62rem) { .peeks { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.peek { position: relative; display: flex; flex-direction: column; overflow: hidden; border-radius: var(--round-l); background: var(--card); }
.peek-visual { position: relative; flex: 1 1 auto; min-height: 16.875rem; display: flex; flex-direction: column; justify-content: center; gap: 1rem; padding: 1.75rem clamp(1.5rem, 3vw, 2rem); border-bottom: 1px solid var(--hair); }
/* A photo or video still fills the whole picture area. */
.peek-visual > img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* The play sign sits in the corner, so it never covers a face. */
.peek-play { position: absolute; left: 1.5rem; bottom: 1.5rem; display: grid; place-items: center; width: 3.5rem; height: 3.5rem; border-radius: 50%; background: #fff; color: var(--blue); }
.peek-play .icon { width: 1.5rem; height: 1.5rem; margin-left: .1875rem; }
.peek-label { font-size: .9375rem; line-height: 1.4; font-weight: 600; color: var(--muted); }
.peek-plan .peek-label { font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.peek-plan .mix-bar { height: 2.75rem; margin-top: 0; border-radius: .75rem; font-size: .9375rem; }
.peek-plan .mix-legend { margin-top: 0; grid-template-columns: minmax(0, 1fr); gap: .5rem; font-size: 1rem; }
.peek-plan .mix-legend li { padding: 0; border-top: 0; }
.peek-plan .swatch { width: .875rem; height: .875rem; border-radius: .25rem; }
.peek-quote { font-size: 1.1875rem; line-height: 1.35; font-weight: 600; color: var(--navy); }
.peek-moves { list-style: none; margin: 0; padding: 0; }
/* flex-wrap: with very large text the figure moves below its name instead of being cut off. */
.peek-moves li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 1rem; padding: .625rem 0; border-top: 1px solid var(--hair); }
.peek-moves b { display: inline-flex; align-items: center; color: var(--navy); }
.peek-body { display: flex; flex-direction: column; align-items: flex-start; padding: 1.75rem clamp(1.5rem, 3vw, 2rem) 1.25rem; }
/* The small line above the title of a card: "Free lesson", "Example plan", "For members". */
.peek-kind { font-size: .9375rem; font-weight: 600; color: var(--muted); }
.peek-body h3 { margin-top: .5rem; font-size: 1.5rem; line-height: 1.2; }
.peek-body p { margin-top: .5rem; color: var(--muted); }
.peek-body .text-link { margin-top: auto; padding-top: .375rem; }
/* The whole card can be tapped: the link reaches over all of it. */
.peek-body .text-link::after { content: ""; position: absolute; inset: 0; }
/* Wide screens: the three cards share their rows, so the lines between picture and words are level. */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 62rem) {
    .peek { display: grid; grid-template-columns: minmax(0, 1fr); grid-row: span 2; grid-template-rows: subgrid; row-gap: 0; }
  }
}
/* Tablets: the picture sits beside the words. */
@media (min-width: 40rem) and (max-width: 61.99rem) {
  .peek { flex-direction: row; }
  .peek-visual { flex: 0 0 46%; border-bottom: 0; border-right: 1px solid var(--hair); }
  .peek-body { flex: 1; }
}

/* Our mission: one statement in English, one line in Tagalog, and the full logo beside them */
.mission-grid { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 2.5rem 4.5rem; }
.mission-grid > div { flex: 1 1 35rem; min-width: 0; max-width: 52.5rem; }
/* The heading of this part is small on purpose: the statement is the big line. */
.label-title { font-size: 1.25rem; line-height: 1.3; letter-spacing: 0; font-weight: 600; color: var(--muted); }
.mission { margin-top: 1.5rem; font-size: clamp(1.75rem, 1.1rem + 2.4vw, 2.875rem); line-height: 1.15; letter-spacing: -.03em; font-weight: 700; color: var(--navy); }
.mission-fil { margin-top: 1.5rem; max-width: 42.5rem; font-size: clamp(1.1875rem, 1rem + .6vw, 1.5rem); line-height: 1.4; font-weight: 600; color: var(--blue); }
/* flex-wrap: with very large text the name moves below the candles instead of leaving the screen. */
.mission-logo { flex: none; max-width: 100%; display: flex; flex-wrap: wrap; align-items: center; gap: clamp(.75rem, 1.4vw, 1.25rem); color: var(--navy); font-size: clamp(2.125rem, 3.3vw, 3rem); line-height: 1.04; letter-spacing: -.03em; font-weight: 700; }
.mission-mark { flex: none; width: clamp(6rem, 9.6vw, 8.625rem); height: auto; }

/* Who is behind the company */
.people { margin-top: 3rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 52rem) { .people { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.person { display: flex; flex-direction: column; gap: 1.375rem; padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--round-l); background: var(--card); }
/* The name stands beside the picture when it fits, otherwise below it. */
.person-head { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.125rem; }
.person-head > div { flex: 1 1 8rem; min-width: 0; }
.person h3 { font-size: 1.625rem; line-height: 1.2; }
.person-role { display: block; margin-top: .125rem; font-weight: 600; color: var(--blue); }
.person-facts { margin: 0; padding-left: 1.375rem; display: grid; grid-template-columns: minmax(0, 1fr); gap: .5rem; }
.person .text-link { align-self: flex-start; margin-top: -.5rem; }
/* The founder's words open with a large quotation mark. */
.founder-quote { margin: 1.25rem 0 0; padding: clamp(1.5rem, 3vw, 2.5rem); border-radius: var(--round-l); background: var(--card); }
.founder-quote::before { content: "\201C"; content: "\201C" / ""; display: block; height: 2.375rem; font-size: 5.25rem; line-height: 1; font-weight: 800; color: var(--blue); }
.founder-quote blockquote { margin: .875rem 0 0; max-width: 56.25rem; font-size: clamp(1.1875rem, 1rem + .6vw, 1.5rem); line-height: 1.45; color: var(--navy); }
.founder-quote figcaption { margin-top: .875rem; font-weight: 700; color: var(--blue); }

/* Scam checklist and company details. One card fills the row; two share it. */
.guard { margin-top: 3rem; display: grid; gap: 1.25rem; align-items: start; grid-template-columns: repeat(auto-fit, minmax(min(100%, 22rem), 1fr)); }
.scam-card, .company-card { container-type: inline-size; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; padding: clamp(1.5rem, 3.4vw, 2.75rem); border-radius: var(--round-l); background: var(--card); }
.scam-top { display: flex; flex-wrap: wrap; align-items: center; gap: .875rem; }
.scam-card h3, .company-card h3 { font-size: clamp(1.5rem, 1.2rem + 1vw, 1.875rem); line-height: 1.2; }
.scam-signs { align-self: stretch; list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .875rem 3rem; }
/* When the card has the whole row to itself, the four questions sit in two columns. */
@container (min-width: 46rem) { .scam-signs { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
/* A question mark in a ring stands in front of each question. */
.scam-signs li { position: relative; padding-left: 2.375rem; }
.scam-signs li::before {
  content: "?"; content: "?" / "";
  position: absolute; left: 0; top: .0625rem; width: 1.625rem; height: 1.625rem;
  border: 2px solid var(--blue); border-radius: 50%;
  color: var(--blue); font-size: .9375rem; line-height: 1.375rem; font-weight: 700; text-align: center;
}
.scam-card .hero-cta { margin-top: .5rem; }
.company-card .facts { align-self: stretch; margin: 0; }

/* A short list of facts: the label on the left, the fact on the right */
.facts { margin: 1.5rem 0 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: .875rem; }
.facts div { display: flex; justify-content: space-between; gap: 1rem; padding-bottom: .875rem; border-bottom: 1px solid var(--hair); }
.facts dt { color: var(--muted); }
.facts dd { margin: 0; font-weight: 600; color: var(--navy); overflow-wrap: anywhere; text-align: right; }
/* On phones each fact sits under its label, so long values such as the email stay on one line. */
@media (max-width: 39.99rem) {
  .company-card .facts div { flex-direction: column; gap: .125rem; }
  .company-card .facts dd { text-align: left; }
}

/* ---------- Learn ---------- */

/* The three levels, as white pills under the title */
.levels { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 2rem; }
/* flex-wrap: with very large text the number of lessons moves below the name of the level. */
.level-chip { display: inline-flex; flex-wrap: wrap; max-width: 100%; align-items: center; gap: 0 .625rem; min-height: 3.25rem; padding: .375rem 1.375rem; border-radius: 1.625rem; background: var(--paper); color: var(--navy); font-size: 1.125rem; font-weight: 700; text-decoration: none; }
.level-chip:hover { color: var(--blue); }
.level-chip .count { font-size: .9375rem; font-weight: 400; color: var(--muted); }

/* Lesson cards, built by js/learn.js */
.lessons { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; }
@media (min-width: 40rem) { .lessons { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .lessons { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.lesson { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--round-m); background: var(--card); }
/* The video frame: also used for the video of a market update. */
.video {
  aspect-ratio: 16 / 9; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .625rem;
  background: var(--blue-soft); color: var(--navy); font-size: .9375rem; font-weight: 600; text-align: center;
}
.play { width: 3rem; height: 3rem; }
/* Members only: a small lock instead of the play sign. */
.video.locked { gap: .375rem; }
.video.locked .play { width: 1.75rem; height: 1.75rem; }
.video.playing { background: #000; }
.video iframe, .video video { width: 100%; height: 100%; border: 0; display: block; }
.video-play {
  width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: pointer;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: .625rem;
  font: inherit; font-size: .9375rem; font-weight: 600; color: var(--navy);
}
.video-play:focus-visible { outline-offset: -4px; }
/* A video with a still picture: the picture fills the frame and only the play sign shows. */
.video.has-poster { background-size: cover; background-position: center; }
/* The play sign sits in the corner, so it never covers a face. */
.video.has-poster .video-play { align-items: flex-start; justify-content: flex-end; padding: 1.25rem; }
.video.has-poster .play { width: 3.5rem; height: 3.5rem; }
.video.has-poster .video-play span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); }
.lesson-body { flex: 1; display: flex; flex-direction: column; align-items: flex-start; padding: 1.375rem 1.5rem 1.25rem; }
.lesson-meta { display: flex; align-items: center; gap: .625rem; font-size: .9375rem; font-weight: 600; }
.lesson-no { color: var(--muted); }
.lesson h3 { margin-top: .625rem; }
.lesson-body > p { margin-top: .5rem; color: var(--muted); }
/* "Read the lesson" opens the written version. It sits at the bottom of its card. */
.lesson details { align-self: stretch; margin-top: auto; padding-top: .25rem; }
.lesson details p { margin-top: .625rem; }
.lesson details p:last-child { margin-bottom: .5rem; }
.example { padding: .875rem 1rem; border-radius: var(--round-s); background: var(--inset); font-size: 1rem; }

/* ---------- Portfolios: the mix of a plan as a bar with a list ---------- */

.mix { margin-top: 2rem; display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; }
.mix .note { margin-top: 0; }
/* flex-wrap: with very large text the three names take two lines instead of leaving the screen. */
.mix-tabs { max-width: 100%; display: flex; flex-wrap: wrap; gap: .25rem; padding: .375rem; border-radius: 2rem; background: var(--card); }
.mix-tabs button {
  min-height: 3rem; padding: 0 clamp(.875rem, 2.6vw, 1.625rem); border: 0; border-radius: 999px;
  background: transparent; color: var(--navy); font: inherit; font-size: clamp(1rem, .9rem + .4vw, 1.125rem); font-weight: 600; cursor: pointer;
}
.mix-tabs button[aria-selected="true"] { background: var(--blue); color: #fff; }
.mix-panel { align-self: stretch; padding: clamp(1.5rem, 3.4vw, 2.75rem); border-radius: var(--round-l); background: var(--card); }
.mix-name { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); line-height: 1.15; letter-spacing: -.025em; font-weight: 700; color: var(--navy); }
.mix-name:focus { outline: none; }
.mix-blurb { margin-top: .375rem; max-width: 42rem; font-size: var(--lede); color: var(--muted); }
.mix-bar { display: flex; height: 4rem; margin-top: 1.75rem; overflow: hidden; border-radius: 1rem; background: var(--blue-soft); font-size: 1.125rem; font-weight: 700; }
.mix-bar span { display: flex; align-items: center; justify-content: center; min-width: 0; overflow: hidden; white-space: nowrap; transition: flex-basis .35s ease; }
.mix-legend { list-style: none; margin: 1.75rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); column-gap: 4rem; font-size: 1.125rem; }
@media (min-width: 48rem) { .mix-legend { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.mix-legend li { display: flex; flex-wrap: wrap; align-items: center; gap: 0 .75rem; padding: .75rem 0; border-top: 1px solid var(--hair); }
.mix-legend b { margin-left: auto; color: var(--navy); }
.swatch { width: 1rem; height: 1rem; flex: none; border-radius: .3125rem; }
/* What goes inside: four cards, each with a square in the colour of that part. */
.blocks { list-style: none; margin: 2.5rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 40rem) { .blocks { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 64rem) { .blocks { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.blocks li { padding: 1.75rem; border-radius: var(--round-m); background: var(--card); }
.blocks li::before { content: ""; display: block; width: 2.25rem; height: 2.25rem; margin-bottom: 1.5rem; border-radius: .6875rem; background: var(--c, var(--blue)); }
.blocks p { margin-top: .625rem; color: var(--muted); }

/* ---------- Digital Advisor ---------- */

.advisor-grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.5rem; align-items: start; }
@media (min-width: 60rem) { .advisor-grid { grid-template-columns: minmax(0, 22rem) minmax(0, 1fr); } }
/* Her card beside the chat */
.profile { overflow: hidden; border-radius: var(--round-l); background: var(--card); }
.profile .joy-stage img { width: min(13.75rem, 60%); }
.profile-body { display: flex; flex-direction: column; gap: 1.25rem; padding: 1.75rem clamp(1.5rem, 4vw, 2rem) 2rem; }
.profile h2 { font-size: 1.875rem; line-height: 1.15; letter-spacing: -.02em; }
.role { margin-top: .125rem; font-weight: 600; color: var(--blue); }
.profile .fine { padding-top: 1.25rem; border-top: 1px solid var(--hair); }
/* The chat */
.chatbox { display: flex; flex-direction: column; overflow: hidden; border-radius: var(--round-l); background: var(--card); }
.chatbox-head { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem .875rem; padding: 1.125rem clamp(1.125rem, 3vw, 1.5rem); background: var(--blue-soft); }
.chatbox-head .avatar { background: var(--paper); }
.who { display: flex; flex-direction: column; line-height: 1.3; }
.who strong { font-size: 1.125rem; color: var(--navy); }
.who span { font-size: .9375rem; color: var(--muted); }
.progress { margin-left: auto; padding: .25rem .875rem; border-radius: 999px; background: var(--paper); color: var(--navy); font-size: .9375rem; font-weight: 600; white-space: nowrap; }
.chat-log { display: flex; flex-direction: column; gap: .875rem; min-height: 22rem; max-height: 38rem; padding: clamp(1.125rem, 3vw, 1.5rem); overflow-y: auto; }
.bot-row { display: flex; align-items: flex-end; gap: .625rem; max-width: 92%; }
.bot-row .avatar { width: 2.25rem; height: 2.25rem; }
.msg { max-width: min(32.5rem, 86%); padding: .875rem 1.125rem; border-radius: 1.25rem; overflow-wrap: anywhere; }
.bot-row .msg { max-width: 100%; }
.msg.bot { align-self: flex-start; background: var(--inset); border-bottom-left-radius: .375rem; }
.msg.me { align-self: flex-end; background: var(--blue); color: #fff; font-weight: 600; border-bottom-right-radius: .375rem; }
/* Three dots while Ate Joy is writing */
.typing { display: inline-flex; gap: .3125rem; padding: 1.125rem 1.125rem; background: var(--inset); border-radius: 1.25rem; border-bottom-left-radius: .375rem; }
.typing i { width: .5rem; height: .5rem; border-radius: 50%; background: var(--muted); opacity: .45; }
@media (prefers-reduced-motion: no-preference) {
  .typing i { animation: blink 1s infinite; }
  .typing i:nth-child(2) { animation-delay: .15s; }
  .typing i:nth-child(3) { animation-delay: .3s; }
}
@keyframes blink { 50% { opacity: 1; } }
.answers { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; min-height: 5.5rem; padding: 1.25rem clamp(1.125rem, 3vw, 1.5rem) 1.5rem; border-top: 1px solid var(--hair); }
.answer {
  min-height: 3rem; padding: .5rem 1.375rem;
  border: 1.5px solid var(--blue); border-radius: 999px;
  background: var(--paper); color: var(--blue); font: inherit; font-weight: 600; cursor: pointer;
}
.answer:hover { background: var(--blue); color: #fff; }
/* The field for typing to Ate Joy. Hidden until the chat with the server is switched on (js/config.js). */
.chat-form { display: flex; gap: .625rem; padding: 0 clamp(1.125rem, 3vw, 1.5rem) 1.5rem; }
.chat-form input { flex: 1; min-width: 0; min-height: 3rem; padding: .5rem 1.125rem; border: 1px solid var(--field); border-radius: 999px; background: #fff; color: var(--ink); font: inherit; }
.chat-form input:focus-visible { outline-offset: 1px; border-color: var(--blue); }
/* The plan at the end of the chat */
.result { align-self: stretch; padding: 1.375rem clamp(1.125rem, 3vw, 1.5rem) 1.5rem; border-radius: 1.25rem; background: var(--inset); }
.result .mix-name { font-size: 1.625rem; }
.result .mix-blurb { font-size: 1.0625rem; }
.result .mix-bar { height: 2.75rem; margin-top: 1.25rem; border-radius: .75rem; font-size: .9375rem; }
.result .mix-legend { margin-top: 1rem; grid-template-columns: minmax(0, 1fr); font-size: 1rem; }
.result .mix-legend li { padding: .5rem 0; border-top-color: var(--line); }
.result-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .625rem; margin-top: 1.25rem; }
.demo-note { margin-top: 1rem; font-size: .9375rem; color: var(--muted); }

/* ---------- Market Update ---------- */

/*
  One update, built by js/market.js: the title and the sentence on top, then the video beside
  the numbers, then what happened beside what it means, and the word across the bottom.
  Phones: everything in one column.
*/
.update { margin-top: 2rem; overflow: hidden; border-radius: var(--round-l); background: var(--card); }
/* minmax(0, 1fr): a wide table can never push a column wider than the card. */
.update-body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2.25rem; padding: clamp(1.5rem, 3.4vw, 2.75rem); }
.update-meta { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem .75rem; margin-bottom: .625rem; font-size: .9375rem; font-weight: 600; color: var(--muted); }
.update-title { font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); line-height: 1.15; letter-spacing: -.025em; }
/* The title receives focus after "Read" so that screen readers announce the new update. It is not a control. */
.update-title:focus { outline: none; }
.update-label { font-size: .9375rem; line-height: 1.4; font-weight: 600; color: var(--muted); }
.update-head .update-label { margin-top: 1.375rem; }
.update-summary { margin-top: .5rem; max-width: 56rem; font-size: clamp(1.3125rem, 1.1rem + .8vw, 1.6875rem); line-height: 1.3; letter-spacing: -.01em; font-weight: 600; color: var(--navy); text-wrap: balance; }
.update-cols { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.75rem 2.5rem; align-items: start; }
@media (min-width: 64rem) { .update-cols { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); } }
/* A row with only one part (no video, or no numbers) lets that part take the whole width. */
.update-cols > :only-child { grid-column: 1 / -1; }
.update-main { min-width: 0; }
/*
  The video keeps its shape (16 by 9) and the width of its column. width: 100% matters: without
  it, a tall box of numbers beside the video would stretch the video and push it over the numbers.
*/
.update-cols > .video { width: 100%; border-radius: 1.25rem; overflow: hidden; font-size: 1rem; }
/* The box of numbers is as tall as the video when the video is the taller of the two. */
.update-cols > .video + .update-box { align-self: stretch; }
.update-cols > .video .play { width: 4rem; height: 4rem; }
.update-points { list-style: none; margin: .875rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.125rem; }
.update-points strong { display: block; font-size: 1.1875rem; line-height: 1.35; color: var(--navy); }
.update-points span { display: block; margin-top: .125rem; color: var(--muted); }
.update-box { display: flex; flex-direction: column; align-items: flex-start; padding: 1.5rem clamp(1rem, 3vw, 1.75rem) 1rem; border-radius: 1.25rem; background: var(--inset); min-width: 0; overflow-x: auto; }
.update-box > p + p { margin-top: .5rem; font-size: 1.125rem; color: var(--navy); }
.update-box .text-link { margin-top: .25rem; }
.update-numbers { align-self: stretch; width: 100%; margin-top: .375rem; border-collapse: collapse; }
.update-numbers th, .update-numbers td { padding: .75rem 0; border-top: 1px solid var(--line-mist); }
.update-numbers tr:first-child th, .update-numbers tr:first-child td { border-top: 0; }
.update-numbers th { text-align: left; font-weight: 400; }
.update-numbers td { padding-left: .75rem; text-align: right; font-weight: 700; color: var(--navy); white-space: nowrap; }
.update-part { display: inline-flex; align-items: center; gap: .625rem; }
/* A row that is not one of the four parts of a plan gets an empty square. */
.update-part .swatch { width: .875rem; height: .875rem; border-radius: .25rem; border: 2px solid var(--field); }
.update-part .swatch.filled { border: 0; }
/* max-width: none, so the table counts the arrow when it works out how wide the column must be. */
.update-arrow { display: inline-block; width: 1.125rem; height: 1.125rem; max-width: none; margin-right: .375rem; vertical-align: -.16em; fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
.update-word { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem 3rem; padding: 1.5rem clamp(1.5rem, 3.4vw, 2.75rem) 1.75rem; border-top: 1px solid var(--hair); }
.update-word > div { flex: 0 1 13.75rem; }
.update-term { margin-top: .125rem; font-size: 1.625rem; line-height: 1.2; letter-spacing: -.015em; font-weight: 700; color: var(--blue); }
.update-word > p { flex: 1 1 22.5rem; min-width: 0; }

/* List of updates: open for members, with a "For members" badge for everyone else. */
.update-list { list-style: none; margin: 1.5rem 0 0; padding: 0; overflow: hidden; border-radius: var(--round-m); background: var(--card); }
.update-list li + li { border-top: 1px solid var(--hair); }
.update-row { display: grid; grid-template-columns: minmax(0, 1fr); align-items: center; gap: .125rem 1.5rem; padding: 1rem clamp(1.125rem, 3vw, 1.5rem); color: var(--ink); text-decoration: none; }
@media (min-width: 48rem) { .update-row { grid-template-columns: 19rem minmax(0, 1fr) auto; } }
.update-row.locked { grid-template-columns: minmax(0, 1fr) auto; }
.update-row strong { color: var(--navy); }
.update-kind { display: block; font-size: .9375rem; font-weight: 400; color: var(--muted); }
a.update-row:hover, .update-row[aria-current="true"] { background: var(--blue-soft); }
a.update-row:focus-visible { outline-offset: -3px; }
.update-read { font-weight: 600; color: var(--blue); }
.update-row[aria-current="true"] .update-read { color: var(--muted); }
.update-more { margin-top: clamp(2.5rem, 6vw, 3.5rem); font-size: clamp(1.75rem, 1.3rem + 1.6vw, 2.375rem); }
/* The members area: a list of locked updates can sit above the call to join. */
#market-members > .update-list:first-child { margin-top: 0; }
.update-list + .cta-band { margin-top: 1.5rem; }

/* ---------- Calculators ---------- */

/*
  Both calculators: what you type on the left, the result on the right. They stand beside each
  other when both fit (from about laptop width) and below each other when they do not: on phones
  and tablets, and when someone has made the text much larger. No screen width is written down
  here: the widths the two parts wish for (flex-basis) decide.
*/
.calc { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 2.5rem 3.5rem; }
/* 1 to 999: on a shared line the fields keep their width and the result takes the room that is left. */
.calc-inputs, .wealth-inputs { flex: 1 1 23rem; min-width: 0; padding: clamp(1.25rem, 3vw, 2rem); border-radius: var(--round-l); background: var(--card); }
.wealth-inputs { flex-basis: 27rem; }
.calc-inputs .choices.three { grid-template-columns: minmax(0, 1fr); }
/* min-width: 0, so a wide chart or table can never push the page wider than the screen. */
.calc-result { flex: 999 1 31rem; min-width: 0; }
.calc.wealth .calc-result { flex-basis: 27rem; }
.calc-result > :first-child { margin-top: 0; }
.calc-stats + .calc-lead { margin-top: 1.5rem; }
.calc-lead { font-size: var(--lede); color: var(--muted); }
.calc-hero { margin-top: .25rem; font-size: clamp(2.75rem, 1.6rem + 5vw, 4.5rem); line-height: 1.05; letter-spacing: -.035em; font-weight: 700; color: var(--navy); overflow-wrap: anywhere; }
.calc-range { margin-top: .625rem; max-width: 36rem; color: var(--muted); }
/* The two figures stand beside each other when both fit, otherwise one below the other. */
.calc-stats { display: flex; flex-wrap: wrap; gap: .875rem 3rem; margin: 1.75rem 0 0; }
.calc-stats dt { font-size: 1rem; color: var(--muted); }
.calc-stats dd { margin: 0; font-size: 1.625rem; line-height: 1.25; letter-spacing: -.015em; font-weight: 700; color: var(--navy); }
/* The key of the chart */
.calc-legend { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin: 2.25rem 0 .875rem; padding: 0; font-size: .9375rem; color: var(--muted); }
.calc-legend li { display: flex; align-items: center; gap: .5rem; }
.key { width: 1.625rem; height: .75rem; flex: none; }
.key-line { height: 0; border-top: 3px solid var(--blue); }
.key-band { background: var(--blue-soft); border-radius: 2px; }
.key-dash { height: 0; border-top: 3px dashed var(--muted); }
.key-today { background: var(--blue); border-radius: 2px; }
.key-future { background: var(--blue-soft); border-radius: 2px; }
.calc-chart-wrap { position: relative; }
#calc-chart svg { display: block; max-width: none; touch-action: pan-y; font-family: inherit; }
/* The small box that follows the pointer on the chart */
.calc-tip {
  position: absolute; z-index: 2; pointer-events: none;
  display: grid; gap: .125rem; min-width: 13.5rem; padding: .75rem .875rem;
  background: #fff; border: 1px solid var(--line-strong); border-radius: var(--round-s);
  font-size: .9375rem; line-height: 1.4;
}
.calc-tip strong { color: var(--navy); margin-bottom: .125rem; }
.calc-tip > span { display: flex; justify-content: space-between; gap: 1rem; color: var(--muted); }
.calc-tip b { color: var(--ink); }
.calc-details { margin-top: 1.25rem; }
.table-scroll { overflow-x: auto; margin-top: .5rem; }
.calc-table { border-collapse: collapse; width: 100%; min-width: 24rem; font-size: .9375rem; font-variant-numeric: tabular-nums; }
.calc-table.wide { min-width: 34rem; }
.calc-table th, .calc-table td { padding: .625rem .75rem; text-align: right; border-bottom: 1px solid var(--line); white-space: nowrap; }
.calc-table th:first-child { text-align: left; }
.calc-table thead th { color: var(--muted); font-weight: 600; }
.calc-table tbody th { font-weight: 600; color: var(--navy); }

/* Wealth Calculator: on a computer the result stays in view while the long list of fields scrolls. */
@media (min-width: 60rem) { .calc.wealth .calc-result { position: sticky; top: 1.5rem; } }
@media (min-width: 90rem) and (min-height: 45rem) { .calc.wealth .calc-result { top: 6.5rem; } }
/* One group of two amounts per kind of asset */
.wealth-row { margin: 1.25rem 0 0; padding: 1.25rem 0 0; border: 0; border-top: 1px solid var(--hair); min-width: 0; }
.wealth-row legend { float: left; width: 100%; padding: 0; margin-bottom: .625rem; }
.wealth-name { display: block; font-size: 1.125rem; font-weight: 700; color: var(--navy); }
.wealth-hint { display: block; font-size: .9375rem; color: var(--muted); }
.wealth-pair { clear: both; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.wealth-field label { display: block; margin-bottom: .3125rem; font-size: .9375rem; color: var(--muted); }
.wealth-years { margin-top: 1.5rem; padding-top: 1.25rem; border-top: 1px solid var(--hair); }
.wealth-save { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid var(--hair); }
.wealth-save .hint { font-size: .9375rem; color: var(--muted); }
.wealth-save .note { margin-top: .625rem; }
/* The result: one bar per asset. The dark part is today, the pale part is what it could become. */
.wealth-list { list-style: none; margin: .5rem 0 0; padding: 0; display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.375rem; }
.wealth-item-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.wealth-item-name { font-weight: 600; color: var(--navy); }
.wealth-item-value { font-weight: 700; color: var(--navy); font-variant-numeric: tabular-nums; }
.wealth-bar { position: relative; height: 1.125rem; margin-top: .375rem; overflow: hidden; border-radius: .375rem; background: var(--mist); }
.wealth-bar span { position: absolute; left: 0; top: 0; height: 100%; }
.wealth-bar-future { background: var(--blue-soft); }
.wealth-bar-today { background: var(--blue); border-right: 2px solid #fff; }
.wealth-item-detail { margin-top: .375rem; font-size: .9375rem; color: var(--muted); }

/* ---------- Pricing ---------- */

.plans { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }
@media (min-width: 48rem) { .plans { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: stretch; } }
.plan { display: flex; flex-direction: column; align-items: flex-start; gap: 1.25rem; padding: clamp(1.5rem, 3vw, 2.25rem); border: 2px solid transparent; border-radius: var(--round-l); background: var(--card); }
/* The plan we want people to notice has a blue edge. */
.plan.featured { border-color: var(--blue); }
.plan h2 { font-size: 1.625rem; line-height: 1.2; letter-spacing: -.015em; }
.price { font-size: clamp(1.875rem, 1.5rem + 1.4vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; font-weight: 700; color: var(--navy); }
.price-period { color: var(--muted); }
.plan .checks { align-self: stretch; }
.plan .btn { margin-top: auto; }

/* ---------- Log in, sign up, account: a white card on the pale blue title area ---------- */

.auth-card { max-width: 30rem; padding: clamp(1.5rem, 5vw, 2.75rem); border-radius: var(--round-l); background: var(--paper); --card: var(--mist); --hair: var(--line); }
.auth-card h1 { font-size: clamp(1.875rem, 1.4rem + 2vw, 2.5rem); line-height: 1.1; letter-spacing: -.03em; }
.auth-card .form { margin-top: 1.5rem; }
.auth-card .notice + .btn { margin-top: 1.25rem; }
.auth-alt { margin-top: 1.25rem; color: var(--muted); }
.account-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.5rem; margin-top: 1.5rem; }
.account-actions + .form-error, .facts + .form-error { margin-top: 1rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .mix-bar span { transition: none; }
}
