/* ==========================================================================
   INSYOULIN — Design System
   ========================================================================== */

/* ── Fonts ── */
@import url('https://api.fontshare.com/v2/css?f[]=satoshi@300,400,500,700&display=swap');

/* ── Design Tokens ── */
:root {
  --bg:           #f7f6f2;
  --surface:      #fdfcf9;
  --surface-2:    #f0ede6;
  --surface-3:    #e8e4dc;
  --border:       #e0ddd6;
  --border-2:     #d0ccc4;
  --text:         #1c1a14;
  --text-2:       #5c5848;
  --text-3:       #9c9484;
  --teal:         #01696f;
  --teal-light:   #e0f0f0;
  --teal-mid:     #b0d8d8;
  --green:        #3d7a2a;
  --green-light:  #e8f4e3;
  --amber:        #c8560a;
  --amber-light:  #fef0e6;
  --red:          #b52d5b;
  --red-light:    #fce8ef;
  --font:         'Satoshi', sans-serif;
  --font-display: 'Satoshi', sans-serif;
  --r-sm:         .35rem;
  --r-md:         .6rem;
  --r:            .875rem;
  --r-lg:         1.25rem;
  --r-xl:         1.75rem;
  --shadow:       0 1px 4px rgba(0,0,0,.06);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.08);
  --transition:   180ms ease;
}

[data-theme="dark"] {
  --bg:           #111009;
  --surface:      #1a1814;
  --surface-2:    #201e18;
  --surface-3:    #1a1810;
  --border:       #312f27;
  --border-2:     #3d3b32;
  --text:         #e8e4dc;
  --text-2:       #a09880;
  --text-3:       #706858;
  --teal-light:   #0a2020;
  --teal-mid:     #0e3030;
  --green-light:  #0e1e08;
  --amber-light:  #2a1a0c;
  --red-light:    #2a1018;
  --shadow:       0 1px 4px rgba(0,0,0,.3);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.4);
}

/* ── Style Themes ── */

