@layer reset, base, components, responsive;

@layer reset {
  html {
    box-sizing: border-box;
    scroll-behavior: smooth;
  }

  *,
  *::before,
  *::after {
    box-sizing: inherit;
  }

  body,
  h1,
  h2,
  h3,
  h4,
  p,
  ul,
  ol,
  figure,
  details {
    margin: 0;
  }

  img {
    display: block;
    max-inline-size: 100%;
    block-size: auto;
  }

  table {
    border-collapse: collapse;
  }
}

@layer base {
  :root {
    --green: #00db28;
    --green-strong: #02bd24;
    --green-dark: #064d2a;
    --ink: #262626;
    --muted: #555;
    --line: #dcdcdc;
    --soft: #f4f4f4;
    --header: #242424;
    --paper: #fff;
    --gold: #f3ca4f;
    --content: 1120px;
    --radius: 8px;
    --shadow: 0 10px 28px rgb(0 0 0 / 15%);
    color-scheme: light;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 16px;
  }

  body {
    min-block-size: 100dvh;
    background: var(--paper);
    color: var(--ink);
    font-size: 0.8125rem;
    line-height: 1.55;
    text-rendering: optimizeLegibility;
  }

  a {
    color: inherit;
    text-decoration: none;
  }

  a:focus-visible,
  summary:focus-visible {
    outline: 2px solid var(--green);
    outline-offset: 3px;
  }

  h1,
  h2,
  h3,
  h4 {
    color: #242424;
    line-height: 1.25;
    letter-spacing: 0;
  }

  h1 {
    color: #fff;
    font-size: 1.45rem;
    font-weight: 700;
    text-align: center;
  }

  h2 {
    margin-block-end: 0.72rem;
    font-size: 1.08rem;
    font-weight: 800;
  }

  h3 {
    margin-block: 0.95rem 0.42rem;
    font-size: 0.95rem;
    font-weight: 800;
  }

  h4 {
    margin-block: 0.85rem 0.36rem;
    font-size: 0.86rem;
    font-weight: 800;
  }

  p,
  li {
    color: var(--muted);
  }

  ul,
  ol {
    padding-inline-start: 1.18rem;
  }

  li + li {
    margin-block-start: 0.28rem;
  }

  strong {
    color: #2f2f2f;
  }
}

