/* ==========================================================
   SETUP PAGE
   Page-specific styling layered on top of v2.css
   ========================================================== */

.setup-page {
  background: var(--paper);
}

.setup-page main {
  overflow: hidden;
}

/* ----------------------------------------------------------
   HERO
   ---------------------------------------------------------- */

.setup-hero {
  padding:
    88px max(24px, calc((100vw - 1180px) / 2)) 92px;

  color: white;

  background:
    radial-gradient(circle at 82% 25%, rgba(25, 183, 122, .20), transparent 28%),
    radial-gradient(circle at 10% 10%, rgba(57, 135, 246, .08), transparent 26%),
    var(--night);
}

.setup-hero-inner {
  max-width: 830px;
}

.setup-hero .eyebrow {
  color: var(--aqua);
}

.setup-hero h1 {
  max-width: 800px;
  font-size: clamp(2.8rem, 5vw, 4.8rem);
}

.setup-hero h1 em {
  color: var(--aqua);
  font-style: normal;
}

.setup-hero-lead {
  max-width: 720px;
  margin: 1.7rem 0 0;
  color: rgba(255, 255, 255, .70);
  font-size: clamp(1.05rem, 1.5vw, 1.22rem);
  line-height: 1.7;
}

.setup-hero-note {
  max-width: 700px;
  margin: 1.25rem 0 0;
  color: rgba(255, 255, 255, .46);
  font-size: .88rem;
}

/* ----------------------------------------------------------
   TRUST STRIP
   ---------------------------------------------------------- */

.setup-trust {
  padding:
    1.05rem max(24px, calc((100vw - 1180px) / 2));

  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 1.5rem;

  color: #d9e8e1;
  background: var(--night-2);

  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
}

.setup-trust span:not(:first-child)::before {
  content: "•";
  margin-right: 1.5rem;
  color: var(--green);
}

/* ----------------------------------------------------------
   GENERAL SETUP SECTIONS
   ---------------------------------------------------------- */

.setup-section {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: 96px 0;
}

.setup-section+.setup-section {
  border-top: 1px solid var(--line);
}

.setup-heading {
  max-width: 760px;
  margin-bottom: 3rem;
}

.setup-heading h2 {
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  line-height: 1.08;
}

.setup-heading>p:last-child {
  max-width: 700px;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

/* ----------------------------------------------------------
   INTERFACE PICKER
   ---------------------------------------------------------- */

.setup-picker {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.setup-choice {
  min-height: 365px;
  padding: 2rem;

  display: flex;
  flex-direction: column;

  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);

  box-shadow: 0 10px 40px rgba(15, 40, 33, .045);
}

.setup-choice.featured {
  color: white;
  border-color: var(--night-2);
  background: var(--night-2);
  box-shadow: var(--shadow);
}

.setup-choice h3 {
  margin: 2.5rem 0 .65rem;
  font-size: 1.55rem;
}

.setup-choice p {
  margin: 0 0 1.2rem;
  color: var(--ink-soft);
}

.setup-choice.featured p {
  color: rgba(255, 255, 255, .60);
}

.setup-choice ul {
  margin: 0 0 1.5rem;
  padding: 0;
  list-style: none;
  font-size: .9rem;
}

.setup-choice li {
  padding: .42rem 0;
  border-top: 1px solid #edf1ec;
}

.setup-choice.featured li {
  border-color: rgba(255, 255, 255, .1);
}

.setup-choice>a {
  margin-top: auto;
  color: var(--green-dark);
  font-weight: 800;
  text-decoration: none;
}

.setup-choice.featured>a {
  color: var(--aqua);
}

/* ----------------------------------------------------------
   CONNECTION MODEL
   ---------------------------------------------------------- */

.connection-panel {
  padding: 2.4rem;
  border: 1px solid #cfe4d8;
  border-radius: var(--radius);

  background:
    linear-gradient(120deg, #e5f4ec, #f7faf6);
}

.connection-flow {
  margin-top: 2rem;

  display: grid;
  grid-template-columns: 1fr auto 1fr auto 1fr;
  align-items: center;
  gap: 1rem;
}

.connection-node {
  min-height: 130px;
  padding: 1.5rem;

  display: grid;
  align-content: center;

  border: 1px solid var(--line);
  border-radius: 18px;
  background: white;

  text-align: center;
}

.connection-node strong {
  font-family: "Manrope", system-ui, sans-serif;
  font-size: 1.05rem;
}

.connection-node span {
  margin-top: .4rem;
  color: var(--ink-soft);
  font-size: .82rem;
}

.connection-arrow {
  color: var(--green-dark);
  font-size: 1.5rem;
  font-weight: 800;
}

/* ----------------------------------------------------------
   GUIDE LAYOUT
   ---------------------------------------------------------- */

.guide-header {
  margin-bottom: 3.5rem;

  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 2rem;
}

.guide-header-copy {
  max-width: 720px;
}

.guide-header h2 {
  margin: .4rem 0 0;
  font-size: clamp(2.15rem, 4vw, 3.6rem);
  line-height: 1.08;
}

.guide-header p {
  max-width: 680px;
  color: var(--ink-soft);
  font-size: 1.03rem;
}

.setup-guide {
  display: grid;
  gap: 1.2rem;
}

.setup-step {
  padding: 2rem;

  display: grid;
  grid-template-columns: 70px minmax(0, .86fr) minmax(320px, 1.14fr);
  gap: 1.6rem;
  align-items: center;

  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--card);

  box-shadow: 0 8px 32px rgba(15, 40, 33, .04);
}

.setup-step.no-image {
  grid-template-columns: 70px 1fr;
}

.step-number {
  width: 58px;
  height: 58px;

  display: grid;
  place-items: center;

  border-radius: 50%;
  color: var(--green-dark);
  background: #dff2e9;

  font: 800 .9rem/1 "Manrope", sans-serif;
  letter-spacing: .05em;
}

.step-copy h3 {
  margin: 0 0 .55rem;
  font-size: 1.3rem;
}

.step-copy p {
  margin: .5rem 0;
  color: var(--ink-soft);
}

.setup-shot {
  margin: 0;
  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 16px;

  background: #f8faf8;
  box-shadow: 0 16px 38px rgba(10, 30, 25, .08);
}

.shot-bar {
  min-height: 36px;
  padding: 0 .85rem;

  display: flex;
  align-items: center;
  gap: .35rem;

  color: #71807b;
  border-bottom: 1px solid var(--line);

  font-size: .65rem;
}

.shot-bar span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #bac4c0;
}

