/*
  Moving from Data Center (/data-center-to-cloud).
  Flow after Linear's /switch page (research/growth/site-redesign-home/datacenter-ref):
  a sticky rail with the page's chapters on the left, one sheet with the reading
  column, sections opened by a small eyebrow over a rule. The look is ours.
*/

.page--dc h1 {
  margin: 0;
}

.dc {
  padding: clamp(32px, 4vw, 56px) 0 clamp(72px, 8vw, 112px);
  background: var(--c-cloud);
}

.dc .guides i {
  border-color: rgba(16, 44, 54, 0.05);
}

.dc__grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
}

/* The rail: chapters, then two actions at its foot. */
.dc__rail {
  grid-column: 1 / 2;
  position: sticky;
  top: 88px;
  display: flex;
  flex-direction: column;
  gap: 28px;
  min-width: 0;
  padding: 8px var(--inset) 0;
}

.dc__toc summary {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 4px 0 10px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 600;
  list-style: none;
  cursor: default;
}

.dc__toc summary::-webkit-details-marker {
  display: none;
}

.dc__num {
  display: inline-grid;
  place-items: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px var(--line-lit);
  font-size: 12px;
  font-weight: 600;
}

.dc__toc ol {
  margin: 0;
  padding: 0 0 0 10px;
  list-style: none;
  border-left: 1px solid var(--line-lit);
}

.dc__toc li {
  margin: 0;
  padding: 0;
}

.dc__toc li::before {
  content: none;
}

.dc__toc a {
  display: block;
  margin-left: -11px;
  padding: 6px 0 6px 20px;
  border-left: 2px solid transparent;
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.35;
  text-decoration: none;
}

.dc__toc a:hover {
  color: var(--ink);
}

.dc__toc a[aria-current="true"] {
  border-left-color: var(--c-green);
  color: var(--ink);
  font-weight: 500;
}

.dc__rail-foot {
  display: grid;
  gap: 8px;
}

.dc__rail-foot .btn {
  width: 100%;
  white-space: normal;
  text-align: center;
}

/* The sheet. */
.dc__sheet {
  grid-column: 2 / 5;
  min-width: 0;
  padding: clamp(32px, 4vw, 64px) clamp(20px, 4vw, 72px) clamp(40px, 4vw, 64px);
  border-radius: var(--r-l);
  background: var(--c-white);
  box-shadow: 0 0 0 1px var(--line), 0 24px 48px -32px rgba(16, 44, 54, 0.25);
}

.dc__sheet > * {
  max-width: 760px;
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 8px;
  margin: 0 0 28px;
  padding: 0;
  list-style: none;
  color: var(--ink-2);
  font-size: 14.5px;
}

.crumbs li {
  margin: 0;
  padding: 0;
}

.crumbs li::before {
  content: none;
}

.crumbs li + li::before {
  content: "/";
  position: static;
  width: auto;
  height: auto;
  margin-right: 8px;
  background: none;
  color: var(--ink-2);
}

.crumbs a {
  color: var(--ink-2);
  text-decoration: none;
}

.crumbs a:hover {
  color: var(--c-green);
  text-decoration: underline;
}

.dc__eyebrow {
  margin: 0 0 14px;
  color: var(--c-green);
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.dc__head h1 {
  font-size: clamp(38px, 5vw, 68px);
  line-height: 1;
  letter-spacing: -0.045em;
}

.dc__lede {
  max-width: 36em;
  margin: 24px 0 0;
  color: var(--ink-2);
  font-size: clamp(17px, 1.4vw, 20px);
  line-height: 1.5;
}

.dc__answers {
  margin: 28px 0 0;
  padding: 0;
}

.dc__answers li {
  margin-bottom: 8px;
  font-size: 16px;
  line-height: 1.5;
}

/* The three apps, each in its own tint. */
.dc__apps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-top: clamp(32px, 4vw, 48px);
}

.dc__app {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  border-radius: var(--r-m);
  color: var(--ink);
  text-decoration: none;
  transition: box-shadow var(--t-1) var(--ease);
}

.dc__app b {
  font-size: 15.5px;
  line-height: 1.3;
}

.dc__app span {
  color: var(--ink-2);
  font-size: 14.5px;
  line-height: 1.45;
}

.dc__app--md {
  background: var(--c-jade-50);
  box-shadow: inset 0 0 0 1px var(--c-jade-100);
}

.dc__app--it {
  background: var(--c-green-50);
  box-shadow: inset 0 0 0 1px var(--c-green-100);
}

.dc__app--rr {
  background: var(--c-cobalt-50);
  box-shadow: inset 0 0 0 1px var(--c-cobalt-100);
}

.dc__app:hover {
  box-shadow: inset 0 0 0 1px var(--ink);
}

.dc__tile {
  width: 34px;
  height: 34px;
  padding: 5px;
  border-radius: 8px;
  color: var(--c-white);
}

.dc__app--md .dc__tile {
  background: var(--c-jade-600);
}

.dc__app--it .dc__tile {
  background: var(--c-green);
}

.dc__app--rr .dc__tile {
  background: var(--c-cobalt);
}

