[hidden] { display: none !important; }

input[type="checkbox"] { width: auto; }

.first-screen { align-content: start; }

.notice,
.banner,
.status-bar { grid-column: 1 / -1; }

:root {
  color-scheme: light;
  --bg: #e7e1d4;
  --bg-2: #f3efe6;
  --card: #fffdf8;
  --ink: #1b1914;
  --muted: #5e584e;
  --line: #ddd4c4;
  --green: #0f6a4e;
  --green-deep: #0c3d2e;
  --green-soft: #e7f3ed;
  --header: #12261f;
  --header-text: #f3efe6;
  --protein: #b8432f;
  --carb: #a67c12;
  --fat: #24598a;
  --warn-bg: #fff6e8;
  --warn-line: #efd7a5;
  --shadow: 0 1px 2px rgba(27, 25, 20, 0.05), 0 10px 28px rgba(27, 25, 20, 0.06);
}

*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font: 14px/1.45 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif;
}

button, input { font: inherit; color: inherit; }

button { cursor: pointer; }

:focus-visible {
  outline: 2px solid #3dbe8b;
  outline-offset: 2px;
}

.topbar {
  height: 48px;
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 0 16px;
  background: var(--header);
  color: var(--header-text);
  box-shadow: inset 0 -1px 0 rgba(243, 239, 230, 0.14), inset 0 2px 0 #3dbe8b;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: inherit;
  text-decoration: none;
  font-weight: 700;
  letter-spacing: -0.02em;
  flex: 0 0 auto;
}

.mark {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  background: #3dbe8b;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.18);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 0;
}

.nav-links a {
  color: rgba(243, 239, 230, 0.78);
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.nav-links a:hover { color: #fff; }

.lang-menu {
  position: relative;
  margin-left: auto;
  flex: 0 0 auto;
}

.lang-menu summary {
  list-style: none;
  cursor: pointer;
  height: 32px;
  display: flex;
  align-items: center;
  padding: 0 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 650;
  white-space: nowrap;
}

.lang-menu summary::-webkit-details-marker { display: none; }

.lang-menu summary::after {
  content: "";
  display: inline-block;
  margin-left: 6px;
  border: 4px solid transparent;
  border-top-color: currentColor;
  transform: translateY(2px);
}

.lang-menu[open] summary { background: rgba(255, 255, 255, 0.08); }

.lang-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 4px);
  min-width: 148px;
  padding: 4px;
  background: #fffdf8;
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  z-index: 50;
}

.lang-panel a {
  display: block;
  padding: 6px 8px;
  border-radius: 7px;
  color: inherit;
  text-decoration: none;
  font-size: 13px;
}

.lang-panel a:hover { background: var(--bg-2); }

.lang-panel a[aria-current="page"] { font-weight: 750; background: var(--green-soft); }

.first-screen {
  display: grid;
  gap: 10px;
  padding: 12px 16px 6px;
}

h1 {
  margin: 0;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.03em;
  font-weight: 750;
  white-space: nowrap;
}

.dek {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  max-width: 78ch;
}

.split {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 12px;
  align-items: start;
}

.split > * { min-width: 0; }

.panel {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  box-shadow: var(--shadow);
  min-width: 0;
}

form.panel,
.results {
  display: grid;
  gap: 8px;
  align-content: start;
}

.unit-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.seg {
  display: flex;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: #fff;
  min-height: 34px;
}

.seg button {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 10px;
  font-size: 13px;
  font-weight: 650;
  line-height: 1.15;
}

.seg button small {
  display: block;
  font-size: 10px;
  font-weight: 600;
  color: var(--muted);
}

.seg button + button { box-shadow: inset 1px 0 0 var(--line); }

.seg button[aria-pressed="true"] {
  background: var(--green);
  color: #fff;
}

.seg button[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.86); }

.badge {
  margin: 0;
  font-size: 12px;
  font-weight: 700;
  line-height: 1.3;
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green-deep);
}

.badge[data-formula="katch"] {
  background: #e7f0f8;
  color: #1d4e7a;
}

