/* Site fixes - loaded last so these rules win. Delete this file's <link> in index.html to undo. */

/* 1. Hide the two bars above the navbar (for now) */
.devbar,
.integration-bar { display: none !important; }

/* 2. Navbar: keep everything inside the screen */
header .header-row {
  width: min(1640px, calc(100% - 40px));
  gap: 14px;
  flex-wrap: nowrap;
}
.brand { min-width: 0; flex-shrink: 0; }
.brand strong { white-space: nowrap; }
header .header-row nav { gap: 2px; min-width: 0; }
header nav button { padding: 9px 10px; }
.actions { flex-shrink: 0; }

/* Medium screens: shorter Support / My Space buttons (icon only) */
@media (max-width: 1749px) {
  .support, .space { width: 40px; padding: 0; justify-content: center; }
  .support span, .space span { display: none; }
}

/* Smaller screens: switch to the menu button (☰) with a dropdown list */
@media (max-width: 1440px) {
  .menu { display: grid; place-items: center; margin-inline-start: auto; }
  header .header-row nav {
    position: absolute;
    top: calc(100% + 8px);
    left: 20px;
    right: 20px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--line);
    border-radius: 18px;
    padding: 9px;
    box-shadow: var(--shadow);
  }
  header .header-row nav.open { display: flex; }
  header nav button { text-align: start; padding: 12px 14px; font-size: 14px; }
}

/* 3. Phone bottom tab bar: an old "nav{top:93px}" rule stretched it to full height */
.mobile-dock { top: auto !important; }
@media (max-width: 820px) {
  .mobile-dock { grid-template-columns: repeat(6, minmax(0, 1fr)) !important; }
  .mobile-dock button {
    min-width: 0;
    font-size: 9px !important;
    line-height: 1.15;
    text-align: center;
    white-space: normal;
    overflow-wrap: anywhere;
  }
  /* keep the Mind Guide button above the tab bar */
  .ai-fab { bottom: 92px !important; }
}

/* 4. Phones: make the top bar fit */
@media (max-width: 480px) {
  header .header-row { width: calc(100% - 20px); gap: 6px; }
  .brand { gap: 7px; }
  .brand > span { width: 36px; height: 36px; border-radius: 12px; }
  .brand strong { font-size: 16px; }
  .actions { gap: 5px; }
  .actions label { padding: 6px 4px; }
  .actions select { max-width: 48px; }
  .support, .space { width: 36px; min-height: 36px; }
  header .header-row nav { left: 10px; right: 10px; }
}

/* Homepage practice cards: 4 cards in one row */
.eh-card-grid { grid-template-columns: repeat(4, minmax(0, 1fr)) !important; gap: 12px !important; }
.eh-card-grid article { padding: 18px 16px !important; }
.eh-card-grid article:nth-child(4) { background: #f3eee6; }
.eh-card-grid h4 { font-size: 18px !important; line-height: 1.25 !important; }
.eh-card-grid p { font-size: 12.5px !important; line-height: 1.6 !important; }
.eh-card-grid .eh-btn { font-size: 13px; }
@media (max-width: 1100px) { .eh-card-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; } }
@media (max-width: 560px) { .eh-card-grid { grid-template-columns: 1fr !important; } }