.shot-bar strong {
  margin-left: auto;
  font-weight: 600;
}

.setup-shot img {
  width: 100%;
  max-height: 500px;
  object-fit: contain;
  background: white;
}

.setup-shot figcaption {
  padding: .7rem .9rem;
  color: #71807b;
  font-size: .74rem;
}

.setup-shot.narrow {
  max-width: 360px;
}

/* ----------------------------------------------------------
   CODE / STARTER COMMANDS
   ---------------------------------------------------------- */

.command-box {
  margin-top: 1rem;
  padding: 1rem 1.1rem;

  overflow-x: auto;

  color: #dcece6;
  background: var(--night);

  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;

  font: 500 .86rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.command-box code {
  color: inherit;
}

/* ----------------------------------------------------------
   AI ACCESS
   ---------------------------------------------------------- */

.ai-access {
  margin-top: 2rem;
  padding: 2rem;

  border: 1px solid var(--line);
  border-radius: var(--radius);

  background: #fff;
}

.ai-access h3 {
  margin-top: 0;
  font-size: 1.45rem;
}

.ai-grid {
  margin-top: 1.5rem;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.ai-option {
  padding: 1.4rem;

  border: 1px solid var(--line);
  border-radius: 16px;
  background: #f8faf7;
}

.ai-option h4 {
  margin: 0 0 .6rem;
  font-family: "Manrope", system-ui, sans-serif;
}

.ai-option p,
.ai-option li {
  color: var(--ink-soft);
  font-size: .88rem;
}

.command-box code {
  display: block;
  white-space: pre-line;
}

/* ----------------------------------------------------------
   READY / CTA
   ---------------------------------------------------------- */

.setup-ready {
  width: 100%;
  padding: 88px max(24px, calc((100vw - 1180px) / 2));

  color: white;
  background:
    radial-gradient(circle at 75% 40%, rgba(25, 183, 122, .17), transparent 30%),
    var(--night);
}

.setup-ready-inner {
  max-width: 850px;
}

.setup-ready .eyebrow {
  color: var(--aqua);
}

.setup-ready h2 {
  margin: 0;
  font-size: clamp(2.2rem, 4vw, 3.8rem);
  line-height: 1.08;
}

.setup-ready p {
  max-width: 700px;
  color: rgba(255, 255, 255, .62);
  font-size: 1.05rem;
}

.starter-commands {
  margin-top: 2rem;

  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: .8rem;
}

.starter-commands code {
  padding: 1rem;

  display: block;

  border: 1px solid rgba(255, 255, 255, .12);
  border-radius: 12px;

  color: #e5f6ef;
  background: rgba(255, 255, 255, .04);

  font-size: .82rem;
}

/* ----------------------------------------------------------
   TROUBLESHOOTING
   ---------------------------------------------------------- */

.troubleshooting {
  max-width: 900px;
}

.troubleshooting details {
  margin-bottom: .8rem;

  overflow: hidden;

  border: 1px solid var(--line);
  border-radius: 14px;
  background: white;
}

.troubleshooting summary {
  padding: 1.15rem 1.3rem;
  cursor: pointer;

  font-family: "Manrope", system-ui, sans-serif;
  font-weight: 700;
}

.trouble-content {
  padding: 0 1.3rem 1.3rem;
  color: var(--ink-soft);
}

.trouble-content p:first-child {
  margin-top: 0;
}

.trouble-content li {
  margin-bottom: .55rem;
}

.support-note {
  margin-top: 1.2rem;
  padding: 1.2rem 1.3rem;

  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;

  background: #edf6f1;
}

/* ----------------------------------------------------------
   DATA QUALITY
   ---------------------------------------------------------- */

.utility-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
}

.utility-card {
  padding: 1.8rem;

  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: white;
}

.utility-card h3 {
  margin-top: 0;
}

.utility-card p,
.utility-card li {
  color: var(--ink-soft);
}


/* ----------------------------------------------------------
   EMBEDDED INTERVALS.ICU GUIDE
   ---------------------------------------------------------- */

.embedded-markdown {
  max-width: 900px;
}

.embedded-markdown h1 {
  display: none;
}

.embedded-markdown h2 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.embedded-markdown h3 {
  margin-top: 2rem;
}

.embedded-markdown p,
.embedded-markdown li {
  color: var(--ink-soft);
  line-height: 1.7;
}

.embedded-markdown ul,
.embedded-markdown ol {
  padding-left: 1.4rem;
}

.embedded-markdown pre {
  margin: 1.5rem 0;
  padding: 1rem 1.2rem;
  overflow-x: auto;
  color: #dcece6;
  background: var(--night);
  border-radius: 14px;
  font: 500 .86rem/1.7 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}

.embedded-markdown blockquote {
  margin: 1.5rem 0;
  padding: 1rem 1.3rem;
  border-left: 4px solid var(--green);
  border-radius: 0 12px 12px 0;
  background: #edf6f1;
}

.embedded-markdown a {
  color: var(--green-dark);
  font-weight: 700;
}

.embedded-markdown hr {
  margin: 3rem 0;
  border: 0;
  border-top: 1px solid var(--line);
}

/* ----------------------------------------------------------
   MOBILE
   ---------------------------------------------------------- */

@media (max-width: 900px) {

  .setup-picker,
  .ai-grid,
  .starter-commands,
  .utility-grid {
    grid-template-columns: 1fr;
  }

  .connection-flow {
    grid-template-columns: 1fr;
  }

  .connection-arrow {
    transform: rotate(90deg);
    text-align: center;
  }

  .setup-step {
    grid-template-columns: 58px 1fr;
  }

  .setup-step .setup-shot {
    grid-column: 1 / -1;
  }

  .guide-header {
    display: block;
  }
}

@media (max-width: 680px) {
  .setup-hero {
    padding-top: 65px;
    padding-bottom: 65px;
  }

  .setup-section {
    width: min(100% - 28px, 1180px);
    padding: 70px 0;
  }

  .setup-trust {
    display: grid;
    justify-content: start;
  }

  .setup-trust span:not(:first-child)::before {
    display: none;
  }

  .setup-step,
  .setup-step.no-image {
    padding: 1.3rem;
    grid-template-columns: 46px 1fr;
    gap: 1rem;
  }

  .step-number {
    width: 44px;
    height: 44px;
    font-size: .72rem;
  }

  .connection-panel {
    padding: 1.4rem;
  }
}

/* ----------------------------------------------------------
   GUIDE PAGES
   Each guide page opens with an h1, styled like the h2 it was
   on the one-page guide.
   ---------------------------------------------------------- */

.setup-heading h1 {
  max-width: none;
  margin: 0;
  font-size: clamp(2.1rem, 4vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
}

.guide-header h1 {
  max-width: none;
  margin: .4rem 0 0;
  font-size: clamp(2.15rem, 4vw, 3.6rem);
  font-weight: 700;
  line-height: 1.08;
}

.setup-picker + .hub-callout {
  margin: 1.5rem 0 0;
}

/* ----------------------------------------------------------
   SETUP MENU
   A row of links to every setup page, under the site header.
   It stays visible on phones, where the header links are hidden.
   ---------------------------------------------------------- */

.setup-subnav {
  display: block;
  border-bottom: 1px solid rgba(255, 255, 255, .08);
  background: var(--night-2);
}

.setup-subnav .setup-subnav-inner {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  padding: .85rem 0;

  display: flex;
  flex-wrap: wrap;
  gap: .5rem 1.6rem;
}

.setup-subnav .setup-subnav-inner a {
  display: inline-block;
  color: rgba(255, 255, 255, .76);
  font-size: .86rem;
  font-weight: 600;
  text-decoration: none;
}

.setup-subnav .setup-subnav-inner a:hover {
  color: white;
}

.setup-subnav .setup-subnav-inner a[aria-current="page"] {
  color: var(--aqua);
}

@media (max-width: 680px) {
  .setup-subnav .setup-subnav-inner {
    width: min(100% - 28px, 1180px);
    gap: .45rem 1.1rem;
  }

  .setup-subnav .setup-subnav-inner a {
    font-size: .8rem;
  }
}
