/* The pricing page (src/packaging-ui.js): a hero with the call, one bar under the nav carrying the
   jump links and the one monthly or yearly switch, a segment per product with three equal columns,
   the platform band, the Enterprise band, the feature groups and the questions. The construction
   borrows magicschool.ai/pricing's (equal columns, the plan in the column head, one table grouped by
   category with a plain line under each feature); the colours, type and words are ours.

   What keeps it tidy at every width: each column is a subgrid of the segment, so a name, a price, a
   billing line, the limits and the call sit on the same line in all three columns whatever wraps
   above them; prices, units, chips and calls never wrap; both billing lines share one cell so
   flipping the period moves nothing; three columns hold down to 761 px, and below that the columns
   stack. */

/* Deep links (/pricing#marlo from the product pages) must land under the bar. Chromium computes a
   smooth fragment scroll before the web fonts settle and never corrects it, which left #margin
   57 px short at 1440; an instant scroll is re-aimed once layout settles. This sheet loads only
   on /pricing, so the rest of the site keeps its smooth scrolling. */
html{scroll-behavior:auto}

/* ---------- the hero ---------- */

.price-hero{padding-bottom:clamp(28px,3vw,40px)}
.price-hero .lede{text-wrap:pretty}
.price-hero .call-note{max-width:66ch;text-wrap:pretty}
.hero-jump{display:none}

/* ---------- the bar: where each plan is, and the one switch ---------- */

.pricing{position:relative}
.price-bar{position:sticky;top:var(--nav-h);z-index:40;background:rgba(243,245,246,.93);-webkit-backdrop-filter:saturate(1.4) blur(12px);backdrop-filter:saturate(1.4) blur(12px);border-block:1px solid var(--rule-soft)}
.price-bar-in{display:flex;align-items:center;justify-content:space-between;gap:16px;padding-block:9px}
.price-jump{display:flex;align-items:center;gap:2px;min-width:0}
.price-jump a{display:inline-flex;align-items:center;min-height:40px;padding:0 12px;border-radius:var(--r-sm);color:var(--navy);font-weight:700;font-size:14.5px;line-height:1;text-decoration:none;white-space:nowrap;transition:background-color .15s,color .15s}
.price-jump a:hover{background:var(--white);color:var(--emerald-ink)}
.price-bar .period{margin:0;flex:0 0 auto}
.period-choice{white-space:nowrap}

/* ---------- a product segment ---------- */

.seg{padding-top:clamp(56px,6vw,88px);scroll-margin-top:calc(69px - clamp(56px,6vw,88px))}
.seg-head{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1.7fr);gap:14px 48px;align-items:end;margin-bottom:28px}
.seg-id .cue{margin-bottom:8px}
.seg-id h2{margin:0;font-size:clamp(32px,3.6vw,44px);line-height:1}
.seg-what{margin:0;color:var(--slate);font-size:16.5px;line-height:1.55;max-width:62ch;text-wrap:pretty}
.seg-start{margin:10px 0 0;font-size:14.5px;line-height:1.5;color:var(--faint);display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 18px}
.seg-start>span{text-wrap:pretty}
.seg-start .thread-link{margin-top:0;white-space:nowrap}
.seg-foot{margin:18px 0 0;font-size:13.5px;color:var(--faint);text-wrap:pretty}

/* the three sizes: one grid, each column a subgrid of its seven rows */
.sizes{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));column-gap:20px;row-gap:0}
.size{position:relative;display:flex;flex-direction:column;min-width:0;background:var(--white);border:1px solid var(--rule);border-radius:var(--r-lg);padding:26px 24px 6px;box-shadow:var(--shadow-sm)}
@supports (grid-template-rows:subgrid){
  .sizes{grid-template-rows:repeat(7,auto)}
  .size{display:grid;grid-row:span 7;grid-template-rows:subgrid;row-gap:0}
}
.size.featured{border-color:var(--emerald);box-shadow:inset 0 3px 0 var(--emerald),var(--shadow)}
#marlo .size.featured{border-color:var(--navy);box-shadow:inset 0 3px 0 var(--navy),var(--shadow)}

