.secondary-btn {
    color: var(--mud-palette-text-primary) !important;
}

.secondary-btn .mud-icon-root,
.secondary-btn .mud-button-icon-start {
    color: var(--mud-palette-text-secondary) !important;
}

.editor-fieldset {
    border: 0;
    margin: 0;
    min-width: 0;
}

.editor-fieldset[disabled] {
    pointer-events: none;
    opacity: 0.75;
}

.epos-field {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    padding: 6px 8px;
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background: var(--tp-surface-sunken);
}

.epos-field-text {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-width: 0;
}

.epos-field-label {
    color: var(--tp-text-secondary);
    font-size: 0.75rem;
    font-weight: 700;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.epos-field-value {
    color: var(--tp-text);
    font-size: 0.75rem;
}

.epos-form-hint {
    color: var(--tp-text-secondary);
    font-size: 0.75rem;
    line-height: 1.4;
}

.eyebrow {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: var(--tp-label-size);
    font-weight: var(--tp-label-weight);
    letter-spacing: var(--tp-label-tracking);
    text-transform: uppercase;
    line-height: 1.4;
    color: var(--tp-label-color);
}

.eyebrow .mud-icon-root {
    font-size: var(--tp-icon-size-sm);
    flex-shrink: 0;
}

.epos-form-eyebrow {
    font-size: var(--tp-label-size);
    font-weight: var(--tp-label-weight);
    letter-spacing: var(--tp-label-tracking);
    text-transform: uppercase;
    color: var(--mud-palette-primary);
    flex: none;
}

.epos-form-col {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.epos-form-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--mud-palette-text-primary);
}

.epos-form-label .mud-icon-root {
    font-size: var(--tp-icon-size-sm);
    color: var(--tp-text-secondary);
}

@media (pointer: coarse), (max-width: 700px) {
    .mud-popover.epos-color-popover {
        position: fixed !important;
        top: auto !important;
        right: 0 !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: none !important;
        max-height: none !important;
        margin: 0 !important;
        border: 1px solid var(--tp-border);
        border-bottom: none;
        border-radius: var(--tp-radius) var(--tp-radius) 0 0;
        background: var(--tp-surface);
        box-shadow: var(--tp-shadow-lg);
        transform: none !important;
    }

    .mud-popover.epos-color-popover::before {
        position: absolute;
        top: var(--tp-space-2);
        left: 50%;
        width: 36px;
        height: 4px;
        border-radius: var(--tp-radius-xs);
        background: var(--tp-border-strong);
        content: "";
        transform: translateX(-50%);
        pointer-events: none;
    }
}

.tp-active-bar::before {
    position: absolute;
    top: var(--tp-active-bar-inset);
    bottom: var(--tp-active-bar-inset);
    left: 0;
    width: var(--tp-active-bar-width);
    border-radius: var(--tp-active-bar-radius);
    background: var(--tp-active-bar-color);
    content: "";
}

body.epos-eyedropper-active,
body.epos-eyedropper-active * {
    cursor: crosshair !important;
}

.epos-loupe {
    --epos-loupe-size: 112px;
    --epos-loupe-pad: 6px;
    --epos-loupe-reticle: 14px;
    position: fixed;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: var(--epos-loupe-pad);
    pointer-events: none;
}

.epos-loupe,
.tp-float {
    border: 1px solid var(--tp-float-border);
    border-radius: var(--tp-radius);
    background: var(--tp-float-bg);
    box-shadow: var(--tp-float-shadow);
}

.epos-loupe[hidden] {
    display: none;
}

.epos-loupe-lens {
    position: relative;
    width: var(--epos-loupe-size);
    height: var(--epos-loupe-size);
    border-radius: var(--tp-radius-sm);
    image-rendering: pixelated;
    background: var(--tp-surface-sunken);
}

.epos-loupe::before {
    content: "";
    position: absolute;
    top: calc(var(--epos-loupe-pad) + (var(--epos-loupe-size) / 2) - (var(--epos-loupe-reticle) / 2));
    left: calc(50% - (var(--epos-loupe-reticle) / 2));
    z-index: 1;
    width: var(--epos-loupe-reticle);
    height: var(--epos-loupe-reticle);
    border: 2px solid #fff;
    border-radius: var(--tp-radius-xs);
    box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.85);
}

