@property --sunset-ring-angle {
    syntax: "<angle>";
    inherits: false;
    initial-value: 0deg;
  }

  :root {
    color-scheme: only light;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-synthesis: none;
  }

  * {
    box-sizing: border-box;
  }

  html {
    min-width: 320px;
    min-height: 100%;
    background: #071c2a;
  }

  body {
    --sunset-brand-primary: #075b9f;
    --sunset-brand-secondary: #2f6812;
    --sunset-brand-accent: #84cc16;
    --sunset-action: #075b9f;
    --sunset-focus: #ffbf47;
    --sunset-logo-max: 270px;
    margin: 0;
    min-height: 100vh;
    min-height: 100svh;
    display: grid;
    grid-template-rows: minmax(0, 1fr) auto;
    overflow-x: hidden;
    color: #111827;
    background:
      radial-gradient(130% 120% at 50% -10%, transparent 40%, rgb(4 10 18 / 42%)),
      linear-gradient(140deg, color-mix(in srgb, var(--sunset-brand-primary) 84%, transparent), color-mix(in srgb, var(--sunset-brand-secondary) 92%, transparent)),
      url('/assets/stock/hero.webp') center / cover fixed no-repeat;
  }

  body[data-sunset-theme="cashtrain"] {
    --sunset-brand-primary: #1f9d55;
    --sunset-brand-secondary: #0f5a30;
    --sunset-brand-accent: #d5ad46;
    --sunset-action: #0f5a30;
    --sunset-logo-max: 210px;
  }

  body[data-sunset-theme="credicorp"] {
    --sunset-brand-primary: #163d59;
    --sunset-brand-secondary: #155230;
    --sunset-brand-accent: #84cc16;
    --sunset-action: #075b9f;
    --sunset-logo-max: 250px;
  }

  body[data-sunset-theme="creditcorp"] {
    --sunset-brand-primary: #0876bd;
    --sunset-brand-secondary: #477d08;
    --sunset-brand-accent: #8ace18;
    --sunset-action: #06649f;
    --sunset-logo-max: 300px;
  }

  body[data-sunset-theme="corporation"] {
    --sunset-brand-primary: #0d5356;
    --sunset-brand-secondary: #0a2f31;
    --sunset-brand-accent: #27a0a5;
    --sunset-action: #0d5356;
    --sunset-logo-max: 390px;
  }

  .sunset-progress {
    position: fixed;
    z-index: 20;
    inset: 0 0 auto;
    height: 4px;
    transform: scaleX(0);
    transform-origin: left center;
    background: linear-gradient(90deg, var(--sunset-brand-accent), #fff, var(--sunset-brand-accent));
    box-shadow: 0 0 14px color-mix(in srgb, var(--sunset-brand-accent) 70%, transparent);
    animation: sunset-progress 8s linear forwards;
  }

  .sunset-shell {
    width: 100%;
    display: grid;
    place-items: center;
    padding: clamp(28px, 6vw, 72px) max(18px, env(safe-area-inset-right)) clamp(28px, 5vw, 58px) max(18px, env(safe-area-inset-left));
  }

  .sunset-card {
    width: min(100%, 560px);
    padding: clamp(32px, 5vw, 48px) clamp(24px, 5vw, 46px) clamp(30px, 4vw, 40px);
    text-align: center;
    background: #fff;
    border: 1px solid color-mix(in srgb, var(--sunset-brand-primary) 15%, #fff);
    border-radius: 24px;
    box-shadow: 0 30px 80px rgb(2 12 27 / 38%), 0 1px 0 rgb(255 255 255 / 90%) inset;
  }

  .sunset-brand {
    display: grid;
    place-items: center;
    min-height: 66px;
    margin: 0 auto clamp(24px, 4vw, 34px);
    line-height: 0;
  }

  .sunset-brand img {
    display: block;
    width: auto;
    height: auto;
    max-width: min(100%, var(--sunset-logo-max));
    max-height: 72px;
    object-fit: contain;
  }

  h1 {
    margin: 0;
    color: #0b1420;
    font-size: clamp(1.5rem, 4vw, 1.75rem);
    line-height: 1.2;
    letter-spacing: -0.018em;
    text-wrap: balance;
  }

  .sunset-summary {
    max-width: 46ch;
    margin: 16px auto 28px;
    color: #4b5563;
    font-size: clamp(1rem, 2.2vw, 1.1rem);
    line-height: 1.58;
    text-wrap: pretty;
  }

  .sunset-action {
    display: inline-flex;
    min-height: 52px;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 13px 25px;
    color: #fff;
    background: var(--sunset-action);
    border: 2px solid transparent;
    border-radius: 12px;
    box-shadow: 0 10px 24px color-mix(in srgb, var(--sunset-action) 28%, transparent);
    font-size: 1rem;
    font-weight: 750;
    line-height: 1.25;
    text-decoration: none;
    transition: transform 150ms ease, box-shadow 150ms ease, background-color 150ms ease;
  }

  .sunset-action::after {
    content: "\2192";
    font-size: 1.18em;
    line-height: 1;
  }

  .sunset-action:hover {
    background: color-mix(in srgb, var(--sunset-action) 88%, #000);
    box-shadow: 0 14px 30px color-mix(in srgb, var(--sunset-action) 36%, transparent);
    transform: translateY(-1px);
  }

  .sunset-action:focus-visible,
  .sunset-footer a:focus-visible {
    outline: 3px solid var(--sunset-focus);
    outline-offset: 4px;
  }

  .sunset-timer {
    display: inline-grid;
    grid-template-columns: 54px auto;
    align-items: center;
    gap: 13px;
    margin-top: 25px;
    color: #4b5563;
    text-align: left;
  }

  .sunset-timer__ring {
    --sunset-ring-angle: 0deg;
    width: 54px;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    position: relative;
    border-radius: 50%;
    background: conic-gradient(var(--sunset-brand-primary) var(--sunset-ring-angle), #e5e7eb 0);
    animation: sunset-ring 8s linear forwards;
  }

  .sunset-timer__ring::before {
    content: "";
    position: absolute;
    inset: 5px;
    border-radius: inherit;
    background: #fff;
  }

  .sunset-timer__ring b {
    position: relative;
    color: #111827;
    font-size: 1rem;
    font-variant-numeric: tabular-nums;
  }

  .sunset-timer__copy {
    margin: 0;
    font-size: 0.84rem;
    line-height: 1.25;
  }

  .sunset-timer__copy strong {
    display: block;
    margin-top: 3px;
    color: #111827;
    font-size: 0.96rem;
  }

  .sunset-noscript {
    margin: 18px auto 0;
    color: #4b5563;
    font-size: 0.86rem;
  }

  .sunset-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .sunset-footer {
    color: #eef5f8;
    background: rgb(3 14 24 / 82%);
    border-top: 1px solid rgb(255 255 255 / 14%);
    padding: 16px max(20px, env(safe-area-inset-right)) max(16px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
  }

  .sunset-footer__inner {
    width: min(100%, 1180px);
    min-height: 30px;
    margin-inline: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px 28px;
  }

  .sunset-footer__company{flex-basis:100%;order:3;margin:8px 0 0;font-size:0.78rem;line-height:1.4;color:#c7d4dc;}
  .sunset-footer__brand {
    flex: 0 0 auto;
    font-size: 0.9rem;
    font-weight: 750;
    letter-spacing: 0.015em;
  }

  .sunset-footer ul {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 10px 24px;
    margin: 0;
    padding: 0;
    list-style: none;
  }

  .sunset-footer a {
    color: #eef5f8;
    font-size: 0.88rem;
    text-decoration: underline;
    text-decoration-color: transparent;
    text-underline-offset: 4px;
  }

  .sunset-footer a:hover,
  .sunset-footer a.is-relevant {
    text-decoration-color: currentcolor;
  }

  .sunset-footer a.is-relevant {
    font-weight: 750;
  }

  @keyframes sunset-progress {
    to { transform: scaleX(1); }
  }

  @keyframes sunset-ring {
    to { --sunset-ring-angle: 360deg; }
  }

  @media (max-width: 640px) {
    body {
      background-attachment: scroll, scroll, scroll;
    }

    .sunset-shell {
      place-items: start center;
      padding-top: max(24px, env(safe-area-inset-top));
      padding-bottom: 24px;
    }

    .sunset-card {
      padding: 32px 22px 30px;
      border-radius: 19px;
    }

    .sunset-brand {
      min-height: 58px;
      margin-bottom: 24px;
    }

    .sunset-brand img {
      max-height: 62px;
    }

    .sunset-action {
      width: 100%;
      padding-inline: 18px;
    }

    .sunset-footer__inner {
      align-items: flex-start;
      flex-direction: column;
      gap: 10px;
    }

    .sunset-footer ul {
      justify-content: flex-start;
      gap: 9px 18px;
    }
  }

  @media (max-width: 360px) {
    .sunset-card {
      padding-inline: 18px;
    }

    .sunset-timer {
      grid-template-columns: 50px auto;
      gap: 10px;
    }

    .sunset-timer__ring {
      width: 50px;
    }
  }

  @media (max-height: 620px) and (min-width: 641px) {
    .sunset-shell {
      place-items: start center;
      padding-block: 24px;
    }

    .sunset-card {
      padding-block: 28px;
    }

    .sunset-brand {
      margin-bottom: 18px;
    }

    .sunset-summary {
      margin-block: 12px 20px;
    }

    .sunset-timer {
      margin-top: 18px;
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .sunset-progress,
    .sunset-timer__ring {
      animation-timing-function: steps(8, end);
    }

    .sunset-action {
      transition: none;
    }
  }

  @media (forced-colors: active) {
    .sunset-card,
    .sunset-action,
    .sunset-timer__ring {
      border: 2px solid ButtonText;
    }

    .sunset-progress {
      background: Highlight;
    }
  }


/* ── FOOTER FIX 2026-07-19 ────────────────────────────────────────────────────
   The inherited layout assumed 3-4 footer links on a single row. The estate link
   set is now 5, so the <ul> wrapped and the company line landed beside the links
   instead of on its own row. Explicit rows instead of relying on flex wrap. */
.sunset-footer__inner {
  flex-wrap: wrap;
  row-gap: 12px;
}

.sunset-footer__brand {
  flex: 0 0 auto;
}

.sunset-footer nav {
  flex: 1 1 auto;
  min-width: 0;
}

.sunset-footer ul {
  justify-content: flex-end;
  gap: 8px 20px;
}

.sunset-footer__company {
  flex: 0 0 100%;
  order: 3;
  margin: 4px 0 0;
  padding-top: 12px;
  border-top: 1px solid rgb(255 255 255 / 12%);
  text-align: center;
}

@media (max-width: 900px) {
  .sunset-footer__inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .sunset-footer ul {
    justify-content: center;
  }
  .sunset-footer__company {
    text-align: center;
  }
}
