:root {
  --ink: #1d2733;
  --ink2: #56637a;
  --teal: #1f7a6a;
  --hairline: #e4eefc;
  --red: #b3261e;
  --pageTop: #eaf4ff;
  --pageMid: #f7fbff;
  --pageBottom: #eef9f3;
}

* { box-sizing: border-box; }

html, body { margin: 0; padding: 0; }

body {
  font-family: "Segoe UI", Tahoma, "Noto Naskh Arabic", "Arial", sans-serif;
  color: var(--ink);
  background: linear-gradient(180deg, var(--pageTop) 0%, var(--pageMid) 40%, var(--pageBottom) 100%) fixed;
  font-size: 18px;
  line-height: 1.9;
  -webkit-text-size-adjust: 100%;
}

#app {
  max-width: 720px;
  margin: 0 auto;
  padding: 20px 18px 48px;
}

/* headings and text: generous sizes for easy reading */
h1 { font-size: clamp(27px, 6vw, 34px); line-height: 1.4; margin: 0 0 6px; font-weight: 700; }
h2 { font-size: clamp(21px, 4.8vw, 25px); line-height: 1.5; margin: 0 0 10px; font-weight: 700; }
h3 { font-size: clamp(19px, 4.2vw, 22px); line-height: 1.6; margin: 26px 0 8px; font-weight: 700; }
p { margin: 0 0 14px; font-size: 17.5px; line-height: 1.95; }
ul, ol { margin: 0 0 14px; padding-inline-start: 22px; }
li { font-size: 17px; line-height: 1.9; margin-bottom: 10px; }
a { color: var(--teal); }

.daf-head { margin-bottom: 18px; }
.daf-fact { color: var(--ink2); font-size: 15px; margin: 0 0 6px; }
.daf-intro { color: var(--ink2); font-size: 16.5px; margin: 6px 0 0; }
.daf-group { margin: 26px 0; }
.daf-groupLabel { color: var(--ink2); font-size: 14px; margin: 0 0 2px; }
.daf-p { font-size: 17.5px; }
.daf-sub { margin-top: 26px; }
.daf-caption { color: var(--ink2); font-size: 15px; margin: 8px 0 0; }
.daf-footer { color: var(--ink2); font-size: 14px; text-align: center; margin: 28px 0 0; }