.size-name{margin:0;font-size:22px;line-height:1.2}
.size-for{margin:6px 0 0;font-size:15px;line-height:1.45;color:var(--slate);text-wrap:pretty}

.size .price{margin:20px 0 0;display:flex;align-items:baseline;white-space:nowrap;font-family:var(--font-display);font-weight:600;font-size:clamp(38px,3.4vw,46px);line-height:1;letter-spacing:-.03em;color:var(--navy);font-variant-numeric:tabular-nums}
.size .price .amount{display:inline-block}
.size .price .unit{margin-left:8px;font-family:var(--font-text);font-weight:600;font-size:15px;letter-spacing:0;color:var(--slate)}

.bill{display:grid;margin-top:10px}
.bill>p{grid-area:1/1;margin:0;display:flex;flex-direction:column;align-items:flex-start;gap:5px;font-size:13.5px;line-height:1.35;color:var(--faint)}
.bill span{white-space:nowrap}
.bill>p>span:first-child{color:var(--navy);font-weight:600}
.bill .per-year{visibility:hidden}
.pricing[data-period='year'] .bill .per-month{visibility:hidden}
.pricing[data-period='year'] .bill .per-year{visibility:visible}
.bill .saving{font-family:var(--font-mono);font-weight:500;font-size:10.5px;letter-spacing:.08em;line-height:1.3;text-transform:uppercase;color:var(--emerald-ink);background:var(--emerald-wash);padding:3px 7px;border-radius:var(--r-xs)}

.limits{list-style:none;margin:20px 0 0;padding:18px 0 0;border-top:1px solid var(--rule-soft);display:grid;gap:9px;align-content:start}
.limits li{position:relative;padding-left:26px;font-size:14.5px;line-height:1.4;color:var(--navy);text-wrap:pretty}
.limits li::before{content:'';position:absolute;left:4px;top:.2em;width:7px;height:12px;border:solid var(--emerald-ink);border-width:0 2.4px 2.4px 0;transform:rotate(45deg)}
#marlo .limits li::before{border-color:var(--navy)}
.limits li.off{color:var(--faint)}
.limits li.off::before{left:2px;top:.68em;width:11px;height:0;border-width:0 0 2px;border-color:var(--mist);transform:none}
.limits b{font-weight:700;font-variant-numeric:tabular-nums}

