/* EGON — SEO tool pages (2026-11): protein & macro calculator + high-protein
   recipes. Loaded after style.css by those pages only (body.toolpage).
   Brand: noir #0B0B0B · surface #111111 · lime #CBFF47 · off-white #F5F5F5 · Kanit.
   One hue for data: lime at three strengths (no grey bars). */

.toolpage main { display: block; }
.tool-hero { padding-top: 44px; }
.tool-hero h1 { margin: 10px 0 16px; font-size: clamp(34px, 5.6vw, 64px); line-height: 1; overflow-wrap: break-word; }
.tool-hero .sec-lede { max-width: 40em; }

/* ---------- calculator ---------- */
.calc-sec { padding-top: 40px; }
.calc-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: 18px; align-items: start; }
.calc-results { display: grid; gap: 14px; min-width: 0; }
.calc-card {
  position: relative; min-width: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0.01)), var(--surface);
  border: 1px solid rgba(255,255,255,0.08); border-radius: 22px; padding: 20px;
}
.calc-card::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 1px; border-radius: 22px 22px 0 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.22), transparent);
}
.calc-inputs { position: sticky; top: 84px; display: grid; gap: 18px; }
.calc-card .calc-label { margin-bottom: 2px; }

.field { display: grid; gap: 8px; border: 0; }
.field-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.field-l { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-inline { grid-template-columns: 1fr auto; align-items: center; }
.field-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; align-items: center; }

.seg { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.seg-3 { grid-template-columns: repeat(3, 1fr); }
.chip {
  min-height: 44px; padding: 8px 10px; border-radius: 12px; cursor: pointer;
  font: inherit; font-size: 14px; font-weight: 700; line-height: 1.15; color: var(--off);
  background: rgba(255,255,255,0.06); border: 1px solid rgba(255,255,255,0.06);
  transition: background 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease);
}
.chip:hover { border-color: rgba(203,255,71,0.45); }
.chip[aria-pressed="true"] { background: var(--lime); color: var(--noir); border-color: var(--lime); }
.chip:focus-visible, .stepper button:focus-visible, .num input:focus-visible, input[type=range]:focus-visible {
  outline: 2px solid var(--lime); outline-offset: 2px;
}
.unit { display: inline-flex; gap: 4px; }
.unit .chip { min-height: 30px; padding: 4px 10px; font-size: 12px; border-radius: 999px; }
@media (max-width: 860px) { .unit .chip { min-height: 40px; padding: 4px 14px; } }

input[type=range] {
  -webkit-appearance: none; appearance: none; width: 100%; height: 28px; background: transparent; cursor: pointer;
  accent-color: var(--lime);
}
input[type=range]::-webkit-slider-runnable-track { height: 6px; border-radius: 999px; background: rgba(203,255,71,0.22); }
input[type=range]::-moz-range-track { height: 6px; border-radius: 999px; background: rgba(203,255,71,0.22); }
input[type=range]::-moz-range-progress { height: 6px; border-radius: 999px; background: var(--lime); }
input[type=range]::-webkit-slider-thumb {
  -webkit-appearance: none; appearance: none; width: 22px; height: 22px; margin-top: -8px; border-radius: 50%;
  background: var(--lime); border: 3px solid var(--noir); box-shadow: 0 0 0 1px var(--lime), 0 0 14px rgba(203,255,71,0.45);
}
input[type=range]::-moz-range-thumb {
  width: 18px; height: 18px; border-radius: 50%; background: var(--lime); border: 3px solid var(--noir);
  box-shadow: 0 0 0 1px var(--lime), 0 0 14px rgba(203,255,71,0.45);
}
.num {
  display: inline-flex; align-items: baseline; gap: 4px; padding: 6px 10px; border-radius: 10px;
  background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08);
  font-size: 12px; color: var(--muted); width: 104px; justify-content: flex-end;
}
.num input {
  width: 3.4em; background: transparent; border: 0; color: var(--off); text-align: right;
  font: inherit; font-size: 17px; font-weight: 700; font-variant-numeric: tabular-nums; -moz-appearance: textfield;
}
.num input::-webkit-outer-spin-button, .num input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.stepper { display: inline-flex; align-items: center; gap: 4px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,0.3); border: 1px solid rgba(255,255,255,0.08); }
.stepper button {
  width: 38px; height: 38px; border-radius: 9px; border: 0; cursor: pointer;
  background: rgba(203,255,71,0.12); color: var(--lime); font-size: 20px; font-weight: 700; line-height: 1;
}
.stepper button:hover { background: var(--lime); color: var(--noir); }
.stepper output { min-width: 30px; text-align: center; font-size: 18px; font-weight: 800; color: var(--off); font-variant-numeric: tabular-nums; }