/* banner + brand */
.daf-banner { border-radius: 18px; overflow: hidden; background: linear-gradient(180deg, #eaf4ff, #d7e8ff); box-shadow: 0 6px 18px rgba(47, 107, 214, 0.10); margin-bottom: 16px; }
.daf-scene { display: block; width: 100%; height: auto; }
.daf-brand { display: flex; flex-direction: column; align-items: center; text-align: center; gap: 8px; margin: 6px 0 22px; }
.daf-avatar { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(47, 107, 214, 0.18); }
.daf-brandName { font-size: 21px; font-weight: 700; }
.daf-brandSub { color: var(--ink2); font-size: 15px; }

/* callouts */
.daf-callout { border-radius: 18px; padding: 18px; background: #fff; box-shadow: 0 3px 12px rgba(23, 62, 122, 0.07); border: 1px solid var(--hairline); }
.daf-calloutDanger { border-color: #f7cfcf; background: linear-gradient(160deg, #fff5f4, #fff); }
.daf-calloutTitle { font-weight: 700; color: var(--red); margin: 0 0 8px; font-size: 18px; }

/* buttons */
.daf-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin: 14px 0; }
.daf-btn { display: inline-flex; align-items: center; gap: 8px; padding: 13px 18px; border-radius: 14px; text-decoration: none; font-size: 16px; font-weight: 600; transition: transform 0.14s ease, background 0.14s ease; }
.daf-btn:active { transform: scale(0.98); }
.daf-btnPrimary { background: #1f4fa8; color: #fff; }
.daf-btnPrimary:hover { background: #1a4390; }
.daf-btnSecondary { background: #fff; color: #1f4fa8; border: 1px solid #cddffb; }
.daf-btnSecondary:hover { background: #f2f8ff; }
.daf-btnDanger { background: var(--red); color: #fff; }
.daf-link { color: var(--teal); font-size: 16px; text-decoration: underline; }
.daf-emergencyBar { display: flex; justify-content: center; margin: 2px 0 16px; }
.daf-emergencyBtn { display: inline-flex; align-items: center; gap: 8px; padding: 12px 18px; border-radius: 999px; background: #fdecec; color: var(--red); font-size: 16px; font-weight: 700; text-decoration: none; border: 1px solid #f7cfcf; }
.daf-emergencyBtn:active { transform: scale(0.98); }

/* search */
.daf-search { width: 100%; min-height: 54px; padding: 14px 16px; font: inherit; font-size: 17px; color: var(--ink); background: #fff; border: 1px solid var(--hairline); border-radius: 14px; box-shadow: 0 2px 10px rgba(23, 62, 122, 0.06); }
.daf-search:focus { outline: 2px solid var(--teal); outline-offset: 1px; }

/* section cards */
.daf-grid { display: grid; gap: 14px; }
.daf-card { display: grid; grid-template-columns: 58px 1fr; grid-template-rows: auto auto auto; column-gap: 14px; padding: 18px 16px; border-radius: 20px; background: #fff; border: 1px solid var(--hairline); box-shadow: 0 3px 12px rgba(23, 62, 122, 0.07); text-decoration: none; color: var(--ink); transition: transform 0.16s ease, box-shadow 0.16s ease; }
.daf-card:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(47, 107, 214, 0.12); }
.daf-card[data-section="heat"] { background: linear-gradient(160deg, #fff7ea 0%, #ffffff 70%); }
.daf-card[data-section="cough"] { background: linear-gradient(160deg, #edf4ff 0%, #ffffff 70%); }
.daf-card[data-section="gut"] { background: linear-gradient(160deg, #eafaf2 0%, #ffffff 70%); }
.daf-tile { grid-row: 1 / span 3; display: grid; place-items: center; width: 58px; height: 58px; border-radius: 18px; background: #fff; box-shadow: 0 2px 8px rgba(23, 62, 122, 0.10); }
.daf-cardName { font-size: 18px; font-weight: 700; }
.daf-cardBlurb { color: var(--ink2); font-size: 15px; line-height: 1.8; margin-top: 2px; }
.daf-cardCount { color: var(--teal); font-size: 13.5px; font-weight: 700; margin-top: 6px; }

/* article lists */
.daf-list { display: grid; }
.daf-item { display: flex; gap: 12px; padding: 16px 12px; border-bottom: 1px solid #e8f0fb; text-decoration: none; color: var(--ink); border-radius: 12px; transition: background 0.15s ease; }
.daf-item:hover { background: #f2f8ff; }
.daf-num { color: #7b8ea8; font-size: 14px; min-width: 22px; padding-top: 3px; }
.daf-itemText { display: grid; gap: 2px; }
.daf-itemName { font-weight: 700; font-size: 17px; line-height: 1.65; }
.daf-itemMeta { color: var(--ink2); font-size: 15px; line-height: 1.75; }

/* facts table */
.daf-facts { margin: 0 0 14px; }
.daf-facts > div { display: flex; justify-content: space-between; gap: 14px; padding: 12px 0; border-bottom: 1px solid #e8f0fb; }
.daf-facts dt { font-weight: 600; font-size: 16px; }
.daf-facts dd { margin: 0; color: var(--ink2); font-size: 15.5px; text-align: left; }

.daf-points li { font-size: 17px; }
.daf-bullets li { color: #7a1f1a; }

/* sound toggle */
.daf-soundRow { display: flex; justify-content: center; margin: 6px 0 12px; }
.daf-sound { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; font: inherit; font-size: 14px; color: var(--ink2); background: #f4f7fd; border: 1px solid var(--hairline); border-radius: 999px; cursor: pointer; }
.daf-sound[aria-pressed="true"] { background: #eef4ff; color: var(--ink); }

/* art + motion */
.daf-art { display: block; }
.daf-friends { display: flex; align-items: flex-end; justify-content: center; gap: 10px; margin: 24px 0 10px; }
.daf-sectionArt { display: flex; justify-content: center; margin: -4px 0 12px; }
.daf-sectionArt .daf-art { width: 64px; height: 64px; padding: 12px; border-radius: 50%; background: #eef4ff; animation: dafBob 4.5s ease-in-out infinite; }
.daf-bob1 { animation: dafBob 4s ease-in-out infinite; }
.daf-bob2 { animation: dafBob 5.2s ease-in-out infinite 0.4s; }
.daf-bob3 { animation: dafBob 6s ease-in-out infinite 0.8s; }
.daf-drift { animation: dafDrift 9s ease-in-out infinite; }
@keyframes dafBob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-4px); } }
@keyframes dafDrift { 0%, 100% { transform: translateX(0); } 50% { transform: translateX(-8px); } }

@media (min-width: 640px) {
  .daf-grid { grid-template-columns: repeat(3, 1fr); }
  .daf-card { grid-template-columns: 1fr; }
  .daf-tile { grid-row: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .daf-bob1, .daf-bob2, .daf-bob3, .daf-drift, .daf-sectionArt .daf-art { animation: none !important; }
  .daf-card, .daf-btn { transition: none; }
}

/* brand: cover banner + round logo, as in the first version */
.daf-heroWrap { margin: 0 0 16px; border-radius: 18px; overflow: hidden; box-shadow: 0 6px 18px rgba(47, 107, 214, 0.12); }
.daf-hero { display: block; width: 100%; height: auto; }
.daf-brandRow { display: flex; align-items: center; justify-content: center; gap: 10px; }
.daf-logo { width: 104px; height: 104px; border-radius: 50%; object-fit: cover; border: 4px solid #fff; box-shadow: 0 6px 16px rgba(47, 107, 214, 0.18); }