.size-call{margin-top:22px}
.size-form,.bundle-form{margin:0}
.size-call .stamp-call,.size-call .desk-call{width:100%;min-height:52px;padding-block:0;justify-content:center}
.stamp-call.solid{background:var(--emerald-ink);color:#fff}
.stamp-call.solid:hover,.stamp-call.solid:focus-visible{background:var(--emerald-deep);border-color:var(--emerald-deep);color:#fff}
.size-call .desk-call{padding-inline:18px;font-size:15.5px}
.desk-call.quiet{background:var(--white);color:var(--navy);box-shadow:inset 0 0 0 2px var(--navy)}
.desk-call.quiet:hover,.desk-call.quiet:focus-visible{background:var(--navy);color:#fff}

/* What's included: a disclosure under the call, so the column stays short */
.incl{margin-top:14px;border-top:1px solid var(--rule-soft)}
.incl>summary{list-style:none;cursor:pointer;display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:48px;font-weight:700;font-size:14.5px;color:var(--emerald-ink);border-radius:var(--r-xs);transition:color .15s}
#marlo .incl>summary{color:var(--navy)}
.incl>summary::-webkit-details-marker{display:none}
.incl>summary:hover{color:var(--navy)}
#marlo .incl>summary:hover{color:var(--emerald-ink)}
.chev{flex:0 0 auto;transition:transform .2s var(--ease-out)}
details[open]>summary .chev{transform:rotate(180deg)}
.incl-list{list-style:none;margin:0;padding:2px 0 16px;display:grid;gap:8px}
.incl-list li{position:relative;padding-left:20px;font-size:14px;line-height:1.45;color:var(--slate);text-wrap:pretty}
.incl-list li::before{content:'';position:absolute;left:1px;top:.64em;width:9px;height:2px;border-radius:1px;background:var(--emerald)}
#marlo .incl-list li::before{background:var(--navy)}
.incl-list b{color:var(--navy);font-weight:700}

/* where a checkout sends the visitor back with a note (site.js fills it) */
.checkout-slot .desk-note{margin-top:16px}

/* ---------- Daybook (src/packaging-daybook.js): for each teacher, monthly only ----------
   The price is printed as Daybook prints it ("$29", "CA$41"), its currency named in the line under
   it; the unit may drop under the figure in a narrow column, and the yearly view keeps the price and
   says yearly is not offered. */

#daybook .size .price{flex-wrap:wrap;row-gap:6px}
.bill .db-noyear{background:var(--draft-wash);color:var(--slate)}
.bundle-note{margin:0;font-size:13px;line-height:1.5;color:var(--slate);text-wrap:pretty}
/* the platform's three parts side by side where there is room; one column on a phone, as before */
@media (min-width:761px){.bundle-groups:has(>.bundle-group:nth-child(3):not(.soon-row)){grid-template-columns:repeat(3,minmax(0,1fr));gap:22px 26px}}

/* ---------- the platform ---------- */

.bundle{display:grid;grid-template-columns:minmax(0,1.32fr) minmax(0,.68fr);background:var(--white);border:1px solid var(--rule);border-radius:var(--r-xl);box-shadow:var(--shadow);overflow:hidden}
.bundle-main{padding:clamp(26px,3.4vw,40px)}
.bundle-main .cue{margin-bottom:10px}
.bundle-main h2{margin:0 0 12px;font-size:clamp(26px,2.8vw,34px);line-height:1.15}
.bundle-what{margin:0;color:var(--slate);max-width:60ch;text-wrap:pretty}
.bundle-groups{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:22px 32px;margin-top:28px}
.bundle-group.soon-row{grid-column:1/-1;display:flex;flex-wrap:wrap;align-items:baseline;gap:4px 16px;padding-top:18px;border-top:1px solid var(--rule-soft)}
.bundle-group.soon-row .bundle-group-h{margin:0}
.bundle-group.soon-row .list li{margin-bottom:0}
.bundle-group-h{display:flex;align-items:center;flex-wrap:wrap;gap:6px 8px;margin:0 0 10px;font-family:var(--font-mono);font-weight:500;font-size:10.5px;letter-spacing:.1em;line-height:1.4;text-transform:uppercase;color:var(--faint)}
.bundle .list li{font-size:14.5px;line-height:1.45;text-wrap:pretty}
.bundle-side{display:flex;flex-direction:column;justify-content:center;gap:10px;padding:clamp(26px,3.4vw,40px);background:var(--emerald-wash)}
.bundle-side .price{margin:0;display:flex;align-items:baseline;white-space:nowrap;font-family:var(--font-display);font-weight:600;font-size:clamp(44px,4.4vw,56px);line-height:1;letter-spacing:-.03em;color:var(--navy);font-variant-numeric:tabular-nums}
.bundle-side .price .unit{margin-left:8px;font-family:var(--font-text);font-weight:600;font-size:16px;letter-spacing:0;color:var(--slate)}
.bundle-bill{margin:0;font-size:14px;color:#0C3B28;font-weight:600}
.bundle-sum{margin:4px 0 0;display:grid;gap:3px}
.bundle-sum>div{display:flex;flex-wrap:wrap;align-items:baseline;gap:2px 8px}
.bundle-sum dt,.bundle-sum dd{margin:0;font-size:14px;line-height:1.45;color:var(--slate)}
.bundle-sum s{color:var(--slate)}
.bundle-save{align-self:flex-start;margin:4px 0 0;padding:5px 9px;border-radius:var(--r-xs);background:var(--emerald-ink);color:#fff;font-family:var(--font-mono);font-weight:500;font-size:11px;letter-spacing:.08em;line-height:1.3;text-transform:uppercase;white-space:nowrap}
.bundle-calls{display:flex;flex-wrap:wrap;align-items:center;gap:12px;margin-top:12px}
.bundle-calls .lean-call{background:var(--white)}

/* ---------- Enterprise ---------- */

.ent{display:grid;grid-template-columns:minmax(0,1.15fr) minmax(0,1fr) minmax(0,.75fr);gap:26px 40px;align-items:center;padding:clamp(26px,3.4vw,40px);border-radius:var(--r-xl);background:var(--navy);color:#fff}
.ent .cue{color:var(--emerald-bright);margin-bottom:10px}
.ent h2{margin:0 0 10px;font-size:clamp(26px,2.8vw,34px);line-height:1.15;color:#fff}
.ent-main p{margin:0;color:#C9D3DD;text-wrap:pretty}
.ent-list{list-style:none;margin:0;padding:0;display:grid;gap:10px}
.ent-list li{position:relative;padding-left:26px;font-size:15px;line-height:1.45;color:#fff;text-wrap:pretty}
.ent-list li::before{content:'';position:absolute;left:4px;top:.2em;width:7px;height:12px;border:solid var(--emerald-bright);border-width:0 2.4px 2.4px 0;transform:rotate(45deg)}
.ent-call p{margin:12px 0 0;font-size:13.5px;line-height:1.5;color:var(--mist);text-wrap:pretty}
.lean-call.on-navy{border-color:#fff;color:#fff}
.lean-call.on-navy:hover,.lean-call.on-navy:focus-visible{color:#fff;box-shadow:inset 0 0 0 1px #fff}

/* ---------- the feature groups ---------- */

.cmp-wrap{margin-top:30px}
.cmp{display:grid;gap:12px}
/* No overflow:hidden on the group, so the column labels can stay pinned under the nav while a
   long group scrolls; the bar carries the rounding instead. */
.cmp-group{background:var(--white);border:1px solid var(--rule);border-radius:var(--r-lg);box-shadow:var(--shadow-sm)}
.cmp-group>summary{list-style:none;cursor:pointer;display:grid;grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:4px 16px;min-height:60px;padding:14px 22px;background:var(--navy);color:#fff;border-radius:calc(var(--r-lg) - 1px)}
.cmp-group[open]>summary{border-radius:calc(var(--r-lg) - 1px) calc(var(--r-lg) - 1px) 0 0}
.cmp-group>summary::-webkit-details-marker{display:none}
.cmp-name{font-family:var(--font-display);font-weight:600;font-size:16.5px;letter-spacing:-.005em;line-height:1.3;white-space:nowrap}
.cmp-blurb{font-size:14px;line-height:1.4;color:var(--mist);text-wrap:pretty}
.cmp-group>summary:hover .cmp-name{text-decoration:underline;text-underline-offset:4px;text-decoration-thickness:1px}
.cmp-group>summary .chev{color:#fff}
.cmp-table{width:100%;border-collapse:separate;border-spacing:0;table-layout:fixed;font-size:15px}
.cmp-table th,.cmp-table td{padding:13px 16px;border-bottom:1px solid var(--rule-soft);vertical-align:middle}
.cmp-table thead th{position:sticky;top:var(--nav-h);z-index:2;padding-block:11px;background:var(--white);text-align:center;font-family:var(--font-mono);font-weight:500;font-size:11px;letter-spacing:.1em;line-height:1.3;text-transform:uppercase;white-space:nowrap;color:var(--faint);border-bottom-color:var(--rule);box-shadow:0 1px 0 var(--rule)}
.cmp-table thead th:first-child{width:38%}
.cmp-table tbody th{text-align:left;font-weight:400}
.cmp-table tbody th b{display:flex;align-items:center;flex-wrap:wrap;gap:4px 8px;font-weight:700;font-size:15px;line-height:1.35;color:var(--navy)}
.cmp-table tbody th span{display:block;margin-top:3px;font-size:13.5px;line-height:1.45;color:var(--slate);text-wrap:pretty}
.cmp-table td{text-align:center;color:var(--slate);border-left:1px solid var(--rule-soft)}
.cmp-table thead th+th{border-left:1px solid var(--rule-soft)}
.cmp-table td:nth-child(4),.cmp-table thead th:nth-child(4){background:var(--paper)}
.cmp-table tbody tr:last-child th,.cmp-table tbody tr:last-child td{border-bottom:none}
.cmp-table tbody tr:last-child th{border-bottom-left-radius:calc(var(--r-lg) - 1px)}
.cmp-table tbody tr:last-child td:last-child{border-bottom-right-radius:calc(var(--r-lg) - 1px)}
.m-yes{color:var(--emerald-ink);margin-inline:auto}
.m-no{color:var(--mist);margin-inline:auto}
.m-text{display:inline-block;font-size:13.5px;line-height:1.4;color:var(--navy);text-wrap:balance}
.m-text small{display:block;font-size:12.5px;color:var(--slate)}

/* ---------- motion: additive, and only what moves ---------- */

@media (prefers-reduced-motion:no-preference){
  .size .price.tick .amount{animation:tick .34s var(--ease-out)}
}
/* The disclosures open by sliding where the browser can size to auto; elsewhere they snap open. */
@supports (interpolate-size:allow-keywords){
  .incl,.cmp-group{interpolate-size:allow-keywords}
  .incl::details-content,.cmp-group::details-content{block-size:0;overflow:clip;transition:block-size .28s var(--ease-out),content-visibility .28s allow-discrete}
  .incl[open]::details-content,.cmp-group[open]::details-content{block-size:auto}
}

/* ---------- narrower: the content decides where it gives ---------- */

@media (max-width:1060px){
  .bundle{grid-template-columns:minmax(0,1fr)}
  .ent{grid-template-columns:minmax(0,1fr) minmax(0,1fr)}
  .ent-main{grid-column:1/-1}
}
@media (max-width:960px){
  .size{padding:22px 20px 4px}
  .sizes{column-gap:16px}
  .cmp-table thead th:first-child{width:32%}
  .cmp-table thead th{font-size:10.5px;letter-spacing:.06em}
}
@media (max-width:860px){
  .seg-head{grid-template-columns:minmax(0,1fr);align-items:start}
}
@media (max-width:760px){
  .price-jump{display:none}
  .price-bar-in{justify-content:center}
  .hero-jump{display:flex;flex-wrap:wrap;gap:8px;margin-top:22px}
  .hero-jump a{display:inline-flex;align-items:center;min-height:40px;padding:0 14px;border:1px solid var(--rule);border-radius:var(--r-sm);background:var(--white);color:var(--navy);font-weight:700;font-size:14.5px;line-height:1;text-decoration:none;white-space:nowrap}
  .hero-jump a:hover{border-color:var(--emerald-ink);color:var(--emerald-ink)}
  .sizes{grid-template-columns:minmax(0,1fr);grid-template-rows:none;row-gap:14px}
  .size{display:flex;grid-row:auto;padding:22px 20px 4px}
  .bundle-groups{grid-template-columns:minmax(0,1fr)}
  /* the table becomes a card per feature, its four answers labelled */
  .cmp-table,.cmp-table tbody,.cmp-table tr,.cmp-table th,.cmp-table td{display:block}
  .cmp-table thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  .cmp-table tbody tr{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:8px;padding:14px 16px;border-bottom:1px solid var(--rule-soft)}
  .cmp-table tbody tr:last-child{border-bottom:none}
  .cmp-table tbody th{grid-column:1/-1;padding:0 0 4px;border:0}
  .cmp-table td{display:flex;flex-direction:column;align-items:flex-start;gap:6px;padding:9px 11px;border:1px solid var(--rule-soft);border-radius:var(--r-sm);text-align:left;background:var(--white)}
  .cmp-table td:nth-child(4){background:var(--paper)}
  .cmp-table tbody tr:last-child td{border-bottom:1px solid var(--rule-soft)}
  .cmp-table td::before{content:attr(data-label);font-family:var(--font-mono);font-weight:500;font-size:10.5px;letter-spacing:.08em;line-height:1.3;text-transform:uppercase;color:var(--faint)}
  .cmp-table td .m-yes,.cmp-table td .m-no{margin:0}
  .m-text{text-wrap:pretty}
}
@media (max-width:640px){
  .ent{grid-template-columns:minmax(0,1fr)}
  .cmp-group>summary{grid-template-columns:minmax(0,1fr) auto;padding:14px 16px}
  .cmp-name{white-space:normal}
  .cmp-blurb{grid-column:1;grid-row:2}
  .cmp-group>summary .chev{grid-column:2;grid-row:1/3}
}
