/* Converter Tools. Uses Public Tools' --pt-* variables, so it follows the site's light and dark mode and accent. */
.cx { --cx-r: var(--pt-radius, .75rem); --cx-surface: var(--color-surface, #fff); display: grid; gap: 1rem; margin: 0 0 2.5rem; min-width: 0; }
.cx [hidden] { display: none !important; }
.cx *, .cx *::before, .cx *::after { box-sizing: border-box; }
.cx > *, .cx-card > *, .cx-result > * { min-width: 0; }
.cx svg { flex: none; }
.cx .pt-btn svg { width: 1rem; height: 1rem; }
.cx .pt-input, .cx .pt-select { min-height: 2.75rem; }
.cx .pt-field { margin: 0; }
.cx-card { display: grid; gap: .9rem; align-content: start; padding: 1.1rem; border: 1px solid var(--pt-line); border-radius: var(--cx-r); background: var(--cx-surface); }
.cx-card__title { margin: 0; font-size: 1rem; font-weight: 700; line-height: 1.3; color: var(--pt-ink); }
.cx-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.cx-msg:empty { display: none; }
.cx-msg { margin: 0; }
.cx-stats { margin: 0; font-size: .875rem; color: var(--pt-muted); }
.cx-stats:empty { display: none; }
.cx-hint { margin: 0; color: var(--pt-muted); }
.cx-hint--error { color: var(--pt-error); font-weight: 600; }
.cx-code { font-family: var(--pt-mono, ui-monospace, SFMono-Regular, Menlo, Consolas, monospace); font-size: .9rem; }
.cx-note { margin: 0; padding: .7rem .85rem; border-radius: calc(var(--cx-r) - .25rem); font-size: .9rem; border: 1px solid var(--pt-line); }
.cx-note--warn { border-color: var(--pt-warn); background: var(--pt-warn-soft); color: var(--pt-ink); }
.cx-badge { display: inline-block; margin-left: .4rem; padding: .05rem .45rem; border-radius: 999px; font-size: .75rem; font-weight: 700; background: var(--pt-accent-soft); color: var(--pt-accent-strong, var(--pt-accent)); vertical-align: .05em; }
.cx-icon-btn { min-width: 2.5rem; min-height: 2.5rem; justify-content: center; padding-left: .5rem; padding-right: .5rem; }
.cx-x { width: 1rem; height: 1rem; }
.cx-x-text { font-size: 1.25rem; line-height: 1; }
.cx-row2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.cx-span2 { grid-column: 1 / -1; margin: 0; }
.cx-narrow { max-width: 8rem; }
.cx-seg { max-width: 100%; justify-self: start; }
.cx-seg--wrap { display: flex; }

/* Box with a button or select attached */
.cx-io { display: flex; gap: .5rem; align-items: stretch; min-width: 0; }
.cx-io > .pt-input { flex: 1 1 auto; min-width: 0; }
.cx-io--btn > .pt-btn { flex: none; }

/* On/off switch */
.cx-toggle { display: inline-flex; align-items: center; gap: .6rem; min-height: 2.25rem; cursor: pointer; font-size: .9375rem; color: var(--pt-ink); }
.cx-toggle input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.cx-toggle__track { position: relative; flex: none; width: 2.5rem; height: 1.4rem; border-radius: 999px; background: var(--pt-line-strong); transition: background-color .15s; }
.cx-toggle__track::after { content: ""; position: absolute; top: .2rem; left: .2rem; width: 1rem; height: 1rem; border-radius: 50%; background: var(--cx-surface); box-shadow: 0 1px 2px rgb(0 0 0 / .25); transition: transform .15s; }
.cx-toggle input:checked + .cx-toggle__track { background: var(--pt-accent); }
.cx-toggle input:checked + .cx-toggle__track::after { transform: translateX(1.1rem); }
.cx-toggle input:focus-visible + .cx-toggle__track { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.cx-opts__toggles { display: flex; flex-wrap: wrap; gap: .25rem 1.5rem; }

/* Drop zone */
.cx-drop { position: relative; }
.cx-drop__label { display: grid; justify-items: center; gap: .3rem; padding: 1.5rem 1rem; text-align: center; cursor: pointer; border: 2px dashed var(--pt-line-strong); border-radius: var(--cx-r); background: var(--pt-soft); color: var(--pt-text); transition: border-color .15s, background-color .15s; }
.cx-drop__label svg { width: 1.75rem; height: 1.75rem; color: var(--pt-accent); }
.cx-drop__label:hover, .cx-drop.is-over .cx-drop__label { border-color: var(--pt-accent); background: var(--pt-accent-soft); }
.cx-drop__input:focus-visible + .cx-drop__label { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.cx-drop__title { font-weight: 700; color: var(--pt-ink); }
.cx-drop__hint { font-size: .85rem; color: var(--pt-muted); }

/* -- Unit converter -- */
.cx-cats { margin: 0; padding: 0; border: 0; min-width: 0; }
.cx-legend { margin: 0 0 .5rem; padding: 0; font-size: .9rem; font-weight: 600; color: var(--pt-ink); }
.cx-cats__list { display: flex; flex-wrap: wrap; gap: .4rem; }
.cx-chip { position: relative; cursor: pointer; }
.cx-chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.cx-chip > span { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.5rem; padding: .4rem .8rem; border: 1px solid var(--pt-line); border-radius: 999px; background: var(--cx-surface); color: var(--pt-text); font-size: .875rem; font-weight: 600; }
.cx-chip > span svg { width: 1rem; height: 1rem; }
.cx-chip:hover > span { border-color: var(--pt-line-strong); }
.cx-chip input:checked + span { border-color: var(--pt-accent); background: var(--pt-accent-soft); color: var(--pt-accent-strong, var(--pt-accent)); }
.cx-chip input:focus-visible + span { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
@media (max-width: 35rem) {
    .cx-cats__list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .35rem; }
    .cx-chip > span { width: 100%; justify-content: center; padding: .35rem .25rem; border-radius: .6rem; font-size: .78rem; text-align: center; }
    .cx-chip > span svg { display: none; }
}
.cx-pair { display: grid; gap: .75rem; align-items: end; padding: 1.1rem; border: 1px solid var(--pt-line); border-radius: var(--cx-r); background: var(--cx-surface); }
@media (min-width: 48rem) { .cx-pair { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); } }
.cx-side { display: grid; gap: .35rem; min-width: 0; }
.cx-side .cx-io { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: .5rem; }
@media (min-width: 48rem) { .cx-side .cx-io { grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); } }
.cx-val { font-size: 1.15rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.cx-swap { display: inline-grid; place-items: center; width: 2.75rem; height: 2.75rem; margin: 0 auto; border: 1px solid var(--pt-line-strong); border-radius: 50%; background: var(--cx-surface); color: var(--pt-accent); cursor: pointer; }
.cx-swap:hover { background: var(--pt-accent-soft); border-color: var(--pt-accent); }
.cx-swap:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.cx-swap svg { width: 1.25rem; height: 1.25rem; }
.cx-swap__h { display: none; }
@media (min-width: 48rem) { .cx-swap__h { display: block; } .cx-swap__v { display: none; } .cx-pair .cx-swap { margin-bottom: .05rem; } }
.cx-result { display: grid; gap: .9rem; padding: 1.1rem; border: 1px solid var(--pt-line); border-radius: var(--cx-r); background: var(--pt-soft); }
.cx-out { display: grid; gap: .35rem; min-width: 0; }
.cx-hero { display: grid; gap: .1rem; }
.cx-hero__from { margin: 0; font-size: .95rem; color: var(--pt-muted); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cx-hero__value { margin: 0; font-size: clamp(1.75rem, 6vw, 2.5rem); font-weight: 800; line-height: 1.15; color: var(--pt-ink); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cx-hero__unit { font-size: .55em; font-weight: 700; color: var(--pt-accent-strong, var(--pt-accent)); }
.cx-sentence, .cx-extra, .cx-formula { margin: 0; color: var(--pt-text); overflow-wrap: anywhere; }
.cx-extra { font-weight: 700; color: var(--pt-ink); }
.cx-formula { font-size: .875rem; color: var(--pt-muted); font-variant-numeric: tabular-nums; }
.cx-formula__label { font-weight: 600; }
.cx-dp { display: inline-flex; align-items: center; gap: .45rem; margin-left: auto; font-size: .875rem; color: var(--pt-muted); }
.cx-dp .pt-select { width: auto; min-height: 2.5rem; padding-right: 2rem; }
.cx-allbox { border: 1px solid var(--pt-line); border-radius: var(--cx-r); background: var(--cx-surface); }
.cx-allbox > summary { cursor: pointer; display: flex; align-items: center; gap: .5rem; padding: .5rem 1rem; min-height: 3rem; font-weight: 600; color: var(--pt-ink); list-style: none; }
.cx-allbox > summary::-webkit-details-marker { display: none; }
.cx-allbox > summary::before { content: ""; flex: none; width: .5rem; height: .5rem; border-right: 2px solid var(--pt-muted); border-bottom: 2px solid var(--pt-muted); transform: rotate(-45deg); transition: transform .15s; }
.cx-allbox[open] > summary::before { transform: rotate(45deg); }
.cx-allbox > summary:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; border-radius: inherit; }
.cx-allbox .pt-table-wrap { margin: 0 1rem 1rem; }
.cx-alltable td.cx-num { text-align: right; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.cx-alltable td.cx-sym { color: var(--pt-muted); white-space: nowrap; }
.cx-alltable th[scope=row] { font-weight: 600; }
.cx-alltable tr.is-current th, .cx-alltable tr.is-current td { background: var(--pt-accent-soft); }
.cx-picks { display: flex; flex-wrap: wrap; gap: .4rem; margin: 0 0 1rem; padding: 0; list-style: none; }
.cx-picks a { display: inline-flex; align-items: center; min-height: 2.25rem; padding: .3rem .75rem; border: 1px solid var(--pt-line); border-radius: 999px; font-size: .875rem; font-weight: 600; color: var(--pt-text); text-decoration: none; background: var(--cx-surface, var(--color-surface, #fff)); }
.cx-picks a:hover { border-color: var(--pt-accent); color: var(--pt-accent-strong, var(--pt-accent)); }
.cx-refgrid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)); align-items: start; margin: 0 0 1rem; }
.cx-ref { margin: 0 0 1rem; }
.cx-refgrid .cx-ref { margin: 0; }
.cx-ref caption { caption-side: top; text-align: left; padding: 0 0 .4rem; font-weight: 700; color: var(--pt-ink); }
.cx-ref td { font-variant-numeric: tabular-nums; }

/* -- Time zones -- */
.cx-tz__grid { display: grid; gap: .75rem; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.cx-tz__from { grid-column: 1 / -1; }
@media (min-width: 48rem) { .cx-tz__grid { grid-template-columns: 11rem 9rem minmax(0, 1fr); } .cx-tz__from { grid-column: auto; } }
.cx-tzlist { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.cx-tzrow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: .5rem 1rem; padding: .75rem .9rem; border: 1px solid var(--pt-line); border-radius: calc(var(--cx-r) - .15rem); background: var(--cx-surface); }
.cx-tzrow.is-from { border-color: var(--pt-accent); box-shadow: inset 3px 0 0 var(--pt-accent); }
.cx-tzrow p { margin: 0; }
.cx-tzrow__city { font-weight: 700; color: var(--pt-ink); overflow-wrap: anywhere; }
.cx-tzrow__zone { font-size: .8rem; color: var(--pt-muted); }
.cx-tzrow__when { text-align: right; }
.cx-tzrow__time { font-size: 1.4rem; font-weight: 800; line-height: 1.2; color: var(--pt-ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.cx-tzrow__day { font-size: .8rem; color: var(--pt-muted); white-space: nowrap; }
.cx-tzrow__side { display: flex; align-items: center; gap: .25rem; justify-content: flex-end; min-width: 7.5rem; }
.cx-tzrow__rel { font-size: .8rem; font-weight: 600; color: var(--pt-muted); white-space: nowrap; }
@media (max-width: 30rem) {
    .cx-tzrow { gap: .25rem .6rem; padding: .6rem .5rem .6rem .75rem; }
    .cx-tzrow__side { flex-direction: column-reverse; align-items: center; gap: 0; min-width: 2.75rem; }
    .cx-tzrow__rel { font-size: .72rem; }
    .cx-tzrow__time { font-size: 1.2rem; }
    .cx-tzrow__day { font-size: .75rem; }
}
.cx-tz__add { display: grid; gap: .35rem; }
.cx-plan__best { margin: 0; color: var(--pt-text); font-weight: 600; }
.cx-plan__wrap { overflow-x: auto; border: 1px solid var(--pt-line); border-radius: calc(var(--cx-r) - .25rem); -webkit-overflow-scrolling: touch; }
.cx-plan__wrap:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
.cx-plan__table { border-collapse: collapse; font-size: .8rem; font-variant-numeric: tabular-nums; width: max-content; min-width: 100%; }
.cx-plan__table th, .cx-plan__table td { padding: 0; text-align: center; border-left: 1px solid var(--pt-line); }
.cx-plan__table thead th { background: var(--pt-soft); color: var(--pt-muted); font-weight: 600; }
.cx-plan__table thead th button { display: block; width: 100%; min-width: 2.5rem; min-height: 2.25rem; padding: .25rem .2rem; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; }
.cx-plan__table thead th button:hover { color: var(--pt-accent); }
.cx-plan__table thead th button:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: -2px; }
.cx-plan__table tbody th, .cx-plan__corner { position: sticky; left: 0; z-index: 1; min-width: 6.5rem; max-width: 9rem; padding: .35rem .6rem !important; text-align: left !important; background: var(--cx-surface); color: var(--pt-ink); font-weight: 600; border-left: 0 !important; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; box-shadow: 1px 0 0 var(--pt-line); }
.cx-plan__corner { font-size: .72rem; color: var(--pt-muted) !important; white-space: normal !important; }
.cx-plan__table tbody td { min-width: 2.5rem; height: 2.25rem; padding: 0 .15rem; border-top: 1px solid var(--pt-line); }
.cx-plan__table td.is-work { background: color-mix(in srgb, var(--pt-ok) 24%, transparent); color: var(--pt-ink); font-weight: 700; }
.cx-plan__table td.is-awake { background: color-mix(in srgb, var(--pt-warn) 13%, transparent); color: var(--pt-text); }
.cx-plan__table td.is-night { background: transparent; color: var(--pt-muted); }
.cx-plan__table .is-sel { box-shadow: inset 2px 0 0 var(--pt-accent), inset -2px 0 0 var(--pt-accent); }
.cx-plan__table thead th.is-sel { color: var(--pt-accent-strong, var(--pt-accent)); font-weight: 800; }
.cx-plan__key { display: flex; flex-wrap: wrap; gap: .3rem 1.1rem; margin: 0; padding: 0; list-style: none; font-size: .8rem; color: var(--pt-muted); }
.cx-plan__key li { display: inline-flex; align-items: center; gap: .4rem; }
.cx-dot { width: .8rem; height: .8rem; border-radius: 3px; border: 1px solid var(--pt-line-strong); }
.cx-dot.is-work { background: color-mix(in srgb, var(--pt-ok) 24%, transparent); }
.cx-dot.is-awake { background: color-mix(in srgb, var(--pt-warn) 13%, transparent); }
.cx-dot.is-night { background: transparent; }

/* -- Images -- */
.cx-img__grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 56rem) { .cx-img__grid { grid-template-columns: minmax(0, 1fr) minmax(16rem, 20rem); } .cx-img__opts { position: sticky; top: 5rem; } }
.cx-img__main { display: grid; gap: .75rem; min-width: 0; }
.cx-img__opts .pt-label output { font-weight: 700; color: var(--pt-ink); margin-left: .25rem; }
.cx-range { width: 100%; accent-color: var(--pt-accent); min-height: 2rem; }
.cx-colorrow { display: flex; align-items: center; gap: .75rem; }
.cx-colorrow input[type="color"] { width: 3.5rem; height: 2.5rem; padding: .2rem; border: 1px solid var(--pt-line-strong); border-radius: .5rem; background: var(--cx-surface); cursor: pointer; }
.cx-checks { display: flex; flex-wrap: wrap; gap: .35rem .9rem; margin: 0; padding: 0; border: 0; min-width: 0; }
.cx-checks legend { width: 100%; margin-bottom: .35rem; }
.cx-check { display: inline-flex; align-items: center; gap: .4rem; min-height: 2.25rem; font-size: .9375rem; color: var(--pt-ink); cursor: pointer; }
.cx-check input { width: 1.1rem; height: 1.1rem; accent-color: var(--pt-accent); }
.cx-private { display: flex; gap: .5rem; align-items: flex-start; margin: 0; font-size: .8125rem; color: var(--pt-muted); }
.cx-private svg { width: 1rem; height: 1rem; margin-top: .1rem; color: var(--pt-ok); }
.cx-files { display: grid; gap: .5rem; margin: 0; padding: 0; list-style: none; }
.cx-files:empty { display: none; }
.cx-file { display: grid; grid-template-columns: 3.5rem minmax(0, 1fr) auto; gap: .75rem; align-items: center; padding: .6rem; border: 1px solid var(--pt-line); border-radius: calc(var(--cx-r) - .15rem); background: var(--cx-surface); }
.cx-file__thumb { width: 3.5rem; height: 3.5rem; border-radius: .45rem; background: repeating-conic-gradient(var(--pt-soft) 0 25%, var(--cx-surface) 0 50%) 0 0 / 12px 12px; background-size: contain; background-position: center; background-repeat: no-repeat; border: 1px solid var(--pt-line); }
.cx-file__body { min-width: 0; }
.cx-file__body p { margin: 0; }
.cx-file__name { font-weight: 600; color: var(--pt-ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-file__meta { font-size: .8rem; color: var(--pt-muted); }
.cx-file__state { font-size: .85rem; color: var(--pt-text); }
.cx-file__state.is-error { color: var(--pt-error); font-weight: 600; }
.cx-file__ok { font-weight: 600; color: var(--pt-ink); }
.cx-file__change { color: var(--pt-muted); }
.cx-file__note { color: var(--pt-warn); }
.cx-file__actions { display: flex; gap: .25rem; align-items: center; }
@media (max-width: 30rem) {
    .cx-file { grid-template-columns: 3rem minmax(0, 1fr); }
    .cx-file__thumb { width: 3rem; height: 3rem; }
    .cx-file__actions { grid-column: 1 / -1; justify-content: space-between; }
}
.cx-bar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding: .75rem .9rem; border-radius: calc(var(--cx-r) - .15rem); background: var(--pt-soft); }
.cx-bar__sum { margin: 0; font-size: .875rem; color: var(--pt-text); }

/* -- CSV, Base64 -- */
.cx-csv__top { display: grid; gap: .75rem; align-items: center; }
@media (min-width: 48rem) { .cx-csv__top { grid-template-columns: auto minmax(0, 1fr); } .cx-csv__top .cx-drop__label { padding: .85rem 1rem; grid-auto-flow: column; justify-content: center; align-items: center; gap: .6rem; } .cx-csv__top .cx-drop__label svg { width: 1.35rem; height: 1.35rem; } }
.cx-opts__row { display: grid; gap: .75rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 10rem), 1fr)); align-items: end; }
.cx-opts__row > .cx-opts__toggles { grid-column: 1 / -1; }
.cx-io2 { display: grid; gap: .75rem; }
@media (min-width: 56rem) { .cx-io2:not(.cx-io2--stack) { grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: start; } .cx-io2 .cx-swap--io { margin-top: 3rem; } }
.cx-io2 > .pt-field { display: grid; gap: .35rem; min-width: 0; }
.cx-io2__head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .35rem; min-height: 2.5rem; }
.cx-io2__head .pt-label { margin: 0; }
.cx-io2__tools { display: inline-flex; flex-wrap: wrap; gap: .35rem; }
.cx .pt-textarea.cx-code { min-height: 12rem; resize: vertical; white-space: pre; overflow: auto; tab-size: 4; }
.cx-b64 .pt-textarea.cx-code { min-height: 9rem; white-space: pre-wrap; overflow-wrap: anywhere; word-break: break-all; }
.cx-preview .pt-table-wrap { max-height: 24rem; overflow: auto; }
.cx-previewtable caption { caption-side: top; text-align: left; padding: 0 0 .4rem; font-weight: 700; color: var(--pt-ink); }
.cx-previewtable td { max-width: 18rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cx-previewtable th { white-space: nowrap; }
.cx-filebox { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; padding: .6rem .85rem; border: 1px solid var(--pt-accent); border-radius: calc(var(--cx-r) - .15rem); background: var(--pt-accent-soft); color: var(--pt-ink); font-weight: 600; overflow-wrap: anywhere; }
.cx-filebox svg { width: 1.1rem; height: 1.1rem; color: var(--pt-accent); }
.cx-filebox .pt-btn { margin-left: auto; }
.cx-b64__preview { display: grid; place-items: center; padding: .75rem; border: 1px solid var(--pt-line); border-radius: var(--cx-r); background: repeating-conic-gradient(var(--pt-soft) 0 25%, var(--cx-surface) 0 50%) 0 0 / 16px 16px; }
.cx-b64__preview img { max-width: 100%; max-height: 22rem; height: auto; display: block; }

/* -- Number bases -- */
.cx-numgrid { display: grid; gap: .9rem 1rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr)); }
.cx-numfield { display: grid; gap: .3rem; }
.cx-numfield .pt-help { margin: 0; }
.cx-numfield .cx-code { font-size: 1rem; }
.cx-numlabel { display: flex; align-items: center; gap: .5rem; }
.cx-numlabel .pt-label { margin: 0; }
.cx-inline-select { width: auto !important; min-height: 2.25rem !important; padding-top: .2rem; padding-bottom: .2rem; padding-right: 2rem; }
.cx-kv { display: grid; gap: .4rem; margin: 0; }
.cx-kv > div { display: grid; grid-template-columns: minmax(9rem, max-content) minmax(0, 1fr); gap: .75rem; padding: .45rem .7rem; border-radius: .45rem; background: var(--pt-soft); }
.cx-kv dt { margin: 0; font-size: .85rem; font-weight: 600; color: var(--pt-muted); }
.cx-kv dd { margin: 0; font-family: var(--pt-mono, ui-monospace, monospace); font-size: .875rem; color: var(--pt-ink); overflow-wrap: anywhere; }
@media (max-width: 30rem) { .cx-kv > div { grid-template-columns: minmax(0, 1fr); gap: .15rem; } }

/* -- Colours -- */
.cx-col__grid { display: grid; gap: 1rem; align-items: start; }
@media (min-width: 52rem) { .cx-col__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); } }
.cx-col__swatch { --cx-swatch: #7c3aed; height: 7rem; border-radius: calc(var(--cx-r) - .15rem); border: 1px solid var(--pt-line); background: linear-gradient(var(--cx-swatch), var(--cx-swatch)), repeating-conic-gradient(#e2e8f0 0 25%, #fff 0 50%) 0 0 / 16px 16px; }
.cx-col__pick { flex: none; width: 3.25rem; height: auto; min-height: 2.75rem; padding: .2rem; border: 1px solid var(--pt-line-strong); border-radius: var(--pt-radius-sm, .5rem); background: var(--cx-surface); cursor: pointer; }
.cx-col__name { display: flex; align-items: center; gap: .4rem; margin: 0; font-size: .9rem; color: var(--pt-text); }
.cx-col__name svg { width: 1rem; height: 1rem; color: var(--pt-muted); }
.cx-col__outs { gap: .55rem; }
.cx-colout { display: grid; grid-template-columns: 4.25rem minmax(0, 1fr) auto; align-items: center; gap: .5rem; }
.cx-colout__label { font-size: .85rem; font-weight: 700; color: var(--pt-muted); }
.cx-colout .pt-input { min-height: 2.5rem; }
@media (max-width: 30rem) {
    .cx-colout { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "label copy" "value value"; row-gap: .15rem; }
    .cx-colout__label { grid-area: label; }
    .cx-colout .pt-input { grid-area: value; }
    .cx-colout .pt-btn { grid-area: copy; min-height: 2.25rem; }
}
.cx-ct { display: grid; gap: .75rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr)); }
.cx-ct__box { display: grid; gap: .5rem; align-content: start; }
.cx-ct__box p { margin: 0; }
.cx-ct__sample { display: flex; align-items: baseline; gap: .6rem; padding: .9rem 1rem; border-radius: calc(var(--cx-r) - .25rem); border: 1px solid var(--pt-line); font-weight: 600; }
.cx-ct__big { font-size: 1.75rem; font-weight: 800; line-height: 1; }
.cx-ct__ratio { font-size: 1.25rem; font-weight: 800; color: var(--pt-ink); font-variant-numeric: tabular-nums; }
.cx-ct__checks { display: grid; gap: .25rem; margin: 0; padding: 0; list-style: none; font-size: .85rem; color: var(--pt-text); }
.cx-ct__mark { display: inline-block; min-width: 2.6rem; padding: .05rem .4rem; border-radius: 999px; font-size: .72rem; font-weight: 800; text-align: center; }
.cx-ct__checks .is-pass .cx-ct__mark { background: var(--pt-ok-soft); color: var(--pt-ok); }
.cx-ct__checks .is-fail .cx-ct__mark { background: var(--pt-error-soft); color: var(--pt-error); }
.cx-scale { display: grid; grid-template-columns: repeat(9, minmax(0, 1fr)); gap: .35rem; margin: 0; padding: 0; list-style: none; }
.cx-scale li { display: grid; gap: .25rem; justify-items: center; min-width: 0; }
.cx-scale li span { font-family: var(--pt-mono, ui-monospace, monospace); font-size: .68rem; color: var(--pt-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 100%; }
.cx-scale__chip { width: 100%; aspect-ratio: 1; min-height: 2.25rem; border: 1px solid var(--pt-line); border-radius: .5rem; cursor: pointer; }
.cx-scale__chip:focus-visible { outline: 2px solid var(--pt-accent); outline-offset: 2px; }
@media (max-width: 40rem) { .cx-scale { grid-template-columns: repeat(5, minmax(0, 1fr)); } }

@media (max-width: 35rem) {
    .cx-card, .cx-pair, .cx-result { padding: .9rem; }
    .cx .pt-input, .cx .pt-select, .cx .pt-textarea { font-size: 16px; }
    .cx-dp { margin-left: 0; }
}