.epos-loupe-readout {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.75rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--tp-text);
}

.epos-loupe-swatch {
    width: 14px;
    height: 14px;
    border: 1px solid var(--tp-border-strong);
    border-radius: 50%;
}

.tp-mono {
    font-family: var(--tp-font-mono);
}

.tp-wrap {
    overflow-wrap: anywhere;
}

.tp-inline-number {
    -moz-appearance: textfield;
    appearance: textfield;
    width: 3.5ch;
    padding: 0;
    border: none;
    border-bottom: 1px solid transparent;
    border-radius: 0;
    background: transparent;
    color: inherit;
    font: inherit;
    text-align: center;
    outline: none;
}

.tp-inline-number::-webkit-outer-spin-button,
.tp-inline-number::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.tp-inline-number:hover {
    border-bottom-color: var(--tp-border-strong);
}

.tp-inline-number:focus {
    border-bottom-color: var(--tp-primary);
}

.tp-stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.2;
    color: var(--tp-text);
    font-variant-numeric: tabular-nums;
}

.tp-ghost-trigger {
    display: inline-flex;
    align-items: center;
    gap: var(--tp-space-1);
    padding: 0 var(--tp-space-2);
    border: 0;
    border-radius: var(--tp-radius);
    background: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    transition: background-color var(--tp-dur-fast) ease;
}

.tp-ghost-trigger:hover {
    background-color: var(--tp-hover);
}

.tp-ghost-trigger:focus-visible {
    outline: var(--tp-focus-ring);
    outline-offset: var(--tp-focus-ring-offset);
}

.tp-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.tp-caption {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--tp-text-secondary);
}

.tp-page-title {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 700;
    line-height: 1.3;
    letter-spacing: -0.01em;
    color: var(--tp-text);
}

.tp-section-title {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 700;
    line-height: 1.3;
    color: var(--tp-text);
}

.tp-card-title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    line-height: 1.35;
    color: var(--tp-text);
}

@media (max-width: 599.98px) {
    .tp-page-title {
        font-size: 1.25rem;
    }
}

