.agent-shell { width: min(1240px, calc(100% - 48px)); }
.agent-hero {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, 0.65fr);
  gap: clamp(30px, 6vw, 84px);
  align-items: center;
  margin: 28px 0 0;
  padding: clamp(30px, 6vw, 70px);
  color: #f5f7f2;
  background: #314e56;
  overflow: hidden;
}
.agent-hero::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 8px;
  background: #e96537;
  content: "";
}
.agent-hero-copy { position: relative; z-index: 1; max-width: 700px; }
.agent-eyebrow, .agent-kicker {
  margin: 0 0 12px;
  color: #6fb7a4;
  font-size: 12px;
  font-weight: 750;
}
.agent-eyebrow { display: flex; align-items: center; gap: 9px; color: #c4dbd1; }
.agent-eyebrow span { width: 8px; height: 8px; background: #e96537; border-radius: 50%; }
.agent-hero h1 {
  max-width: 620px;
  margin: 0;
  font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif;
  font-size: clamp(42px, 7vw, 78px);
  line-height: 0.98;
  letter-spacing: -0.052em;
}
.agent-hero-copy > p:not(.agent-eyebrow) { max-width: 600px; margin: 20px 0 0; color: #d5e1dc; font-size: 16px; line-height: 1.65; }
.agent-hero-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 18px; margin-top: 27px; }
.agent-button { display: inline-flex; min-height: 44px; align-items: center; padding: 10px 15px; font-size: 13px; font-weight: 750; text-decoration: none; }
.agent-button--bright { color: #1b3038; background: #e9b765; }
.agent-button--bright:hover { background: #f2ca83; }
.agent-text-link { color: #e9f0ec; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
.discovery-panel { position: relative; z-index: 1; padding: 18px; color: #1b3038; background: #f5f7f2; border-top: 3px solid #e96537; }
.discovery-panel-top { display: flex; align-items: center; gap: 8px; padding-bottom: 13px; border-bottom: 1px solid #c9d5ce; color: #60777b; font-size: 11px; font-weight: 700; }
.discovery-panel-top a { margin-left: auto; color: #314e56; text-underline-offset: 3px; }
.connection-light { width: 8px; height: 8px; background: #4a8e7f; border-radius: 50%; }
.discovery-panel p { margin: 14px 0 8px; color: #52696d; font-size: 12px; line-height: 1.5; }
.discovery-panel .discovery-url { display: block; overflow-wrap: anywhere; padding: 10px; color: #e7f0eb; background: #1b3038; font-family: Consolas, "Courier New", monospace; font-size: 12px; }
.discovery-links { display: flex; flex-wrap: wrap; gap: 8px 14px; margin-top: 13px; }
.discovery-links a { color: #314e56; font-family: Consolas, "Courier New", monospace; font-size: 10px; font-weight: 700; text-underline-offset: 3px; }
.agent-sequence, .game-directory-section, .agent-resources { padding: 45px 0; border-bottom: 1px solid var(--line); }
.section-heading { max-width: 700px; margin-bottom: 24px; }
.section-heading h2, .connect-intro h2 { margin: 0; font-family: Bahnschrift, "Arial Narrow", "Segoe UI", sans-serif; font-size: clamp(28px, 4vw, 42px); line-height: 1.08; letter-spacing: -0.04em; }
.agent-kicker { margin-bottom: 9px; color: #4a8e7f; }
.sequence-list { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 0; margin: 29px 0 0; padding: 0; list-style: none; }
.sequence-list::before { position: absolute; top: 17px; right: 10%; left: 10%; height: 1px; background: #9cb6ab; content: ""; }
.sequence-list li { position: relative; padding: 0 22px 0 0; }
.sequence-index { position: relative; display: grid; width: 35px; height: 35px; place-items: center; color: white; background: #2c7c9c; border: 4px solid var(--paper); border-radius: 50%; font-family: Consolas, monospace; font-size: 9px; font-weight: 700; }
.sequence-list h3 { margin: 16px 0 7px; font-size: 15px; letter-spacing: -0.015em; }
.sequence-list p { max-width: 245px; margin: 0; color: #52696d; font-size: 13px; line-height: 1.58; }
.sequence-list code, .connect-intro code, .code-panel p code, .game-directory code { color: #314e56; font-family: Consolas, "Courier New", monospace; font-size: 0.92em; }
.game-directory-section { padding-top: 40px; }
.game-heading { display: flex; justify-content: space-between; align-items: end; gap: 20px; max-width: none; }
.game-heading #games-status { max-width: 260px; margin: 0 0 4px; color: #60777b; font-size: 12px; line-height: 1.5; text-align: right; }
.game-heading #games-status[data-kind="error"] { color: #8f3d28; }
.game-directory { margin: 0; padding: 0; border-top: 1px solid #9eb2aa; list-style: none; }
.game-row { display: grid; grid-template-columns: minmax(180px, 1.05fr) minmax(140px, 0.85fr) minmax(150px, 1fr) minmax(170px, 1.2fr); gap: 16px; align-items: center; min-height: 76px; padding: 12px 9px; border-bottom: 1px solid #b9c9c1; }
.game-row-title { display: flex; align-items: center; gap: 10px; }
.game-format-mark { width: 7px; height: 33px; background: #2c7c9c; }
.game-row[data-format="solo"] .game-format-mark { background: #e96537; }
.game-row-title strong { display: block; font-size: 14px; }
.game-row-title small, .game-row-detail small { display: block; margin-top: 3px; color: #60777b; font-size: 11px; }
.game-row-detail { color: #435e64; font-size: 12px; }
.game-row-links { display: flex; flex-wrap: wrap; gap: 8px 13px; justify-content: flex-end; }
.game-row-links a { color: #314e56; font-size: 11px; font-weight: 700; text-underline-offset: 3px; }
.game-load-error { padding: 14px 0; color: #8f3d28; font-size: 13px; }
.agent-connect { display: grid; grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.2fr); gap: clamp(25px, 6vw, 78px); align-items: start; padding: 43px 0; border-bottom: 1px solid var(--line); }
.connect-intro > p:not(.agent-kicker) { max-width: 420px; margin: 14px 0; color: #52696d; font-size: 14px; line-height: 1.65; }
.connect-intro > .connect-reachability { padding-left: 12px; border-left: 2px solid #d6a34d; font-size: 12px; }
.connect-intro > a { color: #314e56; font-size: 13px; font-weight: 700; text-underline-offset: 4px; }
.code-panel { min-width: 0; padding: 16px 18px 14px; background: #f5f7f2; border: 1px solid #b9c9c1; border-top: 3px solid #2c7c9c; }
.code-panel-heading { display: flex; align-items: center; justify-content: space-between; color: #52696d; font-size: 12px; font-weight: 700; }
.copy-code { padding: 6px 9px; color: #314e56; background: transparent; border: 1px solid #9eb2aa; border-radius: 2px; font-size: 11px; font-weight: 700; cursor: pointer; }
.copy-code:hover { background: #e4ece7; }
.code-panel pre { overflow-x: auto; margin: 12px 0; padding: 13px; color: #e7f0eb; background: #1b3038; font-size: 11px; line-height: 1.65; tab-size: 2; }
.code-panel pre code { font-family: Consolas, "Courier New", monospace; }
.code-panel p { margin: 0; color: #52696d; font-size: 12px; line-height: 1.55; }
.agent-resources { padding-top: 41px; }
.resource-rail { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border-top: 1px solid #9eb2aa; border-bottom: 1px solid #9eb2aa; }
.resource-rail a { display: flex; min-height: 128px; flex-direction: column; align-items: flex-start; padding: 16px 18px 16px 0; color: inherit; text-decoration: none; }
.resource-rail a + a { padding-left: 18px; border-left: 1px solid #b9c9c1; }
.resource-rail a:hover strong { text-decoration: underline; text-underline-offset: 4px; }
.resource-rail span { margin-bottom: 13px; color: #4a8e7f; font-family: Consolas, "Courier New", monospace; font-size: 10px; font-weight: 700; }
.resource-rail strong { font-size: 13px; }
.resource-rail small { max-width: 205px; margin-top: 6px; color: #60777b; font-size: 11px; line-height: 1.45; }
.agent-footer { display: flex; justify-content: space-between; gap: 14px; padding-top: 22px; color: #60777b; font-size: 12px; }
.agent-footer a { color: #314e56; font-weight: 700; }
.agent-shell a:focus-visible, .agent-shell button:focus-visible { outline: 3px solid #204df5; outline-offset: 3px; }

@media (max-width: 850px) {
  .agent-shell { width: min(calc(100% - 32px), 760px); }
  .agent-hero { grid-template-columns: 1fr; gap: 25px; }
  .discovery-panel { max-width: 530px; }
  .sequence-list { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 28px; }
  .sequence-list::before { display: none; }
  .game-row { grid-template-columns: minmax(160px, 1fr) minmax(130px, 0.8fr); }
  .game-row-links { justify-content: flex-start; }
  .resource-rail { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .resource-rail a:nth-child(3) { padding-left: 0; border-left: 0; border-top: 1px solid #b9c9c1; }
  .resource-rail a:nth-child(4) { border-top: 1px solid #b9c9c1; }
}

@media (max-width: 620px) {
  .agent-shell { width: min(100% - 32px, 560px); }
  .account-header { flex-wrap: wrap; gap: 9px 14px; padding: 10px 0; }
  .account-header nav { flex-wrap: wrap; justify-content: flex-end; gap: 9px 13px; margin-left: auto; font-size: 12px; }
  .agent-hero { margin-top: 18px; padding: 27px 22px; }
  .agent-hero h1 { font-size: clamp(40px, 12vw, 58px); }
  .agent-hero-copy > p:not(.agent-eyebrow) { font-size: 14px; }
  .agent-sequence, .game-directory-section, .agent-resources { padding: 33px 0; }
  .sequence-list { grid-template-columns: 1fr; gap: 20px; }
  .sequence-list li { display: grid; grid-template-columns: 38px 1fr; gap: 10px; padding: 0; }
  .sequence-list h3 { margin: 3px 0 5px; }
  .game-heading { display: block; }
  .game-heading #games-status { margin-top: 10px; text-align: left; }
  .game-row { grid-template-columns: 1fr; gap: 9px; padding: 15px 3px; }
  .game-row-detail { padding-left: 17px; }
  .game-row-links { padding-left: 17px; }
  .agent-connect { grid-template-columns: 1fr; gap: 22px; padding: 33px 0; }
  .resource-rail a { min-height: 120px; padding-right: 10px; }
  .resource-rail a + a { padding-left: 12px; }
  .resource-rail a:nth-child(3) { padding-left: 0; }
  .agent-footer { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .agent-shell *, .agent-shell *::before, .agent-shell *::after { scroll-behavior: auto !important; }
}
