    @font-face {
      font-family: "Montserrat";
      font-style: normal;
      font-weight: 400 800;
      font-display: block;
      src: url("fonts/montserrat-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 {
      --font: "Montserrat", "Helvetica Neue", Arial, sans-serif;
      --bg: #0d0b1a;
      --bg-2: #14112a;
      --panel: #1a1633;
      --panel-2: #221c40;
      --border: #322a5c;
      --border-soft: #1c1838;
      --text: #e7eaf6;
      --muted: #a7afd1;
      --brand: #7B4FFF;
      --brand-2: #9B6FFF;
      --brand-link: #b29bff;
      /* Darker gradient stops for surfaces that carry white text (AA-safe) */
      --brand-grad-1: #6A3DEB;
      --brand-grad-2: #7548F5;
      --ok: #34d399;
      --ok-bg: rgba(52, 211, 153, .12);
      --fail: #f87171;
      --fail-bg: rgba(248, 113, 113, .12);
      --warn: #fbbf24;
      --warn-bg: rgba(251, 191, 36, .12);
      --info: #60a5fa;
      --info-bg: rgba(96, 165, 250, .12);
      --radius: 14px;
      --shadow: 0 18px 50px rgba(0, 0, 0, .45);
    }

    * { box-sizing: border-box; }

    html { font-size: 15px; }

    body {
      margin: 0;
      min-height: 100vh;
      font-family: var(--font);
      -webkit-font-smoothing: antialiased;
      -moz-osx-font-smoothing: grayscale;
      color: var(--text);
      line-height: 1.5;
      background:
        radial-gradient(1100px 600px at 12% -10%, rgba(123, 79, 255, .26), transparent 60%),
        radial-gradient(900px 500px at 100% 0%, rgba(155, 111, 255, .20), transparent 55%),
        var(--bg);
      background-attachment: fixed;
      padding: 32px 18px 64px;
    }

    .wrap { max-width: 760px; margin: 0 auto; }

    /* Header */
    .site-header {
      display: flex; align-items: center; flex-wrap: wrap; gap: 32px;
      margin: 8px 0 44px; padding-bottom: 32px;
      border-bottom: 1px solid var(--border-soft);
    }
    .site-header a { display: inline-flex; align-items: center; line-height: 0; }
    .site-header img {
      height: 32px; width: auto; display: block;
      image-rendering: -webkit-optimize-contrast;
    }
    .site-header-text { display: flex; flex-direction: column; gap: 4px; }
    .site-header h1 {
      margin: 0;
      font-size: 1.5rem; line-height: 1.15; font-weight: 800;
      color: #f5f5fa;
    }
    .site-subtitle {
      margin: 0;
      color: var(--muted); font-size: 13px; font-weight: 500;
    }

    /* Cards */
    .card {
      background: linear-gradient(180deg, var(--panel), var(--bg-2));
      border: 1px solid var(--border);
      border-radius: var(--radius);
      box-shadow: var(--shadow);
      padding: 28px;
      margin-bottom: 28px;
    }
    .card h2 {
      margin: 0 0 14px;
      font-size: 1.05rem; font-weight: 700;
    }
    .card p { margin: 0 0 14px; color: var(--muted); font-size: 14px; }

    details summary {
      cursor: pointer; list-style: none; padding: 10px 0;
      color: var(--brand-link); font-weight: 600; font-size: .92rem;
      display: flex; align-items: center; gap: 8px;
    }
    details summary::-webkit-details-marker { display: none; }
    details summary::before { content: "\25B8"; transition: transform .15s ease; }
    details[open] summary::before { transform: rotate(90deg); }
    .card dl { margin: 4px 0 0; display: grid; grid-template-columns: 1fr; gap: 10px; }
    .card dt { font-weight: 700; color: var(--text); font-size: .9rem; }
    .card dd { margin: 2px 0 0; color: var(--muted); font-size: 14px; }
    .card code {
      background: var(--panel-2); border: 1px solid var(--border);
      padding: 1px 6px; border-radius: 6px; font-size: .82rem; color: #cdd6ff;
    }

    /* Form */
    .field-label { font-weight: 600; }
    .label-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
    .sample-controls { display: flex; align-items: center; gap: 6px; }
    .btn-sample {
      appearance: none; cursor: pointer; border: none;
      background: #282546;
      clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
      padding: 10px 20px; font-family: inherit; font-size: 11px; font-weight: 700;
      text-transform: uppercase;
      color: var(--text); transition: filter .15s ease;
    }
    .btn-sample:hover { filter: brightness(1.2); }
    textarea {
      width: 100%; min-height: 170px; resize: vertical; overflow-y: hidden;
      background: var(--bg); color: var(--text);
      border: 1px solid var(--border); border-radius: 12px;
      padding: 14px 16px; font-size: .9rem; line-height: 1.5;
      font-family: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
      transition: border-color .15s ease, box-shadow .15s ease;
    }
    textarea:focus {
      outline: none; border-color: var(--brand);
      box-shadow: 0 0 0 4px rgba(123, 79, 255, .18);
    }

    .actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 24px; align-items: center; }
    .btn {
      appearance: none; cursor: pointer; border: 1px solid transparent;
      padding: 11px 30px; border-radius: 11px; font-size: .92rem; font-weight: 700;
      font-family: inherit;
      transition: transform .08s ease, filter .15s ease, background .15s ease;
    }
    .btn:active { transform: translateY(1px); }
    .btn-primary {
      background: #5c49d0; color: #ffffff; box-shadow: none;
      padding: 11px 50px; margin-left: auto;
      font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
      clip-path: polygon(14px 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 14px 100%, 0 50%);
    }
    .btn-primary:hover { filter: brightness(1.08); }
    .btn-loading { opacity: .55; cursor: not-allowed; }
    .btn-loading:hover { filter: none; }
    .btn-loading:active { transform: none; }
    .btn-ghost { background: var(--panel-2); color: var(--text); border-color: var(--border); }
    .btn-ghost:hover { background: #2c2656; border-color: var(--brand); }
    .spacer { flex: 1; }
    .sample-label { color: #6b6a8a; font-size: 12px; font-weight: 700; margin-right: 5px; }

    /* Results */
    .results { animation: fade .25s ease; }
    @keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

    .result-header {
      display: flex; align-items: center; justify-content: space-between;
      gap: 12px; flex-wrap: wrap; margin-bottom: 14px;
    }
    .result-header h2 { margin: 0; }

    .detected-type {
      display: inline-block;
      padding: 6px 12px; border-radius: 12px;
      background: rgba(123, 79, 255, .12); border: 1px solid var(--border);
      color: var(--muted); font-size: 14px;
    }
    .detected-type strong { color: var(--brand-link); }

    .summary {
      display: flex; align-items: center; gap: 14px;
      padding: 16px 18px; border-radius: 12px; margin-bottom: 16px;
      border: 1px solid var(--border);
    }
    .summary div { display: flex; flex-direction: column; }
    .summary span:last-child { color: var(--muted); font-size: 14px; }
    .summary-icon { font-size: 1.4rem; width: 40px; height: 40px; flex: none; border-radius: 10px; display: grid; place-items: center; }
    .summary-ok { background: var(--ok-bg); border-color: rgba(52,211,153,.35); }
    .summary-ok .summary-icon { background: rgba(52,211,153,.18); color: var(--ok); }
    .summary-ok strong { color: var(--ok); }
    .summary-fail { background: var(--fail-bg); border-color: rgba(248,113,113,.35); }
    .summary-fail .summary-icon { background: rgba(248,113,113,.18); color: var(--fail); }
    .summary-fail strong { color: var(--fail); }

    .cmp-card { border: 1px solid var(--border); border-radius: 12px; padding: 16px; margin-bottom: 14px; background: var(--bg); }
    .cmp-title { font-weight: 700; font-size: 15px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 10px; }
    .cmp-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--border); }
    .cmp-row:last-of-type { border-bottom: 0; }
    .cmp-label { color: var(--muted); font-size: 13px; flex: none; }
    .cmp-value { font-weight: 700; text-align: right; word-break: break-all; font-size: 13px; }
    .cmp-value.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-weight: 600; font-size: 13px; }
    .verdict { margin-top: 12px; padding: 9px 12px; border-radius: 9px; font-weight: 600; font-size: .9rem; display: flex; align-items: center; gap: 8px; }
    .verdict-icon { font-size: 1rem; }
    .verdict-ok { background: var(--ok-bg); color: var(--ok); }
    .verdict-fail { background: var(--fail-bg); color: var(--fail); }

    /* Calculation steps spoiler */
    .calc-spoiler { margin-top: 4px; border: 1px solid var(--border); border-radius: 12px; background: var(--bg); padding: 0 16px; }
    .calc-spoiler summary { color: var(--brand-link); }
    .field-glossary dl { padding: 4px 0 16px; }
    .calc-steps { display: flex; flex-direction: column; gap: 12px; padding: 4px 0 16px; }
    .calc-step { display: flex; gap: 12px; align-items: flex-start; }
    .calc-step-num {
      flex: none; width: 24px; height: 24px; border-radius: 50%;
      display: grid; place-items: center; margin-top: 1px;
      background: linear-gradient(135deg, var(--brand-grad-1), var(--brand-grad-2));
      color: #ffffff; font-weight: 800; font-size: .76rem;
    }
    .calc-step-body { flex: 1; min-width: 0; }
    .calc-label { color: var(--text); font-weight: 700; font-size: 14px; margin-bottom: 4px; }
    .calc-sublabel { color: var(--muted); font-size: 12.5px; line-height: 1.4; margin-bottom: 4px; }
    .calc-formula {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-style: italic; color: var(--muted); font-size: 12px;
      word-break: break-all; margin-bottom: 6px;
    }
    .calc-hash-hl { color: var(--brand-2); font-weight: 800; }
    .calc-value-row { display: flex; gap: 8px; align-items: flex-start; }
    .calc-value { font-weight: 700; word-break: break-all; flex: 1; min-width: 0; }
    .calc-value.mono {
      font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
      font-weight: 600; font-size: .82rem; white-space: pre-wrap; color: #cdd6ff;
    }
    /* Spoiler text reduction: 1px smaller than the same element outside a details */
    details summary { font-size: 12.8px; }
    details .card p { font-size: 13px; }
    details .card dt { font-size: 12.5px; }
    details .card dd { font-size: 13px; }
    details .card code { font-size: 11.3px; }
    details .cmp-label { font-size: 13px; }
    details .cmp-value { font-size: 14px; }
    details .calc-label { font-size: 13px; }
    details .calc-sublabel { font-size: 11.5px; }
    details .calc-formula { font-size: 11px; }
    details .calc-value { font-size: 14px; }
    details .calc-value.mono { font-size: 11.3px; }
    details .calc-step-num { font-size: 10.4px; }

    /* Callouts (errors / warnings) */
    .callout { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--border); }
    .callout-icon { font-size: 1.2rem; flex: none; }
    .callout-text { display: flex; flex-direction: column; gap: 2px; }
    .callout-text span { color: var(--muted); font-size: 14px; }
    .callout-error { background: var(--fail-bg); border-color: rgba(248,113,113,.35); } .callout-error .callout-icon, .callout-error strong { color: var(--fail); }
    .callout-warning { background: var(--warn-bg); border-color: rgba(251,191,36,.35); } .callout-warning .callout-icon, .callout-warning strong { color: var(--warn); }
    .callout-info { background: var(--info-bg); border-color: rgba(96,165,250,.35); } .callout-info .callout-icon, .callout-info strong { color: var(--info); }

    /* Keyboard focus — consistent on-brand indicator for every clickable element */
    a:focus-visible,
    .btn-ghost:focus-visible,
    details summary:focus-visible {
      outline: none;
      border-radius: 8px;
      box-shadow: 0 0 0 4px rgba(123, 79, 255, .35);
    }
    .btn-ghost:focus-visible { border-color: var(--brand); }
    /* Hexagonal (clip-path) buttons clip any outline/box-shadow/filter on themselves,
       so the focus ring is carried by an unclipped wrapper instead. */
    .btn-focus { display: inline-flex; border-radius: 11px; }
    .btn-focus-end { margin-left: auto; }
    .btn-focus:has(:focus-visible) {
      box-shadow: 0 0 0 4px rgba(123, 79, 255, .35);
    }
    .btn-sample:focus-visible,
    .btn-primary:focus-visible { outline: none; }

    /* Footer */
    .footer { text-align: center; color: var(--muted); font-size: 14px; margin-top: 58px; border-top: 1px solid var(--border-soft); padding-top: 32px; }
    .footer a { color: var(--brand-link); text-decoration: none; }
    .footer a:not(.footer-chip):hover { text-decoration: underline; }
    .footer .footer-links { display: flex; flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: center; gap: 16px; }
    .footer .footer-links a img { display: block; }
    .footer .footer-chip { display: inline-flex; align-items: center; height: 36px; box-sizing: border-box; border-radius: 8px; background: #0F1017; border: 1px solid #1A1C25; color: #E8E4FF; font-size: 13px; font-weight: 600; padding: 0 14px; transition: filter .15s ease; }
    .footer-chip:hover { filter: brightness(1.25); text-decoration: none; }
    .footer-chip:focus-visible { outline: none; border-color: var(--brand); box-shadow: 0 0 0 4px rgba(123, 79, 255, .35); text-decoration: none; }

    @media (max-width: 520px) {
      .site-header h1 { font-size: 1.25rem; }
      .cmp-row { flex-direction: column; gap: 2px; }
      .cmp-value { text-align: left; }
    }