/* "What would help right now?" cards */
.quick-shift { margin-top: 28px; }
.qh-grid { gap: 12px !important; }
.quick-practice-grid .qh-card {
  position: relative; display: flex; flex-direction: column; align-items: flex-start;
  min-height: 150px; padding: 18px 18px 16px; text-align: start; cursor: pointer;
  border: 1px solid rgba(23, 75, 67, .10); border-radius: 20px; background: #fff;
  box-shadow: 0 1px 2px rgba(23, 75, 67, .05), 0 8px 20px rgba(23, 75, 67, .06);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.quick-practice-grid .qh-card:hover {
  transform: translateY(-3px); border-color: rgba(23, 75, 67, .22);
  box-shadow: 0 2px 4px rgba(23, 75, 67, .06), 0 14px 28px rgba(23, 75, 67, .10);
}
.quick-practice-grid .qh-card:focus-visible { outline: 3px solid #efb33a; outline-offset: 3px; }
.quick-practice-grid .qh-icon {
  width: 44px; height: 44px; margin: 0 0 16px; border-radius: 14px;
  background: var(--qh-soft); position: relative;
}
.quick-practice-grid .qh-icon::after {
  content: ""; position: absolute; inset: 11px; background: var(--qh-color);
  -webkit-mask: var(--qh-svg) center / contain no-repeat; mask: var(--qh-svg) center / contain no-repeat;
}
.quick-practice-grid .qh-card strong { font-size: 16.5px; line-height: 1.3; color: var(--human-ink, #172d2a); }
.quick-practice-grid .qh-card small { margin-top: 5px; font-size: 13px; line-height: 1.45; color: #697b76; padding-inline-end: 22px; }
.qh-arrow {
  position: absolute; inset-inline-end: 16px; bottom: 14px; font-style: normal;
  color: var(--qh-color); font-weight: 800; transition: transform .2s ease;
}
.qh-card:hover .qh-arrow { transform: translateX(3px); }
[dir="rtl"] .qh-arrow { transform: scaleX(-1); }

.qh-talk    { --qh-color: #0f766e; --qh-soft: #e3f2ef;
  --qh-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 12a8 8 0 0 1-11.6 7.1L4 20.5l1.4-4.9A8 8 0 1 1 21 12Z'/%3E%3Cpath d='M8.5 12h.01M12 12h.01M15.5 12h.01'/%3E%3C/svg%3E"); }
.qh-anxiety { --qh-color: #6d5bd0; --qh-soft: #eeebfb;
  --qh-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 8.5c2-1.6 4-1.6 6 0s4 1.6 6 0 4-1.6 6 0'/%3E%3Cpath d='M3 13.5c2-1.6 4-1.6 6 0s4 1.6 6 0 4-1.6 6 0'/%3E%3Cpath d='M6 18.5c1.5-1 3-1 4.5 0s3 1 4.5 0 3-1 3 0'/%3E%3C/svg%3E"); }
.qh-sleep   { --qh-color: #3b5bab; --qh-soft: #e7edf9;
  --qh-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8 8 0 1 1 9.5 4a6.5 6.5 0 0 0 10.5 10.5Z'/%3E%3C/svg%3E"); }
.qh-focus   { --qh-color: #c56f2b; --qh-soft: #fbeee2;
  --qh-svg: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Ccircle cx='12' cy='12' r='4.5'/%3E%3Ccircle cx='12' cy='12' r='.8' fill='black'/%3E%3C/svg%3E"); }

/* "What would help right now?" box: restore inner spacing
   (the general .section rule was setting left/right padding to 0) */
.section.quick-shift { padding: 36px 40px; gap: 32px; }
@media (max-width: 900px) { .section.quick-shift { padding: 28px 26px; } }
@media (max-width: 560px) { .section.quick-shift { padding: 22px 18px; } }

/* Homepage: hide the "Preventive ecosystem / Twelve connected core features" section.
   Delete this rule to show it again. */
.section.feature-section { display: none !important; }

/* ---------- Site footer ---------- */
footer.mjx-footer {
  padding: 64px 0 28px; color: #cfe0d9;
  background: linear-gradient(170deg, #174b43 0%, #0f3935 70%, #0c2f2c 100%);
}
.mjx-footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.4fr; gap: 40px; }
.mjx-footer-brand strong { display: block; font: 600 26px/1.2 Georgia, "Times New Roman", serif; color: #fff; }
.app .mjx-footer-brand p { margin: 12px 0 14px; max-width: 340px; font-size: 14px; line-height: 1.65; color: #b9cdc5; }
.mjx-footer-brand small {
  display: inline-block; padding: 6px 12px; border-radius: 999px; font-size: 12px; font-weight: 700;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .05); color: #dfe9e4;
}
.app .mjx-footer h3 {
  margin: 4px 0 16px; font-size: 12px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; color: #f1c96b;
}
.mjx-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.mjx-footer ul button {
  padding: 0; border: 0; background: none; cursor: pointer; text-align: start;
  font-size: 14.5px; color: #dfe9e4; transition: color .15s ease;
}
.mjx-footer ul button:hover { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.app .mjx-footer p { font-size: 14px; line-height: 1.6; color: #b9cdc5; margin: 0 0 14px; }
.mjx-footer-support {
  border: 0; border-radius: 999px; padding: 10px 20px; min-height: 40px; cursor: pointer;
  background: #f1c96b; color: #173b35; font-weight: 800; font-size: 14px; transition: background .15s ease;
}
.mjx-footer-support:hover { background: #f6d68c; }
.mjx-footer address { font-style: normal; }
.app .mjx-footer-line {
  display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px;
  font-size: 14.5px; line-height: 1.55; color: #dfe9e4; text-decoration: none;
}
a.mjx-footer-line:hover { color: #fff; }
.mjx-footer-ico {
  flex-shrink: 0; width: 18px; height: 18px; margin-top: 2px; background: #f1c96b;
  -webkit-mask: var(--ico) center / contain no-repeat; mask: var(--ico) center / contain no-repeat;
}
.mjx-ico-phone { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M21 16.9v3a2 2 0 0 1-2.2 2 19.8 19.8 0 0 1-8.6-3.1 19.5 19.5 0 0 1-6-6A19.8 19.8 0 0 1 1.1 4.2 2 2 0 0 1 3.1 2h3a2 2 0 0 1 2 1.7c.1.9.4 1.8.7 2.7a2 2 0 0 1-.5 2.1L7.1 9.8a16 16 0 0 0 6 6l1.3-1.3a2 2 0 0 1 2.1-.4c.9.3 1.8.6 2.7.7a2 2 0 0 1 1.8 2Z'/%3E%3C/svg%3E"); }
.mjx-ico-pin { --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 10c0 6-8 12-8 12s-8-6-8-12a8 8 0 0 1 16 0Z'/%3E%3Ccircle cx='12' cy='10' r='3'/%3E%3C/svg%3E"); }
.mjx-footer-bottom {
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  margin-top: 44px; padding-top: 20px; border-top: 1px solid rgba(255, 255, 255, .12);
  font-size: 12.5px; color: #9fb7ae;
}
@media (max-width: 960px) { .mjx-footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) {
  footer.mjx-footer { padding: 44px 0 96px; }
  .mjx-footer-grid { grid-template-columns: 1fr; gap: 28px; }
}