/* Sections: an eyebrow over a rule, then a heading that says the point. */
.dc__sec {
  margin-top: clamp(48px, 5vw, 72px);
  padding-top: 22px;
  border-top: 1px solid var(--line);
  font-size: 17px;
  line-height: 1.6;
}

.dc__sec h2 {
  margin: 0 0 16px;
  font-size: clamp(25px, 2.4vw, 32px);
  line-height: 1.15;
  letter-spacing: -0.03em;
  scroll-margin-top: 96px;
}

.dc__sec h3 {
  margin: 28px 0 10px;
  font-size: 18px;
  line-height: 1.3;
}

.dc__sec p,
.dc__sec ol,
.dc__sec ul {
  margin: 0 0 1em;
}

.dc__sec ul {
  padding-left: 0;
}

.dc__sec ol {
  padding-left: 1.3em;
}

.dc__sec a {
  color: var(--c-green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.dc__sec h3 a {
  color: var(--ink);
}

.dc__sec code {
  padding: 0.1em 0.35em;
  border-radius: var(--r-tag);
  background: var(--c-cloud);
  box-shadow: inset 0 0 0 1px var(--line);
  font-family: var(--mono);
  font-size: 0.88em;
}

.dc__two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px 40px;
}

.dc__two h3 {
  margin-top: 24px;
}

/* The dates. */
.dc__dates {
  display: grid;
  margin: 8px 0 16px !important;
  padding: 0 !important;
  list-style: none;
  border-top: 1px solid var(--line);
}

.dc__dates li {
  display: grid;
  grid-template-columns: 11em minmax(0, 1fr);
  gap: 4px 20px;
  margin: 0;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.dc__dates li::before {
  content: none;
}

.dc__dates time {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.dc__dates li:last-child time {
  color: var(--c-green);
}

.dc__source,
.dc__note {
  color: var(--ink-2);
  font-size: 15px;
  line-height: 1.55;
}

/* The map table. */
.dc__table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}

.dc__table th,
.dc__table td {
  padding: 12px 14px 12px 0;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.dc__table thead th {
  color: var(--ink-2);
  font-size: 13.5px;
  font-weight: 600;
}

.dc__table tbody th {
  font-weight: 600;
}

/* The checklist. */
.dc__steps {
  counter-reset: step;
  margin: 8px 0 0 !important;
  padding: 0 !important;
  list-style: none;
}

.dc__steps li {
  position: relative;
  display: grid;
  gap: 4px;
  margin: 0;
  padding: 14px 0 14px 44px;
  border-bottom: 1px solid var(--line);
  counter-increment: step;
}

.dc__steps li::before {
  content: counter(step);
  position: absolute;
  top: 14px;
  left: 0;
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--c-ink);
  color: var(--c-white);
  font-size: 13px;
  font-weight: 600;
}

.dc__steps span {
  color: var(--ink-2);
}

/* Your own add-ons: a deep ink band inside the sheet. */
.dc__sec--ink {
  max-width: none !important;
  margin-left: calc(-1 * clamp(20px, 4vw, 72px));
  margin-right: calc(-1 * clamp(20px, 4vw, 72px));
  padding: clamp(32px, 4vw, 48px) clamp(20px, 4vw, 72px);
  border-top: 0;
  background: var(--c-ink-ground);
}

.dc__sec--ink > * {
  max-width: 760px;
}

.dc__sec--ink .dc__eyebrow {
  color: var(--c-jade);
}

.dc__sec--ink p {
  color: var(--c-mist);
}

.dc__sec--ink h2 {
  color: var(--c-white);
}

.dc__cta {
  margin-top: 24px !important;
}

.dc__sec--ink .dc__cta .btn {
  color: var(--c-ink-ground);
  text-decoration: none;
}

.dc__sec--ink + .dc__sec {
  border-top: 0;
}

/* The questions. */
.dc__faq h3 {
  margin: 24px 0 6px;
  font-size: 17px;
}

.dc__faq p {
  color: var(--ink-2);
}

/* Tablet and phone: the rail becomes a closed list above the sheet. */
@media (max-width: 1023px) {
  .dc__rail,
  .dc__sheet {
    grid-column: 1 / 5;
  }

  .dc__rail {
    position: static;
    gap: 16px;
    margin-bottom: 16px;
    padding: 0 var(--inset);
  }

  .dc__toc {
    padding: 12px 16px;
    border-radius: var(--r-m);
    background: var(--c-white);
    box-shadow: inset 0 0 0 1px var(--line);
  }

  .dc__toc summary {
    padding: 0;
    cursor: pointer;
  }

  .dc__toc summary::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-right: 1.5px solid var(--ink-2);
    border-bottom: 1.5px solid var(--ink-2);
    transform: rotate(45deg) translateY(-2px);
  }

  .dc__toc[open] summary {
    margin-bottom: 10px;
  }

  .dc__rail-foot {
    display: none;
  }

  .dc__apps {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 719px) {
  .dc__two {
    grid-template-columns: 1fr;
  }

  .dc__dates li {
    grid-template-columns: 1fr;
  }
}
