/* Happy Rose LLC — shared styles. Tokens first; app pages override them with a body class. */

@font-face { font-family: "Nunito"; src: url("../fonts/nunito_regular.ttf") format("truetype"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito_bold.ttf") format("truetype"); font-weight: 700; font-display: swap; }
@font-face { font-family: "Nunito"; src: url("../fonts/nunito_extrabold.ttf") format("truetype"); font-weight: 800; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka_semibold.ttf") format("truetype"); font-weight: 600; font-display: swap; }

:root {
  color-scheme: light;
  --bg: #FFF9F6;
  --surface: #FFFFFF;
  --tint: #FCE8EC;
  --text: #3A2230;
  --muted: #76596A;
  --accent: #B33A5A;
  --accent-strong: #E8637F;
  --on-accent: #FFFFFF;
  --line: #F0DDE0;
  --focus: #B33A5A;
  --font-body: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --font-display: "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
  --display-weight: 800;
  --radius: 18px;
  --radius-lg: 26px;
  --max: 68rem;
  --gutter: 16px;
}


*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1.0625rem;
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
main { flex: 1; }
img, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3 {
  font-family: var(--font-display);
  font-weight: var(--display-weight);
  line-height: 1.15;
  margin: 0 0 .5em;
  text-wrap: balance;
}
h1 { font-size: clamp(2rem, 6vw, 3.25rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.5rem, 4vw, 2rem); margin-top: 1.6em; }
h3 { font-size: 1.2rem; margin-top: 1.4em; }
p, ul, ol { margin: 0 0 1em; }
a { color: var(--accent); text-underline-offset: .18em; text-decoration-thickness: .08em; }
a:hover { text-decoration-thickness: .14em; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 6px; }

.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 10; }
.skip:focus { left: 8px; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
.narrow { max-width: 44rem; }

/* Header */
.site-header { border-bottom: 1.5px solid var(--line); background: var(--bg); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--text); text-decoration: none; font-weight: 800; font-size: 1.15rem; font-family: "Nunito", system-ui, sans-serif; }
.brand img { width: 36px; height: 36px; }
.site-nav ul { display: flex; gap: 4px 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-nav a { color: var(--text); text-decoration: none; font-weight: 700; font-family: "Nunito", system-ui, sans-serif; }
.site-nav a:hover, .site-nav a[aria-current="page"] { color: var(--accent); text-decoration: underline; }

/* Footer */
.site-footer { border-top: 1.5px solid var(--line); margin-top: 64px; padding: 28px 0 36px; color: var(--muted); font-size: .95rem; font-family: "Nunito", system-ui, sans-serif; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 28px; justify-content: space-between; align-items: center; }
.site-footer ul { display: flex; gap: 18px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.site-footer a { color: var(--muted); font-weight: 700; }
.site-footer p { margin: 0; }

/* Sections */
.hero { padding: 56px 0 24px; }
.hero .lede { font-size: clamp(1.15rem, 2.6vw, 1.35rem); color: var(--muted); max-width: 38rem; }
.kicker { text-transform: uppercase; letter-spacing: .08em; font-size: .8rem; font-weight: 800; color: var(--accent); margin-bottom: .6em; }
.section { padding: 24px 0; }

/* App cards */
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 290px), 1fr)); gap: 18px; padding: 0; margin: 0; list-style: none; }
.app-card {
  position: relative; display: flex; gap: 16px; align-items: flex-start;
  background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; transition: transform .15s ease, border-color .15s ease;
}
.app-card:hover { transform: translateY(-2px); border-color: var(--accent); }
.app-card img { width: 84px; height: 84px; border-radius: 20px; flex: none; border: 1.5px solid var(--line); }
.app-card h3 { margin: 2px 0 4px; font-size: 1.25rem; }
.app-card p { margin: 0 0 10px; color: var(--muted); font-size: 1rem; }
.app-card a { color: var(--text); text-decoration: none; }
.app-card a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.app-card--empty { border-style: dashed; background: transparent; align-items: center; color: var(--muted); }
.app-card--empty:hover { transform: none; border-color: var(--line); }
.app-card--empty .placeholder { width: 84px; height: 84px; border-radius: 20px; border: 1.5px dashed var(--line); display: grid; place-items: center; font-size: 2rem; flex: none; }

.pill { display: inline-block; font-size: .8rem; font-weight: 800; padding: 3px 10px; border-radius: 999px; background: var(--tint); color: var(--text); }