@layer components {
  .topbar {
    position: sticky;
    inset-block-start: 0;
    z-index: 20;
    background: var(--header);
    box-shadow: 0 1px 0 rgb(255 255 255 / 7%);
  }

  .topbar__inner {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    max-inline-size: var(--content);
    min-block-size: 58px;
    margin-inline: auto;
    padding-inline: 1rem;
  }

  .logo-link,
  .footer-logo {
    display: inline-flex;
    align-items: center;
    inline-size: max-content;
  }

  .logo-link img {
    inline-size: 88px;
    block-size: auto;
  }

  .site-nav {
    display: flex;
    align-self: stretch;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    color: #f1f1f1;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .nav-group {
    position: relative;
    display: flex;
    align-items: center;
    align-self: stretch;
  }

  .nav-trigger {
    display: inline-flex;
    align-items: center;
    min-block-size: 58px;
    padding-inline: 0.15rem;
    color: #f1f1f1;
    white-space: nowrap;
  }

  .nav-trigger::after {
    content: "";
    display: inline-block;
    inline-size: 0.35rem;
    block-size: 0.35rem;
    margin-inline-start: 0.35rem;
    border-inline-end: 1.5px solid currentColor;
    border-block-end: 1.5px solid currentColor;
    transform: translateY(-0.12rem) rotate(45deg);
    opacity: 0.75;
  }

  .nav-dropdown {
    position: absolute;
    inset-block-start: calc(100% - 1px);
    inset-inline-start: 50%;
    z-index: 30;
    display: grid;
    gap: 0.1rem;
    inline-size: 214px;
    padding: 0.42rem;
    border: 1px solid #dcdcdc;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 14px 28px rgb(0 0 0 / 18%);
    opacity: 0;
    pointer-events: none;
    transform: translate(-50%, 8px);
    transition: opacity 0.14s ease, transform 0.14s ease, visibility 0.14s ease;
    visibility: hidden;
  }

  .nav-dropdown--wide {
    inline-size: 248px;
  }

  .nav-dropdown a {
    display: block;
    padding: 0.52rem 0.62rem;
    border-radius: 4px;
    color: #252525;
    font-size: 0.72rem;
    font-weight: 700;
  }

  .nav-dropdown a:hover,
  .nav-dropdown a:focus-visible,
  .nav-dropdown a[aria-current="page"] {
    background: #effff2;
    color: #04751a;
  }

  .nav-group:hover .nav-dropdown,
  .nav-group:focus-within .nav-dropdown {
    opacity: 1;
    pointer-events: auto;
    transform: translate(-50%, 0);
    visibility: visible;
  }

  .menu-popover {
    display: none;
    color: #fff;
  }

  .menu-popover summary {
    cursor: pointer;
    list-style: none;
    font-size: 0.72rem;
    font-weight: 800;
  }

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

  .menu-popover__panel {
    position: absolute;
    inset-block-start: 50px;
    inset-inline: 0;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.8rem;
    padding: 1rem;
    background: #202020;
    box-shadow: var(--shadow);
  }

  .menu-popover__panel strong,
  .menu-popover__panel a {
    display: block;
  }

  .menu-popover__panel strong {
    margin-block-end: 0.45rem;
    color: var(--green);
    font-size: 0.76rem;
  }

  .menu-popover__panel a {
    padding-block: 0.28rem;
    color: #f1f1f1;
    font-size: 0.72rem;
  }

  .menu-popover__panel a[aria-current="page"] {
    color: var(--green);
    font-weight: 900;
  }

  .register {
    justify-self: end;
    min-inline-size: 86px;
    padding: 0.42rem 0.9rem;
    border-radius: 4px;
    background: var(--green);
    color: #063610;
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
  }

  .hero {
    position: relative;
    overflow: hidden;
    min-block-size: 348px;
    background:
      radial-gradient(circle at 72% 34%, rgb(0 219 40 / 23%), transparent 28rem),
      radial-gradient(circle at 15% 120%, rgb(243 202 79 / 16%), transparent 30rem),
      linear-gradient(135deg, #062315 0%, #0b4d2c 55%, #0b2f20 100%);
  }

  .hero::before {
    position: absolute;
    inset: -12% -5% auto;
    block-size: 260px;
    content: "";
    background:
      repeating-radial-gradient(ellipse at 62% 0%, rgb(255 255 255 / 7%) 0 2px, transparent 2px 28px),
      radial-gradient(ellipse at center, transparent 32%, rgb(0 0 0 / 18%) 72%);
    opacity: 0.55;
    transform: rotate(-4deg);
  }

  .hero__inner {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: minmax(310px, 505px) minmax(230px, 300px);
    column-gap: 4.2rem;
    row-gap: 0.95rem;
    align-items: center;
    max-inline-size: 1030px;
    margin-inline: auto;
    padding: 1.25rem 1rem 2.55rem;
  }

  .hero h1 {
    grid-column: 1 / -1;
  }

  .bonus-card {
    display: grid;
    justify-items: center;
    gap: 0.82rem;
    inline-size: min(100%, 505px);
  }

  .bonus-card__panel {
    display: grid;
    justify-items: center;
    gap: 0.82rem;
    inline-size: 100%;
    padding: 1.18rem 1.25rem 1.06rem;
    border-radius: var(--radius);
    background: #fff;
    color: #171717;
    box-shadow: var(--shadow);
  }

  .bonus-card__title {
    color: #1d1d1d;
    font-size: 0.92rem;
    font-weight: 900;
    text-align: center;
  }

  .countdown {
    display: flex;
    justify-content: center;
    gap: 1rem;
  }

  .countdown span {
    display: grid;
    place-items: center;
    min-inline-size: 56px;
    min-block-size: 54px;
    border-radius: 3px;
    background: var(--green);
    color: #063a14;
    line-height: 1;
  }

  .countdown strong {
    color: #063a14;
    font-size: 1.22rem;
    font-weight: 900;
  }

  .countdown small {
    margin-block-start: 0.2rem;
    color: #063a14;
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .primary-cta,
  .bonus-card__actions a,
  .inline-cta a,
  .promo-card a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    background: var(--green);
    color: #05320f;
    font-weight: 900;
    text-align: center;
  }

  .secondary-cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-block-size: 31px;
    padding-inline: 1rem;
    border: 1px solid rgb(255 255 255 / 50%);
    border-radius: 4px;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 900;
    text-align: center;
    text-transform: uppercase;
  }

  .primary-cta {
    min-inline-size: 265px;
    min-block-size: 31px;
    padding-inline: 1rem;
    font-size: 0.68rem;
    text-transform: uppercase;
  }

  .bonus-card__actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.82rem;
    inline-size: 100%;
    padding: 0.52rem 0.78rem;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: var(--shadow);
  }

  .bonus-card__actions a {
    min-block-size: 38px;
    font-size: 0.78rem;
  }

  .hero-visual {
    justify-self: center;
    inline-size: min(275px, 27vw);
    aspect-ratio: 1;
    overflow: hidden;
    border: 10px solid rgb(0 0 0 / 42%);
    border-radius: 50%;
    background: #052113;
    filter: drop-shadow(0 22px 24px rgb(0 0 0 / 32%));
  }

  .hero-visual img {
    inline-size: 100%;
    block-size: 100%;
    object-fit: cover;
  }

  .hero-wave {
    position: absolute;
    inset-inline: 0;
    inset-block-end: -1px;
    inline-size: 100%;
    block-size: 62px;
    fill: #fff;
  }

  .page-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 220px;
    gap: 1.2rem;
    align-items: start;
    max-inline-size: var(--content);
    margin-inline: auto;
    padding: 1.25rem 1rem 2.8rem;
  }

  .content {
    min-inline-size: 0;
  }

  .article-intro,
  .section {
    scroll-margin-block-start: 76px;
    margin-block-end: 1.32rem;
  }

  .article-content p + p,
  .article-content p + .table-wrap,
  .article-content .table-wrap + p,
  .article-content .table-wrap + ul,
  .article-content .table-wrap + ol,
  .article-content ul + p,
  .article-content ol + p,
  .article-content .content-image + p,
  .article-content p + .content-image {
    margin-block-start: 0.8rem;
  }

  .article-content a:not(.primary-cta, .inline-cta a, .promo-card a) {
    color: #087c24;
    font-weight: 700;
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 2px;
  }

  .table-wrap {
    overflow-x: auto;
    margin-block: 0.74rem;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fff;
  }

  table {
    inline-size: 100%;
    min-inline-size: 560px;
    color: #373737;
    font-size: 0.72rem;
  }

  th,
  td {
    padding: 0.66rem 0.74rem;
    border-block-end: 1px solid var(--line);
    border-inline-end: 1px solid var(--line);
    text-align: start;
    vertical-align: top;
  }

  tr:last-child th,
  tr:last-child td {
    border-block-end: 0;
  }

  th:last-child,
  td:last-child {
    border-inline-end: 0;
  }

  thead th,
  tbody th {
    background: var(--soft);
    color: #333;
    font-weight: 900;
  }

  tbody tr:nth-child(even) td {
    background: #fafafa;
  }

  .content-image {
    margin-block: 0.9rem;
  }

  .content-image img {
    border-radius: var(--radius);
    box-shadow: 0 5px 14px rgb(0 0 0 / 10%);
  }

  .content-image img[src$="logo.webp"] {
    inline-size: 150px;
    box-shadow: none;
  }

  .inline-cta {
    margin-block: 0.8rem;
  }

  .inline-cta a {
    min-block-size: 34px;
    padding-inline: 1rem;
    font-size: 0.72rem;
  }

  .promo-strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.85rem;
    margin-block-end: 1.25rem;
  }

  .promo-card {
    overflow: hidden;
    border: 1px solid #dcdcdc;
    border-radius: var(--radius);
    background: #fff;
  }

  .promo-card img {
    aspect-ratio: 16 / 7;
    inline-size: 100%;
    object-fit: cover;
  }

  .promo-card div {
    display: grid;
    gap: 0.55rem;
    padding: 0.7rem;
  }

  .promo-card p {
    color: #232323;
    font-size: 0.72rem;
    font-weight: 800;
  }

  .promo-card a {
    min-block-size: 29px;
    font-size: 0.65rem;
  }

  .toc {
    position: sticky;
    inset-block-start: 74px;
    overflow: hidden;
    border: 1px solid #dcdcdc;
    border-radius: var(--radius);
    background: #fff;
    box-shadow: 0 4px 18px rgb(0 0 0 / 10%);
    font-size: 0.72rem;
  }

  .toc p {
    padding: 0.72rem 0.78rem;
    border-block-end: 1px solid #dcdcdc;
    color: #242424;
    font-weight: 900;
  }

  .toc a {
    display: block;
    padding: 0.48rem 0.78rem;
    border-block-end: 1px solid #ececec;
    color: #333;
  }

  .toc a::before {
    content: "+ ";
    color: #222;
    font-weight: 900;
  }

  .toc a:last-child {
    border-block-end: 0;
  }

  .error-main {
    background: #fff;
  }

  .error-body {
    background: #222;
  }

  .error-page {
    position: relative;
    overflow: hidden;
    min-block-size: 430px;
    background:
      radial-gradient(circle at 74% 28%, rgb(0 219 40 / 22%), transparent 24rem),
      radial-gradient(circle at 20% 110%, rgb(243 202 79 / 18%), transparent 26rem),
      linear-gradient(135deg, #061f13 0%, #0a492b 58%, #0b2d20 100%);
  }

  .error-page::before {
    position: absolute;
    inset: -18% -8% auto;
    block-size: 260px;
    content: "";
    background:
      repeating-radial-gradient(ellipse at 62% 0%, rgb(255 255 255 / 7%) 0 2px, transparent 2px 28px),
      radial-gradient(ellipse at center, transparent 32%, rgb(0 0 0 / 18%) 72%);
    opacity: 0.55;
    transform: rotate(-4deg);
  }

  .error-page__inner {
    position: relative;
    z-index: 1;
    display: grid;
    justify-items: center;
    gap: 0.9rem;
    max-inline-size: 760px;
    margin-inline: auto;
    padding: 4rem 1rem 4.6rem;
    text-align: center;
  }

  .error-code {
    color: var(--green);
    font-size: 4.4rem;
    font-weight: 900;
    line-height: 1;
    text-shadow: 0 12px 26px rgb(0 0 0 / 22%);
  }

  .error-page h1 {
    max-inline-size: 680px;
    font-size: 1.55rem;
  }

  .error-page p {
    max-inline-size: 600px;
    color: #f3f3f3;
    font-size: 0.86rem;
  }

  .error-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    margin-block-start: 0.3rem;
  }

  .error-actions .primary-cta,
  .error-actions .secondary-cta {
    min-inline-size: 132px;
  }

  .error-note {
    color: rgb(255 255 255 / 78%);
    font-size: 0.68rem;
  }

  .footer {
    display: grid;
    justify-items: center;
    gap: 0.65rem;
    padding: 2.1rem 1rem 1.9rem;
    background: #222;
    color: #fff;
    text-align: center;
  }

  .footer-logo img {
    inline-size: 128px;
  }

  .footer-nav {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
    color: #fff;
    font-size: 0.72rem;
  }

  .footer p {
    color: #f1f1f1;
    font-size: 0.68rem;
  }
}

