/* Geist, Geist Mono, Plus Jakarta Sans — all SIL OFL, self-hosted (see public/fonts/OFL.txt). */
  @font-face {
    font-family: 'Geist'; font-weight: 400 600; font-style: normal; font-display: swap;
    src: url('assets/fonts/geist-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'Geist'; font-weight: 400 600; font-style: normal; font-display: swap;
    src: url('assets/fonts/geist-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'Geist Mono'; font-weight: 400 500; font-style: normal; font-display: swap;
    src: url('assets/fonts/geist-mono-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'Geist Mono'; font-weight: 400 500; font-style: normal; font-display: swap;
    src: url('assets/fonts/geist-mono-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }
  @font-face {
    font-family: 'Plus Jakarta Sans'; font-weight: 300 700; font-style: normal; font-display: swap;
    src: url('assets/fonts/plus-jakarta-latin-ext.woff2') format('woff2');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
  }
  @font-face {
    font-family: 'Plus Jakarta Sans'; font-weight: 300 700; font-style: normal; font-display: swap;
    src: url('assets/fonts/plus-jakarta-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
  }

  :root {
    /* KaarTech login tokens — src: "KaarTech Login" design */
    --bg: #eeeff1;
    --surface-container-lowest: #ffffff;
    --surface-container-low: #f6f3f1;
    --on-surface: #1a1213;
    --on-surface-variant: #6e6264;
    --outline: #a0969a;
    --outline-variant: #d9d0cc;
    --hairline: #e6dede;
    --primary: #9d0102;
    --primary-container: #e03e00;
    --on-primary: #ffffff;
    --error: #ba1a1a;
    --error-container: #ffdad6;
    --on-error-container: #93000a;

    --radius: 10px;
    --radius-lg: 20px;

    --unit: 4px;
    --gutter: 16px;
    --margin-mobile: 16px;
    --margin-desktop: 32px;

    --font: 'Geist', system-ui, -apple-system, "Segoe UI", sans-serif;
    --font-display: 'Plus Jakarta Sans', var(--font);
    --font-mono: 'Geist Mono', ui-monospace, Menlo, monospace;
  }

  * { box-sizing: border-box; }

  body {
    margin: 0;
    min-height: 100vh;
    background-color: var(--bg);
    background-image: radial-gradient(rgba(157, 1, 2, 0.07) 1px, transparent 1.2px);
    background-size: 22px 22px;
    color: var(--on-surface);
    font: 16px/24px var(--font);
    -webkit-font-smoothing: antialiased;
  }

  h1, h2, h3, p { margin: 0; }
  a { color: var(--primary); }
  a:hover { color: var(--primary-container); }

  .headline-md { font: 600 24px/32px var(--font); letter-spacing: -0.02em; }
  .body-md { font: 400 14px/20px var(--font); }

  .logo { display: block; height: 40px; width: auto; }

  .field { margin-bottom: var(--gutter); }
  .field label {
    display: block;
    margin-bottom: var(--unit);
    font: 500 13px/20px var(--font);
    color: var(--on-surface);
  }
  .field-control { position: relative; }
  .field-control input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1px solid var(--outline-variant);
    border-radius: var(--radius);
    background: var(--surface-container-lowest);
    color: var(--on-surface);
    font: 400 15px/20px var(--font);
  }
  .field-control input::placeholder { color: var(--outline); }
  .field-control input:focus { outline: none; border-color: var(--primary); }
  .field-control .toggle-visibility {
    position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
    display: flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 0; background: transparent; cursor: pointer;
    color: var(--outline); border-radius: var(--radius);
  }
  .field-control .toggle-visibility:hover { color: var(--primary); }
  .field-control .toggle-visibility svg { width: 18px; height: 18px; }

  .btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%;
    height: 48px;
    padding: 0 16px;
    border-radius: var(--radius);
    font: 500 15px/20px var(--font);
    cursor: pointer;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    text-decoration: none;
  }
  .btn svg { width: 18px; height: 18px; flex: 0 0 auto; }
  .btn-primary { border: 0; background: var(--primary); color: var(--on-primary); }
  .btn-primary:hover { background: var(--primary-container); color: var(--on-primary); }
  .btn-outline { height: 46px; border: 1px solid var(--outline-variant); background: var(--surface-container-lowest); color: var(--on-surface); font-size: 14px; font-weight: 400; }
  .btn-outline:hover { border-color: var(--primary); color: var(--on-surface); }

  .divider { display: flex; align-items: center; gap: 12px; color: var(--outline); font: 400 12px/16px var(--font); }
  .divider::before, .divider::after { content: ""; flex: 1; height: 1px; background: #eee7e3; }

  .alert {
    padding: 10px 12px;
    border-radius: var(--radius);
    background: var(--error-container);
    color: var(--on-error-container);
    font: 400 14px/20px var(--font);
  }


    @keyframes ripple { 0% { transform: scale(.12); opacity: 0; } 12% { opacity: .22; } 100% { transform: scale(1); opacity: 0; } }
    @keyframes sway { 0%, 100% { transform: rotate(-1.6deg); } 50% { transform: rotate(1.6deg); } }

    html, body { overflow-x: hidden; }

    /* ── mobile / tablet: a plain stacked page ─────────────────────────────── */
    .canvas { display: flex; flex-direction: column; min-height: 100vh; }
    .ripples, .lanyard { display: none; }

    .top { display: flex; justify-content: space-between; align-items: center; padding: 20px var(--margin-mobile); }
    .top .logo { height: 40px; }
    .top-links { display: flex; gap: 20px; font-size: 14px; color: var(--on-surface-variant); }
    .top-links a { color: var(--on-surface-variant); text-decoration: none; }

    .hero { display: flex; flex-direction: column; gap: 12px; padding: 12px var(--margin-mobile) 8px; }
    .eyebrow { font: 400 12px/1 var(--font-mono); letter-spacing: .12em; color: var(--primary); }
    .headline { font: 300 40px/1 var(--font-display); letter-spacing: -0.035em; color: #3a3436; }
    .headline .word-window { height: 1.12em; overflow: hidden; }
    .headline .words { transition: transform 750ms cubic-bezier(.7, 0, .2, 1); }
    .headline .word { height: 1.12em; font-weight: 700; }
    .tagline { max-width: 360px; font-size: 16px; line-height: 1.5; color: var(--on-surface-variant); text-wrap: pretty; }

    .card-wrap { padding: 16px var(--margin-mobile) 32px; }
    .card {
      width: 100%; max-width: 400px; margin: 0 auto;
      display: flex; flex-direction: column; gap: 16px;
      padding: 28px;
      background: var(--surface-container-lowest);
      border: 1px solid var(--hairline);
      border-radius: var(--radius-lg);
    }
    .card h2 { font: 600 24px/32px var(--font); letter-spacing: -0.02em; }
    .card .subtitle { margin-top: -6px; font-size: 14px; color: var(--on-surface-variant); }
    .card .field { margin: 0; }
    .card .stack { display: flex; flex-direction: column; gap: 10px; }
    .card .forgot { font-size: 13px; text-align: center; margin-top: 4px; }
    .card .back { font-size: 13px; text-align: center; margin: 0; }
    .back-link { background: none; border: 0; padding: 0; font: inherit; color: var(--primary); cursor: pointer; text-decoration: underline; }
    .back-link:hover { color: var(--primary-container); }

    /* Password step: without JS everything is shown, so the form still works. */
    .js .step-email .pw-field, .js .step-email .step-pw-only { display: none; }
    .js .step-pw .step-email-only { display: none; }

    .foot { display: flex; justify-content: space-between; padding: 20px var(--margin-mobile); margin-top: auto; font-size: 12px; color: #8e8386; }
    .foot .links { display: flex; gap: 24px; }

    /* ── desktop: the full 1440×810 composition, scaled to the viewport ────── */
    @media (min-width: 1024px) {
      html, body { overflow: hidden; height: 100%; }
      .viewport { position: fixed; inset: 0; display: grid; place-items: center; overflow: hidden; }
      .box { position: relative; width: calc(1440px * var(--k, 1)); height: calc(810px * var(--k, 1)); }
      .canvas {
        position: absolute; left: 0; top: 0; display: block; min-height: 0;
        width: 1440px; height: 810px;
        transform-origin: 0 0; transform: scale(var(--k, 1));
        overflow: hidden;
      }
      .ripples { display: block; position: absolute; inset: 0; pointer-events: none; }
      .ripples ellipse { transform-box: fill-box; transform-origin: center; animation: ripple 6s cubic-bezier(.25, .6, .3, 1) infinite; }

      .top { position: absolute; top: 0; left: 0; right: 0; padding: 24px 56px; }
      .top .logo { height: 52px; }

      .hero { position: absolute; left: 56px; top: 214px; width: 460px; gap: 20px; padding: 0; }
      .eyebrow { font-size: 12px; }
      .headline { font-size: 72px; }

      .lanyard { display: block; position: absolute; left: 600px; top: 0; width: 320px; height: 600px; transform-origin: 160px 0; animation: sway 6s ease-in-out infinite; }
      .lanyard .strap { position: absolute; top: 0; width: 20px; height: 120px; }
      .lanyard .clip { position: absolute; left: 136px; top: 112px; width: 48px; height: 30px; border-radius: 6px; background: #c9c2bf; border: 1px solid #a89f9c; }
      .pass { position: absolute; left: 0; top: 136px; width: 320px; height: 460px; border-radius: 20px; background: #22262d; color: #f4f4f5; overflow: hidden; box-shadow: 0 40px 70px -35px rgba(20, 22, 28, .6); display: flex; flex-direction: column; }
      .pass .notch { height: 16px; display: flex; justify-content: center; padding-top: 14px; }
      .pass .notch i { width: 56px; height: 8px; border-radius: 99px; background: #eeeff1; }
      .pass .row { padding: 22px 28px 0; display: flex; justify-content: space-between; align-items: center; }
      .pass .mono { font-family: var(--font-mono); }
      .pass .label { font-size: 11px; letter-spacing: .16em; color: #a3a7af; }
      .pass .chip-ic { width: 34px; height: 26px; border-radius: 5px; background: linear-gradient(135deg, #c9a56a, #8e713f); border: 1px solid #a88a55; }
      .pass .holder-row { padding: 26px 28px 0; display: flex; align-items: center; gap: 16px; }
      .pass .avatar { width: 72px; height: 72px; flex: 0 0 auto; border-radius: 50%; background: #30353d; border: 2px solid var(--primary); display: grid; place-items: center; font: 400 22px/1 var(--font-mono); color: #e7e8ea; }
      .pass .who { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
      .pass .holder { font: 400 19px/1.2 var(--font-mono); letter-spacing: .04em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .pass .org { font: 400 11px/1.2 var(--font-mono); color: #a3a7af; }
      .pass .spacer { flex: 1; }
      .pass .valid { padding: 0 28px; display: flex; flex-direction: column; gap: 10px; }
      .pass .valid .label { font-size: 10px; letter-spacing: .14em; color: #8c9099; }
      .pass .chips { display: flex; gap: 8px; }
      .pass .pchip { flex: 1; height: 36px; border-radius: 9px; display: flex; align-items: center; justify-content: center; gap: 7px; font-size: 12px; font-weight: 600; letter-spacing: .03em; transition: background 400ms, color 400ms, border-color 400ms; border: 1px solid #363b44; background: #2a2e36; color: #8c9099; }
      .pass .pchip i { width: 6px; height: 6px; border-radius: 50%; background: #4e535c; transition: background 400ms, box-shadow 400ms; }
      .pass .pchip.on { border-color: #b8160c; background: var(--primary); color: #fff; }
      .pass .pchip.on i { background: #ff7a45; box-shadow: 0 0 0 3px rgba(224, 62, 0, .3); }
      .pass .barcode { margin: 24px 28px 26px; height: 34px; background: repeating-linear-gradient(90deg, #f4f4f5 0 2px, transparent 2px 5px, #f4f4f5 5px 6px, transparent 6px 10px); opacity: .4; }

      .card-wrap { position: absolute; right: 56px; top: 405px; width: 400px; padding: 0; transform: translateY(-50%); }
      .card { padding: 36px; }

      .foot { position: absolute; bottom: 0; left: 0; right: 0; padding: 24px 56px; margin: 0; }
    }

    @media (prefers-reduced-motion: reduce) {
      .ripples ellipse, .lanyard { animation: none; }
      .headline .words { transition: none; }
    }
    .sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  
[hidden] { display: none !important; }
.btn[disabled] { opacity: .6; cursor: progress; }
