.ak-kitchen {
  --ak-ink: #242520;
  --ak-paper: #fbfaf7;
  --ak-forest: #30312c;
  --ak-lime: #ecebe3;
  --ak-sage: #95958b;
  --ak-light-rule: #dad8ce;
  --ak-muted: #605f57;
  --ak-reverse-muted: #d8d7ce;
  --ak-display: Unbounded, Inter, "Segoe UI", sans-serif;
  color: var(--ak-ink);
  background: #fffefa;
  border-top: 1px solid var(--ak-light-rule);
  padding-block: clamp(2.8rem, 6vw, 6.25rem);
  scroll-margin-top: 3.25rem;
}
.ak-kitchen [hidden] { display: none !important; }
.ak-kitchen > .wrap { container: demo / inline-size; }
.ak-kitchen-intro {
  display: flex;
  flex-wrap: wrap;
  gap: 1.1rem 2rem;
  align-items: center;
  justify-content: space-between;
  margin-bottom: clamp(1.2rem,2.2vw,2.4rem);
}
.ak-switch {
  display: inline-flex;
  max-width: 100%;
  padding: 3px;
  border: 1px solid #b7bcad;
  border-radius: 2rem;
}
.ak-switch button {
  min-height: 44px;
  padding: .48rem 1rem;
  border: 0;
  border-radius: 1.75rem;
  color: var(--ak-ink);
  background: transparent;
  font-size: .91rem;
  font-weight: 550;
  line-height: 1.2;
}
.ak-switch button[aria-selected="true"] {
  background: var(--ak-forest);
  color: var(--ak-paper);
}
.ak-kitchen-label, .ak-chat-mode, .ak-byline, .ak-split-controls label {
  font-size: .83rem;
  font-weight: 600;
  line-height: 1.4;
}
.ak-kitchen .ak-kitchen-label, .ak-chat-mode {
  margin: 0 0 .65rem;
  letter-spacing: .01em;
}
.ak-kitchen-intro .ak-kitchen-label, .ak-chat-mode, .ak-byline {
  color: var(--ak-muted);
}
.ak-kitchen h3, .ak-kitchen .ak-chat-answer h4 {
  font-family: var(--body);
  font-weight: 650;
  letter-spacing: -.045em;
  text-wrap: balance;
}
.ak-kitchen h2 {
  margin: 0;
  font: 600 clamp(1.9rem,1.15rem + 3.25vw,4rem)/1.06 var(--ak-display);
  letter-spacing: -.05em;
  text-transform: uppercase;
  text-wrap: balance;
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
}
.ak-kitchen-grid {
  display: grid;
  gap: 1rem;
}
.ak-scenario {
  display: grid;
  grid-template-columns: minmax(0,.86fr) minmax(0,1.14fr);
  gap: clamp(1.5rem,4vw,5.5rem);
  align-items: start;
  min-width: 0;
  padding: clamp(1.25rem,3.65vw,3.8rem);
  border-radius: 1.4rem;
  overflow-wrap: break-word;
  scroll-margin-top: 4.3rem;
}
.ak-chat {
  background: var(--ak-paper);
  border: 1px solid var(--ak-light-rule);
}
.ak-kitchen h3 {
  margin: 0;
  font-size: clamp(1.55rem,2.6vw,2.8rem);
  line-height: 1.07;
}
.ak-diary {
  --ak-consumed:44.739%;
  grid-template-columns:minmax(0,1.25fr) minmax(0,1fr);
  gap:0;
  padding:0;
  border-radius:.85rem;
  border:1px solid var(--ak-light-rule);
  align-items:stretch;
}
.ak-day-entry {
  display:grid;
  grid-template-columns:minmax(0,.95fr) minmax(0,1fr);
  grid-template-areas:"photo meal" "photo macros" "photo action";
  align-content:center;
  align-items:center;
  column-gap:clamp(1rem,2.2vw,2.25rem);
  row-gap:1.25rem;
  padding:clamp(1.3rem,2.65vw,3rem);
}
.ak-day-photo {grid-area:photo;display:block;width:100%;height:auto;margin:auto;max-width:17rem}
.ak-day-meal {grid-area:meal;min-width:0;align-self:end}
.ak-day-entry h3 {max-width:16ch}
.ak-diary .ak-kitchen-label {color:var(--ak-muted);font-weight:550}
.ak-day-serving {margin:.7rem 0 0;color:var(--ak-muted);font-size:1rem;line-height:1.45}
.ak-macros {display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:.5rem;margin:0}
.ak-macros dt {color:var(--ak-muted);font-size:.8rem;line-height:1.4}
.ak-macros dd {margin:.15rem 0 0;font-size:1.02rem;font-weight:650;line-height:1.25;font-variant-numeric:tabular-nums;white-space:nowrap}
.ak-meal-macros {grid-area:macros;width:100%;max-width:23rem}
.ak-day-macros {border-top:1px solid var(--ak-light-rule);padding-top:1rem}
.ak-day-macros .ak-kitchen-label {margin:0 0 .65rem}
.ak-diary .ak-day-action {
  grid-area:action;
  place-self:start;
  min-height: 46px;
  max-width: 100%;
  padding: .55rem 1.25rem;
  border: 1px solid var(--ak-forest);
  border-radius: 2rem;
  color: var(--ak-paper);
  background: var(--ak-forest);
  font-weight: 600;
  font-size: .92rem;
}
.ak-diary[data-recorded="true"] .ak-day-action { background: transparent; color: var(--ak-forest); }
.ak-day-balance {
  min-width:0;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:clamp(1rem,1.7vw,1.65rem);
  padding:clamp(1.4rem,3.15vw,3.35rem);
  color:var(--ak-ink);
  background:#f4f3ee;
  border-inline-start:1px solid var(--ak-light-rule);
  border-radius:0 .85rem .85rem 0;
}
.ak-day-balance .ak-kitchen-label {color:var(--ak-muted);margin-bottom:.55rem}
.ak-day-track {height:7px;background:#dadbd2;border-radius:4px;overflow:hidden}
.ak-day-track span {display:block;width:var(--ak-consumed);height:100%;background:#354d3b;border-radius:inherit}
.ak-day-meter p {margin:.4rem 0 0;color:var(--ak-muted);font-size:.85rem}
.ak-day-meter strong {font-variant-numeric:tabular-nums;color:var(--ak-ink);font-weight:650}
.ak-day-remaining {
  margin: 0;
  color: inherit;
  font-family: var(--ak-display);
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 600;
  font-size: clamp(2.35rem,4.55vw,4.9rem);
  line-height: 1.06;
  letter-spacing: -.05em;
}
.ak-day-remaining small {font:550 clamp(.9rem,1.2vw,1.2rem)/1 var(--body);letter-spacing:0}
.ak-day-stats {
  display: flex;
  justify-content: space-between;
  gap: .7rem;
  margin: 0;
}
.ak-day-stats div:last-child { text-align: right; }
.ak-day-stats dt { font-size: .83rem; color:var(--ak-muted); }
.ak-day-stats dd { margin: 0; font-size: 1rem; font-weight: 600; }
.ak-day-action:focus-visible { outline: 3px solid #75521c; outline-offset: 3px; }
.ak-chat-content {
  padding-inline-start: clamp(1.5rem,3vw,3rem);
  border-inline-start: 1px solid var(--ak-light-rule);
}
.ak-chat h3, .ak-portions h3 {
  max-width: 15ch;
  scroll-margin-top: 5rem;
}
.ak-kitchen .ak-chat-question {
  width: fit-content;
  max-width: 86%;
  margin: 0 0 clamp(1.25rem,2.2vw,2rem) auto;
  padding: .8rem 1.05rem;
  border: 1px solid var(--ak-light-rule);
  border-radius: 1rem 1rem .2rem 1rem;
  color: var(--ak-ink);
  background: #f0efe9;
  font-size: .93rem;
  line-height: 1.49;
}
.ak-byline {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .5rem;
}
.ak-byline img {
  width: 28px;
  height: 28px;
  border: 1px solid #d5d8c4;
  border-radius: 8px;
}
.ak-kitchen .ak-chat-answer h4 {
  margin: 0 0 .65rem;
  font-size: clamp(1.4rem,2vw,2.25rem);
  line-height: 1.1;
}
.ak-chat-answer p {
  max-width: 54ch;
  margin: 0 0 .55rem;
  color: var(--ak-ink);
  font-size: 1rem;
  line-height: 1.58;
}
.ak-chat-answer p:last-child { margin-bottom: 0; }
.ak-prompts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  margin-top: clamp(1.1rem,2vw,2rem);
}
.ak-kitchen button { font-family: inherit; touch-action: manipulation; }
.ak-chat .ak-prompts button {
  min-height: 44px;
  padding: .55rem .85rem;
  border: 1px solid #b5b3a9;
  border-radius: 2rem;
  color: var(--ak-ink);
  background: var(--ak-paper);
  font-size: .87rem;
  font-weight: 550;
  line-height: 1.3;
}
.ak-chat .ak-prompts button[aria-pressed="true"] {
  border-color: var(--ak-forest);
  background: var(--ak-forest);
  color: var(--ak-paper);
}
.ak-portions {
  color: var(--ak-paper);
  background: var(--ak-forest);
}
.ak-portions-body { min-width: 0; }
.ak-portions .ak-kitchen-label { color: var(--ak-lime); }
.ak-example-size {
  max-width: 49ch;
  margin: .7rem 0 0;
  color: var(--ak-reverse-muted);
  font-size: .98rem;
  line-height: 1.55;
}
.ak-distribution {
  display: grid;
  grid-template-columns: minmax(0, .9fr) minmax(0, 1fr);
  align-items: center;
  justify-content: space-between;
  gap: clamp(1.2rem,2.3vw,2.25rem);
  margin-bottom: 1.15rem;
  padding-bottom: 1.1rem;
  border-bottom: 1px solid #68685e;
}
.ak-dial {
  --ak-angle: 216deg;
  position: relative;
  display: grid;
  place-content: center;
  justify-items: center;
  isolation: isolate;
  overflow: clip;
  justify-self: center;
  width: min(100%, 12.5rem);
  aspect-ratio: 1;
  border-radius: 50%;
  color: var(--ak-paper);
}
.ak-dial::before, .ak-dial::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
}
.ak-dial::before {
  inset: 0;
  background: conic-gradient(var(--ak-lime) 0 calc(var(--ak-angle) - 1deg), var(--ak-forest) 0 calc(var(--ak-angle) + 1deg), var(--ak-sage) 0 359deg, var(--ak-forest) 0);
}
.ak-dial::after {
  inset: 6.6%;
  background: var(--ak-forest);
}
.ak-dial-label, .ak-dial-energy {
  color: var(--ak-reverse-muted);
  font-size: .8rem;
  line-height: 1.45;
}
.ak-dial strong, .ak-plate-weight {
  font-family: var(--body);
  font-weight: 650;
  font-variant-numeric: lining-nums tabular-nums;
  letter-spacing: -.055em;
  line-height: 1;
}
.ak-dial strong { font-size: clamp(2.45rem,4.25vw,5rem); }
.ak-dial strong small, .ak-plate-weight small { font-size: .5em; letter-spacing: 0; }
.ak-plate-grid { display: grid; gap: .75rem; }
.ak-plate { position: relative; padding-left: 1.12rem; }
.ak-plate::before {
  content: "";
  position: absolute;
  left: 0;
  top: .4rem;
  width: .56rem;
  height: .56rem;
  border-radius: 50%;
  background: var(--ak-lime);
}
.ak-plate + .ak-plate::before { background: var(--ak-sage); }
.ak-plate-label, .ak-plate-energy {
  margin: 0;
  color: var(--ak-reverse-muted);
  font-size: .87rem;
  line-height: 1.4;
}
.ak-plate-weight { margin: .07rem 0 .13rem; font-size: clamp(2.25rem,3.05vw,3.4rem); }
.ak-split-controls { margin-top: auto; }
.ak-split-controls label { color: var(--ak-paper); }
.ak-split-controls input[type="range"] {
  --ak-drag: 66.667%;
  appearance: none;
  -webkit-appearance: none;
  display: block;
  width: 100%;
  height: 44px;
  margin: .25rem 0 0;
  padding: 0;
  background: transparent;
  accent-color: var(--ak-lime);
  cursor: pointer;
}
.ak-split-controls input::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right,var(--ak-lime) var(--ak-drag),var(--ak-sage) var(--ak-drag));
}
.ak-split-controls input::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: var(--ak-sage);
}
.ak-split-controls input::-moz-range-progress { height: 4px; background: var(--ak-lime); }
.ak-split-controls input::-webkit-slider-thumb {
  appearance: none;
  -webkit-appearance: none;
  width: 23px;
  height: 23px;
  margin-top: -9.5px;
  border: 3px solid var(--ak-forest);
  border-radius: 50%;
  background: var(--ak-lime);
  box-shadow: 0 0 0 1px var(--ak-lime);
}
.ak-split-controls input::-moz-range-thumb {
  width: 17px;
  height: 17px;
  border: 3px solid var(--ak-forest);
  border-radius: 50%;
  background: var(--ak-lime);
  box-shadow: 0 0 0 1px var(--ak-lime);
}
.ak-split-controls input:disabled { opacity: .6; cursor: default; }
.ak-range-ends {
  display: flex;
  justify-content: space-between;
  color: var(--ak-reverse-muted);
  font-size: .8rem;
}
.ak-portions button.ak-portion-action {
  width: 100%;
  min-height: 48px;
  margin-top: 1.1rem;
  padding: .75rem 1rem;
  border: 1px solid var(--ak-lime);
  border-radius: 2rem;
  color: var(--ak-ink);
  background: var(--ak-lime);
  font-size: .95rem;
  font-weight: 650;
  line-height: 1.35;
}
.ak-kitchen .ak-result { margin: 0; font-size: .9rem; line-height: 1.5; }
.ak-result:not(:empty) { padding-top: .8rem; color: var(--ak-reverse-muted); }
.ak-portions[data-stage="complete"] .ak-result { color: var(--ak-lime); }
.ak-switch button:focus-visible, .ak-chat button:focus-visible, .ak-scenario:focus-visible {
  outline: 3px solid #75521c;
  outline-offset: 3px;
}
.ak-portions :is(button, input):focus-visible { outline: 3px solid #f9f3db; outline-offset: 4px; }
@media (hover: hover) and (pointer: fine) {
  .ak-diary .ak-day-action:hover { background: #45453e; color: white; }
  .ak-switch button[aria-selected="false"]:hover { background: #eeede7; }
  .ak-chat .ak-prompts button[aria-pressed="false"]:hover { background: #eeede7; }
  .ak-portions button.ak-portion-action:hover { background: #fff; }
}
@media (prefers-reduced-motion: no-preference) {
  .ak-kitchen button { transition: background-color .18s ease, color .18s ease; }
  .ak-day-track span {transition:width .3s ease-out}
  .ak-dial.is-visible::before {
    animation: ak-round-in .56s cubic-bezier(.23,1,.32,1) both;
  }
  @keyframes ak-round-in {
    from { opacity: .45; transform: rotate(-16deg); }
    to { opacity: 1; transform: rotate(0); }
  }
}
@media (max-width: 720px) {
  .ak-scenario { grid-template-columns: minmax(0,1fr); gap: 1.25rem; }
  .ak-chat-content { padding: 1.1rem 0 0; border-inline-start: 0; border-top: 1px solid var(--ak-light-rule); }
  .ak-chat h3, .ak-portions h3 { max-width: 21ch; }
  .ak-prompts { margin-top: .9rem; }
}
@media (max-width: 440px) {
  .ak-switch { width: 100%; }
  .ak-switch button { flex: 1; padding-inline: .45rem; font-size: .86rem; }
  .ak-scenario { padding: 1.25rem 1rem; border-radius: 1.1rem; }
  .ak-prompts { gap: .35rem; }
  .ak-chat .ak-prompts button { padding: .45rem .62rem; font-size: .84rem; }
  .ak-distribution { grid-template-columns: minmax(0,1fr) minmax(0,.85fr); gap: .7rem; }
  .ak-plate { padding-left: .9rem; }
  .ak-kitchen .ak-chat-question { max-width: 94%; }
}
@media (max-width: 350px) {
  .ak-dial-label, .ak-dial-energy { font-size: .75rem; }
  .ak-plate-label, .ak-plate-energy { font-size: .77rem; }
}
/* A narrow column or a larger preferred font leaves less room per word. */
@container demo (max-width: 15.5rem) {
  .ak-kitchen-intro { align-items: stretch; }
  #ak-kitchen-title { font-size: min(2rem,14cqi); }
  .ak-switch {
    display: grid;
    width: 100%;
    grid-template-columns: minmax(0,1fr);
    border-radius: .9rem;
  }
  .ak-switch button { border-radius: .72rem; }
  .ak-scenario { padding: 1rem clamp(.5rem,4cqi,1rem); }
  .ak-day-stats { display: grid; grid-template-columns: minmax(0,1fr); }
  .ak-day-stats div:last-child { text-align: left; }
  .ak-diary .ak-day-action { padding-inline: .65rem; }
  .ak-distribution { grid-template-columns: minmax(0,1fr); }
  .ak-dial { width: min(100%,7.5rem); }
  .ak-dial strong { font-size: 2.4rem; }
}
@container demo (max-width: 54rem) {
  .ak-scenario.ak-diary {grid-template-columns:minmax(0,1fr);padding:0;gap:0;border-radius:.85rem}
  .ak-day-entry {grid-template-columns:minmax(0,.8fr) minmax(0,1fr);gap:clamp(.8rem,4cqi,2.2rem);padding:clamp(1rem,4.5cqi,2rem)}
  .ak-day-entry h3 {max-width:18ch}
  .ak-day-photo {max-width:12rem}
  .ak-day-balance {padding:clamp(1rem,4.5cqi,2rem);border-inline-start:0;border-block-start:1px solid var(--ak-light-rule);border-radius:0 0 .85rem .85rem}
  .ak-day-serving {margin:.45rem 0 0;font-size:.94rem}
  .ak-day-remaining {font-size:clamp(2.2rem,9cqi,4rem)}
}
@container demo (min-width: 54.001rem) and (max-width: 72rem) {
  .ak-day-entry {grid-template-areas:"photo meal" "macros macros" "action action"}
}
@container demo (max-width: 28rem) {
  .ak-day-entry {grid-template-areas:"photo meal" "macros macros" "action action"}
  .ak-day-meal {align-self:center}
  .ak-diary .ak-day-action {place-self:stretch}
}
@container demo (max-width: 22rem) {
  .ak-day-entry {grid-template-columns:minmax(0,.75fr) minmax(0,1fr)}
  .ak-day-entry h3 {font-size:clamp(1.1rem,6.2cqi,1.55rem)}
  .ak-diary .ak-day-action {padding-inline:.75rem}
}
@container demo (max-width: 15.5rem) {
  .ak-day-entry {grid-template-columns:minmax(0,1fr);grid-template-areas:"photo" "meal" "macros" "action"}
  .ak-day-photo {max-width:7rem;margin-inline-start:0}
  .ak-macros {grid-template-columns:minmax(0,1fr);gap:.35rem}
  .ak-macros div {display:flex;align-items:baseline;justify-content:space-between;gap:.5rem;flex-wrap:wrap}
}
@media (forced-colors: active) {
  .ak-scenario { border: 1px solid CanvasText; }
  .ak-dial { border: 1px solid CanvasText; }
  .ak-chat .ak-prompts button[aria-pressed="true"] { border: 3px double Highlight; }
  .ak-switch button[aria-selected="true"] { outline: 2px solid Highlight; outline-offset: -3px; }
  .ak-split-controls input[type="range"] { appearance: auto; -webkit-appearance: auto; }
}