@layer responsive {
  @media (max-width: 900px) {
    .topbar__inner {
      min-block-size: 50px;
    }

    .logo-link img {
      inline-size: 66px;
    }

    .site-nav {
      display: none;
    }

    .menu-popover {
      display: block;
      justify-self: center;
    }

    .register {
      min-inline-size: 78px;
      padding: 0.36rem 0.72rem;
      font-size: 0.62rem;
    }

    .hero {
      min-block-size: 452px;
    }

    .hero__inner {
      grid-template-columns: minmax(0, 1fr);
      justify-items: center;
      row-gap: 0.86rem;
      max-inline-size: 520px;
      padding: 0.92rem 0.75rem 3.6rem;
    }

    .hero h1 {
      font-size: 1.18rem;
    }

    .bonus-card {
      inline-size: min(100%, 356px);
      gap: 0.58rem;
    }

    .bonus-card__panel {
      padding: 0.9rem 0.9rem 0.82rem;
      gap: 0.58rem;
    }

    .bonus-card__title {
      font-size: 0.76rem;
    }

    .countdown {
      gap: 0.45rem;
    }

    .countdown span {
      min-inline-size: 48px;
      min-block-size: 45px;
    }

    .countdown strong {
      font-size: 1rem;
    }

    .primary-cta {
      min-inline-size: 230px;
      min-block-size: 27px;
      font-size: 0.58rem;
    }

    .secondary-cta {
      min-block-size: 27px;
      font-size: 0.58rem;
    }

    .bonus-card__actions a {
      min-block-size: 32px;
      font-size: 0.66rem;
    }

    .hero-visual {
      inline-size: 188px;
      border-width: 8px;
    }

    .hero-wave {
      block-size: 44px;
    }

    .page-shell {
      display: block;
      padding: 0.8rem 0.75rem 2rem;
    }

    .toc {
      display: none;
    }

    .article-intro,
    .section {
      margin-block-end: 1.08rem;
      scroll-margin-block-start: 62px;
    }

    .promo-strip {
      grid-template-columns: 1fr;
    }

    .error-page {
      min-block-size: 395px;
    }

    .error-page__inner {
      gap: 0.74rem;
      padding: 3.05rem 0.75rem 3.5rem;
    }

    .error-code {
      font-size: 3.3rem;
    }

    .error-page h1 {
      font-size: 1.18rem;
    }

    .error-page p {
      font-size: 0.76rem;
    }
  }

  @media (max-width: 520px) {
    body {
      font-size: 0.74rem;
    }

    h2 {
      font-size: 0.94rem;
    }

    h3 {
      font-size: 0.86rem;
    }

    .topbar__inner {
      padding-inline: 0.62rem;
    }

    .menu-popover__panel {
      grid-template-columns: 1fr;
      max-block-size: calc(100dvh - 50px);
      overflow-y: auto;
    }

    .hero {
      min-block-size: 431px;
    }

    .hero-visual {
      inline-size: 176px;
    }

    .page-shell {
      padding-inline: 0.62rem;
    }

    .error-actions {
      inline-size: 100%;
    }

    .error-actions .primary-cta,
    .error-actions .secondary-cta {
      flex: 1 1 132px;
      min-inline-size: 0;
    }

    table {
      font-size: 0.68rem;
    }

    th,
    td {
      padding: 0.54rem 0.58rem;
    }
  }
}
