.agent-guide {
  --divider: #cbd9cd;
  --leaf: #276849;
}

.agent-guide section[id] { scroll-margin-top: 1.5rem; }
.agent-intro, .example-section, .access-guide {
  display: grid;
  align-items: center;
  gap: clamp(2rem, 5vw, 4.5rem);
}
.agent-intro {
  grid-template-columns: 1fr 1fr;
  padding-block: clamp(2.5rem, 5.5vw, 5rem);
}
.agent-intro h1 { margin: 0 0 1.25rem; font-size: clamp(3rem, 6.1vw, 5.75rem); }
.agent-intro h1 em { display: inline-block; }
.agent-intro .lead { max-width: 36rem; margin-bottom: 1.65rem; font-size: 1.12rem; }
.guide-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 1rem 1.5rem; }
.agent-guide .button-primary { background: #217245; box-shadow: none; }
.guide-link { display: inline-block; font-weight: 700; color: var(--leaf); text-decoration: underline; text-underline-offset: .24em; }

.protein-card {
  border-radius: 1.6rem;
  padding: clamp(1.35rem, 3vw, 2.4rem);
  background: #173c2f;
  color: #f3f7ed;
}
.protein-card p { margin: 0; color: inherit; }
.protein-card .sample-period {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .25rem 1rem;
  color: #daeadc;
  font-size: .875rem;
}
.sample-period strong { font-weight: 650; }
.protein-card .sample-question { margin: 1.35rem 0 .45rem; font-size: clamp(1rem, 1.6vw, 1.25rem); }
.protein-card .peak-value { color: #ccf0ab; font: 500 clamp(3.2rem, 5vw, 4.4rem)/1 Georgia, 'Songti SC', serif; }
.peak-value span { font-size: .4em; }
.protein-card .peak-day { margin-top: .35rem; color: #daeadc; font-size: .95rem; }
.protein-bars {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  list-style: none;
  padding: 0;
  margin: 1.3rem 0 0;
}
.protein-bars li { display: grid; text-align: center; gap: .4rem; font-size: .875rem; font-variant-numeric: tabular-nums; }
.protein-bars .track {
  height: 5.7rem;
  display: flex;
  align-items: end;
  justify-content: center;
  border-bottom: 1px solid #729580;
}
.protein-bars .bar { width: min(58%, 2.2rem); border-radius: .32rem .32rem 0 0; background: #81ac95; }
.protein-bars .peak { background: #c5eaa7; }
.protein-bars .empty { color: #b7d0bf; line-height: 1.15; }

.trial-section {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 5fr);
  align-items: start;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  margin-bottom: clamp(2rem, 4vw, 3.5rem);
  padding: clamp(1.25rem, 3.7vw, 3rem);
  background: #e6efe4;
  border-radius: 1.5rem;
}
.trial-card {
  min-width: 0;
  padding: clamp(1rem, 2.6vw, 2rem);
  border-radius: 1.15rem;
  background: #fffefa;
  border: 1px solid var(--divider);
}
.trial-card blockquote {
  margin: 0 0 1.2rem;
  font-size: clamp(1.15rem, 2vw, 1.55rem);
  line-height: 1.4;
  font-weight: 600;
}
.trial-card button[hidden] { display: none; }
.trial-card #copy-result { margin: .55rem 0 .85rem; font-size: .92rem; color: var(--leaf); }
.trial-card #copy-result:empty { margin: 0 0 .85rem; }
.trial-card details { border-top: 1px solid var(--divider); }
.trial-card summary { padding-block: .75rem; cursor: pointer; font-weight: 650; }
.trial-card summary::marker { color: var(--leaf); }
.trial-card textarea {
  display: block;
  width: 100%;
  margin-bottom: .8rem;
  resize: vertical;
  border: 1px solid var(--divider);
  border-radius: .65rem;
  padding: .7rem;
  background: #faf9f4;
  color: inherit;
  font: 1rem/1.5 var(--body);
}
.trial-card :is(button, summary, textarea):focus-visible { outline: 3px solid var(--leaf); outline-offset: 3px; }
.trial-card details p { margin: 0 0 .55rem; }

.connect-section { border-top: 1px solid var(--divider); padding-top: 2.5rem; }
.agent-guide h2 { margin-bottom: 1.25rem; font-size: clamp(1.9rem, 3.3vw, 3.05rem); }
.agent-guide h3 { margin: 0 0 .5rem; font-size: 1.22rem; letter-spacing: -.02em; }
.connect-steps {
  list-style: decimal;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  padding: 0;
  margin: 1.6rem 0 0;
  gap: clamp(1.5rem, 3vw, 3rem);
}
.connect-steps li { margin-inline-start: 1.5rem; padding-inline-start: .15rem; }
.connect-steps li::marker { color: var(--leaf); font-weight: 700; }
.connect-steps p, .access-topics p { margin: 0; }
.agent-guide code { font-size: .95em; }

.example-section {
  grid-template-columns: minmax(0, 2fr) minmax(0, 3fr);
  align-items: start;
  padding-block: clamp(3rem, 6vw, 5.5rem);
}
.week-copy { padding-top: .75rem; }
.week-copy > p { max-width: 34rem; }
.week-sheet {
  min-width: 0;
  padding: clamp(.7rem, 2.4vw, 1.85rem);
  border-radius: 1.3rem;
  border: 1px solid var(--divider);
  background: #fffefa;
  font-variant-numeric: tabular-nums;
}
.week-sheet table { width: 100%; border-collapse: collapse; text-align: right; font-size: 1rem; }
.week-sheet caption { padding-bottom: .85rem; text-align: left; color: var(--leaf); font-size: .94rem; font-weight: 650; }
.week-sheet :is(th,td) { border-bottom: 1px solid var(--divider); padding: .65rem .2rem; }
.week-sheet th:first-child { text-align: left; }
.week-sheet thead th { vertical-align: top; font-weight: 650; font-size: .875rem; }
.week-sheet th small { display: block; font-weight: 500; font-size: .8rem; }
.week-sheet tbody th { white-space: nowrap; font-weight: 600; }
.week-sheet .table-note { margin: .9rem 0 0; font-size: .9rem; }
.access-guide { grid-template-columns: .8fr 2fr; align-items: start; border-block: 1px solid var(--divider); padding-block: 2.25rem; }
.access-topics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 2rem; }

@media (max-width: 800px) {
  .agent-intro, .trial-section, .example-section, .access-guide { grid-template-columns: minmax(0, 1fr); }
  .agent-intro { gap: 1.65rem; }
  .agent-intro .lead { max-width: 42rem; }
  .example-section, .access-guide { gap: 1rem; }
  .access-guide h2 { margin-bottom: .5rem; }
}
@media (max-width: 620px) {
  .connect-steps, .access-topics { grid-template-columns: minmax(0, 1fr); gap: 1.3rem; }
  .week-sheet table { font-size: .9rem; }
  .week-sheet :is(th,td) { padding-inline: .1rem; }
  .week-sheet thead th { font-size: .84rem; }
  .week-copy { padding-top: 0; }
}
