/* TerraCloud links are secondary to TerraCode membership and deployment. */
.terracloud-external { display: inline-block; flex: 0 0 14px; vertical-align: -.12em; }
header[data-terracloud] :is(.nav__links, .tc-nav__links) { gap: 22px; }
header[data-terracloud] :is(.nav__links, .tc-nav__links) > a { white-space: nowrap; }
header[data-terracloud] a.terracloud-nav-link { display: inline-flex; align-items: center; gap: 6px; }
footer a.terracloud-footer-link .terracloud-external { margin-left: 6px; }
a:is(.terracloud-nav-link, .terracloud-footer-link, .terracloud-sidebar-link, .terracloud-card__button):focus-visible { outline: 2px solid #db502e; outline-offset: 4px; }

/* A normal link avoids changing the current member view or triggering a setup action. */
body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link {
  display: flex; align-items: center; gap: 12px; width: 100%; min-width: 0; min-height: 48px;
  padding: 14px 12px; border: 0; border-radius: 10px; background: transparent; color: #536271;
  font-family: inherit; font-size: 13px; font-weight: 500; line-height: 1.4; letter-spacing: 0;
  text-decoration: none; text-transform: none; white-space: normal; clip-path: none; box-sizing: border-box;
}
body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link > svg:first-child { flex: 0 0 20px; }
body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link > span { flex: 1 1 auto; }
body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link:hover { background: #f0f3f6; color: #10243b; }

.terracloud-guide-section { padding: 56px 0; background: #f8f9f8; border-bottom: 1px solid #dce2e7; }
.terracloud-card,
body.guided-deployment .terracloud-card {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 32px;
  margin: 28px 0 0; padding: 28px; border: 1px solid #dce2e7; border-top: 3px solid #10243b;
  border-radius: 14px; background: #fff; color: #10243b; box-shadow: none; box-sizing: border-box;
  font-family: "DM Sans", sans-serif;
}
.terracloud-guide-section .terracloud-card { margin: 0; }
.terracloud-card :is(.terracloud-card__copy, .terracloud-card__action) { min-width: 0; }
.terracloud-card p,
body.guided-deployment .terracloud-card p { color: #536271; font-size: 14px; line-height: 1.65; margin: 0; max-width: 66ch; }
.terracloud-card .terracloud-card__eyebrow,
body.guided-deployment .terracloud-card .terracloud-card__eyebrow { font-family: "Space Mono", monospace; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .1em; color: #b74526; }
.terracloud-card h3,
body.guided-deployment .terracloud-card h3 { color: #10243b; font-size: 26px; font-weight: 700; line-height: 1.2; letter-spacing: -.025em; text-transform: none; margin: 10px 0 12px; }
.terracloud-card .terracloud-card__note,
body.guided-deployment .terracloud-card .terracloud-card__note { margin-top: 12px; font-size: 12px; }
.terracloud-card .terracloud-card__action { display: grid; justify-items: start; gap: 12px; }
.terracloud-card .terracloud-card__action p,
body.guided-deployment .terracloud-card .terracloud-card__action p { font-size: 12px; line-height: 1.6; }
.terracloud-card a.terracloud-card__button,
body.guided-deployment .terracloud-card a.terracloud-card__button {
  display: inline-flex; justify-content: center; align-items: center; gap: 8px; min-height: 48px;
  max-width: 100%; padding: 12px 20px; border: 1px solid #10243b; border-radius: 999px;
  background: #10243b; color: #fff; box-shadow: none; clip-path: none; text-decoration: none;
  font-family: inherit; font-size: 13px; font-weight: 700; line-height: 1.4; letter-spacing: 0;
  text-transform: none; white-space: normal; box-sizing: border-box;
}
.terracloud-card a.terracloud-card__button:hover { background: #1c3853; }

@media (max-width: 1100px) {
  /* Collapse before the extra link can squeeze the logo or membership CTA. */
  header[data-terracloud] :is(.nav__inner, .tc-nav__inner) { position: relative; flex-wrap: nowrap; }
  header[data-terracloud] :is(.menu, .tc-nav__menu-button) { display: inline-flex !important; flex-direction: column; align-items: center; justify-content: center; flex: 0 0 48px; }
  header[data-terracloud] :is(.nav__links, .tc-nav__links) {
    display: none !important; position: absolute; left: 0; right: 0; top: calc(100% + 8px);
    width: auto; max-height: calc(100dvh - 120px); overflow-y: auto; padding: 12px;
    grid-template-columns: minmax(0, 1fr); gap: 4px; border: 1px solid #dce2e7;
    border-radius: 16px; background: #fff; box-shadow: 0 8px 24px rgba(16,36,59,.06);
  }
  header[data-terracloud][data-open="true"] .nav__links,
  header[data-terracloud][data-menu-open="true"] .tc-nav__links { display: grid !important; }
  header[data-terracloud] :is(.nav__links, .tc-nav__links) > a { display: flex; align-items: center; min-height: 44px; padding: 10px 14px; margin: 0; font-size: 14px; }
  header[data-terracloud] :is(.nav__links, .tc-nav__links) > a:is(.button, .tc-button) { justify-content: center; margin-top: 6px; }
  body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link { gap: 8px; padding: 12px 10px; }
  .terracloud-card, body.guided-deployment .terracloud-card { grid-template-columns: minmax(0, 1fr); gap: 24px; }
}
@media (max-width: 760px) {
  body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link { font-size: 12px; padding: 10px 8px; min-height: 44px; }
  body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link > svg:first-child { width: 18px; height: 18px; flex-basis: 18px; }
  body.guided-deployment.member-dashboard #appView .nav a.terracloud-sidebar-link .terracloud-external { width: 12px; height: 12px; flex-basis: 12px; }
  .terracloud-card, body.guided-deployment .terracloud-card { padding: 22px 20px; }
  .terracloud-guide-section { padding: 32px 0; }
}
