/* weightlog.app – design direction A ("friendly face") with the sticker mascot of direction B.
   Tokens first, then layout, shared components, home sections and calculator pages. */
@font-face{font-family:"Bricolage Grotesque";src:url(/assets/fonts/bricolage-latin.woff2?v=fce2a3b69c) format("woff2");font-weight:600 800;font-display:swap;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:"Bricolage Grotesque";src:url(/assets/fonts/bricolage-latin-ext.woff2?v=7bbb5d9bf6) format("woff2");font-weight:600 800;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
@font-face{font-family:"Figtree";src:url(/assets/fonts/figtree-latin.woff2?v=68a79c9a8a) format("woff2");font-weight:400 700;font-display:swap;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:"Figtree";src:url(/assets/fonts/figtree-latin-ext.woff2?v=4837c1213a) format("woff2");font-weight:400 700;font-display:swap;unicode-range:U+0100-02BA,U+02BD-02C5,U+02C7-02CC,U+02CE-02D7,U+02DD-02FF,U+0304,U+0308,U+0329,U+1D00-1DBF,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20C0,U+2113,U+2C60-2C7F,U+A720-A7FF}
/* No Cyrillic in either family: Golos Text and Onest fill in, with the same weight range so the browser keeps them in one face set. */
@font-face{font-family:"Bricolage Grotesque";src:url(/assets/fonts/golos-cyrillic.woff2?v=57d21d84ec) format("woff2");font-weight:600 800;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}
@font-face{font-family:"Figtree";src:url(/assets/fonts/onest-cyrillic.woff2?v=536e80ec6c) format("woff2");font-weight:400 700;font-display:swap;unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}

:root {
  --cream: #FFF6EE;
  --cream-2: #FFEEDF;
  --white: #FFFFFF;
  --sky: #DBF5FF;
  --sky-2: #B9E8FA;
  --coral: #FB576F;
  --coral-deep: #BA2B40;
  /* Coral for large text: 3.3:1 on cream, where --coral gives 2.9:1 */
  --coral-text: #F04A63;
  --plum: #3A1C2C;
  --plum-2: #6B4A5B;
  --line: #F1DCCB;
  --mint: #D5F6E8;
  --sun: #FFE8A8;
  --blush: #FFE0E5;
  --green: #03D17B;
  /* Category colours of the app's calculators (res/values/colors.xml) */
  --z-blue: #03A9F4;
  --z-sky: #8ED8F8;
  --z-green: #3BCEAC;
  --z-yellow: #FFC107;
  --z-orange: #FF9800;
  --z-red: #FF5F76;
  --radius: 28px;
  --wrap: 1200px;
  --display: "Bricolage Grotesque", ui-rounded, system-ui, sans-serif;
  --text: "Figtree", system-ui, -apple-system, "Segoe UI", sans-serif;
  --shadow: 0 14px 30px -18px #6b2b3a55;
}
/* Japanese and Korean: Latin letters and digits stay in the site fonts, the rest comes from system fonts. */
html:lang(ja) {
  --display: "Bricolage Grotesque", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
  --text: "Figtree", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", YuGothic, "Noto Sans JP", "Noto Sans CJK JP", Meiryo, sans-serif;
}
html:lang(ko) {
  --display: "Bricolage Grotesque", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif;
  --text: "Figtree", "Apple SD Gothic Neo", "Noto Sans KR", "Noto Sans CJK KR", "Malgun Gothic", sans-serif;
  word-break: keep-all;
}
html:lang(ja) :is(h1, h2, h3) { word-break: auto-phrase; }
/* A calculator name is one compound noun that both Safari and Chrome's phrases split mid-word next to the mascot.
   The Japanese *.h1 strings mark word boundaries with U+200B, and the heading breaks only there. */
html:lang(ja) .calc-head h1 { word-break: keep-all; }
/* Other languages have longer words (German compounds, Japanese phrases): a word that doesn't fit breaks
   rather than pushing the layout sideways, and on phones long words are hyphenated where the browser knows the language. */
html:not(:lang(en)) :is(h1, h2, h3, .lead, .chips li, .calc-tile p, .shelf p, .card p) { overflow-wrap: anywhere; }
@media (max-width: 560px) {
  html:not(:lang(en)) { hyphens: auto; hyphenate-limit-chars: 10 4 4; }
}
html:is(:lang(ja), :lang(ko)) :is(h1, h2, h3) { letter-spacing: 0; }
/* A full-width glyph is about twice as wide as a Latin letter, so the hero phrase needs a smaller size to stay whole. */
html:is(:lang(ja), :lang(ko)) .hero h1 { font-size: clamp(34px, 5vw, 68px); }
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--cream); color: var(--plum); font: 400 18px/1.55 var(--text); -webkit-font-smoothing: antialiased; overflow-x: clip; }
img, svg { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3 { font-family: var(--display); letter-spacing: -.03em; margin: 0; overflow-wrap: break-word; }
h1 { font-size: clamp(42px, 6vw, 80px); line-height: 1; font-weight: 800; }
h2 { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.04; font-weight: 800; }
h3 { font-size: 24px; line-height: 1.12; font-weight: 750; }
[hidden] { display: none !important; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--plum); color: #fff; padding: 8px 14px; border-radius: 10px; z-index: 20; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--coral-deep); outline-offset: 3px; border-radius: 6px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.kicker { font-weight: 700; color: var(--coral-deep); font-size: 15px; letter-spacing: .04em; text-transform: uppercase; margin: 0 0 12px; }
.head { max-width: 760px; margin-bottom: 44px; }
.head > p:last-child { color: var(--plum-2); font-size: 20px; margin: 18px 0 0; }
.section { padding: 96px 0; }
.section.white { background: var(--white); }

/* The mascot as a sticker: white outline and a soft shadow (from direction B) */
.sticker { filter: drop-shadow(0 0 0 #fff) drop-shadow(2.5px 0 0 #fff) drop-shadow(-2.5px 0 0 #fff) drop-shadow(0 2.5px 0 #fff) drop-shadow(0 -2.5px 0 #fff) drop-shadow(0 10px 12px #6b2b3a2e); }

/* Buttons and links */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; background: var(--plum); color: #fff; text-decoration: none; font: 700 15px/1 var(--text); padding: 12px 18px; border-radius: 999px; border: 0; cursor: pointer; white-space: nowrap; }
.btn:hover { background: #50283d; }
.store-badge { display: inline-block; flex: none; }
.store-badge img { height: 56px; width: auto; }
/* Not a store badge: a platform that is not out yet, so it stays plain text in a dashed frame */
.soon { display: inline-flex; align-items: center; gap: 8px; height: 56px; margin: 0; padding: 0 16px 0 12px; border: 1.5px dashed #6b4a5b80; border-radius: 12px; color: var(--plum-2); font: 800 16px/1.15 var(--display); letter-spacing: -.01em; white-space: nowrap; }
.soon svg { width: 22px; height: 22px; flex: none; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; }
.soon small { display: block; font: 600 12px/1.2 var(--text); letter-spacing: .02em; }
.link-arrow { font-weight: 700; text-decoration: none; border-bottom: 2px solid var(--coral); padding-bottom: 2px; }
.link-arrow:hover { color: var(--coral-deep); }

/* Header */
.top { padding: 18px 0; }
.top .wrap { display: flex; align-items: center; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font: 800 22px/1 var(--display); letter-spacing: -.02em; flex: none; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: flex; gap: 24px; margin-left: auto; font-weight: 600; font-size: 16px; }
.nav a { text-decoration: none; color: var(--plum-2); }
.nav a:hover, .nav a[aria-current] { color: var(--plum); }
.nav a[aria-current] { text-decoration: underline; text-decoration-color: var(--coral); text-decoration-thickness: 2px; text-underline-offset: 6px; }
.lang { position: relative; flex: none; }
.lang summary { list-style: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; cursor: pointer; color: var(--plum-2); font-weight: 600; font-size: 16px; }
.lang summary::-webkit-details-marker { display: none; }
.lang summary:hover, .lang[open] summary { color: var(--plum); background: var(--white); }
.lang ul { position: absolute; right: 0; top: calc(100% + 8px); z-index: 30; list-style: none; margin: 0; padding: 8px; min-width: 210px; max-height: min(70vh, 480px); overflow-y: auto; background: var(--white); border: 1.5px solid var(--line); border-radius: 18px; box-shadow: var(--shadow); }
.lang a { display: block; padding: 9px 14px; border-radius: 10px; text-decoration: none; color: var(--plum); font-size: 16px; }
.lang a:hover { background: var(--cream); }
.lang a[aria-current] { font-weight: 700; background: var(--cream-2); }

/* Home: hero */
.hero { padding: 36px 0 72px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 1fr; align-items: center; gap: 40px; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 14px; letter-spacing: .02em; color: var(--coral-deep); background: var(--white); border: 1.5px solid var(--line); padding: 6px 12px 6px 8px; border-radius: 999px; margin: 0; }
.eyebrow i { width: 10px; height: 10px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px #03d17b26; }
.hero h1 { margin: 22px 0; }
.hero h1 .accent { color: var(--coral-text); position: relative; white-space: nowrap; }
.hero h1 .accent svg { position: absolute; left: -2%; bottom: -.12em; width: 104%; height: .32em; }
/* A longer accent line in another language wraps inside its own block instead of widening the hero column. */
html:not(:lang(en)) .hero h1 .accent { display: inline-block; max-width: 100%; white-space: normal; }
.hero .wrap > * { min-width: 0; }
.lead { font-size: clamp(18px, 1.5vw, 21px); color: var(--plum-2); max-width: 32em; margin: 0 0 30px; }
.cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 24px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 34px 0 0; padding: 0; list-style: none; }
.chips li { font-size: 14px; font-weight: 600; background: var(--white); border-radius: 999px; padding: 6px 12px; color: var(--plum-2); }
.scene { position: relative; height: 640px; }
.scene .sun { position: absolute; inset: 40px 0 40px 40px; background: radial-gradient(circle at 50% 45%, var(--sky) 0 58%, transparent 58.2%); }
.scene .ring { position: absolute; inset: 0 -40px 0 0; background: radial-gradient(circle at 54% 47%, transparent 0 63%, #fff 63.2% 63.8%, transparent 64%); }
.phone { position: relative; width: 270px; aspect-ratio: 1080 / 2400; margin: 0; border-radius: 40px; background: #16141a; padding: 9px; box-shadow: 0 40px 80px -30px #6b2b3a66, 0 2px 0 #0002; }
.phone img { width: 100%; height: 100%; object-fit: cover; object-position: top; border-radius: 32px; background: #fff; }
.scene .phone { position: absolute; left: 50%; top: 50%; translate: -42% -50%; rotate: 3deg; }
.hero-mascot { position: absolute; left: -10px; bottom: 26px; width: 240px; animation: bob 4s ease-in-out infinite; }
.bubble { position: absolute; left: -24px; top: 262px; max-width: 200px; margin: 0; background: var(--white); border-radius: 22px 22px 22px 6px; padding: 14px 18px; font: 700 18px/1.25 var(--display); letter-spacing: -.01em; box-shadow: var(--shadow); }
.bubble::after { content: ""; position: absolute; left: 34px; bottom: -14px; border: 8px solid transparent; border-top: 10px solid var(--white); border-left: 6px solid var(--white); }
@keyframes bob { 50% { translate: 0 -8px; } }

/* Home: the log (journal idea from direction B, drawn in the A style) */
.log { padding: 96px 0; background: var(--white); border-radius: 48px 48px 0 0; }
.log .wrap { display: grid; grid-template-columns: 1fr 1.05fr; gap: 64px; align-items: center; }
.log h2 { margin-bottom: 18px; }
.log .copy > p { color: var(--plum-2); font-size: 19px; }
.log-points { list-style: none; margin: 28px 0 0; padding: 0; display: grid; gap: 14px; }
.log-points li { display: grid; grid-template-columns: 34px 1fr; gap: 14px; align-items: start; font-size: 17px; color: var(--plum-2); }
.log-points b { display: block; color: var(--plum); font-size: 18px; }
.log-points i { width: 34px; height: 34px; border-radius: 12px; display: grid; place-items: center; background: var(--blush); color: var(--coral-deep); font: 800 15px/1 var(--display); font-style: normal; }
.sheet { position: relative; padding: 18px 0 40px 30px; }
.page { position: relative; background: var(--cream); border-radius: 32px; padding: 34px 34px 30px 76px; rotate: -1.5deg; box-shadow: 0 30px 60px -36px #6b2b3a55; background-image: linear-gradient(#f1dccb88 1.5px, transparent 1.5px); background-size: 100% 52px; background-position: 0 84px; }
.page::before { content: ""; position: absolute; top: 0; bottom: 0; left: 52px; width: 2px; background: #fb576f55; }
.page .month { font: 800 34px/1 var(--display); letter-spacing: -.02em; margin: 0 0 16px; }
.entries { list-style: none; margin: 0; padding: 0; font: 700 26px/52px var(--display); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.entries li { display: flex; gap: 18px; align-items: baseline; }
.entries b { width: 92px; color: var(--plum-2); font: 600 17px/52px var(--text); letter-spacing: 0; }
.entries small { font: 600 15px/1 var(--text); color: var(--plum-2); letter-spacing: 0; }
.entries .up small { color: var(--coral-deep); }
.chart { width: 100%; height: 150px; margin-top: 14px; overflow: visible; }
.chart .line { fill: none; stroke: var(--coral); stroke-width: 3.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 900; }
.chart .area { fill: url(#log-fill); }
.chart circle { fill: var(--white); stroke: var(--coral); stroke-width: 3; }
/* Without JavaScript the chart is simply drawn; with it, it waits for the log to scroll into view. */
.js .log:not(.in-view) .chart .line { stroke-dashoffset: 900; }
.js .log:not(.in-view) .chart .area, .js .log:not(.in-view) .chart circle { opacity: 0; }
.log.in-view .chart .line { animation: draw 2.2s .2s ease-out both; }
.log.in-view .chart .area { animation: fade 1s 1.4s both; }
.log.in-view .chart circle { animation: fade .3s both; }
@keyframes draw { from { stroke-dashoffset: 900; } to { stroke-dashoffset: 0; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
.sheet .note { position: absolute; right: -6px; top: 118px; max-width: 190px; margin: 0; background: var(--sun); border-radius: 18px 18px 18px 6px; padding: 12px 16px; font: 700 16px/1.25 var(--display); rotate: 3deg; box-shadow: var(--shadow); }
.sheet .sticker { position: absolute; left: -36px; bottom: -6px; width: 150px; rotate: -6deg; }

/* Home: features */
.features { padding: 96px 0 110px; background: var(--white); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 0; margin: 0; list-style: none; }
.card { background: var(--cream); border-radius: var(--radius); padding: 18px 18px 26px; display: flex; flex-direction: column; }
.card .art { border-radius: 22px; height: 220px; display: flex; align-items: center; justify-content: center; padding: 18px 12px; }
.card .art img { height: 100%; width: auto; max-width: 100%; object-fit: contain; }
.card:nth-child(1) .art { background: var(--sky); }
.card:nth-child(2) .art { background: var(--sun); }
.card:nth-child(3) .art { background: var(--mint); }
.card:nth-child(4) .art { background: var(--blush); }
.card h3 { margin: 22px 4px 10px; }
.card p { margin: 0 4px; color: var(--plum-2); font-size: 17px; }
.card:nth-child(even) { translate: 0 28px; }
.extras { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px 32px; list-style: none; padding: 34px 0 0; margin: 72px 0 0; border-top: 1.5px solid var(--line); }
.extras li { display: grid; grid-template-columns: 44px 1fr; gap: 14px; align-items: start; }
.extras svg { width: 44px; height: 44px; padding: 10px; border-radius: 14px; background: var(--cream); color: var(--coral-deep); }
.extras b { display: block; font-size: 18px; }
.extras span { color: var(--plum-2); font-size: 16px; }
.tag { display: inline-block; margin-left: 6px; padding: 4px 8px; border-radius: 999px; background: var(--blush); color: var(--coral-deep); font: 700 11px/1 var(--text); letter-spacing: .06em; text-transform: uppercase; font-style: normal; vertical-align: 2px; white-space: nowrap; }

/* Home: screens */
.screens { padding: 96px 0; overflow: hidden; }
.screens .head { margin-inline: auto; text-align: center; }
.shelf { display: flex; justify-content: center; gap: 28px; margin: 0; padding: 0 0 12px; list-style: none; }
.shelf li { flex: none; width: 230px; }
.shelf .phone { width: 100%; border-radius: 34px; padding: 8px; box-shadow: 0 30px 60px -32px #6b2b3a66; }
.shelf .phone img { border-radius: 27px; }
.shelf li:nth-child(odd) { translate: 0 26px; }
.shelf p { text-align: center; font-weight: 700; margin: 18px 0 0; }

/* Calculator grid (home and "more calculators") */
.calc-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; padding: 0; margin: 0; list-style: none; }
.calc-grid li { display: flex; }
.calc-grid .calc-tile { flex: 1; }
.calc-tile { position: relative; display: grid; grid-template-columns: 1fr 112px; gap: 4px 16px; background: var(--cream); border-radius: var(--radius); padding: 24px 22px 22px 26px; text-decoration: none; min-height: 190px; transition: translate .2s, box-shadow .2s; }
.calc-tile:hover { translate: 0 -3px; box-shadow: 0 22px 40px -28px #6b2b3a66; }
.calc-tile h3 { font-size: 25px; align-self: end; }
.calc-tile p { margin: 0; color: var(--plum-2); font-size: 16px; grid-column: 1; }
.calc-tile img { grid-column: 2; grid-row: 1 / span 3; width: 112px; height: auto; align-self: center; }
.calc-tile .go { grid-column: 1; align-self: end; margin-top: 10px; font-weight: 700; font-size: 15px; color: var(--coral-deep); }
.calc-tile::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.calculators { padding: 96px 0; }

/* FAQ */
.faq { padding: 96px 0; }
.faq .wrap { display: grid; grid-template-columns: 1fr 1.6fr; gap: 56px; align-items: start; }
.faq-list { border-top: 1.5px solid var(--line); }
.faq-item { border-bottom: 1.5px solid var(--line); }
.faq-item summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; gap: 18px; padding: 22px 0; font: 750 21px/1.25 var(--display); letter-spacing: -.01em; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; content: "+" / ""; flex: none; width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 700 22px/1 var(--text); transition: rotate .2s; background: var(--white); }
.faq-item[open] summary::after { rotate: 45deg; }
.faq-item p { margin: -6px 0 22px; color: var(--plum-2); max-width: 40em; }

/* Final call to action */
.final { padding: 88px 0 96px; background: var(--white); }
.final-card { position: relative; display: grid; grid-template-columns: 200px 1fr auto; gap: 40px; align-items: center; background: var(--sky); border-radius: 40px; padding: 44px 48px; }
.final-card .sticker { width: 200px; }
.final-card h2 { font-size: clamp(30px, 3.6vw, 46px); }
.final-card p { color: var(--plum-2); margin: 12px 0 22px; max-width: 30em; }
.qr { margin: 0; background: var(--white); border-radius: 22px; padding: 14px; text-align: center; width: 168px; }
.qr img { width: 140px; height: 140px; margin: 0 auto; image-rendering: pixelated; }
.qr figcaption { font-size: 13px; font-weight: 600; color: var(--plum-2); margin-top: 6px; line-height: 1.3; }

/* Footer */
.foot { padding: 56px 0 48px; font-size: 15px; color: var(--plum-2); border-top: 1.5px solid var(--line); }
.foot .wrap { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 32px; }
.foot .brand { font-size: 19px; color: var(--plum); }
.foot .brand img { width: 30px; height: 30px; border-radius: 9px; }
.foot .about p { margin: 14px 0 0; max-width: 26em; }
.foot h2 { font: 700 15px/1 var(--text); letter-spacing: .04em; text-transform: uppercase; color: var(--plum); margin: 6px 0 14px; }
.foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--plum); text-decoration: underline; }
.foot .legal { grid-column: 1 / -1; margin: 18px 0 0; font-size: 14px; }

/* Calculator pages */
.crumbs { font-size: 15px; font-weight: 600; color: var(--plum-2); margin: 0 0 20px; }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; content: "/" / ""; margin-right: 6px; opacity: .5; }
.crumbs a { text-decoration: none; }
.crumbs a:hover { text-decoration: underline; }
.calc-page { padding: 20px 0 80px; }
.calc-head { display: grid; grid-template-columns: 1fr 170px; gap: 24px; align-items: end; margin-bottom: 30px; }
.calc-head h1 { font-size: clamp(38px, 5.2vw, 68px); }
.calc-head .lead { margin: 16px 0 0; }
.calc-head .sticker { width: 170px; rotate: 4deg; margin-bottom: -8px; }
.calc-card { background: var(--white); border-radius: 40px; padding: 40px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr); gap: 44px; align-items: start; box-shadow: 0 30px 60px -48px #6b2b3a66; }
.calc-form { display: grid; gap: 22px; align-content: start; }
.calc-form .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.field { min-width: 0; border: 0; padding: 0; margin: 0; }
.field-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 8px; min-height: 34px; }
.field-head label, .field legend, .field-head .label { font-weight: 700; font-size: 16px; padding: 0; }
.field legend { margin-bottom: 8px; }
.seg { display: inline-flex; background: var(--cream); border-radius: 999px; padding: 3px; gap: 2px; }
.seg input { position: absolute; opacity: 0; width: 1px; height: 1px; pointer-events: none; }
.seg label { padding: 6px 13px; border-radius: 999px; font-weight: 700; font-size: 14px; cursor: pointer; color: var(--plum-2); white-space: nowrap; }
.seg input:checked + label { background: var(--plum); color: #fff; }
.seg input:focus-visible + label { outline: 3px solid var(--coral-deep); outline-offset: 2px; }
.seg.big { display: flex; padding: 4px; }
.seg.big label { flex: 1; text-align: center; padding: 12px 16px; font-size: 16px; }
.inputs { display: flex; gap: 10px; }
.box { flex: 1; min-width: 0; display: flex; align-items: center; gap: 4px; background: var(--cream); border: 2px solid transparent; border-radius: 18px; padding: 0 8px 0 16px; height: 62px; }
.box:focus-within { border-color: var(--coral); background: var(--white); }
.box.invalid { border-color: var(--coral-deep); }
.box.invalid:focus-within { outline: 3px solid var(--coral-deep); outline-offset: 2px; }
.box input { all: unset; flex: 1; width: 100%; min-width: 0; font: 750 25px/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.box .unit { font-weight: 700; color: var(--plum-2); padding-right: 4px; }
.step { flex: none; width: 38px; height: 38px; border-radius: 50%; border: 0; background: var(--white); color: var(--plum); font: 700 22px/1 var(--text); cursor: pointer; display: grid; place-items: center; }
.step:hover { background: var(--cream-2); }
.box:focus-within .step { background: var(--cream); }
.hint { font-size: 14px; color: var(--plum-2); margin: 8px 2px 0; }
.hint.error { color: var(--coral-deep); font-weight: 600; }
.choices { display: grid; gap: 8px; }
.choice { position: relative; display: block; }
.choice input { position: absolute; opacity: 0; inset: 0; pointer-events: none; }
.choice span { display: grid; grid-template-columns: 22px 1fr; gap: 2px 12px; padding: 12px 16px; border-radius: 16px; background: var(--cream); cursor: pointer; border: 2px solid transparent; }
.choice span::before { content: ""; grid-row: span 2; width: 18px; height: 18px; margin-top: 3px; border-radius: 50%; border: 2px solid var(--plum-2); background: var(--white); }
.choice b { font-size: 16px; }
.choice small { font-size: 14px; color: var(--plum-2); grid-column: 2; }
.choice input:checked + span { border-color: var(--plum); background: var(--white); }
.choice input:checked + span::before { border: 6px solid var(--plum); }
.choice input:focus-visible + span { outline: 3px solid var(--coral-deep); outline-offset: 2px; }
.acts { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.act { display: grid; grid-template-columns: minmax(0, 1fr) 128px 40px; gap: 8px; align-items: center; }
.act select { appearance: none; width: 100%; height: 56px; border-radius: 16px; border: 2px solid transparent; background: var(--cream) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8'%3E%3Cpath d='M1 1l5 5 5-5' fill='none' stroke='%233A1C2C' stroke-width='2'/%3E%3C/svg%3E") no-repeat right 14px center; padding: 0 34px 0 14px; font: 700 16px/1 var(--text); color: var(--plum); }
.act select:focus { border-color: var(--coral); outline: none; background-color: var(--white); }
.act .box { height: 56px; padding-left: 14px; }
.act .box input { font-size: 21px; }
.act .remove { width: 40px; height: 40px; border-radius: 50%; border: 0; background: transparent; color: var(--plum-2); cursor: pointer; display: grid; place-items: center; }
.act .remove:hover { background: var(--blush); color: var(--coral-deep); }
.act .error { grid-column: 1 / -1; margin: 0 2px; }
.add-act { margin-top: 12px; background: var(--cream); color: var(--plum); }
.add-act:hover { background: var(--cream-2); }
.add-act:disabled { opacity: .5; cursor: default; }

/* Result panel */
.result { background: var(--cream); border-radius: 30px; padding: 30px; display: grid; grid-template-columns: minmax(0, 1fr); gap: 22px; align-content: start; min-height: 100%; }
.result-top { display: grid; grid-template-columns: 1fr auto; gap: 16px; align-items: end; }
.result .label { font-weight: 700; font-size: 15px; color: var(--plum-2); margin: 0; }
.result .num { font: 800 clamp(64px, 8vw, 104px)/.9 var(--display); letter-spacing: -.05em; margin: 8px 0 14px; font-variant-numeric: tabular-nums; }
.result .num small { font-size: .32em; letter-spacing: -.01em; margin-left: 6px; color: var(--plum-2); white-space: nowrap; }
.result .mascot { width: 150px; }
.result .mascot svg { width: 100%; height: auto; overflow: visible; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; background: var(--white); border-radius: 999px; padding: 8px 14px 8px 10px; white-space: nowrap; }
.chip i { width: 14px; height: 14px; border-radius: 50%; flex: none; background: var(--z, #ccc); }
html:not(:lang(en)) .chip { white-space: normal; max-width: 100%; }
.say { margin: 0; color: var(--plum-2); font-size: 17px; }
.say b { color: var(--plum); }
.scale { position: relative; padding-top: 12px; }
.scale ol { display: flex; height: 14px; border-radius: 999px; overflow: hidden; padding: 0; margin: 0; list-style: none; }
.scale li { height: 100%; }
.scale .marker { position: absolute; top: 5px; width: 28px; height: 28px; translate: -50% 0; border-radius: 50%; background: var(--white); border: 5px solid var(--plum); transition: left .9s cubic-bezier(.34, 1.56, .64, 1); }
.scale .ticks { position: relative; height: 18px; margin-top: 10px; font-size: 13px; font-weight: 600; color: var(--plum-2); font-variant-numeric: tabular-nums; }
.scale .ticks span { position: absolute; translate: -50% 0; }
.facts { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin: 0; }
.facts div { background: var(--white); border-radius: 18px; padding: 14px 16px; }
.facts dt { font-size: 14px; font-weight: 600; color: var(--plum-2); }
.facts dt i { display: inline-block; width: 10px; height: 10px; border-radius: 50%; background: var(--z); margin-right: 7px; }
.facts dd { margin: 4px 0 0; font: 750 24px/1.1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.split { display: flex; height: 16px; border-radius: 999px; overflow: hidden; background: var(--white); }
.split span { transition: flex-grow .8s ease; }
.rows { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.rows li { display: grid; grid-template-columns: 6px minmax(0, 1fr) auto; gap: 4px 14px; align-items: center; background: var(--white); border-radius: 18px; padding: 12px 16px 12px 12px; }
.rows li::before { content: ""; grid-row: span 2; align-self: stretch; border-radius: 6px; background: var(--z, var(--line)); }
.rows b { font-size: 16px; }
.rows small { font-size: 14px; color: var(--plum-2); grid-column: 2; }
.rows .v { grid-row: 1 / span 2; grid-column: 3; font: 750 clamp(17px, 5vw, 22px)/1 var(--display); letter-spacing: -.02em; font-variant-numeric: tabular-nums; text-align: right; white-space: nowrap; }
.rows .v small { display: block; font: 600 13px/1.3 var(--text); letter-spacing: 0; }
.rows .bar { display: block; grid-column: 2; height: 6px; border-radius: 6px; background: var(--cream); overflow: hidden; }
.rows .bar i { display: block; height: 100%; background: var(--z, var(--coral)); border-radius: inherit; transition: width .8s ease; }
.rows li.on { box-shadow: inset 0 0 0 2px var(--plum); }
.empty { color: var(--plum-2); margin: 0; }
.note { font-size: 15px; color: var(--plum-2); margin: 18px 4px 0; max-width: 60em; }
.saved-note { font-size: 14px; color: var(--plum-2); margin: 0 2px; }
.saved-note button { font: inherit; font-weight: 700; color: var(--plum); background: none; border: 0; padding: 0; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.saved-note button:hover { color: var(--coral-deep); }
html:not(.js) .saved-note { display: none; }
noscript p { background: var(--sun); border-radius: 14px; padding: 12px 16px; margin: 0; }
html:not(.js) .result > :not(noscript) { display: none; }

/* Calculator pages: explanation */
.explain { padding: 88px 0; background: var(--white); }
.explain .wrap { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 56px 64px; }
.explain h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 18px; }
.explain h2:not(:first-child) { margin-top: 40px; }
.explain p, .explain li { color: var(--plum-2); }
.explain .wide { grid-column: 1 / -1; }
.explain ul { padding-left: 1.2em; margin: 0 0 1em; }
.explain li { margin-bottom: 6px; }
.explain .wrap > div { min-width: 0; }
.table-scroll { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.table th, .table td { text-align: left; padding: 12px 10px; border-bottom: 1.5px solid var(--line); vertical-align: top; }
.table th { font-size: 14px; text-transform: uppercase; letter-spacing: .04em; color: var(--plum-2); }
.table td:first-child { font-weight: 700; color: var(--plum); white-space: nowrap; }
.table td:first-child i { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: var(--z); margin-right: 10px; vertical-align: -1px; }
.formula { background: var(--cream); border-radius: 20px; padding: 18px 20px; font: 600 17px/1.5 var(--text); color: var(--plum); margin: 0 0 1em; }
.formula code { font: inherit; }
.explain .source { font-size: 15px; }
.app-band { padding: 88px 0; }
.app-card { display: grid; grid-template-columns: 1fr 260px; gap: 48px; align-items: center; background: var(--sky); border-radius: 40px; padding: 48px 56px 0; overflow: hidden; }
.app-card h2 { font-size: clamp(28px, 3.4vw, 44px); }
.app-card .copy { padding-bottom: 48px; }
.app-card p { color: var(--plum-2); margin: 14px 0 26px; }
.app-card .phone { width: 260px; border-radius: 36px 36px 0 0; padding: 9px 9px 0; aspect-ratio: auto; height: 400px; }
.app-card .phone img { height: 100%; border-radius: 28px 28px 0 0; }
.more { padding: 0 0 96px; }
.more h2 { font-size: clamp(28px, 3.2vw, 40px); margin-bottom: 28px; }
.more .calc-grid { grid-template-columns: repeat(5, 1fr); gap: 14px; }
.more .calc-tile { grid-template-columns: 1fr; min-height: 0; padding: 18px; gap: 10px; background: var(--white); }
.more .calc-tile img { grid-column: 1; grid-row: 1; width: 84px; justify-self: start; }
.more .calc-tile h3 { font-size: 19px; align-self: start; }
.more .calc-tile p, .more .calc-tile .go { display: none; }

/* 404 */
.lost { padding: 60px 0 120px; text-align: center; }
.lost .sticker { width: 190px; margin: 0 auto 26px; }
.lost p { color: var(--plum-2); max-width: 30em; margin: 18px auto 28px; }

/* Breakpoints */
@media (max-width: 1080px) {
  .cards { grid-template-columns: repeat(2, 1fr); }
  .card:nth-child(even) { translate: none; }
  .calc-card { grid-template-columns: minmax(0, 1fr); }
  .calc-grid { grid-template-columns: repeat(2, 1fr); }
  .more .calc-grid { grid-template-columns: repeat(3, 1fr); }
  .log .wrap, .faq .wrap { grid-template-columns: 1fr; gap: 40px; }
  .sheet { max-width: 560px; }
  .final-card { grid-template-columns: 160px 1fr; }
  .final-card .sticker { width: 160px; }
  .qr { display: none; }
  .extras { grid-template-columns: repeat(2, 1fr); }
  .shelf { gap: 16px; }
  .shelf li { width: 190px; }
  .sheet { margin-left: 40px; }
}
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; }
  .scene { height: 540px; max-width: 460px; width: 100%; margin-inline: auto; }
  .nav a.wide { display: none; }
  .explain .wrap { grid-template-columns: 1fr; gap: 40px; }
  .app-card { grid-template-columns: 1fr; padding: 36px 32px 0; gap: 8px; }
  .app-card .copy { padding-bottom: 0; }
  .app-card .phone { margin: 0 auto; height: 300px; width: 230px; }
  .shelf { justify-content: flex-start; overflow-x: auto; scroll-snap-type: x mandatory; padding: 0 16px 36px; margin: 0 -16px; }
  .shelf li { scroll-snap-align: center; }
  .foot .wrap { grid-template-columns: 1fr 1fr; }
  .foot .about { grid-column: 1 / -1; }
}
@media (max-width: 720px) {
  /* Two tiles side by side leave a word per line here ("more calculators" keeps its own grid). */
  .calc-grid { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 17px; }
  .top { padding: 14px 0; }
  .top .wrap { gap: 14px; }
  .brand { font-size: 20px; }
  .brand img { width: 32px; height: 32px; }
  .nav { gap: 14px; font-size: 15px; }
  .top .btn { font-size: 14px; padding: 10px 14px; }
  /* The calculators stay one tap away in the breadcrumbs and on the home page; the header keeps brand, language and CTA. */
  .nav { display: none; }
  .top .brand { margin-right: auto; }
  .lang summary { padding: 8px; }
  .lang .name { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .hero { padding: 16px 0 40px; }
  .hero h1 { margin: 18px 0 16px; }
  .lead { margin-bottom: 24px; }
  .store-badge img { height: 52px; }
  .soon { height: 52px; }
  .chips { margin-top: 24px; }
  .scene { height: 520px; }
  .scene .sun { inset: 30px -20px 20px 10px; }
  .scene .ring { display: none; }
  .scene .phone { width: 200px; border-radius: 30px; padding: 7px; translate: -26% -50%; }
  .scene .phone img { border-radius: 25px; }
  .hero-mascot { width: 160px; left: -6px; bottom: 18px; }
  .bubble { top: 236px; left: -6px; max-width: 150px; font-size: 15px; padding: 11px 13px; }
  .section, .log, .features, .screens, .calculators, .faq, .explain, .app-band { padding: 60px 0; }
  .log { border-radius: 32px 32px 0 0; }
  .head { margin-bottom: 30px; }
  .head > p:last-child { font-size: 18px; }
  .page { padding: 26px 20px 22px 50px; border-radius: 26px; background-size: 100% 44px; background-position: 0 70px; }
  .page::before { left: 34px; }
  .page .month { font-size: 28px; }
  .entries { font-size: 22px; line-height: 44px; }
  .entries li { gap: 12px; }
  .entries b { width: 64px; font-size: 15px; line-height: 44px; }
  .chart { height: 110px; }
  .sheet { padding: 12px 0 70px 0; margin-left: 0; }
  .sheet .note { right: -4px; top: 70px; max-width: 150px; font-size: 14px; padding: 10px 12px; }
  .sheet .sticker { width: 110px; left: auto; right: 6px; bottom: -4px; rotate: 6deg; }
  .cards { grid-template-columns: 1fr; gap: 14px; }
  .card { display: grid; grid-template-columns: 116px 1fr; gap: 0 16px; padding: 14px; align-items: center; }
  .card .art { height: 136px; grid-row: span 2; padding: 10px 6px; border-radius: 18px; }
  .card h3 { font-size: 21px; margin: 0 0 6px; align-self: end; }
  .card p { margin: 0; font-size: 15.5px; line-height: 1.45; align-self: start; }
  .extras { grid-template-columns: 1fr; margin-top: 40px; }
  .shelf li { width: 180px; }
  .shelf li:nth-child(odd) { translate: none; }
  .calc-grid { grid-template-columns: 1fr; gap: 12px; }
  .calc-tile { grid-template-columns: 1fr 88px; min-height: 0; padding: 20px 18px 18px 22px; }
  .calc-tile img { width: 88px; }
  .calc-tile h3 { font-size: 22px; }
  .more .calc-grid { grid-template-columns: repeat(2, 1fr); }
  .faq-item summary { font-size: 18px; padding: 18px 0; }
  .final { padding: 56px 0 64px; }
  .final-card { grid-template-columns: 1fr; padding: 30px 22px; gap: 10px; border-radius: 30px; }
  .final-card .sticker { width: 120px; }
  .foot .wrap { grid-template-columns: 1fr; gap: 26px; }
  .calc-page { padding: 8px 0 56px; }
  /* The mascot sits next to the title, so the lead gets the full width. */
  .calc-head { grid-template-columns: minmax(0, 1fr) 92px; gap: 0 12px; align-items: center; margin-bottom: 22px; }
  .calc-head > div { display: contents; }
  .calc-head h1 { grid-column: 1; grid-row: 1; }
  /* Calculator names in other languages are one long word or a long phrase next to the mascot. */
  html:not(:lang(en)) .calc-head h1 { font-size: 32px; }
  html:is(:lang(ja), :lang(ko)) .calc-head h1 { font-size: 28px; }
  .calc-head .lead { grid-column: 1 / -1; }
  .calc-head .sticker { grid-column: 2; grid-row: 1; width: 92px; margin-bottom: 0; }
  .calc-card { padding: 18px; border-radius: 28px; gap: 22px; }
  .calc-form .row2 { grid-template-columns: 1fr; gap: 22px; }
  .table th, .table td { padding: 10px 6px; font-size: 15px; }
  .box { height: 58px; padding-left: 14px; border-radius: 16px; }
  .box input { font-size: 22px; }
  .step { width: 34px; height: 34px; }
  .result { padding: 20px; border-radius: 22px; }
  .result .mascot { width: 92px; }
  .facts dd { font-size: 21px; }
  /* The activity name gets a full row, so names like "Leisurely walking" aren't cut. */
  .acts { gap: 16px; }
  .act { grid-template-columns: 128px 40px minmax(0, 1fr); gap: 6px; }
  .act select { grid-column: 1 / -1; }
  .zones li { grid-template-columns: 6px minmax(0, 1fr); }
  .zones li::before { grid-row: span 3; }
  .zones .v { grid-row: auto; grid-column: 2; text-align: left; }
  .act .box { padding-left: 10px; }
  .act .box input { font-size: 19px; }
  .app-card { padding: 28px 20px 0; border-radius: 30px; }
  .more { padding-bottom: 64px; }
}
@media (max-width: 400px) {
  /* BMI: the chip takes the full width under the number and the mascot */
  .result-top > [data-summary] { display: contents; }
  .result-top { grid-template-columns: minmax(0, 1fr) auto; row-gap: 0; align-items: start; }
  .result-top .mascot { grid-column: 2; grid-row: 1 / span 2; width: 76px; }
  .result-top .chip { grid-column: 1 / -1; justify-self: start; }
  .sheet .note { position: static; display: inline-block; margin: 14px 0 0; max-width: 170px; }
  .table th, .table td { padding: 9px 4px; font-size: 14px; }
  .table td { white-space: nowrap; }
  .table td:first-child { white-space: normal; }
}
@media (max-width: 360px) {
  .top .wrap { gap: 10px; }
  .top .brand { font-size: 0; gap: 0; }
  .result .num { font-size: 56px; }
  .facts { grid-template-columns: 1fr; }
  .scale .ticks { font-size: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
  .chart .line { stroke-dashoffset: 0 !important; }
  .chart .area, .chart circle { opacity: 1 !important; }
}