.panel { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 24px; }
.values { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 16px; list-style: none; padding: 0; }
.values li { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 18px; }
.values strong { display: block; font-size: 1.05rem; margin-bottom: 4px; }
.values span { color: var(--muted); font-size: .98rem; }

.button {
  display: inline-block; background: var(--accent); color: var(--on-accent); font-weight: 800;
  padding: 12px 22px; border-radius: 999px; text-decoration: none; border: 0;
}
.button:hover { filter: brightness(1.07); }
.email { font-weight: 800; font-size: 1.15rem; word-break: break-all; }

/* Long-form legal and FAQ text */
.doc { padding-top: 40px; }
.doc .meta { color: var(--muted); font-size: .95rem; }
.doc h2 { font-size: 1.45rem; }
.doc li { margin-bottom: .4em; }
.doc details { background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); padding: 14px 18px; margin-bottom: 10px; }
.doc summary { cursor: pointer; font-weight: 800; }
.doc details[open] summary { margin-bottom: 8px; }
.doc details p:last-child { margin-bottom: 0; }
.doc .table-wrap { overflow-x: auto; margin: 0 0 1em; border: 1.5px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.doc table { border-collapse: collapse; width: 100%; font-size: .95rem; min-width: 520px; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.doc th { background: var(--tint); font-weight: 800; }
.doc tr:last-child td { border-bottom: 0; }
.doc h2 { scroll-margin-top: 16px; }
@media (max-width: 600px) {
  .doc .table-wrap { border: 0; background: none; overflow: visible; }
  .doc table { min-width: 0; }
  .doc thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .doc tr { display: block; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius); margin-bottom: 10px; padding: 6px 0; }
  .doc td { display: block; border: 0; padding: 4px 14px; }
  .doc td::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
}
.toc { background: var(--tint); border-radius: var(--radius); padding: 16px 20px; }
.toc ul { margin: 0; padding-left: 1.2em; }
.note { background: var(--tint); border-radius: var(--radius); padding: 14px 18px; }

.lede-sm { font-size: 1.15rem; color: var(--muted); }
.support-app { display: flex; gap: 18px; align-items: flex-start; background: var(--surface); border: 1.5px solid var(--line); border-radius: var(--radius-lg); padding: 20px; }
.support-app img { width: 72px; height: 72px; border-radius: 22%; flex: none; border: 1.5px solid var(--line); }
.support-app h3 { margin: 0 0 4px; font-size: 1.25rem; }
.support-app p { color: var(--muted); margin-bottom: 12px; }
.support-links { display: flex; flex-wrap: wrap; gap: 10px 18px; align-items: center; margin: 0 !important; }
.contact-grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.contact-grid p { margin: 0 0 4px; }
.contact-grid p:last-child { color: var(--muted); }
@media (max-width: 480px) { .support-app { flex-direction: column; } }

/* 404 */
.lost { text-align: center; padding: 72px 0 24px; }
.lost img { width: 180px; margin: 0 auto 20px; }

/* ---------- Potato Tracker page: the app's own palette and type (from its docs/DESIGN.md) ---------- */
.app-potato {
  --bg: #FAF7F0;
  --surface: #FFFFFF;
  --tint: #F6E7BD;
  --text: #3B2A1E;
  --muted: #7C6B59;
  --accent: #8B5E34;
  --accent-strong: #D9443A;
  --on-accent: #FFFFFF;
  --line: #EADFCB;
  --focus: #8B5E34;
  --font-display: "Fredoka", "Nunito", system-ui, sans-serif;
  --display-weight: 600;
}
.app-hero { padding: 36px 0 8px; }
.app-title { display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.app-title .icon { width: 72px; height: 72px; border-radius: 22%; box-shadow: 0 6px 18px rgba(59, 42, 30, .14); }
.app-name { font-family: var(--font-display); font-weight: 600; font-size: 1.35rem; margin: 0; }
.app-hero h1 { font-size: clamp(2.6rem, 10vw, 4.5rem); margin-bottom: .25em; }
.app-hero .tagline { font-size: clamp(1.1rem, 2.6vw, 1.3rem); color: var(--muted); max-width: 40rem; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: center; margin: 22px 0 0; }
.button.store { background: var(--text); color: var(--bg); font-size: 1.05rem; padding: 14px 24px; cursor: default; }
a.button.store[href] { cursor: pointer; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 20px 0 0; }
.facts li { background: var(--surface); border: 1.5px solid var(--line); border-radius: 999px; padding: 4px 14px; font-weight: 700; font-size: .92rem; }

.stage { background: var(--tint); border-radius: 22px; padding: 18px; display: grid; place-items: center; }
.hero-art { margin-top: 28px; }
.hero-art img { width: min(100%, 300px); }
@media (min-width: 560px) { .hero-art img { width: 100%; max-width: 820px; } }

.steps { list-style: none; padding: 0; margin: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); counter-reset: step; }
.steps li { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 20px; counter-increment: step; }
.steps h3 { margin: 0 0 6px; font-size: 1.3rem; }
.steps h3::before { content: counter(step); display: inline-grid; place-items: center; width: 1.6em; height: 1.6em; margin-right: .45em; border-radius: 50%; background: var(--accent); color: var(--on-accent); font-size: .8em; vertical-align: .08em; }
.steps p { margin: 0; color: var(--muted); }
.steps .art, .feature .art { background: var(--tint); border-radius: 18px; height: 170px; display: grid; place-items: center; margin-bottom: 16px; overflow: hidden; }
.steps .art img, .feature .art img { height: 140px; width: auto; }
.points { display: flex !important; justify-content: center; align-items: flex-end; gap: 14px; padding-bottom: 22px; }
.points span { display: flex; flex-direction: column; align-items: center; font-weight: 800; font-size: .85rem; color: var(--text); }
.points b { font-family: var(--font-display); font-weight: 600; display: grid; place-items: center; border-radius: 50%; background: #FFE27A; border: 2.5px solid #3B2A1E; margin-bottom: 6px; }
.points span:nth-child(1) b { width: 44px; height: 44px; font-size: 1.3rem; }
.points span:nth-child(2) b { width: 60px; height: 60px; font-size: 1.7rem; }
.points span:nth-child(3) b { width: 78px; height: 78px; font-size: 2.2rem; }

.features { display: grid; gap: 16px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr)); list-style: none; padding: 0; margin: 0; }
.feature { background: var(--surface); border: 1.5px solid var(--line); border-radius: 22px; padding: 20px; }
.feature h3 { margin: 0 0 6px; font-size: 1.3rem; }
.feature p { margin: 0; color: var(--muted); }
.feature .more { margin-top: 10px; }
.pill.soon { background: #FFE27A; color: #3B2A1E; margin-bottom: 10px; }

.ring { --p: 60; width: 124px; height: 124px; border-radius: 50%; display: grid; place-items: center;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--line) 0); }
.ring span { width: 94px; height: 94px; border-radius: 50%; background: var(--surface); display: grid; place-content: center; text-align: center; color: var(--muted); font-weight: 800; font-size: .8rem; line-height: 1.1; }
.ring b { font-family: var(--font-display); font-weight: 600; font-size: 2rem; color: var(--text); }

