/* =============================================
   Dark Mode
   ============================================= */

[data-theme="dark"] {
  --color-brand: #8ddbc5;
  --color-brand-dark: #8ddbc5;
  --color-brand-light: #1a2e28;
  --color-text: #eff0f0;
  --color-text-secondary: #bbb;
  --color-text-muted: #888;
  --color-bg: #1a1a1a;
  --color-bg-alt: #242424;
  --color-border: #3a3a3a;
  --color-success: #3ddc97;
  --color-carbs: #5eead4;
  --color-protein: #facc15;
  --color-fat: #fb923c;
}

[data-theme="dark"] .site-header {
  background: #1a1a1a;
  border-bottom-color: #333;
}

[data-theme="dark"] .header-search-input {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}
[data-theme="dark"] .header-search-input::placeholder { color: #777; }
[data-theme="dark"] .header-search-input:focus { border-color: #8ddbc5; background: #222; }

[data-theme="dark"] .search-dropdown,
[data-theme="dark"] .search-no-results {
  background: #2a2a2a;
  border-color: #444;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}
[data-theme="dark"] .search-result-item {
  color: #eee;
  border-bottom-color: #333;
}
[data-theme="dark"] .search-result-item:hover { background: #333; }

[data-theme="dark"] .food-card {
  background: #242424;
  border-color: #3a3a3a;
}
[data-theme="dark"] .food-card:hover {
  border-color: #8ddbc5;
  box-shadow: 0 4px 12px rgba(0,0,0,0.3);
}

[data-theme="dark"] .hero {
  background: linear-gradient(135deg, #1a2e28, #1a1a1a);
}

[data-theme="dark"] .nutrition-table th { background: #2a2a2a; }
[data-theme="dark"] .nutrition-table tr:hover { background: #2a2a2a; }

[data-theme="dark"] .quick-answer {
  background: #1a2e28;
  border-left-color: #8ddbc5;
}

[data-theme="dark"] .app-cta { background: linear-gradient(135deg, #1a2e28, #0e1b14); }

[data-theme="dark"] .site-footer {
  background: #141414;
  border-top-color: #333;
}
[data-theme="dark"] .footer-bottom { border-top-color: #333; }

[data-theme="dark"] .tool-form {
  background: #242424;
  border-color: #3a3a3a;
}
[data-theme="dark"] .form-row input,
[data-theme="dark"] .form-row select {
  background: #2a2a2a;
  border-color: #444;
  color: #eee;
}
[data-theme="dark"] .form-row input:focus,
[data-theme="dark"] .form-row select:focus { border-color: #8ddbc5; }

[data-theme="dark"] .tool-results {
  background: #242424;
  border-color: #3a3a3a;
}

[data-theme="dark"] .tool-card {
  background: #242424;
  border-color: #3a3a3a;
}
[data-theme="dark"] .tool-card:hover {
  border-color: #8ddbc5;
  box-shadow: 0 4px 20px rgba(141, 219, 197, 0.08);
}
[data-theme="dark"] .tool-card h2,
[data-theme="dark"] .tool-card h3 { color: #eee; }
[data-theme="dark"] .tool-card-cta { color: #8ddbc5; }

[data-theme="dark"] .goal-lose { background: #2a1a1a; }
[data-theme="dark"] .goal-maintain { background: #1a2e28; }
[data-theme="dark"] .goal-gain { background: #1a1e2e; }

[data-theme="dark"] .macro-protein { background: #2e2a1a; }
[data-theme="dark"] .macro-carbs { background: #1a2e28; }
[data-theme="dark"] .macro-fat { background: #2e1e1a; }

[data-theme="dark"] .macro-preview { background: #1a2e28; color: #8ddbc5; }

[data-theme="dark"] .embed-section {
  background: #242424;
  border-color: #3a3a3a;
}
[data-theme="dark"] .embed-code {
  background: #2a2a2a;
  border-color: #444;
  color: #ccc;
}

[data-theme="dark"] .if-protocol-card { background: #1a2e28; }
[data-theme="dark"] .if-fast { background: #333; }

[data-theme="dark"] .protein-range-bar { background: #333; }
[data-theme="dark"] .protein-foods span {
  background: #2a2a2a;
  border-color: #444;
  color: #ccc;
}

[data-theme="dark"] .deficit-table th { border-bottom-color: #444; }
[data-theme="dark"] .deficit-table td { border-bottom-color: #333; color: #ccc; }

[data-theme="dark"] .iw-formula-card {
  background: #2a2a2a;
  border-color: #3a3a3a;
}
[data-theme="dark"] .iw-bmi-note { background: #1a2e28; color: #8ddbc5; }

[data-theme="dark"] .cat-under { background: #1a2636; color: #5dade2; }
[data-theme="dark"] .cat-normal { background: #1a2e28; color: #5eead4; }
[data-theme="dark"] .cat-over { background: #2e2a1a; color: #f5b041; }
[data-theme="dark"] .cat-obese { background: #2a1a1a; color: #ec7063; }

[data-theme="dark"] .diet-tag { background: #1a2e28; color: #8ddbc5; }

[data-theme="dark"] .comparison-table th { background: #2a2a2a; }

/* =============================================
   Theme Toggle Button
   ============================================= */

.theme-toggle {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border: 1px solid var(--color-border);
  border-radius: 8px;
  background: var(--color-bg-alt);
  color: var(--color-text);
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.15s;
  padding: 0;
}
.theme-toggle:hover {
  background: var(--color-border);
  transform: translateY(-1px);
}

.theme-icon { width: 18px; height: 18px; }
.theme-icon-dark { display: none; }

[data-theme="dark"] .theme-icon-light { display: block; }
[data-theme="dark"] .theme-icon-dark { display: none; }

/* =============================================
   Android Smart Banner
   ============================================= */

[x-cloak] { display: none !important; }

.android-smart-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  gap: 0.625rem;
  background: #f2f2f2;
  border-bottom: 1px solid #ccc;
  padding: 0.625rem 0.75rem;
  font-family: 'Quicksand', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.android-smart-banner-close {
  background: none;
  border: none;
  color: #888;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
  padding: 0 0.25rem;
  flex-shrink: 0;
}
.android-smart-banner-close:hover {
  color: #333;
}

.android-smart-banner-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  flex-shrink: 0;
  background: #0e1b14;
  padding: 4px;
}

.android-smart-banner-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.android-smart-banner-title {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1a1a1a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.android-smart-banner-subtitle {
  font-size: 0.7rem;
  color: #666;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.android-smart-banner-store {
  font-size: 0.65rem;
  color: #999;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

.android-smart-banner-cta {
  display: inline-block;
  background: #3ddc97;
  color: #0e1b14;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.4rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background 0.2s;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.android-smart-banner-cta:hover {
  background: #2ec486;
  color: #0e1b14;
  text-decoration: none;
}

@media (min-width: 768px) {
  .android-smart-banner {
    display: none !important;
  }
}

/* =============================================
   Sticky App CTA Bar (food pages)
   ============================================= */

.app-cta-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: #0e1b14;
  color: #fff;
  padding: 0.5rem 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
  font-family: 'Quicksand', sans-serif;
}
.app-cta-bar-content {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
}
.app-cta-bar-text {
  font-size: 0.8rem;
  font-weight: 500;
}
.app-cta-bar-button {
  display: inline-block;
  background: #3ddc97;
  color: #0e1b14;
  font-weight: 700;
  font-size: 0.8rem;
  padding: 0.35rem 1rem;
  border-radius: 6px;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.2s;
}
.app-cta-bar-button:hover {
  background: #2ec486;
  text-decoration: none;
}
.app-cta-bar-close {
  background: none;
  border: none;
  color: #999;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0 0.25rem;
  line-height: 1;
}
.app-cta-bar-close:hover {
  color: #fff;
}
@media (max-width: 600px) {
  .app-cta-bar-text {
    font-size: 0.75rem;
    text-align: center;
  }
}

/* =============================================
   Header Search
   ============================================= */

.header-search {
  position: relative;
  flex: 0 1 280px;
  margin: 0 1rem;
}

.header-search-input {
  width: 100%;
  padding: 0.45rem 0.75rem 0.45rem 2rem;
  border: 1.5px solid #e5e5e5;
  border-radius: 50px;
  font-size: 0.85rem;
  font-family: 'Quicksand', sans-serif;
  outline: none;
  background: #f7f7f7;
  transition: border-color 0.2s, background 0.2s;
}
.header-search-input:focus {
  border-color: #336b62;
  background: #fff;
}
.header-search-input::placeholder {
  color: #aaa;
}

.header-search-icon {
  position: absolute;
  left: 0.65rem;
  top: 50%;
  transform: translateY(-50%);
  color: #aaa;
  pointer-events: none;
}

.header-search-results {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 200;
}

/* Shared search dropdown styles */
.search-dropdown {
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

.search-result-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.55rem 0.85rem;
  border-bottom: 1px solid #f0f0f0;
  color: #1a1a1a;
  text-decoration: none;
  font-size: 0.875rem;
  transition: background 0.15s;
}
.search-result-item:last-child {
  border-bottom: none;
}
.search-result-item:hover {
  background: #f7f7f7;
  text-decoration: none;
}

.search-result-img {
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}

.search-result-info {
  display: flex;
  flex-direction: column;
  min-width: 0;
}
.search-result-info strong {
  font-size: 0.85rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.search-result-cal {
  font-size: 0.75rem;
  color: #888;
  font-family: 'Rubik', sans-serif;
}

.search-no-results {
  padding: 0.75rem 1rem;
  text-align: center;
  color: #888;
  font-size: 0.85rem;
  background: #fff;
  border-radius: 12px;
  border: 1px solid #e5e5e5;
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
}

@media (max-width: 768px) {
  .header-search {
    flex: 1 1 auto;
    margin: 0 0.5rem;
    max-width: none;
  }
}

@media (max-width: 480px) {
  .header-search {
    flex: 1 1 auto;
    margin: 0 0.25rem;
  }
  .header-search-input {
    font-size: 0.8rem;
    padding: 0.4rem 0.6rem 0.4rem 1.75rem;
  }
}

/* =============================================
   Header Logo (icon instead of text)
   ============================================= */

.site-logo {
  flex-shrink: 0;
  line-height: 0;
}
.site-logo-img {
  display: block;
  border: none;
  outline: none;
}

/* =============================================
   Tools Landing Page
   ============================================= */

.tools-hero {
  text-align: center;
  padding: 3rem 1.5rem 1.5rem;
  max-width: 700px;
  margin: 0 auto;
}
.tools-hero h1 {
  font-size: 2rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.tools-hero p {
  font-size: 1.05rem;
  color: #666;
}

.tools-grid-section {
  max-width: 960px;
  margin: 0 auto;
  padding: 1rem 1.5rem 2rem;
}
.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.tool-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.75rem 1.5rem;
  text-decoration: none;
  color: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.tool-card:hover {
  border-color: #336b62;
  box-shadow: 0 4px 20px rgba(51, 107, 98, 0.1);
  text-decoration: none;
}
.tool-card-icon {
  font-size: 2.2rem;
  margin-bottom: 0.75rem;
}
.tool-card h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.5rem;
}
.tool-card p {
  font-size: 0.9rem;
  color: #666;
  margin: 0 0 1rem;
  flex: 1;
  line-height: 1.5;
}
.tool-card-cta {
  font-size: 0.85rem;
  font-weight: 700;
  color: #336b62;
}

/* =============================================
   Tool Page (single calculator)
   ============================================= */

.tool-page {
  max-width: 600px;
  margin: 0 auto;
  padding: 2rem 1.5rem 3rem;
}
.tool-page h1 {
  font-size: 1.75rem;
  font-weight: 700;
  color: #1a1a1a;
  margin-bottom: 0.5rem;
}
.tool-description {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 2rem;
  line-height: 1.6;
}

/* =============================================
   Tool Forms
   ============================================= */

.tool-form {
  background: #fafafa;
  border: 1.5px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem;
}

.form-row {
  margin-bottom: 1rem;
}
.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  color: #333;
  margin-bottom: 0.3rem;
}
.form-row input,
.form-row select {
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-size: 0.95rem;
  font-family: 'Quicksand', sans-serif;
  background: #fff;
  outline: none;
  transition: border-color 0.2s;
  box-sizing: border-box;
}
.form-row input:focus,
.form-row select:focus {
  border-color: #336b62;
}
.form-hint {
  display: block;
  font-size: 0.78rem;
  color: #999;
  margin-top: 0.25rem;
}
.form-hint a {
  color: #336b62;
  text-decoration: underline;
}

.inline-fields {
  display: flex;
  gap: 0.75rem;
}
.inline-fields input {
  flex: 1;
}

.macro-preview {
  background: #eef7f4;
  border-radius: 10px;
  padding: 0.6rem 1rem;
  margin-bottom: 1rem;
  font-size: 0.85rem;
  color: #336b62;
  font-weight: 600;
  text-align: center;
}

.tool-submit {
  width: 100%;
  padding: 0.75rem 1.5rem;
  background: #336b62;
  color: #fff;
  border: none;
  border-radius: 50px;
  font-size: 1rem;
  font-weight: 700;
  font-family: 'Quicksand', sans-serif;
  cursor: pointer;
  transition: background 0.2s;
  margin-top: 0.5rem;
}
.tool-submit:hover {
  background: #285550;
}

/* =============================================
   Tool Results
   ============================================= */

.tool-results {
  background: #fff;
  border: 1.5px solid #e5e5e5;
  border-radius: 16px;
  padding: 1.5rem;
  margin-top: 1.5rem;
}
.tool-results h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 1rem;
}

.result-primary {
  text-align: center;
  margin-bottom: 1.25rem;
}
.result-label {
  display: block;
  font-size: 0.8rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 0.25rem;
}
.result-value {
  display: block;
  font-size: 3rem;
  font-weight: 700;
  color: #336b62;
  font-family: 'Rubik', sans-serif;
  line-height: 1.1;
}
.result-unit {
  display: block;
  font-size: 0.85rem;
  color: #888;
}

.result-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.result-card {
  text-align: center;
  border-radius: 12px;
  padding: 1rem 0.5rem;
}
.result-card-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}
.result-card-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
}
.result-card-note {
  display: block;
  font-size: 0.7rem;
  color: #888;
  margin-top: 0.15rem;
}

.goal-lose {
  background: #fff0f0;
  color: #c0392b;
}
.goal-lose .result-card-value { color: #c0392b; }

.goal-maintain {
  background: #eef7f4;
  color: #336b62;
}
.goal-maintain .result-card-value { color: #336b62; }

.goal-gain {
  background: #f0f4ff;
  color: #2d5bbb;
}
.goal-gain .result-card-value { color: #2d5bbb; }

.result-method {
  font-size: 0.78rem;
  color: #999;
  margin-top: 1rem;
  line-height: 1.5;
}

/* =============================================
   Macro Results
   ============================================= */

.macro-results-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.macro-result-card {
  text-align: center;
  border-radius: 12px;
  padding: 1rem 0.5rem;
}
.macro-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.2rem;
}
.macro-grams {
  display: block;
  font-size: 1.75rem;
  font-weight: 700;
  font-family: 'Rubik', sans-serif;
}
.macro-unit {
  display: block;
  font-size: 0.75rem;
  color: #888;
}
.macro-cals {
  display: block;
  font-size: 0.72rem;
  color: #888;
  margin-top: 0.2rem;
  font-family: 'Rubik', sans-serif;
}

.macro-protein {
  background: #fef6e9;
}
.macro-protein .macro-grams,
.macro-protein .macro-label { color: #c8930a; }

.macro-carbs {
  background: #eef7f4;
}
.macro-carbs .macro-grams,
.macro-carbs .macro-label { color: #0d9e7a; }

.macro-fat {
  background: #fff4ef;
}
.macro-fat .macro-grams,
.macro-fat .macro-label { color: #d6660c; }

.macro-bar {
  display: flex;
  height: 28px;
  border-radius: 50px;
  overflow: hidden;
  margin-bottom: 0.75rem;
}
.macro-bar-segment {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  font-weight: 700;
  color: #fff;
  transition: width 0.4s ease;
}
.bar-protein { background: #eab308; }
.bar-carbs   { background: #14b8a6; }
.bar-fat     { background: #f97316; }

/* =============================================
   BMI Results
   ============================================= */

.bmi-category {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: inline-block;
  margin: 0 auto 1.25rem;
  width: auto;
}
.bmi-results .result-primary {
  margin-bottom: 0.5rem;
}
.tool-results .bmi-category {
  display: block;
  text-align: center;
}

.cat-under  { background: #e8f4fd; color: #2980b9; }
.cat-normal { background: #eef7f4; color: #27ae60; }
.cat-over   { background: #fef6e9; color: #e67e22; }
.cat-obese  { background: #fff0f0; color: #c0392b; }

.bmi-scale {
  position: relative;
  margin: 1rem 0 1.5rem;
}
.bmi-scale-bar {
  display: flex;
  height: 16px;
  border-radius: 50px;
  overflow: hidden;
}
.bmi-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  font-weight: 700;
  color: #fff;
}
.zone-under  { background: #3498db; }
.zone-normal { background: #27ae60; }
.zone-over   { background: #e67e22; }
.zone-obese  { background: #c0392b; }

.bmi-marker {
  position: absolute;
  top: -6px;
  width: 12px;
  height: 28px;
  border: 3px solid #1a1a1a;
  border-radius: 6px;
  background: #fff;
  transform: translateX(-50%);
  transition: left 0.5s ease;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

.bmi-ranges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
  font-size: 0.8rem;
  color: #666;
}
.bmi-range-item {
  display: flex;
  align-items: center;
  gap: 0.35rem;
}
.bmi-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}
.dot-under  { background: #3498db; }
.dot-normal { background: #27ae60; }
.dot-over   { background: #e67e22; }
.dot-obese  { background: #c0392b; }

/* =============================================
   Tool CTA Section
   ============================================= */

.tool-cta-section {
  text-align: center;
  padding: 2rem 1.5rem;
  margin-top: 2rem;
  background: #0e1b14;
  border-radius: 16px;
  color: #fff;
}
.tool-cta-section h3 {
  font-size: 1.25rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: #fff;
}
.tool-cta-section p {
  font-size: 0.9rem;
  color: #bbb;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

.cta-buttons {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  flex-wrap: wrap;
}
.cta-btn {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  border-radius: 50px;
  font-size: 0.9rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s, transform 0.15s;
  font-family: 'Quicksand', sans-serif;
}
.cta-btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}
.cta-btn-primary {
  background: #3ddc97;
  color: #0e1b14;
}
.cta-btn-primary:hover {
  background: #2ec486;
  color: #0e1b14;
}
.cta-btn-secondary {
  background: rgba(255,255,255,0.1);
  color: #fff;
  border: 1.5px solid rgba(255,255,255,0.25);
}
.cta-btn-secondary:hover {
  background: rgba(255,255,255,0.2);
  color: #fff;
}

/* =============================================
   Embed Code Section
   ============================================= */

.embed-section {
  margin-top: 2rem;
  padding: 1.5rem;
  background: #fafafa;
  border: 1.5px solid #e5e5e5;
  border-radius: 16px;
}
.embed-section h3 {
  font-size: 1.05rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 0 0 0.4rem;
}
.embed-section > p {
  font-size: 0.85rem;
  color: #666;
  margin: 0 0 1rem;
}

.embed-code-wrapper {
  position: relative;
}
.embed-code {
  width: 100%;
  min-height: 56px;
  padding: 0.6rem 5rem 0.6rem 0.75rem;
  border: 1.5px solid #ddd;
  border-radius: 10px;
  font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
  font-size: 0.78rem;
  color: #444;
  background: #fff;
  resize: none;
  box-sizing: border-box;
}
.embed-copy-btn {
  position: absolute;
  top: 50%;
  right: 0.6rem;
  transform: translateY(-50%);
  padding: 0.4rem 0.9rem;
  background: #336b62;
  color: #fff;
  border: none;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  font-family: 'Quicksand', sans-serif;
  transition: background 0.2s;
}
.embed-copy-btn:hover {
  background: #285550;
}
.embed-note {
  font-size: 0.75rem;
  color: #999;
  margin-top: 0.75rem;
}
.embed-note a {
  color: #336b62;
  text-decoration: underline;
}

/* =============================================
   App CTA Section (tools landing)
   ============================================= */

.app-cta-section {
  max-width: 600px;
  margin: 1rem auto 3rem;
  padding: 0 1.5rem;
}
.app-cta-inner {
  text-align: center;
  background: #0e1b14;
  border-radius: 16px;
  padding: 2rem 1.5rem;
  color: #fff;
}
.app-cta-icon {
  border-radius: 14px;
  margin-bottom: 1rem;
}
.app-cta-inner h3 {
  font-size: 1.25rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 0.5rem;
}
.app-cta-inner p {
  font-size: 0.9rem;
  color: #bbb;
  margin: 0 0 1.25rem;
  line-height: 1.5;
}

/* =============================================
   Tools Section Titles
   ============================================= */

.tools-section-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #333;
  margin: 0 0 0.75rem;
  padding-bottom: 0.4rem;
  border-bottom: 2px solid #e5e5e5;
}

/* =============================================
   IF Schedule Planner
   ============================================= */

.if-protocol-card {
  text-align: center;
  background: #eef7f4;
  border-radius: 14px;
  padding: 1.25rem 1rem;
  margin-bottom: 1.25rem;
}
.if-protocol-name {
  font-size: 1.3rem;
  font-weight: 700;
  color: #336b62;
  margin-bottom: 0.25rem;
}
.if-protocol-ratio {
  font-size: 0.9rem;
  color: #666;
  font-family: 'Rubik', sans-serif;
}

.if-schedule-visual {
  margin-bottom: 1.25rem;
}
.if-timeline {
  display: flex;
  border-radius: 8px;
  overflow: hidden;
  height: 36px;
  margin-bottom: 0.5rem;
}
.if-block {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.55rem;
  color: rgba(255,255,255,0.8);
  min-width: 0;
}
.if-block span { font-size: 0.55rem; white-space: nowrap; }
.if-fast { background: #1a1a1a; }
.if-eat { background: #27ae60; }
.if-bar-note {
  text-align: center;
  font-size: 0.85rem;
  color: #666;
  padding: 0.5rem;
}
.if-legend {
  display: flex;
  gap: 1rem;
  font-size: 0.78rem;
  color: #666;
}
.if-legend-item { display: flex; align-items: center; gap: 0.3rem; }
.if-dot {
  width: 10px;
  height: 10px;
  border-radius: 3px;
  flex-shrink: 0;
}
.if-dot-fast { background: #1a1a1a; }
.if-dot-eat { background: #27ae60; }

.if-details h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0 0.5rem;
}
.if-details ul {
  padding-left: 1.25rem;
  margin: 0 0 0.5rem;
}
.if-details li {
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* =============================================
   Protein Intake Calculator
   ============================================= */

.protein-range {
  margin: 0.75rem 0 1.25rem;
}
.protein-range-bar {
  position: relative;
  height: 14px;
  background: #e5e5e5;
  border-radius: 50px;
  overflow: hidden;
}
.protein-range-fill {
  height: 100%;
  background: linear-gradient(90deg, #eef7f4, #336b62);
  border-radius: 50px;
  transition: width 0.4s;
}
.protein-range-marker {
  position: absolute;
  top: -4px;
  width: 10px;
  height: 22px;
  border: 3px solid #1a1a1a;
  border-radius: 5px;
  background: #fff;
  transform: translateX(-50%);
  transition: left 0.5s;
  box-shadow: 0 1px 4px rgba(0,0,0,0.2);
}
.protein-range-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.78rem;
  color: #888;
  margin-top: 0.25rem;
  font-family: 'Rubik', sans-serif;
}

.protein-breakdown h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0 0.5rem;
}
.protein-breakdown ul {
  padding-left: 1.25rem;
  margin: 0 0 0.75rem;
}
.protein-breakdown li {
  font-size: 0.88rem;
  color: #444;
  margin-bottom: 0.3rem;
}
.protein-foods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.protein-foods span {
  background: #f7f7f7;
  border: 1px solid #e5e5e5;
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  font-size: 0.78rem;
  color: #444;
}

/* =============================================
   Calorie Deficit Calculator
   ============================================= */

.deficit-summary {
  font-size: 0.95rem;
  color: #444;
  margin-bottom: 1rem;
}
.deficit-table-wrap {
  overflow-x: auto;
  margin-bottom: 1rem;
}
.deficit-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}
.deficit-table th {
  text-align: left;
  font-weight: 700;
  color: #333;
  padding: 0.6rem 0.5rem;
  border-bottom: 2px solid #ddd;
  white-space: nowrap;
}
.deficit-table td {
  padding: 0.6rem 0.5rem;
  border-bottom: 1px solid #eee;
  color: #444;
}
.deficit-table td small {
  color: #999;
  font-family: 'Rubik', sans-serif;
}
.deficit-safe td:first-child strong { color: #27ae60; }
.deficit-caution td:first-child strong { color: #e67e22; }
.deficit-warning td:first-child strong { color: #c0392b; }

.deficit-safety h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0 0.5rem;
}
.deficit-safety ul {
  padding-left: 1.25rem;
  margin: 0;
}
.deficit-safety li {
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* =============================================
   Water Intake Calculator
   ============================================= */

.water-display {
  text-align: center;
  margin-bottom: 1rem;
}
.water-primary {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  margin-bottom: 0.5rem;
}
.water-icon { font-size: 2.5rem; }
.water-primary .result-value { margin-bottom: 0; }
.water-alt {
  font-size: 0.9rem;
  color: #888;
  font-family: 'Rubik', sans-serif;
}

.water-glasses p {
  font-size: 0.9rem;
  color: #444;
  margin-bottom: 0.5rem;
}
.water-glass-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem;
  margin-bottom: 1rem;
}
.water-glass-icon {
  font-size: 1.35rem;
}

.water-tips h3 {
  font-size: 1rem;
  font-weight: 700;
  color: #1a1a1a;
  margin: 1rem 0 0.5rem;
}
.water-tips ul {
  padding-left: 1.25rem;
  margin: 0;
}
.water-tips li {
  font-size: 0.85rem;
  color: #444;
  margin-bottom: 0.3rem;
  line-height: 1.5;
}

/* =============================================
   Body Fat Calculator
   ============================================= */

.bf-category {
  text-align: center;
  font-size: 1.15rem;
  font-weight: 700;
  padding: 0.5rem 1rem;
  border-radius: 50px;
  display: inline-block;
  margin: 0 auto 1.25rem;
}
.tool-results .bf-category {
  display: block;
  text-align: center;
}

/* =============================================
   Ideal Weight Calculator
   ============================================= */

.iw-formula-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem;
  margin-bottom: 1rem;
}
.iw-formula-card {
  background: #fafafa;
  border: 1px solid #e5e5e5;
  border-radius: 12px;
  padding: 1rem;
  text-align: center;
}
.iw-formula-name {
  display: block;
  font-size: 0.75rem;
  color: #888;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.25rem;
}
.iw-formula-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 700;
  color: #336b62;
  font-family: 'Rubik', sans-serif;
}
.iw-formula-note {
  display: block;
  font-size: 0.7rem;
  color: #999;
  margin-top: 0.2rem;
}
.iw-bmi-note {
  background: #eef7f4;
  border-radius: 10px;
  padding: 0.75rem 1rem;
  font-size: 0.85rem;
  color: #336b62;
  text-align: center;
  margin-top: 0.75rem;
}

/* =============================================
   Responsive: Tools
   ============================================= */

@media (max-width: 600px) {
  .tools-hero h1 { font-size: 1.5rem; }
  .tools-hero { padding: 2rem 1rem 1rem; }
  .tools-grid-section { padding: 0.75rem 1rem 2rem; }
  .tool-page { padding: 1.5rem 1rem 2rem; }
  .tool-page h1 { font-size: 1.4rem; }
  .result-grid, .macro-results-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .iw-formula-grid {
    grid-template-columns: 1fr;
    gap: 0.5rem;
  }
  .result-value { font-size: 2.5rem; }
  .cta-buttons { flex-direction: column; align-items: center; }
  .cta-btn { width: 100%; text-align: center; }
  .deficit-table { font-size: 0.78rem; }
  .deficit-table th,
  .deficit-table td { padding: 0.45rem 0.35rem; }
}

/* =============================================
   Viral Tool Card Accent
   ============================================= */
.tool-card-viral { border-left: 3px solid #8ddbc5; }
[data-theme="dark"] .tool-card-viral { border-left-color: #5eead4; }

/* =============================================
   Diet Compatibility Quiz
   ============================================= */
.quiz-container { max-width: 640px; margin: 0 auto; }
.quiz-progress { height: 6px; background: #eee; border-radius: 3px; margin-bottom: 2rem; overflow: hidden; }
.quiz-progress-bar { height: 100%; background: linear-gradient(90deg, #8ddbc5, #336b62); border-radius: 3px; transition: width 0.4s ease; }
.quiz-question { font-size: 1.35rem; font-weight: 600; margin-bottom: 1.5rem; line-height: 1.4; }
.quiz-options { display: flex; flex-direction: column; gap: 0.75rem; }
.quiz-option {
  display: block; width: 100%; text-align: left; padding: 1rem 1.25rem;
  border: 2px solid #e0e0e0; border-radius: 12px; background: #fff;
  font-size: 1rem; cursor: pointer; transition: all 0.2s;
}
.quiz-option:hover { border-color: #8ddbc5; background: #f0faf7; }
.quiz-option-selected { border-color: #336b62; background: #e6f7f1; font-weight: 600; }
.quiz-nav { display: flex; justify-content: space-between; margin-top: 2rem; gap: 1rem; }
.quiz-btn {
  padding: 0.8rem 2rem; border-radius: 10px; font-size: 1rem; font-weight: 600;
  border: none; cursor: pointer; transition: all 0.2s;
}
.quiz-btn-next { background: #336b62; color: #fff; margin-left: auto; }
.quiz-btn-next:hover:not(:disabled) { background: #28554d; }
.quiz-btn-next:disabled { background: #ccc; cursor: not-allowed; }
.quiz-btn-back { background: #f0f0f0; color: #333; }
.quiz-btn-back:hover { background: #e0e0e0; }

.quiz-results { max-width: 640px; margin: 0 auto; }
.quiz-result-card {
  background: #fff; border-radius: 16px; padding: 2.5rem 2rem;
  box-shadow: 0 4px 24px rgba(0,0,0,0.08); margin-bottom: 1.5rem;
}
.quiz-result-badge { font-size: 3.5rem; text-align: center; margin-bottom: 0.5rem; }
.quiz-result-card h2 { text-align: center; font-size: 1.5rem; margin-bottom: 0.25rem; }
.quiz-result-tagline { text-align: center; color: #666; font-style: italic; margin-bottom: 2rem; }
.quiz-result-section { margin-bottom: 1.75rem; }
.quiz-result-section h3 { font-size: 1.1rem; color: #336b62; margin-bottom: 0.5rem; border-bottom: 2px solid #e6f7f1; padding-bottom: 0.3rem; }
.quiz-meals { display: flex; flex-direction: column; gap: 0.6rem; }
.quiz-meal { display: flex; gap: 0.75rem; padding: 0.6rem 0; border-bottom: 1px solid #f0f0f0; }
.quiz-meal strong { min-width: 110px; color: #555; font-size: 0.9rem; }
.quiz-meal span { font-size: 0.95rem; }
.quiz-macro-row { display: flex; border-radius: 8px; overflow: hidden; height: 32px; font-size: 0.75rem; font-weight: 600; color: #fff; }
.quiz-macro-seg { display: flex; align-items: center; justify-content: center; }
.quiz-macro-p { background: #facc15; color: #333; }
.quiz-macro-c { background: #14b8a6; }
.quiz-macro-f { background: #fb923c; }
.quiz-result-share { text-align: center; margin-top: 1.5rem; }
.quiz-share-btn {
  padding: 0.8rem 2rem; border-radius: 10px; background: #336b62; color: #fff;
  font-size: 1rem; font-weight: 600; border: none; cursor: pointer;
}
.quiz-share-btn:hover { background: #28554d; }
.quiz-btn-retake { display: block; margin: 0 auto; padding: 0.6rem 1.5rem; background: transparent; border: 2px solid #ccc; border-radius: 10px; color: #666; font-size: 0.9rem; cursor: pointer; }
.quiz-btn-retake:hover { border-color: #999; color: #333; }

[data-theme="dark"] .quiz-option { background: #242424; border-color: #3a3a3a; color: #eee; }
[data-theme="dark"] .quiz-option:hover { border-color: #5eead4; background: #1a2e28; }
[data-theme="dark"] .quiz-option-selected { border-color: #5eead4; background: #1a3a30; }
[data-theme="dark"] .quiz-result-card { background: #242424; box-shadow: 0 4px 24px rgba(0,0,0,0.3); }
[data-theme="dark"] .quiz-result-tagline { color: #aaa; }
[data-theme="dark"] .quiz-result-section h3 { color: #8ddbc5; border-bottom-color: #2a4a40; }
[data-theme="dark"] .quiz-meal { border-bottom-color: #3a3a3a; }
[data-theme="dark"] .quiz-meal strong { color: #aaa; }
[data-theme="dark"] .quiz-meal span { color: #ddd; }
[data-theme="dark"] .quiz-btn-back { background: #333; color: #ccc; }
[data-theme="dark"] .quiz-btn-retake { border-color: #555; color: #aaa; }
[data-theme="dark"] .quiz-progress { background: #333; }
[data-theme="dark"] .quiz-question { color: #eee; }

/* =============================================
   Supplement Interaction Checker
   ============================================= */
.supp-checker { max-width: 700px; margin: 0 auto; }
.supp-instruction { color: #555; margin-bottom: 1.25rem; }
.supp-search-wrap { margin-bottom: 1.25rem; }
.supp-search {
  width: 100%; padding: 0.75rem 1rem; border: 2px solid #e0e0e0; border-radius: 10px;
  font-size: 1rem; background: #fff; box-sizing: border-box;
}
.supp-search:focus { outline: none; border-color: #8ddbc5; }
.supp-grid { display: flex; flex-wrap: wrap; gap: 0.5rem; margin-bottom: 1.5rem; }
.supp-item {
  display: flex; flex-direction: column; align-items: flex-start; padding: 0.6rem 1rem;
  border: 2px solid #e0e0e0; border-radius: 10px; background: #fff;
  cursor: pointer; transition: all 0.15s; font-size: 0.9rem;
}
.supp-item:hover { border-color: #8ddbc5; }
.supp-item-selected { border-color: #336b62; background: #e6f7f1; }
.supp-item-name { font-weight: 600; }
.supp-item-cat { font-size: 0.72rem; color: #999; text-transform: uppercase; letter-spacing: 0.03em; }
.supp-selected-wrap { margin-bottom: 1.25rem; }
.supp-selected-wrap h3 { font-size: 1rem; margin-bottom: 0.5rem; color: #336b62; }
.supp-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.supp-tag {
  display: inline-flex; align-items: center; gap: 0.35rem;
  padding: 0.3rem 0.7rem; background: #e6f7f1; border-radius: 20px;
  font-size: 0.82rem; font-weight: 500; color: #336b62;
}
.supp-tag button { background: none; border: none; font-size: 1.1rem; color: #666; cursor: pointer; padding: 0; line-height: 1; }

.supp-results { max-width: 700px; margin: 0 auto; }
.supp-summary { margin-bottom: 1.5rem; }
.supp-summary-ok { padding: 1rem 1.25rem; background: #e6f7f1; border-radius: 12px; color: #1a5c3a; font-weight: 500; }
.supp-summary-found { padding: 1rem 1.25rem; background: #fef3e0; border-radius: 12px; }
.supp-badge-warn { background: #fff3cd; color: #856404; padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.82rem; font-weight: 600; }
.supp-badge-pos { background: #d4edda; color: #155724; padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.82rem; font-weight: 600; }
.supp-badge-info { background: #d1ecf1; color: #0c5460; padding: 0.15rem 0.5rem; border-radius: 6px; font-size: 0.82rem; font-weight: 600; }

.supp-ix-card { padding: 1rem 1.25rem; border-radius: 12px; margin-bottom: 0.75rem; }
.supp-ix-warn { background: #fff8e1; border-left: 4px solid #ff9500; }
.supp-ix-pos { background: #e8f5e9; border-left: 4px solid #00d865; }
.supp-ix-info { background: #e3f2fd; border-left: 4px solid #2196f3; }
.supp-ix-header { font-size: 1rem; margin-bottom: 0.4rem; }
.supp-ix-card p { font-size: 0.92rem; color: #444; margin: 0.3rem 0; }
.supp-ix-source { font-size: 0.75rem; color: #999; font-style: italic; }

.supp-timing-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1rem; margin-top: 0.75rem; }
.supp-time-slot { background: #f8f8f8; border-radius: 12px; padding: 1rem 1.25rem; }
.supp-time-slot h4 { font-size: 0.95rem; margin-bottom: 0.75rem; color: #336b62; }
.supp-time-item { margin-bottom: 0.6rem; padding-bottom: 0.6rem; border-bottom: 1px solid #eee; }
.supp-time-item strong { display: block; font-size: 0.9rem; }
.supp-time-item span { font-size: 0.82rem; color: #666; }

[data-theme="dark"] .supp-instruction { color: #aaa; }
[data-theme="dark"] .supp-search { background: #2a2a2a; border-color: #444; color: #eee; }
[data-theme="dark"] .supp-search:focus { border-color: #5eead4; }
[data-theme="dark"] .supp-item { background: #242424; border-color: #3a3a3a; color: #eee; }
[data-theme="dark"] .supp-item:hover { border-color: #5eead4; }
[data-theme="dark"] .supp-item-selected { border-color: #5eead4; background: #1a3a30; }
[data-theme="dark"] .supp-item-cat { color: #777; }
[data-theme="dark"] .supp-selected-wrap h3 { color: #8ddbc5; }
[data-theme="dark"] .supp-tag { background: #1a3a30; color: #8ddbc5; }
[data-theme="dark"] .supp-tag button { color: #aaa; }
[data-theme="dark"] .supp-summary-ok { background: #1a3a30; color: #8ddbc5; }
[data-theme="dark"] .supp-summary-found { background: #3a3020; color: #eee; }
[data-theme="dark"] .supp-ix-warn { background: #3a3020; }
[data-theme="dark"] .supp-ix-pos { background: #1a3a30; }
[data-theme="dark"] .supp-ix-info { background: #1a2a3a; }
[data-theme="dark"] .supp-ix-card p { color: #ccc; }
[data-theme="dark"] .supp-ix-source { color: #777; }
[data-theme="dark"] .supp-time-slot { background: #2a2a2a; }
[data-theme="dark"] .supp-time-slot h4 { color: #8ddbc5; }
[data-theme="dark"] .supp-time-item { border-bottom-color: #3a3a3a; }
[data-theme="dark"] .supp-time-item span { color: #aaa; }

/* =============================================
   Fridge Nutrition Audit
   ============================================= */
.fridge-audit { max-width: 720px; margin: 0 auto; }
.fridge-instruction { color: #555; margin-bottom: 1.5rem; }

.fridge-search-wrap { position: relative; margin-bottom: 1.5rem; }
.fridge-search-input {
  width: 100%; padding: 0.75rem 1rem; font-size: 1rem; border: 2px solid #e0e0e0;
  border-radius: 12px; background: #fff; outline: none; transition: border-color 0.15s;
  box-sizing: border-box;
}
.fridge-search-input:focus { border-color: #8ddbc5; }
.fridge-search-dropdown {
  position: absolute; top: 100%; left: 0; right: 0; z-index: 20;
  background: #fff; border: 1px solid #e0e0e0; border-radius: 12px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1); max-height: 360px; overflow-y: auto;
  margin-top: 4px;
}
.fridge-search-item {
  display: flex; align-items: center; gap: 0.65rem; padding: 0.6rem 1rem;
  border: none; background: none; width: 100%; text-align: left; cursor: pointer;
  font-size: 0.92rem; transition: background 0.1s; border-bottom: 1px solid #f0f0f0;
}
.fridge-search-item:last-child { border-bottom: none; }
.fridge-search-item:hover { background: #f5faf8; }
.fridge-search-added { opacity: 0.5; cursor: default; }
.fridge-search-img { border-radius: 6px; object-fit: cover; flex-shrink: 0; }
.fridge-search-name { flex: 1; font-weight: 500; }
.fridge-search-cal { font-size: 0.8rem; color: #888; white-space: nowrap; }
.fridge-search-check { color: #00d865; font-weight: 700; font-size: 1rem; }
.fridge-search-empty { padding: 1rem; text-align: center; color: #888; font-size: 0.9rem; }

.fridge-my-foods { margin-bottom: 1.5rem; }
.fridge-my-foods h3 { font-size: 1rem; font-weight: 600; color: #336b62; margin-bottom: 0.6rem; }
.fridge-my-foods-list { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.fridge-food-tag {
  display: inline-flex; align-items: center; gap: 0.4rem;
  padding: 0.35rem 0.5rem 0.35rem 0.4rem; border: 2px solid #336b62;
  border-radius: 20px; background: #e6f7f1; font-size: 0.85rem; font-weight: 500;
}
.fridge-tag-img { border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.fridge-tag-remove {
  border: none; background: none; cursor: pointer; font-size: 1.1rem; color: #888;
  padding: 0 0.15rem; line-height: 1;
}
.fridge-tag-remove:hover { color: #ff4000; }

.fridge-quick-picks { margin-bottom: 1.5rem; }
.fridge-quick-picks h3 { font-size: 0.95rem; color: #666; margin-bottom: 0.6rem; font-weight: 500; }
.fridge-quick-grid { display: flex; flex-wrap: wrap; gap: 0.4rem; }
.fridge-quick-btn {
  padding: 0.35rem 0.75rem; border: 1.5px solid #e0e0e0; border-radius: 18px;
  background: #fff; font-size: 0.82rem; cursor: pointer; transition: all 0.15s;
}
.fridge-quick-btn:hover { border-color: #8ddbc5; background: #f5faf8; }
.fridge-quick-added { border-color: #336b62; background: #e6f7f1; opacity: 0.5; cursor: default; }

.fridge-results { max-width: 720px; margin: 0 auto; }
.fridge-score-wrap { text-align: center; margin-bottom: 2rem; }
.fridge-score-circle {
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  width: 140px; height: 140px; border-radius: 50%; border: 6px solid #ccc;
  margin-bottom: 1rem;
}
.fridge-score-num { font-size: 3rem; font-weight: 700; line-height: 1; }
.fridge-score-label { font-size: 0.85rem; color: #888; }
.fridge-score-text { font-size: 1rem; color: #555; max-width: 500px; margin: 0 auto; }

.fridge-nutrient-grid { margin-bottom: 2rem; }
.fridge-nut-row { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.5rem; }
.fridge-nut-name { min-width: 160px; font-size: 0.85rem; font-weight: 500; }
.fridge-nut-bar { flex: 1; height: 14px; background: #eee; border-radius: 7px; overflow: hidden; }
.fridge-nut-fill { height: 100%; border-radius: 7px; transition: width 0.5s ease; }
.fridge-nut-pct { min-width: 40px; text-align: right; font-size: 0.82rem; font-weight: 600; }

.fridge-gap-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 0.75rem; margin-top: 0.75rem; }
.fridge-gap-card {
  padding: 1rem 1.25rem; background: #fff8e1; border-radius: 12px;
  border-left: 4px solid #ff9500;
}
.fridge-gap-card strong { display: block; margin-bottom: 0.25rem; }
.fridge-gap-pct { font-size: 0.8rem; color: #b86c00; font-weight: 600; }
.fridge-gap-card p { font-size: 0.88rem; color: #666; margin: 0.4rem 0 0; }

.fridge-no-gaps { padding: 1rem 1.25rem; background: #e6f7f1; border-radius: 12px; color: #1a5c3a; font-weight: 500; text-align: center; }

.fridge-share { text-align: center; margin: 1.5rem 0; }

[data-theme="dark"] .fridge-instruction { color: #aaa; }
[data-theme="dark"] .fridge-search-input { background: #242424; border-color: #3a3a3a; color: #eee; }
[data-theme="dark"] .fridge-search-input:focus { border-color: #5eead4; }
[data-theme="dark"] .fridge-search-dropdown { background: #242424; border-color: #3a3a3a; box-shadow: 0 4px 16px rgba(0,0,0,0.4); }
[data-theme="dark"] .fridge-search-item { color: #eee; border-bottom-color: #333; }
[data-theme="dark"] .fridge-search-item:hover { background: #1a3a30; }
[data-theme="dark"] .fridge-search-cal { color: #888; }
[data-theme="dark"] .fridge-search-empty { color: #777; }
[data-theme="dark"] .fridge-my-foods h3 { color: #8ddbc5; }
[data-theme="dark"] .fridge-food-tag { background: #1a3a30; border-color: #5eead4; color: #eee; }
[data-theme="dark"] .fridge-tag-remove { color: #888; }
[data-theme="dark"] .fridge-tag-remove:hover { color: #ff6b6b; }
[data-theme="dark"] .fridge-quick-picks h3 { color: #aaa; }
[data-theme="dark"] .fridge-quick-btn { background: #242424; border-color: #3a3a3a; color: #eee; }
[data-theme="dark"] .fridge-quick-btn:hover { border-color: #5eead4; background: #1a3a30; }
[data-theme="dark"] .fridge-quick-added { background: #1a3a30; border-color: #5eead4; }
[data-theme="dark"] .fridge-score-text { color: #aaa; }
[data-theme="dark"] .fridge-score-label { color: #777; }
[data-theme="dark"] .fridge-nut-name { color: #ddd; }
[data-theme="dark"] .fridge-nut-bar { background: #333; }
[data-theme="dark"] .fridge-nut-pct { color: #ccc; }
[data-theme="dark"] .fridge-gap-card { background: #3a3020; border-left-color: #ff9500; }
[data-theme="dark"] .fridge-gap-card strong { color: #eee; }
[data-theme="dark"] .fridge-gap-pct { color: #ffb74d; }
[data-theme="dark"] .fridge-gap-card p { color: #bbb; }
[data-theme="dark"] .fridge-no-gaps { background: #1a3a30; color: #8ddbc5; }

/* =============================================
   FAQ Section (GEO / SEO)
   ============================================= */
.tool-faq {
  max-width: 720px;
  margin: 2.5rem auto 1rem;
  padding: 0 1rem;
}
.tool-faq h2 {
  font-size: 1.4rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #1a1a1a;
}
.faq-item {
  border: 1px solid #e5e5e5;
  border-radius: 10px;
  margin-bottom: 0.65rem;
  overflow: hidden;
  transition: box-shadow 0.2s ease;
}
.faq-item[open] {
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.faq-question {
  padding: 1rem 1.25rem;
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #222;
  background: #fafafa;
  transition: background 0.15s ease;
}
.faq-question:hover {
  background: #f0f0f0;
}
.faq-question::after {
  content: "+";
  font-size: 1.2rem;
  font-weight: 400;
  color: #888;
  transition: transform 0.2s ease;
}
.faq-item[open] .faq-question::after {
  content: "−";
}
.faq-question::-webkit-details-marker {
  display: none;
}
.faq-answer {
  padding: 0.75rem 1.25rem 1.15rem;
  font-size: 0.92rem;
  line-height: 1.7;
  color: #444;
  border-top: 1px solid #eee;
}
.faq-answer p { margin: 0; }

[data-theme="dark"] .tool-faq h2 { color: #eee; }
[data-theme="dark"] .faq-item { border-color: #3a3a3a; }
[data-theme="dark"] .faq-question { background: #242424; color: #eee; }
[data-theme="dark"] .faq-question:hover { background: #2a2a2a; }
[data-theme="dark"] .faq-question::after { color: #888; }
[data-theme="dark"] .faq-answer { color: #ccc; border-top-color: #333; }

@media (max-width: 600px) {
  .quiz-question { font-size: 1.15rem; }
  .quiz-result-card { padding: 1.5rem 1.25rem; }
  .quiz-meal { flex-direction: column; gap: 0.2rem; }
  .quiz-meal strong { min-width: auto; }
  .supp-grid { gap: 0.4rem; }
  .supp-timing-grid { grid-template-columns: 1fr; }
  .fridge-nut-name { min-width: 120px; font-size: 0.78rem; }
  .fridge-gap-list { grid-template-columns: 1fr; }
  .fridge-score-circle { width: 120px; height: 120px; }
  .fridge-score-num { font-size: 2.5rem; }
  .tool-faq { padding: 0 0.5rem; }
  .faq-question { font-size: 0.9rem; padding: 0.85rem 1rem; }
  .faq-answer { padding: 0.6rem 1rem 1rem; font-size: 0.88rem; }
}