.tp-key {
    --key-face: var(--tp-key-face);
    --key-face-hover: var(--tp-key-face-hover);
    --key-ink: var(--mud-palette-text-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: 0;
    border-radius: var(--tp-radius-button);
    background-color: var(--key-face);
    color: var(--key-ink);
    box-shadow: 0 0 0 1px var(--tp-key-ring);
    font-family: inherit;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: transform var(--tp-dur-fast) ease, background-color var(--tp-dur-fast) ease;
}

.tp-key--round {
    flex-shrink: 0;
    padding: 0;
    border-radius: 50%;
}

.tp-key--primary,
.mud-button-root.mud-button-filled-primary:not(.mud-icon-button, .mud-fab, .preset-tile) {
    --key-face: var(--mud-palette-primary);
    --key-face-hover: var(--mud-palette-primary);
    --key-ink: var(--tp-pill-ink);
    --tp-key-ring: var(--mud-palette-primary);
}

.tp-key--danger,
.mud-button-root:is(.mud-button-filled-error, .mud-button-outlined-error):not(.mud-icon-button, .mud-fab, .preset-tile),
.danger-btn.mud-button-root:is(.mud-button-filled, .mud-button-outlined) {
    --key-face: var(--tp-danger-solid);
    --key-face-hover: var(--tp-danger-solid-hover);
    --key-ink: var(--tp-danger-ink);
    --tp-key-ring: var(--tp-danger-solid);
}

.tp-key:hover:not(:disabled) {
    background-color: var(--key-face-hover);
}

.tp-key:active:not(:disabled) {
    transform: scale(var(--tp-press-scale));
    transition-duration: var(--tp-dur-press);
}

.tp-key:disabled {
    background-color: var(--tp-fill-quiet);
    color: var(--mud-palette-text-disabled);
    box-shadow: 0 0 0 1px var(--tp-border);
    cursor: default;
}

.tp-key:focus-visible {
    outline: var(--tp-focus-ring);
    outline-offset: var(--tp-focus-ring-offset);
}

.tp-key--sm {
    min-height: var(--tp-btn-h-sm);
    padding: 0 var(--tp-btn-pad-x-sm);
    font-size: 0.8125rem;
}

.tp-key--sm .mud-icon-root {
    font-size: var(--tp-icon-size);
}

@media (prefers-reduced-motion: reduce) {
    .tp-key {
        transform: none !important;
    }
}

.tp-row-interactive {
    cursor: pointer;
    outline: none;
    transition: background-color var(--tp-dur-fast) ease, box-shadow var(--tp-dur-fast) ease;
}

.tp-row-interactive:hover {
    background: var(--tp-hover);
    box-shadow: inset 0 0 0 1px var(--tp-line-quiet);
}

.tp-row-interactive:active {
    background: var(--tp-fill-quiet-hover);
}

.tp-row-interactive--selected,
.tp-row-interactive--selected:hover {
    background: var(--tp-fill-quiet-hover);
    box-shadow: inset 0 0 0 1px var(--tp-line-quiet-hover);
}

.tp-row-interactive:focus-visible {
    box-shadow: var(--tp-focus-ring-inset);
}

.tp-card {
    background: var(--tp-surface);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
}

.tp-hover-border {
    transition: var(--tp-card-hover-transition);
}

.tp-hover-border.tp-hover-border:hover {
    border-color: var(--tp-border-hover);
}

.tp-row-card {
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background-color: var(--tp-surface-sunken);
}

.tp-inset {
    padding: var(--tp-space-3) var(--tp-space-4);
    border: 1px solid var(--tp-border);
    border-radius: var(--tp-radius);
    background: var(--tp-surface-well);
}

.tp-meter {
    height: 6px;
    border-radius: var(--tp-radius-pill);
    background: var(--tp-well);
    box-shadow: var(--tp-well-shade);
    overflow: hidden;
}

.tp-meter__fill {
    height: 100%;
    border-radius: inherit;
    background: var(--tp-primary);
}

.tp-meter__fill--secondary {
    background: var(--tp-secondary);
}

.tp-table-scroll {
    overflow-x: auto;
}

.tp-table {
    width: 100%;
    border-collapse: collapse;
}

.tp-table th {
    padding: 10px 16px;
    text-align: left;
    white-space: nowrap;
    font-size: var(--tp-label-size);
    font-weight: var(--tp-label-weight);
    letter-spacing: var(--tp-label-tracking);
    text-transform: uppercase;
    color: var(--tp-label-color);
}

.tp-table td {
    padding: var(--tp-space-3) var(--tp-space-4);
    border-top: 1px solid var(--tp-border);
    vertical-align: middle;
}

.tp-table tbody tr:first-child td {
    border-top: 0;
}

.tp-table thead + tbody tr:first-child td {
    border-top: 1px solid var(--tp-border);
}

.tp-table tfoot td {
    border-top: 1px solid var(--tp-border-strong);
    background: var(--tp-surface-sunken);
}

.tp-table--hover tbody tr:hover td,
.tp-table__row--link:hover td {
    background: var(--mud-palette-table-hover);
}

.tp-table--dense th,
.tp-table--dense td {
    padding: var(--tp-space-2) var(--tp-space-3);
}

.tp-table--inset :is(th, td):first-child {
    padding-left: 0;
}

.tp-table--inset :is(th, td):last-child {
    padding-right: 0;
}

.tp-table :is(th, td).tp-table__num,
.mud-table-cell.tp-num {
    text-align: right;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mud-table-cell .tp-strong,
.tp-strong {
    font-weight: 700;
}

.tp-table__row--link {
    cursor: pointer;
    outline: none;
}

.tp-table__row--link:focus-visible td {
    box-shadow: var(--tp-focus-ring-inset);
}

.tp-cell-stack {
    display: flex;
    flex-direction: column;
    gap: 2px;
    align-items: flex-start;
    min-width: 0;
}

.tp-cell-sub {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--tp-text-secondary);
}

.tp-mono-sub {
    font-family: var(--tp-font-mono);
    font-size: 0.75rem;
    overflow-wrap: anywhere;
}

.tp-dropzone {
    border: 1px dashed var(--tp-border-input);
    border-radius: var(--tp-radius);
    background-color: var(--tp-surface-sunken);
    color: var(--tp-text-secondary);
    transition: border-color var(--tp-dur-fast) ease, background-color var(--tp-dur-fast) ease;
}

.tp-dropzone:hover {
    border-color: var(--tp-primary);
}

.tp-dropzone--round {
    border-radius: 50%;
}

.tp-dropzone.tp-dropzone--drag,
.tp-dropzone--drag .tp-dropzone {
    border-style: solid;
    border-color: var(--tp-primary);
    background-color: var(--tp-primary-wash);
}

.tp-reveal {
    opacity: 0;
    transition: opacity var(--tp-dur-fast) ease;
}

.tp-reveal-host:hover .tp-reveal,
.tp-reveal-host:focus-within .tp-reveal {
    opacity: 1;
}

@media (hover: none) {
    .tp-reveal {
        opacity: 1;
    }
}

.tp-drop-slot {
    position: relative;
    transition: margin-top var(--tp-dur) var(--tp-ease), margin-bottom var(--tp-dur) var(--tp-ease);
}

.tp-drop-slot--over {
    margin-top: calc(var(--tp-drop-h, 48px) + var(--tp-drop-gap, 8px));
}

.tp-drop-slot--over::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: calc(-1 * (var(--tp-drop-h, 48px) + var(--tp-drop-gap, 8px) / 2));
    height: var(--tp-drop-h, 48px);
    border: 2px dashed var(--tp-primary);
    border-radius: var(--tp-radius);
    background: var(--tp-primary-wash);
}

