/* The system reference theme is confined to /system. */
.reference-system {
  --system-dark: #101416;
  --system-ink: #101213;
  --system-white: #ffffff;
  --system-orange: #ff5800;
  --system-accent: #bb3900;
  --system-paper: #fcfbf9;
  --system-tile: #f4f1ed;
  --system-warm: #fdf0e6;
  --system-rule: #b8b8b8;
  --system-gutter: clamp(24px, 5vw, 54px);
  --accent: var(--system-accent);
  --ink: var(--system-ink);
  background: var(--system-paper);
  color: var(--system-ink);
  line-height: 1.2;

  & :is(p, li, dd) { text-wrap: wrap; }

  & .system-wrap {
    width: min(100% - var(--system-gutter) * 2, 1152px);
    margin-inline: auto;
  }

  & :is(.system-hero, .system-closing) {
    --ink: var(--system-white);
    --accent: var(--system-white);
    color: var(--system-white);
    background: var(--system-dark);
  }

  & :is(.system-hero, .system-closing) {
    position: relative;
    isolation: isolate;
  }

  & .system-hero {
    padding-block: clamp(17px, 2.5vw, 37px);
  }

  & .system-hero-layout {
    display: grid;
    grid-template-columns: minmax(0, 0.96fr) minmax(0, 1.04fr);
    align-items: center;
    gap: clamp(13px, 2.3vw, 31px);
  }

  & .system-hero-art {
    display: block;
    width: 100%;
    height: auto;
    mix-blend-mode: lighten;
  }

  & .system-closing::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url("/brand/twin-lakes.webp") center 42% / cover no-repeat;
    filter: grayscale(1);
    opacity: 0.25;
  }

  & .system-kicker {
    color: var(--system-accent);
    font-size: clamp(13px, 1.35vw, 16px);
    font-weight: 850;
    text-transform: uppercase;
    line-height: 1.14;
  }

  & .system-hero .system-kicker {
    color: var(--system-white);
    border-inline-start: 5px solid var(--system-orange);
    padding: 2px 0 2px 10px;
    margin-bottom: 14px;
    font-size: clamp(10px, 1.18vw, 14px);
    letter-spacing: 0.20em;
  }

  & :is(.system-band h2, .system-closing h2) {
    color: inherit;
    font-weight: 900;
    letter-spacing: -0.037em;
    line-height: 0.98;
    text-transform: uppercase;
  }

  & .system-hero h1 {
    color: inherit;
    font-size: clamp(26px, 3.28vw, 43px);
    font-weight: 875;
    letter-spacing: -0.045em;
    line-height: 1.02;
    text-wrap: balance;
  }

  & .system-hero h1 strong {
    font-weight: inherit;
    color: var(--system-orange);
  }

  & .system-lede {
    max-width: 61ch;
    font-size: clamp(14px, 1.4vw, 17px);
    line-height: 1.35;
    margin-top: 11px;
  }

  & .system-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    min-height: 44px;
    padding: 8px 23px;
    margin-top: 12px;
    border-radius: 12px;
    background: var(--system-orange);
    color: var(--system-white);
    font-size: clamp(19px, 2.03vw, 22px);
    font-weight: 850;
    letter-spacing: -0.035em;
    line-height: 1.12;
    text-align: center;
    text-decoration: none;
  }

  & .system-cta:hover {
    background: var(--system-accent);
    text-decoration: underline;
  }

  & :where(.system-trust, .system-proof-grid, .system-comparison ul, .system-engine-list, .system-rollout) {
    padding: 0;
    list-style: none;
  }

  & .system-trust {
    display: flex;
    gap: 6px clamp(10px, 1.3vw, 16px);
    flex-wrap: wrap;
    margin-top: 9px;
    font-size: 11px;
    font-weight: 650;
  }

  & .system-trust li,
  & .system-comparison li {
    display: flex;
    align-items: flex-start;
    gap: 5px;
  }

  & .system-trust .reference-icon,
  & .system-comparison li .reference-icon {
    font-size: 16px;
  }

  & .system-proof {
    --ink: var(--system-white);
    background: var(--system-dark);
    color: var(--system-white);
    border-block: 1px solid rgb(255 255 255 / 20%);
  }

  & .system-proof-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding-block: 14px;
  }

  & .system-proof-grid li {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding-inline: 8px;
  }

  & .system-proof-grid li + li {
    border-inline-start: 1px solid rgb(255 255 255 / 28%);
  }

  & .system-proof-grid .reference-icon {
    color: var(--system-orange);
    font-size: clamp(28px, 4vw, 41px);
  }

  & .system-proof-grid strong {
    max-width: 14ch;
    font-size: clamp(13px, 1.64vw, 20px);
    font-weight: 900;
    letter-spacing: -0.04em;
    line-height: 1;
  }

  & .system-band {
    padding-block: 15px 5px;
  }

  & .system-band h2,
  & .system-closing h2 {
    font-size: clamp(23px, 2.61vw, 36px);
    margin-top: 2px;
  }

  & :is(.system-comparison h3, .system-engine-list h3, .system-engine-list h4, .system-rollout h3, .system-faq dt) {
    margin: 0;
    color: var(--system-ink);
    font-weight: 900;
    line-height: 1.05;
    letter-spacing: -0.039em;
  }

  & .system-comparison {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 11px;
  }

  & .system-comparison article {
    border: 1px solid var(--system-rule);
    border-radius: 12px;
    background: var(--system-tile);
    padding: 10px 16px 12px;
  }

  & .system-comparison article + article {
    border-color: var(--system-orange);
    background: var(--system-warm);
  }

  & .system-comparison h3 {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: clamp(15px, 1.7vw, 21px);
    text-transform: uppercase;
  }

  & .system-comparison h3 .reference-icon {
    font-size: 34px;
  }

  & .system-comparison h3 strong,
  & .system-comparison article + article .reference-icon {
    color: var(--system-accent);
  }

  & .system-comparison ul {
    display: grid;
    gap: 5px;
    margin-top: 7px;
    font-size: clamp(13px, 1.24vw, 15px);
    letter-spacing: -0.018em;
  }

  & .system-engine-list {
    margin-top: 7px;
  }

  & .system-engine-list > li {
    display: grid;
    grid-template-columns: minmax(0, 22fr) minmax(0, 22fr) minmax(0, 31fr) minmax(0, 24fr);
    gap: clamp(10px, 1.3vw, 18px);
    align-items: stretch;
    padding-block: 6px;
  }

  & .system-engine-list > li + li {
    border-top: 1px solid var(--system-rule);
  }

  & .system-engine-media {
    align-self: center;
    aspect-ratio: 2.08;
    overflow: hidden;
    min-width: 0;
    border: 1px solid var(--system-rule);
    border-radius: 8px;
    background: var(--system-tile);
  }

  & .system-engine-media img {
    width: 100%;
    height: 100%;

    object-fit: cover;
    object-position: left center;
  }

  & .system-engine-list > li:last-child img {
    object-position: center;
    filter: saturate(0.65);
  }

  & .system-engine-name {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding-block: 6px;
  }

  & .system-engine-name > span {
    display: grid;
    place-items: center;
    width: 30px;
    height: 30px;
    flex: none;
    border-radius: 50%;
    color: var(--system-white);
    background: var(--system-accent);
    font-size: 19px;
    font-weight: 800;
  }

  & .system-engine-name h3,
  & .system-rollout h3,
  & .system-faq dt {
    font-size: clamp(15px, 1.63vw, 20px);
  }

  & .system-engine-name a {
    color: inherit;
    text-decoration: none;
  }

  & .system-engine-name a:hover {
    text-decoration: underline;
  }

  & .system-engine-name p {
    margin-top: 3px;
    font-size: clamp(12px, 1.23vw, 15px);
  }

  & .system-engine-details {
    padding: 4px 0 4px clamp(12px, 1.45vw, 22px);
    border-inline-start: 1px solid var(--system-rule);
  }

  & .system-engine-details h4 {
    font-size: clamp(13px, 1.36vw, 17px);
    margin-bottom: 3px;
  }

  & :is(.system-engine-details p, .system-rollout p:last-child, .system-faq dd) {
    font-size: clamp(13px, 1.24vw, 15px);
    line-height: 1.29;
  }

  & :is(.system-rollout, .system-faq dl) {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 7px;
  }

  & .system-rollout { gap: 35px; }
  & .system-faq dl { gap: 14px; }

  & .system-rollout li {
    position: relative;
    display: flex;
  }

  & .system-rollout li > .reference-icon {
    position: absolute;
    left: calc(100% + 3px);
    top: 50%;
    translate: 0 -50%;
    color: var(--system-accent);
    font-size: 29px;
  }

  & :is(.system-rollout-content, .system-faq dl > div) {
    background: var(--system-tile);
    border-radius: 11px;
    padding: 10px 14px;
  }

  & .system-rollout-content {
    display: grid;
    width: 100%;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: start;
    gap: 12px;
  }

  & .system-rollout-content .reference-icon {
    font-size: clamp(28px, 4vw, 43px);
  }

  & .system-rollout h3,
  & .system-faq dt { margin-bottom: 4px; }

  & .system-faq { padding-bottom: 16px; }

  & .system-closing {
    padding-block: 16px;
    text-align: center;
  }

  & .system-closing p {
    max-width: 740px;
    margin: 4px auto 0;
    font-size: clamp(13px, 1.35vw, 16px);
  }


}