/* Dexter theme — default, dark navy with blue accents */
[data-style="dexter"] {
  --bg:           #0f1a2e;
  --surface:      #1a2d4a;
  --surface-2:    #1f3456;
  --surface-3:    #162240;
  --border:       #2a4060;
  --border-2:     #3a5070;
  --text:         #e8f0ff;
  --text-2:       #8aabcc;
  --text-3:       #5a7a9a;
  --teal:         #5BB8F5;
  --teal-light:   #0a1f3a;
  --teal-mid:     #1a3a5a;
  --shadow:       0 1px 4px rgba(0,0,0,.4);
  --shadow-lg:    0 4px 20px rgba(0,0,0,.5);
}
[data-style="dexter"] .dexter-img { filter: none; opacity: .92; }
[data-style="dexter"] .l-nav-logo { color: #5BB8F5; }
[data-style="dexter"] .btn-primary { background: #5BB8F5; border-color: #5BB8F5; color: #0f1a2e; }
[data-style="dexter"] .btn-primary:hover { background: #4aa8e5; }
[data-style="dexter"] .hero-headline em { color: #FFD700; }
[data-style="dexter"] .quote-card { border-color: #2a4060; }
[data-style="dexter"] .tab-btn.active { color: #5BB8F5; border-bottom-color: #5BB8F5; }
[data-style="dexter"] .app-nav { border-bottom-color: #2a4060; }
[data-style="dexter"] .data-section-label { color: #5BB8F5; }

/* Bold theme — white, black, forest green */
[data-style="bold"] {
  --bg:           #f4f4f4;
  --surface:      #ffffff;
  --surface-2:    #e8e8e8;
  --surface-3:    #d8d8d8;
  --border:       #1a1a1a;
  --border-2:     #333333;
  --text:         #1a1a1a;
  --text-2:       #3a3a3a;
  --text-3:       #666666;
  --teal:         #333333;
  --teal-light:   #e8e8e8;
  --teal-mid:     #cccccc;
  --green:        #333333;
  --green-light:  #e8e8e8;
  --amber:        #333333;
  --amber-light:  #e8e8e8;
  --red:          #1a1a1a;
  --red-light:    #e8e8e8;
  --shadow:       0 2px 8px rgba(0,0,0,.15);
  --shadow-lg:    0 6px 24px rgba(0,0,0,.2);
  --r-sm:         0;
  --r-md:         0;
  --r:            0;
  --r-lg:         0;
  --r-xl:         0;
}
/* Cards get strong black borders, square corners */
[data-style="bold"] .card { border: 2px solid #1a1a1a; border-radius: 0; }
[data-style="bold"] .quote-card { border: 2px solid #1a1a1a; border-radius: 0; background: #fff; }
[data-style="bold"] .hack-card { border: 2px solid #1a1a1a; border-radius: 0; background: #fff; }
[data-style="bold"] .hack-card-amber, [data-style="bold"] .hack-card-green { border: 2px solid #1a1a1a; background: #fff; }
/* No colour anywhere */
[data-style="bold"] .dexter-img { filter: grayscale(100%) contrast(1.2); opacity: .6; }
[data-style="bold"] .hero-headline { font-weight: 800; letter-spacing: -.03em; color: #1a1a1a; }
[data-style="bold"] .hero-headline em { color: #1a1a1a; font-style: normal; font-weight: 800; }
/* Buttons — black, square */
[data-style="bold"] .btn-primary { background: #1a1a1a; border: 2px solid #1a1a1a; border-radius: 0; color: #fff; font-weight: 700; }
[data-style="bold"] .btn-primary:hover { background: #333; border-color: #333; }
[data-style="bold"] .btn { border-radius: 0; border-color: #1a1a1a; }
[data-style="bold"] .btn-google { border-radius: 0; border: 2px solid #1a1a1a; }
/* Nav — strong black border bottom */
[data-style="bold"] .l-nav { border-bottom: 3px solid #1a1a1a; }
[data-style="bold"] .l-nav-logo { color: #1a1a1a; font-weight: 800; letter-spacing: -.02em; }
[data-style="bold"] .app-nav { border-bottom: 3px solid #1a1a1a; border-radius: 0; }
[data-style="bold"] .app-nav-logo { color: #1a1a1a; font-weight: 800; }
/* Tabs — black underline active */
[data-style="bold"] .tab-btn { border-radius: 0; font-weight: 600; }
[data-style="bold"] .tab-btn.active { color: #1a1a1a; border-bottom: 3px solid #1a1a1a; font-weight: 800; }
[data-style="bold"] .tab-bar { border-bottom: 2px solid #1a1a1a; }
/* Data section labels — bold black caps */
[data-style="bold"] .data-section-label { color: #1a1a1a; font-weight: 800; letter-spacing: .05em; }
[data-style="bold"] .data-pill { border: 2px solid #1a1a1a; border-radius: 0; color: #1a1a1a; font-weight: 700; }
[data-style="bold"] .data-pill.active { background: #1a1a1a; color: #fff; border-radius: 0; }
/* Hacks — all charcoal */
[data-style="bold"] .hack-pill, [data-style="bold"] .hack-pill-amber, [data-style="bold"] .hack-pill-green { background: #1a1a1a; color: #fff; border-radius: 0; }
[data-style="bold"] .hacks-section-label { color: #1a1a1a !important; }
[data-style="bold"] .hack-title { color: #1a1a1a; }
/* Quote avatars */
[data-style="bold"] .quote-avatar { background: #1a1a1a; color: #fff; border-radius: 0; }
/* GKI states and zone colours — all charcoal, no pastels */
[data-style="bold"] [style*="color:var(--green)"],
[data-style="bold"] [style*="color:var(--amber)"],
[data-style="bold"] [style*="color:var(--red)"],
[data-style="bold"] [style*="color:var(--teal)"] { color: #1a1a1a !important; }
[data-style="bold"] [style*="background:var(--green-light)"],
[data-style="bold"] [style*="background:var(--amber-light)"],
[data-style="bold"] [style*="background:var(--red-light)"],
[data-style="bold"] [style*="background:var(--teal-light)"] { background: #e8e8e8 !important; border-color: #cccccc !important; }
/* GKI banner, toast */
[data-style="bold"] #gki-saved-banner { background: #e8e8e8 !important; border-color: #1a1a1a !important; }
[data-style="bold"] #toast { background: #1a1a1a !important; }

/* Calm theme — existing (no overrides needed, this is the default) */
[data-style="calm"] .dexter-img { filter: hue-rotate(160deg) saturate(0.7); opacity: .75; }
[data-style="calm"] .hero-headline em { color: #01696f; }
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--text); font-family: var(--font); font-size: 16px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
a { color: inherit; text-decoration: none; }
button { font-family: var(--font); cursor: pointer; }
input, select, textarea { font-family: var(--font); }
img { display: block; max-width: 100%; }

/* ── View switching ── */
#view-landing { display: block; }
#view-app     { display: none; }
body.show-app #view-landing { display: none; }
body.show-app #view-app     { display: block; }

/* ==========================================================================
   LANDING PAGE
   ========================================================================== */

.l-nav {
  position: sticky; top: 0; z-index: 100;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem 3rem;
  background: rgba(247,246,242,.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
[data-theme="dark"] .l-nav { background: rgba(17,16,9,.92); }

.l-nav-logo { display: flex; align-items: center; gap: .5rem; font-size: 1.1rem; font-weight: 700; color: var(--teal); letter-spacing: -.01em; }
.l-nav-logo svg { width: 22px; height: 22px; }
.l-nav-actions { display: flex; align-items: center; gap: .75rem; }

.l-footer {
  padding: 1.5rem 3rem;
  border-top: 1px solid var(--border);
  background: var(--surface);
}
.l-footer a { color: var(--text-3); font-size: .82rem; transition: color var(--transition); }
.l-footer a:hover { color: var(--text); }

/* ── Hero ── */
.hero { max-width: 1200px; margin: 0 auto; padding: 3rem 3rem 0; }

.eyebrow {
  display: inline-flex; align-items: center; gap: .4rem;
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); background: var(--teal-light);
  padding: .3rem .75rem; border-radius: 999px; margin-bottom: 1.25rem;
}

.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 3.2rem);
  line-height: 1.1; font-weight: 400; letter-spacing: -.01em;
  margin-bottom: 1rem;
}
.hero-headline em { color: var(--teal); font-style: normal; }

.hero-body { font-size: 1rem; color: var(--text-2); line-height: 1.75; max-width: 560px; margin-bottom: 1.5rem; }

/* ── Stats strip ── */
.stats-strip { display: flex; justify-content: center; gap: 3rem; margin-bottom: 2.25rem; flex-wrap: wrap; }
.stat-item { text-align: center; }
.stat-num { font-family: var(--font-display); font-size: 1.5rem; color: var(--teal); line-height: 1; }
.stat-caption { font-size: .72rem; color: var(--text-3); margin-top: .2rem; max-width: 130px; line-height: 1.4; }

/* ── Quote cards ── */
.quote-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--teal);
  border-radius: var(--r);
  padding: 1.5rem 1.6rem;
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; gap: .75rem;
  transition: transform var(--transition), box-shadow var(--transition);
}
.quote-card:hover { transform: translateY(-2px); box-shadow: 0 8px 32px rgba(0,0,0,.1); }
.quote-text { font-size: .95rem; line-height: 1.75; color: var(--text); font-weight: 450; }
.quote-author { display: flex; align-items: center; gap: .6rem; }
.quote-avatar { width: 34px; height: 34px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.quote-name { font-size: .82rem; font-weight: 600; }
.quote-role { font-size: .72rem; color: var(--text-3); }

/* ── Steps strip ── */
.steps-strip { display: grid; grid-template-columns: repeat(3,1fr); border-top: 1px solid var(--border); padding-top: 1rem; padding-bottom: 1.5rem; gap: 0; }
.step-item { padding: .75rem 1.5rem; }
.step-item:not(:last-child) { border-right: 1px solid var(--border); }
.step-num { width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; flex-shrink: 0; }
.step-label { font-size: .875rem; font-weight: 600; margin: .35rem 0; }
.step-body { font-size: .8rem; color: var(--text-2); line-height: 1.6; }

/* ==========================================================================
   BUTTONS
   ========================================================================== */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .45rem;
  padding: .55rem 1.25rem; border-radius: var(--r-md);
  font-size: .875rem; font-weight: 600; line-height: 1;
  border: 1.5px solid var(--border-2);
  background: var(--surface); color: var(--text);
  transition: all var(--transition); cursor: pointer; white-space: nowrap;
}
.btn:hover { border-color: var(--teal); color: var(--teal); }
.btn-primary { background: var(--teal); color: #fff; border-color: transparent; }
.btn-primary:hover { background: #015a5f; color: #fff; }
.btn-sm { padding: .35rem .85rem; font-size: .8rem; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); }

/* ==========================================================================
   APP SHELL
   ========================================================================== */
.app-shell { display: flex; flex-direction: column; height: 100vh; overflow: hidden; }

/* ── Top nav ── */
.app-nav {
  display: flex; align-items: center; justify-content: space-between;
  padding: .75rem 1.5rem;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  flex-shrink: 0; z-index: 50;
}
.app-nav-logo { font-weight: 700; font-size: 1rem; color: var(--teal); letter-spacing: -.01em; }
.app-nav-right { display: flex; align-items: center; gap: .75rem; }

/* ── Guest bar ── */
.guest-bar {
  display: flex; align-items: center; justify-content: space-between;
  padding: .6rem 1.5rem; gap: 1rem; flex-wrap: wrap;
  background: var(--teal-light);
  border-bottom: 1px solid var(--teal-mid);
  font-size: .82rem; flex-shrink: 0;
}

/* ── Tab bar ── */
.tab-bar {
  display: flex; gap: .25rem;
  padding: .5rem 1.5rem 0;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
  flex-shrink: 0;
}
.tab-btn {
  padding: .5rem 1rem; font-size: .82rem; font-weight: 600;
  border: none; background: none; color: var(--text-3);
  border-bottom: 2px solid transparent; margin-bottom: -1px;
  cursor: pointer; transition: all var(--transition); border-radius: var(--r-sm) var(--r-sm) 0 0;
}
.tab-btn:hover { color: var(--text); }
.tab-btn.active { color: var(--teal); border-bottom-color: var(--teal); }

/* ── Tab panes ── */
.tab-content { flex: 1; overflow-y: auto; overflow-x: hidden; padding: 1.5rem; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ==========================================================================
   CARDS
   ========================================================================== */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  box-shadow: var(--shadow);
  margin-bottom: 1rem;
}
.card-body { padding: 1.25rem; }
.card-header {
  display: flex; align-items: baseline; justify-content: space-between;
  margin-bottom: .75rem;
}
.card-title { font-family: var(--font-display); font-size: 1rem; font-weight: 600; }
.card-date {
  display: flex; align-items: center; gap: .3rem;
  font-size: .75rem; color: var(--text-3); font-weight: 500;
  flex-shrink: 0;
}
.card-date-input {
  border: none; background: transparent; color: var(--text-2);
  font-family: var(--font); font-size: .75rem; font-weight: 500;
  outline: none; cursor: pointer; padding: 0; width: auto;
  -webkit-appearance: none; appearance: none;
}
.card-date-input::-webkit-calendar-picker-indicator {
  opacity: .4; cursor: pointer; width: 12px; height: 12px; margin-left: .1rem;
}
.card-label { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--text-3); margin-bottom: .5rem; }

/* ── Two-column log layout ── */
.log-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.log-col { display: flex; flex-direction: column; gap: 1rem; }

/* ==========================================================================
   FORM ELEMENTS
   ========================================================================== */
.form-field { display: flex; flex-direction: column; gap: .35rem; }
.form-label { font-size: .78rem; font-weight: 600; color: var(--text-2); }
.form-input {
  width: 100%; padding: .55rem .75rem;
  border: 1.5px solid var(--border);
  border-radius: var(--r-sm);
  background: var(--surface); color: var(--text);
  font-family: var(--font); font-size: .875rem;
  transition: border-color var(--transition);
  outline: none;
  -webkit-appearance: none; appearance: none;
}
.form-input:focus { border-color: var(--teal); }
.form-input::placeholder { color: var(--text-3); }

.input-with-unit { position: relative; display: flex; align-items: center; }
.input-with-unit .form-input { padding-right: 3.5rem; }
.input-unit {
  position: absolute; right: .75rem;
  font-size: .75rem; color: var(--text-3); font-weight: 500; pointer-events: none;
}

/* ── Chips ── */
.chip-row { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: .35rem; }
.chip {
  padding: .3rem .75rem; border-radius: 999px;
  font-size: .78rem; font-weight: 500;
  border: 1.5px solid var(--border);
  background: var(--surface); color: var(--text-2);
  cursor: pointer; transition: all var(--transition);
}
.chip:hover { border-color: var(--teal); color: var(--teal); }
.chip.selected { background: var(--teal); color: #fff; border-color: var(--teal); }
.chip-label { font-size: .75rem; font-weight: 600; color: var(--text-3); margin-bottom: .25rem; }

/* ==========================================================================
   DATA TAB
   ========================================================================== */
.data-section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: var(--teal); margin-bottom: .75rem; margin-top: .25rem;
}

/* ── Tables ── */
.table-wrap { overflow-x: auto; overflow-y: auto; max-height: 320px; }
.data-table { width: 100%; border-collapse: collapse; font-size: .8375rem; }
.data-table th {
  text-align: left; font-size: .72rem; text-transform: uppercase;
  letter-spacing: .06em; color: var(--text-3); font-weight: 600;
  padding: .5rem .75rem; border-bottom: 1px solid var(--border);
  position: sticky; top: 0; background: var(--surface); z-index: 1;
}
.data-table td { padding: .6rem .75rem; border-bottom: 1px solid var(--border); vertical-align: top; color: var(--text); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:hover td { background: var(--surface-2); }
.table-empty { text-align: center; color: var(--text-3); font-size: .8rem; padding: 1.5rem; font-style: italic; }

/* ── GKI reference card ── */
.gki-ref { display: grid; gap: .3rem; font-size: .78rem; margin-top: .5rem; }
.gki-row { display: flex; justify-content: space-between; padding: .3rem .5rem; border-radius: var(--r-sm); }
.gki-row.therapeutic { background: var(--teal-light); color: var(--teal); }
.gki-row.high        { background: var(--green-light); color: var(--green); }
.gki-row.moderate    { background: var(--amber-light); color: var(--amber); }
.gki-row.low         { background: var(--surface-3); color: var(--text-2); }
.gki-row.none        { background: var(--red-light); color: var(--red); }

/* ==========================================================================
   HACKS TAB
   ========================================================================== */
.hacks-section-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  margin-bottom: .85rem; margin-top: 1.5rem;
}
.hacks-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1rem; }
.hack-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r);
  padding: 1.25rem;
  box-shadow: var(--shadow);
}
.hack-pill {
  display: inline-block; font-size: .65rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase;
  padding: .2rem .6rem; border-radius: 999px;
  background: var(--teal-light); color: var(--teal);
  margin-bottom: .5rem;
}
.hack-pill-amber { background: var(--amber-light); color: var(--amber); }
.hack-pill-green { background: var(--green-light); color: var(--green); }
.hack-emoji { font-size: 1.5rem; margin-bottom: .4rem; }
.hack-title { font-size: .925rem; font-weight: 700; margin-bottom: .5rem; line-height: 1.3; }
.hack-body { font-size: .82rem; color: var(--text-2); line-height: 1.65; }
.hack-bullets { padding-left: 1rem; display: grid; gap: .35rem; }
.hack-bullets li { font-size: .82rem; color: var(--text-2); line-height: 1.55; }
.hack-card-amber { border-color: var(--amber-light); }
.hack-card-green { border-color: var(--green-light); }

/* ── Hack reference rows ── */
.hack-ref-row { display: flex; justify-content: space-between; padding: .25rem .5rem; border-radius: .35rem; font-size: .78rem; }

/* ==========================================================================
   MODALS
   ========================================================================== */
.modal-overlay {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,.5); z-index: 600;
  align-items: center; justify-content: center;
}
.modal-overlay.open { display: flex; }
.modal {
  background: var(--surface); border-radius: var(--r-xl);
  padding: 2.5rem; width: 100%; max-width: 420px;
  margin: 1rem; box-shadow: var(--shadow-lg);
  max-height: 90vh; overflow-y: auto;
}
.modal-title { font-family: var(--font-display); font-size: 1.4rem; font-weight: 400; margin-bottom: .35rem; }
.modal-sub { font-size: .875rem; color: var(--text-2); margin-bottom: 1.5rem; }

/* ==========================================================================
   TOAST
   ========================================================================== */
#toast {
  position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(4rem);
  background: var(--teal); color: #fff;
  padding: .65rem 1.25rem; border-radius: var(--r-md);
  font-size: .875rem; font-weight: 500;
  box-shadow: var(--shadow-lg); z-index: 900;
  transition: transform .25s ease, opacity .25s ease;
  opacity: 0; pointer-events: none; white-space: nowrap;
}
#toast.visible { transform: translateX(-50%) translateY(0); opacity: 1; }
#toast.error { background: var(--red); }

/* ==========================================================================
   DISCLAIMER
   ========================================================================== */
.disclaimer-footer {
  width: 100%; text-align: center;
  font-size: .78rem; color: var(--text-3);
  padding-bottom: .75rem; border-bottom: 1px solid var(--border);
  margin-bottom: .75rem; line-height: 1.6;
}

/* ==========================================================================
   UTILITY
   ========================================================================== */
.text-teal   { color: var(--teal); }
.text-green  { color: var(--green); }
.text-amber  { color: var(--amber); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-3); }
.fw-600      { font-weight: 600; }
.fw-700      { font-weight: 700; }
.mt-1        { margin-top: .5rem; }
.mt-2        { margin-top: 1rem; }
.mb-1        { margin-bottom: .5rem; }
.mb-2        { margin-bottom: 1rem; }
.grid-2      { display: grid; grid-template-columns: 1fr 1fr; gap: .75rem; }
.grid-3      { display: grid; grid-template-columns: repeat(3,1fr); gap: 1rem; }
.sr-only     { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Mobile hero CTA — hidden on desktop */
.mobile-hero-cta { display: none; }

/* ==========================================================================
   DATA TAB — Mobile pills navigation
   ========================================================================== */
.data-pills-row {
  display: none; /* hidden on desktop */
}
.data-section-wrap {
  max-width: 100%;
  box-sizing: border-box;
  /* on desktop all sections always visible */
}

@media (max-width: 768px) {
  .data-pills-row {
    display: flex;
    gap: 6px;
    padding: .5rem 0 .6rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    margin-bottom: .5rem;
    flex-shrink: 0;
  }
  .data-pills-row::-webkit-scrollbar { display: none; }

  .data-pill {
    padding: .35rem .9rem;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 500;
    white-space: nowrap;
    border: 1.5px solid var(--border);
    color: var(--text-2);
    background: var(--surface);
    cursor: pointer;
    flex-shrink: 0;
    transition: all .15s ease;
  }
  .data-pill.active {
    background: var(--teal);
    color: #fff;
    border-color: var(--teal);
  }

  .data-section-wrap {
    display: none; /* hidden by default on mobile */
  }
  .data-section-wrap.active {
    display: block; /* shown when pill selected */
  }
}


.act-meals-grid {
  display: grid; grid-template-columns: 1fr 1fr;
  gap: 1rem; margin-bottom: 2rem; align-items: start;
}

/* ==========================================================================
   MOBILE
   ========================================================================== */
@media (max-width: 768px) {
  /* ── Landing nav ── */
  .l-nav { padding: .75rem 1rem; }
  .l-nav-actions .btn-ghost { display: none; }
  .l-nav-actions .btn-sm:last-child { display: none; } /* hide Sign in with Google — in hero instead */

  /* ── Mobile hero CTA ── */
  .mobile-hero-cta { display: block; margin-top: 1.25rem; }

  /* ── Hero ── */
  .hero { padding: 1.25rem 1.25rem 0; }
  .hero-headline { font-size: clamp(1.5rem, 6.5vw, 2rem); }
  .hero-body { font-size: .9rem; margin-bottom: 1.25rem; }

  /* ── Stats — 2x2 grid on mobile ── */
  .stats-strip {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 1.75rem;
    justify-items: center;
  }
  .stat-num { font-size: 1.3rem; }
  .stat-caption { max-width: 110px; font-size: .7rem; }

  /* ── Quote cards — compact on mobile ── */
  .grid-3 { grid-template-columns: 1fr; }
  .quote-card { padding: 1.1rem 1.2rem; }
  .quote-text { font-size: .875rem; }

  /* ── Steps ── */
  .steps-strip { grid-template-columns: 1fr; }
  .step-item:not(:last-child) { border-right: none; border-bottom: 1px solid var(--border); }

  /* ── Footer ── */
  .l-footer { padding: 1.25rem; }

  /* ── App shell ── */
  .app-shell { height: 100dvh; }
  .app-nav { padding: .6rem 1rem; }
  .app-nav-logo { font-size: .9rem; }
  .guest-bar { flex-direction: column; align-items: flex-start; gap: .5rem; padding: .5rem 1rem; }
  .guest-bar div { width: 100%; display: flex; gap: .5rem; }
  .guest-bar .btn { flex: 1; justify-content: center; }
  .tab-bar { padding: 0; overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none; }
  .tab-bar::-webkit-scrollbar { display: none; }
  .tab-btn { padding: .6rem .9rem; font-size: .78rem; white-space: nowrap; flex-shrink: 0; }
  .tab-content { padding: .75rem .75rem 2rem; }
  .table-wrap { overflow-x: scroll; -webkit-overflow-scrolling: touch; }
  .data-table th[style*="width"] { width: auto !important; }
  .log-grid { grid-template-columns: 1fr; }
  .card-body { padding: 1rem; }
  .card-title { font-size: .95rem; }
  .chip { padding: .4rem .85rem; font-size: .82rem; }
  .form-input { padding: .65rem .85rem; font-size: 1rem; }
  .gki-chart-grid { grid-template-columns: 1fr !important; }
  .bw-cards-grid  { grid-template-columns: 1fr !important; }
  .act-meals-grid { grid-template-columns: 1fr; }
  .table-wrap { max-height: 240px; }
  .data-table { font-size: .78rem; }
  .data-table th, .data-table td { padding: .45rem .6rem; }
  .hacks-grid { grid-template-columns: 1fr; }
  .modal {
    max-width: 100%; margin: 0;
    border-radius: var(--r-xl) var(--r-xl) 0 0;
    position: fixed; bottom: 0; left: 0; right: 0;
    max-height: 92dvh;
  }
  .modal-overlay { align-items: flex-end; }
  #toast { bottom: calc(1rem + env(safe-area-inset-bottom)); font-size: .82rem; }
}

@supports (padding-bottom: env(safe-area-inset-bottom)) {
  .app-shell { padding-bottom: env(safe-area-inset-bottom); }
}

@media (max-width: 768px) {
  button, .chip, .btn, .card-date-input { touch-action: manipulation; }
}

/* ── Google Sign In Button — consistent everywhere ── */
.btn-google {
  display: inline-flex; align-items: center; justify-content: center; gap: .6rem;
  background: #fff; color: #3c4043;
  border: 1.5px solid #dadce0; border-radius: var(--r-md);
  font-family: var(--font); font-size: .9rem; font-weight: 500;
  cursor: pointer; white-space: nowrap;
  transition: box-shadow .18s ease, border-color .18s ease;
  padding: .55rem 1.25rem;
}
.btn-google:hover { box-shadow: 0 1px 6px rgba(32,33,36,.28); border-color: #c6c6c6; }
.btn-google svg { flex-shrink: 0; }
