/* PetTreatLabels skin v2 — Pawluxe-inspired: maroon / orange / cream, rounded, friendly.
 * Fonts: Fredoka (headings) + Nunito (body) self-hosted (fonts/*.woff2, latin), system-ui fallbacks.
 * The AAFCO label itself (.aafco-label, table.ga, .label-estimate/.label-lab) is a
 * LEGAL label format and is NOT restyled — except its typeface, which is plain
 * Arial/Helvetica, never the site's rounded display fonts. Print shows ONLY the label. */
/* Self-hosted fonts (latin subset, woff2) — no third-party font requests. */
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 600; font-display: swap; src: url('fonts/fredoka-600.woff2') format('woff2'); }
@font-face { font-family: 'Fredoka'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/fredoka-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/nunito-400.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/nunito-700.woff2') format('woff2'); }
@font-face { font-family: 'Nunito'; font-style: normal; font-weight: 800; font-display: swap; src: url('fonts/nunito-800.woff2') format('woff2'); }
:root {
  --maroon: #7E4C4F;
  --maroon-dark: #6A3D40;
  --orange: #F6AB4A;
  --orange-text: #D97E06;
  --cream: #FFF7ED;
  --cream-block: #F7F3EC;
  --card-border: #F3E6D8;
  --input-border: #E5D3BE;
  --ink: #4A2E33;
  --muted: #8A6D6D;
  --shadow: 0 10px 30px rgba(74, 46, 51, .08);
  --radius: 24px;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: 'Nunito', system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; line-height: 1.55; color: var(--ink); margin: 0; padding: 0; background: var(--cream); }
main { max-width: 1200px; margin: 0 auto; padding: 24px 24px 64px; }
section { scroll-margin-top: 96px; }
h1, h2, h3 { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; color: var(--maroon); line-height: 1.15; }
h1 { font-size: clamp(2.5rem, 5vw, 3.5rem); font-weight: 700; margin: 0 0 16px; }
h2 { font-size: clamp(1.5rem, 2.5vw, 1.9rem); font-weight: 600; margin: 0 0 16px; display: flex; align-items: center; gap: 12px; }
h3 { font-size: 1.1rem; font-weight: 600; }
a { color: var(--maroon); }
a:hover { color: var(--orange-text); }
.tag { font-size: .8rem; color: var(--muted); font-weight: 400; }
.muted { color: var(--muted); font-size: .9rem; }
label { display: block; margin: 8px 0; font-weight: 700; font-size: .92rem; }
input, select { display: block; width: 100%; padding: 10px 12px; margin-top: 6px; border: 1.5px solid var(--input-border); border-radius: 12px; font-size: 1rem; font-family: inherit; background: #fff; color: var(--ink); }
input:focus, select:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 3px rgba(246, 171, 74, .35); }
input:disabled { background: var(--cream-block); color: var(--muted); }
button, .btn { font-family: 'Nunito', system-ui, sans-serif; display: inline-block; padding: 11px 22px; border: 2px solid var(--maroon); background: #fff; color: var(--maroon); border-radius: 999px; cursor: pointer; font-size: .95rem; font-weight: 800; line-height: 1.2; text-decoration: none; }
button { margin: 6px 6px 6px 0; }
button:hover, .btn:hover { background: var(--cream); color: var(--maroon-dark); }
button.primary, .btn-primary { background: var(--maroon); color: #fff; }
button.primary:hover, .btn-primary:hover { background: var(--maroon-dark); color: #fff; }
button:disabled { opacity: .45; cursor: not-allowed; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 0 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
table { border-collapse: collapse; width: 100%; margin: 10px 0; background: #fff; }
th, td { border: 1px solid #EBDCC8; padding: 8px 10px; text-align: left; font-size: .9rem; vertical-align: top; }
th { background: var(--cream-block); color: var(--maroon); font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 600; }
.alert { border: 2px solid; border-radius: 16px; padding: 14px 16px; margin: 12px 0; }
.alert.danger { border-color: #b71c1c; background: #fdecea; color: #5f0f0f; }
.banner { font-size: 1rem; width: min(1200px, calc(100% - 48px)); margin: 20px auto 0; }
.result { display: block; width: 100%; text-align: left; border: 1.5px solid var(--input-border); background: #fff; color: var(--ink); margin: 4px 0; border-radius: 16px; padding: 10px 14px; }
.result:hover { background: var(--cream); border-color: var(--orange); }
.flag { color: #b26a00; font-weight: 700; }
.assumptions { font-size: .9rem; color: var(--muted); }
.table-scroll { overflow-x: auto; }
details { margin: 10px 0; }
summary { cursor: pointer; font-weight: 700; }
/* collapsible long-text blocks (state table, about notes, batch/lab explanations) */
details.collapse { border: 1.5px solid var(--input-border); border-radius: 16px; background: #fff; padding: 12px 16px; }
details.collapse > summary { color: var(--maroon); font-weight: 800; }
details.collapse > summary:hover { color: var(--orange-text); }

/* ---- announcement bar + sticky nav ---- */
.announce { background: var(--maroon); color: #FFF7ED; text-align: center; font-size: .85rem; font-weight: 700; letter-spacing: .02em; padding: 9px 16px; }
.topbar { position: sticky; top: 0; z-index: 50; background: #fff; box-shadow: 0 2px 16px rgba(74, 46, 51, .08); }
.nav-inner { max-width: 1200px; margin: 0 auto; padding: 12px 24px; display: flex; align-items: center; gap: 20px; }
.wordmark { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; color: var(--maroon); text-decoration: none; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand { display: flex; flex-direction: column; gap: 2px; }
.subtitle { color: var(--muted); margin: 0; font-size: .8rem; line-height: 1.3; }
.wordmark span { color: var(--orange-text); }
.wordmark-paw { width: 26px; height: 26px; color: var(--orange); flex: none; }
.main-nav { display: flex; gap: 2px; margin-left: auto; flex-wrap: wrap; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 700; font-size: .95rem; padding: 8px 12px; border-radius: 999px; }
.main-nav a:hover { color: var(--maroon); background: var(--cream); }

/* ---- hero ---- */
.hero { display: grid; grid-template-columns: 1.05fr .95fr; gap: 32px; align-items: center; padding: 40px 8px 48px; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; font-weight: 800; color: var(--orange-text); margin: 0 0 12px; }
.hero h1 .accent { color: var(--orange-text); }
.hero-sub { font-size: 1.08rem; margin: 0 0 24px; max-width: 34rem; }
.hero-cta { margin: 0; }
.hero-cta .btn { margin: 0 10px 10px 0; }
.hero-art { position: relative; min-height: 360px; }
.art-circle { position: absolute; border-radius: 50%; }
.art-circle-orange { width: 300px; height: 300px; background: var(--orange); top: 10px; right: 30px; }
.art-circle-maroon { width: 150px; height: 150px; background: var(--maroon); bottom: 10px; left: 30px; }
.art-ring { position: absolute; width: 200px; height: 200px; border: 3px dashed var(--orange); border-radius: 50%; top: 90px; left: 0; }
.art-paw { position: absolute; color: var(--orange); fill: currentColor; }
.paw-1 { width: 74px; height: 74px; top: 30px; left: 60px; transform: rotate(-18deg); }
.paw-2 { width: 54px; height: 54px; bottom: 60px; right: 60px; color: var(--maroon); transform: rotate(14deg); opacity: .85; }
.paw-3 { width: 40px; height: 40px; top: 180px; right: 10px; transform: rotate(24deg); opacity: .7; }
.art-dot { position: absolute; border-radius: 50%; background: var(--maroon); opacity: .25; }
.dot-1 { width: 14px; height: 14px; top: 6px; left: 130px; }
.dot-2 { width: 10px; height: 10px; bottom: 30px; right: 150px; background: var(--orange); opacity: .8; }
.dot-3 { width: 8px; height: 8px; top: 150px; left: 110px; }

/* ---- guide page intro ---- */
.page-intro { text-align: center; padding: 48px 16px 40px; max-width: 780px; margin: 0 auto; }
.page-intro .hero-sub { margin: 0 auto 8px; }

/* ---- cards + step badges ---- */
main > section:not(.hero):not(.page-intro) { background: #fff; border: 1px solid var(--card-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px 32px; margin-bottom: 28px; position: relative; }
main > section:not(.hero):not(.page-intro)::before { content: ""; position: absolute; top: -1px; left: 32px; width: 72px; border-top: 3px dashed var(--orange); }
.step-badge { display: inline-flex; align-items: center; justify-content: center; flex: none; min-width: 36px; height: 36px; padding: 0 6px; border-radius: 50%; background: var(--orange); color: #fff; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; font-size: 1rem; }

/* ---- pricing ---- */
.pricing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; max-width: 960px; margin: 32px auto 0; align-items: stretch; }
.price-card { background: #fff; border: 2px solid var(--card-border); border-radius: 24px; padding: 32px; position: relative; display: flex; flex-direction: column; }
.price-card.pro { border-color: var(--maroon); box-shadow: 0 8px 24px rgba(126, 76, 79, .12); }
.price-badge { position: absolute; top: -14px; left: 50%; transform: translateX(-50%); background: var(--orange); color: #fff; font-weight: 800; font-size: .8rem; border-radius: 999px; padding: 4px 14px; white-space: nowrap; }
.price-card h2 { margin: 0 0 8px; display: block; }
.price-amount { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-size: 3rem; font-weight: 700; color: #111; line-height: 1; margin: 0; }
.price-term { color: var(--muted); margin: 8px 0 20px; }
.price-card ul { list-style: none; padding: 0; margin: 0 0 24px; }
.price-card li { padding: 6px 0 6px 28px; position: relative; }
.price-card li::before { content: "✓"; position: absolute; left: 0; color: var(--maroon); font-weight: 800; }
.price-card .btn, .price-card button.primary { width: 100%; text-align: center; margin: auto 0 0; }
.pricing-note { text-align: center; max-width: 960px; margin: 20px auto 0; }
/* Clean-download prompt (Pro, estimate label): a modal, not a native dialog. */
.modal-overlay { display: none; position: fixed; inset: 0; background: rgba(74, 46, 51, .55); z-index: 50; align-items: center; justify-content: center; padding: 20px; }
.modal-overlay.open { display: flex; }
.modal { background: #fff; border-radius: 24px; max-width: 520px; width: 100%; padding: 28px; box-shadow: 0 10px 30px rgba(74, 46, 51, .25); }
.modal h3 { margin-top: 0; }
.modal-actions { display: flex; gap: 12px; justify-content: flex-end; flex-wrap: wrap; margin: 20px 0 0; }

@media (max-width: 860px) { .pricing-grid { grid-template-columns: 1fr; } }

/* ---- footer ---- */
footer { background: var(--maroon); color: #FFF7ED; padding: 56px 24px 40px; position: relative; overflow: hidden; }
.footer-inner { max-width: 1200px; margin: 0 auto; position: relative; z-index: 1; }
.footer-head { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; margin-bottom: 20px; }
.footer-head .footer-brand { margin: 0; }
.footer-head .footer-links { margin: 0; }
.footer-brand { font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; font-size: 1.5rem; margin: 0 0 12px; }
.footer-brand span { color: var(--orange); }
.footer-links { margin: 0 0 20px; font-weight: 700; }
.footer-links a { color: #FFD9A0; text-decoration: none; }
.footer-links a:hover { color: #fff; }
footer a { color: #FFD9A0; }
footer a:hover { color: #fff; }
footer strong { color: var(--orange); }
footer .muted { color: rgba(255, 247, 237, .75); }
.footer-watermark { position: absolute; right: -16px; bottom: -48px; font-family: 'Fredoka', 'Nunito', system-ui, sans-serif; font-weight: 700; font-size: clamp(72px, 13vw, 170px); line-height: 1; color: rgba(255, 255, 255, .07); white-space: nowrap; pointer-events: none; z-index: 0; }

/* ---- recipe suggestions (generated by app.js) ---- */
ul.suggest { list-style: none; padding-left: 0; }
ul.suggest li { border: 1px solid var(--card-border); border-left: 5px solid var(--maroon); border-radius: 16px; background: var(--cream); padding: 12px 16px; margin: 10px 0; font-size: .92rem; }

/* ---- the draft label — LEGAL format, do not restyle ---- */
.label-wrap { position: relative; }
.watermark { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%) rotate(-18deg); font-size: 2.2rem; font-weight: 900; color: rgba(183, 28, 28, .14); white-space: nowrap; pointer-events: none; z-index: 1; }
.aafco-label { position: relative; border: 3px solid #111; padding: 16px 18px; max-width: 560px; background: #fff; }
/* The label is a formal legal document: plain grotesque sans (Arial/Helvetica),
   never the site's rounded display fonts. */
.aafco-label, .aafco-label *, .watermark { font-family: Arial, 'Helvetica Neue', Helvetica, sans-serif; }
.aafco-label h2 { border: none; margin: 8px 0 2px; font-size: 1.4rem; display: block; }
.label-estimate { background: #b71c1c; color: #fff; font-weight: 800; text-align: center; padding: 6px; font-size: .8rem; white-space: nowrap; margin-top: 12px; }
.label-lab { background: #2e7d32; color: #fff; font-weight: 800; text-align: center; padding: 6px; font-size: .8rem; white-space: nowrap; margin-top: 12px; }
/* Formal label: all headings and bold lead-ins are black, not the site's maroon. */
.aafco-label h2, .aafco-label h3, .aafco-label strong { color: #111; }
.label-sub { margin: 2px 0 10px; }
.aafco-label h3 { margin: 14px 0 4px; }
table.ga td { border: 1px solid #111; font-size: 1rem; }
table.ga td:last-child { text-align: right; font-weight: 700; width: 90px; }
.fine { font-size: .82rem; color: #333; }
ol.ing { margin: 4px 0; padding-left: 22px; }
ol.ing li { font-size: .92rem; }

/* ---- Pro bar + Pro notes ---- */
[hidden] { display: none !important; }
.pro-bar { width: min(1200px, calc(100% - 48px)); margin: 16px auto 0; padding: 14px 20px; background: #fff; border: 1px solid var(--card-border); border-radius: 16px; box-shadow: var(--shadow); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 16px; }
.pro-bar-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-left: auto; }
.pro-bar input { display: inline-block; width: 280px; margin-top: 0; }
.pro-bar button { margin: 0; }
.pro-tag { display: inline-block; font-size: .62rem; font-weight: 800; letter-spacing: .05em; background: var(--orange); color: #fff; border-radius: 999px; padding: 2px 7px; margin-left: 6px; vertical-align: 1px; }
.actions-right { text-align: right; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 16px; }
.section-head h2 { margin: 0; }
.section-head .actions-right { margin: 0; flex-shrink: 0; }
button.x { background: none; border: none; padding: 6px; line-height: 0; color: var(--maroon); cursor: pointer; border-radius: 8px; }
button.x:hover { background: #fbe9e7; color: #b71c1c; }
button.x svg { display: block; }
#recipe-list td:last-child { text-align: center; }
.pro-note a { font-weight: 800; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; padding: 32px 4px 40px; gap: 8px; }
  .hero-art { min-height: 280px; }
  .art-circle-orange { width: 230px; height: 230px; }
  .main-nav { margin-left: 0; flex-basis: 100%; }
  .main-nav a { padding: 6px 10px; }
  .subtitle { display: none; }
  main { padding: 16px 16px 48px; }
  main > section:not(.hero):not(.page-intro) { padding: 22px 20px; }
  .nav-inner { padding: 10px 16px; flex-wrap: wrap; gap: 6px 20px; }
  .banner { width: calc(100% - 32px); }
}

@media (max-width: 640px) {
  .hero-cta .btn { display: block; text-align: center; margin-right: 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .label-estimate, .label-lab { white-space: normal; font-size: .75rem; }
  .watermark { font-size: 1.6rem; }
  .footer-watermark { font-size: 64px; bottom: -24px; }
}

@media print {
  body { background: #fff; }
  .announce, .topbar, .banner, .pro-bar, footer { display: none !important; }
  body:not(.guide) main > section:not(#label-section) { display: none !important; }
  main { padding: 0; }
  main > section { box-shadow: none !important; border-color: #ddd !important; }
  #label-section { padding: 0 !important; border: none !important; margin: 0 !important; }
  #label-section h2, #label-section > p { display: none !important; }
  .label-wrap > h3, .label-wrap > table, .label-wrap > ul, .label-wrap > p { display: none !important; }
  .aafco-label { border-width: 2px; max-width: none; }
  /* The DRAFT — ESTIMATE watermark stays on the printed free preview. */
}