.cols-2,
.metric-size {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.imperial-size {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.field {
  display: grid;
  gap: 4px;
  align-content: start;
  min-width: 0;
}

.lbl {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.opt { font-weight: 550; }

.field .seg { width: 100%; }

.field .seg button { flex: 1; }

input[type="text"] {
  width: 100%;
  height: 34px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 8px;
  background: #fff;
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.formula-note {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  color: var(--green-deep);
}

.formula-note[data-formula="katch"] { color: #1d4e7a; }

.block-label {
  margin: 0 0 4px;
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.chip {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  padding: 5px 8px 4px;
  text-align: left;
  line-height: 1.15;
  flex: 1 1 88px;
  min-width: 0;
}

.chip .chip-name {
  display: block;
  font-size: 13px;
  font-weight: 700;
}

.chip small {
  display: block;
  margin-top: 2px;
  font-size: 11px;
  font-weight: 550;
  color: var(--muted);
}

.chip[aria-pressed="true"] {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.chip[aria-pressed="true"] small { color: rgba(255, 255, 255, 0.88); }

.heroes {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.hero {
  background: var(--bg-2);
  border-radius: 10px;
  padding: 8px 8px 10px;
  min-width: 0;
}

.hero.target { background: var(--green-soft); }

.heroes h2 {
  margin: 0;
  font-size: 11px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--muted);
}

.hero .num {
  margin: 5px 0 0;
  font-size: 28px;
  line-height: 1;
  font-weight: 750;
  letter-spacing: -0.04em;
  font-variant-numeric: tabular-nums;
}

.hero.target .num { color: var(--green-deep); }

.hero .per {
  margin: 3px 0 0;
  font-size: 11px;
  color: var(--muted);
}

.delta {
  margin: 6px 0 0;
  display: inline-block;
  font-size: 12px;
  font-weight: 750;
  font-variant-numeric: tabular-nums;
  padding: 2px 6px;
  border-radius: 999px;
  background: #eeeae2;
  color: var(--muted);
}

.delta.neg { background: #f8e6df; color: #8a341f; }

.delta.pos { background: #e5f4ee; color: #0e6b4f; }

.delta.zero { background: #eeeae2; color: #5c564c; }

.macro-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "name val"
    "bar bar";
  gap: 2px 8px;
  align-items: baseline;
}

.macro-name {
  grid-area: name;
  font-size: 13px;
  font-weight: 700;
  min-width: 0;
}

.macro-name::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  margin-right: 6px;
  border-radius: 2px;
  background: currentColor;
  transform: translateY(1px);
}

.macro-name.protein { color: var(--ink); }
.macro-name.carb { color: var(--ink); }
.macro-name.fat { color: var(--ink); }
.macro-name.protein::before { background: var(--protein); }
.macro-name.carb::before { background: var(--carb); }
.macro-name.fat::before { background: var(--fat); }

.macro-val {
  grid-area: val;
  font-size: 13px;
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  white-space: nowrap;
}

.track {
  grid-area: bar;
  height: 8px;
  border-radius: 99px;
  background: #efe8db;
  overflow: hidden;
}

.fill {
  display: block;
  height: 100%;
  border-radius: 99px;
  width: 0;
}

.fill.protein { background: var(--protein); }
.fill.carb { background: var(--carb); }
.fill.fat { background: var(--fat); }

.chart-wrap { position: relative; min-width: 0; }

#chart {
  width: 100%;
  height: 188px;
  display: block;
  border-radius: 10px;
  background: #f4f0e6;
}

.sr-only {
  position: absolute;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: 0;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.action {
  appearance: none;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 8px;
  height: 34px;
  padding: 0 10px;
  font-size: 13px;
  font-weight: 700;
}

.action:hover { border-color: var(--green); color: var(--green-deep); }

.notice {
  margin: 0;
  font-size: 12px;
  line-height: 1.35;
  background: var(--warn-bg);
  border: 1px solid var(--warn-line);
  border-radius: 8px;
  padding: 6px 8px;
}

.notice.ok {
  background: var(--green-soft);
  border-color: #b7dccb;
  color: var(--green-deep);
}

.copy-sink {
  position: fixed;
  left: 0;
  top: 0;
  width: 1px;
  height: 1px;
  opacity: 0;
  pointer-events: none;
}

.prose {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 16px 8px;
  font-size: 15px;
}

.prose h2 {
  margin: 0 0 8px;
  font-size: 22px;
  letter-spacing: -0.02em;
}

.prose h3 {
  margin: 16px 0 6px;
  font-size: 16px;
}

.prose p { margin: 0 0 8px; }

.eq {
  font-family: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, monospace;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  font-size: 13px;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
}

th, td {
  text-align: left;
  padding: 6px 8px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}

tr:last-child td { border-bottom: 0; }

.faq {
  border-top: 1px solid var(--line);
  padding: 8px 0;
}

.faq summary {
  cursor: pointer;
  font-weight: 700;
}

.faq p { margin: 6px 0 0; color: #3f3b34; }

.partner-lead { color: var(--muted); }

.disclosure {
  background: #fff6e8;
  border: 1px solid #efd7a5;
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
}

.partner-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.partner-grid li {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  background: #fff;
}

.partner-grid a {
  color: var(--green-deep);
  font-weight: 750;
}

.partner-grid p { margin: 6px 0 0; color: var(--muted); font-size: 14px; }

.site-footer {
  padding: 10px 16px 14px;
}

.site-footer p {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
}

.not-found-list { padding-left: 18px; }

@media (max-width: 900px) {
  h1 {
    white-space: normal;
    font-size: 22px;
  }

  .split,
  .heroes,
  .partner-grid,
  .imperial-size { grid-template-columns: 1fr; }

  .imperial-size { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .nav-links { display: none; }

  .cols-2,
  .metric-size { grid-template-columns: 1fr; }

  .hero .num { font-size: 24px; }
}


.w0{width:0%}
.w1{width:1%}
.w2{width:2%}
.w3{width:3%}
.w4{width:4%}
.w5{width:5%}
.w6{width:6%}
.w7{width:7%}
.w8{width:8%}
.w9{width:9%}
.w10{width:10%}
.w11{width:11%}
.w12{width:12%}
.w13{width:13%}
.w14{width:14%}
.w15{width:15%}
.w16{width:16%}
.w17{width:17%}
.w18{width:18%}
.w19{width:19%}
.w20{width:20%}
.w21{width:21%}
.w22{width:22%}
.w23{width:23%}
.w24{width:24%}
.w25{width:25%}
.w26{width:26%}
.w27{width:27%}
.w28{width:28%}
.w29{width:29%}
.w30{width:30%}
.w31{width:31%}
.w32{width:32%}
.w33{width:33%}
.w34{width:34%}
.w35{width:35%}
.w36{width:36%}
.w37{width:37%}
.w38{width:38%}
.w39{width:39%}
.w40{width:40%}
.w41{width:41%}
.w42{width:42%}
.w43{width:43%}
.w44{width:44%}
.w45{width:45%}
.w46{width:46%}
.w47{width:47%}
.w48{width:48%}
.w49{width:49%}
.w50{width:50%}
.w51{width:51%}
.w52{width:52%}
.w53{width:53%}
.w54{width:54%}
.w55{width:55%}
.w56{width:56%}
.w57{width:57%}
.w58{width:58%}
.w59{width:59%}
.w60{width:60%}
.w61{width:61%}
.w62{width:62%}
.w63{width:63%}
.w64{width:64%}
.w65{width:65%}
.w66{width:66%}
.w67{width:67%}
.w68{width:68%}
.w69{width:69%}
.w70{width:70%}
.w71{width:71%}
.w72{width:72%}
.w73{width:73%}
.w74{width:74%}
.w75{width:75%}
.w76{width:76%}
.w77{width:77%}
.w78{width:78%}
.w79{width:79%}
.w80{width:80%}
.w81{width:81%}
.w82{width:82%}
.w83{width:83%}
.w84{width:84%}
.w85{width:85%}
.w86{width:86%}
.w87{width:87%}
.w88{width:88%}
.w89{width:89%}
.w90{width:90%}
.w91{width:91%}
.w92{width:92%}
.w93{width:93%}
.w94{width:94%}
.w95{width:95%}
.w96{width:96%}
.w97{width:97%}
.w98{width:98%}
.w99{width:99%}
.w100{width:100%}
