/* FoodCalculator v1 mockups — shared design system */
* { box-sizing: border-box; }
:root {
  --bg: #f4f6f7;
  --surface: #ffffff;
  --surface-2: #edf1f2;
  --surface-3: #e4e9ea;
  --text: #101828;
  --muted: #667085;
  --faint: #98a2b3;
  --line: #e3e8ea;
  --accent: #0f766e;
  --accent-2: #14b8a6;
  --accent-soft: #d8f5f0;
  --amber: #b45309;
  --amber-soft: #fef0c7;
  --blue: #1d4ed8;
  --blue-soft: #dbeafe;
  --red: #b42318;
  --red-soft: #fee4e2;
  --green: #067647;
  --green-soft: #dcfae6;
  --violet: #6d28d9;
  --violet-soft: #ede9fe;
  --radius: 20px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .07);
}
html, body { margin: 0; padding: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
.screen {
  width: 412px;
  height: 915px;
  background: var(--bg);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}
/* ---------- status bar ---------- */
.statusbar {
  flex: none;
  height: 30px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 22px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .2px;
}
.status-right { display: flex; align-items: center; gap: 7px; }
.signal { display: flex; align-items: flex-end; gap: 1.5px; height: 10px; }
.signal span { width: 3px; background: currentColor; border-radius: 1px; }
.signal span:nth-child(1) { height: 3px; }
.signal span:nth-child(2) { height: 5px; }
.signal span:nth-child(3) { height: 7px; }
.signal span:nth-child(4) { height: 10px; }
.battery {
  width: 20px; height: 10px; border: 1.5px solid currentColor; border-radius: 3px;
  padding: 1.5px; position: relative;
}
.battery::before { content: ""; display: block; width: 72%; height: 100%; background: currentColor; border-radius: 1px; }
.battery::after {
  content: ""; position: absolute; right: -3px; top: 2px; width: 2px; height: 4px;
  background: currentColor; border-radius: 0 1px 1px 0;
}
/* ---------- app bar ---------- */
.appbar {
  flex: none;
  min-height: 58px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 16px 4px;
}
.appbar h1 { font-size: 21px; font-weight: 750; letter-spacing: -.3px; margin: 0; flex: 1; }
.appbar .sub { font-size: 11.5px; color: var(--muted); font-weight: 600; margin-top: 2px; }
.iconbtn {
  width: 40px; height: 40px; border-radius: 14px; border: 0;
  display: grid; place-items: center; color: var(--text); background: transparent;
  flex: none;
}
.iconbtn.filled { background: var(--surface); box-shadow: var(--shadow); }
.iconbtn.small { width: 32px; height: 32px; border-radius: 10px; }
/* ---------- icons (masked SVG) ---------- */
.icon {
  width: 22px; height: 22px; display: inline-block; background: currentColor;
  -webkit-mask: var(--i) center / contain no-repeat;
  mask: var(--i) center / contain no-repeat;
  flex: none;
}
.icon.sm { width: 18px; height: 18px; }
.icon.xs { width: 14px; height: 14px; }
.i-calendar { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='5' width='18' height='16' rx='3'/%3E%3Cpath d='M8 3v4M16 3v4M3 10h18'/%3E%3Cpath d='M8 14h3M8 17h6'/%3E%3C/svg%3E"); }
.i-leaf { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 4c-9 0-14 5-14 11a5 5 0 0 0 5 5c7 0 9-8 9-16Z'/%3E%3Cpath d='M6 21c0-7 3-11 10-14'/%3E%3C/svg%3E"); }
.i-clock { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7v5l3 2'/%3E%3C/svg%3E"); }
.i-chart { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20V11M10 20V4M16 20v-6M22 20H2'/%3E%3C/svg%3E"); }
.i-settings { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6h16M4 12h16M4 18h16'/%3E%3Ccircle cx='9' cy='6' r='2'/%3E%3Ccircle cx='15' cy='12' r='2'/%3E%3Ccircle cx='8' cy='18' r='2'/%3E%3C/svg%3E"); }
.i-plus { --i: 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'%3E%3Cpath d='M12 5v14M5 12h14'/%3E%3C/svg%3E"); }
.i-back { --i: 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='M15 18l-6-6 6-6'/%3E%3C/svg%3E"); }
.i-search { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-3.5-3.5'/%3E%3C/svg%3E"); }
.i-chevron { --i: 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='M9 18l6-6-6-6'/%3E%3C/svg%3E"); }
.i-chevron-left { --i: 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='M15 18l-6-6 6-6'/%3E%3C/svg%3E"); }
.i-more { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='black'%3E%3Ccircle cx='5' cy='12' r='2'/%3E%3Ccircle cx='12' cy='12' r='2'/%3E%3Ccircle cx='19' cy='12' r='2'/%3E%3C/svg%3E"); }
.i-edit { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 20h4l10-10-4-4L4 16v4Z'/%3E%3Cpath d='M13.5 5.5l4 4'/%3E%3C/svg%3E"); }
.i-trash { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 7h16M9 7V4h6v3M6 7l1 13h10l1-13M10 11v5M14 11v5'/%3E%3C/svg%3E"); }
.i-close { --i: 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'%3E%3Cpath d='M6 6l12 12M18 6L6 18'/%3E%3C/svg%3E"); }
.i-drop { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3s6 6.5 6 11a6 6 0 0 1-12 0c0-4.5 6-11 6-11Z'/%3E%3C/svg%3E"); }
.i-pen { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M17 3l4 4M14 6l4 4M13 7l-8 8v4h4l8-8'/%3E%3Cpath d='M9 11l4 4'/%3E%3C/svg%3E"); }
.i-file { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3h7l5 5v13H7V3Z'/%3E%3Cpath d='M14 3v5h5M10 13h6M10 17h6'/%3E%3C/svg%3E"); }
.i-download { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3v12M7 10l5 5 5-5M4 21h16'/%3E%3C/svg%3E"); }
.i-upload { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 21V9M7 14l5-5 5 5M4 3h16'/%3E%3C/svg%3E"); }
.i-warning { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3l9 17H3L12 3Z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E"); }
.i-check { --i: 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.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12.5l5 5L20 6.5'/%3E%3C/svg%3E"); }
.i-filter { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 5h18l-7 8v6l-4 2v-8L3 5Z'/%3E%3C/svg%3E"); }
.i-globe { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M3 12h18M12 3c3 3.5 3 14.5 0 18M12 3c-3 3.5-3 14.5 0 18'/%3E%3C/svg%3E"); }
.i-moon { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 14.5A8.5 8.5 0 0 1 9.5 4 8.5 8.5 0 1 0 20 14.5Z'/%3E%3C/svg%3E"); }
.i-info { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 11v5M12 7.5h.01'/%3E%3C/svg%3E"); }
.i-reset { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 4v6h6'/%3E%3Cpath d='M20 12a8 8 0 1 1-2.34-5.66L20 8'/%3E%3C/svg%3E"); }
.i-arrow-right { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 12h16M14 6l6 6-6 6'/%3E%3C/svg%3E"); }
.i-fork { --i: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 3v7a3 3 0 0 0 6 0V3M10 3v18M17 3c-2 2-2 6 0 8v10'/%3E%3C/svg%3E"); }
/* ---------- layout ---------- */
.content {
  flex: 1; min-height: 0; overflow: hidden;
  padding: 4px 16px 12px;
  display: flex; flex-direction: column; gap: 12px;
}
.content.pad0 { padding: 0 0 12px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row-flex { display: flex; align-items: center; gap: 10px; }
.grow { flex: 1; min-width: 0; }
.spacer { flex: 1; }
.center { text-align: center; }
/* ---------- cards ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; box-shadow: var(--shadow);
}
.card.tight { padding: 12px; }
.card.flat { box-shadow: none; }
.card.accent { background: linear-gradient(145deg, #0f766e 0%, #115e59 100%); color: #fff; border: 0; }
.card.accent .eyebrow, .card.accent .muted { color: rgba(255,255,255,.72); }
.card.amber { background: var(--amber-soft); border-color: #f7d58b; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; }
.eyebrow { font-size: 10.5px; text-transform: uppercase; letter-spacing: .09em; font-weight: 750; color: var(--muted); }
.h2 { font-size: 16px; font-weight: 750; letter-spacing: -.2px; }
.h3 { font-size: 14px; font-weight: 700; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.tiny { font-size: 11px; }
.small { font-size: 12px; }
.big { font-size: 30px; font-weight: 800; letter-spacing: -.8px; line-height: 1; }
.big span { font-size: 14px; font-weight: 700; letter-spacing: 0; color: var(--muted); }
.bignum { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.divider { height: 1px; background: var(--line); margin: 10px 0; }
/* ---------- chips / badges ---------- */
.chip {
  display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px;
  border-radius: 999px; background: var(--surface-2); font-size: 11.5px; font-weight: 700;
  color: var(--text); white-space: nowrap;
}
.chip .icon { width: 14px; height: 14px; }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.amber { background: var(--amber-soft); color: var(--amber); }
.chip.blue { background: var(--blue-soft); color: var(--blue); }
.chip.red { background: var(--red-soft); color: var(--red); }
.chip.green { background: var(--green-soft); color: var(--green); }
.chip.violet { background: var(--violet-soft); color: var(--violet); }
.badge { font-size: 9.5px; font-weight: 750; padding: 3px 7px; border-radius: 999px; background: var(--surface-2); color: var(--muted); }
.badge.new { background: var(--green-soft); color: var(--green); }
.badge.dup { background: var(--amber-soft); color: var(--amber); }
.badge.err { background: var(--red-soft); color: var(--red); }
/* ---------- buttons ---------- */
.btn {
  height: 50px; border-radius: 16px; border: 0; display: flex; align-items: center; justify-content: center;
  gap: 8px; font-size: 15px; font-weight: 750; background: var(--accent); color: #fff;
  font-family: inherit;
}
.btn.secondary { background: var(--surface); color: var(--text); border: 1px solid var(--line); }
.btn.ghost { background: transparent; color: var(--accent); }
.btn.danger { background: var(--red-soft); color: var(--red); }
.btn.block { width: 100%; }
.btn.sm { height: 40px; font-size: 13px; border-radius: 12px; }
/* ---------- bottom nav / fab ---------- */
.bottomnav {
  flex: none; height: 76px; display: flex; align-items: flex-start; justify-content: space-around;
  padding: 8px 10px 0; background: rgba(255,255,255,.94); border-top: 1px solid var(--line);
}
.navitem { width: 74px; display: flex; flex-direction: column; align-items: center; gap: 3px; color: var(--muted); font-size: 10.5px; font-weight: 700; }
.navitem .iconwrap { width: 46px; height: 31px; border-radius: 999px; display: grid; place-items: center; }
.navitem.active { color: var(--accent); }
.navitem.active .iconwrap { background: var(--accent-soft); }
.fab {
  position: absolute; right: 18px; bottom: 92px; width: 58px; height: 58px; border-radius: 19px;
  background: var(--accent); color: #fff; display: grid; place-items: center;
  box-shadow: 0 12px 26px rgba(15,118,110,.34); z-index: 6;
}
.fab .icon { width: 26px; height: 26px; }
/* ---------- timeline ---------- */
.timeline { display: flex; flex-direction: column; gap: 10px; }
.entry { display: flex; gap: 10px; align-items: flex-start; }
.entry .time { width: 42px; flex: none; font-size: 11px; font-weight: 750; color: var(--muted); padding-top: 13px; }
.entry-card { flex: 1; min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 12px; box-shadow: var(--shadow); }
.entry-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.entry-title { font-size: 13.5px; font-weight: 750; letter-spacing: -.1px; }
.entry-sub { font-size: 11px; color: var(--muted); margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 235px; }
.entry-numbers { display: flex; align-items: center; gap: 10px; margin-top: 8px; font-size: 11px; color: var(--muted); }
.entry-numbers b { color: var(--text); font-size: 12px; }
.entry-numbers .sep { width: 1px; height: 12px; background: var(--line); }
.dot { width: 5px; height: 5px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); }
.dot.amber { background: var(--amber); }
.dot.blue { background: var(--blue); }
/* ---------- summary metrics ---------- */
.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.metric { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 8px; text-align: center; box-shadow: var(--shadow); }
.metric b { display: block; font-size: 16px; font-weight: 800; letter-spacing: -.3px; }
.metric span { display: block; font-size: 9.5px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 3px; }
.metric.accent { background: var(--accent-soft); border-color: #b8eee5; }
.metric.amber { background: var(--amber-soft); border-color: #f7d58b; }
/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.label { font-size: 10px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.input {
  min-height: 46px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface);
  display: flex; align-items: center; gap: 8px; padding: 0 12px; font-size: 13.5px; font-weight: 600;
}
.input .ph { color: var(--faint); font-weight: 500; }
.input.sm { min-height: 40px; border-radius: 12px; font-size: 13px; }
.input .suffix { color: var(--muted); font-size: 11px; font-weight: 700; }
.input.right { justify-content: space-between; }
.input.tiny { min-height: 34px; border-radius: 10px; font-size: 12px; }
/* ---------- autocomplete ---------- */
.combo { position: relative; }
.dropdown {
  position: absolute; left: 0; right: 0; top: 50px; background: var(--surface);
  border: 1px solid var(--line); border-radius: 16px; box-shadow: 0 16px 36px rgba(16,24,40,.16);
  z-index: 20; overflow: hidden;
}
.option { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 11px 12px; border-bottom: 1px solid var(--line); }
.option:last-child { border-bottom: 0; }
.option .name { font-size: 13px; font-weight: 650; }
.option .meta { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
.option .carbs { font-size: 11px; font-weight: 750; color: var(--accent); }
.foodrow { display: grid; grid-template-columns: 1fr 72px 30px; gap: 8px; align-items: center; }
.foodrow .rm { width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); }
/* ---------- pinned bottom bar ---------- */
.bottom-actions { flex: none; padding: 0 12px 12px; }
.pinned {
  background: #101828; color: #fff; border-radius: 18px 18px 0 0; padding: 12px 16px 10px;
  display: flex; justify-content: space-between; gap: 6px; box-shadow: 0 -8px 24px rgba(16,24,40,.14);
}
.pinned .num { display: flex; flex-direction: column; gap: 1px; }
.pinned .num b { font-size: 14px; font-weight: 800; letter-spacing: -.2px; }
.pinned .num span { font-size: 8.5px; text-transform: uppercase; letter-spacing: .06em; color: rgba(255,255,255,.62); font-weight: 700; }
.pinned .num.dose b { color: #5eead4; }
.bottom-actions .btn { border-radius: 0 0 18px 18px; }
/* ---------- lists ---------- */
.list { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.row {
  display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-bottom: 1px solid var(--line);
  min-height: 52px;
}
.row:last-child { border-bottom: 0; }
.row .title { font-size: 13.5px; font-weight: 650; }
.row .sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.row .value { font-size: 12px; color: var(--muted); font-weight: 650; }
.row .chev { color: var(--faint); }
.row.icon-row .ico { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); flex: none; }
.row.icon-row .ico.accent { background: var(--accent-soft); color: var(--accent); }
.row.icon-row .ico.amber { background: var(--amber-soft); color: var(--amber); }
.row.icon-row .ico.blue { background: var(--blue-soft); color: var(--blue); }
.row.icon-row .ico.red { background: var(--red-soft); color: var(--red); }
.section-label { font-size: 10.5px; font-weight: 750; color: var(--muted); text-transform: uppercase; letter-spacing: .09em; padding: 4px 4px 0; }
/* ---------- search ---------- */
.search {
  height: 46px; border-radius: 15px; background: var(--surface); border: 1px solid var(--line);
  display: flex; align-items: center; gap: 9px; padding: 0 12px; box-shadow: var(--shadow);
  color: var(--muted); font-size: 13px; font-weight: 500;
}
.search .placeholder { color: var(--faint); }
/* ---------- segmented ---------- */
.segmented { display: flex; background: var(--surface-2); border-radius: 12px; padding: 3px; gap: 2px; }
.segmented .seg { flex: 1; height: 34px; display: flex; align-items: center; justify-content: center; border-radius: 9px; font-size: 11.5px; font-weight: 750; color: var(--muted); }
.segmented .seg.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
/* ---------- calendar ---------- */
.calendar { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; text-align: center; }
.weekday { font-size: 9.5px; font-weight: 750; color: var(--muted); padding: 2px 0 4px; }
.day {
  height: 37px; display: flex; flex-direction: column; align-items: center; justify-content: center;
  border-radius: 12px; font-size: 12px; font-weight: 650; position: relative; color: var(--text);
}
.day.muted { color: var(--faint); font-weight: 500; }
.day.selected { background: var(--accent); color: #fff; box-shadow: 0 6px 14px rgba(15,118,110,.28); }
.day .dot { position: absolute; bottom: 4px; width: 4px; height: 4px; border-radius: 50%; background: var(--accent); }
.day.selected .dot { background: #fff; }
.day.hollow .dot { background: transparent; border: 1px solid var(--accent); width: 3px; height: 3px; }
.day.today { outline: 1.5px solid var(--accent); outline-offset: -1.5px; }
/* ---------- charts ---------- */
.chart-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 12px 10px; box-shadow: var(--shadow); }
.legend { display: flex; gap: 12px; align-items: center; font-size: 10.5px; color: var(--muted); font-weight: 650; }
.legend i { width: 9px; height: 9px; border-radius: 3px; display: inline-block; margin-right: 4px; }
.bars { display: flex; gap: 4px; align-items: flex-end; height: 112px; margin-top: 10px; }
.bargroup { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 4px; }
.barpair { display: flex; gap: 2px; align-items: flex-end; height: 96px; }
.bar { width: 8px; border-radius: 3px 3px 0 0; background: var(--accent); }
.bar.actual { background: var(--amber); }
.bar.carbs { background: var(--blue); }
.barlabel { font-size: 8.5px; color: var(--muted); font-weight: 700; }
.linechart { width: 100%; height: auto; display: block; margin-top: 6px; }
.axis { stroke: #e3e8ea; stroke-width: 1; }
.gridline { stroke: #eef2f3; stroke-width: 1; }
/* ---------- misc ---------- */
.kv { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kv .k { color: var(--muted); font-size: 11.5px; font-weight: 600; }
.kv .v { font-size: 13px; font-weight: 750; }
.statgrid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.statbox { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px; box-shadow: var(--shadow); }
.statbox b { display: block; font-size: 18px; font-weight: 800; letter-spacing: -.4px; }
.statbox span { display: block; font-size: 10px; color: var(--muted); font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin-top: 2px; }
.footer-note { font-size: 10px; color: var(--faint); text-align: center; padding: 2px 12px; line-height: 1.4; }
.hero { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 18px 8px; text-align: center; }
.logo {
  width: 72px; height: 72px; border-radius: 24px; background: linear-gradient(145deg, #0f766e, #14b8a6);
  display: grid; place-items: center; color: #fff; box-shadow: 0 14px 30px rgba(15,118,110,.28);
}
.logo .icon { width: 38px; height: 38px; }
.onboard-title { font-size: 26px; font-weight: 800; letter-spacing: -.6px; }
.onboard-sub { font-size: 12.5px; color: var(--muted); max-width: 300px; line-height: 1.45; }
.checkbox { width: 22px; height: 22px; border-radius: 7px; border: 1.5px solid var(--line); display: grid; place-items: center; background: var(--surface); flex: none; }
.checkbox.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.unit-option { flex: 1; border: 1.5px solid var(--line); border-radius: 14px; padding: 11px 12px; background: var(--surface); }
.unit-option.active { border-color: var(--accent); background: var(--accent-soft); }
.unit-option b { display: block; font-size: 14px; }
.unit-option span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; }
.fade-bottom { position: absolute; left: 0; right: 0; bottom: 0; height: 70px; background: linear-gradient(transparent, var(--bg)); pointer-events: none; }
/* capture mode: page equals the screen */
body.capture { background: var(--bg); }
body.capture .screen { width: 412px; height: 915px; }
