/* MaaPa Ghar — calm "neem green and haldi" palette, large readable type. */
:root {
  --ink: #1d2826;
  --ink-soft: #3f4d4a;
  --paper: #fbf7f0;
  --card: #ffffff;
  --neem: #2f5d50;
  --neem-dark: #22463c;
  --neem-tint: #e4eee9;
  --haldi: #e3a72f;
  --haldi-tint: #fbf0d6;
  --terracotta: #a4452f;
  --terracotta-tint: #f8e6e0;
  --line: #d9d2c4;
  --focus: #1a56b8;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(29, 40, 38, 0.06), 0 4px 14px rgba(29, 40, 38, 0.06);
  --serif: Georgia, "Noto Serif", "Times New Roman", serif;
  --sans: "Segoe UI", system-ui, -apple-system, Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 112.5%; /* 18px base for older readers */
}
html.text-lg { font-size: 131.25%; } /* 21px */
*, *::before, *::after { box-sizing: border-box; }
/* Author display rules (buttons, .filters, .inline-checks) would otherwise
   beat the browser's [hidden] rule and show controls the scripts hide. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  line-height: 1.6;
  overflow-wrap: break-word;
}
img, svg { max-width: 100%; }
a { color: var(--neem-dark); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--terracotta); }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { font-family: var(--serif); line-height: 1.25; color: var(--neem-dark); margin: 1.4em 0 0.5em; }
h1 { font-size: clamp(1.6rem, 5.2vw, 2.4rem); margin-top: 0.4em; }
h2 { font-size: clamp(1.3rem, 3.8vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
li { margin-bottom: 0.35em; }
.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 16px; }
.page > .wrap, .page > section { margin-bottom: 1.5rem; }
.narrow { max-width: 760px; }
.muted { color: var(--ink-soft); font-size: 0.92rem; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: -999px; top: 8px; background: var(--neem); color: #fff; padding: 10px 16px; border-radius: 8px; z-index: 10; }
.skip-link:focus { left: 8px; }

/* Header */
.site-header { background: var(--card); border-bottom: 3px solid var(--haldi); }
.header-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; min-height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--neem-dark); min-height: 44px; }
.brand-name { font-family: var(--serif); font-size: 1.35rem; font-weight: 700; letter-spacing: 0.01em; }
.brand-name, .text-size { white-space: nowrap; }
@media (max-width: 420px) { .brand-name { font-size: 1.15rem; } .text-size { padding: 8px 12px; font-size: 0.85rem; } }
.logo { flex: none; }
.text-size, button, .button {
  font: inherit; font-size: 0.95rem; min-height: 44px; padding: 8px 16px; border-radius: 999px;
  border: 2px solid var(--neem); background: var(--card); color: var(--neem-dark); cursor: pointer; font-weight: 600;
  display: inline-flex; align-items: center; justify-content: center; gap: 6px; text-decoration: none;
}
button:hover, .button:hover { background: var(--neem-tint); color: var(--neem-dark); }
.button-primary, button.primary { background: var(--neem); color: #fff; }
.button-primary:hover, button.primary:hover { background: var(--neem-dark); color: #fff; }
button.quiet { border-color: var(--line); color: var(--ink-soft); font-weight: 500; }
.text-size[aria-pressed="true"] { background: var(--neem); color: #fff; }
.nav-desktop ul, .nav-mobile ul { list-style: none; margin: 0; padding: 0; }
.nav-desktop ul { display: flex; flex-wrap: wrap; gap: 4px 6px; padding-bottom: 10px; }
.nav-desktop a, .nav-mobile a {
  display: inline-flex; align-items: center; min-height: 44px; padding: 6px 12px; border-radius: 10px;
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: 0.95rem;
}
.nav-desktop a:hover, .nav-mobile a:hover { background: var(--neem-tint); }
.nav-desktop a[aria-current="page"], .nav-mobile a[aria-current="page"] { background: var(--neem); color: #fff; }
.nav-mobile { display: none; padding-bottom: 10px; }
.nav-mobile summary { min-height: 44px; display: inline-flex; align-items: center; padding: 6px 16px; border: 2px solid var(--neem); border-radius: 999px; cursor: pointer; font-weight: 700; color: var(--neem-dark); }
.nav-mobile[open] summary { background: var(--neem-tint); }
.nav-mobile ul { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; margin-top: 8px; }
@media (max-width: 760px) {
  .nav-desktop { display: none; }
  .nav-mobile { display: block; }
}

/* Breadcrumb / meta */
.breadcrumb { font-size: 0.9rem; margin: 18px 0 0; color: var(--ink-soft); }
.breadcrumb a { color: var(--ink-soft); }
.reviewed { font-size: 0.9rem; color: var(--ink-soft); border-left: 4px solid var(--haldi); padding-left: 10px; }
.lead { font-size: 1.12rem; color: var(--ink-soft); max-width: 46em; }

/* Hero */
.hero { padding-top: 12px; }
.hero h1 { margin-bottom: 0.3em; }
.hero .lead { margin-bottom: 0.6em; }

/* Cards and grids */
.card, .tool-card, .product-card, .helpline-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px;
}
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
.guide-card { display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--ink); min-height: 44px; }
.guide-card h3 { margin: 0.2em 0 0.1em; }
.guide-card .icon { width: 44px; height: 44px; border-radius: 12px; background: var(--neem-tint); display: grid; place-items: center; }
.guide-card:hover { border-color: var(--neem); }
.guide-card p { margin: 0; color: var(--ink-soft); }
.pill { display: inline-block; font-size: 0.8rem; font-weight: 700; letter-spacing: 0.04em; text-transform: uppercase; color: var(--terracotta); }

/* Checklist tool */
.tool-card { border-top: 6px solid var(--neem); }
.tool-head h2 { margin-top: 0; }
.progress-text { font-weight: 700; color: var(--neem-dark); margin: 0 0 6px; }
.bar { height: 12px; background: var(--neem-tint); border-radius: 999px; overflow: hidden; margin-bottom: 12px; }
.bar span { display: block; height: 100%; width: 0; background: var(--neem); border-radius: 999px; transition: width 0.3s ease; }
.room { border: 1px solid var(--line); border-radius: 12px; margin: 10px 0; background: #fffdf9; }
.room > summary {
  cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; gap: 12px;
  min-height: 52px; padding: 10px 14px; font-weight: 700; font-family: var(--serif); font-size: 1.08rem; color: var(--neem-dark);
}
.room > summary::-webkit-details-marker { display: none; }
.room > summary::after { content: "+"; font-family: var(--sans); font-size: 1.4rem; color: var(--neem); }
.room[open] > summary::after { content: "–"; }
.room-count { font-family: var(--sans); font-size: 0.85rem; font-weight: 600; color: var(--ink-soft); margin-left: auto; }
.room ul { list-style: none; padding: 0 14px 10px; margin: 0; }
.check-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-top: 1px dashed var(--line); }
.check-item input { width: 26px; height: 26px; margin: 2px 0 0; flex: none; accent-color: var(--neem); }
.check-item label { cursor: pointer; }
.check-item .why { display: block; font-size: 0.9rem; color: var(--ink-soft); margin-top: 2px; }
.editorial-tag { display: inline-block; font-size: 0.75rem; font-weight: 700; color: var(--terracotta); background: var(--terracotta-tint); border-radius: 6px; padding: 0 6px; margin-left: 4px; }
.tool-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.save-status { font-size: 0.9rem; color: var(--ink-soft); }

/* Notes */
.limits { background: var(--terracotta-tint); border-left: 6px solid var(--terracotta); border-radius: 10px; padding: 14px 16px; margin: 1.5rem 0; }
.limits p { margin: 0; }
.disclosure { background: var(--haldi-tint); border: 1px dashed #b88620; border-radius: 10px; padding: 10px 14px; font-size: 0.92rem; }
.callout { background: var(--neem-tint); border-radius: 12px; padding: 14px 16px; margin: 1rem 0; }
.callout p:last-child { margin-bottom: 0; }
.source-line { font-size: 0.85rem; color: var(--ink-soft); margin-top: -0.4em; }
.sources ol { padding-left: 1.3em; font-size: 0.92rem; }
.fact { font-family: var(--serif); font-size: 1.25rem; color: var(--neem-dark); margin-bottom: 0.2em; }

/* Tables */
.table-wrap { position: relative; overflow-x: auto; margin: 0 0 1rem; border-radius: 10px; border: 1px solid var(--line); background: var(--card); }
table { border-collapse: collapse; width: 100%; font-size: 0.95rem; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { background: var(--neem-tint); color: var(--neem-dark); }
tr:last-child td { border-bottom: 0; }

/* Steps */
.steps { counter-reset: step; list-style: none; padding: 0; }
.steps > li { counter-increment: step; position: relative; padding-left: 52px; margin-bottom: 14px; min-height: 40px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: 0; width: 38px; height: 38px; border-radius: 50%;
  background: var(--neem); color: #fff; display: grid; place-items: center; font-weight: 700;
}

/* Products */
.product-grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); margin-top: 12px; }
.product-card h3, .product-card h4 { margin-top: 0; }
.product-card .label { font-weight: 700; margin: 0 0 0.2em; }
.label-inline { font-weight: 700; }
.product-card .checks { padding-left: 1.2em; }
.product-cat { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--terracotta); font-weight: 700; margin-bottom: 0.2em; }
.safety-note { background: var(--neem-tint); border-radius: 8px; padding: 8px 10px; font-size: 0.95rem; }
.shop-link {
  display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 10px;
  background: var(--neem); color: #fff; text-decoration: none; font-weight: 600;
}
.shop-link:hover { background: var(--neem-dark); color: #fff; }
.shop-tag { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; background: var(--haldi); color: var(--ink); border-radius: 6px; padding: 1px 6px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin: 12px 0; }
.filters button[aria-pressed="true"] { background: var(--neem); color: #fff; }

/* Forms */
.form-grid { display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(min(220px, 100%), 1fr)); }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; margin: 0 0 14px; background: #fffdf9; }
legend { font-weight: 700; font-family: var(--serif); color: var(--neem-dark); padding: 0 6px; }
label { display: block; font-weight: 600; }
.field { display: flex; flex-direction: column; gap: 4px; }
.field small { color: var(--ink-soft); font-weight: 400; }
input[type="text"], input[type="number"], input[type="date"], input[type="tel"], select, textarea {
  font: inherit; width: 100%; min-height: 44px; padding: 8px 10px; border: 2px solid #857d6d; border-radius: 10px; background: #fff; color: var(--ink);
}
textarea { min-height: 80px; resize: vertical; }
input:focus, select:focus, textarea:focus { border-color: var(--neem); }
.inline-checks { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.inline-checks label { display: inline-flex; gap: 8px; align-items: center; font-weight: 500; min-height: 44px; }
.inline-checks input { width: 24px; height: 24px; accent-color: var(--neem); }
.keep-toggle { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; background: var(--neem-tint); padding: 10px 12px; border-radius: 10px; }
.keep-toggle input { width: 24px; height: 24px; flex: none; accent-color: var(--neem); margin-top: 2px; }
.errors { color: var(--terracotta); font-weight: 600; }
.errors:empty { display: none; }
.result { background: var(--neem-tint); border-radius: 12px; padding: 12px 14px; margin-top: 12px; }
.result:empty { display: none; }
.result strong { font-size: 1.15rem; }

/* Emergency card preview */
.card-preview { border: 3px solid var(--terracotta); border-radius: 14px; background: #fff; padding: 14px; max-width: 520px; }
.card-preview h3 { margin: 0 0 6px; color: var(--terracotta); font-family: var(--sans); text-transform: uppercase; letter-spacing: 0.05em; font-size: 1rem; }
.card-preview dl { display: grid; grid-template-columns: minmax(110px, 38%) 1fr; gap: 4px 10px; margin: 0; font-size: 0.92rem; }
.card-preview dt { font-weight: 700; color: var(--ink-soft); }
.card-preview dd { margin: 0; }

/* Helplines */
.helpline-card { border-left: 8px solid var(--neem); }
.helpline-number { font-family: var(--serif); font-size: 2rem; font-weight: 700; margin: 0.1em 0; }
.helpline-number a { text-decoration: none; color: var(--neem-dark); display: inline-flex; align-items: center; min-height: 44px; min-width: 44px; }

/* Diagram */
.diagram { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px; margin: 1rem 0; }
.diagram figcaption { font-size: 0.9rem; color: var(--ink-soft); }

/* Footer */
.site-footer { background: var(--neem-dark); color: #f1efe8; margin-top: 3rem; padding: 26px 0 30px; font-size: 0.95rem; }
.site-footer a { color: #fff; }
.site-footer :focus-visible { outline-color: #ffffff; }
.footer-brand { display: flex; align-items: center; gap: 8px; font-family: var(--serif); font-size: 1.2rem; font-weight: 700; }
.footer-brand .logo { background: #f6e7c8; border-radius: 10px; padding: 2px; }
.footer-links { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 18px; }
.footer-links a { display: inline-flex; min-height: 44px; align-items: center; }

/* Motion */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

/* Print: tools print cleanly on paper */
@media print {
  :root { font-size: 11pt; }
  body { background: #fff; }
  .site-header, .site-footer, .no-print, .breadcrumb, .tool-actions, .filters, .skip-link, .shop-link, .disclosure, .keep-toggle, form button { display: none !important; }
  .room { break-inside: avoid; }
  details.room > ul { display: block !important; }
  .card, .tool-card, .product-card, .helpline-card { box-shadow: none; }
  a { color: #000; text-decoration: none; }
  .print-only { display: block !important; }
}
.print-only { display: none; }
#print-root { display: none; }
@media print {
  body.printing > *:not(#print-root) { display: none !important; }
  body.printing #print-root { display: block !important; padding: 0 8px; }
  #print-root .print-note { font-size: 9pt; color: #444; margin-top: 12pt; }
  #print-root .card-preview { max-width: 100%; border-style: dashed; }
}