/* results */
.ch-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin: 4px 0 16px; flex-wrap: wrap; }
.ch-num {
  font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; line-height: 0.9;
  font-size: clamp(72px, 11vw, 112px); color: var(--lime); font-variant-numeric: tabular-nums;
  text-shadow: 0 0 34px rgba(203,255,71,0.3);
}
.ch-num small { font-size: 0.34em; color: var(--off); text-shadow: none; margin-left: 4px; }
.ch-kcal { display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 6px; }
.ch-kcal b { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 30px; line-height: 1; color: var(--off); font-variant-numeric: tabular-nums; }
.ch-kcal span { font-size: 12px; font-weight: 600; color: var(--muted); }
.ch-bar { height: 10px; gap: 4px; margin-bottom: 14px; }
.ch-bar i { flex: 1 1 0; min-width: 6px; border-radius: 999px; transition: flex-grow 0.35s var(--ease); }
.ch-legend { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.ch-legend > div { display: flex; flex-direction: column; gap: 1px; min-width: 0; }
.ch-legend span { display: flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ch-legend span i { flex: none; width: 14px; height: 4px; border-radius: 999px; }
.ch-legend b { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 21px; color: var(--off); font-variant-numeric: tabular-nums; }
.ch-legend small { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.cz-top { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin: 6px 0 12px; }
.cz-num { font-size: 13px; font-weight: 600; color: var(--off); }
.cz-num b { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 32px; color: var(--lime); margin-right: 4px; font-variant-numeric: tabular-nums; }
.cz-range { font-size: 13px; font-weight: 700; color: var(--lime); background: rgba(203,255,71,0.1); padding: 5px 11px; border-radius: 999px; font-variant-numeric: tabular-nums; }
.cz-bar { position: relative; height: 14px; border-radius: 999px; background: rgba(203,255,71,0.08); margin: 8px 0 6px; }
.cz-band { position: absolute; top: 0; bottom: 0; border-radius: 999px; background: rgba(203,255,71,0.3); transition: left 0.35s var(--ease), width 0.35s var(--ease); }
.cz-mark {
  position: absolute; top: 50%; width: 22px; height: 22px; margin: -11px 0 0 -11px; border-radius: 50%;
  background: var(--lime); border: 3px solid var(--noir); box-shadow: 0 0 16px rgba(203,255,71,0.55);
  transition: left 0.35s var(--ease);
}
.cz-scale { display: flex; justify-content: space-between; font-size: 11px; color: var(--muted); }
.calc-note { margin: 12px 0 0; font-size: 13px; line-height: 1.5; color: rgba(245,245,245,0.8); }

.cd-meals { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; align-items: end; height: 150px; margin-top: 10px; }
.cd-meals > div { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.cd-meals strong { font-size: 13px; font-weight: 700; color: var(--off); font-variant-numeric: tabular-nums; }
.cd-meals i { display: block; width: 30px; height: calc(var(--h, 100%) * 0.72); min-height: 6px; border-radius: 999px; background: var(--lime); transition: height 0.35s var(--ease); }
.cd-meals > div:nth-child(3) i { background: rgba(203,255,71,0.45); }
.cd-meals span { font-size: 11px; font-weight: 600; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }

.cp-foods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin-top: 10px; }
.cp-foods > div { display: flex; flex-direction: column; gap: 2px; padding: 12px; min-height: 64px; border-radius: 14px; background: rgba(0,0,0,0.3); min-width: 0; }
.cp-foods b { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 22px; color: var(--off); font-variant-numeric: tabular-nums; }
.cp-foods span { font-size: 12px; color: var(--muted); }

.calc-fine { max-width: 760px; margin-top: 18px; }
.calc-fine p { font-size: 12.5px; line-height: 1.55; color: var(--muted); margin: 0 0 6px; }
.calc-fine .calc-privacy { color: var(--lime); font-weight: 600; }

/* ---------- long-form article ---------- */
.prose { max-width: 1120px; }
.prose > * { max-width: 760px; }
.prose h2 { font-size: clamp(26px, 3.4vw, 38px); margin: 48px 0 14px; }
.prose h2:first-child { margin-top: 0; }
.prose p { font-size: 16.5px; line-height: 1.7; color: var(--muted); margin: 0 0 14px; }
.prose p strong { color: var(--off); }
.prose a { font-weight: 600; }
.calc-table { width: 100%; border-collapse: collapse; margin: 6px 0 8px; font-size: 15px; }
.calc-table th, .calc-table td { text-align: left; padding: 11px 14px; border-bottom: 1px solid rgba(255,255,255,0.07); }
.calc-table th { font-size: 11px; letter-spacing: 1.2px; text-transform: uppercase; color: var(--muted); font-weight: 700; }
.calc-table td { color: var(--off); }
.calc-table td:last-child { color: var(--lime); font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; }
.prose .calc-table-note { font-size: 13px; }

.tool-faq .faq { max-width: 780px; }
.tool-faq .sec-head { margin-bottom: 24px; }
.tool-links { display: flex; flex-wrap: wrap; gap: 10px 28px; }

/* ---------- recipes ---------- */
.rc-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 30px; max-width: 760px; }
.rc-stat { padding: 16px 18px; border-radius: 18px; background: var(--surface); border: 1px solid rgba(255,255,255,0.06); }
.rc-stat b { display: block; font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 32px; line-height: 1.1; color: var(--lime); }
.rc-stat span { font-size: 13px; color: var(--muted); }
.rc-sec { padding-top: 64px; }
.rc-sec .sec-head { margin-bottom: 24px; }
.rc-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.rc-card {
  display: flex; flex-direction: column; min-width: 0;
  background: var(--surface); border: 1px solid rgba(255,255,255,0.06); border-radius: 18px; padding: 18px 18px 16px;
  transition: transform 0.35s var(--ease), border-color 0.35s var(--ease);
}
.rc-card:hover { transform: translateY(-4px); border-color: rgba(203,255,71,0.35); }
.rc-card h3 {
  font-family: "Kanit", sans-serif; font-style: italic; font-weight: 700; text-transform: uppercase;
  font-size: 17px; line-height: 1.15; color: var(--off); margin: 8px 0 12px; flex: 1; overflow-wrap: break-word;
}
.rc-big { display: flex; align-items: baseline; gap: 3px; margin-bottom: 8px; }
.rc-big b { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 40px; line-height: 1; color: var(--lime); }
.rc-big span { font-family: "Kanit", sans-serif; font-style: italic; font-weight: 800; font-size: 18px; color: var(--off); }
.rc-big em { font-style: normal; font-size: 12px; color: var(--muted); margin-left: 6px; }
.rc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.rc-tags span { font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; color: var(--lime); border: 1px solid rgba(203,255,71,0.35); }
.rc-fine { font-size: 13px; color: var(--muted); margin: 0; }

@media (max-width: 960px) {
  .calc-grid { grid-template-columns: 1fr; }
  .calc-inputs { position: static; }
  /* phone/tablet: the number first, then the inputs that move it, then the detail */
  .calc-results { display: contents; }
  .calc-hero { order: -1; }
  .rc-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 560px) {
  .calc-card { padding: 16px; border-radius: 20px; }
  .rc-stats { grid-template-columns: 1fr; }
  .rc-stat { display: flex; align-items: baseline; gap: 12px; }
  .ch-legend b { font-size: 18px; }
  .rc-grid { gap: 10px; }
  .rc-card { padding: 14px; }
  .rc-card h3 { font-size: 15px; }
  .rc-big b { font-size: 32px; }
  .calc-table th, .calc-table td { padding: 10px 8px; }
}
@media (max-width: 380px) {
  .rc-grid { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
  .ch-bar i, .cz-band, .cz-mark, .cd-meals i { transition: none; }
}

/* 320 px phones (long IT/DE goal labels): fieldsets default to
   min-inline-size: min-content and pushed the form out of the card. */
.field { min-width: 0; min-inline-size: 0; }
.seg { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.seg-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.seg > * { min-width: 0; overflow-wrap: anywhere; }
@media (max-width: 360px) {
  .seg > * { font-size: 12px; padding-left: 4px; padding-right: 4px; }
}
