@font-face {
    font-family: "IBM Plex Sans";
    src: url("../../fonts/IBMPlexSans-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Sans";
    src: url("../../fonts/IBMPlexSans-Bold.woff2") format("woff2");
    font-style: normal;
    font-weight: 700;
    font-display: swap;
}

@font-face {
    font-family: "IBM Plex Mono";
    src: url("../../fonts/IBMPlexMono-Regular.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --ink: #0a0a0a;
    --paper: #f2f2ee;
    --white: #fff;
    --soft: #e5e5df;
    --muted: #656561;
    --line: 2px solid var(--ink);
    --content-width: 1600px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--ink);
    background: var(--paper);
    font-family: "IBM Plex Sans", Arial, sans-serif;
    font-size: 16px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

button,
input,
select,
textarea {
    font: inherit;
}

button,
a,
input,
select,
textarea {
    border-radius: 0;
}

button,
select,
input[type="checkbox"] {
    cursor: pointer;
}

a {
    color: inherit;
}

[hidden] {
    display: none !important;
}

::selection {
    color: var(--white);
    background: var(--ink);
}

.skip-link {
    position: fixed;
    z-index: 100;
    top: 8px;
    left: 8px;
    padding: 8px 12px;
    color: var(--white);
    background: var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    transform: translateY(-160%);
}

.skip-link:focus {
    transform: translateY(0);
}

:focus-visible {
    outline: 3px solid var(--ink);
    outline-offset: 3px;
}

.masthead {
    display: flex;
    min-height: 72px;
    align-items: stretch;
    justify-content: space-between;
    border-bottom: var(--line);
    background: var(--white);
}

.wordmark {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 0 28px 0 0;
    font-size: 18px;
    font-weight: 700;
    letter-spacing: .04em;
    text-decoration: none;
}

.wordmark-mark {
    display: grid;
    width: 72px;
    align-self: stretch;
    place-items: center;
    color: var(--white);
    background: var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 17px;
}

.masthead-meta {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 28px;
    border-left: var(--line);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .06em;
}

.meta-divider {
    color: var(--muted);
}

.app-shell {
    display: grid;
    width: min(100%, var(--content-width));
    min-height: calc(100vh - 72px - 54px);
    margin: 0 auto;
    grid-template-columns: 252px minmax(0, 1fr);
    border-right: var(--line);
    border-left: var(--line);
}

.sidebar {
    display: flex;
    min-width: 0;
    flex-direction: column;
    border-right: var(--line);
    background: var(--white);
}

.sidebar-heading,
.panel-label {
    display: flex;
    min-height: 40px;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 0 16px;
    border-bottom: 1px solid var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    font-weight: 400;
    letter-spacing: .08em;
}

.tool-nav {
    display: flex;
    flex-direction: column;
}

.tool-nav-link {
    display: grid;
    min-height: 76px;
    align-items: center;
    gap: 12px;
    padding: 12px 14px;
    border-bottom: 1px solid var(--ink);
    grid-template-columns: 26px minmax(0, 1fr) auto;
    text-decoration: none;
}

.tool-nav-link:hover,
.tool-nav-link[aria-current="page"] {
    color: var(--white);
    background: var(--ink);
}

.tool-number {
    align-self: start;
    padding-top: 2px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
}

.tool-nav-link strong,
.tool-nav-link small {
    display: block;
}

.tool-nav-link strong {
    font-size: 15px;
    letter-spacing: .02em;
}

.tool-nav-link small {
    margin-top: 1px;
    color: var(--muted);
    font-size: 12px;
}

.tool-nav-link:hover small,
.tool-nav-link[aria-current="page"] small {
    color: #c7c7c2;
}

.sidebar-note {
    margin-top: auto;
    padding: 20px 16px;
    border-top: 1px solid var(--ink);
}

.sidebar-note p {
    margin: 10px 0 0;
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    line-height: 1.75;
}

.eyebrow {
    margin: 0 0 18px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .08em;
}

.main-content {
    min-width: 0;
}

.tool-panel {
    min-height: 100%;
    padding: clamp(28px, 5vw, 72px);
}

.overview-panel {
    background-image:
        linear-gradient(rgba(10, 10, 10, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 10, 10, .045) 1px, transparent 1px);
    background-size: 32px 32px;
}

.hero-grid {
    display: grid;
    align-items: end;
    gap: 48px;
    margin-bottom: clamp(48px, 7vw, 92px);
    grid-template-columns: minmax(0, 1.8fr) minmax(250px, .8fr);
}

.hero-grid h1,
.tool-header h1 {
    margin: 0;
    font-size: clamp(48px, 6.3vw, 102px);
    font-weight: 700;
    letter-spacing: -.065em;
    line-height: .91;
}

.hero-copy {
    padding-bottom: 4px;
}

.hero-copy p {
    max-width: 430px;
    margin: 0 0 28px;
    font-size: clamp(17px, 1.5vw, 22px);
    line-height: 1.45;
}

.text-link {
    display: inline-flex;
    gap: 16px;
    align-items: center;
    padding-bottom: 5px;
    border-bottom: 2px solid var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    font-weight: 700;
    text-decoration: none;
}

.overview-grid {
    display: grid;
    border-top: var(--line);
    border-left: var(--line);
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.tool-card {
    display: flex;
    min-width: 0;
    min-height: 390px;
    flex-direction: column;
    padding: 20px;
    border-right: var(--line);
    border-bottom: var(--line);
    background: var(--white);
    text-decoration: none;
    transition: transform 120ms ease, box-shadow 120ms ease;
}

.tool-card:hover {
    z-index: 1;
    transform: translate(-4px, -4px);
    box-shadow: 6px 6px 0 var(--ink);
}

.tool-card.inverted {
    color: var(--white);
    background: var(--ink);
}

.card-index,
.card-action {
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: .08em;
}

.card-symbol {
    display: grid;
    width: 62px;
    height: 62px;
    margin: 28px 0 36px;
    place-items: center;
    border: 2px solid currentColor;
    font-family: "IBM Plex Mono", monospace;
    font-size: 20px;
}

.card-title {
    margin-bottom: 20px;
    font-size: clamp(21px, 1.55vw, 28px);
    font-weight: 700;
    letter-spacing: -.04em;
    line-height: 1;
}

.card-description {
    margin-bottom: 32px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.inverted .card-description {
    color: #bcbcb7;
}

.card-action {
    display: flex;
    justify-content: space-between;
    margin-top: auto;
    padding-top: 14px;
    border-top: 1px solid currentColor;
}

.tool-header {
    display: grid;
    align-items: end;
    gap: 48px;
    margin-bottom: clamp(40px, 6vw, 76px);
    grid-template-columns: minmax(0, 1.55fr) minmax(270px, .75fr);
}

.tool-header h1 {
    max-width: 830px;
    font-size: clamp(44px, 5.8vw, 88px);
}

.tool-header > p {
    max-width: 460px;
    margin: 0;
    font-size: 16px;
}

.workspace-grid,
.decoded-grid,
.jwt-details-grid {
    display: grid;
    align-items: stretch;
    gap: 20px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.control-panel,
.output-panel {
    min-width: 0;
    border: var(--line);
    background: var(--white);
}

.control-panel {
    padding: 0 20px 20px;
}

.control-panel > .panel-label {
    margin: 0 -20px 22px;
}

.output-panel {
    display: flex;
    flex-direction: column;
}

.field-grid {
    display: grid;
    gap: 18px 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.field-wide {
    grid-column: 1 / -1;
}

.field > span,
.check-field > span {
    display: block;
    margin-bottom: 7px;
    font-size: 13px;
    font-weight: 700;
}

.field small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    font-weight: 400;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.field input,
.field select,
.field textarea {
    display: block;
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: var(--white);
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.code-input:focus,
.code-output:focus {
    outline: 3px solid var(--ink);
    outline-offset: -4px;
}

.check-field {
    display: flex;
    min-height: 48px;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid var(--ink);
}

.check-field input {
    width: 18px;
    height: 18px;
    margin: 0;
    accent-color: var(--ink);
}

.check-field > span {
    margin: 0;
}

.check-field small {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    font-weight: 400;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 24px;
}

.button,
.mini-button {
    min-height: 44px;
    padding: 10px 15px;
    border: 1px solid var(--ink);
    color: var(--ink);
    background: var(--white);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .04em;
}

.button:hover,
.button.primary {
    color: var(--white);
    background: var(--ink);
}

.button.primary:hover {
    color: var(--ink);
    background: var(--white);
}

.button:disabled {
    cursor: not-allowed;
    opacity: .35;
}

.mini-button {
    min-height: 28px;
    padding: 4px 8px;
    font-size: 9px;
}

.mini-button:hover {
    color: var(--white);
    background: var(--ink);
}

.reference-panel {
    margin-top: 20px;
    border: var(--line);
    background: var(--white);
}

.reference-content {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(300px, .75fr);
}

.structure-map {
    display: grid;
    min-width: 0;
}

.emso-map {
    grid-template-columns: 1.6fr .65fr 1fr .55fr;
}

.vat-map {
    grid-template-columns: .55fr 1.45fr .55fr;
}

.structure-part {
    min-width: 0;
    padding: 20px 16px;
    border-right: 1px solid var(--ink);
}

.structure-part:last-child {
    border-right: 0;
}

.structure-part > span {
    display: block;
    margin-bottom: 18px;
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    letter-spacing: .08em;
}

.structure-part strong {
    display: block;
    margin-bottom: 14px;
    font-family: "IBM Plex Mono", monospace;
    font-size: clamp(19px, 2.2vw, 32px);
    font-weight: 400;
    letter-spacing: -.06em;
    line-height: 1;
    overflow-wrap: anywhere;
}

.structure-part p {
    margin: 0;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.45;
}

.reference-copy {
    padding: 24px;
    border-left: var(--line);
}

.reference-copy .eyebrow {
    margin-bottom: 12px;
}

.reference-copy h2 {
    margin: 0 0 12px;
    font-size: clamp(22px, 2.4vw, 34px);
    letter-spacing: -.04em;
    line-height: 1.05;
}

.reference-copy > p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
    font-size: 12px;
}

.reference-links {
    margin: 22px 0 0;
    padding: 0;
    border-bottom: 1px solid var(--ink);
    list-style: none;
}

.reference-links li {
    border-top: 1px solid var(--ink);
}

.reference-links a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    font-family: "IBM Plex Mono", monospace;
    font-size: 9px;
    text-decoration: none;
}

.reference-links a:hover {
    font-weight: 700;
}

.visually-hidden {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    overflow: hidden !important;
    clip: rect(0 0 0 0) !important;
    clip-path: inset(50%) !important;
    white-space: nowrap !important;
}

.file-drop {
    display: flex;
    min-height: 128px;
    align-items: center;
    justify-content: center;
    gap: 18px;
    margin-bottom: 20px;
    padding: 20px;
    border: 2px dashed var(--ink);
    background: var(--paper);
    cursor: pointer;
    text-align: left;
}

.file-drop:hover,
.file-drop.is-dragging,
.file-drop:focus-within {
    color: var(--white);
    background: var(--ink);
}

.file-drop-icon {
    display: grid;
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    place-items: center;
    border: 2px solid currentColor;
    font-family: "IBM Plex Mono", monospace;
    font-size: 13px;
}

.file-drop strong,
.file-drop small {
    display: block;
}

.file-drop strong {
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
    letter-spacing: .04em;
}

.file-drop small {
    max-width: 300px;
    margin-top: 5px;
    overflow: hidden;
    color: var(--muted);
    font-size: 12px;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.file-drop:hover small,
.file-drop.is-dragging small,
.file-drop:focus-within small {
    color: #c7c7c2;
}

.qif-options {
    margin-top: 4px;
}

.qif-output {
    min-height: 655px;
    flex: 1;
    padding: 18px;
}

.inline-status,
.panel-footnote {
    color: var(--muted);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
}

.inline-status {
    min-height: 1.5em;
    margin: 16px 0 0;
}

.inline-status.is-error {
    color: var(--ink);
    font-weight: 700;
}

.inline-status.is-error::before {
    content: "NAPAKA / ";
}

.code-input,
.code-output,
.code-block {
    tab-size: 4;
    color: var(--ink);
    background: var(--white);
    font-family: "IBM Plex Mono", Consolas, monospace;
    font-size: 13px;
    line-height: 1.6;
}

.code-input,
.code-output {
    width: 100%;
    resize: vertical;
}

.code-output {
    border: 0;
}

.identifier-output {
    min-height: 345px;
    flex: 1;
    padding: 18px;
}

.panel-footnote {
    margin: auto 0 0;
    padding: 11px 16px;
    border-top: 1px solid var(--ink);
}

.compact-panel {
    padding-bottom: 16px;
}

.compact-panel > .panel-label {
    margin-bottom: 0;
}

.jwt-input {
    min-height: 130px;
    padding: 16px;
    border: 0;
    border-bottom: 1px solid var(--ink);
}

.compact-panel > .jwt-input {
    width: calc(100% + 40px);
    margin-left: -20px;
}

.validation-strip {
    display: grid;
    margin-top: 20px;
    border-top: var(--line);
    border-left: var(--line);
    background: var(--white);
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.validation-strip > div {
    display: flex;
    min-width: 0;
    min-height: 64px;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 12px 14px;
    border-right: var(--line);
    border-bottom: var(--line);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
}

.state {
    padding: 4px 7px;
    border: 1px solid currentColor;
    font-size: 9px;
    white-space: nowrap;
}

.state.valid {
    color: var(--white);
    background: var(--ink);
}

.state.invalid {
    border-style: dashed;
}

.state.neutral {
    color: var(--muted);
}

.prominent-status {
    min-height: 22px;
    margin: 12px 0 18px;
}

.decoded-grid,
.jwt-details-grid {
    margin-top: 20px;
}

.code-block {
    min-height: 260px;
    max-height: 460px;
    margin: 0;
    overflow: auto;
    padding: 18px;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
}

.claim-list {
    display: flex;
    flex-direction: column;
}

.claim-row {
    display: grid;
    gap: 12px;
    padding: 11px 0;
    border-bottom: 1px solid var(--soft);
    grid-template-columns: 88px minmax(0, 1fr);
    font-size: 12px;
}

.claim-row:last-child {
    border-bottom: 0;
}

.claim-row strong {
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
}

.claim-row span {
    overflow-wrap: anywhere;
}

.key-input {
    min-height: 102px !important;
    resize: vertical;
    font-family: "IBM Plex Mono", monospace !important;
    font-size: 11px !important;
}

.compact-field {
    display: grid;
    align-items: center;
    gap: 12px;
    grid-template-columns: auto minmax(130px, 1fr);
}

.compact-field > span {
    margin: 0;
}

.compact-field select {
    min-height: 40px;
}

.json-toolbar {
    display: grid;
    align-items: end;
    gap: 14px;
    margin-bottom: 20px;
    padding: 14px;
    grid-template-columns: 210px auto minmax(280px, 1fr);
}

.json-toolbar .field > span {
    margin-bottom: 5px;
}

.toolbar-check {
    min-height: 48px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.json-grid {
    margin-top: 0;
}

.json-editor {
    min-height: min(52vh, 620px);
    padding: 18px;
    border: 0;
    resize: vertical;
}

.toast {
    position: fixed;
    z-index: 20;
    right: 22px;
    bottom: 22px;
    max-width: min(360px, calc(100vw - 44px));
    padding: 13px 16px;
    border: var(--line);
    color: var(--white);
    background: var(--ink);
    box-shadow: 5px 5px 0 var(--white), 7px 7px 0 var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 11px;
}

.site-footer {
    display: flex;
    min-height: 54px;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-top: var(--line);
    color: var(--white);
    background: var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: .06em;
}

.site-footer a {
    text-decoration: none;
}

.site-footer-links {
    display: flex;
    align-items: center;
    gap: 24px;
}

.site-footer a:hover {
    text-decoration: underline;
    text-underline-offset: 4px;
}

.policy-main {
    min-height: calc(100vh - 72px - 54px);
    padding: clamp(28px, 5vw, 72px);
    background-image:
        linear-gradient(rgba(10, 10, 10, .045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(10, 10, 10, .045) 1px, transparent 1px);
    background-size: 32px 32px;
}

.policy-shell {
    width: min(100%, 1080px);
    margin: 0 auto;
    border-top: var(--line);
    border-left: var(--line);
    background: var(--white);
}

.policy-hero {
    display: grid;
    gap: 40px;
    padding: clamp(28px, 5vw, 64px);
    border-right: var(--line);
    border-bottom: var(--line);
    grid-template-columns: minmax(0, 1.4fr) minmax(260px, .6fr);
}

.policy-hero h1 {
    max-width: 760px;
    margin: 0;
    font-size: clamp(48px, 7vw, 88px);
    font-weight: 700;
    letter-spacing: -.06em;
    line-height: .92;
}

.policy-hero-copy {
    align-self: end;
}

.policy-hero-copy p {
    margin: 0 0 20px;
    font-size: 17px;
}

.policy-updated {
    display: block;
    font-family: "IBM Plex Mono", monospace;
    font-size: 10px;
    letter-spacing: .06em;
}

.policy-section {
    display: grid;
    border-right: var(--line);
    border-bottom: var(--line);
    grid-template-columns: minmax(190px, .34fr) minmax(0, 1fr);
}

.policy-section > h2 {
    margin: 0;
    padding: 28px;
    border-right: 1px solid var(--ink);
    font-family: "IBM Plex Mono", monospace;
    font-size: 12px;
    letter-spacing: .08em;
    line-height: 1.45;
}

.policy-copy {
    min-width: 0;
    padding: 28px clamp(24px, 4vw, 48px);
}

.policy-copy > :first-child {
    margin-top: 0;
}

.policy-copy > :last-child {
    margin-bottom: 0;
}

.policy-copy p,
.policy-copy li {
    max-width: 760px;
}

.policy-copy ul {
    margin: 16px 0;
    padding-left: 20px;
}

.policy-copy li + li {
    margin-top: 8px;
}

.policy-copy code {
    padding: 2px 5px;
    border: 1px solid var(--ink);
    background: var(--paper);
    font-family: "IBM Plex Mono", monospace;
    font-size: .85em;
}

.policy-copy a {
    text-underline-offset: 3px;
}

.policy-note {
    padding: 16px;
    border: 1px dashed var(--ink);
    background: var(--paper);
}

@media (max-width: 1180px) {
    .overview-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-card {
        min-height: 350px;
    }

    .json-toolbar {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .toolbar-actions {
        justify-content: flex-start;
        grid-column: 1 / -1;
    }

    .reference-content {
        grid-template-columns: 1fr;
    }

    .reference-copy {
        border-top: var(--line);
        border-left: 0;
    }

}

@media (max-width: 860px) {
    .masthead-meta {
        padding: 0 16px;
    }

    .app-shell {
        display: block;
        border: 0;
    }

    .sidebar {
        position: sticky;
        z-index: 20;
        top: 0;
        display: block;
        overflow: hidden;
        border-top: 0;
        border-right: 0;
        border-bottom: var(--line);
    }

    .sidebar-heading,
    .sidebar-note {
        display: none;
    }

    .tool-nav {
        display: grid;
        width: 100%;
        min-width: 0;
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }

    .tool-nav-link {
        min-width: 0;
        min-height: 66px;
        padding: 8px 10px;
        border-right: 1px solid var(--ink);
        border-bottom: 0;
        grid-template-columns: 20px minmax(0, 1fr);
    }

    .tool-nav-link:last-child {
        border-right: 0;
    }

    .tool-nav-link > span:last-child {
        display: none;
    }

    .hero-grid,
    .tool-header {
        align-items: start;
        gap: 28px;
        grid-template-columns: 1fr;
    }

    .workspace-grid,
    .jwt-details-grid {
        grid-template-columns: 1fr;
    }

    .policy-hero {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .masthead {
        min-height: 58px;
    }

    .wordmark {
        gap: 12px;
        padding-right: 12px;
        font-size: 14px;
    }

    .wordmark-mark {
        width: 58px;
    }

    .masthead-meta {
        display: none;
    }

    .wordmark {
        width: 100%;
    }

    .app-shell {
        min-height: calc(100vh - 58px - 54px);
    }

    .tool-nav-link {
        display: flex;
        min-height: 56px;
        align-items: center;
        justify-content: center;
        padding: 6px 4px;
        text-align: center;
    }

    .tool-nav-link .tool-number,
    .tool-nav-link small {
        display: none;
    }

    .tool-nav-link strong {
        font-size: 12px;
    }

    .tool-panel {
        padding: 34px 16px 46px;
    }

    .hero-grid h1,
    .tool-header h1 {
        font-size: clamp(40px, 12vw, 54px);
    }

    .hero-grid {
        margin-bottom: 46px;
    }

    .overview-grid,
    .decoded-grid,
    .json-toolbar {
        grid-template-columns: 1fr;
    }

    .tool-card {
        min-height: 330px;
    }

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

    .validation-strip > div {
        min-height: 52px;
    }

    .field-grid {
        grid-template-columns: 1fr;
    }

    .field-wide {
        grid-column: auto;
    }

    .json-toolbar {
        align-items: stretch;
    }

    .toolbar-actions {
        grid-column: auto;
    }

    .toolbar-actions .button,
    .form-actions .button {
        flex: 1 1 150px;
    }

    .json-editor {
        min-height: 330px;
    }

    .emso-map {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .vat-map {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .structure-part {
        padding: 16px 12px;
    }

    .emso-map .structure-part:nth-child(2) {
        border-right: 0;
    }

    .emso-map .structure-part:nth-child(-n + 2) {
        border-bottom: 1px solid var(--ink);
    }

    .reference-copy {
        padding: 20px 16px;
    }

    .site-footer {
        min-height: 68px;
        gap: 10px;
        padding: 0 14px;
        flex-wrap: wrap;
    }

    .site-footer-links {
        gap: 14px;
    }

    .policy-main {
        min-height: calc(100vh - 58px - 68px);
        padding: 24px 16px 36px;
    }

    .policy-hero {
        gap: 28px;
        padding: 28px 20px;
    }

    .policy-hero h1 {
        font-size: clamp(42px, 13vw, 62px);
    }

    .policy-section {
        grid-template-columns: 1fr;
    }

    .policy-section > h2 {
        padding: 16px 20px;
        border-right: 0;
        border-bottom: 1px solid var(--ink);
    }

    .policy-copy {
        padding: 22px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .tool-card {
        transition: none;
    }
}

@media print {
    .masthead,
    .sidebar,
    .site-footer,
    .form-actions,
    .json-toolbar {
        display: none;
    }

    .app-shell {
        display: block;
        border: 0;
    }

    .tool-panel {
        padding: 0;
    }
}