.medals { display: flex !important; flex-wrap: wrap; align-content: center; justify-content: center; gap: 8px; padding: 12px; }
.medals span { background: radial-gradient(circle at 35% 30%, #FFF3D3, #FFE27A); border: 2px solid #E9B44C; color: #3B2A1E; border-radius: 999px; padding: 6px 12px; font-weight: 800; font-size: .88rem; }
.medals .locked { background: var(--surface); border-color: var(--line); color: var(--muted); border-style: dashed; }

.wide { display: grid; gap: 20px; align-items: center; }
.wide > * { min-width: 0; }
.wide h2 { margin-top: 0; }
.wide-text p { color: var(--muted); }
.map { padding: 0; overflow: hidden; background: #CFE3EA; }
.map img { width: 100%; }
.dish-row { list-style: none; padding: 0; margin: 12px 0 0; display: flex; gap: 10px; overflow-x: auto; scrollbar-width: thin; padding-bottom: 6px; }
.dish-row li { flex: 0 0 96px; text-align: center; font-size: .85rem; font-weight: 700; line-height: 1.2; }
.dish-row img { width: 80px; height: 80px; margin: 0 auto 6px; background: var(--tint); border-radius: 16px; padding: 6px; }

.joke { background: var(--surface); border: 1.5px solid var(--line); border-radius: 26px; padding: 24px; }
.joke h2 { margin-top: 0; }
.joke p { color: var(--muted); max-width: 40rem; }
.joke .stage img { width: 100%; max-width: 600px; }
.links-row { display: flex; flex-wrap: wrap; gap: 10px 22px; align-items: baseline; }

.final { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 28px; background: var(--tint); border-radius: 26px; padding: 24px; }
.final img { width: 140px; }
.final h2 { margin-top: 0; }
.final p { color: var(--muted); }
.final .button.store { margin-top: 4px; }

@media (min-width: 860px) {
  .wide { grid-template-columns: 1.25fr 1fr; gap: 36px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