@media (max-width: 850px) {
  .reference-system {
    --system-gutter: 24px;

    & .system-rollout { gap: 22px; }
    & .system-rollout li > .reference-icon { left: 100%; font-size: 22px; }
    & .system-rollout-content { gap: 7px; padding-inline: 9px; }
  }
}

@media (max-width: 700px) {
  .reference-system {
    --system-gutter: 16px;

    & .system-hero { padding-block: 24px 14px; }
    & .system-hero-layout { grid-template-columns: minmax(0, 1fr); gap: 15px; }
    & .system-hero-copy { max-width: 560px; }
    & .system-hero-art { width: min(100%, 540px); margin-inline: auto; }
    & .system-hero h1 { font-size: clamp(29px, 7.4vw, 40px); }
    & .system-trust { font-size: 12px; }
    & .system-proof-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 0; }
    & .system-proof-grid li { justify-content: flex-start; padding-block: 10px; }
    & .system-proof-grid li:nth-child(odd) { border-inline-start: 0; }
    & .system-proof-grid li:nth-child(n + 3) { border-top: 1px solid rgb(255 255 255 / 28%); }
    & :is(.system-comparison, .system-rollout, .system-faq dl) { grid-template-columns: minmax(0, 1fr); gap: 8px; }
    & .system-band { padding-block: 15px 5px; }
    & .system-engine-list > li { grid-template-columns: repeat(2, minmax(0, 1fr)); padding-block: 9px; }
    & .system-engine-media { aspect-ratio: 1.8; }
    & .system-comparison li { align-items: flex-start; }
    & .system-engine-details:nth-child(3) { padding-inline-start: 0; border: 0; }
    & .system-engine-name a { display: inline-flex; align-items: center; min-height: 40px; }
    & .system-rollout li > .reference-icon { display: none; }
    & .system-faq { padding-bottom: 15px; }
    & .system-closing { padding-block: 17px; }

  }
}