.tp-drop-slot.tp-drop-slot--over.tp-drop-slot--after {
    margin-top: 0;
    margin-bottom: calc(var(--tp-drop-h, 48px) + var(--tp-drop-gap, 8px));
}

.tp-drop-slot.tp-drop-slot--over.tp-drop-slot--after::before {
    top: auto;
    bottom: calc(-1 * (var(--tp-drop-h, 48px) + var(--tp-drop-gap, 8px) / 2));
}

.tp-drop-slot[draggable="true"] {
    cursor: grab;
}

.tp-drop-dragging {
    opacity: .45;
    cursor: grabbing;
}

.tp-drop-end {
    position: relative;
    height: 32px;
    margin-top: var(--tp-space-2);
    border-radius: var(--tp-radius-sm);
    transition: background-color var(--tp-dur) var(--tp-ease), border-color var(--tp-dur) var(--tp-ease), height var(--tp-dur) var(--tp-ease);
}

.tp-drop-end--active {
    height: 44px;
    border: 2px dashed var(--tp-primary);
    background-color: var(--tp-primary-wash);
}

.tp-field-trigger {
    box-sizing: border-box;
    min-height: var(--tp-input-h);
    border: 1px solid var(--tp-border-input);
    border-radius: var(--tp-radius);
    background: var(--mud-palette-background);
    transition: border-color var(--tp-dur-fast) ease;
}

.tp-field-trigger:hover {
    border-color: var(--tp-border-strong);
}

.tp-field-trigger.tp-field-trigger--open,
.tp-field-trigger:focus-within {
    border-color: var(--mud-palette-primary);
    box-shadow: none;
}

.tp-field-trigger .tp-field-trigger__chevron {
    color: var(--tp-text-secondary);
    transition: transform var(--tp-dur) var(--tp-ease);
}

.tp-field-trigger--open .tp-field-trigger__chevron {
    transform: rotate(180deg);
}

.mud-button-root.tp-overlay-remove {
    border: 1px solid var(--tp-border-strong);
    background-color: var(--mud-palette-surface) !important;
    transition: var(--tp-interactive-transition);
}

.mud-button-root.tp-overlay-remove .mud-icon-root {
    color: var(--tp-danger-text);
}

.mud-button-root.mud-button-root.tp-overlay-remove:hover {
    border-color: var(--tp-danger-solid);
    background-color: var(--tp-danger-solid) !important;
}

.mud-button-root.mud-button-root.tp-overlay-remove:hover .mud-icon-root {
    color: var(--tp-danger-ink) !important;
}

.tp-divided-list > * {
    position: relative;
}

.tp-divided-list > * + *::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--tp-border);
    pointer-events: none;
}

.tp-divided-list > :is(a, button, [role="button"], .tp-row-interactive):hover::before,
.tp-divided-list > :is(a, button, [role="button"], .tp-row-interactive):hover + *::before {
    opacity: 0;
}
