/*
 * Additions to the Filament studio panel. Uses Filament's colour variables,
 * so light and dark mode follow the panel automatically.
 */

/* Uploader */

.pd-uploader {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--pd-line);
}

.dark .pd-uploader {
    border-color: color-mix(in oklab, white 10%, transparent);
}

.pd-uploader__body {
    display: grid;
    gap: 0.75rem;
}

.pd-uploader__section {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--gray-600);
}

.dark .pd-uploader__section {
    color: var(--gray-300);
}

.pd-uploader__main {
    display: grid;
    gap: 0.75rem;
    min-width: 0;
}

/* Chapter list, in the gallery's navigation below its symbols. */

.pd-chapters {
    display: grid;
    gap: 0.5rem;
    min-width: 0;
}

.pd-chapters__list {
    display: flex;
    flex-direction: column;
    gap: 0.125rem;
}

.pd-chapters__entry {
    position: relative;
    display: flex;
    flex: none;
    align-items: center;
    border-radius: 0.5rem;
}

.pd-chapters__entry:hover,
.pd-chapters__entry--active {
    background: var(--pd-soft);
}

.pd-chapters__entry--active .pd-chapters__button {
    color: var(--pd-ink);
    font-weight: 500;
}

.pd-chapters__entry--target {
    background: color-mix(in oklab, var(--primary-500) 15%, transparent);
    box-shadow: inset 0 0 0 2px var(--primary-500);
}

.pd-chapters__button {
    display: flex;
    flex: 1;
    align-items: baseline;
    gap: 0.375rem;
    min-width: 0;
    justify-content: space-between;
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: start;
}

.dark .pd-chapters__button {
    color: var(--gray-300);
}

.pd-chapters__title {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-chapters__count {
    flex: none;
    font-size: 0.75rem;
    color: var(--gray-500);
}

/* What the client chose, below the chapters. */
.pd-chapters__heading {
    margin-top: 0.75rem;
    padding: 0.25rem 0.75rem;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
}

.pd-chapters__note {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Above the photos of a studio list: what the client sent. */
.pd-list-summary {
    padding: 0.5rem 1rem;
    color: var(--gray-600);
    font-size: 0.875rem;
}

.dark .pd-list-summary {
    color: var(--gray-400);
}

.pd-chapters__tools {
    display: none;
    flex: none;
    gap: 0.125rem;
    padding-inline-end: 0.375rem;
}

.pd-chapters__entry:hover .pd-chapters__tools,
.pd-chapters__entry--active .pd-chapters__tools {
    display: flex;
}

.pd-chapters__tool {
    padding: 0.25rem;
    border-radius: 0.375rem;
    color: var(--gray-400);
}

.pd-chapters__tool:hover {
    color: var(--gray-700);
}

.pd-chapters__tool--danger:hover {
    color: var(--danger-600);
}

.dark .pd-chapters__tool:hover {
    color: var(--gray-200);
}

.pd-chapters__icon {
    width: 1rem;
    height: 1rem;
}

.pd-chapters__rename,
.pd-chapters__add {
    display: flex;
    flex: 1;
    padding: 0.125rem;
}

.pd-chapters__input {
    width: 100%;
    min-width: 0;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--pd-line-strong);
    border-radius: 0.5rem;
    background-color: white;
    font-size: 0.875rem;
    color: var(--gray-950);
}

.dark .pd-chapters__input {
    border-color: color-mix(in oklab, white 15%, transparent);
    background-color: var(--gray-900);
    color: white;
}

.pd-chapters__add-button {
    justify-self: start;
}

.pd-chapters__entry.sortable-ghost {
    opacity: 0.4;
}

.pd-dropzone {
    display: grid;
    justify-items: center;
    gap: 0.25rem;
    padding: 1.75rem 1rem;
    border: 1.5px dashed var(--pd-line-strong);
    border-radius: 0.75rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 120ms, background-color 120ms;
}

.pd-dropzone:hover,
.pd-dropzone--active {
    border-color: var(--primary-500);
    background: color-mix(in oklab, var(--primary-500) 6%, transparent);
}

.dark .pd-dropzone {
    border-color: var(--gray-600);
}

.pd-dropzone__input {
    position: absolute;
    width: 1px;
    height: 1px;
    opacity: 0;
}

.pd-dropzone__icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--gray-400);
}

.pd-dropzone__title {
    font-weight: 600;
    font-size: 0.875rem;
}

.pd-dropzone__hint {
    font-size: 0.75rem;
    color: var(--gray-500);
}

.pd-upload-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    background: color-mix(in oklab, var(--gray-950) 50%, transparent);
}

.pd-upload-modal__panel {
    display: grid;
    gap: 1rem;
    width: 100%;
    max-width: 42rem;
    max-height: calc(100dvh - 2rem);
    overflow-y: auto;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
}

.dark .pd-upload-modal__panel {
    background: var(--gray-900);
    box-shadow: 0 0 0 1px color-mix(in oklab, white 10%, transparent);
}

.pd-upload-modal__title {
    font-size: 1rem;
    font-weight: 600;
}

.pd-upload-modal__hint {
    margin-top: 0.25rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.pd-upload-modal__actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

/* In the corner: no shade, the page behind works; a click brings the window back. */
.pd-upload-modal.is-minimized {
    inset: auto 1rem 1rem auto;
    padding: 0;
    background: none;
    pointer-events: none;
}

.pd-upload-mini {
    display: grid;
    gap: 0.5rem;
    width: 18rem;
    padding: 0.875rem 1rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow-window);
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 600;
    text-align: left;
    pointer-events: auto;
    cursor: pointer;
    transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1);
}

.pd-upload-mini:active {
    transform: scale(0.98);
    transition-duration: 0s;
}

/* Uploads of other pages, on whatever page is shown. */
.pd-uploads {
    position: fixed;
    right: 1rem;
    bottom: 1rem;
    z-index: 50;
    display: grid;
    gap: 0.5rem;
}

.pd-upload-mini__place {
    margin-top: -0.375rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 400;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-upload-mini__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 400;
}

.pd-queue {
    display: grid;
    gap: 0.5rem;
    font-size: 0.8125rem;
}

.pd-queue__summary {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pd-queue__bar {
    flex: 1;
    height: 0.375rem;
    border-radius: 999px;
    background: var(--gray-200);
    overflow: hidden;
}

.dark .pd-queue__bar {
    background: var(--gray-700);
}

.pd-queue__bar-fill {
    height: 100%;
    background: var(--gray-950);
    transition: width 300ms linear;
}

/* Asked for once a second: the bar glides through the whole second instead of jumping and waiting. */
.pd-queue__bar-fill--polled {
    transition-duration: 1s;
}

.pd-queue__list {
    display: grid;
    gap: 0;
    max-height: 14rem;
    overflow-y: auto;
}

.pd-queue__item {
    display: flex;
    flex-wrap: wrap;
    gap: 0 0.75rem;
    align-items: baseline;
    padding-block: 0.25rem;
}

.pd-queue__detail {
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

/* How far one file is, as a hairline below its row. */
.pd-queue__track {
    flex: 0 0 100%;
    height: 2px;
    margin-top: 0.25rem;
    background: var(--gray-200);
}

.pd-queue__track span {
    display: block;
    height: 100%;
    background: var(--gray-950);
    transition: width 300ms linear;
}

.dark .pd-queue__bar-fill {
    background: white;
}

.dark .pd-queue__track {
    background: var(--gray-700);
}

.dark .pd-queue__track span {
    background: white;
}

/* The upload in figures: four facts in a row, the speed of the last minutes as a graph below. */
.pd-meter {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin: 0;
    border-block: 1px solid var(--pd-line);
}

.pd-meter__fact {
    padding: 0.75rem 0.75rem 0.75rem 0;
}

.pd-meter__fact + .pd-meter__fact {
    padding-inline-start: 0.75rem;
    border-inline-start: 1px solid var(--pd-line);
}

.pd-meter dt {
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.pd-meter dd {
    margin: 0.125rem 0 0;
    font-size: 1.125rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pd-meter dd small {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--gray-500);
}

.pd-meter__progress {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.pd-meter__percent {
    min-width: 3rem;
    text-align: end;
    font-variant-numeric: tabular-nums;
}

.pd-meter__graph {
    margin: 0;
}

.pd-meter__graph svg {
    display: block;
    width: 100%;
    height: 4.5rem;
}

.pd-meter__grid {
    stroke: var(--gray-200);
    stroke-width: 1;
    stroke-dasharray: 2 3;
    vector-effect: non-scaling-stroke;
}

.pd-meter__area {
    fill: color-mix(in oklab, var(--gray-950) 8%, transparent);
}

.pd-meter__line {
    fill: none;
    stroke: var(--gray-950);
    stroke-width: 1.5;
    stroke-linejoin: round;
    vector-effect: non-scaling-stroke;
}

.pd-meter__legend,
.pd-meter__state {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 1rem;
    margin: 0;
    font-size: 0.75rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.pd-meter__state {
    min-height: 1.125rem;
}

.pd-meter__legend {
    margin-top: 0.375rem;
    padding-top: 0.375rem;
    border-top: 1px solid var(--pd-line);
}

.pd-meter__legend span:first-child {
    margin-inline-end: auto;
}

.pd-meter__legend strong,
.pd-meter__state strong {
    font-weight: 600;
    color: var(--gray-950);
}

.pd-meter__failed,
.pd-meter__state .pd-meter__failed strong {
    color: var(--danger-600);
}

.dark .pd-meter__grid {
    stroke: var(--gray-700);
}

.dark .pd-meter__area {
    fill: color-mix(in oklab, white 10%, transparent);
}

.dark .pd-meter__line {
    stroke: white;
}

.dark .pd-meter__legend strong,
.dark .pd-meter__state strong {
    color: white;
}

@media (max-width: 40rem) {
    .pd-meter {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .pd-meter__fact:nth-child(3) {
        padding-inline-start: 0;
        border-inline-start: 0;
    }

    .pd-meter__fact:nth-child(n + 3) {
        border-top: 1px solid var(--pd-line);
    }
}

.pd-queue__name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-queue__status {
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.pd-queue__item--notice .pd-queue__name {
    color: var(--gray-500);
    white-space: normal;
}

.pd-queue__item--error .pd-queue__status {
    color: var(--danger-600);
}

/* What went wrong gets a line of its own, so the file's name stays readable. */
.pd-queue__item--error .pd-queue__status {
    flex: 1 1 calc(100% - 10rem);
    order: 1;
}

.pd-queue__item--error .pd-link {
    order: 2;
}

.pd-queue__item--error .pd-queue__name {
    flex-basis: 60%;
}

.pd-link {
    font-weight: 600;
    color: var(--primary-600);
}

.dark .pd-link {
    color: var(--primary-400);
}

/* Cover photo with its focus point, on its own design page */
.pd-cover-focus__body {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: flex-start;
}

.pd-cover-focus__picker {
    position: relative;
    flex: none;
    max-width: 100%;
    cursor: crosshair;
    touch-action: none;
    user-select: none;
}

.pd-cover-focus__picker img {
    display: block;
    max-width: 100%;
    max-height: 17.5rem;
    border-radius: 0.375rem;
}

.pd-cover-focus__point {
    position: absolute;
    width: 1.375rem;
    height: 1.375rem;
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.45), 0 1px 4px rgb(0 0 0 / 0.4);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

/* Focus of the pictures of a service or addon: each picture with its point, beside it the crop
   the booking page shows (3:2) */
.pd-image-focus__title {
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 0.5rem;
}

.pd-image-focus__grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1.25rem;
}

.pd-image-focus__item {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.pd-image-focus__item .pd-cover-focus__picker img {
    max-height: 10rem;
}

.pd-image-focus__crop {
    width: 7.5rem;
    aspect-ratio: 3 / 2;
    border-radius: 0.375rem;
    background-size: cover;
    background-repeat: no-repeat;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

/* Laptop, phone and email as drawn frames: in the design preview they show the gallery and the
   email as clients see them. Pictures and frames sit absolutely in their screens: a percentage
   height in an aspect-ratio box makes Safari lay out the page anew on every change. */
.pd-device {
    margin: 0;
}

.pd-device__screen {
    position: relative;
    overflow: hidden;
    background: #fff;
}

.pd-device__screen iframe {
    position: absolute;
    inset: 0 auto auto 0;
    border: 0;
    background: #fff;
    transform-origin: top left;
}

.pd-device__mail-cover img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Bezels and corners grow with the device, so a small one is no thick frame round a slit. */
.pd-device--laptop .pd-device__screen {
    aspect-ratio: 16 / 10;
    border: calc(var(--laptop, 30rem) * 0.014) solid #1d1d1f;
    border-bottom-width: calc(var(--laptop, 30rem) * 0.024);
    border-radius: calc(var(--laptop, 30rem) * 0.025) calc(var(--laptop, 30rem) * 0.025) 0 0;
}

/* The keyboard half seen from the front: a little wider than the screen, with its notch. */
.pd-device__base {
    position: relative;
    width: 112%;
    height: calc(var(--laptop, 30rem) * 0.022);
    margin-left: -6%;
    border-radius: 0 0 calc(var(--laptop, 30rem) * 0.02) calc(var(--laptop, 30rem) * 0.02);
    background: linear-gradient(#d4d4d8, #a1a1aa);
}

.pd-device__base::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 16%;
    height: 40%;
    border-radius: 0 0 0.375rem 0.375rem;
    background: #8e8e93;
    transform: translateX(-50%);
}

.pd-device--phone .pd-device__screen {
    aspect-ratio: 9 / 19.5;
    border: calc(var(--phone, 10rem) * 0.045) solid #1d1d1f;
    border-radius: calc(var(--phone, 10rem) * 0.17);
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.25);
}

/* The pill at the top of the phone's screen, above the page. */
.pd-device--phone .pd-device__screen::after {
    content: '';
    position: absolute;
    z-index: 1;
    top: calc(var(--phone, 10rem) * 0.04);
    left: 50%;
    width: 30%;
    height: calc(var(--phone, 10rem) * 0.07);
    border-radius: 999px;
    background: #1d1d1f;
    transform: translateX(-50%);
}

/* An email as a mail app shows it: who from and about what, the cover, a few lines and the button. */
.pd-device__mail {
    display: grid;
    gap: 0.5rem;
    padding: 0.75rem 0.75rem 0.875rem;
    border: 1px solid var(--pd-line);
    border-radius: 0.75rem;
    background: white;
    box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}

.pd-device__mail-head {
    display: grid;
    gap: 0.125rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--pd-line);
    font-size: 0.75rem;
    line-height: 1.25;
}

.pd-device__mail-from {
    font-weight: 600;
    color: var(--gray-900);
}

.pd-device__mail-subject {
    overflow: hidden;
    color: var(--gray-500);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-device__mail-cover {
    position: relative;
    aspect-ratio: 3 / 2;
    overflow: hidden;
    border-radius: 0.375rem;
    background: #111;
}

.pd-device__mail-line {
    height: 0.375rem;
    border-radius: 999px;
    background: var(--gray-200);
}

.pd-device__mail-line--short {
    width: 60%;
}

.pd-device__mail-button {
    width: 40%;
    height: 1rem;
    margin: 0.125rem auto 0;
    border-radius: 0.25rem;
    background: var(--gray-800);
}

.dark .pd-device--laptop .pd-device__screen,
.dark .pd-device--phone .pd-device__screen {
    border-color: #3a3a3c;
}

.dark .pd-device__mail {
    background: var(--gray-900);
}

.dark .pd-device__mail-from {
    color: white;
}

.dark .pd-device__mail-line {
    background: var(--gray-700);
}

.dark .pd-device__mail-button {
    background: var(--gray-300);
}

.pd-cover-focus__hint {
    margin-top: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

/* Accepted download terms, newest first */

.pd-timeline {
    display: grid;
    gap: 1.25rem;
    margin: 0;
    padding: 0 0 0 1rem;
    border-left: 1px solid var(--pd-line);
    list-style: none;
}

.pd-timeline__item {
    position: relative;
    display: grid;
    gap: 0.25rem;
}

.pd-timeline__item::before {
    content: '';
    position: absolute;
    top: 0.45rem;
    left: calc(-1rem - 4px);
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--primary-500);
}

.pd-timeline__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-500);
}

.pd-timeline__reference {
    font-family: ui-monospace, monospace;
}

.pd-timeline__summary {
    cursor: pointer;
    font-size: 0.875rem;
    color: var(--primary-600);
}

.pd-timeline__note {
    margin: 0.25rem 0 0;
    font-size: 0.875rem;
    white-space: pre-line;
}

/* A client's favourites list */

.pd-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 1rem;
}

.pd-selection__item {
    display: grid;
    align-content: start;
    gap: 0.375rem;
    min-width: 0;
}

.pd-selection__meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    min-width: 0;
}

.pd-selection__marks {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    gap: 0.375rem;
}

.pd-selection__dot {
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
}

.pd-selection__stars {
    color: #f5c542;
    font-size: 0.75rem;
    letter-spacing: 0.05em;
}

.pd-selection__comment {
    margin: 0;
    font-size: 0.8125rem;
    line-height: 1.4;
    white-space: pre-line;
}

.pd-selection__empty {
    color: var(--gray-500);
}

/* Dragging photos in the studio's contact sheet */
.pd-drag-ghost {
    opacity: 0.35;
}

/* Drag image when several photos are moved: the photo under the pointer and their number. */
.pd-drag-stack {
    position: fixed;
    top: -200px;
    left: 0;
    width: 64px;
    height: 64px;
}

.pd-drag-stack img {
    width: 64px;
    height: 64px;
    border-radius: 0.375rem;
    object-fit: cover;
    box-shadow: 4px 4px 0 var(--gray-300);
}

.pd-drag-stack span {
    position: absolute;
    top: -6px;
    right: -6px;
    min-width: 1.5rem;
    padding: 0.125rem 0.375rem;
    border-radius: 999px;
    background: var(--primary-600);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    text-align: center;
}

/*
 * Theme: the inquiry board's. A white canvas, content on soft rounded cards with a hairline and
 * a breath of shadow, small capitals for labels, pills for states, black for what matters.
 */

.fi-body {
    --pd-line: var(--gray-200);
    /* The firmer line: inputs, dashed drop zones, dividers with a name. */
    --pd-line-strong: var(--gray-300);
    --pd-canvas: #fff;
    --pd-ink: var(--gray-950);
    --pd-soft: var(--gray-100);
    /* Cards and the ground they lie on, as on the inquiry board. */
    --pd-panel: #fff;
    --pd-well: var(--gray-50);
    /* The ground the cards lie on, as the board's columns. */
    --pd-ground: var(--gray-100);
    --pd-radius: 14px;
    --pd-radius-sm: 10px;
    --pd-radius-window: 18px;
    --pd-shadow: 0 1px 2px rgb(0 0 0 / 0.04);
    --pd-shadow-hover: 0 10px 24px -14px rgb(0 0 0 / 0.35);
    --pd-shadow-window: 0 30px 80px -20px rgb(0 0 0 / 0.5);
    /* The gallery workspace: room between its columns, and how far from the top its columns stick: below the bar. */
    --pd-gutter: 1.5rem;
    --topbar-height: 4.5rem;
    --pd-sticky-top: calc(var(--topbar-height) + 1.5rem);
    background: var(--pd-canvas);
}

.dark .fi-body {
    --pd-line: rgb(255 255 255 / 0.1);
    --pd-line-strong: rgb(255 255 255 / 0.16);
    --pd-canvas: var(--gray-950);
    --pd-ink: #fff;
    --pd-soft: rgb(255 255 255 / 0.06);
    --pd-panel: var(--gray-900);
    --pd-well: rgb(255 255 255 / 0.03);
    --pd-ground: var(--gray-950);
}

.fi-sidebar-header {
    background: var(--pd-canvas);
    box-shadow: none;
}

/*
 * A bar across the top with the main areas, each a symbol over its name; the chosen one on a
 * soft ground. The studio's logo at the start, the person's menu at the end. On small screens
 * the areas are in the drawer, as before.
 */
.fi-topbar {
    padding-inline: 1.5rem;
    background: var(--pd-panel);
    box-shadow: none;
    /* The line under the menu takes the colour of the area one is in. */
    border-bottom: 2px solid var(--pd-page-area, var(--pd-line));
    --tw-ring-color: transparent;
}

.fi-topbar-start {
    margin-inline-end: 2rem;
}

.fi-topbar-start .fi-logo {
    max-height: 2.5rem;
    margin-inline-start: 0;
}

.fi-topbar-nav-groups {
    flex-wrap: nowrap;
    gap: 0.25rem;
    margin: 0 1rem 0 0;
    min-width: 0;
    overflow-x: auto;
    scrollbar-width: none;
}

.fi-topbar-item-btn {
    position: relative;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 4.75rem;
    padding: 0.4375rem 0.75rem;
    border-radius: var(--pd-radius-sm);
}

.fi-topbar-item-btn:hover {
    background: var(--pd-soft);
}

.fi-topbar-item-btn:focus-visible {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

.fi-topbar-item-btn > .fi-icon {
    width: 1.375rem;
    height: 1.375rem;
    color: var(--gray-600);
}

.fi-topbar-item-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
    white-space: nowrap;
}

.dark .fi-topbar-item-btn > .fi-icon,
.dark .fi-topbar-item-label {
    color: var(--gray-300);
}

.fi-topbar-item.fi-active .fi-topbar-item-btn {
    background: color-mix(in oklab, var(--pd-ink) 7%, transparent);
}

.fi-topbar-item.fi-active .fi-topbar-item-btn > .fi-icon,
.fi-topbar-item.fi-active .fi-topbar-item-label {
    color: var(--pd-ink);
}

/* A count at an area, e.g. new orders at the shop: a small red circle at its symbol's corner. */
.fi-topbar-item-btn > .fi-badge {
    position: absolute;
    top: 0.25rem;
    left: calc(50% + 0.375rem);
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    font-size: 0.625rem;
    line-height: 1.125rem;
    background: var(--pd-ink);
    color: var(--pd-canvas);
    box-shadow: none;
}

.fi-topbar-item-btn > .fi-badge.fi-color-danger {
    background: var(--danger-600);
    color: #fff;
}

.fi-topbar-item-btn > .fi-badge .fi-badge-label {
    color: inherit;
}

.fi-topbar-end {
    flex: none;
}

.fi-tenant-menu-trigger-tenant-name {
    font-weight: 600;
}

.fi-sidebar-item-btn {
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
}

.fi-sidebar-item-label {
    font-size: 0.875rem;
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: var(--pd-soft);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-icon {
    color: var(--pd-ink);
}

.fi-header-heading {
    font-size: 1.625rem;
    font-weight: 600;
    letter-spacing: -0.02em;
}

/* Cards: rounded, a hairline and a breath of shadow, as the board's. */
.fi-section:not(.fi-section-not-contained),
.fi-ta-ctn,
.fi-wi-stats-overview-stat,
.fi-sc-tabs.fi-contained,
.fi-fo-repeater-item,
.fi-dropdown-panel {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.fi-dropdown-panel {
    box-shadow: var(--pd-shadow-hover);
}

/* A card inside a card is a well, not another shadow. */
.fi-section .fi-section:not(.fi-section-not-contained),
.fi-section .fi-fo-repeater-item,
.fi-section .fi-ta-ctn {
    background: var(--pd-well);
    box-shadow: none;
}

.fi-section-header-heading {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* The page is the board's grey ground; the navigation stays white beside it. */
.fi-main-ctn {
    background: var(--pd-ground);
}

/* Labels above columns and figures, plain and grey, on the well's grey as a column's head. */
.fi-ta-header-cell,
.fi-ta-table > thead > tr {
    background: var(--pd-well);
}

.fi-ta-header-cell,
.fi-ta-header-cell-label,
.fi-wi-stats-overview-stat-label {
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
}

.dark .fi-ta-header-cell,
.dark .fi-ta-header-cell-label,
.dark .fi-wi-stats-overview-stat-label {
    color: var(--gray-400);
}

.fi-wi-stats-overview-stat-value {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.01em;
}

.fi-ta-row:hover {
    background: color-mix(in oklab, var(--gray-500) 4%, transparent);
}

/* States as pills: tinted, round, without a frame, with the dot of their colour as on the board. */
.fi-badge {
    border-radius: 999px;
    box-shadow: none;
    font-weight: 600;
    --tw-ring-color: transparent;
}

.fi-ta-cell .fi-badge::before,
.fi-in-entry .fi-badge::before,
.fi-modal .fi-badge::before {
    content: "";
    flex: none;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

/* A window over the page, which waits dimmed around it. */
.fi-modal-close-overlay {
    background: rgb(0 0 0 / 0.4);
}

.fi-modal-window {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius-window);
    box-shadow: var(--pd-shadow-window);
}

.fi-modal.fi-modal-slide-over .fi-modal-window,
.fi-modal.fi-width-screen .fi-modal-window {
    border-radius: 0;
}

.fi-modal-heading {
    font-weight: 600;
    letter-spacing: -0.01em;
}

/* Fields: a hairline, and ink when they are in use. */
.fi-input-wrp {
    border: 1px solid var(--pd-line);
    box-shadow: none;
    transition: border-color 150ms;
}

.fi-input-wrp:hover {
    border-color: var(--pd-line-strong);
}

.dark .fi-input-wrp:hover {
    border-color: rgb(255 255 255 / 0.2);
}

.fi-input-wrp:focus-within {
    border-color: var(--pd-ink);
    box-shadow: none;
}

.fi-input-wrp.fi-invalid {
    border-color: var(--danger-600);
}

/* Buttons: round at the ends; ink for the one that matters, a hairline for the others. */
.fi-btn {
    border-radius: 999px;
    box-shadow: none;
}

/* Pressing: a button gives way the moment it is pressed and springs back on release. */
.fi-btn,
.fi-icon-btn {
    -webkit-tap-highlight-color: transparent;
    transition-property: color, background-color, border-color, transform;
    transition-duration: 75ms, 75ms, 75ms, 260ms;
    transition-timing-function: ease, ease, ease, cubic-bezier(0.2, 0.7, 0.2, 1);
}

.fi-btn:not(:disabled):active,
.fi-icon-btn:not(:disabled):active {
    transform: scale(0.96);
    transition-duration: 0s;
}

@media (prefers-reduced-motion: reduce) {
    .fi-btn:not(:disabled):active,
    .fi-icon-btn:not(:disabled):active {
        transform: none;
    }
}

.fi-btn-group > .fi-btn,
.fi-input-wrp .fi-btn {
    border-radius: 0;
}

.fi-btn.fi-color-primary:not(label),
input:checked + label.fi-btn {
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

.fi-btn.fi-color-primary:not(label):hover {
    background: color-mix(in oklab, var(--pd-ink) 85%, var(--pd-canvas));
}

.fi-btn.fi-color-primary:not(label) .fi-icon,
input:checked + label.fi-btn .fi-icon {
    color: inherit;
}

/* A choice between buttons: only the chosen one is ink, the others keep a hairline. */
input:not(:checked) + label.fi-btn {
    border: 1px solid var(--pd-line);
}

input:not(:checked) + label.fi-btn:hover {
    border-color: var(--pd-line-strong);
}

.dark input:not(:checked) + label.fi-btn:hover {
    border-color: rgb(255 255 255 / 0.2);
}

input:checked + label.fi-btn {
    border: 1px solid var(--pd-ink);
}

.fi-btn:not(.fi-color),
.fi-btn.fi-outlined {
    border: 1px solid var(--pd-line);
}

.fi-btn:not(.fi-color):hover {
    border-color: var(--pd-line-strong);
}

.dark .fi-btn:not(.fi-color):hover {
    border-color: rgb(255 255 255 / 0.2);
}

/* Tabs: words on a line, the open one underlined. */
.fi-tabs:not(.fi-vertical) {
    gap: 1.75rem;
    margin-inline: 0;
    padding: 0;
    border: 0;
    border-bottom: 1px solid var(--pd-line);
    border-radius: 0;
    background: none;
    box-shadow: none;
}

.fi-tabs:not(.fi-vertical) > .fi-tabs-item {
    padding: 0.75rem 0;
    border-radius: 0;
    background: none;
}

.fi-tabs:not(.fi-vertical) > .fi-tabs-item:hover {
    background: none;
}

.fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active {
    box-shadow: inset 0 -2px 0 var(--pd-ink);
}

.fi-tabs-item.fi-active > .fi-tabs-item-label {
    color: var(--pd-ink);
}

.fi-sc-tabs.fi-contained > .fi-tabs:not(.fi-vertical) {
    padding-inline: 1.5rem;
}

/* Sections without a card: a heading, its fields, and air before the next one. */
.fi-section-not-contained {
    padding-block: 0.75rem;
}

/*
 * One ink for what is chosen and leads; colour where it means something (late red, waiting amber,
 * done green), on the board's stages, and, muted, for the areas (see "Each area its colour").
 */
.fi-body { --pd-accent: var(--pd-ink); }

.fi-sidebar-item-btn {
    padding-block: 0.3125rem;
}

.fi-sidebar-item-btn > .fi-sidebar-item-icon {
    color: var(--gray-500);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: color-mix(in oklab, var(--pd-ink) 7%, transparent);
}

.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: var(--pd-ink);
}

/* The page: its heading, plain. */
/* Cards: no band of colour; the heading carries them. */

.fi-section .fi-section:not(.fi-section-not-contained),
.fi-section .fi-ta-ctn {
    border-top: 1px solid var(--pd-line);
}

.fi-section:not(.fi-section-not-contained) > .fi-section-header {
    background: var(--pd-panel);
    border-top-left-radius: calc(var(--pd-radius) - 3px);
    border-top-right-radius: calc(var(--pd-radius) - 3px);
}

.fi-section-header-heading {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.fi-ta-header-cell,
.fi-ta-table > thead > tr {
    background: color-mix(in oklab, var(--pd-ink) 3%, var(--pd-panel));
}

.fi-ta-header-cell,
.fi-ta-header-cell-label {
    color: var(--gray-600);
}

.dark .fi-ta-header-cell,
.dark .fi-ta-header-cell-label {
    color: var(--gray-400);
}

.fi-wi-stats-overview-stat-value {
    color: var(--pd-accent);
}

.fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active {
    box-shadow: inset 0 -2px 0 var(--pd-accent);
}

.fi-tabs-item.fi-active > .fi-tabs-item-icon {
    color: var(--pd-accent);
}

/* One focus language for every control of the workspace: the ink ring the fields use. */
.pd-workspace-nav__item:focus-visible,
.pd-chapters__button:focus-visible,
.pd-chapters__tool:focus-visible,
.pd-picker__option:focus-visible .pd-picker__preview {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

.pd-picker__option:focus-visible {
    outline: none;
}

/* The column beside the photos: the filters of the project's photos, or a gallery's chapters and entries. */

.pd-workspace-nav {
    width: 100%;
}

/* On a phone the column is a strip: its entries go in a row to swipe. */
@media (max-width: 1023px) {

    .pd-workspace-nav__items {
        display: flex;
        gap: 0.25rem;
        overflow-x: auto;
        padding-bottom: 0.5rem;
        scrollbar-width: none;
    }

    .pd-workspace-nav__items > li {
        flex: none;
    }

    .pd-workspace-nav__item {
        width: auto;
        white-space: nowrap;
    }

    .pd-workspace__content {
        margin-top: 1rem;
    }
}

@media (min-width: 1024px) {
    /* The column runs the height of the page, so the navigation in it stays in view. */
    .fi-sc-flex > :has(> .pd-workspace-nav) {
        align-self: stretch;
    }

    .pd-workspace-nav {
        position: sticky;
        top: var(--pd-sticky-top);
        width: 15rem;
        max-height: calc(100dvh - var(--pd-sticky-top) - 1.5rem);
        overflow-y: auto;
        scrollbar-width: thin;
    }
}

.pd-workspace-nav__chapters,
.pd-workspace-nav__items {
    padding-top: 0.75rem;
}

.pd-workspace-nav__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0.125rem;
    width: 100%;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    text-align: start;
    transition: background-color 150ms, color 150ms;
}

.dark .pd-workspace-nav__item {
    color: var(--gray-300);
}

.pd-workspace-nav__item:hover,
.pd-workspace-nav__item.is-active {
    background: var(--pd-soft);
    color: var(--pd-ink);
}

.pd-workspace-nav__item.is-active {
    font-weight: 500;
}

/* What the part is set to, in a line under its name; never wider than the column. */
.pd-workspace-nav__badge {
    overflow: hidden;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-variant-numeric: tabular-nums;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* What the navigation opens: the tab rows of photos, activity and the form's parts give way to it. */
.pd-workspace__content > .fi-tabs,
.fi-resource-edit-record-page .pd-panes > .fi-tabs,
html.pd-look-calm .pd-workspace__content > .fi-tabs:not(.fi-vertical),
html.pd-look-calm .fi-resource-edit-record-page .pd-panes > .fi-tabs:not(.fi-vertical) {
    display: none;
}

.pd-workspace__content {
    min-width: 0;
}

/* The form's parts take the whole width beside the gallery's navigation; each part lays its fields out in columns. */

/* A new gallery: what is its own, in one column; the preset brings the rest. */
.fi-resource-create-record-page .pd-panes > .fi-tabs {
    display: none;
}

/* The studio's presets: name, what new galleries start from, and the look in a line. */

/* The whole width: each preset in a row, its actions at the far right. */
.pd-presets {
    width: 100%;
}

.pd-presets__intro,
.pd-presets__empty {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.5;
}

.pd-presets__intro a {
    color: var(--pd-ink);
    text-decoration: underline;
}

.pd-presets__list {
    margin-top: 1.5rem;
    border-top: 1px solid var(--pd-line);
}

.pd-presets__item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--pd-line);
}

.pd-presets__name {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-presets__badge {
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-soft);
    color: var(--gray-600);
    font-size: 0.75rem;
    font-weight: 600;
}

.dark .pd-presets__badge {
    color: var(--gray-300);
}

.pd-presets__summary {
    margin-top: 0.25rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-presets__actions {
    display: flex;
    flex-shrink: 0;
    gap: 0.25rem;
}

.pd-pane-title {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
    color: var(--pd-ink);
}

/* Without their tab rows, what they open starts at the top, level with the cover. */
.pd-workspace__content > .fi-sc-tabs-tab,
.fi-resource-edit-record-page .pd-panes > .fi-sc-tabs-tab {
    margin-top: 0;
}

@media (min-width: 1024px) {
    .pd-workspace-nav {
        margin-inline-end: var(--pd-gutter);
    }
}

/*
 * The gallery beside its design pages, as the client sees it: each choice made
 * on the left shows in the frame at once, before anything is saved.
 */

.pd-workspace__preview {
    display: none;
}

@media (min-width: 1024px) {
    /* Two cards a row are enough on the left; the gallery gets the rest. Filament wraps
       each part of its flex in a growing box, so the boxes are what is sized here. */
    /* The choices scroll on their own, the gallery stays in view beside them. */
    .fi-sc-flex > .fi-growable:has(> .pd-workspace__content--beside) {
        position: sticky;
        top: var(--pd-sticky-top);
        flex: 0 0 15rem;
        align-self: flex-start;
        max-height: calc(100dvh - var(--pd-sticky-top) + 1.5rem);
        min-width: 0;
        /* Room for the frame and the dashed mark of a card, which the scrolling would cut. */
        padding-inline: 4px;
        overflow-y: auto;
        scrollbar-width: thin;
    }

    .fi-sc-flex > .fi-growable:has(> .pd-workspace__preview) {
        flex: 1 1 0;
        min-width: 0;
        margin-inline-start: var(--pd-gutter);
    }

    .pd-workspace__preview {
        display: block;
        position: sticky;
        top: var(--pd-sticky-top);
    }

    /* Beside the preview, one choice a row, the sketch as wide as the column, the words at its left edge. */
    .pd-workspace__content--beside .pd-picker {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .pd-workspace__content--beside .pd-picker__option {
        text-align: start;
    }
}

/*
 * The gallery on a quiet stage, on a laptop with a phone in front and the email beside: each
 * frame as wide as such a screen and scaled into it, so the whole layout shows. The scene is
 * sized by the stage, wide or tall, so all three fit without scrolling.
 */
.pd-design-preview__stage {
    /* The bar above it (2rem) and its margin (0.75rem) are what is left over. */
    height: calc(100dvh - var(--pd-sticky-top) + 1.5rem - 2.75rem);
    padding: 1.5rem;
    overflow: hidden;
    border-radius: 0.75rem;
    background: var(--pd-soft);
}

.pd-design-preview__scene {
    /* The laptop as large as the stage lets it, at its top; below it the email and the phone
       side by side, in what height is left. Nothing overlaps, also on small screens. */
    --laptop: min(88cqw, 80cqh);
    /* The height left below the laptop (about two thirds of its width tall) and the gap. */
    --rest: calc(96cqh - var(--laptop) * 0.68);
    --phone: min(30cqw, calc(var(--rest) / 2.2));
    --mail: min(58cqw, calc((var(--rest) - 5.5rem) * 1.5));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    gap: 4cqh;
    height: 100%;
    container-type: size;
}

.pd-design-preview__scene .pd-device--laptop {
    width: var(--laptop);
}

.pd-design-preview__row {
    display: flex;
    align-items: flex-start;
    justify-content: center;
    gap: 6cqw;
    width: 100%;
}

.pd-design-preview__scene .pd-device--mail {
    width: var(--mail);
}

.pd-design-preview__scene .pd-device--phone {
    width: var(--phone);
}

.pd-design-preview__bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    height: 2rem;
    margin-bottom: 0.75rem;
}

.pd-design-preview__open {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-design-preview__open:hover {
    color: var(--pd-ink);
    text-decoration: underline;
}

/* Design pickers: cards that show what each choice looks like, the chosen one in ink. */

.pd-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr));
    gap: 1rem 0.75rem;
}

.pd-picker__option {
    display: grid;
    gap: 0.5rem 0;
    color: var(--gray-600);
    font-size: 0.8125rem;
    text-align: center;
}

/* The name in ink, the line under it grey and smaller: two levels, not one. */
.pd-picker__label {
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 500;
}

.dark .pd-picker__option {
    color: var(--gray-300);
}

.pd-picker__preview {
    position: relative;
    display: grid;
    place-items: center;
    overflow: hidden;
    aspect-ratio: 3 / 2;
    border: 1px solid var(--pd-line);
    border-radius: 0.5rem;
    background: var(--pd-canvas);
    transition: border-color 150ms, box-shadow 150ms;
}

.pd-picker__option:hover .pd-picker__preview {
    border-color: var(--gray-400);
}

.pd-picker__option.is-active .pd-picker__preview {
    border-color: var(--pd-ink);
    box-shadow: 0 0 0 1px var(--pd-ink);
}

/* What the gallery takes from its look while it chooses nothing: marked, but quieter than a choice. */
.pd-picker__option.is-inherited .pd-picker__preview {
    outline: 1.5px dashed var(--pd-ink);
    outline-offset: 2px;
}

.pd-picker__option.is-inherited .pd-picker__label::after {
    content: ' ·';
}

.pd-picker__option.is-active .pd-picker__label {
    font-weight: 600;
}

/* A long list of choices in groups, each with a quiet heading across the row. */
.pd-picker__group {
    grid-column: 1 / -1;
    margin: 0.5rem 0 -0.25rem;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
}

.pd-picker__group:first-child {
    margin-top: 0;
}

/*
 * Typography: the name of the type, set in it, on a low card; the name under the card would
 * only repeat it, so it stays for screen readers alone.
 */
.pd-picker--typography .pd-picker__preview {
    align-content: center;
    justify-items: start;
    gap: 0.25rem;
    aspect-ratio: auto;
    min-height: 4.5rem;
    padding: 0.625rem 1rem;
    text-align: start;
}

.pd-picker--typography .pd-picker__label {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
}

.pd-picker__sample {
    color: var(--pd-ink);
    font-size: 1.125rem;
    line-height: 1.2;
}

.pd-picker__description {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Type shows its line in the sample already; the others have it under the name. */
.pd-picker--typography .pd-picker__hint {
    display: none;
}

/* A line under the name that says what the choice does. */
.pd-picker__hint {
    margin-top: -0.375rem;
    color: var(--gray-500);
    font-size: 0.75rem;
    line-height: 1.35;
}

/* Colour: paper, lines and buttons as three dots. */
.pd-picker--palette .pd-picker__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    aspect-ratio: 2 / 1;
}

.pd-picker__swatch {
    width: 1.625rem;
    height: 1.625rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.08);
}

.dark .pd-picker__swatch {
    box-shadow: inset 0 0 0 1px rgb(255 255 255 / 0.18);
}

/* Grid, size, spacing: a few tiles, laid out as the choice would lay out the photos. */
.pd-picker--grid .pd-picker__preview,
.pd-picker--size .pd-picker__preview,
.pd-picker--spacing .pd-picker__preview {
    padding: 0.875rem;
}

.pd-picker__sketch {
    display: grid;
    width: 100%;
    height: 100%;
    gap: 0.25rem;
}

.pd-picker__sketch i {
    display: block;
    min-width: 0;
    min-height: 0;
    border-radius: 2px;
    background: color-mix(in oklab, var(--pd-ink) 30%, var(--pd-canvas));
}

/* Rows: tiles of one height, wide and narrow ones side by side. */
.pd-picker__preview[data-choice='horizontal'] .pd-picker__sketch {
    grid-template-columns: 3fr 2fr 2fr 3fr;
    grid-template-rows: 1fr 1fr;
}

.pd-picker__preview[data-choice='horizontal'] i:nth-child(5),
.pd-picker__preview[data-choice='horizontal'] i:nth-child(6) {
    grid-column: span 2;
}

/* Columns: tiles of one width, tall and short ones below each other. */
.pd-picker__preview[data-choice='vertical'] .pd-picker__sketch {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 3fr 2fr;
}

.pd-picker__preview[data-choice='vertical'] i:nth-child(2) {
    grid-row: 1 / 3;
}

.pd-picker__preview[data-choice='vertical'] i:nth-child(6) {
    display: none;
}

/* Size: many small tiles, or a few large ones. */
.pd-picker--size .pd-picker__preview[data-choice='regular'] .pd-picker__sketch {
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: 1fr 1fr;
}

.pd-picker--size .pd-picker__preview[data-choice='large'] .pd-picker__sketch {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr;
}

.pd-picker--size .pd-picker__preview[data-choice='large'] i:nth-child(n + 3) {
    display: none;
}

/* Spacing: four tiles with as much air between them as the choice gives. */
.pd-picker--spacing .pd-picker__sketch {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
}

.pd-picker--spacing i:nth-child(n + 5) {
    display: none;
}

.pd-picker--spacing .pd-picker__preview[data-choice='tight'] .pd-picker__sketch {
    gap: 1px;
}

.pd-picker--spacing .pd-picker__preview[data-choice='regular'] .pd-picker__sketch {
    gap: 0.3125rem;
}

.pd-picker--spacing .pd-picker__preview[data-choice='large'] .pd-picker__sketch {
    gap: 0.75rem;
}

/* Gallery frame and mat: one photo, framed as the choice would frame each photo of the grid. */
.pd-picker__framed {
    --frame: 0px;
    --frame-colour: transparent;
    --mat: 0px;
    display: block;
    padding: var(--frame);
    background: var(--frame-colour);
    box-shadow: 0 2px 6px rgb(0 0 0 / 0.16);
}

.pd-picker__framed i {
    display: block;
    width: 2.25rem;
    height: 2.75rem;
    border: var(--mat) solid #f8f7f3;
    background: color-mix(in oklab, var(--pd-ink) 35%, var(--pd-canvas));
    background-clip: padding-box;
}

.pd-picker--frame [data-choice='none'] .pd-picker__framed {
    box-shadow: none;
}

.pd-picker--frame [data-choice='black'] .pd-picker__framed,
.pd-picker--mat .pd-picker__framed {
    --frame: 4px;
    --frame-colour: #1b1b1b;
}

.pd-picker--frame [data-choice='white'] .pd-picker__framed {
    --frame: 4px;
    --frame-colour: #fff;
    box-shadow: 0 0 0 1px rgb(0 0 0 / 0.12), 0 2px 6px rgb(0 0 0 / 0.16);
}

.pd-picker--frame [data-choice='oak'] .pd-picker__framed {
    --frame: 4px;
    --frame-colour: #b98d5a;
}

.pd-picker--frame [data-choice='brand'] .pd-picker__framed {
    --frame: 4px;
    --frame-colour: var(--primary-600, #1b1b1b);
}

.pd-picker--mat [data-choice='narrow'] .pd-picker__framed {
    --mat: 3px;
}

.pd-picker--mat [data-choice='wide'] .pd-picker__framed {
    --mat: 7px;
}

/* Titles and chapters: a row of buttons, a heading or a title above a few tiles. */
.pd-picker--captions .pd-picker__preview,
.pd-picker--chapters .pd-picker__preview {
    grid-template-rows: auto 1fr;
    gap: 0.375rem;
    padding: 0.75rem 0.875rem 0.875rem;
}

.pd-picker--captions .pd-picker__sketch,
.pd-picker--chapters .pd-picker__sketch {
    grid-template-columns: 3fr 2fr;
    grid-template-rows: 1fr 1fr;
}

.pd-picker__named {
    display: flex;
    gap: 0.25rem;
    height: 0.4375rem;
}

.pd-picker__named b {
    display: block;
    width: 1.25rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--pd-ink) 18%, var(--pd-canvas));
}

.pd-picker__named b:first-child {
    background: var(--pd-ink);
}

/* Sections: a single heading line instead of buttons. */
.pd-picker--chapters [data-choice='sections'] .pd-picker__named b {
    width: 2.75rem;
    background: color-mix(in oklab, var(--pd-ink) 45%, var(--pd-canvas));
}

.pd-picker--chapters [data-choice='sections'] .pd-picker__named b + b,
.pd-picker--captions .pd-picker__named {
    display: none;
}

/* A title on the first photo, where it is pointed at. */
.pd-picker--captions [data-choice='hover'] .pd-picker__sketch i:first-child {
    background:
        linear-gradient(#fff, #fff) 0.3125rem calc(100% - 0.3125rem) / 45% 0.25rem no-repeat,
        color-mix(in oklab, var(--pd-ink) 45%, var(--pd-canvas));
}

/*
 * How photos appear: a drawn landscape twice, soft below and as its mosaic above, as the grid
 * shows a photo while it loads. Pointing at the card plays the choice over and over.
 */
.pd-picker__reveal,
.pd-picker__reveal i {
    position: absolute;
    inset: 0;
    display: block;
    background: url(data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAwAAAAICAIAAABChommAAAAq0lEQVQY02MMSV/KQAiwiHL9JkbRL0xRTg4mJkaGr9//4TSJhZkxPFD04PGH9+4zs7GxMTAwsIhx/Xry6tPJyw/+/vtvrisvLyFw9+m7tJLjz158ZmJiVJYVM1CXZoz2T7j/7MP///9+//75n4FBRIDv8zeE2f/////77w+jjobN7z8///xBuIyFhY2Fhe3fv79///7++/cPAwMDy/cfn9Hc9OfPL2Q9DAwMAGcsSqkFiRTVAAAAAElFTkSuQmCC) 0 0 / 100% 100%;
}

.pd-picker__reveal i:last-child {
    image-rendering: pixelated;
}

.pd-picker__preview[data-choice='none'] .pd-picker__reveal i:last-child {
    display: none;
}

.pd-picker__option:hover [data-choice='none'] .pd-picker__reveal i:first-child {
    animation: pd-reveal-pop 1.8s infinite;
}

.pd-picker__option:hover [data-choice='fade'] .pd-picker__reveal i:last-child {
    animation: pd-reveal-fade 1.8s ease infinite;
}

.pd-picker__option:hover [data-choice='focus'] .pd-picker__reveal i:first-child {
    animation: pd-reveal-focus 1.8s cubic-bezier(0.2, 0.7, 0.2, 1) infinite;
}

.pd-picker__option:hover [data-choice='focus'] .pd-picker__reveal i:last-child {
    animation: pd-reveal-fade 1.8s ease infinite;
}

.pd-picker__option:hover :is([data-choice='tiles'], [data-choice='resolve']) .pd-picker__reveal i:last-child {
    animation: pd-reveal-fade 1.8s steps(5) infinite;
}

@keyframes pd-reveal-pop {
    0%, 45% { opacity: 0; }
    46%, 100% { opacity: 1; }
}

@keyframes pd-reveal-fade {
    0%, 30% { opacity: 1; }
    65%, 100% { opacity: 0; }
}

@keyframes pd-reveal-focus {
    0%, 30% { filter: blur(6px); transform: scale(1.1); }
    80%, 100% { filter: blur(0); transform: scale(1); }
}

@media (prefers-reduced-motion: reduce) {
    .pd-picker__reveal i {
        animation: none !important;
    }
}

/* Cover: a small sketch of the first screen, a photo and where the title stands. */
.pd-picker--cover .pd-picker__preview {
    --sketch: color-mix(in oklab, var(--pd-ink) 62%, var(--pd-canvas));
    color: var(--pd-canvas);
}

.pd-picker__photo {
    position: absolute;
    inset: 0;
    background: var(--sketch);
}

.pd-picker__title {
    position: relative;
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-picker__preview[data-choice='left'] .pd-picker__title {
    place-self: end start;
    margin: 0 0 0.625rem 0.75rem;
}

/* Logo and title apart: a small mark for the logo at the top, the title at the foot. */
.pd-picker__logo {
    display: none;
    position: absolute;
    top: 0.625rem;
    width: 1.25rem;
    height: 0.5rem;
    border-radius: 0.125rem;
    background: currentColor;
    opacity: 0.85;
}

.pd-picker__preview[data-choice='corner-left'] .pd-picker__logo,
.pd-picker__preview[data-choice='edge-right'] .pd-picker__logo {
    display: block;
    right: 0.75rem;
}

.pd-picker__preview[data-choice='corner-right'] .pd-picker__logo,
.pd-picker__preview[data-choice='edge-left'] .pd-picker__logo {
    display: block;
    left: 0.75rem;
}

.pd-picker__preview[data-choice='axis'] .pd-picker__logo {
    display: block;
    left: calc(50% - 0.625rem);
}

.pd-picker__preview[data-choice='corner-left'] .pd-picker__title,
.pd-picker__preview[data-choice='edge-left'] .pd-picker__title {
    place-self: end start;
    margin: 0 0 0.625rem 0.75rem;
}

.pd-picker__preview[data-choice='corner-right'] .pd-picker__title,
.pd-picker__preview[data-choice='edge-right'] .pd-picker__title {
    place-self: end end;
    margin: 0 0.75rem 0.625rem 0;
}

.pd-picker__preview[data-choice='axis'] .pd-picker__title {
    place-self: end center;
    margin-bottom: 0.625rem;
}

.pd-picker__preview[data-choice='outline']::after {
    content: '';
    position: absolute;
    inset: 0.375rem;
    border: 1px solid rgb(255 255 255 / 0.8);
}

.pd-picker__preview[data-choice='lines'] .pd-picker__title {
    padding: 0.375rem 0;
    border-block: 1px solid rgb(255 255 255 / 0.8);
}

.pd-picker__preview[data-choice='halved']::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 50%;
    border-left: 1px solid rgb(255 255 255 / 0.8);
}

.pd-picker__preview[data-choice='halved'] .pd-picker__title {
    place-self: center start;
    width: 50%;
    text-align: center;
    letter-spacing: 0.12em;
}

.pd-picker__preview[data-choice='page'],
.pd-picker__preview[data-choice='photo-first'],
.pd-picker__preview[data-choice='mounted'],
.pd-picker__preview[data-choice='none'] {
    color: var(--pd-ink);
}

.pd-picker__preview[data-choice='page'] .pd-picker__photo {
    inset: 12% 8% 12% 50%;
}

.pd-picker__preview[data-choice='page'] .pd-picker__title {
    place-self: center start;
    width: 50%;
    text-align: center;
    letter-spacing: 0.12em;
}

.pd-picker__preview[data-choice='photo-first'] .pd-picker__photo {
    inset: 10% 42% 10% 8%;
}

.pd-picker__preview[data-choice='photo-first'] .pd-picker__title {
    place-self: end end;
    width: 42%;
    margin-bottom: 0.625rem;
    text-align: center;
    letter-spacing: 0.12em;
}

.pd-picker__preview[data-choice='mounted'] .pd-picker__photo {
    inset: 38% 14% 0;
}

.pd-picker__preview[data-choice='mounted'] .pd-picker__title {
    place-self: start center;
    margin-top: 0.875rem;
}

.pd-picker__preview[data-choice='none'] .pd-picker__photo {
    inset: 46% 8% 0;
    background:
        linear-gradient(to right, transparent 32%, var(--pd-canvas) 32% 34%, transparent 34% 66%, var(--pd-canvas) 66% 68%, transparent 68%),
        var(--sketch);
}

.pd-picker__preview[data-choice='none'] .pd-picker__title {
    place-self: start center;
    margin-top: 0.875rem;
}

/*
 * Designs: the cover sketch in each design's own paper, ink and type, grouped by world.
 * Elements a design brings get their own mark in the sketch (data-decor).
 */
.pd-styles {
    display: grid;
    gap: 1.75rem;
}

.pd-styles__world {
    display: grid;
    gap: 0.75rem;
}

.pd-styles__title {
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-styles__adjusted {
    font-weight: 400;
    color: var(--gray-500);
}

.pd-picker--style .pd-picker__preview {
    --sketch: color-mix(in oklab, var(--style-ink) 55%, var(--style-canvas));
    background: var(--style-canvas);
    /* On the photo the title is light, as on the gallery's cover. */
    color: #fff;
}

/* Light, dots and lines lie over the photo, the title and the marks over them. */
:is(.pd-picker--decor, .pd-picker--style) .pd-picker__preview::before {
    z-index: 1;
}

:is(.pd-picker--decor, .pd-picker--style) :is(.pd-picker__title, .pd-picker__ornament) {
    z-index: 2;
}

.pd-picker--style .pd-picker__preview[data-choice='page'],
.pd-picker--style .pd-picker__preview[data-choice='photo-first'],
.pd-picker--style .pd-picker__preview[data-choice='mounted'],
.pd-picker--style .pd-picker__preview[data-choice='none'] {
    color: var(--style-ink);
}

.pd-picker--style .pd-picker__title {
    font-size: 0.75rem;
}

/* Elements: a cover sketch with the mark of each, also on the designs that bring one. */
.pd-picker--decor .pd-picker__preview {
    --sketch: color-mix(in oklab, var(--pd-ink) 62%, var(--pd-canvas));
    align-content: center;
    gap: 0.375rem;
    color: var(--pd-canvas);
}

.pd-picker__ornament {
    display: none;
    position: relative;
}

/* Without elements the cover stays as it is, not the sketch of no cover. */
.pd-picker--decor .pd-picker__preview[data-choice='none'] {
    color: var(--pd-canvas);
}

.pd-picker--decor .pd-picker__preview[data-choice='none'] .pd-picker__photo {
    inset: 0;
    background: var(--sketch);
}

.pd-picker--decor .pd-picker__preview[data-choice='none'] .pd-picker__title {
    place-self: center;
    margin: 0;
}

:is(.pd-picker--decor [data-choice='monogram'], .pd-picker--style [data-decor='monogram']) .pd-picker__ornament {
    display: block;
    width: 1.125rem;
    height: 1.125rem;
    border: 1px solid currentColor;
    border-radius: 50%;
    outline: 1px solid currentColor;
    outline-offset: 1px;
}

.pd-picker--style [data-decor='monogram'] {
    align-content: center;
    gap: 0.375rem;
}

:is(.pd-picker--decor [data-choice='mourning'], .pd-picker--style [data-decor='mourning'])::after {
    content: '';
    position: absolute;
    inset: 0.375rem;
    border: 1.5px solid currentColor;
}

.pd-picker--style [data-decor='mourning']::after {
    color: var(--style-ink);
}

:is(.pd-picker--decor [data-choice='cinematic'], .pd-picker--style [data-decor='cinematic']) .pd-picker__ornament {
    display: block;
    position: absolute;
    inset: 0;
    border-block: 0.75rem solid #000;
}

:is(.pd-picker--decor [data-choice='cinematic'], .pd-picker--style [data-decor='cinematic']) .pd-picker__title {
    letter-spacing: 0.3em;
}

:is(.pd-picker--decor [data-choice='poster'], .pd-picker--style [data-decor='poster'])::before {
    content: '';
    position: absolute;
    inset: 0 0 auto auto;
    z-index: 1;
    width: 45%;
    height: 60%;
    background: radial-gradient(circle, rgb(255 255 255 / 0.5) 0.8px, transparent 1.1px) 0 0 / 5px 5px;
}

:is(.pd-picker--decor [data-choice='poster'], .pd-picker--style [data-decor='poster']) .pd-picker__ornament {
    display: block;
    position: absolute;
    left: 0.75rem;
    bottom: 1.9rem;
    width: 1.1rem;
    height: 0.2rem;
    background: currentColor;
}

:is(.pd-picker--decor [data-choice='poster'], .pd-picker--style [data-decor='poster']) .pd-picker__title {
    place-self: end start;
    margin: 0 0 0.625rem 0.75rem;
    font-family: 'Anton', Impact, sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    letter-spacing: 0.02em;
}

:is(.pd-picker--decor [data-choice='metal'], .pd-picker--style [data-decor='metal']) {
    align-content: center;
    gap: 0.25rem;
}

:is(.pd-picker--decor [data-choice='metal'], .pd-picker--style [data-decor='metal'])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at 50% 115%, rgb(224 49 49 / 0.75), transparent 60%);
}

:is(.pd-picker--decor [data-choice='metal'], .pd-picker--style [data-decor='metal']) .pd-picker__title {
    order: -1;
    font-family: 'Pirata One', serif;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.04em;
    text-transform: none;
}

:is(.pd-picker--decor [data-choice='metal'], .pd-picker--style [data-decor='metal']) .pd-picker__ornament {
    display: block;
    width: 3.5rem;
    height: 0.5rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 18'%3E%3Cpath d='M0 9h50l6-6 6 12 6-14 6 16 6-14 6 18 6-18 6 14 6-16 6 14 6-12 6 6h50' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 180 18'%3E%3Cpath d='M0 9h50l6-6 6 12 6-14 6 16 6-14 6 18 6-18 6 14 6-16 6 14 6-12 6 6h50' fill='none' stroke='%23000' stroke-width='2'/%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.pd-picker--decor [data-choice='worship'], .pd-picker--style [data-decor='worship'])::before {
    content: '';
    position: absolute;
    inset: 0;
    background: conic-gradient(from 165deg at 50% -12%, transparent 0deg, rgb(255 214 160 / 0.6) 8deg, transparent 15deg, transparent 22deg, rgb(255 214 160 / 0.45) 26deg, transparent 32deg, transparent 360deg);
}

:is(.pd-picker--decor [data-choice='worship'], .pd-picker--style [data-decor='worship']) .pd-picker__title {
    letter-spacing: 0.04em;
    text-transform: none;
    font-weight: 700;
}

:is(.pd-picker--decor [data-choice='herbarium'], .pd-picker--style [data-decor='herbarium']) .pd-picker__ornament {
    display: block;
    width: 2.5rem;
    height: 0.625rem;
    background: currentColor;
    -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M2 8h58'/%3E%3Cpath d='M12 8c1-3.5 4-5.5 7.5-5.5-.5 3.3-3.4 5.5-7.5 5.5ZM22 8c1 3.5 4 5.5 7.5 5.5-.5-3.3-3.4-5.5-7.5-5.5ZM32 8c1-3.5 4-5.5 7.5-5.5-.5 3.3-3.4 5.5-7.5 5.5ZM42 8c1 3.5 4 5.5 7.5 5.5-.5-3.3-3.4-5.5-7.5-5.5Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
    mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 16'%3E%3Cg fill='none' stroke='%23000' stroke-width='1.4' stroke-linecap='round'%3E%3Cpath d='M2 8h58'/%3E%3Cpath d='M12 8c1-3.5 4-5.5 7.5-5.5-.5 3.3-3.4 5.5-7.5 5.5ZM22 8c1 3.5 4 5.5 7.5 5.5-.5-3.3-3.4-5.5-7.5-5.5ZM32 8c1-3.5 4-5.5 7.5-5.5-.5 3.3-3.4 5.5-7.5 5.5ZM42 8c1 3.5 4 5.5 7.5 5.5-.5-3.3-3.4-5.5-7.5-5.5Z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}

:is(.pd-picker--decor [data-choice='front-page'], .pd-picker--style [data-decor='front-page']) .pd-picker__ornament {
    display: block;
    position: absolute;
    top: 0.5rem;
    left: 0.75rem;
    right: 0.75rem;
    height: 0.75rem;
    border-bottom: 3px double currentColor;
    font-family: 'Pirata One', serif;
}

:is(.pd-picker--decor [data-choice='numeral'], .pd-picker--style [data-decor='numeral'])::before,
:is(.pd-picker--decor [data-choice='class-year'], .pd-picker--style [data-decor='class-year'])::before {
    content: '60';
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    -webkit-text-fill-color: transparent;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 3.5rem;
    -webkit-text-stroke: 1px currentColor;
    opacity: 0.6;
}

:is(.pd-picker--decor [data-choice='class-year'], .pd-picker--style [data-decor='class-year'])::before {
    content: '26';
    font-family: 'Anton', Impact, sans-serif;
    -webkit-text-stroke-color: #e8c15a;
    opacity: 1;
}

:is(.pd-picker--decor [data-choice='strobe'], .pd-picker--style [data-decor='strobe'])::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: repeating-linear-gradient(transparent 0 2px, rgb(255 255 255 / 0.18) 2px 3px);
}

:is(.pd-picker--decor [data-choice='strobe'], .pd-picker--style [data-decor='strobe']) .pd-picker__title {
    font-family: ui-monospace, Menlo, monospace;
    letter-spacing: 0.04em;
}

:is(.pd-picker--decor [data-choice='strobe'], .pd-picker--style [data-decor='strobe']) .pd-picker__ornament {
    display: block;
    width: 3rem;
    height: 2px;
    background: linear-gradient(90deg, #7af7ff 0 70%, #ff3ec8 70%);
}

:is(.pd-picker--decor [data-choice='wristband'], .pd-picker--style [data-decor='wristband']) .pd-picker__ornament {
    display: block;
    position: absolute;
    left: -10%;
    right: -10%;
    top: 55%;
    height: 0.6rem;
    background: #1e7a6e;
    transform: rotate(-6deg);
}

:is(.pd-picker--decor [data-choice='programme'], .pd-picker--style [data-decor='programme']) .pd-picker__ornament {
    display: block;
    order: 1;
    width: 3.5rem;
    height: 0.75rem;
    background: repeating-linear-gradient(currentColor 0 1px, transparent 1px 4px);
    opacity: 0.7;
}

:is(.pd-picker--decor [data-choice='film-strip'], .pd-picker--style [data-decor='film-strip']) .pd-picker__ornament {
    display: block;
    position: absolute;
    inset: 0;
    border-block: 0.6rem solid #16120e;
    background:
        repeating-linear-gradient(90deg, transparent 0 4px, #efe7d8 4px 7px, transparent 7px 10px) 0 -0.45rem / 100% 0.25rem no-repeat,
        repeating-linear-gradient(90deg, transparent 0 4px, #efe7d8 4px 7px, transparent 7px 10px) 0 calc(100% + 0.45rem) / 100% 0.25rem no-repeat;
    background-origin: border-box;
}

:is(.pd-picker--decor [data-choice='stamp'], .pd-picker--style [data-decor='stamp']) .pd-picker__ornament {
    display: block;
    width: 1.75rem;
    height: 1.1rem;
    border: 1.5px solid #2f5d8a;
    border-radius: 0.2rem;
    outline: 1px solid #2f5d8a;
    outline-offset: -3px;
    transform: rotate(-8deg);
}

:is(.pd-picker--decor [data-choice='agenda'], .pd-picker--style [data-decor='agenda']) .pd-picker__ornament {
    display: block;
    width: 1.25rem;
    height: 0.2rem;
    background: #1f5fd1;
}

:is(.pd-picker--decor [data-choice='class-book'], .pd-picker--style [data-decor='class-book'])::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, transparent 0 0.75rem, #e7a99c 0.75rem calc(0.75rem + 1px), transparent calc(0.75rem + 1px)),
        repeating-linear-gradient(transparent 0 0.5rem, rgb(0 0 0 / 0.12) 0.5rem calc(0.5rem + 1px));
}

:is(.pd-picker--decor [data-choice='birth-card'], .pd-picker--style [data-decor='birth-card']) .pd-picker__ornament {
    display: block;
    order: 1;
    width: 2.5rem;
    height: 0.4rem;
    border-inline: 1px solid currentColor;
    background: linear-gradient(currentColor, currentColor) center / 1px 100% no-repeat;
    opacity: 0.7;
}

/*
 * The save button at the top of a page: quiet while everything is saved, ink and
 * gently pulsing while the form holds changes, red when saving did not work.
 */
.fi-btn.pd-save {
    min-width: 6.5rem;
    transition: background-color 200ms, color 200ms, border-color 200ms;
}

.fi-btn.pd-save[data-state='saved'] {
    color: var(--gray-400);
    pointer-events: none;
}

.fi-btn.pd-save[data-state='dirty'],
.fi-btn.pd-save[data-state='saving'] {
    border-color: var(--pd-ink);
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

.fi-btn.pd-save[data-state='dirty'] {
    /* Twice, to catch the eye; the ink fill says the rest. */
    animation: pd-save-pulse 1.4s ease-in-out 2;
}

.fi-btn.pd-save[data-state='failed'] {
    border-color: var(--danger-600);
    color: var(--danger-600);
}

@keyframes pd-save-pulse {
    50% {
        box-shadow: 0 0 0 4px color-mix(in oklab, var(--pd-ink) 18%, transparent);
    }
}

@media (prefers-reduced-motion: reduce) {
    .fi-btn.pd-save[data-state='dirty'] {
        animation: none;
    }
}

/* Email texts and design: the form beside the email as it goes out, as on the design pages of a gallery. */

.pd-mail-texts {
    align-items: start;
    column-gap: 2.5rem !important;
}

.pd-mail-texts__editor {
    display: grid;
    gap: 1.5rem;
}

/* The emails and versions out of sight leave no gaps. */
.pd-mail-texts__editor .fi-grid-col:has(> .fi-sc-component > [style*='display: none']) {
    display: none;
}

.pd-mail-picker {
    display: grid;
    gap: 0.5rem;
}

.pd-mail-picker__label {
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 500;
}

.pd-mail-picker__description {
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.5;
}

.pd-mail-preview {
    position: sticky;
    top: var(--pd-sticky-top, 1rem);
}

.pd-mail-preview__stage {
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--pd-sticky-top, 1rem) + 1rem);
    min-height: 32rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: var(--pd-soft);
}

.pd-mail-preview__inbox {
    display: grid;
    gap: 0.125rem;
    padding: 0.75rem 1rem;
    border-radius: 0.375rem 0.375rem 0 0;
    background: var(--pd-canvas);
    box-shadow: inset 0 -1px 0 var(--pd-line);
}

.pd-mail-preview__from {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-mail-preview__subject {
    overflow: hidden;
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 600;
    white-space: nowrap;
    text-overflow: ellipsis;
}

.pd-mail-preview__frame {
    display: block;
    flex: 1;
    width: 100%;
    border: 0;
    border-radius: 0 0 0.375rem 0.375rem;
    background: #f4f3f1;
}

/* The paper beside its settings: the document as a PDF, as tall as the window allows. */
.pd-letterhead-preview {
    position: sticky;
    top: var(--pd-sticky-top, 1rem);
    display: flex;
    flex-direction: column;
    height: calc(100dvh - var(--pd-sticky-top, 1rem) + 1rem);
    min-height: 36rem;
    padding: 1.5rem;
    border-radius: 0.75rem;
    background: var(--pd-soft);
}

.pd-letterhead-preview__frame {
    display: block;
    flex: 1;
    width: 100%;
    border: 0;
    border-radius: 0.375rem;
    background: #f4f3f1;
}

/* In the full-screen dialog of a template, the document or the email stays beside the fields, as tall as the dialog allows. */
.pd-template-modal {
    --pd-sticky-top: 0px;
}

.pd-template-modal .pd-letterhead-preview {
    height: calc(100dvh - 11rem);
    min-height: 24rem;
}

.pd-template-modal .pd-mail-preview__stage {
    height: calc(100dvh - 11rem);
}

/* In the full-screen dialog to send, the email fills the height between its sticky header and footer. */
.pd-send-modal {
    --pd-sticky-top: 0px;
}

.pd-send-modal .pd-mail-preview__stage {
    height: calc(100dvh - 11rem);
}

/* Computer or phone above the email; the phone narrows inbox and email to a phone's width. */

.pd-mail-preview__devices {
    display: flex;
    gap: 0.25rem;
    justify-content: flex-end;
    margin-bottom: 0.75rem;
}

.pd-mail-preview__device {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
}

.pd-mail-preview__device[aria-pressed='true'] {
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

.pd-mail-preview__stage--phone .pd-mail-preview__inbox,
.pd-mail-preview__stage--phone .pd-mail-preview__frame {
    width: 100%;
    max-width: 390px;
    margin-inline: auto;
}

.pd-mail-preview__stage--phone .pd-mail-preview__frame {
    flex: 1;
}

/* The email editor: placeholders are chips with their name, not code in braces. */

.pd-mail-editor span[data-type='mergeTag'] {
    padding: 0 0.5rem;
    border-radius: 999px;
    background: var(--pd-soft);
    box-shadow: inset 0 0 0 1px var(--pd-line);
    color: var(--pd-ink);
    font-size: 0.875em;
    font-weight: 500;
    line-height: 1.6;
}

.pd-mail-editor span[data-type='mergeTag']::before,
.pd-mail-editor span[data-type='mergeTag']::after {
    content: none;
}

/* The versions of an email: the one being written is ink, a new one is added with a quiet link. */

.pd-mail-variants {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    align-items: center;
    margin-top: 0.25rem;
}

.pd-mail-variants__pill {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--pd-line);
    color: var(--pd-ink);
    font-size: 0.8125rem;
}

.pd-mail-variants__pill[aria-pressed='true'] {
    background: var(--pd-ink);
    box-shadow: none;
    color: var(--pd-canvas);
}

.pd-mail-variants__add,
.pd-mail-variants__delete {
    padding: 0.25rem 0.5rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-mail-variants__add:hover,
.pd-mail-variants__delete:hover {
    color: var(--pd-ink);
}

.pd-mail-variants__delete {
    margin-inline-start: auto;
}

/* The sample beside each placeholder in the editor's list; the page writes the words. */

.pd-mail-texts .fi-fo-rich-editor-merge-tags-list [data-id]::after {
    margin-inline-start: 0.5rem;
    color: inherit;
    font-weight: 400;
    opacity: 0.7;
}

/* A box and a line in the editor, as the email shows them. */

.pd-mail-editor blockquote {
    margin: 0.5rem 0;
    padding: 0.75rem 1rem;
    border-inline-start: 3px solid var(--pd-ink);
    border-radius: 0.25rem;
    background: var(--pd-soft);
    font-style: normal;
}

.pd-mail-editor blockquote p::before,
.pd-mail-editor blockquote p::after {
    content: none;
}

.pd-mail-editor hr {
    margin: 1rem 0;
    border: 0;
    border-top: 1px solid var(--pd-line);
}

.pd-mail-editor__button {
    display: inline-block;
    padding: 0.5rem 1.25rem;
    border-radius: 0.25rem;
    background: var(--pd-ink);
    color: var(--pd-canvas);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

/* Email design: a small email, sketched as the choice would lay it out. */

.pd-mail-sketch {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
    width: 58%;
    height: 82%;
    padding: 0.375rem 0.5rem;
    border-radius: 0.1875rem;
    background: white;
    box-shadow: 0 0 0 1px var(--pd-line);
}

.dark .pd-mail-sketch {
    background: color-mix(in oklab, white 8%, transparent);
}

.pd-mail-sketch i {
    display: block;
    flex: none;
    border-radius: 1px;
    background: color-mix(in oklab, var(--pd-ink) 18%, transparent);
}

.pd-mail-sketch__head {
    width: 30%;
    height: 0.25rem;
}

.pd-mail-sketch__photo {
    width: 100%;
    height: 1.5rem;
    background: color-mix(in oklab, var(--pd-ink) 30%, transparent) !important;
}

.pd-mail-sketch__line {
    width: 100%;
    height: 0.1875rem;
}

.pd-mail-sketch__line + .pd-mail-sketch__line {
    width: 70%;
}

.pd-mail-sketch__button {
    width: 40%;
    height: 0.4375rem;
    margin-top: auto;
    background: var(--pd-ink) !important;
}

/* Header: the logo large, small, or the name as a thin line. */
.pd-mail-sketch--header[data-choice='logo'] .pd-mail-sketch__head {
    width: 42%;
    height: 0.5rem;
}

.pd-mail-sketch--header[data-choice='name'] .pd-mail-sketch__head {
    width: 50%;
    height: 0.125rem;
}

.pd-mail-sketch--header .pd-mail-sketch__photo,
.pd-mail-sketch--button .pd-mail-sketch__photo {
    height: 1rem;
}

/* Cover: across the top edge, inset below the head, or none. */
.pd-mail-sketch--cover[data-choice='top'] .pd-mail-sketch__photo {
    order: -1;
    width: calc(100% + 1rem);
    margin: -0.375rem -0.5rem 0;
}

.pd-mail-sketch--cover[data-choice='inset'] .pd-mail-sketch__photo {
    width: 84%;
}

.pd-mail-sketch--cover[data-choice='none'] .pd-mail-sketch__photo {
    display: none;
}

/* Button: a surface, a frame, or underlined text. */
.pd-mail-sketch--button[data-choice='outline'] .pd-mail-sketch__button {
    background: transparent !important;
    box-shadow: inset 0 0 0 1.5px var(--pd-ink);
}

.pd-mail-sketch--button[data-choice='link'] .pd-mail-sketch__button {
    width: 30%;
    height: 0.125rem;
    margin-bottom: 0.125rem;
}

/* Brand Center: every look as a small title page in its own colours, type and ground. */

.pd-brands__intro {
    max-width: 68ch;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pd-brands {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.pd-brand-card {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms, box-shadow 140ms, transform 140ms;
}

a.pd-brand-card:hover {
    border-color: var(--pd-line-strong);
    box-shadow: var(--pd-shadow-hover);
    transform: translateY(-1px);
}

.pd-brand-card__cover {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.5rem;
    aspect-ratio: 16 / 10;
    max-width: 100%;
    padding: 1rem;
    text-align: center;
}

.pd-brand-card__logo {
    max-width: 60%;
    max-height: 1.75rem;
    object-fit: contain;
}

.pd-brand-card__name {
    font-size: 0.625rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    opacity: 0.85;
}

.pd-brand-card__title {
    font-size: 1.375rem;
    font-weight: 300;
    line-height: 1.1;
    text-wrap: balance;
}

.pd-brand-card__button {
    padding: 0.3rem 0.7rem;
    border-radius: 0.125rem;
    font-family: ui-sans-serif, system-ui, sans-serif;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.pd-brand-card__info {
    display: grid;
    gap: 0.375rem;
    padding: 0.75rem 0.875rem;
    border-top: 1px solid var(--pd-line);
    font-size: 0.875rem;
}

.pd-brand-card__head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.pd-brand-card__kind,
.pd-brand-card__usage {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-brand-card__swatches {
    display: flex;
    gap: 0.3rem;
}

.pd-brand-card__swatches i {
    width: 0.875rem;
    height: 0.875rem;
    border-radius: 999px;
    box-shadow: 0 0 0 1px var(--pd-line);
}

.pd-brands__empty {
    color: var(--gray-500);
    font-size: 0.875rem;
}

/* A brand's editor: the gallery in the look being edited, chosen above the scene. */

.pd-look-preview__bar {
    justify-content: space-between;
    gap: 1rem;
}

.pd-look-preview__choose {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 0;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-look-preview__choose select {
    min-width: 0;
    max-width: 16rem;
    padding: 0.25rem 1.75rem 0.25rem 0.5rem;
    border: 1px solid var(--pd-line-strong);
    border-radius: 0.375rem;
    background-color: var(--pd-canvas);
    color: var(--pd-ink);
    font-size: 0.8125rem;
}

.pd-look-preview__hint {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-look-preview__none {
    display: grid;
    place-items: center;
    height: 100%;
    color: var(--gray-500);
    font-size: 0.875rem;
    text-align: center;
}

/* Below the scene: the email, a shared link and the password page in the look being edited. */

.pd-look-preview .pd-design-preview__stage {
    /* Room for the strip below: its pictures (8.5rem), their names and the gaps. */
    height: calc(100dvh - var(--pd-sticky-top) + 1.5rem - 2.75rem - 12rem);
}

.pd-look-preview__strip {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.pd-look-mock {
    display: grid;
    gap: 0.375rem;
    margin: 0;
    min-width: 0;
}

.pd-look-mock figcaption {
    color: var(--gray-500);
    font-size: 0.6875rem;
}

.pd-look-mock__mail,
.pd-look-mock__share,
.pd-look-mock__gate {
    display: grid;
    align-content: center;
    justify-items: center;
    gap: 0.375rem;
    height: 8.5rem;
    padding: 0.625rem;
    overflow: hidden;
    border-radius: 0.375rem;
    box-shadow: 0 0 0 1px var(--pd-line);
    font-size: 0.625rem;
    text-align: center;
}

.pd-look-mock__mail {
    background: #fff;
    color: #161616;
}

.pd-look-mock__from {
    justify-self: stretch;
    overflow: hidden;
    color: #6f6f6f;
    text-align: start;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-look-mock__marks {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    max-width: 100%;
    min-width: 0;
}

.pd-look-mock__logo {
    min-width: 0;
    max-width: 9rem;
    max-height: 1.25rem;
    object-fit: contain;
}

.pd-look-mock__marks:has(.pd-look-mock__line) .pd-look-mock__logo {
    max-width: 5.5rem;
}

/* Beside the brand's logo the studio's, a little smaller, as in the gallery. */
.pd-look-mock__marks > :nth-child(3) {
    max-height: 1.0625rem;
}

.pd-look-mock__line {
    flex: none;
    align-self: stretch;
    width: 1px;
    background: currentColor;
    opacity: 0.35;
}

.pd-look-mock__name {
    font-weight: 600;
    letter-spacing: 0.14em;
    text-transform: uppercase;
}

.pd-look-mock__photo {
    justify-self: stretch;
    height: 2.5rem;
    border-radius: 0.125rem;
    background: var(--gray-300) center / cover;
}

.pd-look-mock__button {
    padding: 0.25rem 0.625rem;
    border-radius: 0.125rem;
    font-size: 0.5625rem;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.pd-look-mock__share {
    align-content: space-between;
    justify-items: start;
    background: #3f4a50 center / cover;
    color: #fff;
    text-align: start;
}

.pd-look-mock__share strong {
    font-size: 0.875rem;
    line-height: 1.15;
}

.pd-look-mock__field {
    width: 70%;
    height: 1.25rem;
    border: 1px solid currentColor;
    border-radius: 0.125rem;
    opacity: 0.35;
}

/* Above a design part: whether it follows the look of the brand or the studio, and the ways on. */

.pd-design-source {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    margin-bottom: 0.5rem;
    font-size: 0.8125rem;
}

.pd-design-source__badge {
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-soft);
    color: var(--pd-ink);
    font-weight: 500;
}

.pd-design-source__badge.is-own {
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

.pd-design-source__link {
    color: var(--gray-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-design-source__link:hover {
    color: var(--pd-ink);
}

.pd-design-source__start {
    margin-left: auto;
}

/* Colours found in a logo, each with its swatch, to take as accent colour. */

.pd-logo-colour::before {
    content: '';
    display: inline-block;
    width: 0.875rem;
    height: 0.875rem;
    margin-right: 0.375rem;
    border-radius: 999px;
    background: var(--pd-logo-colour);
    box-shadow: 0 0 0 1px var(--pd-line);
    vertical-align: -0.125rem;
}

/* Watermark: the sample photo as large as the stage allows. */

.pd-watermark-stage {
    align-items: center;
    justify-content: center;
}

.pd-watermark-stage img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 0.25rem;
}

/* Email sending: whether emails go out, in one line. */

.pd-mail-status {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.75rem 1rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
    color: var(--pd-ink);
    font-size: 0.875rem;
}

.pd-mail-status__dot {
    flex: none;
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--success-500);
}

.pd-mail-status.is-off .pd-mail-status__dot {
    background: var(--danger-500);
}

/* Below the width where form and preview stand side by side, the preview follows the form. */
@media (max-width: 79.99rem) {
    .pd-mail-preview {
        position: static;
    }

    .pd-mail-preview__stage {
        height: 36rem;
        min-height: 0;
        padding: 1rem;
    }
}

.pd-project-nav .pd-workspace-nav__items {
    padding-top: 0.25rem;
}

.pd-project-nav .pd-workspace-nav__item {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: baseline;
}

/* A project's tabs: all its photos, then each gallery made from them. */
.pd-project-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--pd-line);
    scrollbar-width: none;
}

.pd-project-tabs__tab {
    display: inline-flex;
    flex: none;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: -1px;
    padding: 0.625rem 0.875rem;
    border-bottom: 2px solid transparent;
    color: var(--gray-500);
    font-size: 0.875rem;
    font-weight: 500;
    white-space: nowrap;
    transition: color 150ms, border-color 150ms;
}

.pd-project-tabs__tab:hover,
.pd-project-tabs__tab.is-active {
    color: var(--pd-ink);
}

.pd-project-tabs__tab.is-active {
    border-bottom-color: var(--pd-page-area, var(--pd-ink));
}

.pd-project-tabs__count {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 400;
    font-variant-numeric: tabular-nums;
}

.pd-project-tabs__icon {
    width: 1rem;
    height: 1rem;
    flex: none;
}

.pd-project-tabs__divider {
    flex: none;
    width: 1px;
    margin: 0.625rem 0.375rem;
    background: var(--pd-line);
}

.pd-project-tabs__status {
    width: 0.4375rem;
    height: 0.4375rem;
    flex: none;
    border-radius: 999px;
    background: var(--gray-400);
}

.pd-project-tabs__status--published {
    background: var(--success-500, #16a34a);
}

.pd-project-tabs__status--expired {
    background: var(--danger-500, #dc2626);
}

.pd-project-tabs__add {
    color: var(--gray-500);
    font-weight: 400;
}

/* A gallery the files chosen are dragged onto. */
.pd-project-tabs__tab.is-drop-target {
    border-radius: 0.5rem 0.5rem 0 0;
    outline: 2px dashed var(--pd-ink);
    outline-offset: -2px;
}

.pd-project-tabs__tab:focus-visible,
.pd-gallery-groups__group:focus-visible {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

/* What there is to do with the gallery open, above its photos. */
.pd-gallery-groups {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1rem;
}

.pd-gallery-groups__group {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.75rem;
    border-radius: 0.5rem;
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    transition: background-color 150ms, color 150ms;
}

.dark .pd-gallery-groups__group {
    color: var(--gray-300);
}

.pd-gallery-groups__group svg {
    width: 1rem;
    height: 1rem;
}

.pd-gallery-groups__group:hover,
.pd-gallery-groups__group.is-active {
    background: var(--pd-soft);
    color: var(--pd-ink);
}

/* The reviewers, below the filters of the project's photos. */
.pd-project-nav__reviewers {
    margin-top: 0.75rem;
    border-top: 1px solid var(--pd-line);
}

/* The studios a person works in, in the user menu's dialog. */
.pd-switch-studio {
    display: grid;
    gap: 0.25rem;
}

.pd-switch-studio__item {
    display: block;
    padding: 0.5rem 0.75rem;
    border-radius: 0.5rem;
}

.pd-switch-studio__item:hover {
    background: var(--pd-soft, rgb(0 0 0 / 0.04));
}

.pd-switch-studio__item.is-current {
    font-weight: 600;
}

/* Online or not: the switch above a gallery. */
.pd-online-switch {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.5rem;
    border-radius: 0.5rem;
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 500;
}

.dark .pd-online-switch {
    color: var(--gray-300);
}

.pd-online-switch:focus-visible {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

.pd-online-switch__track {
    position: relative;
    width: 2.25rem;
    height: 1.25rem;
    flex: none;
    border-radius: 999px;
    background: var(--gray-300);
    transition: background-color 150ms;
}

.dark .pd-online-switch__track {
    background: var(--gray-700);
}

.pd-online-switch__thumb {
    position: absolute;
    top: 0.125rem;
    left: 0.125rem;
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    background: #fff;
    transition: transform 150ms;
}

.pd-online-switch.is-on .pd-online-switch__track {
    background: var(--success-500, #16a34a);
}

.pd-online-switch.is-on .pd-online-switch__thumb {
    transform: translateX(1rem);
}

.pd-online-switch.is-on {
    color: var(--pd-ink);
}

/* A project's kind in its colour, in the list of projects. */
.pd-type {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
}

.pd-type__dot {
    width: 0.5rem;
    height: 0.5rem;
    flex: none;
    border-radius: 999px;
}

/*
 * Your data and the backup: what is kept, in a few large numbers, how safe it is, in one line,
 * and what happened, as a timeline. Quiet like the rest: hairlines, black for what matters.
 */

.pd-vault {
    display: grid;
    gap: 1.25rem;
    padding: 1.5rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.pd-vault__head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
}

.pd-vault__title {
    margin: 0;
    color: var(--pd-ink);
    font-size: 1.25rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pd-vault__text {
    max-width: 40rem;
    margin: 0.375rem 0 0;
    color: var(--gray-600);
    font-size: 0.875rem;
    line-height: 1.6;
}

.dark .pd-vault__text {
    color: var(--gray-400);
}

.pd-vault__status {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 0.75rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--success-500) 12%, transparent);
    color: var(--success-700);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.dark .pd-vault__status {
    color: var(--success-400);
}

.pd-vault__status::before {
    content: "";
    width: 0.5rem;
    height: 0.5rem;
    border-radius: 999px;
    background: var(--success-500);
}

.pd-vault__status.is-warning {
    background: color-mix(in oklab, var(--warning-500) 14%, transparent);
    color: var(--warning-700);
}

.pd-vault__status.is-warning::before {
    background: var(--warning-500);
}

.pd-vault__status.is-danger {
    background: color-mix(in oklab, var(--danger-500) 12%, transparent);
    color: var(--danger-700);
}

.pd-vault__status.is-danger::before {
    background: var(--danger-500);
}

.pd-vault__status.is-running::before {
    background: var(--gray-400);
    animation: pd-vault-pulse 1.2s ease-in-out infinite;
}

.pd-vault__status.is-running {
    background: var(--pd-soft);
    color: var(--pd-ink);
}

@keyframes pd-vault-pulse {
    50% {
        opacity: 0.3;
    }
}

.pd-vault__stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr));
    gap: 0.75rem;
}

.pd-vault__stat {
    padding: 0.875rem 1rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
}

.pd-vault__stat-label {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-vault__stat-value {
    display: block;
    margin-top: 0.125rem;
    color: var(--pd-ink);
    font-size: 1.5rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    letter-spacing: -0.02em;
}

.pd-vault__stat-hint {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-vault__subtitle {
    margin: 0;
    color: var(--pd-ink);
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-vault__steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
    gap: 1rem;
    margin: 0;
    padding: 0;
    list-style: none;
    counter-reset: pd-step;
}

.pd-vault__step {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 0.25rem 0.75rem;
    counter-increment: pd-step;
}

.pd-vault__step::before {
    content: counter(pd-step);
    grid-row: span 2;
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 999px;
    background: var(--pd-ink);
    color: var(--pd-canvas);
    font-size: 0.8125rem;
    font-weight: 600;
}

.pd-vault__step-title {
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 500;
}

.pd-vault__step-text {
    color: var(--gray-500);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.pd-vault__tree {
    margin: 0;
    padding: 0.875rem 1rem;
    overflow-x: auto;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
    color: var(--pd-ink);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    line-height: 1.75;
    white-space: pre;
}

.pd-vault__tree span {
    color: var(--gray-500);
}

.pd-vault__note {
    margin: 0;
    color: var(--gray-500);
    font-size: 0.8125rem;
    line-height: 1.6;
}

/* The backup's history: one line per run, its log to open. */

.pd-vault__timeline {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pd-vault__run {
    position: relative;
    padding: 0 0 1rem 1.5rem;
}

.pd-vault__run::before {
    content: "";
    position: absolute;
    top: 0.4rem;
    left: 0.1875rem;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    background: var(--success-500);
}

.pd-vault__run::after {
    content: "";
    position: absolute;
    top: 1.25rem;
    bottom: 0;
    left: 0.4375rem;
    width: 1px;
    background: var(--pd-line);
}

.pd-vault__run:last-child::after {
    display: none;
}

.pd-vault__run.is-danger::before {
    background: var(--danger-500);
}

.pd-vault__run.is-running::before {
    background: var(--gray-400);
    animation: pd-vault-pulse 1.2s ease-in-out infinite;
}

.pd-vault__run summary {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
    cursor: pointer;
    list-style: none;
}

.pd-vault__run summary::-webkit-details-marker {
    display: none;
}

.pd-vault__run-time {
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 500;
}

.pd-vault__run-what {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-vault__log {
    margin: 0.625rem 0 0;
    padding: 0.75rem 1rem;
    max-height: 22rem;
    overflow: auto;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}

.pd-vault__log .is-problem {
    color: var(--danger-600);
}

.pd-vault__log time {
    color: var(--gray-500);
}

/* Beside a project's download: what the server is doing. */

/* Filament's full-screen window fills the screen but does not scroll its content: a long list of
   parts or a product's formats would be cut off. Every full-screen window scrolls its content. */
.fi-modal.fi-width-screen > .fi-modal-window-ctn > .fi-modal-window .fi-modal-content {
    min-height: 0;
    overflow-y: auto;
}

.pd-export {
    display: grid;
    gap: 1.25rem;
    max-width: 44rem;
    margin: 0 auto;
    padding: 1rem 0 2rem;
}

.pd-export__notes {
    display: grid;
    gap: 0.375rem;
    margin: 0;
    padding: 0.875rem 1rem 0.875rem 2rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
    color: var(--pd-ink);
    font-size: 0.8125rem;
    line-height: 1.55;
    list-style: disc;
}

.pd-export__list {
    display: grid;
    margin: 0;
    padding: 0;
    border-top: 1px solid var(--pd-line);
    list-style: none;
}

.pd-export__item {
    display: grid;
    gap: 0.75rem;
    padding: 0.875rem 0;
    border-bottom: 1px solid var(--pd-line);
}

.pd-export__row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.pd-export__what {
    display: grid;
    flex: 1;
    min-width: 0;
}

.pd-export__name {
    color: var(--pd-ink);
    font-size: 0.9375rem;
    font-weight: 500;
    overflow-wrap: anywhere;
}

.pd-export__meta {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-export__button {
    flex: none;
    padding: 0.4375rem 0.875rem;
    border: 1px solid var(--pd-line-strong);
    border-radius: 0.5rem;
    background: var(--pd-canvas);
    color: var(--pd-ink);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
}

.pd-export__button:hover {
    background: var(--pd-soft);
}

.pd-export__progress {
    display: grid;
    gap: 0.625rem;
}

.pd-export__pulse {
    flex: none;
    width: 0.625rem;
    height: 0.625rem;
    border-radius: 999px;
    background: var(--gray-400);
}

/* Alive: bytes are flowing. */
.pd-export__pulse.is-flowing {
    background: var(--pd-ink);
    animation: pd-vault-pulse 1.2s ease-in-out infinite;
}

/* Without motion: the running state stays as a still dot, it does not pulse. */
@media (prefers-reduced-motion: reduce) {
    .pd-vault__status.is-running::before,
    .pd-vault__run.is-running::before,
    .pd-export__pulse.is-flowing {
        animation: none;
    }
}

.pd-export__pulse.is-done {
    background: var(--success-500);
    animation: none;
}

.pd-export__title {
    margin: 0;
    color: var(--pd-ink);
    font-size: 1.25rem;
    font-weight: 600;
}

.pd-export__text {
    margin: 0.25rem 0 0;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pd-export__bar {
    height: 0.5rem;
    overflow: hidden;
    border-radius: 999px;
    background: var(--pd-soft);
}

.pd-export__bar span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: var(--pd-ink);
    transition: width 0.6s ease;
}

.pd-export__status {
    display: grid;
    gap: 0.25rem;
    margin: 0;
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.pd-export__file {
    display: block;
    color: var(--gray-500);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8125rem;
    overflow-wrap: anywhere;
}

.pd-export__hint {
    margin: 0;
    padding: 0.75rem 1rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
    color: var(--pd-ink);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.pd-export__hint.is-warning {
    background: color-mix(in oklab, var(--warning-500) 14%, transparent);
}

/* The printed part of a photo in an order: the photo dragged in a frame of the format (print-crop.js). */
.pd-print-crop {
    position: relative;
    /* About 22rem high, narrower where the column is: the format's shape stays. */
    width: min(100%, calc(22rem * var(--ratio, 1.5)));
    overflow: hidden;
    border-radius: 0.25rem;
    background: var(--pd-soft);
}

.pd-print-crop img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    pointer-events: none;
    user-select: none;
}

.pd-print-crop.is-movable {
    cursor: pointer;
}

/* A label on the frame says it opens the crop editor. */
.pd-crop-badge {
    position: absolute;
    left: 0.5rem;
    bottom: 0.5rem;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.375rem 0.7rem 0.375rem 0.55rem;
    border-radius: 999px;
    background: rgb(0 0 0 / 0.62);
    color: #fff;
    font-size: 0.75rem;
    line-height: 1;
    white-space: nowrap;
    pointer-events: none;
    transition: background 150ms;
}

.pd-crop-badge svg {
    flex: none;
    width: 0.875rem;
    height: 0.875rem;
}

.pd-print-crop.is-movable:hover > .pd-crop-badge,
.pd-print-crop.is-movable:focus-visible > .pd-crop-badge,
button.pd-order-line__frame:hover > .pd-crop-badge {
    background: rgb(0 0 0 / 0.85);
}

/* Where the frame is small, the symbol alone. */
.pd-crop-badge.is-compact {
    left: 0.25rem;
    bottom: 0.25rem;
    padding: 0.25rem;
}

.pd-crop-badge.is-compact svg {
    width: 0.75rem;
    height: 0.75rem;
}

.pd-print-crop:focus-visible {
    outline: 2px solid var(--primary-500);
    outline-offset: 2px;
}

/* Shop: price lists and products as cards, each product in a mockup. */

.pd-shop-intro {
    max-width: 68ch;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pd-shop-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* A price list's formats in one table, across the whole width: priced in a row, each field kept as typed. */
.pd-price-table-wrap {
    overflow-x: auto;
}

.pd-price-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.pd-price-table th,
.pd-price-table td {
    padding: 0.375rem 0.75rem;
    border-bottom: 1px solid var(--pd-line);
    text-align: left;
    vertical-align: middle;
}

.pd-price-table thead th {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    white-space: nowrap;
}

.pd-price-table__num {
    width: 11rem;
    text-align: right;
}

.pd-price-table td.pd-price-table__num {
    font-variant-numeric: tabular-nums;
}

.pd-price-table__on {
    width: 2.5rem;
}

.pd-price-table__section th {
    padding-top: 1.5rem;
    color: var(--pd-ink);
    font-size: 0.8125rem;
    font-weight: 600;
}

.pd-price-table__product td {
    padding-top: 0.75rem;
    border-bottom: 0;
}

.pd-price-table__name {
    color: var(--pd-ink);
    font-weight: 600;
}

.pd-price-table__name:hover {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.pd-price-table__meta {
    margin-inline-start: 0.5rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

td > .pd-price-table__meta:first-child {
    margin-inline-start: 0;
}

.pd-price-table__follow {
    margin-inline-start: 0.5rem;
    font-size: 0.8125rem;
}

.pd-price-table__error {
    margin: 0.25rem 0 0;
    color: var(--danger-600);
    font-size: 0.75rem;
    text-align: left;
}

.pd-price-table [data-loss] {
    color: var(--danger-600);
    font-weight: 600;
}

.pd-price-table tr[data-off] > td:not(.pd-price-table__on) {
    opacity: 0.45;
}

/* A choice beside the toolbar's buttons, e.g. the list for new galleries. */
.pd-shop-toolbar__check {
    margin-inline-start: 0.75rem;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
}

/* A product's combinations of format and values, by format: several ticked change at once. */
.pd-combinations {
    display: grid;
    gap: 0.75rem;
}

.pd-combinations__bulk {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--pd-radius-sm);
    background: var(--pd-soft);
}

.pd-combinations__count {
    font-size: 0.875rem;
    font-weight: 600;
}

.pd-combinations__amount {
    width: 11rem;
}

.pd-combinations__format td {
    padding-top: 1rem;
    font-weight: 600;
}

.pd-combinations__name {
    padding-inline-start: 1.5rem !important;
}

.pd-combinations__price {
    width: 8rem;
    margin-inline-start: auto;
}

.pd-combinations__price input {
    text-align: right;
}

/* A catalogue's offer and prices said as one sentence under its name, the fields inline. */
.pd-catalog-rule {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 0.625rem;
    font-size: 0.9375rem;
    color: var(--pd-ink);
}

.pd-catalog-rule .fi-input-wrp {
    width: auto;
}

.pd-catalog-rule__percent {
    width: 7.5rem !important;
}

.pd-catalog-rule__where a {
    color: var(--pd-ink);
    text-decoration: underline;
    text-decoration-color: var(--pd-line);
    text-underline-offset: 3px;
}

.pd-catalog-rule__where a:hover {
    text-decoration-color: currentColor;
}

/* Two views of one page, smaller than the tabs of a place: a grey track, the chosen part lifted. */
.pd-segment {
    display: inline-flex;
    align-self: flex-start;
    justify-self: start;
    max-width: 100%;
    gap: 2px;
    padding: 2px;
    border-radius: 8px;
    background: rgb(118 118 128 / 0.12);
    overflow-x: auto;
}

.pd-segment button {
    padding: 0.25rem 0.75rem;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 500;
    white-space: nowrap;
}

.pd-segment button[aria-pressed="true"] {
    background: var(--pd-panel);
    color: var(--pd-ink);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.12), 0 0 0 0.5px rgb(0 0 0 / 0.04);
}

.pd-segment button:active {
    transform: scale(0.97);
    transition: transform 100ms ease-out;
}

.pd-segment__count {
    margin-inline-start: 0.25rem;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

.dark .pd-segment button {
    color: var(--gray-400);
}

.dark .pd-segment button[aria-pressed="true"] {
    background: rgb(118 118 128 / 0.36);
    color: var(--pd-ink);
    box-shadow: none;
}

/* The catalogues' list: a mark beside an empty one. */
.pd-catalog-list__mark {
    display: inline-flex;
    margin-inline-start: 0.5rem;
    vertical-align: middle;
}

/* A price list's markups, in one row above its products. */
.pd-markups {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem 1.25rem;
    padding: 0.75rem 1rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
    font-size: 0.875rem;
}

.pd-markups__title {
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-markups__field {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--gray-700);
}

.pd-markups__field .fi-input-wrp {
    width: 6.5rem;
}

.pd-markups__field:last-of-type .fi-input-wrp,
.pd-markups__add {
    width: auto;
}

.pd-markups__remove {
    display: inline-flex;
    padding: 0.25rem;
    border-radius: 999px;
    color: var(--gray-500);
}

.pd-markups__remove:hover {
    background: var(--pd-soft);
    color: var(--pd-ink);
}

.pd-markups__error {
    flex-basis: 100%;
    margin: 0;
    font-size: 0.8125rem;
    color: var(--danger-600);
}

.dark .pd-markups__field {
    color: var(--gray-300);
}

.pd-shop-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr));
    gap: 1rem;
}

.pd-shop-card {
    display: grid;
    align-content: start;
    overflow: hidden;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
    color: inherit;
    font: inherit;
    text-align: left;
    text-decoration: none;
    cursor: pointer;
    transition: border-color 140ms, box-shadow 140ms, transform 140ms;
}

.pd-shop-card:hover {
    border-color: var(--pd-line-strong);
    box-shadow: var(--pd-shadow-hover);
    transform: translateY(-1px);
}

.pd-shop-card:focus-visible {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

.pd-shop-card[data-off] .pd-shop-card__cover img {
    opacity: 0.45;
    filter: grayscale(1);
}

.pd-shop-card__cover {
    position: relative;
    display: block;
    aspect-ratio: 3 / 2;
    background: var(--pd-line);
}

.pd-shop-card__cover img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-shop-card__badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    padding: 0.15rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-canvas);
    font-size: 0.6875rem;
    font-weight: 600;
}

.pd-shop-card__info {
    display: grid;
    gap: 0.2rem;
    padding: 0.75rem 0.875rem;
    border-top: 1px solid var(--pd-line);
}

.pd-shop-card__name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-shop-card__meta {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-shop-card__meta--quiet {
    font-style: italic;
}

.pd-shop-rows {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--pd-line);
}

.pd-shop-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto auto;
    gap: 1rem;
    align-items: center;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--pd-line);
    font-size: 0.875rem;
}

.pd-shop-row__name {
    font-weight: 600;
}

.pd-shop-row__meta {
    color: var(--gray-500);
    font-size: 0.75rem;
}

/* Shop overview: what is missing to sell, and three figures. */

.pd-shop-panel {
    display: grid;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.pd-shop-panel__title {
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-shop-panel__hint {
    margin: -0.25rem 0 0;
    font-size: 0.875rem;
    color: var(--warning-700, #b45309);
}

.pd-shop-checks {
    display: grid;
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pd-shop-check {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
    font-size: 0.875rem;
}

.pd-shop-check__mark {
    display: inline-grid;
    place-items: center;
    width: 1.25rem;
    height: 1.25rem;
    border-radius: 999px;
    background: var(--success-100, #dcfce7);
    color: var(--success-700, #15803d);
    font-size: 0.75rem;
    font-weight: 700;
}

.pd-shop-check[data-open] .pd-shop-check__mark {
    background: var(--warning-100, #fef3c7);
    color: var(--warning-700, #b45309);
}

.pd-shop-figures {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
    gap: 1rem;
}

.pd-shop-figure {
    display: grid;
    gap: 0.25rem;
    padding: 1rem 1.25rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
    color: inherit;
    text-decoration: none;
    transition: border-color 140ms, box-shadow 140ms, transform 140ms;
}

.pd-shop-figure:hover {
    border-color: var(--pd-line-strong);
    box-shadow: var(--pd-shadow-hover);
    transform: translateY(-1px);
}

.pd-shop-figure__label,
.pd-shop-figure__meta {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-shop-figure__value {
    font-size: 1.75rem;
    font-weight: 300;
    line-height: 1.2;
}

/* An order's prints, each in its format's frame at the client's crop. */

.pd-order-lines {
    display: grid;
    margin: 0;
    padding: 0;
    list-style: none;
    border-top: 1px solid var(--pd-line);
}

.pd-order-line {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--pd-line);
    font-size: 0.875rem;
}

/* A set's positions under its line, indented; the set's line carries the price. */
.pd-order-line--position {
    padding-left: 2rem;
    border-bottom: 0;
}

.pd-order-line__frame {
    position: relative;
    display: block;
    justify-self: center;
    width: auto;
    max-width: 8.5rem;
    height: 5.5rem;
    overflow: hidden;
    background: var(--pd-line);
    box-shadow: 0 0 0 1px var(--pd-line);
}

.pd-order-line__frame img {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-order-line__text {
    display: grid;
    gap: 0.15rem;
}

.pd-order-line__title {
    font-weight: 600;
}

.pd-order-line__meta {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-order-line__amount {
    font-variant-numeric: tabular-nums;
}

.pd-shop-heading {
    margin-top: 0.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
}

div.pd-shop-card {
    cursor: default;
}

div.pd-shop-card:hover {
    box-shadow: 0 0 0 1px var(--pd-line);
}

/* A set's photos in its line: a strip of small squares, the rest counted. */
.pd-order-line__strip {
    display: grid;
    grid-template-columns: repeat(4, 1.6rem);
    gap: 2px;
    justify-self: center;
    cursor: pointer;
}

.pd-order-line__strip img,
.pd-order-line__strip span {
    display: block;
    width: 1.6rem;
    height: 1.6rem;
    object-fit: cover;
    background: var(--pd-line);
}

.pd-order-line__strip span {
    display: grid;
    place-items: center;
    font-size: 0.625rem;
}

/* A set ordered without its photos: how many of how many are there. */
.pd-order-line__frame--later {
    display: grid;
    place-items: center;
    width: 5.5rem;
    border: 1px dashed var(--pd-line);
    background: none;
    box-shadow: none;
    color: var(--gray-500);
    font-variant-numeric: tabular-nums;
}

button.pd-order-line__frame {
    padding: 0;
    border: 0;
    cursor: pointer;
}

button.pd-order-line__frame:hover {
    box-shadow: 0 0 0 2px var(--pd-ink);
}

/*
 * A cluster's row of pages (Shop, Settings): on narrower screens without symbols and closer, so
 * all fit; where they still do not, the row scrolls and fades at its edge.
 */
@media (max-width: 1100px) {
    .fi-page-sub-navigation-tabs {
        gap: 1rem;
    }

    .fi-page-sub-navigation-tabs .fi-tabs-item > .fi-icon {
        display: none;
    }
}

@media (max-width: 640px) {
    .fi-page-sub-navigation-tabs {
        scrollbar-width: none;
        mask-image: linear-gradient(to right, #000 calc(100% - 2rem), transparent);
    }
}

/* Mockups are looked at, not only picked: larger cards. */
.pd-shop-cards--large {
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
}

/* A product's mockups to tick: each scene large enough to tell, its name below. */
.pd-mockup-choice {
    display: grid;
    gap: 0.375rem;
    width: 100%;
}

.pd-mockup-choice img {
    display: block;
    width: 100%;
    aspect-ratio: 3 / 2;
    object-fit: cover;
    border-radius: 0.375rem;
    box-shadow: 0 0 0 1px var(--pd-line);
}

.fi-fo-checkbox-list-option-label:has(.pd-mockup-choice) {
    width: 100%;
}

/* A scene of the shop's start, chosen by its picture. */
.pd-scene-choices .fi-fo-radio-label {
    align-items: flex-start;
}

.pd-scene-choices .fi-fo-radio-label-text {
    flex: 1;
}

.pd-mockup-choice__name {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
}

.pd-mockup-choice__edit {
    color: var(--gray-500);
    font-size: 0.8125rem;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-mockup-choice__edit:hover {
    color: var(--pd-ink);
}

/* A product's new mockups, below those to tick: the cards the size of the scenes above. */
.pd-product-mockups {
    display: grid;
    gap: 1rem;
}

.pd-shop-cards--new {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
}

/* In a product's card the ways to a new picture stay low strips, not tiles as tall as wide. */
.pd-product-mockups .pd-shop-cards--new {
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 12rem), 1fr));
}

.pd-product-mockups .pd-psd-drop__area {
    aspect-ratio: auto;
    min-height: 4.5rem;
    padding: 0.75rem 1rem;
}

/* A product's pictures in one row: dragged into order, the first the cover. */
.pd-media-strip {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 10rem), 1fr));
    gap: 0.75rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* No wider than its column: a long name is cut short, not the picture stretched over the next. */
.pd-media-strip__item {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    align-content: start;
    gap: 0.375rem;
    min-width: 0;
}

.pd-media-strip__picture {
    position: relative;
    display: block;
    cursor: grab;
}

.pd-media-strip__picture:active {
    cursor: grabbing;
}

.pd-media-strip__picture img {
    display: block;
    width: 100%;
    aspect-ratio: 1;
    object-fit: cover;
    border-radius: 0.5rem;
    box-shadow: 0 0 0 1px var(--pd-line);
    user-select: none;
}

.pd-media-strip__item:first-child .pd-media-strip__picture img {
    box-shadow: 0 0 0 2px var(--pd-ink);
}

.pd-media-strip__cover {
    position: absolute;
    top: 0.375rem;
    left: 0.375rem;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-ink);
    color: var(--pd-canvas);
    font-size: 0.75rem;
    font-weight: 600;
}

.pd-media-strip__info {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.375rem;
    font-size: 0.8125rem;
    line-height: 1.3;
}

.pd-media-strip__kind {
    color: var(--gray-500);
}

.pd-media-strip__name {
    overflow: hidden;
    min-width: 0;
    max-width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-media-strip__shows {
    padding: 0 0.4rem;
    border-radius: 999px;
    background: var(--pd-well);
    box-shadow: inset 0 0 0 1px var(--pd-line);
}

.pd-media-strip__actions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.8125rem;
}

.pd-media-strip__action {
    color: var(--gray-500);
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-media-strip__action:hover {
    color: var(--pd-ink);
}

/* A Photoshop file dropped on the mockups: a card of its own, dashed, the size of the others. */
div.pd-psd-drop,
button.pd-psd-drop,
label.pd-psd-drop {
    border-style: dashed;
    border-color: var(--pd-line-strong);
    background: var(--pd-well);
    box-shadow: none;
}

div.pd-psd-drop:hover,
button.pd-psd-drop:hover,
label.pd-psd-drop:hover,
div.pd-psd-drop[data-over="true"] {
    border-color: var(--pd-ink);
    box-shadow: none;
}

.pd-psd-drop__area {
    display: grid;
    place-content: center;
    justify-items: center;
    gap: 0.35rem;
    min-height: 100%;
    aspect-ratio: 3 / 2;
    padding: 1.5rem;
    text-align: center;
    cursor: pointer;
}

.pd-psd-drop[data-state="sending"] .pd-psd-drop__area,
.pd-psd-drop[data-state="reading"] .pd-psd-drop__area {
    cursor: progress;
}

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

.pd-psd-drop__icon {
    width: 1.75rem;
    height: 1.75rem;
    color: var(--gray-500);
}

.pd-psd-drop__bar {
    display: block;
    width: min(14rem, 80%);
    height: 4px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--pd-line);
}

.pd-psd-drop__bar > span {
    display: block;
    height: 100%;
    background: var(--pd-ink);
    transition: width 200ms;
}

/* Its smart objects to choose from, above the mockups. */
.pd-psd-choice {
    display: grid;
    gap: 0.75rem;
}

.pd-psd-choice__head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.5rem 1rem;
}

.pd-psd-choice__head h2 {
    font-size: 1rem;
    font-weight: 600;
}

.pd-psd-choice__head > :last-child {
    margin-left: auto;
}

.pd-psd-choice__cover {
    background: repeating-conic-gradient(var(--pd-line) 0 25%, transparent 0 50%) 0 0 / 16px 16px;
}

.pd-psd-choice__cover img {
    object-fit: contain;
}

.pd-psd-choice--busy {
    opacity: 0.5;
    pointer-events: none;
}

/* A mockup from a Photoshop file beside Photoshop's own picture of it. */
.pd-psd-compare {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr));
    gap: 1rem;
}

.pd-psd-compare figure {
    display: grid;
    gap: 0.375rem;
    margin: 0;
}

.pd-psd-compare img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: var(--pd-radius-sm);
    box-shadow: 0 0 0 1px var(--pd-line);
}

.pd-psd-compare figcaption {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-psd-left-out {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
    font-size: 0.875rem;
    font-weight: 500;
}

.pd-psd-skipped {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

/* A product's formats: many narrow columns, so their headings may wrap. */
.pd-format-table th {
    white-space: normal;
}

/* With prices by finish the table outgrows its card: it scrolls sideways there, its fields keep
   room for an amount. */
.pd-format-table {
    overflow-x: auto;
    container-type: inline-size;
}

.pd-format-table table {
    width: max-content;
    min-width: 100%;
}

/* The button below as wide as what shows of the table, so it stays in the middle there. */
.pd-format-table .fi-fo-table-repeater-add {
    position: sticky;
    left: 0;
    width: 100cqw;
}

/* A product's mockup to choose for a finish: small picture, name beside it. */
/* A layer of a Photoshop mockup: small on a checkerboard, so a light or transparent layer shows, with its name. */
.pd-layer-label {
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.pd-layer-label img {
    width: 64px;
    height: 40px;
    object-fit: contain;
    border-radius: 4px;
    background: repeating-conic-gradient(#e5e7eb 0% 25%, #ffffff 0% 50%) 50% / 12px 12px;
}

.pd-mockup-option {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.pd-mockup-option img {
    width: 2.75rem;
    height: 1.85rem;
    object-fit: cover;
    border-radius: 3px;
}

/* A value's picture in its row: the thumbnail alone, its name in the window. */
.pd-picture-cell .pd-mockup-option > span {
    display: none;
}

.pd-picture-cell .pd-mockup-option img {
    width: 3.5rem;
    height: 2.4rem;
}

.pd-picture-cell__none {
    color: var(--gray-500);
}

/* Choosing it: every picture large, in a grid. */
.pd-picture-picker {
    display: grid !important;
    grid-template-columns: repeat(auto-fill, minmax(10rem, 1fr));
    gap: 0.75rem;
}

.pd-picture-picker .fi-fo-radio-label {
    position: relative;
    display: block;
    padding: 0.5rem;
    border: 1px solid var(--gray-200);
    border-radius: 0.75rem;
    cursor: pointer;
}

.dark .pd-picture-picker .fi-fo-radio-label {
    border-color: var(--gray-700);
}

.pd-picture-picker .fi-fo-radio-label:has(input:checked) {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 1px var(--primary-600);
}

.pd-picture-picker input[type="radio"] {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
}

/* A mockup's kind of scene, three tiles side by side. */
.pd-scene-kinds {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr));
    gap: 1rem;
}

.pd-scene-kinds .fi-fo-radio-label {
    position: relative;
    display: block;
    margin: 0;
    padding: 1rem 1.25rem;
    border: 1px solid var(--pd-line);
    border-radius: 0.875rem;
    cursor: pointer;
}

.pd-scene-kinds .fi-fo-radio-label:has(input:checked) {
    border-color: var(--pd-ink);
    box-shadow: 0 0 0 1px var(--pd-ink);
}

.pd-scene-kinds input[type="radio"] {
    position: absolute;
    top: 1.1rem;
    right: 1.1rem;
}

.pd-scene-kind {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-right: 1.5rem;
}

.pd-scene-kind__title {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    color: var(--pd-ink);
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-scene-kind__title svg {
    width: 1.375rem;
    height: 1.375rem;
    flex: none;
}

.pd-scene-kind__text {
    color: var(--gray-600);
    font-size: 0.875rem;
    font-weight: 400;
    line-height: 1.45;
}

.pd-scene-kind__examples {
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 400;
}

/* A product's values with what they change of its look. */
.pd-value-looks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 0.5rem;
}

.pd-value-looks__heading {
    margin: 0;
    color: var(--pd-ink);
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-value-looks__variant {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.pd-value-looks__name {
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pd-value-looks__rows {
    margin: 0;
    padding: 0;
    list-style: none;
    border: 1px solid var(--pd-line);
    border-radius: 0.75rem;
}

.pd-value-looks__row {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem 1rem;
    padding: 0.5rem 0.875rem;
}

.pd-value-looks__row + .pd-value-looks__row {
    border-top: 1px solid var(--pd-line);
}

.pd-value-looks__value {
    min-width: 9rem;
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 600;
}

.pd-value-looks__row .pd-chips {
    flex: 1;
}

.pd-value-looks__same {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-picture-picker .pd-mockup-option {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 0.4rem;
    font-size: 0.8125rem;
}

.pd-picture-picker .pd-mockup-option img,
.pd-picture-picker__all {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    border-radius: 0.5rem;
}

.pd-picture-picker__all {
    background: repeating-conic-gradient(var(--gray-100) 0% 25%, transparent 0% 50%) 50% / 16px 16px;
}

/* A format's margin: worked out, not typed, so plain figures. */
.pd-format-margin {
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    color: var(--gray-600);
}

.dark .pd-format-margin {
    color: var(--gray-300);
}

/* A product as clients see it, beside its form; it stays in view while the form scrolls. */
.pd-product-preview {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.pd-product-preview__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--pd-line);
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-product-preview__off {
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-soft);
    font-weight: 500;
    color: var(--gray-600);
}

.pd-product-preview__stage {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 3 / 2;
    background: var(--pd-well);
}

/* The whole scene, never cut: mockups come in their own proportions. */
.pd-product-preview__stage img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

/* Beside the product's tabs only the product as clients see it: it stays in view while the tabs scroll,
   scrolling itself where it is taller than the window. */
.pd-product-side {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

@media (min-width: 1024px) {
    .pd-product-side {
        position: sticky;
        top: var(--pd-sticky-top);
        align-self: start;
        max-height: calc(100dvh - var(--pd-sticky-top) - 1rem);
        overflow-y: auto;
        overscroll-behavior: contain;
    }
}

/* "At a glance" beside a catalogue product's tabs, staying in view the same way. */
@media (min-width: 1280px) {
    .pd-glance {
        position: sticky;
        top: var(--pd-sticky-top);
        align-self: start;
    }
}

.pd-product-preview__empty {
    padding: 1rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.pd-product-preview__example {
    margin: 0.375rem 0 0;
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-product-preview__thumbs {
    display: flex;
    gap: 0.5rem;
    padding: 0.75rem 1rem 0;
    overflow-x: auto;
}

.pd-product-preview__thumbs button {
    flex: none;
    width: 3.5rem;
    height: 3.5rem;
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: var(--pd-radius-sm);
    box-shadow: 0 0 0 1px var(--pd-line);
    cursor: pointer;
}

.pd-product-preview__thumbs button[aria-pressed="true"] {
    box-shadow: 0 0 0 2px var(--pd-ink);
}

.pd-product-preview__thumbs img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-product-preview__body {
    display: grid;
    gap: 1rem;
    padding: 1rem 1rem 1.25rem;
}

.pd-product-preview__name {
    font-size: 1.0625rem;
    font-weight: 600;
    color: var(--pd-ink);
}

.pd-product-preview__price {
    margin-top: 0.125rem;
    font-size: 1.25rem;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--pd-ink);
}

.pd-product-preview__meta,
.pd-product-preview__description {
    margin: 0;
    font-size: 0.875rem;
    line-height: 1.5;
    color: var(--gray-600);
}

.pd-product-preview__group {
    display: grid;
    gap: 0.5rem;
}

.pd-product-preview__label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: var(--gray-700);
}

.pd-product-preview__chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Whether the client's photo lies across or upright, above the pictures it brings. */
.pd-product-preview__ways {
    padding: 0.75rem 1rem 0;
}

.pd-product-preview__chips button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    min-height: 2.25rem;
    padding: 0 0.875rem;
    border: 1px solid var(--pd-line-strong);
    border-radius: 999px;
    background: var(--pd-panel);
    font-size: 0.875rem;
    color: var(--pd-ink);
    cursor: pointer;
}

.pd-product-preview__chips button[aria-pressed="true"] {
    border-color: var(--pd-ink);
    box-shadow: inset 0 0 0 1px var(--pd-ink);
}

.pd-product-preview__swatch {
    width: 1rem;
    height: 1rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px rgb(0 0 0 / 0.2);
}

.dark .pd-product-preview__off,
.dark .pd-product-preview__meta,
.dark .pd-product-preview__description {
    color: var(--gray-300);
}

.dark .pd-product-preview__label {
    color: var(--gray-200);
}

/* A mockup's print area: the scene with its grid and the photo laid in, the shape beside it. */
.pd-print-area {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 18rem;
    gap: 1.5rem;
    align-items: start;
}

.pd-print-area__stage {
    position: relative;
    user-select: none;
    touch-action: none;
}

.pd-print-area__stage img {
    display: block;
    width: 100%;
    height: auto;
    border-radius: 0.375rem;
}

.pd-print-area__stage canvas,
.pd-print-area__stage svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.pd-print-area__line,
.pd-print-area__edge {
    stroke: #e8a33d;
}

.pd-print-area__line {
    stroke-width: 1px;
    stroke-opacity: 0.7;
}

.pd-print-area__edge {
    stroke-width: 2px;
}

.pd-print-area__handle {
    position: absolute;
    width: 1.375rem;
    height: 1.375rem;
    margin: -0.6875rem 0 0 -0.6875rem;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e8a33d;
    box-shadow: 0 1px 4px rgb(0 0 0 / 0.5);
    cursor: grab;
    touch-action: none;
}

.pd-print-area__handle--small {
    width: 1rem;
    height: 1rem;
    margin: -0.5rem 0 0 -0.5rem;
}

.pd-print-area__tools {
    display: grid;
    gap: 1.25rem;
}

.pd-print-area__field {
    display: grid;
    gap: 0.5rem;
}

.pd-print-area__label {
    color: var(--pd-ink);
    font-size: 0.875rem;
    font-weight: 500;
}

.pd-print-area__shapes {
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

.pd-print-area__shape {
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    box-shadow: inset 0 0 0 1px var(--pd-line);
    color: var(--pd-ink);
    font-size: 0.8125rem;
}

.pd-print-area__shape[aria-pressed='true'] {
    background: var(--pd-ink);
    box-shadow: none;
    color: var(--pd-canvas);
}

.pd-print-area__help {
    color: var(--gray-500);
    font-size: 0.8125rem;
    line-height: 1.45;
}

.pd-print-area__field input[type='range'] {
    width: 100%;
    accent-color: var(--primary-500);
}

.pd-print-area__check {
    display: flex;
    gap: 0.5rem;
    align-items: center;
    color: var(--pd-ink);
    font-size: 0.875rem;
}

@media (max-width: 64rem) {
    .pd-print-area {
        grid-template-columns: minmax(0, 1fr);
    }
}

.pd-order-line__warning {
    color: var(--warning-600, #d97706);
    font-size: 0.75rem;
}

.pd-print-crop.is-movable {
    cursor: zoom-in;
}

/* The platform's imprint and privacy policy, quietly under every page */

.pd-platform-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.25rem 1rem;
    padding: 1rem 1rem 1.25rem;
    font-size: 0.75rem;
    color: var(--gray-400, #9ca3af);
}

.pd-platform-footer a {
    color: inherit;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.pd-platform-footer a:hover {
    color: var(--gray-600, #4b5563);
}

/* The line for the studio's website that shows the booking page's promotion there, to copy */

.pd-promotion-embed {
    display: grid;
    gap: 0.625rem;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}

.pd-promotion-embed__intro {
    margin: 0;
    color: var(--gray-500, #6b7280);
}

.pd-promotion-embed__row {
    display: grid;
    grid-template-columns: minmax(8rem, auto) minmax(0, 1fr) auto;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius-sm);
}

.pd-promotion-embed__name {
    font-weight: 600;
}

.pd-promotion-embed__code {
    overflow-x: auto;
    font-size: 0.8125rem;
    white-space: nowrap;
    user-select: all;
}

@media (max-width: 640px) {
    .pd-promotion-embed__row {
        grid-template-columns: minmax(0, 1fr) auto;
    }

    .pd-promotion-embed__code {
        grid-column: 1 / -1;
        grid-row: 2;
    }
}

/* The section for the studio's privacy policy, to copy */

.pd-privacy-block {
    display: grid;
    gap: 0.75rem;
    margin-top: 1rem;
    font-size: 0.875rem;
}

.pd-privacy-block__intro {
    margin: 0;
    color: var(--gray-500, #6b7280);
}

.pd-privacy-block__part {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius-sm);
}

.pd-privacy-block__part summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.625rem 0.875rem;
    font-weight: 600;
    cursor: pointer;
}

.pd-privacy-block__copy {
    padding: 0.25rem 0.75rem;
    border: 1px solid var(--gray-300, #d1d5db);
    border-radius: 0.375rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

.pd-privacy-block__text {
    padding: 0 0.875rem 0.875rem;
    line-height: 1.6;
    user-select: all;
}

.pd-privacy-block__text h2 {
    margin: 0.5rem 0;
    font-size: 1rem;
    font-weight: 600;
}

.pd-privacy-block__text p {
    margin: 0 0 0.625rem;
}

.dark .pd-privacy-block__part {
    border-color: var(--gray-700, #374151);
}

/* Shipping: each zone a card with its ways as rows, each opening beside the page. */

.pd-shipping {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
}

.pd-shipping__public {
    align-self: center;
    margin-left: auto;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-shipping__warning {
    max-width: 80ch;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    background: color-mix(in srgb, var(--warning-500) 12%, transparent);
    font-size: 0.875rem;
}

.pd-shipping__zones {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 1rem;
    align-items: start;
}

.pd-shipping__zone {
    display: grid;
    overflow: hidden;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.pd-shipping__head {
    display: flex;
    gap: 1rem;
    align-items: start;
    justify-content: space-between;
    padding: 0.875rem 1rem;
}

.pd-shipping__name {
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-shipping__countries {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-shipping__method {
    display: grid;
    gap: 0.15rem;
    padding: 0.75rem 1rem;
    border-top: 1px solid var(--pd-line);
    color: inherit;
    font: inherit;
    text-align: left;
    cursor: pointer;
}

.pd-shipping__method:hover {
    background: color-mix(in srgb, var(--pd-ink) 4%, transparent);
}

.pd-shipping__method[data-off] {
    color: var(--gray-500);
}

.pd-shipping__method-name {
    font-size: 0.875rem;
    font-weight: 600;
}

.pd-shipping__method-name small {
    margin-left: 0.375rem;
    font-weight: 400;
}

.pd-shipping__method-rule {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-shipping__add {
    padding: 0.5rem 1rem 0.75rem;
    border-top: 1px solid var(--pd-line);
}

/* Catalog: services and addons as cards in a Filament grid, dressed like the shop's product cards. */
.pd-catalog-cards .fi-ta-record {
    background: transparent;
    box-shadow: none;
    border: 0;
}
.pd-catalog-cards .pd-shop-card {
    display: flex;
    flex-direction: column;
    width: 100%;
    text-align: left;
}

/* Catalog: what the studio offers, a band per kind of job with its packages side by side and their addons. */
.pd-offer-tabs { margin-top: 0.25rem; }
.pd-offer { display: grid; gap: 1rem; }
.pd-offer__kinds { display: grid; gap: 1rem; }
.pd-offer__kind { border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); overflow: hidden; }
.pd-offer__head { display: grid; grid-template-columns: auto minmax(12rem, 16rem) minmax(0, 1fr) auto; gap: 0.75rem 1rem; align-items: center; padding: 0.75rem 1rem; background: var(--pd-well); border-bottom: 1px solid var(--pd-line); }
.pd-offer__grip { cursor: grab; color: var(--gray-400); letter-spacing: -2px; user-select: none; }
.pd-offer__kind-name { display: flex; align-items: center; gap: 0.625rem; min-width: 0; color: inherit; text-decoration: none; }
.pd-offer__kind-name b { display: block; font-size: 0.9375rem; font-weight: 600; }
.pd-offer__kind-name small { display: block; color: var(--gray-500); font-size: 0.75rem; }
.pd-offer__dot { width: 0.6875rem; height: 0.6875rem; flex: none; border-radius: 999px; background: var(--kind, var(--gray-400)); }
.pd-offer__plaques { display: flex; flex-wrap: wrap; gap: 0.375rem; min-width: 0; }
.pd-offer__plaque { padding: 0.125rem 0.625rem; border: 1px solid var(--pd-line); border-radius: 999px; background: var(--pd-panel); font-size: 0.75rem; white-space: nowrap; }
.pd-offer__plaque.is-up { border-color: transparent; background: #fdf1dc; color: #8a5200; }
.pd-offer__plaque.is-down { border-color: transparent; background: #e4f3ea; color: #1f6b43; }
.dark .pd-offer__plaque.is-up { background: rgb(240 182 90 / 0.15); color: #f0b65a; }
.dark .pd-offer__plaque.is-down { background: rgb(115 211 160 / 0.14); color: #73d3a0; }
.pd-offer__ladder { display: grid; grid-template-columns: repeat(auto-fill, minmax(13.5rem, 1fr)); }
.pd-offer__pkg { display: flex; flex-direction: column; gap: 0.125rem; min-width: 0; padding: 0.875rem 1rem; border-right: 1px solid var(--pd-line); border-bottom: 1px solid var(--pd-line); color: inherit; text-decoration: none; transition: background-color 140ms; }
.pd-offer__pkg:hover { background: var(--pd-well); }
.pd-offer__pkg:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: -2px; }
.pd-offer__pkg.is-off { color: var(--gray-500); }
.pd-offer__pkg.is-add { justify-content: center; color: var(--gray-500); font-size: 0.8125rem; }
.pd-offer__pkg-name { display: flex; flex-wrap: wrap; align-items: baseline; gap: 0.375rem; font-weight: 600; font-size: 0.875rem; }
.pd-offer__price { font-size: 1.25rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pd-offer__range { color: var(--gray-500); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.pd-offer__meta { color: var(--gray-500); font-size: 0.75rem; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.pd-offer__flag { padding: 0 0.5rem; border-radius: 999px; background: var(--pd-ink); color: var(--pd-canvas); font-size: 0.6875rem; font-weight: 600; }
.pd-offer__flag.is-quiet { background: var(--pd-soft); color: var(--gray-600); font-weight: 500; }
.dark .pd-offer__flag.is-quiet { color: var(--gray-300); }
.pd-offer__addons { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; padding: 0.75rem 1rem; font-size: 0.8125rem; }
.pd-offer__addons-label { margin-right: 0.25rem; color: var(--gray-500); font-weight: 500; text-decoration: none; }
.pd-offer__addons-label:hover { color: var(--pd-ink); text-decoration: underline; }
.pd-offer__addon { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.0625rem 0.625rem; border: 1px solid var(--pd-line); border-radius: 999px; font-size: 0.75rem; color: inherit; text-decoration: none; white-space: nowrap; }
.pd-offer__addon i { font-style: normal; color: var(--gray-500); }
.pd-offer__addon .pd-offer__dot { width: 0.5rem; height: 0.5rem; }
.pd-offer__addon.is-quiet { color: var(--gray-500); border-style: dashed; }
.pd-offer__empty { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; padding: 0.75rem 1rem; border: 1px dashed var(--pd-line-strong); border-radius: var(--pd-radius); color: var(--gray-500); font-size: 0.8125rem; }
.pd-offer__none { display: grid; justify-items: start; gap: 0.75rem; padding: 1.5rem; border: 1px dashed var(--pd-line-strong); border-radius: var(--pd-radius); color: var(--gray-500); }
@media (max-width: 64rem) {
    .pd-offer__head { grid-template-columns: auto minmax(0, 1fr) auto; }
    .pd-offer__plaques { grid-column: 1 / -1; grid-row: 2; }
}

/* Catalog: the grid of a kind's addons by package, a tick saves at once. */
.pd-addon-grid { overflow-x: auto; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-addon-grid table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.pd-addon-grid th, .pd-addon-grid td { padding: 0.5rem 0.875rem; border-bottom: 1px solid var(--pd-line); text-align: left; vertical-align: middle; }
.pd-addon-grid thead th { background: var(--pd-well); font-weight: 600; white-space: nowrap; }
.pd-addon-grid th.is-pkg { min-width: 7.5rem; text-align: center; }
.pd-addon-grid th.is-pkg small { display: block; color: var(--gray-500); font-weight: 400; font-variant-numeric: tabular-nums; }
.pd-addon-grid th.is-off { color: var(--gray-500); }
.pd-addon-grid tbody tr:last-child td { border-bottom: 0; }
.pd-addon-grid tbody + tbody tr:first-child td { border-top: 1px solid var(--pd-line); }
.pd-addon-grid tr.is-divider td { background: var(--pd-well); color: var(--gray-500); font-size: 0.75rem; font-weight: 500; }
.pd-addon-grid tr.is-off .is-name a { color: var(--gray-500); }
.pd-addon-grid td.is-name { min-width: 12rem; }
.pd-addon-grid .is-name a { font-weight: 500; color: inherit; text-decoration: none; }
.pd-addon-grid .is-name a:hover { text-decoration: underline; }
.pd-addon-grid .is-name small, .pd-addon-grid .is-tick small { display: block; color: var(--gray-500); font-size: 0.6875rem; }
.pd-addon-grid .is-price { color: var(--gray-600); font-variant-numeric: tabular-nums; white-space: nowrap; }
.dark .pd-addon-grid .is-price { color: var(--gray-300); }
.pd-addon-grid .is-tick { text-align: center; }
.pd-addon-grid .is-all { text-align: right; white-space: nowrap; }
.pd-addon-grid__tick { display: inline-grid; place-items: center; width: 1.375rem; height: 1.375rem; border: 1.5px solid var(--pd-line-strong); border-radius: 6px; background: var(--pd-panel); color: var(--pd-canvas); cursor: pointer; transition: background-color 120ms, border-color 120ms; }
.pd-addon-grid__tick:hover { border-color: var(--pd-ink); }
.pd-addon-grid__tick.is-on { border-color: var(--pd-ink); background: var(--pd-ink); }
.pd-addon-grid__tick:focus-visible, .pd-addon-grid__all:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: 2px; }
.pd-addon-grid__all { color: var(--gray-500); font-size: 0.75rem; cursor: pointer; }
.pd-addon-grid__all:hover { color: var(--pd-ink); text-decoration: underline; }
.pd-addon-grid__none { color: var(--gray-500); }

/* Catalog: the addons as rows, with the kinds of job whose services offer each. */
.pd-catalog-rows .fi-ta-record { padding: 0; }
.pd-catalog-rows .fi-ta-col, .pd-catalog-rows .fi-ta-col > * { width: 100%; }
.pd-addon-row { display: grid; grid-template-columns: 2.75rem minmax(12rem, 1.4fr) minmax(8rem, 0.8fr) minmax(14rem, 2fr) auto; gap: 0.875rem; align-items: center; width: 100%; padding: 0.625rem 1rem; color: inherit; text-decoration: none; font-size: 0.8125rem; }
.pd-addon-row:hover { background: var(--pd-well); }
.pd-addon-row.is-off { color: var(--gray-500); }
.pd-addon-row__thumb { position: relative; width: 2.75rem; height: 2.75rem; overflow: hidden; border-radius: var(--pd-radius-sm); background: var(--pd-soft); }
.pd-addon-row__thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.pd-addon-row.is-off .pd-addon-row__thumb img { opacity: 0.45; filter: grayscale(1); }
.pd-addon-row__name, .pd-addon-row__price { display: grid; min-width: 0; }
.pd-addon-row__name b { font-weight: 600; }
.pd-addon-row__name small, .pd-addon-row__price small { color: var(--gray-500); font-size: 0.75rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-addon-row__price { font-variant-numeric: tabular-nums; }
.pd-addon-row__kinds, .pd-addon-row__flags { display: flex; flex-wrap: wrap; gap: 0.375rem; min-width: 0; }
.pd-addon-row__flags { justify-content: flex-end; }
@media (max-width: 48rem) {
    .pd-addon-row { grid-template-columns: 2.75rem minmax(0, 1fr); }
    .pd-addon-row > :nth-child(n+3) { grid-column: 2; }
    .pd-addon-row__flags { justify-content: flex-start; }
}

/* Inquiries: the calendar's month. */
.pd-calendar { --pd-cal-line: var(--pd-line); --pd-cal-cell: var(--pd-panel); --pd-cal-soft: var(--pd-soft); --pd-cal-head: var(--pd-well); }
.pd-calendar__bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; flex-wrap: wrap; }
.pd-calendar__nav { display: flex; gap: 6px; }
.pd-calendar__month { margin: 0; font-size: 1.25rem; font-weight: 600; flex: 1; min-width: 0; }
.pd-calendar__views { display: inline-flex; padding: 3px; gap: 2px; border-radius: 9px; background: var(--gray-200); }
.dark .pd-calendar__views { background: var(--gray-800); }
.pd-calendar__views button { padding: 5px 12px; border-radius: 7px; font-size: 0.8125rem; font-weight: 500; color: var(--gray-700); }
.dark .pd-calendar__views button { color: var(--gray-300); }
.pd-calendar__views button.is-active { background: #fff; color: var(--gray-950); box-shadow: 0 1px 2px rgb(0 0 0 / 0.12); }
.dark .pd-calendar__views button.is-active { background: var(--gray-600); color: #fff; }
.pd-calendar__legend { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; font-size: 0.8125rem; color: var(--gray-600); }
.dark .pd-calendar__legend { color: var(--gray-300); }
.pd-calendar__legend i { display: inline-block; width: 12px; height: 12px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }

/* Month */
.pd-calendar__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--pd-cal-line); border-left: 1px solid var(--pd-cal-line); border-radius: var(--pd-radius); overflow: hidden; background: var(--pd-cal-cell); box-shadow: var(--pd-shadow); }
.pd-calendar__weekday { text-align: center; font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); padding: 9px 0; border-right: 1px solid var(--pd-cal-line); border-bottom: 1px solid var(--pd-cal-line); background: var(--pd-cal-head); }
.dark .pd-calendar__weekday { color: var(--gray-300); }
.pd-calendar__day { min-height: 120px; padding: 6px; border-right: 1px solid var(--pd-cal-line); border-bottom: 1px solid var(--pd-cal-line); display: flex; flex-direction: column; gap: 4px; min-width: 0; background: var(--pd-cal-cell); }
.pd-calendar__day.is-weekend { background: color-mix(in oklab, var(--pd-cal-soft) 60%, var(--pd-cal-cell)); }
.pd-calendar__day.is-outside { background: repeating-linear-gradient(135deg, var(--pd-cal-soft) 0 6px, color-mix(in oklab, var(--pd-cal-soft) 55%, var(--pd-cal-cell)) 6px 12px); }
.pd-calendar__day.is-outside .pd-calendar__date { color: var(--gray-400); }
.pd-calendar__day.is-today { box-shadow: inset 0 0 0 2px var(--primary-500); }
.pd-calendar__day.is-past .pd-calendar__date { color: var(--gray-400); }
.pd-calendar__day.is-past .pd-calendar__item { opacity: 0.7; }
/* Not offered on the booking page: struck through as there, without a reason. */
.pd-calendar__day.is-closed:not(.is-past) .pd-calendar__date { color: var(--gray-400); text-decoration: line-through; }
.pd-calendar__date { align-self: flex-start; min-width: 28px; height: 28px; padding: 0 7px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--gray-800); }
.pd-calendar__date:hover { background: var(--pd-cal-soft); }
.dark .pd-calendar__date { color: var(--gray-100); }
.pd-calendar__day.is-today .pd-calendar__date { background: var(--primary-600); color: #fff; }
.pd-calendar__dow { display: none; }
.pd-calendar__none { display: none; }

/* An entry, in any view */
.pd-calendar__item { display: flex; gap: 6px; align-items: baseline; flex-wrap: wrap; width: 100%; text-align: left; padding: 4px 7px; border-radius: 6px; border: 0; border-left: 3px solid transparent; font-size: 0.8125rem; font-weight: 500; line-height: 1.3; text-decoration: none; color: inherit; cursor: pointer; min-width: 0; overflow: hidden; }
.pd-calendar__item > span { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; min-width: 0; flex: 1; }
.pd-calendar__item time { flex: none; font-variant-numeric: tabular-nums; font-weight: 600; }
.pd-calendar__item small { flex-basis: 100%; font-size: 0.75rem; font-weight: 400; opacity: 0.8; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pd-calendar__item:hover { filter: brightness(0.95); }
/* A band over several days reaches into the next day's cell; between start and end it carries no words. */
.pd-calendar__item.is-span { width: auto; }
.pd-calendar__item.is-span:not(.is-span-end) { margin-right: -7px; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.pd-calendar__item.is-span:not(.is-span-start) { margin-left: -7px; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.pd-calendar__item.is-cont { border-left-color: transparent !important; }
.pd-calendar__item.is-cont > * { visibility: hidden; }
.pd-calendar__item[data-kind="booking"] { background: var(--success-100); border-left-color: var(--success-600); color: var(--success-900); }
.pd-calendar__item[data-kind="held"] { background: var(--warning-100); border-left-color: var(--warning-500); color: var(--warning-900); }
.pd-calendar__item[data-kind="blocked"] { background: var(--gray-200); border-left-color: var(--gray-500); color: var(--gray-800); }
.pd-calendar__item[data-kind="external"] { background: var(--info-100); border-left-color: var(--info-500); color: var(--info-900); }
.dark .pd-calendar__item[data-kind="booking"] { background: color-mix(in oklab, var(--success-500) 24%, var(--gray-900)); color: var(--success-100); }
.dark .pd-calendar__item[data-kind="held"] { background: color-mix(in oklab, var(--warning-500) 24%, var(--gray-900)); color: var(--warning-100); }
.dark .pd-calendar__item[data-kind="blocked"] { background: var(--gray-700); color: var(--gray-100); }
.dark .pd-calendar__item[data-kind="external"] { background: color-mix(in oklab, var(--info-500) 24%, var(--gray-900)); color: var(--info-100); }
.pd-calendar__legend i[data-kind="booking"] { background: var(--success-500); }
.pd-calendar__legend i[data-kind="held"] { background: var(--warning-500); }
.pd-calendar__legend i[data-kind="blocked"] { background: var(--gray-400); }
.pd-calendar__legend i[data-kind="external"] { background: var(--info-500); }
.pd-calendar__item[data-kind="info"] { background: transparent; border: 1px dashed var(--gray-400); border-left: 3px solid var(--gray-400); color: var(--gray-600); font-weight: 400; }
.dark .pd-calendar__item[data-kind="info"] { border-color: var(--gray-500); color: var(--gray-300); }
.pd-calendar__legend i[data-kind="info"] { background: transparent; border: 1px dashed var(--gray-500); }
.pd-calendar__column .pd-calendar__item[data-kind="info"] { background: var(--pd-cal-cell); }

/* Week and day: hours down the side, entries placed by their time */
.pd-calendar__agenda { --pd-hour: 52px; display: grid; grid-template-columns: 56px repeat(var(--pd-days), minmax(0, 1fr)); border: 1px solid var(--pd-cal-line); border-radius: var(--pd-radius); overflow: hidden; background: var(--pd-cal-cell); box-shadow: var(--pd-shadow); }
.pd-calendar__corner, .pd-calendar__colhead { background: var(--pd-cal-head); border-bottom: 1px solid var(--pd-cal-line); }
.pd-calendar__colhead { padding: 8px 4px; border-left: 1px solid var(--pd-cal-line); font-size: 0.8125rem; color: var(--gray-700); display: flex; gap: 6px; justify-content: center; align-items: baseline; }
.dark .pd-calendar__colhead { color: var(--gray-300); }
.pd-calendar__colhead strong { font-size: 1.05rem; color: var(--gray-900); }
.dark .pd-calendar__colhead strong { color: #fff; }
.pd-calendar__colhead.is-today strong { color: var(--primary-600); }
.pd-calendar__allday-label { font-size: 0.6875rem; color: var(--gray-500); padding: 6px 4px; text-align: right; border-bottom: 1px solid var(--pd-cal-line); }
.pd-calendar__allday { padding: 4px; display: flex; flex-direction: column; gap: 3px; border-left: 1px solid var(--pd-cal-line); border-bottom: 1px solid var(--pd-cal-line); min-height: 34px; }
.pd-calendar__hours { display: grid; grid-auto-rows: var(--pd-hour); }
.pd-calendar__hours span { font-size: 0.6875rem; color: var(--gray-500); text-align: right; padding: 0 6px; transform: translateY(-0.55em); font-variant-numeric: tabular-nums; }
.pd-calendar__hours span:first-child { transform: none; }
.pd-calendar__column { position: relative; height: calc(var(--pd-hour) * var(--pd-hours)); border-left: 1px solid var(--pd-cal-line); background-image: repeating-linear-gradient(to bottom, transparent 0 calc(var(--pd-hour) - 1px), color-mix(in oklab, var(--pd-cal-line) 70%, transparent) calc(var(--pd-hour) - 1px) var(--pd-hour)); }
.pd-calendar__column.is-weekend, .pd-calendar__allday.is-weekend { background-color: color-mix(in oklab, var(--pd-cal-soft) 60%, var(--pd-cal-cell)); }
.pd-calendar__column.is-today { background-color: color-mix(in oklab, var(--primary-500) 5%, var(--pd-cal-cell)); }
.pd-calendar__column .pd-calendar__item { position: absolute; left: 3px; right: 3px; width: auto; align-content: flex-start; }
.pd-calendar[data-view="day"] .pd-calendar__agenda { --pd-hour: 60px; }
.pd-calendar[data-view="day"] .pd-calendar__item { font-size: 0.875rem; }

/* List */
.pd-calendar__list { border: 1px solid var(--pd-cal-line); border-radius: var(--pd-radius); overflow: hidden; background: var(--pd-cal-cell); box-shadow: var(--pd-shadow); }
.pd-calendar__list-day { display: grid; grid-template-columns: 110px minmax(0, 1fr); border-bottom: 1px solid var(--pd-cal-line); }
.pd-calendar__list-day:last-child { border-bottom: 0; }
.pd-calendar__list-day.is-today { box-shadow: inset 3px 0 0 var(--primary-500); }
.pd-calendar__list-date { display: flex; gap: 8px; align-items: center; padding: 12px; background: var(--pd-cal-head); text-align: left; font-size: 0.75rem; color: var(--gray-600); line-height: 1.25; }
.dark .pd-calendar__list-date { color: var(--gray-400); }
.pd-calendar__list-date strong { font-size: 1.5rem; color: var(--gray-900); font-variant-numeric: tabular-nums; }
.dark .pd-calendar__list-date strong { color: #fff; }
.pd-calendar__list-items { padding: 8px; display: flex; flex-direction: column; gap: 6px; }
.pd-calendar__list-items .pd-calendar__item { font-size: 0.875rem; padding: 7px 10px; }
.pd-calendar__empty { margin: 0; padding: 24px; color: var(--gray-500); text-align: center; }

/* On a phone the month becomes a list of the days that have something on them. */
@media (max-width: 640px) {
    .pd-calendar__views { width: 100%; }
    .pd-calendar__views button { flex: 1; }
    .pd-calendar__grid { grid-template-columns: minmax(0, 1fr); }
    .pd-calendar__weekday, .pd-calendar__day.is-outside, .pd-calendar__day.is-free:not(.is-today) { display: none; }
    .pd-calendar__day { min-height: 0; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px; }
    .pd-calendar__date { min-width: 64px; justify-content: flex-start; }
    .pd-calendar__dow { display: inline; font-weight: 500; }
    .pd-calendar__item { flex: 1 1 100%; font-size: 0.875rem; padding: 6px 9px; }
    .pd-calendar__grid:not(.has-items) .pd-calendar__none { display: block; margin: 0; padding: 16px; color: var(--gray-500); border-right: 1px solid var(--pd-cal-line); border-bottom: 1px solid var(--pd-cal-line); }
    .pd-calendar[data-view="week"] .pd-calendar__agenda { overflow-x: auto; grid-template-columns: 44px repeat(var(--pd-days), minmax(90px, 1fr)); }
    .pd-calendar__list-day { grid-template-columns: 84px minmax(0, 1fr); }
}

.pd-calendar-steps { margin: 0; padding-left: 1.25rem; list-style: decimal; display: grid; gap: 4px; font-size: 0.875rem; color: var(--gray-600); }
.dark .pd-calendar-steps { color: var(--gray-300); }
.pd-calendar-steps a { color: var(--primary-600); text-decoration: underline; }

/* Inbox: the conversations, the open one, and who it is about */
.pd-mail {
    --pd-mail-line: var(--pd-line);
    --pd-mail-soft: var(--pd-well);
    --pd-mail-panel: var(--pd-panel);
    --pd-mail-muted: var(--gray-500);
    --pd-mail-hover: color-mix(in oklab, var(--gray-500) 7%, transparent);
    position: relative;
    display: grid;
    grid-template-columns: 12.5rem minmax(17rem, 22rem) minmax(0, 1fr);
    /* Below the bar and the page's heading: the mail fills the rest of the window. */
    height: calc(100dvh - var(--topbar-height) - var(--pd-mail-head, 9.5rem));
    min-height: 34rem;
    border: 1px solid var(--pd-mail-line);
    border-radius: var(--pd-radius);
    background: var(--pd-mail-panel);
    box-shadow: var(--pd-shadow);
    overflow: hidden;
}
.pd-mail.has-context { grid-template-columns: 12.5rem minmax(17rem, 22rem) minmax(0, 1fr) 16.5rem; }

/* The folders: a column of their own, like in any mail program */
.pd-mail__nav { min-height: 0; overflow-y: auto; padding: 12px 8px; border-right: 1px solid var(--pd-mail-line); background: var(--pd-mail-soft); }
.pd-mail__nav ul { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.pd-mail__nav ul + ul, .pd-mail__nav ul + .pd-mail__folders-note { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pd-mail-line); }
.pd-mail__nav h4 { margin-top: 14px; padding: 6px 8px 4px; font-size: 0.7rem; font-weight: 600; color: var(--pd-mail-muted); }
.pd-mail__nav li { padding-left: calc(var(--depth, 0) * 12px); }
.pd-mail__nav li button, .pd-mail__nav li a { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; font-size: 0.85rem; text-align: left; color: inherit; text-decoration: none; }
.pd-mail__nav li button:hover, .pd-mail__nav li a:hover { background: var(--pd-mail-hover); }
.pd-mail__nav li a .fi-icon { flex: none; width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__nav .pd-mail__nav-tools { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--pd-mail-line); }
.pd-mail__nav-count.is-failed { color: var(--danger-600, #dc2626); }
.pd-mail__nav li button.is-active { background: color-mix(in oklab, var(--primary-500) 14%, var(--pd-mail-panel)); font-weight: 600; }
.pd-mail__nav li button .fi-icon, .pd-mail__nav li button svg { flex: none; width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__nav li button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__nav-count { margin-left: auto; padding-left: 8px; font-size: 0.75rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-mail__icon-link.pd-mail__nav-toggle { display: none; margin-left: -6px; }
/* Waiting for an answer: a small arrow beside the name, apart from the unread dot */
.pd-mail__waiting { flex: none; align-self: center; display: inline-grid; color: var(--primary-600); }
.dark .pd-mail__waiting { color: var(--primary-400); }
.pd-mail__waiting .fi-icon, .pd-mail__waiting svg { width: 13px; height: 13px; }
/* Narrower: the folders come over the list */
@media (max-width: 1279px) {
    .pd-mail, .pd-mail.has-context { grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr); }
    .pd-mail__nav { position: absolute; inset: 0 auto 0 0; z-index: 40; width: min(16rem, 85%); visibility: hidden; transform: translateX(-100%); transition: transform 0.15s ease, visibility 0.15s; box-shadow: 12px 0 32px -16px rgb(0 0 0 / 0.35); }
    .pd-mail__nav.is-open { visibility: visible; transform: none; }
    .pd-mail__icon-link.pd-mail__nav-toggle { display: inline-grid; }
}
.dark .pd-mail { --pd-mail-muted: var(--gray-400); --pd-mail-hover: color-mix(in oklab, white 5%, transparent); }

/* The list */
.pd-mail__list { display: flex; flex-direction: column; min-height: 0; border-right: 1px solid var(--pd-mail-line); background: var(--pd-mail-soft); }
.pd-mail__list-head { display: grid; gap: 10px; padding: 14px 14px 10px; }
.pd-mail__title { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.pd-mail__title h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.pd-mail__title-actions { display: flex; align-items: center; gap: 2px; }
.pd-mail__icon-link { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; color: var(--pd-mail-muted); }
.pd-mail__icon-link:hover { background: var(--pd-mail-hover); color: inherit; }
.pd-mail__icon-link .fi-icon, .pd-mail__icon-link svg { width: 18px; height: 18px; }
.pd-mail__search { position: relative; display: block; }
.pd-mail__search-icon { position: absolute; left: 10px; top: 50%; width: 16px; height: 16px; transform: translateY(-50%); color: var(--pd-mail-muted); pointer-events: none; }
.pd-mail__search input { width: 100%; padding: 7px 10px 7px 32px; border: 1px solid var(--pd-mail-line); border-radius: 8px; background: var(--pd-mail-panel); font-size: 0.875rem; }
.pd-mail__search input:focus { outline: 2px solid var(--pd-ink); outline-offset: -1px; border-color: transparent; }

.pd-mail__threads { flex: 1; overflow-y: auto; margin: 0; padding: 4px 6px; list-style: none; }
.pd-mail__threads li + li { border-top: 1px solid var(--pd-mail-line); }
.pd-mail__threads li:has(.is-open) + li, .pd-mail__threads li:has(+ li .is-open) { border-color: transparent; }
.pd-mail__thread { position: relative; display: flex; gap: 11px; width: 100%; margin: 2px 0; padding: 10px 10px 11px; border-radius: 10px; text-align: left; align-items: flex-start; }
.pd-mail__thread:hover { background: var(--pd-mail-hover); }
.pd-mail__thread.is-open { background: color-mix(in oklab, var(--primary-500) 14%, var(--pd-mail-panel)); }
.pd-mail__thread-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; flex: 1; }
.pd-mail__thread-top { display: flex; gap: 6px; align-items: baseline; }
.pd-mail__thread-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 500; }
.pd-mail__count { font-size: 0.75rem; color: var(--pd-mail-muted); font-variant-numeric: tabular-nums; }
.pd-mail__thread-time { margin-left: 4px; font-size: 0.75rem; color: var(--pd-mail-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-mail__thread-subject { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; }
.pd-mail__thread-preview { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 0.8125rem; line-height: 1.45; color: var(--pd-mail-muted); }
.pd-mail__you { font-weight: 500; }
.pd-mail__thread.is-unread .pd-mail__thread-name, .pd-mail__thread.is-unread .pd-mail__thread-subject { font-weight: 650; }
.pd-mail__thread.is-unread::before { content: ""; position: absolute; left: 1px; top: 24px; width: 6px; height: 6px; border-radius: 50%; background: var(--primary-500); }
.pd-mail__thread.is-unread .pd-mail__thread-time { color: var(--primary-600); font-weight: 600; }
.dark .pd-mail__thread.is-unread .pd-mail__thread-time { color: var(--primary-400); }
.pd-mail__empty-list { padding: 2.5rem 1rem; text-align: center; font-size: 0.875rem; color: var(--pd-mail-muted); border: 0 !important; }
.pd-mail__list-foot { display: flex; gap: 8px; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--pd-mail-line); font-size: 0.75rem; color: var(--pd-mail-muted); }
.pd-mail__keys { font-family: ui-monospace, monospace; letter-spacing: 0.15em; opacity: 0.7; white-space: nowrap; }
.pd-mail__foot-link { color: inherit; text-decoration: underline; text-underline-offset: 2px; white-space: nowrap; }
.pd-mail__foot-link:hover { color: var(--primary-600); }
.pd-mail__threads.is-loading { opacity: 0.55; }
.pd-mail__body-switch { display: flex; justify-content: flex-end; gap: 14px; margin: -2px 0 6px; font-size: 0.75rem; color: var(--pd-mail-muted); }
.pd-mail__body-switch button { display: inline-flex; align-items: center; gap: 4px; }
.pd-mail__body-switch button:hover { color: inherit; text-decoration: underline; text-underline-offset: 2px; }
.pd-mail__body-switch .fi-icon, .pd-mail__body-switch svg { width: 14px; height: 14px; }
/* A designed mail as it was sent: on white, like paper, also in the dark */
.pd-mail__html { display: block; width: 100%; min-height: 4rem; border: 0; border-radius: 8px; background: #fff; }
/* The mailbox's own folders: a small panel under the folder button */
.pd-mail__folder-title { display: flex; align-items: center; gap: 4px; min-width: 0; }
.pd-mail__folder-title h1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 1rem; font-weight: 600; }
.pd-mail__folders { position: relative; }
.pd-mail__folders-panel { position: absolute; top: calc(100% + 4px); right: -40px; z-index: 30; width: min(17rem, calc(100vw - 32px)); max-height: min(28rem, 70vh); overflow-y: auto; padding: 6px; border: 1px solid var(--pd-mail-line); border-radius: 10px; background: var(--pd-mail-panel, #fff); box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.3); }
.pd-mail__folders-panel h4 { padding: 8px 8px 4px; font-size: 0.7rem; font-weight: 600; color: var(--pd-mail-muted); }
.pd-mail__folders-panel li { padding-left: calc(var(--depth, 0) * 14px); }
.pd-mail__folders-panel li button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; font-size: 0.85rem; text-align: left; }
.pd-mail__folders-panel li button:hover { background: var(--pd-mail-hover); }
.pd-mail__folders-panel li button.is-active { font-weight: 600; }
.pd-mail__folders-panel li button .fi-icon, .pd-mail__folders-panel li button svg { flex: none; width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__folders-panel li button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__folders-group { display: block; padding: 6px 8px 2px; font-size: 0.78rem; color: var(--pd-mail-muted); }
.pd-mail__folders-note { display: flex; align-items: center; gap: 6px; padding: 8px; font-size: 0.8rem; color: var(--pd-mail-muted); }
.pd-mail__folders-spin { width: 14px; height: 14px; }
.pd-mail__folders-panel--end { right: 0; }

/* The right-click menu of a row or a folder */
.pd-mail__ctx { position: fixed; z-index: 40; width: 15rem; padding: 4px; border: 1px solid var(--pd-mail-line); border-radius: 10px; background: var(--pd-mail-panel, #fff); box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.3); font-size: 0.85rem; }
.pd-mail__ctx-group + .pd-mail__ctx-group { margin-top: 4px; padding-top: 4px; border-top: 1px solid var(--pd-mail-line); }
/* A group hidden by x-show leaves no line above the next */
.pd-mail__ctx-group[style*="display: none"] + .pd-mail__ctx-group { margin-top: 0; padding-top: 0; border-top: 0; }
.pd-mail__ctx [role=menuitem] { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; }
.pd-mail__ctx [role=menuitem]:hover, .pd-mail__ctx [role=menuitem]:focus-visible, .pd-mail__ctx [aria-expanded=true] { background: var(--pd-mail-hover); outline: none; }
.pd-mail__ctx [role=menuitem] > .fi-icon, .pd-mail__ctx [role=menuitem] > svg { flex: none; width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__ctx [role=menuitem] > span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__ctx [role=menuitem]:disabled { opacity: 0.45; cursor: default; background: none; }
.pd-mail__ctx kbd { font: inherit; font-size: 0.75rem; color: var(--pd-mail-muted); }
.pd-mail__ctx .is-danger, .pd-mail__ctx .is-danger > .fi-icon { color: var(--danger-600); }
.pd-mail__ctx-sub { position: relative; }
.pd-mail__ctx-panel { position: absolute; top: -5px; left: calc(100% + 6px); width: min(16rem, calc(100vw - 32px)); max-height: min(24rem, 60vh); overflow-y: auto; padding: 4px; border: 1px solid var(--pd-mail-line); border-radius: 10px; background: var(--pd-mail-panel, #fff); box-shadow: 0 12px 32px -12px rgb(0 0 0 / 0.3); }
.pd-mail__ctx-panel li { padding-left: calc(var(--depth, 0) * 14px); }
.pd-mail__ctx-panel li button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; text-align: left; }
.pd-mail__ctx-panel li button:hover, .pd-mail__ctx-panel li button:focus-visible { background: var(--pd-mail-hover); outline: none; }
.pd-mail__ctx-panel li button .fi-icon { flex: none; width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__ctx-panel li button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__folders-count { margin-left: auto; padding-left: 8px; font-size: 0.75rem; font-weight: 600; color: var(--pd-mail-muted); }
.pd-mail__more { padding: 10px 14px 14px; text-align: center; border: 0 !important; }
.pd-mail__more button { font-size: 0.8rem; color: var(--pd-mail-muted); text-decoration: underline; text-underline-offset: 2px; }
.pd-mail__more button:hover { color: inherit; }
.pd-mail__filed { display: inline-flex; align-items: center; gap: 3px; white-space: nowrap; }
.pd-mail__filed .fi-icon, .pd-mail__filed svg { width: 13px; height: 13px; }

/* The inquiry, as a small chip with its status colour */
.pd-mail__chip-inquiry { --dot: var(--gray-400); justify-self: start; display: inline-flex; gap: 6px; align-items: center; margin-top: 5px; padding: 2px 8px 2px 7px; border: 1px solid var(--pd-mail-line); border-radius: 999px; font-size: 0.6875rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; background: var(--pd-mail-panel); }
.pd-mail__chip-inquiry i { width: 6px; height: 6px; border-radius: 50%; background: var(--dot); }
.pd-mail__chip-inquiry[data-status="inquiry"], .pd-mail__chip-inquiry[data-status="offered"] { --dot: var(--warning-500); }
.pd-mail__chip-inquiry[data-status="booked"], .pd-mail__chip-inquiry[data-status="done"] { --dot: var(--success-500); }
.pd-mail__chip-inquiry[data-status="declined"] { --dot: var(--danger-500); }
a.pd-mail__chip-inquiry { margin: 0; padding: 4px 10px 4px 9px; font-size: 0.75rem; }
a.pd-mail__chip-inquiry:hover { border-color: var(--primary-400); }

/* Avatars: initials on a soft colour per name */
.pd-mail__avatar { --hue: 220; display: inline-grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.02em; color: oklch(0.4 0.08 var(--hue)); background: oklch(0.93 0.04 var(--hue)); }
.dark .pd-mail__avatar { color: oklch(0.88 0.06 var(--hue)); background: oklch(0.36 0.06 var(--hue)); }
.pd-mail__avatar--sm { width: 32px; height: 32px; font-size: 0.6875rem; }
.pd-mail__avatar--lg { width: 56px; height: 56px; font-size: 1.0625rem; }

/* The conversation */
.pd-mail__reader { display: flex; flex-direction: column; min-width: 0; min-height: 0; transition: opacity 120ms; }
.pd-mail__reader.is-loading { opacity: 0.55; }
.pd-mail__reader-head { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: flex-start; justify-content: space-between; padding: 18px 28px 14px; border-bottom: 1px solid var(--pd-mail-line); }
.pd-mail__reader-head > div:first-of-type { flex: 1 1 14rem; min-width: 0; }
.pd-mail__back { display: none; place-items: center; width: 32px; height: 32px; margin: -4px 0 0 -6px; border-radius: 8px; color: var(--pd-mail-muted); }
.pd-mail__back:hover { background: var(--pd-mail-hover); color: inherit; }
.pd-mail__back .fi-icon { width: 20px; height: 20px; }
.pd-mail__reader-head > div:first-child { min-width: 0; }
.pd-mail__reader-actions { display: flex; flex: none; gap: 8px; align-items: center; }
.pd-mail__reader-head h2 { text-wrap: balance; font-size: 1.1875rem; font-weight: 600; line-height: 1.35; letter-spacing: -0.01em; }
.pd-mail__reader-head p { margin-top: 3px; font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__messages { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: minmax(0, 1fr); align-content: start; padding: 4px 0 16px; }

.pd-mail__message { border-bottom: 1px solid var(--pd-mail-line); }
.pd-mail__message:last-child { border-bottom: 0; }
.pd-mail__message-head { display: flex; gap: 12px; align-items: center; padding: 12px 28px; cursor: pointer; user-select: none; }
.pd-mail__message.is-collapsed .pd-mail__message-head:hover { background: var(--pd-mail-hover); }
.pd-mail__message-who { display: flex; gap: 8px; align-items: baseline; min-width: 0; flex: 1; font-size: 0.875rem; }
.pd-mail__message-who strong { min-width: 3ch; overflow: hidden; text-overflow: ellipsis; font-weight: 600; white-space: nowrap; }
.pd-mail__message-who > span { flex-shrink: 10; }
.pd-mail__message-who > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__message-meta { display: flex; gap: 6px; align-items: center; font-size: 0.75rem; color: var(--pd-mail-muted); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-mail__clip { width: 14px; height: 14px; }
.pd-mail__message-body { padding: 0 28px 20px 72px; }
.pd-mail__message-subject { margin-bottom: 8px; font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__text { max-width: 44rem; white-space: pre-wrap; overflow-wrap: anywhere; font-size: 0.9375rem; line-height: 1.65; }
.pd-mail__quote { margin-top: 10px; }
.pd-mail__quote summary { display: inline-block; padding: 0 8px; border-radius: 6px; font-size: 0.75rem; line-height: 1.5; letter-spacing: 0.1em; cursor: pointer; list-style: none; color: var(--pd-mail-muted); background: color-mix(in oklab, var(--gray-500) 12%, transparent); }
.pd-mail__quote summary::-webkit-details-marker { display: none; }
.pd-mail__quote .pd-mail__text { margin-top: 10px; padding-left: 12px; border-left: 2px solid var(--pd-mail-line); font-size: 0.875rem; color: var(--pd-mail-muted); }
.pd-mail__attachments { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; padding: 0; list-style: none; }
.pd-mail__attachments button { display: flex; gap: 8px; align-items: center; max-width: 18rem; padding: 8px 12px 8px 10px; border: 1px solid var(--pd-mail-line); border-radius: 10px; font-size: 0.8125rem; text-align: left; }
.pd-mail__attachments button:hover { border-color: var(--primary-400); }
.pd-mail__attachments button > span { min-width: 0; }
.pd-mail__attachment-get { width: 16px; height: 16px; flex: none; color: var(--pd-mail-muted); opacity: 0; transition: opacity 120ms; }
.pd-mail__attachments button:hover .pd-mail__attachment-get { opacity: 1; }
.pd-mail__uploads { display: flex; flex-wrap: wrap; gap: 6px; margin: 2px 0 4px; padding: 0; list-style: none; }
.pd-mail__uploads li { display: flex; gap: 6px; align-items: center; max-width: 18rem; padding: 4px 6px 4px 10px; border-radius: 8px; font-size: 0.75rem; background: color-mix(in oklab, var(--gray-500) 12%, transparent); }
.pd-mail__uploads li > span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__uploads small { color: var(--pd-mail-muted); white-space: nowrap; }
.pd-mail__uploads svg, .pd-mail__uploads .fi-icon { width: 14px; height: 14px; flex: none; }
.pd-mail__uploads button { display: inline-grid; place-items: center; padding: 2px; border-radius: 4px; color: var(--pd-mail-muted); }
.pd-mail__uploads button:hover { color: inherit; background: var(--pd-mail-hover); }
.pd-mail__uploading { font-size: 0.75rem; color: var(--pd-mail-muted); }
label.pd-mail__icon-link { cursor: pointer; }
.pd-mail__attachments strong { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.pd-mail__attachments small { display: block; font-size: 0.75rem; color: var(--pd-mail-muted); }
.pd-mail__attachment-icon { width: 20px; height: 20px; flex: none; color: var(--pd-mail-muted); }

/* The answer */
.pd-mail__answer { flex: none; padding: 12px 28px 16px; border-top: 1px solid var(--pd-mail-line); }
.pd-mail__answer-bar { display: flex; gap: 10px; align-items: center; }
.pd-mail__answer-start { display: flex; flex: 1 0 15rem; gap: 10px; align-items: center; min-width: 0; padding: 10px 14px; border: 1px solid var(--pd-mail-line); border-radius: 10px; font-size: 0.875rem; color: var(--pd-mail-muted); text-align: left; }
.pd-mail__answer-start span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__answer-start:hover { border-color: var(--primary-400); color: inherit; }
.pd-mail__answer-start .fi-icon, .pd-mail__answer-start svg { width: 16px; height: 16px; flex: none; }
.pd-mail__answer-bar .pd-mail__snippets { flex: 0 1 auto; mask-image: linear-gradient(to right, black calc(100% - 24px), transparent); }
.pd-mail__composer { display: grid; grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 10px 14px 12px; border: 1px solid var(--primary-400); border-radius: 12px; background: var(--pd-mail-panel); }
.pd-mail__composer-row { display: flex; gap: 10px; align-items: center; }
.pd-mail__field { display: flex; gap: 8px; align-items: center; flex: 1; padding-bottom: 6px; border-bottom: 1px solid var(--pd-mail-line); font-size: 0.8125rem; }
.pd-mail__field > span { min-width: 3.5rem; color: var(--pd-mail-muted); }
.pd-mail__field input { flex: 1; padding: 2px 0; border: 0; background: transparent; font-size: 0.875rem; }
.pd-mail__field input:focus, .pd-mail__body:focus { outline: none; box-shadow: none; }
.pd-mail__link { font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__link:hover { color: var(--primary-600); }
.pd-mail__body { width: 100%; min-width: 0; min-height: 8rem; max-height: 38vh; padding: 8px 0; border: 0; background: transparent; resize: none; font-size: 0.9375rem; line-height: 1.6; field-sizing: content; }
.pd-mail__composer-foot { display: flex; gap: 10px; align-items: center; }
.pd-mail__snippets { display: flex; flex: 1; gap: 6px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.pd-mail__chip { flex: none; padding: 5px 11px; border: 1px solid var(--pd-mail-line); border-radius: 999px; font-size: 0.75rem; white-space: nowrap; }
.pd-mail__chip:hover { border-color: var(--primary-400); }
.pd-mail__language { padding: 5px 28px 5px 10px; border: 1px solid var(--pd-mail-line); border-radius: 8px; background-color: transparent; font-size: 0.8125rem; }
.pd-mail__designed { display: inline-flex; align-items: center; gap: 6px; font-size: 0.8125rem; color: var(--pd-mail-muted); white-space: nowrap; cursor: pointer; }
.pd-mail__designed:has(input:checked) { color: inherit; }
.pd-mail__designed input { width: 14px; height: 14px; border-radius: 3px; }
.pd-mail__error { font-size: 0.75rem; color: var(--danger-600); }

.pd-mail__nothing { display: grid; place-content: center; justify-items: center; gap: 10px; flex: 1; color: var(--pd-mail-muted); font-size: 0.875rem; }
.pd-mail__nothing-icon { width: 40px; height: 40px; opacity: 0.5; }

/* Beside it: who, and the inquiry */
.pd-mail__context { display: flex; flex-direction: column; overflow-y: auto; border-left: 1px solid var(--pd-mail-line); }
.pd-mail__context > section { padding: 20px; }
.pd-mail__context > section + section { border-top: 1px solid var(--pd-mail-line); }
.pd-mail__person { display: grid; justify-items: center; gap: 3px; text-align: center; font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__person .pd-mail__avatar { margin-bottom: 8px; }
.pd-mail__person h3 { margin-bottom: 4px; font-size: 1rem; font-weight: 600; color: var(--gray-950); }
.dark .pd-mail__person h3 { color: white; }
.pd-mail__person a:hover { color: var(--primary-600); }
.pd-mail__facts h4 { font-size: 0.8125rem; font-weight: 600; color: var(--pd-mail-muted); }
.pd-mail__facts-head { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.pd-mail__facts dl { display: grid; gap: 2px; font-size: 0.8125rem; }
.pd-mail__facts dt { font-size: 0.75rem; color: var(--pd-mail-muted); }
.pd-mail__facts dt:not(:first-child) { margin-top: 8px; }
.pd-mail__facts dd { overflow-wrap: anywhere; line-height: 1.45; }
.pd-mail__money { font-variant-numeric: tabular-nums; font-weight: 600; }
.pd-mail__overdue { color: var(--danger-600); font-weight: 600; }
.pd-mail__more { display: inline-block; margin-top: 14px; font-size: 0.8125rem; font-weight: 500; color: var(--primary-600); }
.dark .pd-mail__more { color: var(--primary-400); }
.pd-mail__related { display: grid; margin: 8px -8px 0; padding: 0; list-style: none; }
.pd-mail__related button { display: flex; gap: 8px; width: 100%; padding: 6px 8px; border-radius: 6px; font-size: 0.8125rem; text-align: left; }
.pd-mail__related button:hover { background: var(--pd-mail-hover); }
.pd-mail__related span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-mail__related time { font-size: 0.75rem; color: var(--pd-mail-muted); }

/* The context column only where the conversation keeps room enough to read (the menu takes its part). */
@media (max-width: 1799px) {
    .pd-mail.has-context { grid-template-columns: 12.5rem minmax(17rem, 22rem) minmax(0, 1fr); }
    .pd-mail__context { display: none; }
}
@media (max-width: 1279px) {
    .pd-mail.has-context { grid-template-columns: minmax(17rem, 21rem) minmax(0, 1fr); }
}
/* On a phone like a mail app: the list, or one conversation with the way back. */
@media (max-width: 767px) {
    .pd-mail, .pd-mail.has-context { grid-template-columns: minmax(0, 1fr); height: auto; min-height: calc(100dvh - 6rem); }
    .pd-mail__list { min-width: 0; border-right: 0; }
    .pd-mail[data-view="list"] .pd-mail__reader, .pd-mail[data-view="thread"] .pd-mail__list { display: none; }
    .pd-mail__back { display: inline-grid; }
    /* Hover-only buttons on each message have no hover on a phone; the bar above does the same. */
    .pd-mail__message-actions { display: none !important; }
    .pd-mail__modes, .pd-mail__list-head [role="tablist"] { overflow-x: auto; scrollbar-width: none; }
    .pd-mail__reader-head, .pd-mail__message-head, .pd-mail__answer { padding-inline: 14px; }
    .pd-mail__message-body { padding: 0 14px 16px; }
    .pd-mail__answer-bar { flex-wrap: wrap; }
    .pd-mail__answer-bar .pd-mail__snippets { max-width: none; }
}
.pd-mail__nowrap { white-space: nowrap; }
.pd-mail__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
label.pd-mail__icon-link { position: relative; }
.pd-mail__modes { display: flex; gap: 14px; align-items: center; margin-bottom: 4px; border-bottom: 1px solid var(--pd-mail-line); }
.pd-mail__modes button[role="tab"] { position: relative; padding: 2px 0 8px; font-size: 0.8125rem; color: var(--pd-mail-muted); }
.pd-mail__modes button[role="tab"]:hover { color: inherit; }
.pd-mail__modes button.is-active { color: inherit; font-weight: 600; }
.pd-mail__modes button.is-active::after { content: ""; position: absolute; inset: auto 0 -1px; height: 2px; border-radius: 2px; background: var(--primary-500); }
.pd-mail__modes-close { margin-left: auto; margin-bottom: 4px; }
.pd-mail__field select { flex: 1; padding: 2px 24px 2px 0; border: 0; background-color: transparent; font-size: 0.875rem; }
.pd-mail__new { flex: 1; min-height: 0; overflow-y: auto; padding: 16px 28px; }
.pd-mail__composer--standalone { border-color: var(--pd-mail-line); }
.pd-mail__composer--standalone .pd-mail__body { min-height: 16rem; max-height: none; }
.pd-mail__uploads input[type="checkbox"] { width: 14px; height: 14px; border-radius: 3px; }
.pd-mail__insert { position: relative; }
.pd-mail__menu { position: absolute; right: 0; bottom: calc(100% + 6px); z-index: 20; display: grid; width: 16rem; max-height: 22rem; overflow-y: auto; padding: 6px; border: 1px solid var(--pd-mail-line); border-radius: 10px; background: var(--pd-mail-panel); box-shadow: 0 12px 32px -8px rgb(0 0 0 / 0.3); }
.pd-mail__menu p { padding: 8px 8px 4px; font-size: 0.8125rem; font-weight: 600; color: var(--pd-mail-muted); }
.pd-mail__menu button { display: flex; gap: 8px; align-items: center; padding: 6px 8px; border-radius: 6px; font-size: 0.8125rem; text-align: left; }
.pd-mail__menu button:hover { background: var(--pd-mail-hover); }
.pd-mail__menu svg, .pd-mail__menu .fi-icon { width: 16px; height: 16px; color: var(--pd-mail-muted); }
.pd-mail__inquiry-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.pd-mail__inquiry-actions .fi-btn { font-size: 0.75rem; }

/* Round 4: toolbar on top, actions per message and per row */
.pd-mail__reader-head { padding-bottom: 10px; border-bottom: 0; }
.pd-mail__toolbar { display: flex; flex-wrap: wrap; gap: 8px 16px; align-items: center; justify-content: space-between; padding: 0 28px 12px; border-bottom: 1px solid var(--pd-mail-line); }
.pd-mail__toolbar-group { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-mail__toolbar .fi-btn { white-space: nowrap; }
.pd-mail__message-actions { display: flex; gap: 2px; opacity: 0; transition: opacity 120ms; }
.pd-mail__message:hover .pd-mail__message-actions, .pd-mail__message-actions:focus-within { opacity: 1; }
.pd-mail__message-actions button { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--pd-mail-muted); }
.pd-mail__message-actions button:hover { background: var(--pd-mail-hover); color: inherit; }
.pd-mail__message-actions svg, .pd-mail__message-actions .fi-icon { width: 16px; height: 16px; }
.pd-mail__row { position: relative; }
.pd-mail__row-actions { position: absolute; top: 34px; right: 10px; display: flex; gap: 2px; padding: 2px; border-radius: 8px; background: var(--pd-mail-panel); box-shadow: 0 1px 4px rgb(0 0 0 / 0.15); opacity: 0; pointer-events: none; transition: opacity 120ms; }
.pd-mail__row:hover .pd-mail__row-actions, .pd-mail__row-actions:focus-within { opacity: 1; pointer-events: auto; }
.pd-mail__row-actions button { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 6px; color: var(--pd-mail-muted); }
.pd-mail__row-actions button:hover { background: var(--pd-mail-hover); color: inherit; }
.pd-mail__row-actions svg, .pd-mail__row-actions .fi-icon { width: 16px; height: 16px; }
/* Ticking rows: the face turns into a check on hover, and stays one while something is ticked */
.pd-mail__thread > .pd-mail__avatar { position: relative; cursor: pointer; }
.pd-mail__pick { position: absolute; inset: 0; display: grid; place-items: center; border: 1.5px solid color-mix(in oklab, var(--pd-mail-muted) 70%, transparent); border-radius: 50%; background: var(--pd-mail-panel); color: transparent; opacity: 0; transition: opacity 100ms, background-color 100ms; }
.pd-mail__pick .fi-icon, .pd-mail__pick svg { width: 18px; height: 18px; }
.pd-mail__thread:hover .pd-mail__pick, .pd-mail.is-picking .pd-mail__pick { opacity: 1; }
.pd-mail__row.is-picked .pd-mail__pick { border-color: var(--pd-ink); background: var(--pd-ink); color: var(--pd-mail-panel); }
.pd-mail__row.is-picked .pd-mail__thread { background: color-mix(in oklab, var(--primary-500) 9%, var(--pd-mail-panel)); }
.pd-mail__row.is-picked .pd-mail__thread.is-open { background: color-mix(in oklab, var(--primary-500) 14%, var(--pd-mail-panel)); }
.pd-mail__threads li:has(.is-picked) + li.is-picked { border-color: transparent; }
.pd-mail.is-picking .pd-mail__row-actions { display: none; }
.pd-mail__thread { user-select: none; -webkit-user-select: none; }
/* In place of the title while something is ticked */
.pd-mail__list-head { grid-template-columns: minmax(0, 1fr); }
.pd-mail__picked { display: flex; align-items: center; gap: 4px; min-width: 0; min-height: 32px; }
.pd-mail__pick-all { display: inline-grid; place-items: center; flex: none; width: 22px; height: 22px; margin: 0 4px 0 7px; border-radius: 6px; background: var(--pd-ink); color: var(--pd-mail-panel); }
.pd-mail__pick-all .fi-icon, .pd-mail__pick-all svg { width: 16px; height: 16px; }
.pd-mail__picked-count { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.875rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-mail__picked-actions { display: flex; flex: none; align-items: center; gap: 0; }
/* A narrow list says only how many */
.pd-mail__list { container-type: inline-size; }
@container (max-width: 380px) { .pd-mail__picked-word { display: none; } }
.pd-mail__picked .fi-icon-btn { flex: none; width: 28px; height: 28px; margin: 0; }
.pd-mail__pick-more { margin: -4px 0 0; padding: 7px 10px; border-radius: 8px; background: color-mix(in oklab, var(--primary-500) 8%, var(--pd-mail-panel)); font-size: 0.78rem; color: var(--pd-mail-muted); }
.pd-mail__pick-more button { color: var(--primary-600); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.dark .pd-mail__pick-more button { color: var(--primary-400); }
.pd-mail__answer { border-top: 0; padding-top: 0; }

/* Mail on its way: held back for undo, or stuck */
.pd-mail__outbox { margin: 8px 28px; padding: 12px 14px; border: 1px dashed var(--primary-400); border-radius: 12px; background: color-mix(in oklab, var(--primary-500) 6%, transparent); }
.pd-mail__outbox[data-state="failed"] { border-color: var(--danger-400); background: color-mix(in oklab, var(--danger-500) 8%, transparent); }
.pd-mail__outbox-head { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: center; font-size: 0.8125rem; }
.pd-mail__outbox-head > svg, .pd-mail__outbox-head > .fi-icon { width: 16px; height: 16px; color: var(--danger-500); }
.pd-mail__outbox-head strong { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-mail__outbox-head > span:not(.pd-mail__outbox-actions) { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--pd-mail-muted); }
.pd-mail__outbox-spin { width: 14px; height: 14px; color: var(--primary-500); }
.pd-mail__outbox-actions { display: flex; gap: 6px; margin-left: auto; }
.pd-mail__outbox-text { margin-top: 6px; font-size: 0.8125rem; color: var(--pd-mail-muted); }

/* Own calendars in the booking calendar */
.pd-calendar__warning { display: flex; gap: 10px; align-items: center; margin-bottom: 16px; padding: 12px 14px; border: 1px solid var(--danger-300); border-radius: 10px; background: color-mix(in oklab, var(--danger-500) 8%, transparent); font-size: 0.875rem; }
.pd-calendar__warning > svg, .pd-calendar__warning > .fi-icon { width: 20px; height: 20px; flex: none; color: var(--danger-500); }
/* An entry's details, in the modal a click on it opens. */
.pd-calendar__details { display: grid; gap: 14px; }
.pd-calendar__details-head { display: flex; gap: 8px; align-items: center; font-size: 0.8125rem; color: var(--gray-500); }
.pd-calendar__details .pd-board__facts { padding: 0; border: 0; background: none; }
.pd-calendar__details-clash { font-size: 0.8125rem; color: var(--danger-600); }
.dark .pd-calendar__details-clash { color: var(--danger-400); }
.pd-calendar__warning > span { flex: 1; }

/* The calendar subscription */
.pd-feed { display: grid; gap: 14px; font-size: 0.875rem; }
.pd-feed__lead { color: var(--gray-600); }
.dark .pd-feed__lead { color: var(--gray-300); }
.pd-feed__link { display: flex; gap: 8px; }
.pd-feed__link input { flex: 1; min-width: 0; padding: 7px 10px; border: 1px solid var(--gray-300); border-radius: 8px; background: transparent; font-family: ui-monospace, monospace; font-size: 0.75rem; }
.dark .pd-feed__link input { border-color: color-mix(in oklab, white 12%, transparent); }
.pd-feed__how { display: grid; gap: 4px; }
.pd-feed__how dt { margin-top: 8px; font-weight: 600; }
.pd-feed__how a { color: var(--primary-600); text-decoration: underline; }
.dark .pd-feed__how a { color: var(--primary-400); }
.pd-feed__note { font-size: 0.8125rem; color: var(--gray-500); }
/* A count at an icon, e.g. new orders at the shop's bag, where the sidebar is folded to its icons:
   a small red circle at the icon's corner instead of the badge beside the label. */

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-btn {
    position: relative;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-badge-ctn {
    position: absolute;
    top: 0.125rem;
    left: 1.75rem;
    display: block !important;
    pointer-events: none;
}

.fi-sidebar:not(.fi-sidebar-open) .fi-sidebar-item-badge-ctn .fi-badge {
    min-width: 1.125rem;
    height: 1.125rem;
    padding: 0 0.25rem;
    border-radius: 999px;
    font-size: 0.625rem;
    line-height: 1.125rem;
}

/* New things in the sidebar count in solid red, open or folded. */

.fi-sidebar-item-badge-ctn .fi-badge.fi-color-danger {
    background: var(--danger-600);
    color: #fff;
    box-shadow: none;
}

.fi-sidebar-item-badge-ctn .fi-badge.fi-color-danger .fi-badge-label {
    color: #fff;
}

/* Travel: what a place would cost, tried out on the settings page. */
.pd-travel-probe { border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); padding: 12px 14px; font-size: 0.875rem; }
.dark .pd-travel-probe { border-color: var(--gray-700); }
.pd-travel-probe__head { display: flex; justify-content: space-between; gap: 12px; font-size: 1rem; }
.pd-travel-probe dl { display: grid; grid-template-columns: 1fr auto; gap: 4px 16px; margin: 10px 0 0; color: var(--gray-600); }
.dark .pd-travel-probe dl { color: var(--gray-400); }
.pd-travel-probe dd { margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pd-travel-probe p { margin: 8px 0 0; color: var(--gray-600); }
.pd-travel-probe__miss { color: var(--danger-600); }

/* One inquiry: whose move it is, its next step, what happened, notes, figures. */
.pd-case__mono { font-family: ui-monospace, monospace; font-size: 0.75rem; letter-spacing: 0.02em; }
.pd-case__muted { color: var(--gray-500); font-size: 0.8125rem; }
.pd-case__turn-line { justify-self: start; padding: 3px 10px; border-radius: 999px; font-size: 0.8125rem; color: var(--gray-600); background: color-mix(in oklab, var(--gray-500) 10%, transparent); }
.dark .pd-case__turn-line { color: var(--gray-300); }
.pd-case__turn-line[data-turn="studio"] { color: var(--primary-700); background: color-mix(in oklab, var(--primary-500) 14%, transparent); font-weight: 500; }
.dark .pd-case__turn-line[data-turn="studio"] { color: var(--primary-300); }
.pd-case__step { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; font-size: 0.875rem; }
.pd-case__step-label { font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); }
.pd-case__step-due { padding: 1px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: color-mix(in oklab, var(--gray-500) 12%, transparent); }
.pd-case__step-due.is-due { background: var(--primary-500); color: #fff; }
.pd-case__step-text { flex: 1; min-width: 10rem; }
.pd-case__step-done { display: inline-flex; gap: 4px; align-items: center; padding: 3px 10px; border: 1px solid var(--gray-200); border-radius: 999px; font-size: 0.75rem; color: var(--gray-500); }
.dark .pd-case__step-done { border-color: color-mix(in oklab, white 10%, transparent); }
.pd-case__step-done:hover { color: var(--success-600); border-color: var(--success-500); }
.pd-case__step-done svg { width: 14px; height: 14px; }
.pd-case__step-form { display: flex; flex: 1; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-case__step-form input { flex: 1 1 14rem; min-width: 0; padding: 5px 10px; border: 1px dashed var(--gray-300); border-radius: 8px; background: transparent; font-size: 0.875rem; }
.dark .pd-case__step-form input { border-color: color-mix(in oklab, white 14%, transparent); }
.pd-case__step-form input:focus { border-style: solid; outline: 2px solid var(--pd-ink); outline-offset: -1px; }
.pd-case__step-quick { display: inline-flex; gap: 4px; }
.pd-case__step-quick button { padding: 3px 9px; border: 1px solid var(--gray-200); border-radius: 999px; font-size: 0.75rem; color: var(--gray-500); }
.dark .pd-case__step-quick button { border-color: color-mix(in oklab, white 10%, transparent); }
.pd-case__step-quick button:hover { color: inherit; border-color: var(--primary-400); }
.pd-case__alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 14px; border-radius: 10px; font-size: 0.875rem; color: var(--danger-700); background: color-mix(in oklab, var(--danger-500) 9%, transparent); }
.dark .pd-case__alert { color: var(--danger-300); }
.pd-case__alert svg { flex: none; width: 18px; height: 18px; margin-top: 1px; }
.pd-case__moment { display: flex; gap: 12px; padding: 7px 0; }
.pd-case__moment-icon { display: inline-grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: var(--gray-500); border: 1px solid var(--gray-200); background: var(--pd-board-panel, #fff); }
.dark .pd-case__moment-icon { border-color: color-mix(in oklab, white 10%, transparent); }
.pd-case__moment-icon svg { width: 14px; height: 14px; }
.pd-case__moment[data-kind="mail_in"] .pd-case__moment-icon, .pd-case__moment[data-kind="received"] .pd-case__moment-icon { color: var(--primary-600); border-color: color-mix(in oklab, var(--primary-500) 40%, transparent); }
.pd-case__moment[data-kind="note"] .pd-case__moment-icon { color: var(--warning-600); }
.pd-case__moment[data-kind$="accepted"] .pd-case__moment-icon, .pd-case__moment[data-kind="confirmed"] .pd-case__moment-icon { color: var(--success-600); border-color: color-mix(in oklab, var(--success-500) 40%, transparent); }
.pd-case__moment[data-kind$="declined"] .pd-case__moment-icon, .pd-case__moment[data-kind$="expired"] .pd-case__moment-icon { color: var(--danger-600); }
.pd-case__moment-body { min-width: 0; flex: 1; padding-top: 4px; }
.pd-case__moment-top { display: flex; gap: 8px; align-items: baseline; font-size: 0.8125rem; color: var(--gray-500); }
.pd-case__moment-top strong, .pd-case__moment-top a { color: var(--gray-950); font-weight: 600; }
.dark .pd-case__moment-top strong, .dark .pd-case__moment-top a { color: white; }
.pd-case__moment-top a:hover { text-decoration: underline; }
.pd-case__moment-top time { margin-left: auto; font-size: 0.75rem; white-space: nowrap; }
.pd-case__moment-delete { color: var(--gray-500); opacity: 0; }
.pd-case__moment:hover .pd-case__moment-delete, .pd-case__moment-delete:focus-visible { opacity: 1; }
.pd-case__moment-delete svg { width: 14px; height: 14px; }
.pd-case__moment-text { margin-top: 3px; font-size: 0.8125rem; line-height: 1.5; color: var(--gray-500); white-space: pre-line; overflow-wrap: anywhere; }
.pd-case__moment-text.is-note { padding: 8px 12px; border-radius: 8px; font-size: 0.875rem; color: inherit; background: color-mix(in oklab, var(--warning-500) 10%, transparent); }
.pd-case__moment-text.is-mail { padding: 8px 12px; border-radius: 8px; color: inherit; background: color-mix(in oklab, var(--gray-500) 7%, transparent); }
.pd-file__kept { display: inline-flex; color: var(--success-600); }
.pd-file__kept svg { width: 14px; height: 14px; }
.dark .pd-file__kept { color: var(--success-400); }
.pd-kept { display: grid; gap: 6px; margin-top: 12px; padding: 10px 12px; border-radius: 10px; font-size: 0.8125rem; border: 1px solid color-mix(in oklab, var(--success-500) 35%, transparent); background: color-mix(in oklab, var(--success-500) 7%, transparent); }
.pd-kept__line { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: center; margin: 0; }
.pd-kept__line strong { color: var(--success-700); }
.dark .pd-kept__line strong { color: var(--success-400); }
.pd-kept__line.is-quiet { color: var(--gray-500); }
.pd-kept__line code { font-size: 0.75rem; }
.pd-kept__icon { width: 14px; height: 14px; color: var(--success-600); }
.pd-case__note { display: flex; gap: 10px; align-items: flex-start; padding: 8px 12px; border: 1px dashed var(--gray-300); border-radius: 10px; }
.dark .pd-case__note { border-color: color-mix(in oklab, white 14%, transparent); }
.pd-case__note:focus-within { border-style: solid; border-color: color-mix(in oklab, var(--warning-500) 50%, transparent); }
.pd-case__note-icon { flex: none; width: 16px; height: 16px; margin-top: 3px; color: var(--warning-600); }
.pd-case__note textarea { flex: 1; min-width: 0; width: 100%; min-height: 1.5em; max-height: 12rem; padding: 0; border: 0; box-shadow: none; background: transparent; font-size: 0.875rem; line-height: 1.5; resize: none; outline: none; overflow-x: hidden; overflow-y: auto; white-space: pre-wrap; field-sizing: content; }

/* The figures */
.pd-case__figures h2 { font-size: 1.0625rem; font-weight: 600; }
.pd-case__kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 10px; }
.pd-case__kpis > div { padding: 12px 14px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); }
.dark .pd-case__kpis > div { border-color: color-mix(in oklab, white 8%, transparent); }
.pd-case__kpis dt { font-size: 0.75rem; color: var(--gray-500); }
.pd-case__kpis dd { font-size: 1.375rem; font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; }
.pd-case__kpis dd small { font-size: 0.875rem; font-weight: 500; color: var(--gray-500); }
.pd-case__kpis .pd-case__kpi-note { font-size: 0.75rem; font-weight: 400; color: var(--gray-500); }
.pd-case__fig-head { margin: 22px 0 10px; font-size: 0.9375rem; font-weight: 600; color: var(--pd-ink); }
.pd-case__bars { display: grid; gap: 8px; }
.pd-case__bars li { display: grid; grid-template-columns: minmax(0, 11rem) minmax(0, 1fr) auto; gap: 12px; align-items: center; font-size: 0.8125rem; }
.pd-case__bar-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-case__bar { position: relative; height: 10px; border-radius: 999px; background: color-mix(in oklab, var(--gray-500) 10%, transparent); }
.pd-case__bar i, .pd-case__bar b { position: absolute; inset: 0 auto 0 0; border-radius: inherit; }
.pd-case__bar i { background: color-mix(in oklab, var(--primary-500) 30%, transparent); }
.pd-case__bar b { background: var(--primary-500); }
.pd-case__bar.is-lost i { background: color-mix(in oklab, var(--danger-500) 55%, transparent); }
.pd-case__bar-value { font-variant-numeric: tabular-nums; color: var(--gray-500); white-space: nowrap; }
.pd-case__legend { display: flex; gap: 6px; align-items: center; margin-top: 10px; font-size: 0.75rem; color: var(--gray-500); }
.pd-stats .pd-case__legend { font-size: 0.8125rem; }
.pd-case__legend span { width: 10px; height: 10px; margin-left: 8px; border-radius: 3px; background: color-mix(in oklab, var(--primary-500) 30%, transparent); }
.pd-case__legend span:first-child { margin-left: 0; }
.pd-case__legend span.is-booked { background: var(--primary-500); }

/* The statistics of the jobs: the period above, the key figures, then cards side by side. */
.pd-stats { display: grid; gap: 14px; min-width: 0; }
.pd-stats > *, .pd-stats__panel { min-width: 0; }
.pd-stats__panel { display: grid; gap: 14px; }
.pd-stats__head { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: center; justify-content: space-between; min-width: 0; }
.pd-stats__head h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.pd-stats__filters { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; min-width: 0; max-width: 100%; }
.pd-stats__brand select { max-width: 100%; padding: 4px 28px 4px 10px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background-color: transparent; font-size: 0.8125rem; }
.dark .pd-stats__brand select { border-color: color-mix(in oklab, white 8%, transparent); }
.pd-stats__periods { display: inline-flex; gap: 0.25rem; max-width: 100%; padding: 0.25rem; overflow-x: auto; overscroll-behavior-x: contain; scrollbar-width: none; border: 1px solid var(--pd-line); border-radius: 999px; background: var(--pd-panel); }
.pd-stats__periods::-webkit-scrollbar { display: none; }
.pd-stats__periods button { flex: none; padding: 0.375rem 0.875rem; border-radius: 999px; font-size: 0.875rem; font-weight: 500; white-space: nowrap; color: var(--gray-700); transition: background-color 120ms ease-out, color 120ms ease-out, transform 100ms ease-out; }
.dark .pd-stats__periods button { color: var(--gray-300); }
.pd-stats__periods button:hover { background: var(--pd-soft); color: var(--pd-ink); }
.pd-stats__periods button:active { transform: scale(0.96); }
.pd-stats__periods button[aria-selected="true"], .pd-stats__periods button[aria-checked="true"] { background: var(--pd-ink); color: var(--pd-canvas); }
.pd-stats__hint { font-size: 0.75rem; color: var(--gray-500); }
/* Cards side by side, every row filled to the edge: the last ones of a row share what is left. */
.pd-stats__grid { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 6px; }
.pd-stats__grid > * { flex: 1 1 26rem; min-width: 0; }
.pd-stats__card { display: grid; align-content: start; gap: 10px; padding: 4px 16px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); }
.dark .pd-stats__card, .dark .pd-stats__periods { border-color: color-mix(in oklab, white 8%, transparent); }
.pd-stats__card .pd-case__fig-head { margin: 12px 0 0; }
.pd-stats__card .pd-case__legend { margin-top: 0; }
.pd-stats__card .pd-case__bars li { grid-template-columns: minmax(0, 10rem) minmax(3rem, 1fr) auto; }
.pd-stats__card .pd-stats__bars--value li { grid-template-columns: minmax(0, 9rem) minmax(3rem, 1fr) auto auto; }
.pd-stats__bars--value li > :last-child { text-align: right; }
.pd-stats__columns { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); gap: 6px; align-items: end; }
.pd-stats__columns li { display: grid; justify-items: center; gap: 3px; min-width: 0; }
.pd-stats__column { position: relative; width: 100%; max-width: 28px; height: 120px; border-radius: 4px; background: color-mix(in oklab, var(--gray-500) 4%, transparent); }
.pd-stats__column i, .pd-stats__column b { position: absolute; inset: auto 0 0 0; border-radius: inherit; }
.pd-stats__column i { background: color-mix(in oklab, var(--primary-500) 30%, transparent); }
.pd-stats__column b { background: var(--primary-500); }
.pd-stats__legend { display: flex; flex-wrap: wrap; gap: 4px 14px; margin: 8px 0 0; font-size: 0.8125rem; color: var(--gray-500); }
.pd-stats__legend i { display: inline-block; width: 10px; height: 10px; margin-right: 5px; border-radius: 2px; vertical-align: -1px; }
.pd-stats__legend .is-services, .pd-stats__columns--money .pd-stats__column b { background: var(--primary-500); }
.pd-stats__legend .is-products, .pd-stats__columns--money .pd-stats__column i { background: var(--warning-400); }
/* Amounts in whole euros above the months; too tight on a narrow screen, there the title tells. */
@media (max-width: 1100px) { .pd-stats__columns--money em { visibility: hidden; } }
.pd-stats__columns em { font-style: normal; font-size: 0.6875rem; font-variant-numeric: tabular-nums; color: var(--gray-500); min-height: 1em; }
.pd-stats__columns small { min-height: 1.2em; font-size: 0.6875rem; color: var(--gray-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.pd-stats__columns--hours { gap: 2px; }
.pd-stats__columns--timeline { gap: 1px; }
.pd-stats__columns--timeline .pd-stats__column { max-width: none; height: 110px; border-radius: 2px; background: none; border-bottom: 1px solid var(--pd-line); }
.pd-stats__columns--timeline small, .pd-stats__columns--sparse small { overflow: visible; }
.pd-stats__columns--hours .pd-stats__column { height: 80px; }
.pd-stats__section { margin-top: 18px; font-size: 1rem; font-weight: 600; }
.pd-stats__section small { margin-left: 0.4em; font-size: 0.8125rem; font-weight: 400; color: var(--gray-500); }
.pd-stats__wide { grid-column: 1 / -1; flex-basis: 100% !important; }
.pd-stats__table { width: 100%; border-collapse: collapse; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.pd-stats__table th { padding: 4px 8px; text-align: right; font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); }
.pd-stats__table td { padding: 5px 8px; text-align: right; border-top: 1px solid var(--pd-line); white-space: nowrap; }
.pd-stats__table th:first-child, .pd-stats__table td:first-child { text-align: left; white-space: normal; word-break: break-all; padding-left: 0; }
.pd-stats__table small { color: var(--gray-500); }
.pd-stats__subsection { margin-top: 8px; font-size: 0.875rem; font-weight: 600; color: var(--gray-500); }

/* The way through the websites as a Sankey chart: bands as wide as what flows, estimated ones paler. */
.pd-paths__scroll { overflow-x: auto; }
.pd-paths__columns, .pd-paths__chart { min-width: 720px; }
.pd-paths__columns { position: relative; height: 1.2em; margin: 0 0 8px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; color: var(--gray-500); }
.pd-paths__columns li { position: absolute; top: 0; white-space: nowrap; }
.pd-paths__columns li:last-child { transform: translateX(-100%); }
.pd-paths__chart { display: block; width: 100%; height: auto; overflow: visible; }
.pd-paths__band { fill: var(--primary-500); fill-opacity: 0.32; transition: fill-opacity 0.15s; }
.pd-paths__band.is-estimated { fill-opacity: 0.16; }
.pd-paths__band.is-to-left, .pd-paths__band.is-to-unsent { fill: var(--gray-400); fill-opacity: 0.18; }
.pd-paths__band:hover { fill-opacity: 0.5; }
.pd-paths__node rect { fill: var(--primary-500); }
.pd-paths__node.is-left rect { fill: var(--gray-400); }
.pd-paths__node.is-sent rect, .pd-paths__node.is-booking rect { fill: var(--primary-700, var(--primary-500)); }
.pd-paths__node text { font-size: 12px; fill: currentColor; paint-order: stroke; stroke: var(--pd-panel); stroke-width: 3px; stroke-linejoin: round; }
.dark .pd-paths__node text { stroke: var(--gray-900); }
.pd-paths__node tspan { fill: var(--gray-500); font-variant-numeric: tabular-nums; }

/* A whole as one bar of parts, largest darkest. */
.pd-split { display: grid; gap: 8px; }
.pd-split__title { margin: 2px 0 -4px; font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); }
.pd-split__bar { display: flex; height: 14px; overflow: hidden; border-radius: 999px; background: color-mix(in oklab, var(--gray-500) 8%, transparent); }
.pd-split__bar i + i { border-left: 2px solid var(--pd-panel); }
.pd-split i.is-0 { background: var(--primary-500); }
.pd-split i.is-1 { background: color-mix(in oklab, var(--primary-500) 55%, transparent); }
.pd-split i.is-2 { background: color-mix(in oklab, var(--primary-500) 30%, transparent); }
.pd-split i.is-3 { background: color-mix(in oklab, var(--primary-500) 15%, transparent); }
.pd-split__legend { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 0; font-size: 0.8125rem; }
.pd-split__legend li { display: flex; gap: 6px; align-items: center; }
.pd-split__legend li > i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
.pd-split__legend b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-split__legend small { color: var(--gray-500); font-variant-numeric: tabular-nums; }

/* Search terms as bubbles: position across, click rate up, size the times shown. */
.pd-terms__scroll, .pd-funnel__scroll { overflow-x: auto; }
.pd-terms, .pd-funnel, .pd-funnel__labels { min-width: 640px; }
.pd-terms { display: block; width: 100%; height: auto; overflow: visible; }
.pd-terms__chances { fill: color-mix(in oklab, var(--success-500, #22c55e) 8%, transparent); }
.pd-terms__page { stroke: var(--pd-line-strong, var(--pd-line)); stroke-dasharray: 4 4; }
.pd-terms__grid { stroke: var(--pd-line); }
.pd-terms__tick, .pd-terms__zone { font-size: 11px; fill: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-terms__zone { font-weight: 600; }
.pd-terms__bubble circle { fill: color-mix(in oklab, var(--primary-500) 22%, transparent); stroke: color-mix(in oklab, var(--primary-500) 55%, transparent); stroke-width: 1; transition: fill 0.15s; }
.pd-terms__bubble.is-up circle { fill: color-mix(in oklab, var(--success-500, #22c55e) 25%, transparent); stroke: var(--success-600); }
.pd-terms__bubble.is-down circle { fill: color-mix(in oklab, var(--danger-500, #ef4444) 20%, transparent); stroke: var(--danger-600); }
.pd-terms__bubble:hover circle { fill: color-mix(in oklab, var(--primary-500) 45%, transparent); }
.pd-terms__bubble text { font-size: 11px; fill: currentColor; paint-order: stroke; stroke: var(--pd-panel); stroke-width: 3px; stroke-linejoin: round; pointer-events: none; }
.pd-terms__scroll { position: relative; }
.pd-terms__lead { stroke: var(--gray-400); stroke-width: 1; pointer-events: none; }
.pd-terms__bubble text.pd-terms__number { font-size: 10px; font-weight: 600; fill: var(--gray-600); stroke: none; font-variant-numeric: tabular-nums; }
.pd-terms__bubble.is-tipped circle { fill: color-mix(in oklab, var(--primary-500) 45%, transparent); }
.pd-terms__tip { position: absolute; z-index: 4; padding: 4px 8px; border-radius: 6px; background: var(--pd-ink); color: var(--pd-canvas); font-size: 0.75rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, calc(-100% + 2px)); transition: opacity 80ms ease-out, transform 80ms ease-out; }
.pd-terms__tip.is-shown { opacity: 1; transform: translate(-50%, -100%); }
.pd-terms__key { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 4px 24px; margin: 12px 0 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.pd-terms__key b { display: inline-block; min-width: 1.5em; font-variant-numeric: tabular-nums; color: var(--gray-500); }
.pd-terms__key small { color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-terms__legend span.is-up { background: color-mix(in oklab, var(--success-500, #22c55e) 45%, transparent); }
.pd-terms__legend span.is-down { background: color-mix(in oklab, var(--danger-500, #ef4444) 40%, transparent); }

/* A term's position over time: the top places up. */
.pd-spark { width: 90px; height: 22px; overflow: visible; vertical-align: middle; }
.pd-spark polyline { fill: none; stroke: var(--primary-500); stroke-width: 1.5; stroke-linejoin: round; stroke-linecap: round; }

/* The booking page as a funnel: a column per step, joined by bands. */
.pd-funnel { display: block; width: 100%; height: auto; }
.pd-funnel__step { fill: color-mix(in oklab, var(--primary-500) 70%, transparent); }
.pd-funnel__step.is-booked { fill: var(--success-600); }
.pd-funnel__join { fill: color-mix(in oklab, var(--primary-500) 14%, transparent); }
.pd-funnel__labels { display: grid; grid-template-columns: repeat(var(--count), minmax(0, 1fr)); margin: 8px 0 0; text-align: center; font-size: 0.75rem; }
.pd-funnel__labels li { display: grid; gap: 1px; }
.pd-funnel__labels b { font-size: 0.9375rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-funnel__labels small, .pd-funnel__labels span { color: var(--gray-500); }

/* The connection to the Search Console: two steps, then the properties connected. */
.pd-search__setup summary { cursor: pointer; font-size: 0.875rem; font-weight: 500; }
.pd-search__setup[open] summary { margin-bottom: 8px; }
.pd-stats__table .pd-search__page { text-align: left; white-space: normal; word-break: break-all; }
.pd-search__moved, .pd-search__mark { margin-left: 4px; font-size: 0.6875rem; font-weight: 500; white-space: nowrap; }
.pd-search__mark { padding: 1px 6px; border-radius: 999px; background: color-mix(in oklab, currentColor 10%, transparent); }
.pd-search__moved.is-up, .pd-search__mark.is-up { color: var(--success-600); }
.pd-search__moved.is-down, .pd-search__mark.is-down { color: var(--danger-600); }
.dark .pd-search__moved.is-up, .dark .pd-search__mark.is-up { color: var(--success-400); }
.dark .pd-search__moved.is-down, .dark .pd-search__mark.is-down { color: var(--danger-400); }
.pd-search__steps { display: grid; gap: 10px; margin: 0; padding-left: 1.25rem; list-style: decimal; font-size: 0.875rem; }
.pd-search__email, .pd-search__connect { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-top: 6px; }
.pd-search__email code { padding: 3px 8px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); font-size: 0.8125rem; word-break: break-all; user-select: all; }
.pd-search__none { display: block; margin-top: 4px; color: var(--gray-500); }
.pd-search__connected { display: grid; gap: 6px; margin: 4px 0 0; font-size: 0.875rem; }
.pd-search__connected li { display: flex; flex-wrap: wrap; gap: 4px 14px; align-items: baseline; padding-top: 6px; border-top: 1px solid var(--pd-line); }
.pd-search__connected span { color: var(--gray-500); }
.pd-search__connected span.is-error { color: var(--danger-600); }
.dark .pd-search__connected span.is-error { color: var(--danger-400); }
.pd-search__connected .pd-link { margin-left: auto; }

/* What stays of the inquiry board: the phase pill, the date leaf, the facts and the history, used by the job page and Today. */
.pd-invoices__head { display: flex; flex-wrap: wrap; gap: 12px 32px; align-items: baseline; justify-content: space-between; }
.pd-invoices__head h1 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.01em; }
.pd-invoices__sums { display: flex; flex-wrap: wrap; gap: 8px 28px; margin: 0; }
.pd-invoices__sums dt { font-size: 0.8125rem; font-weight: 700; color: var(--gray-500); }
.pd-invoices__sums dd { margin: 0; font-size: 1.125rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-invoices__sums .is-late dd { color: var(--danger-600); }
.dark .pd-invoices__sums .is-late dd { color: var(--danger-400); }
.pd-invoices__limit { flex-basis: 100%; margin: 0; font-size: 0.8125rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-invoices__limit .is-late { color: var(--danger-600); font-weight: 600; }
.dark .pd-invoices__limit .is-late { color: var(--danger-400); }

/* The day as a little calendar leaf */
.pd-board__date { display: grid; justify-items: center; min-width: 44px; overflow: hidden; border: 1px solid var(--pd-board-line); border-radius: 10px; line-height: 1.05; background: var(--pd-board-panel); }
.pd-board__date small { width: 100%; padding: 2px 4px 1px; text-align: center; white-space: nowrap; font-size: 0.5625rem; font-weight: 700; letter-spacing: 0.05em; text-transform: uppercase; color: #fff; background: var(--stage); }
.pd-board__date b { padding-top: 3px; font-size: 1.1875rem; font-weight: 650; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.pd-board__date i { padding-bottom: 3px; font-style: normal; font-size: 0.625rem; font-weight: 500; color: var(--gray-500); }

.pd-board__panel-story { background: var(--pd-board-panel); }
.pd-board__stage { --stage: var(--gray-400); padding: 1px 8px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--stage); background: color-mix(in oklab, var(--stage) 14%, transparent); }
.pd-board__stage[data-stage="new"] { --stage: var(--danger-600); }
.pd-board__stage[data-stage="talking"] { --stage: var(--warning-600); }
.pd-board__stage[data-stage="offered"] { --stage: var(--info-600, #2563eb); }
.pd-board__stage[data-stage="booked"], .pd-board__stage[data-stage="past"] { --stage: var(--success-600); }
.pd-board__stage[data-stage="after"] { --stage: var(--gray-600); }
.pd-board__panel-story { padding-inline: 32px; }
.pd-board__panel-side, .pd-board__panel-story { display: grid; gap: 16px; align-content: start; padding: 20px 24px; overflow-y: auto; }
.pd-board__actions { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-board__actions .fi-btn { white-space: nowrap; }
.pd-board__facts { display: grid; gap: 10px; padding: 12px 14px; border-radius: 12px; background: var(--pd-board-col); border: 1px solid var(--pd-board-line); }
.pd-board__facts > div { display: grid; grid-template-columns: 5.5rem minmax(0, 1fr); gap: 10px; font-size: 0.8125rem; }
.pd-board__facts dt { padding-top: 1px; font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); }
.pd-board__facts dd { overflow-wrap: anywhere; }
.pd-board__facts dd.is-warn strong { color: var(--warning-600); }
.pd-board__facts a { color: var(--primary-600); }
.dark .pd-board__facts a { color: var(--primary-400); }
.pd-board__facts a:hover { text-decoration: underline; }
.pd-board__free { display: block; margin-top: 2px; font-size: 0.75rem; color: var(--success-600); }
.pd-board__free.is-clash { color: var(--danger-600); }
.pd-board__history { display: grid; }
.pd-board__other { justify-self: start; font-size: 0.8125rem; color: var(--primary-600); text-align: left; }

@media (max-width: 1023px) {
    .pd-board__panel-side, .pd-board__panel-story { overflow: visible; }
}
@media (max-width: 640px) {
    .pd-board__panel-head, .pd-board__panel-side, .pd-board__panel-story { padding-inline: 16px; }
}

/* The line under the settings' title naming the places with settings of their own. */
.pd-settings-elsewhere { font-size: 0.875rem; color: var(--gray-500); }
.pd-settings-elsewhere__link { color: var(--gray-700); text-decoration: underline; text-underline-offset: 3px; text-decoration-color: var(--gray-300); }
.pd-settings-elsewhere__link:hover { text-decoration-color: currentColor; }
.dark .pd-settings-elsewhere__link { color: var(--gray-200); }

/* Settings within a list: the way back to it beside the title. */
.pd-heading-back { display: inline-flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.pd-back { display: inline-flex; align-items: center; gap: 0.375rem; padding: 0.3125rem 0.75rem 0.3125rem 0.5rem; border-radius: 999px; font-size: 0.875rem; font-weight: 500; letter-spacing: 0; color: var(--gray-700); background: var(--gray-100); transition: background-color 140ms; }
.pd-back:hover { background: var(--gray-200); }
.pd-back__icon { width: 1rem; height: 1rem; }
.dark .pd-back { color: var(--gray-200); background: var(--gray-800); }
.dark .pd-back:hover { background: var(--gray-700); }
/* With the way back beside it, the heading's dot gives way: the button leads, the title follows. */
.fi-header-heading:has(.pd-heading-back)::before { display: none; }

/*
 * The offer editor: the offer as a sheet on the ground, every field in place and plain until
 * touched; on the right sending, validity, the inquiry and the versions.
 */
.pd-oe { --pd-oe-muted: var(--gray-500); --pd-oe-hover: color-mix(in oklab, var(--gray-500) 8%, transparent); display: grid; gap: 14px; }
.dark .pd-oe { --pd-oe-muted: var(--gray-400); --pd-oe-hover: color-mix(in oklab, white 6%, transparent); }
.pd-oe__top { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.pd-oe__back { color: var(--pd-oe-muted); font-size: 0.875rem; text-decoration: none; }
.pd-oe__back:hover { color: var(--pd-ink); }
.pd-oe__status { padding: 2px 9px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; background: var(--pd-soft); color: var(--pd-ink); }
.pd-oe__status[data-tone="info"] { background: color-mix(in oklab, var(--info-500) 14%, transparent); color: var(--info-700); }
.pd-oe__status[data-tone="warn"] { background: color-mix(in oklab, var(--warning-500) 16%, transparent); color: var(--warning-700); }
.pd-oe__status[data-tone="ok"] { background: color-mix(in oklab, var(--success-500) 16%, transparent); color: var(--success-700); }
.pd-oe__status[data-tone="danger"] { background: color-mix(in oklab, var(--danger-500) 14%, transparent); color: var(--danger-700); }
.dark .pd-oe__status[data-tone] { color: var(--pd-ink); }
.pd-oe__modes { display: inline-flex; border: 1px solid var(--pd-line-strong); border-radius: 9px; overflow: hidden; }
.pd-oe__modes button { padding: 5px 12px; font-size: 0.8125rem; color: var(--pd-oe-muted); }
.pd-oe__modes button[aria-selected="true"] { background: var(--pd-ink); color: var(--pd-canvas); }
.pd-oe__saved { color: var(--pd-oe-muted); font-size: 0.75rem; font-variant-numeric: tabular-nums; }
.pd-oe__banner { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 10px 14px; border-radius: var(--pd-radius-sm); background: color-mix(in oklab, var(--warning-500) 14%, transparent); font-size: 0.875rem; }
.pd-oe__banner a { color: var(--pd-ink); text-decoration: underline; }

.pd-oe__body { display: grid; grid-template-columns: minmax(0, 1fr); gap: 18px; align-items: start; }
.pd-oe__canvas { min-width: 0; padding: 14px; border-radius: var(--pd-radius); background: var(--pd-ground); }
.pd-oe__frame { display: block; width: 100%; height: calc(100dvh - 11rem); min-height: 36rem; border: 0; border-radius: 8px; background: #fff; }
.pd-oe__sheet { container-type: inline-size; display: grid; gap: 22px; padding: 32px 40px; border-radius: 8px; background: var(--pd-panel); box-shadow: 0 1px 3px rgb(0 0 0 / 0.08), 0 12px 30px -24px rgb(0 0 0 / 0.4); }
.pd-oe__head { display: flex; justify-content: space-between; gap: 24px; font-size: 0.875rem; }
.pd-oe__to { display: grid; gap: 1px; }
.pd-oe__meta { display: grid; grid-template-columns: auto auto; gap: 2px 14px; margin: 0; text-align: right; font-variant-numeric: tabular-nums; }
.pd-oe__meta dt { color: var(--pd-oe-muted); }
.pd-oe__meta dd { margin: 0; font-weight: 600; }
.pd-oe__title { margin: 0; font-size: 1.5rem; font-weight: 700; letter-spacing: -0.01em; }
.pd-oe__sub { margin: 2px 0 0; color: var(--pd-oe-muted); font-size: 0.875rem; }

/* Fields that read as text until they are touched. */
.pd-oe input, .pd-oe textarea, .pd-oe select { min-width: 0; font: inherit; color: inherit; }
.pd-oe__sheet input, .pd-oe__sheet textarea { width: 100%; padding: 4px 6px; margin: -4px -6px; border: 1px solid transparent; border-radius: 6px; background: transparent; outline: none; resize: none; }
.pd-oe__sheet textarea { field-sizing: content; overflow-x: hidden; }
@supports (field-sizing: content) { .pd-oe__sheet textarea { overflow-y: hidden; } }
.pd-oe__sheet input:hover:not(:disabled), .pd-oe__sheet textarea:hover:not(:disabled) { background: var(--pd-oe-hover); }
.pd-oe__sheet input:focus, .pd-oe__sheet textarea:focus { border-color: var(--primary-500); background: var(--pd-panel); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary-500) 18%, transparent); }
.pd-oe__sheet :disabled { cursor: default; opacity: 1; -webkit-text-fill-color: currentColor; }
.pd-oe__words textarea { width: calc(100% + 12px); min-height: calc(1.6em + 10px); line-height: 1.6; overflow-x: hidden; }
.pd-oe__placeholders { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; color: var(--pd-oe-muted); font-size: 0.75rem; }
.pd-oe__placeholders button { padding: 1px 7px; border-radius: 5px; background: var(--pd-soft); font-family: ui-monospace, monospace; font-size: 0.72rem; color: var(--pd-ink); }

.pd-oe__table { display: grid; font-size: 0.9375rem; }
.pd-oe__row { display: grid; grid-template-columns: 16px minmax(12rem, 1fr) 3.5rem 6.5rem 4.5rem 7rem 26px; gap: 10px; align-items: start; padding: 10px 0; border-bottom: 1px solid var(--pd-line); }
.pd-oe__row--head { padding-top: 0; color: var(--pd-oe-muted); font-size: 0.8125rem; font-weight: 600; border-bottom-color: var(--pd-line-strong); }
.pd-oe__row.is-heading { padding-top: 18px; }
.pd-oe__row .is-num { display: grid; text-align: right; font-variant-numeric: tabular-nums; }
.pd-oe__num { text-align: right; }
.pd-oe__discount::placeholder { color: var(--pd-oe-muted); }
.pd-oe__grip { padding-top: 4px; color: var(--pd-line-strong); font-weight: 700; letter-spacing: -2px; cursor: grab; user-select: none; }
.pd-oe__sheet.is-locked .pd-oe__grip { visibility: hidden; }
.pd-oe__what { display: grid; gap: 2px; min-width: 0; }
.pd-oe__name { font-weight: 600; }
.pd-oe__name-row { display: flex; align-items: center; gap: 8px; min-width: 0; }
.pd-oe__name-row .pd-oe__name { flex: 1; }
.pd-oe__chip { justify-self: start; padding: 1px 8px; border-radius: 6px; font-size: 0.6875rem; font-weight: 600; white-space: nowrap; }
.pd-oe__chip[data-kind="pick"] { background: color-mix(in oklab, var(--info-500) 14%, transparent); color: var(--info-700); }
.pd-oe__chip[data-kind="optional"] { background: color-mix(in oklab, var(--warning-500) 16%, transparent); color: var(--warning-700); }
.dark .pd-oe__chip { color: var(--pd-ink); }
.pd-oe__row.is-off .pd-oe__total { color: var(--pd-oe-muted); font-weight: 400; }
.pd-oe__desc { color: var(--pd-oe-muted); font-size: 0.8125rem; }
.pd-oe__items { margin: 4px 0 0; padding: 0 0 0 12px; list-style: none; color: var(--pd-oe-muted); font-size: 0.8125rem; }
.pd-oe__items li { display: flex; justify-content: space-between; gap: 12px; padding: 1px 0; }
.pd-oe__items li span:last-child { white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-oe__row:not(:hover):not(:focus-within) .pd-oe__desc:placeholder-shown { display: none; }
.pd-oe__heading { font-size: 0.9375rem; font-weight: 700; color: var(--pd-oe-muted); }
.pd-oe__row.is-heading .pd-oe__heading { grid-column: 2 / 7; }
.pd-oe__total { padding-top: 4px; font-weight: 600; }
.pd-oe__total small { color: var(--pd-oe-muted); font-weight: 400; text-decoration: line-through; font-size: 0.75rem; }
.pd-oe__more { width: 26px; height: 26px; border-radius: 6px; color: var(--pd-oe-muted); }
.pd-oe__more:hover { background: var(--pd-oe-hover); color: var(--pd-ink); }
.pd-oe__menu { display: grid; gap: 10px; padding: 12px; font-size: 0.875rem; }
.pd-oe__menu label { display: grid; gap: 4px; }
.pd-oe__menu label span { color: var(--pd-oe-muted); font-size: 0.75rem; }
.pd-oe__menu label.is-check { display: flex; align-items: center; gap: 8px; }
.pd-oe__menu label.is-check span { color: var(--pd-ink); font-size: 0.875rem; }
.pd-oe__menu select { padding: 5px 8px; border: 1px solid var(--pd-line-strong); border-radius: 7px; background: var(--pd-panel); }
.pd-oe__menu-row { display: flex; gap: 6px; }
.pd-oe__menu button { padding: 5px 8px; border-radius: 7px; text-align: left; }
.pd-oe__menu button:hover { background: var(--pd-oe-hover); }
.pd-oe__menu .is-danger { color: var(--danger-600); }
.pd-oe__error { color: var(--danger-600); font-size: 0.75rem; text-align: left; }
.fi-sortable-ghost.pd-oe__row { opacity: 0.4; }

.pd-oe__add { position: relative; display: grid; gap: 8px; margin-top: 12px; }
.pd-oe__add-field { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border: 1.5px dashed var(--pd-line-strong); border-radius: 10px; color: var(--pd-oe-muted); }
.pd-oe__add-field:focus-within { border-style: solid; border-color: var(--primary-500); color: var(--pd-ink); }
.pd-oe__add-field input { flex: 1; padding: 0; margin: 0; border: 0 !important; box-shadow: none !important; background: transparent !important; }
.pd-oe__keys { color: var(--pd-oe-muted); font-size: 0.72rem; white-space: nowrap; }
.pd-oe kbd { padding: 0 5px; border: 1px solid var(--pd-line-strong); border-bottom-width: 2px; border-radius: 5px; font-family: ui-monospace, monospace; font-size: 0.68rem; }
.pd-oe__options { position: absolute; z-index: 20; top: 46px; left: 0; right: 0; display: grid; gap: 1px; max-height: 22rem; overflow: auto; padding: 6px; border: 1px solid var(--pd-line); border-radius: 12px; background: var(--pd-panel); box-shadow: var(--pd-shadow-hover); }
.pd-oe__options button { display: grid; grid-template-columns: 34px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 6px 8px; border-radius: 8px; text-align: left; font-size: 0.875rem; }
.pd-oe__options button.is-active { background: color-mix(in oklab, var(--primary-500) 12%, transparent); }
.pd-oe__options button small { display: block; color: var(--pd-oe-muted); font-size: 0.75rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pd-oe__options em { font-style: normal; color: var(--pd-oe-muted); font-variant-numeric: tabular-nums; }
.pd-oe__options img, .pd-oe__thumb { width: 34px; height: 26px; border-radius: 5px; object-fit: cover; background: var(--pd-soft); }
.pd-oe__group { padding: 8px 8px 2px; color: var(--pd-oe-muted); font-size: 0.8125rem; font-weight: 600; }
.pd-oe__link { justify-self: start; color: var(--pd-oe-muted); font-size: 0.8125rem; }
.pd-oe__link:hover { color: var(--pd-ink); }

.pd-oe__sums { display: grid; gap: 4px; justify-self: end; width: min(100%, 26rem); font-variant-numeric: tabular-nums; font-size: 0.9375rem; }
.pd-oe__sums > div { display: flex; justify-content: space-between; gap: 16px; }
.pd-oe__sums .is-muted { color: var(--pd-oe-muted); font-size: 0.8125rem; }
.pd-oe__sums .is-good { color: var(--success-700); }
.pd-oe__sums .is-total { margin-top: 6px; padding-top: 8px; border-top: 1px solid var(--pd-ink); font-size: 1.25rem; font-weight: 700; }
.pd-oe__discount-row { display: grid !important; grid-template-columns: minmax(0, 1fr) 4.5rem 6rem; gap: 8px; align-items: center; color: var(--success-700); }
.pd-oe__discount-row span { text-align: right; }
.pd-oe__plan { display: grid; gap: 8px; }
.pd-oe__plan-head { display: flex; align-items: center; justify-content: space-between; color: var(--pd-oe-muted); font-size: 0.8125rem; font-weight: 600; }
.pd-oe__rates { display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 8px; }
.pd-oe__rates div { display: grid; gap: 1px; padding: 9px 11px; border: 1px solid var(--pd-line); border-radius: 9px; font-size: 0.8125rem; }
.pd-oe__rates strong { font-size: 0.9375rem; font-variant-numeric: tabular-nums; }
.pd-oe__rates small { color: var(--pd-oe-muted); }
.pd-oe__hint { margin: 0; color: var(--pd-oe-muted); font-size: 0.8125rem; }

.pd-oe__rail { position: sticky; top: var(--pd-sticky-top); display: grid; gap: 12px; }
.pd-oe__box { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); }
.pd-oe__box h3 { margin: 0; color: var(--pd-oe-muted); font-size: 0.9375rem; font-weight: 600; }
.pd-oe__box .fi-btn { width: 100%; }
.pd-oe__box select, .pd-oe__box input[type="date"] { padding: 5px 8px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.875rem; }
.pd-oe__chips { display: flex; flex-wrap: wrap; gap: 6px; }
.pd-oe__chips button { padding: 3px 10px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.8125rem; }
.pd-oe__chips button.is-on { border-color: var(--primary-500); background: color-mix(in oklab, var(--primary-500) 12%, transparent); }
.pd-oe__quote { margin: 0; padding-left: 10px; border-left: 3px solid var(--pd-line-strong); color: var(--pd-oe-muted); font-size: 0.8125rem; white-space: pre-line; }
.pd-oe__versions { display: grid; gap: 6px; margin: 0; padding: 0; list-style: none; font-size: 0.8125rem; }
.pd-oe__versions li { display: flex; justify-content: space-between; gap: 8px; }
.pd-oe__versions li.is-current a { font-weight: 700; }
.pd-oe__versions span { color: var(--pd-oe-muted); }

/* A narrow sheet: the name on its own row, the figures under it. */
@container (max-width: 34rem) {
    .pd-oe__row { grid-template-columns: 14px repeat(4, minmax(0, 1fr)) 26px; row-gap: 4px; }
    .pd-oe__row--head { display: none; }
    .pd-oe__row > .pd-oe__what { grid-column: 2 / 6; }
    .pd-oe__row > .pd-oe__more, .pd-oe__row > .fi-dropdown { grid-column: 6; grid-row: 1; }
    .pd-oe__row > .is-num { grid-row: 2; }
    .pd-oe__row > .is-num:nth-child(3) { grid-column: 2; }
    .pd-oe__row > .is-num:nth-child(4) { grid-column: 3; }
    .pd-oe__row > .is-num:nth-child(5) { grid-column: 4; }
    .pd-oe__row > .is-num:nth-child(6) { grid-column: 5; }
    .pd-oe__row.is-heading .pd-oe__heading { grid-column: 2 / 6; }
}

@media (max-width: 1100px) {
    .pd-oe__body { grid-template-columns: minmax(0, 1fr); }
    .pd-oe__rail { position: static; order: -1; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}
@media (max-width: 720px) {
    .pd-oe__canvas { padding: 0; background: none; }
    .pd-oe__sheet { padding: 20px 16px; box-shadow: none; border: 1px solid var(--pd-line); }
    .pd-oe__head { flex-direction: column; }
    .pd-oe__meta { text-align: left; }
}

.pd-oe__number { font-weight: 600; }
.pd-oe__version, .pd-oe__top > select { padding: 4px 8px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.8125rem; }
.pd-oe__tool { display: inline-flex; align-items: center; gap: 8px; color: var(--pd-oe-muted); font-size: 0.75rem; }
.pd-oe__tool input[type="date"] { padding: 3px 6px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.8125rem; color: var(--pd-ink); }
.pd-oe__send { margin-left: auto; }
.pd-oe__saved + .pd-oe__tool { margin-left: 0; }
.pd-oe__wish { padding: 8px 12px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); font-size: 0.8125rem; }
.pd-oe__wish summary { cursor: pointer; color: var(--pd-oe-muted); }
.pd-oe__wish summary span { color: var(--pd-ink); font-weight: 600; }
.pd-oe__wish[open] { display: grid; gap: 8px; }
/* How the client is taxed changed since the draft: a VAT number added, changed or no longer valid. */
.pd-oe__notice { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; padding: 8px 12px; border: 1px solid var(--pd-line); border-left: 3px solid var(--warning-500); border-radius: var(--pd-radius-sm); font-size: 0.8125rem; }
.pd-oe__notice button { font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.pd-oe__notice.is-quiet { border-left-color: var(--pd-line); color: var(--pd-oe-muted); }

/*
 * A job on its page: head with the phases, what is next, history and documents as tabs, and on
 * the side what only the studio sees.
 */
.pd-job { --pd-board-line: var(--pd-line); --pd-board-panel: var(--pd-panel); --stage: var(--gray-400); display: grid; gap: 14px; }
/* The head: one area in three columns, the job and its contact, the appointment, what it is worth */
.pd-job__head { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) auto; align-items: start; gap: 12px 32px; padding: 16px 20px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); }
.pd-job__col { display: grid; gap: 6px; align-content: start; min-width: 0; }
.pd-job__col h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.pd-job__big { padding-top: 6px; font-size: 1.125rem; font-weight: 600; line-height: 1.4; color: var(--pd-ink); }
.pd-job__lines { display: grid; gap: 2px; font-size: 0.875rem; line-height: 1.45; color: var(--gray-600); }
.dark .pd-job__lines { color: var(--gray-400); }
.pd-job__lines b { font-weight: 600; color: var(--pd-ink); }
.pd-job__lines a { text-decoration: underline; text-underline-offset: 2px; }
.pd-job__lines em { display: inline; margin: 0; font-style: normal; }
.pd-job__lines .is-warn { color: var(--warning-700); }
.pd-job__col--worth { justify-items: end; }
.pd-job__worth { display: grid; text-align: right; }
.pd-job__worth strong { font-size: 1.25rem; font-variant-numeric: tabular-nums; }
.pd-job__worth span { font-size: 0.75rem; color: var(--gray-500); }
/* All phases in one row, however many; narrower, a strip to swipe. */
.pd-job__closed { margin-top: 6px; font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__next { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 4px 14px; padding: 12px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); }
.pd-job__next.is-due { border-color: color-mix(in oklab, var(--warning-500) 60%, transparent); background: color-mix(in oklab, var(--warning-500) 9%, var(--pd-panel)); }
.pd-job__next-label { font-size: 0.8125rem; font-weight: 700; color: var(--gray-500); }
.pd-job__next-what { display: grid; min-width: 0; }
.pd-job__next-what strong { font-size: 0.9375rem; }
.pd-job__next-what span { font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__next-do { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.pd-job__next-plan { grid-column: 2 / -1; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-job__next-plan input { flex: 1; min-width: 12rem; padding: 5px 9px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.8125rem; }
.pd-job__next-plan button { padding: 4px 9px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.75rem; }
/* The steps after the booking: one line each, the day, what, and done or skip while open. */
.pd-job__steps { display: grid; gap: 8px; padding: 12px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); }
.pd-job__steps p { margin: 0; font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__steps ol { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.pd-job__steps li { display: grid; grid-template-columns: 7.5rem minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 5px 0; border-top: 1px solid var(--pd-line); font-size: 0.8125rem; }
.pd-job__steps li:first-child { border-top: 0; }
.pd-job__steps li.is-done, .pd-job__steps li.is-skipped { color: var(--gray-400); }
.pd-job__steps li.is-skipped .pd-job__step-what { text-decoration: line-through; }
.pd-job__steps li.is-due .pd-job__step-when { color: var(--warning-700); font-weight: 600; }
.dark .pd-job__steps li.is-due .pd-job__step-when { color: var(--warning-300); }
.pd-job__step-when { font-variant-numeric: tabular-nums; color: var(--gray-500); }
.pd-job__step-do { display: flex; gap: 6px; }
.pd-job__step-do button { padding: 2px 9px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.75rem; }
/* The workflow as one line in time: day, a dot on the line, what and where it stands. Booking, shoot
   and delivery are the big dots to find one's way by; today is blue. */
.pd-line { display: grid; gap: 8px; padding: 12px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); }
.pd-line__list { margin: 0; padding: 0; list-style: none; }
.pd-line__head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.pd-line__paused { margin: 0; padding: 8px 12px; border: 1px solid var(--warning-300); border-radius: var(--pd-radius-sm); background: color-mix(in oklab, var(--warning-500) 8%, transparent); font-size: 0.8125rem; color: var(--warning-800); }
.dark .pd-line__paused { color: var(--warning-200); border-color: var(--warning-700); }
.pd-line__row { display: grid; grid-template-columns: 4.25rem 20px minmax(0, 1fr); column-gap: 12px; font-size: 0.8125rem; }
.pd-line__date { padding-top: 8px; text-align: right; font-variant-numeric: tabular-nums; color: var(--gray-500); }
.pd-line__dot { position: relative; display: flex; justify-content: center; }
.pd-line__dot::before { content: ""; position: absolute; top: 0; bottom: 0; width: 2px; background: var(--pd-line); }
.pd-line__row:first-child .pd-line__dot::before { top: 12px; }
.pd-line__row:last-child .pd-line__dot::before { bottom: calc(100% - 12px); }
.pd-line__dot::after { content: ""; position: relative; box-sizing: border-box; width: 11px; height: 11px; margin-top: 11px; border: 2px solid var(--gray-400); border-radius: 999px; background: var(--pd-panel); }
.pd-line__body { display: grid; gap: 2px; justify-items: start; padding: 6px 0 10px; min-width: 0; }
.pd-line__body strong { font-weight: 500; }
.pd-line__facts { color: var(--gray-500); }
.pd-line__body .pd-job__step-do { margin-top: 4px; }
.pd-line__row.is-point .pd-line__dot::after, .pd-line__row.is-point.is-waiting .pd-line__dot::after { width: 15px; height: 15px; margin-top: 9px; }
.pd-line__row.is-point .pd-line__dot::after { border-color: var(--pd-ink); background: var(--pd-ink); }
.pd-line__row.is-point strong { font-weight: 600; }
.pd-line__row.is-point.is-waiting .pd-line__dot::after { border-style: dashed; border-color: var(--gray-500); background: var(--pd-panel); }
.pd-line__row.is-today .pd-line__dot::after { width: 15px; height: 15px; margin-top: 9px; border-color: var(--info-600); background: var(--info-600); }
.pd-line__row.is-today strong, .pd-line__row.is-today .pd-line__date { color: var(--info-600); font-weight: 600; }
.dark .pd-line__row.is-today strong, .dark .pd-line__row.is-today .pd-line__date { color: var(--info-400); }
.pd-line__row.is-done .pd-line__dot::after { border-color: var(--success-600); background: var(--success-600); }
.pd-line__row.is-skipped strong { font-weight: 400; color: var(--gray-500); text-decoration: line-through; }
.pd-line__row.is-skipped .pd-line__dot::after { border-color: var(--pd-line-strong); }
.pd-line__row.is-due .pd-line__dot::after { border-color: var(--warning-600); }
.pd-line__row.is-due .pd-line__date { color: var(--warning-700); font-weight: 600; }
.dark .pd-line__row.is-due .pd-line__date { color: var(--warning-300); }
.pd-line__row.is-waiting:not(.is-point) .pd-line__dot::after { border-style: dashed; }
.pd-line__log { margin-top: 2px; font-size: 0.75rem; color: var(--gray-500); }
.pd-line__log summary { cursor: pointer; width: max-content; }
.pd-line__log ul { margin: 4px 0 0; padding-left: 14px; }
/* The workflow of a kind, edited on the same line: a trial run above, each step opened in place. */
.pd-flow { display: grid; gap: 16px; }
.pd-flow__bar { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; }
.pd-flow__trial { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 0.8125rem; font-weight: 500; }
.pd-flow__do { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.pd-flow select, .pd-flow input { padding: 5px 9px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.8125rem; }
.pd-flow__head { display: flex; flex-wrap: wrap; gap: 8px 20px; align-items: end; justify-content: space-between; }
.pd-flow__name { display: grid; gap: 4px; width: min(100%, 24rem); font-size: 0.75rem; font-weight: 500; color: var(--gray-500); }
.pd-flow__name input { font-size: 0.875rem; color: var(--gray-950); }
.dark .pd-flow__name input { color: var(--gray-50); }
.pd-flow__kinds { margin: 0; font-size: 0.8125rem; color: var(--gray-500); }
.pd-flow__kinds a { text-decoration: underline; }
.pd-flow__version { font-size: 0.75rem; color: var(--gray-500); }
.pd-flow__adopt { display: grid; gap: 10px; padding: 12px 14px; border: 1px solid var(--pd-line-strong); border-radius: var(--pd-radius-sm); font-size: 0.8125rem; }
.pd-flow__adopt h3 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.pd-flow__adopt p { margin: 0; color: var(--gray-500); }
.pd-flow__adopt ul { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none; }
.pd-flow__adopt label { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-weight: 500; }
.pd-flow__adopt label span { color: var(--gray-500); font-weight: 400; font-size: 0.75rem; }
.pd-flow__adopt dl { display: grid; gap: 2px; margin: 4px 0 0 24px; }
.pd-flow__adopt dl div { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 10px; }
.pd-flow__adopt dt { color: var(--gray-500); font-size: 0.75rem; font-weight: 500; }
.pd-flow__adopt dd { margin: 0; }
.pd-flow__adopt-do { display: flex; flex-wrap: wrap; gap: 8px; }
@media (max-width: 640px) { .pd-flow__adopt dl div { grid-template-columns: 1fr; gap: 0; } }
.pd-flow__general { margin: 0; padding: 10px 14px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); font-size: 0.8125rem; list-style: none; }
.pd-flow__step { display: grid; gap: 2px; justify-items: start; text-align: left; }
.pd-flow__step:hover strong { text-decoration: underline; }
.pd-flow__issue { font-size: 0.75rem; color: var(--warning-700); }
.dark .pd-flow__issue { color: var(--warning-300); }
.pd-flow__issue.is-block, .pd-flow__general .is-block { color: var(--danger-600); font-weight: 500; }
.dark .pd-flow__issue.is-block, .dark .pd-flow__general .is-block { color: var(--danger-400); }
.pd-line__row.is-blocked .pd-line__dot::after { border-color: var(--danger-600); }
.pd-flow__edit { display: grid; gap: 10px; width: 100%; max-width: 44rem; margin-top: 8px; padding: 12px 14px; border: 1px solid var(--pd-line-strong); border-radius: var(--pd-radius-sm); }
.pd-flow__edit > label { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 10px; align-items: center; font-size: 0.8125rem; }
.pd-flow__edit > label > span:first-child { color: var(--gray-500); font-weight: 500; font-size: 0.75rem; }
.pd-flow__when-fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-flow__when-fields input { width: 4.5rem; }
.pd-flow__packages { display: flex; flex-wrap: wrap; gap: 6px 14px; margin: 0 0 0 calc(8rem + 10px); padding: 0; border: 0; font-size: 0.8125rem; }
.pd-flow__packages legend { display: none; }
.pd-flow__packages label { display: flex; gap: 6px; align-items: center; }
.pd-flow__links { display: flex; flex-wrap: wrap; gap: 14px; padding-left: calc(8rem + 10px); font-size: 0.8125rem; }
.pd-flow__remove { color: var(--danger-600); }
.pd-flow__add { display: flex; gap: 8px; padding-left: calc(4.25rem + 32px); }

/* Workflows in parts (booking, before the shoot, shoot, afterwards): a coloured band per part, a
   compact row per step with its labels; in the editor and at the job alike. */
/* The phases of a workflow on a line, one card each; not the phases bar of a project (.pd-phases). */
.pd-line__phases { display: grid; gap: 10px; }
.pd-flow__cols { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.pd-flow__main { flex: 999 1 440px; min-width: 0; display: grid; gap: 10px; }
.pd-flow__hint { margin: 0; font-size: 0.75rem; color: var(--gray-500); }
.pd-flow__side { flex: 1 1 300px; max-width: 360px; position: sticky; top: 76px; }
@media (max-width: 960px) { .pd-flow__side { max-width: none; position: static; } }
.pd-flow__panel { display: grid; gap: 12px; padding: 16px; border-radius: 14px; background: var(--pd-panel); box-shadow: 0 0 0 1px var(--pd-line); font-size: 0.8125rem; }
.pd-flow__panel h2 { margin: 0; font-size: 0.875rem; font-weight: 600; }
.pd-flow__panel p { margin: 0; color: var(--gray-500); }
.pd-flow__panel-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.pd-flow__add-list { display: grid; gap: 8px; }
.pd-flow__add-list div { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; align-items: center; gap: 6px; }
.pd-flow__add-list span { font-weight: 500; }
.pd-flow__add-list button { padding: 4px 10px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.75rem; }
.pd-flow__side .pd-flow__edit { max-width: none; margin: 0; padding: 0; border: 0; }
.pd-flow__side .pd-flow__edit > label { grid-template-columns: minmax(0, 1fr); gap: 4px; }
.pd-flow__side .pd-flow__packages, .pd-flow__side .pd-flow__links { margin-left: 0; padding-left: 0; }
.pd-flows { display: grid; gap: 18px; }
.pd-flows__empty { margin: 0; font-size: 0.875rem; color: var(--gray-500); }
.pd-flows__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin: 0; padding: 0; list-style: none; }
.pd-flows__card { display: grid; gap: 12px; padding: 18px; border-radius: 14px; background: var(--pd-panel); box-shadow: 0 0 0 1px var(--pd-line); }
.pd-flows__card:hover { box-shadow: 0 0 0 1px var(--pd-line-strong); }
.pd-flows__open { display: grid; gap: 12px; }
.pd-flows__head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pd-flows__head strong { font-size: 1rem; font-weight: 600; }
.pd-flows__head span { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; }
.pd-flows__bar { display: flex; gap: 2px; height: 8px; border-radius: 4px; overflow: hidden; background: var(--gray-100); }
.dark .pd-flows__bar { background: rgb(255 255 255 / 0.06); }
.pd-flows__bar .is-inquiry { background: #be185d; } .pd-flows__bar .is-booking { background: #6d28d9; } .pd-flows__bar .is-before { background: #b45309; } .pd-flows__bar .is-shoot { background: #0f766e; } .pd-flows__bar .is-after { background: #1d4ed8; }
.pd-flows__foot { display: flex; justify-content: space-between; gap: 8px; padding-top: 12px; border-top: 1px solid var(--pd-line); font-size: 0.8125rem; color: var(--gray-500); }
.pd-flows__foot strong { font-weight: 500; color: var(--pd-ink); white-space: nowrap; }
.pd-flows__do { display: flex; gap: 14px; font-size: 0.8125rem; }
.pd-flows__library { display: grid; gap: 10px; padding: 16px 18px; border-radius: 14px; background: var(--pd-panel); box-shadow: 0 0 0 1px var(--pd-line); }
.pd-flows__library h2 { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.pd-flows__library div { display: flex; flex-wrap: wrap; gap: 8px; }
.pd-flows__library button { padding: 7px 12px; border: 1px solid var(--pd-line-strong); border-radius: 10px; font-size: 0.8125rem; }
.pd-flows__library button:hover { background: var(--gray-50); }
.dark .pd-flows__library button:hover { background: rgb(255 255 255 / 0.05); }
.pd-line--phases { padding: 0; border: 0; background: none; gap: 10px; }
.pd-phase { display: flex; border-radius: 14px; background: var(--pd-panel); box-shadow: 0 0 0 1px var(--pd-line); overflow: hidden; }
.pd-phase__band { flex: none; width: 28px; display: flex; align-items: center; justify-content: center; background: var(--pd-phase); }
/* The label keeps its length (flex: none): a phase with few rows grows to fit it instead of cutting it off. */
.pd-phase__band span { flex: none; padding: 10px 0; writing-mode: vertical-rl; transform: rotate(180deg); font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: #fff; white-space: nowrap; }
.pd-phase.is-inquiry, .pd-phase-legend .is-inquiry { --pd-phase: #be185d; }
.pd-phase.is-booking, .pd-phase-legend .is-booking { --pd-phase: #6d28d9; }
.pd-phase.is-before, .pd-phase-legend .is-before { --pd-phase: #b45309; }
.pd-phase.is-shoot, .pd-phase-legend .is-shoot { --pd-phase: #0f766e; }
.pd-phase.is-after, .pd-phase-legend .is-after { --pd-phase: #1d4ed8; }
.pd-phase__rows { flex: 1; min-width: 0; margin: 0; padding: 4px 0; list-style: none; }
.pd-step { display: flex; align-items: center; gap: 12px; padding: 9px 14px; border-bottom: 1px solid var(--pd-line); }
.pd-step:last-child { border-bottom: 0; }
.pd-step__check { flex: none; width: 18px; height: 18px; accent-color: var(--pd-ink); }
.pd-step__icon { flex: none; display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 8px; background: var(--gray-100); color: var(--gray-700); }
.pd-step__icon.is-mail { background: #eff6ff; color: #1d4ed8; }
.dark .pd-step__icon { background: rgb(255 255 255 / 0.06); color: var(--gray-300); }
.dark .pd-step__icon.is-mail { background: rgb(59 130 246 / 0.16); color: #93c5fd; }
.pd-step__icon svg { width: 16px; height: 16px; }
.pd-step__main { flex: 1; min-width: 0; display: grid; gap: 4px; justify-items: start; text-align: left; }
.pd-step__name { font-size: 0.875rem; font-weight: 500; }
.pd-step__date { flex: none; font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-step__do { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.pd-step__do > button, .pd-step__do .fi-link, .pd-step__do .fi-btn { font-size: 0.75rem; }
.pd-step__do > button { padding: 5px 9px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); }
.pd-step__do > .pd-step__icon-button { display: flex; align-items: center; justify-content: center; width: 30px; height: 30px; padding: 0; color: var(--gray-500); }
.pd-step__do > .pd-step__icon-button svg { width: 14px; height: 14px; }
.pd-step__do > button:hover { background: var(--gray-50); }
.dark .pd-step__do > button:hover { background: rgb(255 255 255 / 0.05); }
.pd-step.is-done .pd-step__name, .pd-step.is-skipped .pd-step__name { color: var(--gray-500); }
.pd-step.is-skipped .pd-step__name { text-decoration: line-through; }
.pd-step.is-point { padding-top: 6px; padding-bottom: 6px; }
.pd-step.is-point .pd-step__name { font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.pd-step.is-point::before { content: ""; flex: none; width: 10px; height: 10px; margin: 0 7px 0 4px; border-radius: 50%; background: var(--pd-phase); }
.pd-step.is-point.is-waiting::before { background: transparent; border: 2px dashed var(--gray-400); }
.pd-step.is-today { gap: 10px; padding-top: 6px; padding-bottom: 6px; background: var(--gray-50); }
.dark .pd-step.is-today { background: rgb(255 255 255 / 0.03); }
.pd-step.is-today strong { padding: 3px 8px; border-radius: 6px; background: var(--pd-ink); color: var(--pd-panel); font-size: 0.6875rem; white-space: nowrap; }
.pd-step.is-today::after { content: ""; flex: 1; height: 2px; background: var(--pd-ink); }
.pd-step.is-selected { background: var(--gray-50); box-shadow: inset 3px 0 0 var(--pd-ink); }
.dark .pd-step.is-selected { background: rgb(255 255 255 / 0.04); }
.pd-step.is-blocked .pd-step__name { color: var(--danger-600); }
button.pd-step__main:hover .pd-step__name { text-decoration: underline; }
.pd-chips { display: flex; flex-wrap: wrap; gap: 5px; }
.pd-chip { padding: 2px 8px; border-radius: 6px; background: var(--gray-100); color: var(--gray-700); font-size: 0.71875rem; line-height: 1.5; }
.pd-chip.is-auto { background: #fff7ed; color: #9a3412; font-weight: 500; }
.pd-chip.is-late { background: #fef2f2; color: #b91c1c; font-weight: 500; }
.pd-chip.is-cond { background: #ecfeff; color: #155e75; }
.pd-chip.is-fixed { background: var(--gray-200); color: var(--gray-700); font-weight: 500; }
.dark .pd-chip.is-fixed { background: rgb(255 255 255 / 0.12); color: var(--gray-200); }
.pd-step.is-fixed { background: var(--gray-50); }
.dark .pd-step.is-fixed { background: rgb(255 255 255 / 0.03); }
.pd-step.is-fixed .pd-step__name { color: var(--gray-600); }
.dark .pd-step.is-fixed .pd-step__name { color: var(--gray-400); }
.pd-step__icon.is-fixed { color: var(--gray-500); }
.pd-step__end { display: flex; gap: 8px; align-items: flex-start; padding: 10px 14px; background: #fdf2f8; color: #9d174d; font-size: 0.8125rem; }
.dark .pd-step__end { background: rgb(190 24 93 / 0.14); color: #f9a8d4; }
.pd-chip.is-both { background: #f5f3ff; color: #5b21b6; }
.dark .pd-chip { background: rgb(255 255 255 / 0.07); color: var(--gray-300); }
.dark .pd-chip.is-auto { background: rgb(234 88 12 / 0.18); color: #fdba74; }
.dark .pd-chip.is-late { background: rgb(220 38 38 / 0.2); color: #fca5a5; }
.dark .pd-chip.is-cond { background: rgb(6 182 212 / 0.16); color: #67e8f9; }
.dark .pd-chip.is-both { background: rgb(139 92 246 / 0.2); color: #c4b5fd; }
.pd-phase__add { display: flex; gap: 14px; padding: 6px 14px 8px 54px; font-size: 0.8125rem; }
.pd-phase__add button { color: var(--gray-500); }
.pd-phase__add button:hover { color: var(--pd-ink); }
.pd-phase-legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 0.75rem; color: var(--gray-500); }
.pd-phase-legend span { display: inline-flex; align-items: center; gap: 6px; }
.pd-phase-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--pd-phase); }
.pd-progress { height: 6px; border-radius: 3px; background: var(--gray-200); overflow: hidden; }
.dark .pd-progress { background: rgb(255 255 255 / 0.1); }
.pd-progress span { display: block; height: 100%; background: var(--pd-ink); }
.pd-step__log { width: 100%; font-size: 0.75rem; color: var(--gray-500); }
.pd-step__log summary { cursor: pointer; }
.pd-step__log ul { margin: 4px 0 0; padding-left: 16px; }
@media (max-width: 640px) {
    .pd-step { flex-wrap: wrap; }
    .pd-step__do { width: 100%; justify-content: flex-start; padding-left: 40px; }
}
.pd-flow__add button { padding: 4px 12px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.8125rem; }
@media (max-width: 640px) { .pd-flow__edit > label { grid-template-columns: minmax(0, 1fr); gap: 4px; } .pd-flow__links, .pd-flow__add { padding-left: 0; } }
.pd-job__answers dl { display: grid; gap: 6px; margin: 0; }
.pd-job__answers dl div { display: grid; grid-template-columns: minmax(8rem, 14rem) minmax(0, 1fr); gap: 12px; font-size: 0.8125rem; }
.pd-job__answers dt { color: var(--gray-500); }
.pd-job__answers dd { margin: 0; white-space: pre-line; }
@media (max-width: 640px) { .pd-job__answers dl div { grid-template-columns: minmax(0, 1fr); gap: 0; } }
.pd-today__steps { margin-bottom: 16px; }
.pd-today__steps .pd-today__item { grid-template-columns: auto minmax(0, 1fr) auto; }
.pd-today__planned .pd-today__item.is-in-group { margin-left: 24px; }
.pd-today__planned .pd-today__group { background: color-mix(in oklab, var(--gray-500) 4%, transparent); }
@media (max-width: 640px) { .pd-job__steps li { grid-template-columns: minmax(0, 1fr) auto; } .pd-job__step-when { grid-column: 1 / -1; } }
.pd-job__body { display: grid; grid-template-columns: minmax(0, 1fr) 20rem; gap: 16px; align-items: start; }
.pd-job__main { min-width: 0; display: grid; gap: 16px; }
.pd-job__story { padding: 0; overflow: visible; background: none; }
.pd-job__docs { display: grid; gap: 8px; margin: 0; padding: 4px 0 0; list-style: none; }
.pd-job__docs a, .pd-job__doc { display: grid; grid-template-columns: 22px minmax(0, 1fr) auto auto; gap: 12px; align-items: center; padding: 10px 12px; border: 1px solid var(--pd-line); border-radius: 10px; }
.pd-job__docs a:hover { border-color: var(--pd-line-strong); background: color-mix(in oklab, var(--gray-500) 4%, transparent); }
.pd-job__docs svg { width: 20px; height: 20px; color: var(--gray-500); }
/* An order's invoice, under the order it belongs to. */
.pd-job__docs li.is-sub { margin: -4px 0 0 34px; }
.pd-job__docs li.is-sub a { padding-block: 7px; }
/* A project's documents: links to the jobs and orders they live in. */
.pd-project-docs { max-width: none; padding-top: 8px; }
.pd-project-docs__head { margin: 0 0 4px; font-size: 13px; font-weight: 600; color: var(--gray-600); }
.pd-project-docs__note { margin: 10px 0 0; font-size: 13px; color: var(--gray-500); }
.pd-job__doc-name { display: grid; }
.pd-job__doc-name small { color: var(--gray-500); font-size: 0.75rem; }
.pd-job__doc-sum { font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-job__empty { display: grid; justify-items: start; gap: 10px; padding: 18px; border: 1px dashed var(--pd-line-strong); border-radius: 10px; color: var(--gray-600); font-size: 0.875rem; }
.pd-job__later { color: var(--gray-400); font-size: 0.75rem; }
.pd-job__side { position: sticky; top: var(--pd-sticky-top); display: grid; gap: 16px; }
.pd-job__side .pd-board__facts { padding: 0; border: 0; background: none; }
.pd-job__crumb h1 { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.01em; }
.pd-job--offer .pd-oe__canvas { padding: 0; background: none; }
@media (max-width: 1023px) {
    .pd-job__body { grid-template-columns: minmax(0, 1fr); }
    .pd-job__side { position: static; }
    .pd-job__next { grid-template-columns: minmax(0, 1fr); }
    .pd-job__next-plan { grid-column: 1; }
}

/* A phone: the name the whole width, what it is worth under it. */
@media (max-width: 640px) {
    .pd-job__head { grid-template-columns: minmax(0, 1fr); padding: 14px 16px; }
    .pd-job__col h1 { font-size: 1.25rem; }
    .pd-job__col--worth { justify-items: start; }
    .pd-job__worth { display: flex; gap: 6px; align-items: baseline; text-align: left; }
}

/* Today: what is due, in three lists side by side, each line leading to its job. */
.pd-today { --pd-board-line: var(--pd-line); --pd-board-panel: var(--pd-panel); --stage: var(--gray-400); display: grid; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); gap: 16px; align-items: start; }
.pd-today__list { display: grid; gap: 8px; padding: 14px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-today__list h2 { display: flex; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 700; color: var(--pd-ink); }
.pd-today__list h2 em { padding: 1px 7px; border-radius: 6px; background: var(--pd-soft); font-style: normal; color: var(--pd-ink); }
.pd-today__item { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 12px; align-items: center; padding: 8px; border-radius: 10px; }
.pd-today__item:hover { background: color-mix(in oklab, var(--gray-500) 6%, transparent); }
.pd-today__what { display: grid; justify-items: start; gap: 2px; min-width: 0; }
.pd-today__what .pd-board__stage { margin-top: 2px; }
/* The line under the name says what is due and until when: whole, never cut off. */
.pd-today__what span:not(.pd-board__stage) { color: var(--gray-500); font-size: 0.8125rem; line-height: 1.4; }
.pd-today__empty { padding: 8px; color: var(--gray-500); font-size: 0.875rem; }
.pd-today__gaps { margin-bottom: 16px; }
.pd-today__gaps a { margin-left: 8px; text-decoration: underline; }

/* A project's tabs in two groups: what only the studio and its reviewers see, and what clients see. */
.pd-project-tabs__group { display: inline-flex; align-items: center; gap: 0.25rem; padding-inline: 0.25rem 0.125rem; font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); white-space: nowrap; }
.pd-project-tabs__group-icon { width: 0.875rem; height: 0.875rem; }

/* Rates of a payment plan: the table is tight, so its number fields show their digits, not spinners. */

.pd-rates input[type="number"] {
    appearance: textfield;
    -moz-appearance: textfield;
}

.pd-rates input[type="number"]::-webkit-inner-spin-button,
.pd-rates input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

/* The job as a file: "next up" hangs under the phases; the workflow folds; the file is one list; the facts beside are wider. */
.pd-job .pd-phases:has(+ .pd-job__flow.is-attached) { margin-bottom: 0; border-bottom-left-radius: 0; border-bottom-right-radius: 0; }
/* What is next and the workflow in one box, hung under the phases */
.pd-job__flow { border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); overflow: hidden; }
.pd-job__flow.is-attached { border-top: 0; border-top-left-radius: 0; border-top-right-radius: 0; }
.pd-job__flow > .pd-job__next { border: 0; border-radius: 0; }
.pd-job__flow > .pd-job__next.is-due { background: color-mix(in oklab, var(--warning-500) 9%, var(--pd-panel)); }
.pd-job__flow-head { display: flex; flex-wrap: wrap; gap: 8px 12px; align-items: center; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--pd-line); font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__flow > .pd-job__flow-head:first-child { border-top: 0; }
.pd-job__flow-head p { margin: 0; }
.pd-job__flow-toggle { display: flex; gap: 10px; align-items: center; padding: 4px 0; font-size: 0.8125rem; color: var(--gray-500); text-align: left; }
.pd-job__flow-toggle::before { content: "▸"; font-size: 0.75rem; }
.pd-job__flow-toggle[aria-expanded="true"]::before { content: "▾"; }
.pd-job__flow-body { padding: 12px 16px; border-top: 1px solid var(--pd-line); }
.pd-job__flow-body[x-cloak] { display: none !important; }
/* The facts on the left, the file on the right, about half and half; contact, appointment and delivery share one row. */
/* The file on the left, narrower; the facts of today on the right */
.pd-job__body { grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); }
.pd-job__file { order: -1; }
.pd-job__facts, .pd-job__file { min-width: 0; display: grid; gap: 16px; align-content: start; }
.pd-job__facts .pd-board__facts { padding: 0; border: 0; background: none; }
/* The contact and the appointment across the head, plain to see: a label, the name or the day large, the rest under it. */

.pd-job__sub a.pd-job__h-note { margin-left: auto; font-weight: 500; text-decoration: underline; text-underline-offset: 2px; }
.pd-file h2 { gap: 8px 16px; }
.pd-file__parts { display: flex; flex-wrap: wrap; gap: 4px; margin-left: auto; }
.pd-file__parts button { padding: 3px 10px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.75rem; font-weight: 500; color: var(--gray-500); }
.pd-file__parts button[aria-pressed="true"] { color: var(--pd-panel); background: var(--pd-ink); border-color: var(--pd-ink); }
.pd-file__parts button { transition: transform 260ms cubic-bezier(0.2, 0.7, 0.2, 1); }
.pd-file__parts button:active { transform: scale(0.94); transition-duration: 0s; }
/* While the chosen part loads, the list of before steps back. */
.pd-file__story { display: grid; gap: 10px; min-width: 0; transition: opacity 120ms; }
.pd-file__story.is-stale { opacity: 0.45; }
.pd-file__list { display: grid; margin: 0; padding: 0; list-style: none; }
.pd-file__line { display: grid; grid-template-columns: 3.5rem 28px minmax(0, 1fr) auto; gap: 12px; align-items: start; padding: 8px 0; border-top: 1px solid var(--pd-line); }
.pd-file__line:first-child { border-top: 0; }
.pd-file__day { display: grid; gap: 1px; padding-top: 6px; font-size: 0.75rem; line-height: 1.3; font-variant-numeric: tabular-nums; color: var(--gray-500); white-space: nowrap; }
.pd-file__day span { font-weight: 600; color: var(--gray-700); }
.pd-file__day small { font-size: 0.6875rem; color: var(--gray-400); }
.dark .pd-file__day span { color: var(--gray-300); }
.pd-file__right { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; padding-top: 4px; }
.pd-file__sum { font-size: 0.875rem; font-variant-numeric: tabular-nums; white-space: nowrap; }
.pd-file__sum.is-minus { color: var(--danger-600); }
.pd-file__lines { margin-top: 4px; font-size: 0.8125rem; }
.pd-file__lines > summary { cursor: pointer; color: var(--gray-500); width: max-content; }
.pd-file__lines .pd-job__lines { margin-top: 6px; max-width: 28rem; }
/* A line of the file opened beside it: marked in the file, shown on the right in place of the facts */
.pd-case__open { margin: 0; padding: 0; border: 0; background: none; font: inherit; font-weight: 600; color: var(--gray-950); text-align: left; cursor: pointer; }
.pd-case__open:hover { text-decoration: underline; }
/* The way to the line's own page, shown as the line is hovered */
.pd-case__jump { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; color: var(--gray-500); opacity: 0; transition: opacity 0.15s; }
.pd-file__line:hover .pd-case__jump, .pd-case__jump:focus-visible { opacity: 1; }
.pd-case__jump:hover { background: var(--pd-soft); color: var(--pd-ink); }
.pd-case__jump svg { width: 14px; height: 14px; }
.pd-file__line.is-open { margin: 2px -10px; padding: 10px 10px; border-radius: 8px; background: color-mix(in oklab, var(--pd-ink) 6%, transparent); border-top-color: transparent; }
.pd-file__line.is-open + .pd-file__line { border-top-color: transparent; }
.pd-file__line.is-open + .pd-file__line.is-open { margin-top: 4px; }
.pd-job__detail { display: grid; gap: 12px; align-content: start; }
.pd-job__detail-head { display: flex; gap: 10px; align-items: center; }
.pd-job__detail-head h2 { flex: 1; min-width: 0; margin: 0; font-size: 1rem; font-weight: 600; overflow-wrap: anywhere; }
.pd-job__detail-icon { flex: none; width: 18px; height: 18px; color: var(--gray-500); }
.pd-job__detail-close { flex: none; display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; color: var(--gray-500); }
.pd-job__detail-close:hover { background: var(--pd-soft); color: var(--pd-ink); }
.pd-job__detail-close svg { width: 16px; height: 16px; }
.pd-job__detail-meta { margin: 0; font-size: 0.8125rem; line-height: 1.6; color: var(--gray-500); }
.pd-job__detail-meta .pd-oe__status { vertical-align: 1px; }
.pd-job__detail-amount { margin: 0; font-size: 1.5rem; font-weight: 600; font-variant-numeric: tabular-nums; }
.pd-job__detail-text { padding: 10px 14px; border-radius: 10px; background: color-mix(in oklab, var(--gray-500) 7%, transparent); font-size: 0.875rem; line-height: 1.55; white-space: pre-line; overflow-wrap: anywhere; }
.pd-job__detail-text.is-note { background: color-mix(in oklab, var(--warning-500) 10%, transparent); }
.pd-job__detail-quote > summary { cursor: pointer; font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__detail-quote > .pd-job__detail-text { margin-top: 6px; color: var(--gray-500); }
.pd-job__detail-log { margin: 0; padding-left: 18px; font-size: 0.8125rem; line-height: 1.6; color: var(--gray-500); }
.pd-job__detail-do { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.pd-job__detail-body { display: grid; gap: 12px; }
.pd-job__detail-tabs { display: flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--pd-soft); }
.pd-job__detail-tabs button { padding: 3px 11px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.pd-job__detail-tabs button[aria-selected="true"] { background: var(--pd-panel); color: var(--pd-ink); box-shadow: 0 0 0 1px var(--pd-line); }
.pd-job__detail-paper { padding: 12px; border-radius: 10px; background: var(--pd-soft); }
.pd-job__detail-pdf { display: block; width: 100%; height: calc(100dvh - 14rem); min-height: 36rem; border: 0; border-radius: 6px; background: #f4f3f1; }
.pd-job__detail-pdf-link { font-size: 0.8125rem; color: var(--gray-500); text-decoration: underline; text-underline-offset: 2px; }
.pd-job__detail [x-cloak] { display: none !important; }
.pd-job__panel > h2 .pd-job__detail-tabs { margin-left: auto; }
.pd-job__panel [x-cloak] { display: none !important; }
.pd-job__detail-message { display: flex; gap: 12px; align-items: flex-start; }
.pd-job__detail-message .pd-job__detail-text { flex: 1; min-width: 0; }
.pd-job__detail-photo { flex: none; width: 72px; height: 54px; object-fit: cover; border-radius: 6px; background: var(--pd-soft); }
.pd-job__detail-reply { display: grid; gap: 6px; padding-top: 10px; border-top: 1px solid var(--pd-line); }
.pd-job__detail-reply textarea { width: 100%; padding: 8px 10px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font-size: 0.875rem; }
.pd-job__detail-reply textarea:focus { outline: none; border-color: var(--pd-ink); }
.pd-case__moment[data-kind^="message_"] .pd-case__moment-icon { color: var(--primary-600); border-color: color-mix(in oklab, var(--primary-500) 40%, transparent); }
.pd-job__lines .is-heading dt { font-weight: 600; color: var(--gray-500); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.04em; }
.pd-job__lines .is-addition dt small { color: var(--primary-700); }
.pd-job__lines .is-discount dd { color: var(--gray-500); }
.pd-file__empty { padding: 12px 0; font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__sub { margin-top: 6px; font-size: 0.8125rem; font-weight: 700; color: var(--gray-500); display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pd-job__plan { display: grid; font-size: 0.875rem; }
.pd-job__plan-rate { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 2px 10px; align-items: center; padding: 7px 0; border-top: 1px solid var(--pd-line); font-variant-numeric: tabular-nums; }
.pd-job__plan-rate:first-child { border-top: 0; }
.pd-job__plan-rate > small { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 4px 6px; align-items: center; font-size: 0.75rem; color: var(--gray-500); }
.pd-job__plan-rate > small a { text-decoration: underline; text-underline-offset: 2px; }
.pd-job__plan-rate.is-late > small { color: var(--danger-600); }
@media (max-width: 1100px) { .pd-job__body { grid-template-columns: minmax(0, 1fr); } }

/* The job page: the head with where it stands, then panels one under the other; the facts beside. */
.pd-job__status { padding: 2px 9px; border-radius: 999px; background: var(--pd-soft); font-size: 0.75rem; font-weight: 600; color: var(--gray-600); }
.dark .pd-job__status { color: var(--gray-300); }
.pd-job__status[data-tone="danger"] { background: color-mix(in srgb, var(--danger-500) 12%, transparent); color: var(--danger-700); }
.dark .pd-job__status[data-tone="danger"] { color: var(--danger-300); }
.pd-job__panel { container: job-panel / inline-size; display: grid; gap: 10px; min-width: 0; padding: 14px 16px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-job__panel h2 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 0.9375rem; font-weight: 700; color: var(--pd-ink); }
.pd-job__panel h2 a { margin-left: auto; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0; text-transform: none; color: var(--pd-ink); text-decoration: underline; text-underline-offset: 2px; }
.pd-job__panel h2 .pd-oe__status { letter-spacing: 0; text-transform: none; }
.pd-job__h-note { font-weight: 500; letter-spacing: 0; text-transform: none; font-variant-numeric: tabular-nums; }
.pd-job__panel h2 .pd-job__h-do { margin-left: auto; letter-spacing: 0; text-transform: none; }
.pd-job__lines { display: grid; gap: 4px; margin: 0; font-size: 0.875rem; }
.pd-job__lines div { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
.pd-job__lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.pd-job__lines dt small { display: block; font-size: 0.75rem; color: var(--gray-500); }
.pd-job__lines .is-total { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--pd-line); font-weight: 600; }
.pd-job__lines .is-sub { margin-top: 4px; padding-top: 6px; border-top: 1px solid var(--pd-line); color: var(--gray-500); }
.pd-job__note { margin: 0; font-size: 0.8125rem; color: var(--gray-500); }
.pd-job__bar { height: 6px; overflow: hidden; border-radius: 3px; background: var(--pd-soft); }
.pd-job__bar i { display: block; height: 100%; border-radius: 3px; background: var(--success-600); }
.pd-job__rates { display: grid; font-size: 0.875rem; }
.pd-job__rates > div { display: grid; grid-template-columns: minmax(0, 1fr) 8.5rem 8.5rem 6rem 6.5rem; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--pd-line); font-variant-numeric: tabular-nums; }
.pd-job__rates > div:first-child { border-top: 0; }
.pd-job__rates a { text-decoration: underline; text-underline-offset: 2px; }
.pd-job__rates small { color: var(--gray-500); font-size: 0.75rem; }
.pd-job__rate-name { display: grid; }
/* The job's name in the head: a button that looks like the heading, a pen on hover; typed over in place. */
.pd-job__name { display: inline-flex; align-items: center; gap: 8px; margin: 0; padding: 0; border: 0; background: none; font: inherit; color: inherit; text-align: left; cursor: text; }
.pd-job__name-pen { width: 16px; height: 16px; color: var(--gray-400); opacity: 0; transition: opacity 0.15s; }
.pd-job__name:hover .pd-job__name-pen, .pd-job__name:focus-visible .pd-job__name-pen { opacity: 1; }
.pd-job__name-input { min-width: 12rem; width: min(32rem, 100%); margin: -3px 0; padding: 2px 6px; border: 1px solid var(--pd-line-strong); border-radius: 8px; background: var(--pd-panel); font: inherit; color: inherit; }
.pd-job__name-input:focus { outline: none; border-color: var(--pd-ink); }
.pd-job__name-input[x-cloak] { display: none !important; }
.pd-job__rate-doc { display: grid; justify-items: start; gap: 2px; }
.pd-job__h-do { display: inline-flex; gap: 6px; align-items: center; }
.pd-job__rates .is-late > span:nth-child(2) { color: var(--danger-600); font-weight: 600; }
.pd-job__num { text-align: right; white-space: nowrap; }
.pd-job__more { display: flex; gap: 8px; align-items: flex-start; }
.pd-job__more .fi-btn { white-space: nowrap; }
@container job-panel (max-width: 620px) {
    .pd-job__rates > div { grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; }
    .pd-job__rates > div > :nth-child(2), .pd-job__rates > div > :nth-child(3) { grid-column: 1; }
    .pd-job__rates > div > :nth-child(4) { grid-column: 2; grid-row: 2; justify-self: end; }
    .pd-job__rates > div > .pd-job__num { grid-column: 2; grid-row: 1; }
}

/* Package prices by season and weekday, worked out under the price field */
.pd-season-prices {
    display: grid;
    gap: 0.5rem;
}

.pd-season-prices__scroll {
    overflow-x: auto;
}

.pd-season-prices__table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    font-variant-numeric: tabular-nums;
}

.pd-season-prices__table th,
.pd-season-prices__table td {
    padding: 0.4rem 0.6rem;
    border-bottom: 1px solid var(--pd-line);
    text-align: right;
    white-space: nowrap;
}

.pd-season-prices__table thead th {
    color: var(--gray-500);
    font-weight: 500;
    font-size: 0.75rem;
}

.pd-season-prices__table tbody th {
    text-align: left;
    font-weight: 600;
}

.pd-season-prices__note {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

/* The look's second preview: the booking page under the gallery, with a line that says so. */
.pd-look-preview__scene--booking { margin-top: 28px; }
.pd-look-preview__caption { margin: 10px 0 0; color: var(--gray-500); font-size: 0.8125rem; text-align: center; }
.pd-look-preview__caption a { color: inherit; }

/* Many samples above the paper: they wrap from the left instead of running into the settings. */
.pd-letterhead-preview .pd-mail-preview__devices {
    flex-wrap: wrap;
    justify-content: flex-start;
}

/* All templates at a glance: groups side by side on wide screens, a row per template. */
.pd-templates__intro {
    max-width: 48rem;
    color: var(--gray-500);
    font-size: 0.875rem;
    line-height: 1.5;
}

.pd-templates__groups {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(22rem, 1fr));
    gap: 2rem 2.5rem;
    margin-top: 1.5rem;
}

.pd-templates__heading {
    color: var(--pd-ink);
    font-size: 0.9375rem;
    font-weight: 600;
}

.pd-templates__list {
    margin-top: 0.5rem;
    border-top: 1px solid var(--pd-line);
}

.pd-templates__item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0;
    border-bottom: 1px solid var(--pd-line);
    color: var(--pd-ink);
    font-size: 0.875rem;
}

.pd-templates__item:hover .pd-templates__name {
    text-decoration: underline;
}

.pd-templates__name {
    flex: 1;
    min-width: 0;
}

.pd-templates__note {
    color: var(--gray-500);
    font-size: 0.75rem;
}

.pd-templates__state {
    flex-shrink: 0;
    padding: 0.125rem 0.5rem;
    border-radius: 999px;
    background: var(--pd-soft);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
}

.pd-templates__state--own {
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

/*
 * A record's page without tabs: the record on a card at the left, everything of its in boxes
 * beside it, each box a heading with its own button to add (the contact's page).
 */
.pd-profile > .fi-grid-col > .fi-sc-group,
.pd-profile .fi-sc-group {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.pd-profile-card {
    padding: 1.25rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
}

.pd-profile-card__head {
    display: flex;
    gap: 0.875rem;
    align-items: center;
}

.pd-profile-card__avatar {
    display: inline-flex;
    flex: none;
    width: 3.25rem;
    height: 3.25rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--pd-soft);
    color: var(--gray-600);
    font-weight: 600;
}

.pd-profile-card__name {
    font-size: 1.125rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

.pd-profile-card__facts {
    display: grid;
    gap: 0.5rem;
    margin-top: 1.25rem;
    font-size: 0.875rem;
}

.pd-profile-card__facts > div {
    display: grid;
    grid-template-columns: 8.5rem minmax(0, 1fr);
    gap: 0.75rem;
}

.pd-profile-card__facts dt {
    color: var(--gray-500);
}

.pd-profile-card__facts dd {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pd-profile-card__facts a:hover {
    text-decoration: underline;
}

.pd-profile-card__tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem;
}

.pd-profile-card__tag {
    display: inline-flex;
    gap: 0.375rem;
    align-items: center;
    padding: 0 0.5rem;
    border-radius: 999px;
    background: color-mix(in oklab, var(--tag) 14%, transparent);
    color: color-mix(in oklab, var(--tag) 75%, var(--pd-ink));
    font-size: 0.75rem;
    font-weight: 600;
}

.pd-profile-card__tag::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--tag);
}

.pd-profile-card__none {
    color: var(--gray-500);
}

.pd-profile-card__notes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--pd-line);
    color: var(--gray-600);
    font-size: 0.875rem;
    white-space: pre-line;
}

.dark .pd-profile-card__notes {
    color: var(--gray-300);
}

.pd-profile-card__actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.25rem;
}

/* A box: its heading in plain words, a little larger; the button to add at its end. */
.pd-profile .fi-ta-header-heading {
    font-size: 1rem;
    font-weight: 600;
}

/* In a box only the list: no search, filters or choosing rows; the pages only where there are several. */
.pd-profile .fi-ta-header-toolbar,
.pd-profile .fi-ta-selection-cell,
.pd-profile .fi-ta-selection-indicator,
.pd-profile .fi-pagination-records-per-page-select-ctn,
.pd-profile .fi-pagination-overview {
    display: none;
}

.pd-profile .fi-ta-ctn > .fi-pagination:not(:has(.fi-pagination-items)),
.pd-profile .fi-ta-ctn > .fi-ta-content-ctn + .fi-pagination:not(:has(.fi-pagination-items)) {
    display: none;
}

/* An empty box is its heading and one quiet line, not a picture. */
.pd-profile .fi-ta-ctn:has(.fi-ta-empty-state) .fi-ta-table > thead,
.pd-profile .fi-ta-empty-state-icon-bg {
    display: none;
}

.pd-profile .fi-ta-empty-state {
    padding: 0.75rem 1.5rem 1rem;
}

.pd-profile .fi-ta-empty-state-content {
    align-items: flex-start;
    text-align: start;
    max-width: none;
    margin: 0;
}

.pd-profile .fi-ta-empty-state-heading {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--gray-500);
}

.pd-profile .fi-ta-empty-state-description {
    margin-top: 0.125rem;
    font-size: 0.8125rem;
}

/* Long words about a box wrap below its heading, the buttons keep to the end. */
.pd-profile .fi-ta-header {
    flex-wrap: wrap;
}

.pd-profile .fi-ta-header > div:first-child {
    flex: 1 1 auto;
    min-width: min(14rem, 100%);
}

/* A project's boxes beside its cards: the Light Table with its newest files, the galleries, the documents. */
.pd-boxes {
    display: grid;
    gap: 1rem;
    align-content: start;
}

.pd-box {
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    background: var(--pd-panel);
    box-shadow: var(--pd-shadow);
    overflow: hidden;
}

.pd-box__head {
    display: flex;
    gap: 0.625rem;
    align-items: center;
    padding: 1rem 1.25rem;
}

.pd-box__head h2 {
    font-size: 1rem;
    font-weight: 600;
}

.pd-box__icon {
    width: 1.25rem;
    height: 1.25rem;
    color: var(--gray-500);
}

.pd-box__meta {
    flex: 1;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-box__empty {
    padding: 0 1.25rem 1rem;
    color: var(--gray-500);
    font-size: 0.875rem;
}

.pd-box__strip {
    display: flex;
    gap: 0.375rem;
    padding: 0 1.25rem 1.25rem;
    overflow: hidden;
}

.pd-box__strip img {
    flex: none;
    width: 5.5rem;
    height: 3.75rem;
    border-radius: 6px;
    object-fit: cover;
    background: var(--pd-soft);
}

.pd-box__item,
.pd-box__row {
    display: flex;
    gap: 0.875rem;
    align-items: center;
    padding: 0.75rem 1.25rem;
    border-top: 1px solid var(--pd-line);
}

.pd-box__row:hover {
    background: color-mix(in oklab, var(--gray-500) 4%, transparent);
}

.pd-box__thumb {
    flex: none;
    width: 4rem;
    height: 2.75rem;
    border-radius: 6px;
    overflow: hidden;
    background: var(--pd-soft);
}

.pd-box__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pd-box__text {
    display: grid;
    flex: 1;
    min-width: 0;
    font-size: 0.875rem;
}

.pd-box__text small {
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-box__sum {
    min-width: 5.5rem;
    font-variant-numeric: tabular-nums;
    text-align: end;
    font-size: 0.875rem;
}

.pd-profile-card__icon {
    width: 1.375rem;
    height: 1.375rem;
}

/* Back to the project's overview, first in the bar above its work pages. */
.pd-project-tabs__back {
    color: var(--gray-600);
}

.pd-profile-card + .pd-profile-card {
    margin-top: 1rem;
}

/* The Light Table's side panels in the studio: headings in plain words, as everywhere in it; the reviewers' view keeps its own. */
.fi-body .pw-side__heading,
.fi-body .pw-info__heading {
    color: var(--gray-600);
    font-size: 0.8125rem;
    font-weight: 600;
    letter-spacing: normal;
    text-transform: none;
}

.dark .fi-body .pw-side__heading,
.dark .fi-body .pw-info__heading {
    color: var(--gray-300);
}

/* The way to the page, below its heading, on every page: Filament's trail above the heading gives way to it. */
.fi-header .fi-breadcrumbs {
    display: none;
}

.pd-trail ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.25rem 0.5rem;
    margin-top: 0.25rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
}

.pd-trail li {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    min-width: 0;
}

.pd-trail li + li::before {
    content: "›";
    color: var(--gray-400);
}

.pd-trail a:hover {
    color: var(--pd-ink);
    text-decoration: underline;
}

.pd-trail [aria-current] {
    color: var(--gray-600);
}

.dark .pd-trail [aria-current] {
    color: var(--gray-300);
}

/*
 * Lists, as calm as Studio Ninja's: search, filters and the list's own buttons in one line above
 * it, the search first and wide; the boxes to tick only where the pointer is or once one is ticked;
 * a row lights up under the pointer, as it opens on a click; states as readable pills.
 */
.fi-ta-header-ctn:has(> .fi-ta-header > .fi-ta-actions:first-child) {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
}

.fi-ta-header-ctn:has(> .fi-ta-header > .fi-ta-actions:first-child) > .fi-ta-header {
    order: 2;
    padding: 0;
    border: 0;
}

.fi-ta-header-ctn:has(> .fi-ta-header > .fi-ta-actions:first-child) > .fi-ta-header-toolbar {
    flex: 1;
    padding: 0;
    border: 0;
}

.fi-ta-header-toolbar {
    justify-content: flex-start;
}

.fi-ta-header-toolbar > div:last-child {
    flex: 1;
    justify-content: flex-start;
}

.fi-ta-header-toolbar .fi-ta-search-field {
    flex: 0 1 22rem;
    order: -1;
}

.fi-ta-header-toolbar .fi-ta-search-field + * {
    margin-inline-start: auto;
}

.fi-ta-table:not(:has(.fi-ta-record-checkbox:checked)) .fi-ta-selection-cell .fi-checkbox-input {
    opacity: 0;
    transition: opacity 120ms;
}

.fi-ta-table .fi-ta-row:hover .fi-ta-selection-cell .fi-checkbox-input,
.fi-ta-table thead:hover .fi-ta-selection-cell .fi-checkbox-input,
.fi-ta-table .fi-ta-selection-cell .fi-checkbox-input:focus-visible {
    opacity: 1;
}

.fi-ta-row.fi-clickable:hover {
    background: color-mix(in oklab, var(--gray-500) 6%, transparent);
}

.fi-ta-cell .fi-badge {
    padding: 0.125rem 0.625rem;
    font-size: 0.8125rem;
    font-weight: 500;
}

/* A list's own views (to check, paid, sent …): a switch of pills, not a second row of tabs below the area's. */
.fi-resource-list-records-page .fi-sc-tabs > .fi-tabs:not(.fi-vertical) {
    display: inline-flex;
    gap: 0.25rem;
    width: fit-content;
    max-width: 100%;
    overflow-x: auto;
    padding: 0.25rem;
    border: 1px solid var(--pd-line);
    border-radius: 999px;
    background: var(--pd-panel);
}

.fi-resource-list-records-page .fi-sc-tabs > .fi-tabs:not(.fi-vertical) > .fi-tabs-item {
    padding: 0.375rem 0.875rem;
    border-radius: 999px;
}

.fi-resource-list-records-page .fi-sc-tabs > .fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active {
    background: var(--pd-ink);
    box-shadow: none;
}

.fi-resource-list-records-page .fi-sc-tabs > .fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active > .fi-tabs-item-label {
    color: var(--pd-canvas);
}

.fi-resource-list-records-page .fi-sc-tabs > .fi-tabs:not(.fi-vertical) > .fi-tabs-item:not(.fi-active):hover {
    background: var(--pd-soft);
}

/* A list's pictures on a quiet ground, so a project or gallery without one keeps its place calmly. */
.fi-ta-cell-picture .fi-ta-image-item,
.fi-ta-cell-cover .fi-ta-image-item {
    border-radius: 6px;
    background: var(--pd-soft);
}

.fi-ta-cell-picture .fi-ta-image:not(:has(img)),
.fi-ta-cell-cover .fi-ta-image:not(:has(img)) {
    width: 60px;
    height: 40px;
    border-radius: 6px;
    background: var(--pd-soft);
}

.fi-ta-cell-picture .fi-ta-col:not(:has(.fi-ta-image))::before,
.fi-ta-cell-cover .fi-ta-col:not(:has(.fi-ta-image))::before {
    content: "";
    display: block;
    width: 60px;
    height: 40px;
    border-radius: 6px;
    background: var(--pd-soft);
}

/*
 * Each area its colour, muted: the jobs rose, the inbox blue, projects teal, the calendar violet,
 * contacts coral, the shop green, today amber, the settings stone. It marks where a thing belongs
 * (its symbol in the bar, the open area, the boxes of a page), never a state or a button.
 */
.fi-body {
    --pd-area-today: #b98a3e;
    --pd-area-jobs: #c46a8a;
    --pd-area-inbox: #5b8fc4;
    --pd-area-projects: #3f9a7f;
    --pd-area-calendar: #8a83c9;
    --pd-area-contacts: #c9775a;
    --pd-area-shop: #7a9a4a;
    --pd-area-settings: #8b8a84;
}

[data-pd-area="today"] { --pd-area: var(--pd-area-today); }
[data-pd-area="jobs"] { --pd-area: var(--pd-area-jobs); }
[data-pd-area="inbox"] { --pd-area: var(--pd-area-inbox); }
[data-pd-area="projects"] { --pd-area: var(--pd-area-projects); }
[data-pd-area="calendar"] { --pd-area: var(--pd-area-calendar); }
[data-pd-area="contacts"] { --pd-area: var(--pd-area-contacts); }
[data-pd-area="shop"] { --pd-area: var(--pd-area-shop); }
[data-pd-area="settings"] { --pd-area: var(--pd-area-settings); }

/* The bar and the phone's drawer: each area found by its address; today is the first. */
:is(.fi-topbar-item, .fi-sidebar-item):first-child { --pd-area: var(--pd-area-today); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href$="/inquiries"]) { --pd-area: var(--pd-area-jobs); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href*="/inbox"]) { --pd-area: var(--pd-area-inbox); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href$="/projects"]) { --pd-area: var(--pd-area-projects); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href$="/calendar"]) { --pd-area: var(--pd-area-calendar); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href$="/clients"]) { --pd-area: var(--pd-area-contacts); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href*="/shop"]) { --pd-area: var(--pd-area-shop); }
:is(.fi-topbar-item, .fi-sidebar-item):has(> a[href*="/settings"]) { --pd-area: var(--pd-area-settings); }

.fi-topbar-item .fi-topbar-item-btn > .fi-icon,
.fi-sidebar-item .fi-sidebar-item-btn > .fi-sidebar-item-icon {
    color: var(--pd-area, var(--gray-500));
}

.fi-topbar-item.fi-active .fi-topbar-item-btn,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn {
    background: color-mix(in oklab, var(--pd-area, var(--pd-ink)) 14%, transparent);
}

.fi-topbar-item.fi-active .fi-topbar-item-btn > .fi-icon,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-icon {
    color: var(--pd-area, var(--pd-ink));
}

.fi-topbar-item.fi-active .fi-topbar-item-label,
.fi-sidebar-item.fi-active > .fi-sidebar-item-btn > .fi-sidebar-item-label {
    color: color-mix(in oklab, var(--pd-area, var(--pd-ink)) 55%, var(--pd-ink));
}

/* A card's or a box's symbol on the soft ground of its area. */
.pd-profile-card__avatar[data-pd-area],
.pd-box__icon[data-pd-area] {
    color: var(--pd-area);
}

.pd-profile-card__avatar[data-pd-area] {
    background: color-mix(in oklab, var(--pd-area) 14%, transparent);
}

.pd-box__head:has(> .pd-box__icon[data-pd-area]) .pd-box__icon {
    box-sizing: content-box;
    padding: 0.375rem;
    border-radius: 8px;
    background: color-mix(in oklab, var(--pd-area) 14%, transparent);
}

/*
 * The page in its area's colour: a short line above its heading, and the open entry of the area's
 * own tabs underlined in it. The area is the one open in the bar.
 */
.fi-body:has(.fi-topbar-item.fi-active:first-child, .fi-sidebar-item.fi-active:first-child) { --pd-page-area: var(--pd-area-today); }
.fi-body:has(.fi-topbar-item.fi-active > a[href$="/inquiries"], .fi-sidebar-item.fi-active > a[href$="/inquiries"]) { --pd-page-area: var(--pd-area-jobs); }
.fi-body:has(.fi-topbar-item.fi-active > a[href*="/inbox"], .fi-sidebar-item.fi-active > a[href*="/inbox"]) { --pd-page-area: var(--pd-area-inbox); }
.fi-body:has(.fi-topbar-item.fi-active > a[href$="/projects"], .fi-sidebar-item.fi-active > a[href$="/projects"]) { --pd-page-area: var(--pd-area-projects); }
.fi-body:has(.fi-topbar-item.fi-active > a[href$="/calendar"], .fi-sidebar-item.fi-active > a[href$="/calendar"]) { --pd-page-area: var(--pd-area-calendar); }
.fi-body:has(.fi-topbar-item.fi-active > a[href$="/clients"], .fi-sidebar-item.fi-active > a[href$="/clients"]) { --pd-page-area: var(--pd-area-contacts); }
.fi-body:has(.fi-topbar-item.fi-active > a[href*="/shop"], .fi-sidebar-item.fi-active > a[href*="/shop"]) { --pd-page-area: var(--pd-area-shop); }
.fi-body:has(.fi-topbar-item.fi-active > a[href*="/settings"], .fi-sidebar-item.fi-active > a[href*="/settings"]) { --pd-page-area: var(--pd-area-settings); }

.fi-header > div:first-child::before,
.pd-job__col h1::before,
.pd-job__crumb::before {
    content: "";
    display: block;
    width: 2.5rem;
    height: 3px;
    margin-bottom: 0.5rem;
    border-radius: 999px;
    background: var(--pd-page-area, var(--pd-line-strong));
}

/*
 * The head of a page, as one block: heading and trail together, its buttons level with them, a
 * hairline below (the tabs' own line where it has tabs), and air before the content. No line in
 * the area's colour above it: the bar and the open tab carry that.
 */
.fi-page-header-main-ctn {
    padding-top: 1.5rem;
    row-gap: 1.5rem;
}

.fi-page-main {
    row-gap: 1.5rem;
}

@media (min-width: 640px) {
    .fi-header {
        align-items: center;
    }
}

.fi-page:not(.fi-page-has-sub-navigation-top) .fi-header {
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--pd-line);
}

.fi-page-has-sub-navigation-top .fi-page-header-main-ctn {
    row-gap: 1rem;
}

.fi-header-heading {
    font-size: 1.5rem;
    line-height: 2rem;
}

.fi-header > div:first-child::before,
.pd-job__col h1::before,
.pd-job__crumb::before {
    display: none;
}

.fi-header .pd-trail ol {
    margin-top: 0.125rem;
}

.fi-page-sub-navigation-tabs.fi-tabs:not(.fi-vertical) > .fi-tabs-item {
    padding-block: 0.625rem;
}

.fi-page-sub-navigation-tabs.fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active,
.fi-sc-tabs > .fi-tabs:not(.fi-vertical) > .fi-tabs-item.fi-active {
    box-shadow: inset 0 -2px 0 var(--pd-page-area, var(--pd-ink));
}

.fi-page-sub-navigation-tabs .fi-tabs-item.fi-active > .fi-icon {
    color: var(--pd-page-area, var(--pd-ink));
}

/* The draft of a planned invoice, opened from its rate. */
.pd-job__draft-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--pd-ink);
    text-decoration: underline;
    text-underline-offset: 2px;
}

/* The drafts above the invoices: rows that open the draft, the whole width a button. */
.pd-invoice-drafts {
    margin-bottom: 1rem;
}

.pd-invoice-drafts button.pd-box__row {
    width: 100%;
    text-align: start;
}

/* An issued invoice: the paper large, its facts and payments beside it. */
.pd-invoice-view {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 1.5rem;
    align-items: start;
}

@media (min-width: 1280px) {
    .pd-invoice-view {
        grid-template-columns: minmax(0, 3fr) minmax(20rem, 2fr);
    }

    .pd-invoice-view__side {
        position: sticky;
        top: var(--pd-sticky-top);
    }
}

.pd-invoice-view__side {
    display: grid;
    gap: 1rem;
}

.pd-invoice-view__paper .pd-letterhead-preview__frame {
    height: calc(100dvh - var(--topbar-height) - 10rem);
    min-height: 40rem;
}

/* A page with a head of its own: Filament's empty head, holding only its hidden trail, stays out. */
.fi-header:not(:has(.fi-header-heading)):not(:has(.fi-header-actions-ctn)) {
    display: none;
}

/* A day typed in the head of a document, as quiet as the text around it. */
.pd-oe__date {
    padding: 0;
    border: 0;
    background: transparent;
    font: inherit;
    text-align: right;
}

.pd-oe__date:focus {
    outline: 2px solid var(--pd-ink);
    outline-offset: 2px;
}

/* Client › Messages: the conversation as the client sees it, a message below it. */
.pd-chat { display: flex; flex-direction: column; gap: 1rem; }
.pd-chat-box { scroll-margin-top: var(--pd-sticky-top); }
.pd-chat__empty { color: var(--gray-500); font-size: 0.875rem; }

.pd-chat__messages { display: flex; flex-direction: column; gap: 0.75rem; max-height: 32rem; overflow-y: auto; }
.pd-chat__message {
    max-width: min(40rem, 88%);
    padding: 0.75rem 0.875rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius);
    font-size: 0.875rem;
}
.pd-chat__message.is-client { align-self: flex-start; background: var(--pd-panel); }
.pd-chat__message.is-studio { align-self: flex-end; border-color: transparent; background: var(--pd-soft); }
.pd-chat__message.is-new { border-color: var(--pd-area-inbox); }
.pd-chat__meta { display: flex; flex-wrap: wrap; gap: 0.25rem 0.375rem; align-items: center; margin-bottom: 0.25rem; color: var(--gray-500); font-size: 0.75rem; }
.pd-chat__meta strong { color: var(--pd-ink); font-weight: 600; }
.pd-chat__via { padding: 0 0.375rem; border: 1px solid var(--pd-line); border-radius: 999px; font-size: 0.6875rem; }
.pd-chat__via.is-new { border-color: var(--pd-area-inbox); color: var(--pd-area-inbox); }
.pd-chat__text { line-height: 1.55; overflow-wrap: anywhere; }

.pd-chat__photo {
    display: inline-flex;
    gap: 0.5rem;
    align-items: center;
    max-width: 100%;
    margin-top: 0.5rem;
    padding: 0.25rem 0.5rem 0.25rem 0.25rem;
    border: 1px solid var(--pd-line);
    border-radius: var(--pd-radius-sm);
    background: var(--pd-panel);
    font-size: 0.8125rem;
}
.pd-chat__photo img { width: 3rem; height: 3rem; border-radius: 6px; object-fit: cover; }
.pd-chat__photo span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-chat__photo button { padding: 0 0.25rem; color: var(--gray-500); font-size: 1rem; }
.pd-chat__photo.is-chosen { align-self: flex-start; margin-top: 0; }

.pd-chat__compose { display: flex; flex-direction: column; gap: 0.5rem; padding-top: 1rem; border-top: 1px solid var(--pd-line); }
.pd-chat__field {
    width: 100%;
    padding: 0.625rem 0.75rem;
    border: 1px solid var(--pd-line-strong);
    border-radius: var(--pd-radius-sm);
    background: var(--pd-canvas);
    color: var(--pd-ink);
    font-size: 0.875rem;
    resize: vertical;
}
.pd-chat__field:focus { outline: 2px solid var(--pd-ink); outline-offset: 1px; }
.pd-chat__error { color: var(--danger-600); font-size: 0.8125rem; }
.pd-chat__send { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; }
.pd-chat__tools { display: flex; flex-wrap: wrap; gap: 0.5rem 0.75rem; align-items: center; min-width: 0; }
.pd-chat__to { overflow: hidden; color: var(--gray-500); font-size: 0.8125rem; text-overflow: ellipsis; }

.pd-chat-photo-option { display: flex; gap: 0.625rem; align-items: center; }
.pd-chat-photo-option img { width: 2.5rem; height: 2.5rem; border-radius: 6px; object-fit: cover; }
.pd-chat-photo-option small { display: block; color: var(--gray-500); font-size: 0.75rem; }

/* Where a project stands, below its tabs and on its overview: its phases side by side, each with a bar of
   how far it got and a line of what is there, the next step below. Done green, the one at hand blue, what
   needs a look amber. */
.pd-phases { margin: 0 0 16px; padding: 14px 16px 12px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); }
.pd-phases__list { display: grid; grid-template-columns: repeat(var(--pd-phases-count, 5), minmax(0, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.pd-phases__phase { display: grid; gap: 2px; min-width: 0; }
.pd-phases__bar { display: block; height: 6px; margin-bottom: 6px; overflow: hidden; border-radius: 999px; background: var(--pd-soft); }
.pd-phases__bar span { display: block; height: 100%; border-radius: inherit; background: var(--primary-500, #3b82f6); }
.pd-phases__phase.is-done .pd-phases__bar span { background: var(--success-500, #16a34a); }
.pd-phases__phase.is-attention .pd-phases__bar span { background: var(--warning-500, #f59e0b); }
.pd-phases__label { overflow: hidden; color: var(--pd-ink); font-size: 0.8125rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.pd-phases__phase.is-current .pd-phases__label { color: var(--primary-600, #2563eb); }
.pd-phases__detail { overflow: hidden; color: var(--gray-500); font-size: 0.8125rem; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.pd-phases__phase.is-attention .pd-phases__detail { color: var(--warning-700, #b45309); }
.dark .pd-phases__phase.is-attention .pd-phases__detail { color: var(--warning-400, #fbbf24); }
.pd-phases__phase.is-late .pd-phases__bar span { background: var(--danger-500, #ef4444); }
.pd-phases__phase.is-late .pd-phases__detail,
.pd-phases__text.is-late { color: var(--danger-600, #dc2626); }
.dark .pd-phases__phase.is-late .pd-phases__detail,
.dark .pd-phases__text.is-late { color: var(--danger-400, #f87171); }
.pd-phases__next { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--pd-line); }
.pd-phases__text { flex: 1 1 240px; color: var(--pd-ink); font-size: 0.875rem; }
.pd-phases__go { display: inline-flex; align-items: center; min-height: 32px; padding: 0 14px; border-radius: 999px; background: var(--pd-ink); color: var(--pd-panel); font-size: 0.8125rem; font-weight: 600; text-decoration: none; }
.pd-phases__go:hover { opacity: 0.88; }
@media (max-width: 720px) {
    .pd-phases__list { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 12px; }
}

/* The same bar in a list row: a short segment per phase, the phase at hand named below. */
.pd-phases-mini { display: grid; grid-template-columns: repeat(var(--pd-phases-count, 5), 1fr); gap: 2px; width: 120px; }
.pd-phases-mini__phase { display: block; height: 5px; overflow: hidden; border-radius: 999px; background: var(--pd-soft); }
.pd-phases-mini__phase span { display: block; height: 100%; border-radius: inherit; background: var(--primary-500, #3b82f6); }
.pd-phases-mini__phase.is-done span { background: var(--success-500, #16a34a); }
.pd-phases-mini__phase.is-attention span { background: var(--warning-500, #f59e0b); }
.pd-phases-mini__phase.is-late span { background: var(--danger-500, #ef4444); }
.pd-phases-mini__label { display: block; margin-top: 4px; color: var(--gray-500); font-size: 0.75rem; }
.pd-jobs__when .pd-phases-mini { margin-top: 6px; }

/* A form's answers in a job's file, opened beside it. */
.pd-job__answers { display: flex; flex-direction: column; gap: 8px; margin: 0; }
.pd-job__answers dt { color: var(--gray-500); font-size: 0.75rem; }
.pd-job__answers dd { margin: 0; font-size: 0.875rem; white-space: pre-wrap; overflow-wrap: anywhere; }

/* More contrast, when the system asks for it: firmer lines. */
@media (prefers-contrast: more) {
    .fi-body {
        --pd-line: var(--gray-400);
        --pd-line-strong: var(--gray-500);
    }

    .dark .fi-body {
        --pd-line: rgb(255 255 255 / 0.35);
        --pd-line-strong: rgb(255 255 255 / 0.5);
    }
}

/* The tabs of the statistics beside the filters; a card's head with the way on to its tab. */
.pd-stats__card-head { display: flex; gap: 12px; align-items: baseline; justify-content: space-between; }
.pd-stats__more { font-size: 0.8125rem; font-weight: 500; color: var(--primary-600); white-space: nowrap; }
.pd-stats__more:hover { text-decoration: underline; }
.dark .pd-stats__more { color: var(--primary-400); }
.pd-stats__tag { font-size: 0.6875rem; font-weight: 500; color: var(--gray-500); white-space: nowrap; }
.pd-stats__subhead { margin: 16px 0 8px; font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }

/* Read only by screen readers. */
.pd-stats__sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* The head with tabs, brand and period stays at the top; its edge shows once the page runs under it. */
.pd-stats { position: relative; }
.pd-stats__sentinel { position: absolute; top: 0; left: 0; width: 1px; height: 1px; pointer-events: none; }
.pd-stats__head { position: sticky; top: var(--pd-stats-top, 0px); z-index: 5; margin-inline: -8px; padding: 8px; border-radius: var(--pd-radius-sm); transition: background-color 160ms ease-out, box-shadow 160ms ease-out; }
.pd-stats__head.is-stuck { background: color-mix(in srgb, var(--pd-canvas) 80%, transparent); -webkit-backdrop-filter: blur(20px) saturate(180%); backdrop-filter: blur(20px) saturate(180%); box-shadow: 0 8px 12px -12px color-mix(in oklab, black 35%, transparent); }

/* Up is good for every figure that shows a change: more turnover, more inquiries, more visits. */
.pd-stats__trend.is-up { color: var(--success-700); }
.pd-stats__trend.is-down { color: var(--danger-600); }
.dark .pd-stats__trend.is-up { color: var(--success-400); }
.dark .pd-stats__trend.is-down { color: var(--danger-400); }
.pd-stats__trend span[aria-hidden] { font-weight: 600; }

/* While other figures load the old ones step back, after a moment so a quick answer does not flicker. */
.pd-stats__panel { transition: opacity 160ms ease-out; }
.pd-stats__panel.is-loading { opacity: 0.45; transition-delay: 120ms; pointer-events: none; }

/* Columns and bars grow from their base when they come, and glide to new values. */
.pd-stats__column i, .pd-stats__column b { transform-origin: bottom; animation: pd-stats-rise 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; transition: height 300ms cubic-bezier(0.2, 0.8, 0.2, 1); }
.pd-stats .pd-case__bar i, .pd-stats .pd-case__bar b { transform-origin: left; animation: pd-stats-reach 420ms cubic-bezier(0.2, 0.8, 0.2, 1) both; transition: width 300ms cubic-bezier(0.2, 0.8, 0.2, 1); }
@keyframes pd-stats-rise { from { transform: scaleY(0); } }
@keyframes pd-stats-reach { from { transform: scaleX(0); } }

/* A column's value on hover, focus or tap, at once and above it; at the edges it keeps inside. */
.pd-stats__columns li[data-tip] { position: relative; cursor: default; }
.pd-stats__columns li[data-tip]::after { content: attr(data-tip); position: absolute; bottom: calc(100% + 4px); left: 50%; z-index: 4; padding: 4px 8px; border-radius: 6px; background: var(--pd-ink); color: var(--pd-canvas); font-size: 0.75rem; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; pointer-events: none; opacity: 0; transform: translate(-50%, 2px); transition: opacity 80ms ease-out, transform 80ms ease-out; }
.pd-stats__columns li[data-tip]:first-child::after, .pd-stats__columns li[data-tip]:nth-child(2)::after { left: 0; transform: translate(0, 2px); }
.pd-stats__columns li[data-tip]:last-child::after, .pd-stats__columns li[data-tip]:nth-last-child(2)::after { left: auto; right: 0; transform: translate(0, 2px); }
.pd-stats__columns li[data-tip]:hover::after, .pd-stats__columns li.is-tipped::after { opacity: 1; transform: translate(-50%, 0); }
.pd-stats__columns li[data-tip]:is(:first-child, :nth-child(2), :last-child, :nth-last-child(2)):is(:hover, .is-tipped)::after { transform: none; }
.pd-stats__columns li[data-tip]:is(:hover, .is-tipped) .pd-stats__column { box-shadow: 0 0 0 2px color-mix(in oklab, var(--pd-ink) 18%, transparent); }

/* On a phone: tabs and periods as strips to swipe, figures two by two, tables that scroll in themselves. */
@media (max-width: 640px) {
    /* Three rows of choices would cover half the phone: there the head scrolls away with the page. */
    .pd-stats__head { position: static; gap: 10px; }
    .pd-stats__tabs, .pd-stats__filters, .pd-stats__filters > * { width: 100%; }
    .pd-stats__filters .pd-stats__periods { width: auto; }
    .pd-stats .pd-case__kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .pd-stats .pd-case__kpis dd:not(.pd-case__kpi-note) { font-size: 1.1875rem; }
    .pd-stats__grid > * { flex-basis: 100%; }
    .pd-stats__card { padding-inline: 12px; }
    .pd-stats__card .pd-case__bars li { grid-template-columns: minmax(0, 7rem) minmax(2rem, 1fr) auto; gap: 8px; }
    .pd-stats__card .pd-stats__bars--value li { grid-template-columns: minmax(0, 6.5rem) minmax(2rem, 1fr) auto auto; gap: 8px; }
    .pd-stats__table { display: block; overflow-x: auto; }
    .pd-stats__columns { gap: 2px; }
    .pd-stats__columns em { visibility: hidden; }
    .pd-stats__columns:not([style*="--count: 7"]) li:not(:nth-child(3n+1)) small { visibility: hidden; }
    .pd-stats__columns small { overflow: visible; }
    /* The year lines are drawn 1000 wide: their labels grow so they stay readable once scaled down. */
    .pd-stats__years-axis { font-size: 26px; }
}

@media (prefers-reduced-motion: reduce) {
    .pd-stats__column i, .pd-stats__column b, .pd-stats .pd-case__bar i, .pd-stats .pd-case__bar b { animation: none; transition: none; }
    .pd-stats__panel, .pd-stats__panel.is-loading { transition: opacity 120ms linear; }
    .pd-stats__periods button:active { transform: none; }
    .pd-stats__columns li[data-tip]::after, .pd-terms__tip { transition: none; }
}

@media (prefers-reduced-transparency: reduce) {
    .pd-stats__head.is-stuck { background: var(--pd-canvas); -webkit-backdrop-filter: none; backdrop-filter: none; }
}

/* More contrast: cards and tracks with a clear edge, quiet texts darker. */
@media (prefers-contrast: more) {
    .pd-stats__card, .pd-case__kpis > div, .pd-stats__periods { border-color: var(--gray-500) !important; }
    .pd-stats__column, .pd-case__bar { background: none; box-shadow: inset 0 0 0 1px var(--gray-400); }
    .pd-stats__hint, .pd-stats__tag, .pd-case__kpis dt, .pd-case__kpi-note, .pd-case__bar-value, .pd-stats__columns small, .pd-stats__columns em { color: var(--gray-700); }
    .dark :is(.pd-stats__hint, .pd-stats__tag, .pd-case__kpis dt, .pd-case__kpi-note, .pd-case__bar-value, .pd-stats__columns small, .pd-stats__columns em) { color: var(--gray-200); }
    .pd-stats__head.is-stuck { background: var(--pd-canvas); backdrop-filter: none; border-bottom: 1px solid var(--gray-500); }
}
.pd-case__kpi-note.is-warn { color: var(--danger-600); }
.dark .pd-case__kpi-note.is-warn { color: var(--danger-400); }
.pd-stats__columns--money .pd-stats__column.is-overdue b { background: var(--danger-500); }

/* This year against the last, added up: the last year a quiet dashed line under this year's. */
.pd-stats__years { display: block; width: 100%; height: auto; overflow: visible; }
.pd-stats__years-grid { stroke: var(--pd-line); stroke-width: 1; }
.pd-stats__years-axis { font-size: 10px; fill: var(--gray-500); }
.pd-stats__years-last, .pd-stats__years-this { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.pd-stats__years-last { stroke: var(--gray-400); stroke-dasharray: 4 4; }
.pd-stats__years-this { stroke: var(--primary-500); }
.pd-stats__years-dot { fill: var(--primary-500); }
.pd-stats__legend .is-this-year { background: var(--primary-500); }
.pd-stats__legend .is-last-year { background: var(--gray-400); }

/* The photos liked most as small tiles, how often opened large and downloaded beneath. */
.pd-stats__photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; }
.pd-stats__photos li { display: grid; gap: 4px; min-width: 0; }
.pd-stats__photos img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; background: var(--pd-soft); }
.pd-stats__photos span { font-size: 0.6875rem; color: var(--gray-500); font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* Shoots to come paler than those shot; a warning line under a card. */
.pd-stats__column.is-coming b, .pd-stats__legend .is-coming { background: color-mix(in oklab, var(--primary-500) 35%, transparent); }
.pd-stats__hint.is-warn { color: var(--danger-600); }
.dark .pd-stats__hint.is-warn { color: var(--danger-400); }

/* The pages of one settings entry, as tabs below its heading (settings-row.blade.php). */
.fi-header-subheading:has(> .pd-settings-row) {
    margin-top: 0.75rem;
}

.pd-settings-row .fi-tabs-item {
    text-decoration: none;
}

/* The emails as a list (email-list.blade.php): compact rows across the width, the versions indented. */
.pd-email-list {
    display: grid;
    gap: 1.5rem;
}

.pd-email-list__heading {
    margin-bottom: 0.25rem;
    color: var(--gray-500);
    font-size: 0.8125rem;
    font-weight: 500;
}

.pd-email-list__rows {
    border-top: 1px solid var(--pd-line, rgb(0 0 0 / 0.08));
}

.pd-email-list__row {
    display: grid;
    grid-template-columns: minmax(12rem, 18rem) minmax(0, 1fr) auto;
    gap: 1rem;
    align-items: baseline;
    padding: 0.5rem 0.25rem;
    border-bottom: 1px solid var(--pd-line, rgb(0 0 0 / 0.08));
    font-size: 0.875rem;
}

.pd-email-list__row:hover {
    background: var(--pd-soft);
}

.pd-email-list__row--version .pd-email-list__name {
    padding-left: 1.25rem;
    color: var(--gray-500);
}

.pd-email-list__row--version .pd-email-list__name::before {
    content: "↳ ";
}

.pd-email-list__name {
    font-weight: 500;
}

.pd-email-list__note {
    overflow: hidden;
    color: var(--gray-500);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.pd-email-list__state {
    padding: 0.0625rem 0.5rem;
    border-radius: 5px;
    background: var(--pd-soft);
    color: var(--gray-500);
    font-size: 0.75rem;
    font-weight: 500;
}

.pd-email-list__state--own {
    background: var(--pd-ink);
    color: var(--pd-canvas);
}

/* Tabs that only switch what is shown, chosen from outside (the emails' page): their row out of sight. */
.pd-tabs-bare > .fi-tabs,
html.pd-look-calm .pd-tabs-bare > .fi-tabs:not(.fi-vertical) {
    display: none;
}

/* Under a product's name in its editor: type · number · price · where it is held, in one quiet line. */
.pd-editor-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.25rem 0;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.pd-editor-meta > * + *::before {
    content: "·";
    margin: 0 0.5rem;
    color: var(--gray-400);
}

.pd-editor-meta__number {
    font-variant-numeric: tabular-nums;
}

.pd-editor-meta__price {
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: var(--pd-ink);
}

.pd-editor-meta__saving--failed {
    color: var(--danger-600);
}

/* A product's editor on one page: its sections one below the other. */
.pd-editor-main {
    display: grid;
    gap: 1.5rem;
    align-content: start;
}

/* A price group's rule in its row of the catalogues' page: the same sentence, a size smaller. */
.pd-catalog-rule--row {
    flex-wrap: nowrap;
    font-size: 0.875rem;
    white-space: nowrap;
}

/* The price groups' names read as text and become a field on hover and focus, edited in place. */
.pd-price-groups td:first-child .fi-input-wrp:not(:hover):not(:focus-within) {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
}

.pd-price-groups td:first-child .fi-input {
    font-weight: 600;
}

/* ── Article card (catalogue): head, figures, tabs, panes, price table, inspector ───────────── */
.pd-card-head {
    position: sticky;
    top: var(--topbar-height, 0px);
    z-index: 10;
    display: grid;
    gap: 0.375rem;
    margin-inline: calc(var(--pd-gutter) * -1);
    padding: 0.875rem var(--pd-gutter);
    background: color-mix(in oklab, var(--pd-canvas) 78%, transparent);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--pd-line);
}

@media (prefers-reduced-transparency: reduce) {
    .pd-card-head { background: var(--pd-canvas); backdrop-filter: none; -webkit-backdrop-filter: none; }
}

.pd-card-head__path { display: flex; flex-wrap: wrap; gap: 0.375rem; font-size: 0.75rem; color: var(--gray-500); }
.pd-card-head__path a { color: inherit; text-decoration: none; }
.pd-card-head__path a:hover { color: var(--pd-ink); }
.pd-card-head__path span:last-child { display: none; }
.pd-card-head__row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.625rem 0.875rem; }
.pd-card-head__ident { display: flex; align-items: baseline; gap: 0.75rem; min-width: 0; flex: 1 1 20rem; }
.pd-card-head__number { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8125rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-card-head__name { margin: 0; font-size: 1.5rem; line-height: 1.15; font-weight: 650; letter-spacing: -0.02em; overflow-wrap: anywhere; text-wrap: balance; }
.pd-card-head__actions { display: flex; align-items: center; gap: 0.625rem; margin-left: auto; }
.pd-card-head__saving { font-size: 0.75rem; color: var(--gray-500); white-space: nowrap; }
.pd-card-head__saving.is-failed { color: var(--danger-600); }

.pd-card-chip { display: inline-flex; align-items: center; gap: 0.375rem; height: 1.5rem; padding: 0 0.625rem; border: 0; border-radius: 999px; font-size: 0.75rem; font-weight: 500; white-space: nowrap; background: var(--pd-soft); color: var(--gray-600); }
.pd-card-chip i { width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pd-card-chip--type { color: var(--pd-area-shop); background: color-mix(in oklab, var(--pd-area-shop) 14%, transparent); }
.pd-card-chip--on { color: var(--success-700); background: color-mix(in oklab, var(--success-500) 14%, transparent); cursor: pointer; }
.pd-card-chip--off { color: var(--warning-700); background: color-mix(in oklab, var(--warning-500) 16%, transparent); cursor: pointer; }
.pd-card-chip--warn { color: var(--warning-700); background: color-mix(in oklab, var(--warning-500) 16%, transparent); }
button.pd-card-chip { transition: transform 100ms ease-out; }
button.pd-card-chip:active { transform: scale(0.97); }
.dark .pd-card-chip--on { color: var(--success-400); }
.dark .pd-card-chip--off, .dark .pd-card-chip--warn { color: var(--warning-400); }

.pd-card { display: grid; gap: 1.25rem; }

.pd-card-figures { display: grid; grid-template-columns: repeat(auto-fit, minmax(9.5rem, 1fr)); overflow: hidden; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-card-figure { display: grid; gap: 0.125rem; padding: 0.75rem 1rem; box-shadow: 0.5px 0.5px 0 0.5px var(--pd-line); }
.pd-card-figure span, .pd-card-figure small { font-size: 0.75rem; color: var(--gray-500); }
.pd-card-figure strong { font-size: 1.125rem; font-weight: 600; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }

.pd-card-tabs { position: relative; display: flex; gap: 0.25rem; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--pd-line); }
.pd-card-tabs button { height: 2.75rem; padding: 0 0.75rem; border: 0; background: none; color: var(--gray-500); font-weight: 500; white-space: nowrap; cursor: pointer; }
.pd-card-tabs button[aria-selected="true"] { color: var(--pd-ink); }
.pd-card-tabs button:focus-visible { outline: 2px solid var(--primary-500); outline-offset: -2px; border-radius: 6px; }
.pd-card-tabs__count { margin-left: 0.375rem; font-size: 0.6875rem; color: var(--gray-400); }
.pd-card-tabs__ink { position: absolute; bottom: -1px; left: 0; height: 2px; width: 0; border-radius: 2px; background: var(--pd-ink); transition: transform 320ms cubic-bezier(0.2, 0.9, 0.3, 1), width 320ms cubic-bezier(0.2, 0.9, 0.3, 1); }

@media (prefers-reduced-motion: reduce) {
    .pd-card-tabs__ink { transition: none; }
}

.pd-card-pane { display: grid; gap: 1.25rem; min-width: 0; }

.pd-card-prices { overflow: hidden; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-card-prices__head { display: flex; align-items: center; padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--pd-line); }
.pd-card-prices__head h2 { margin: 0; font-size: 0.9375rem; font-weight: 600; }
.pd-card-prices__scroll { overflow-x: auto; }
.pd-card-prices table { width: 100%; border-collapse: separate; border-spacing: 0; }
.pd-card-prices th { padding: 0.625rem 0.875rem; font-size: 0.75rem; font-weight: 500; color: var(--gray-500); text-align: left; white-space: nowrap; background: var(--pd-well); border-bottom: 1px solid var(--pd-line); }
.pd-card-prices td { height: 3rem; padding: 0 0.875rem; border-bottom: 1px solid var(--pd-line); white-space: nowrap; }
.pd-card-prices tr:last-child td { border-bottom: 0; }
.pd-card-prices tr.is-base td { background: var(--pd-well); }
.pd-card-prices__num { text-align: right !important; font-variant-numeric: tabular-nums; }
.pd-card-prices__group { display: block; font-weight: 600; }
.pd-card-prices__place { display: block; font-size: 0.75rem; color: var(--gray-500); }
.pd-card-prices__cell { display: inline-flex; align-items: center; justify-content: flex-end; min-width: 7.5rem; height: 2.125rem; padding: 0 0.625rem; border: 1px solid transparent; border-radius: var(--pd-radius-sm); cursor: text; font-variant-numeric: tabular-nums; }
.pd-card-prices__cell:hover { border-color: var(--pd-line-strong); background: var(--pd-panel); }
.pd-card-prices__cell:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 1px; }
.pd-card-prices__cell.is-editing { border-color: var(--primary-500); background: var(--pd-panel); box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary-500) 18%, transparent); }
.pd-card-prices__cell input { width: 6.5rem; height: 1.75rem; border: 0; padding: 0; background: transparent; color: var(--pd-ink); text-align: right; font: inherit; font-variant-numeric: tabular-nums; outline: none; box-shadow: none; }
.pd-card-prices__value { font-weight: 600; }
.pd-card-prices__value.is-missing { font-weight: 400; color: var(--warning-700); }
.dark .pd-card-prices__value.is-missing { color: var(--warning-400); }
.pd-card-prices__margin, .pd-card-prices__none { color: var(--gray-500); }
.pd-card-prices__value.is-derived { font-weight: 400; color: var(--gray-400); }
.pd-card-prices__margin.is-low { color: var(--warning-700); }
.dark .pd-card-prices__margin.is-low { color: var(--warning-400); }
/* The formats of a shop product: number made of its stem and code, amounts in cells. */
.pd-card-formats { margin-bottom: 1.5rem; }
.pd-card-formats__number { display: inline-flex; align-items: center; font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8125rem; }
.pd-card-formats__stem { color: var(--gray-500); }
.pd-card-prices__cell.is-code { min-width: 0; justify-content: flex-start; height: 1.75rem; padding: 0 0.375rem; margin-left: 0.125rem; font-family: inherit; }
.pd-card-prices__cell.is-code .pd-card-prices__value { color: var(--primary-600); }
.dark .pd-card-prices__cell.is-code .pd-card-prices__value { color: var(--primary-400); }
.pd-card-prices__cell.is-code input { width: 4.5rem; text-align: left; text-transform: uppercase; font-family: inherit; }
.pd-card-formats__name { font-weight: 500; }
.pd-card-formats__rule { display: block; font-weight: 400; color: var(--gray-400); }
.pd-card-formats__sep { border-left: 1px solid var(--pd-line); }
.pd-card-formats tr.is-off .pd-card-prices__value, .pd-card-formats tr.is-off .pd-card-formats__name { opacity: 0.45; }
.pd-card-formats__count { margin-left: 0.75rem; font-size: 0.8125rem; color: var(--gray-500); }
.pd-card-formats__mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8125rem; font-variant-numeric: tabular-nums; }
.pd-card-formats tr.is-off .pd-card-formats__mono, .pd-card-numbers tr.is-off .pd-card-formats__mono { color: var(--gray-400); text-decoration: line-through; }
/* How a product's numbers are made, and all of them. */
.pd-card-numbers { display: grid; gap: 1.5rem; }
.pd-card-numbers__body { padding: 1.125rem; }
.pd-card-numbers__recipe { display: flex; flex-wrap: wrap; align-items: center; gap: 0.375rem; }
.pd-card-numbers__token { display: inline-flex; align-items: center; gap: 0.5rem; height: 2rem; padding: 0 0.75rem; border-radius: var(--pd-radius-sm); background: var(--pd-well); border: 1px solid var(--pd-line); font-size: 0.8125rem; }
.pd-card-numbers__token.is-stem { background: color-mix(in oklab, var(--pd-ink) 6%, transparent); }
.pd-card-numbers__token small { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--gray-500); }
.pd-card-numbers__join { font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--gray-400); }
.pd-card-numbers__label { margin-left: 1rem; font-size: 0.75rem; color: var(--gray-500); }
.pd-card-numbers__seg { display: inline-flex; gap: 2px; padding: 2px; border-radius: 999px; background: var(--pd-well); border: 1px solid var(--pd-line); }
.pd-card-numbers__seg button { min-width: 2rem; height: 1.75rem; border-radius: 999px; font-family: ui-monospace, "SF Mono", Menlo, monospace; color: var(--gray-500); transition: transform 100ms ease-out; }
.pd-card-numbers__seg button:active { transform: scale(0.97); }
.pd-card-numbers__seg button[aria-checked="true"] { background: var(--pd-panel); color: var(--pd-ink); box-shadow: 0 1px 2px rgb(0 0 0 / 0.06), 0 0 0 1px var(--pd-line); }
.pd-card-numbers__copy { margin-left: auto; padding: 0.375rem 0.625rem; border-radius: var(--pd-radius-sm); font-size: 0.8125rem; color: var(--gray-500); }
.pd-card-numbers__copy:hover { background: var(--pd-well); color: var(--pd-ink); }

.pd-card-list { overflow: hidden; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-card-list h2 { margin: 0; padding: 0.875rem 1.125rem; font-size: 0.9375rem; font-weight: 600; border-bottom: 1px solid var(--pd-line); }
.pd-card-list__row { display: flex; justify-content: space-between; gap: 1rem; padding: 0.75rem 1.125rem; border-bottom: 1px solid var(--pd-line); color: inherit; text-decoration: none; }
.pd-card-list__row:last-child { border-bottom: 0; }
a.pd-card-list__row:hover { background: var(--pd-well); }
.pd-card-list__row--switch { align-items: center; }
.pd-card-list__row--switch a { color: inherit; text-decoration: none; }
.pd-card-list__end { display: inline-flex; align-items: center; gap: 0.75rem; }
.pd-card-list__action { font-size: 0.8125rem; color: var(--gray-500); padding: 0.25rem 0.5rem; border-radius: var(--pd-radius-sm); }
.pd-card-list__action:hover { background: var(--pd-well); color: var(--pd-ink); }
.pd-card-list__row small, .pd-card-list__empty { color: var(--gray-500); }
.pd-card-list__empty { margin: 0; padding: 0.75rem 1.125rem; }

.pd-card-inspector { position: sticky; top: calc(var(--topbar-height, 0px) + 7rem); display: grid; gap: 1rem; align-content: start; }
.pd-card-box { display: grid; gap: 0.5rem; padding: 1rem; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-card-box h3 { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--gray-500); }
.pd-card-box__picture { width: 100%; max-width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: var(--pd-radius-sm); }
.pd-card-box__picture.is-empty { background: linear-gradient(135deg, color-mix(in oklab, var(--pd-area-shop) 30%, var(--pd-soft)), var(--pd-soft) 70%); }
.pd-card-box__link { display: flex; justify-content: space-between; gap: 0.5rem; margin-inline: -0.5rem; padding: 0.375rem 0.5rem; border-radius: 8px; color: inherit; text-decoration: none; }
a.pd-card-box__link:hover { background: var(--pd-soft); }
.pd-card-box__link small, .pd-card-box__empty { color: var(--gray-500); }
.pd-card-box__empty { margin: 0; }

@media (max-width: 1279px) {
    .pd-card-inspector { position: static; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); }
}

/* The price fields the table edits stay in the form, out of sight, without leaving a gap. */
.fi-grid-col:has(> .fi-sc-component > .pd-card-kept),
.pd-card-kept {
    display: none !important;
}

/* ── Article groups (catalogue): list beside the open group ────────────────────────────── */
.pd-group-dot { display: inline-block; width: 0.5rem; height: 0.5rem; margin-right: 0.375rem; border-radius: 50%; background: var(--group, var(--gray-400)); vertical-align: middle; }
.pd-groups { display: grid; grid-template-columns: minmax(0, 18rem) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.pd-groups__list { overflow: hidden; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-groups__list button { display: flex; align-items: center; gap: 0.625rem; width: 100%; padding: 0.75rem 1rem; border: 0; border-bottom: 1px solid var(--pd-line); background: none; text-align: left; cursor: pointer; color: inherit; transition: background 120ms; }
.pd-groups__list button:last-child { border-bottom: 0; }
.pd-groups__list button:hover { background: var(--pd-well); }
.pd-groups__list button.is-open { background: var(--pd-soft); }
.pd-groups__name { flex: 1; display: grid; font-weight: 600; }
.pd-groups__name small { font-weight: 400; font-size: 0.75rem; color: var(--gray-500); }
.pd-groups__count { color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-groups__panel { border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); min-width: 0; }
.pd-groups__head { display: flex; flex-wrap: wrap; align-items: center; gap: 0.75rem; padding: 0.875rem 1.125rem; border-bottom: 1px solid var(--pd-line); }
.pd-groups__head h2 { margin: 0; font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }
.pd-groups__meta { color: var(--gray-500); font-size: 0.8125rem; }
.pd-groups__actions { margin-left: auto; }
.pd-groups__fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.875rem 1.125rem; padding: 1.125rem; }
.pd-groups__field { display: grid; gap: 0.375rem; min-width: 0; }
.pd-groups__field > span { font-size: 0.75rem; font-weight: 500; color: var(--gray-500); }
.pd-groups__fixed { margin: 0; display: flex; align-items: center; height: 2.25rem; padding: 0 0.75rem; border-radius: var(--pd-radius-sm); background: var(--pd-well); color: var(--gray-600); }
.dark .pd-groups__fixed { color: var(--gray-300); }
.pd-groups__number { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8125rem; }
.pd-groups__color { width: 2.25rem; height: 2.25rem; padding: 0; border: 1px solid var(--pd-line-strong); border-radius: var(--pd-radius-sm); background: none; cursor: pointer; }
.pd-groups__parts { display: grid; gap: 0.625rem; padding: 0 1.125rem 1.125rem; }
.pd-groups__parts h3 { margin: 0; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.03em; text-transform: uppercase; color: var(--gray-500); }
.pd-groups__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 0.625rem; }
.pd-groups__part { display: flex; align-items: center; gap: 0.75rem; padding: 0.75rem 0.875rem; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); }
.pd-groups__part.is-fixed { background: var(--pd-well); }
.pd-groups__part > span { flex: 1; display: grid; min-width: 0; }
.pd-groups__part small { font-size: 0.75rem; color: var(--gray-500); }
.pd-switch { position: relative; flex: none; width: 2.5rem; height: 1.5rem; border: 0; border-radius: 999px; background: var(--pd-line-strong); cursor: pointer; transition: background 160ms; }
.pd-switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 1.25rem; height: 1.25rem; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgb(0 0 0 / 0.25); transition: transform 260ms cubic-bezier(0.3, 1.3, 0.6, 1); }
.pd-switch[aria-checked="true"] { background: var(--success-600); }
.pd-switch[aria-checked="true"]::after { transform: translateX(1rem); }
.pd-switch:disabled { opacity: 0.55; cursor: default; }
.pd-switch:focus-visible { outline: 2px solid var(--primary-500); outline-offset: 2px; }
@media (max-width: 900px) { .pd-groups { grid-template-columns: 1fr; } }
@media (prefers-reduced-motion: reduce) { .pd-switch::after { transition: none; } }

/* A card's tab panes that are not open take their grid cell along, so the open one starts at the top. */
.fi-grid-col:has(> .fi-sc-component > .pd-card-pane[style*="display: none"]) {
    display: none;
}

/* A shop product's card: its preview above the inspector, staying in view together. */
.pd-card-side { position: sticky; top: calc(var(--topbar-height, 0px) + 7rem); display: grid; gap: 1rem; align-content: start; }
.pd-card-side .pd-card-inspector { position: static; }
@media (max-width: 1279px) { .pd-card-side { position: static; } }
.pd-groups__order { display: inline-flex; gap: 0.25rem; }
.pd-groups__order button { width: 1.75rem; height: 1.75rem; border: 1px solid var(--pd-line-strong); border-radius: 999px; background: var(--pd-panel); color: var(--gray-600); cursor: pointer; transition: transform 100ms ease-out; }
.pd-groups__order button:hover { background: var(--pd-soft); }
.pd-groups__order button:active { transform: scale(0.94); }

/* The contact's file: "More" on the card, the folders below it, the file at the right (filament/clients/file*.blade.php). */
.pd-profile-card__more { margin-top: 0.75rem; padding-top: 0.625rem; border-top: 1px solid var(--pd-line); }
.pd-profile-card__more > summary { display: inline-flex; gap: 0.375rem; align-items: center; cursor: pointer; font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); list-style: none; }
.pd-profile-card__more > summary::-webkit-details-marker { display: none; }
.pd-profile-card__more > summary::before { content: ""; width: 0.375rem; height: 0.375rem; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 160ms ease-out; }
.pd-profile-card__more[open] > summary::before { transform: rotate(45deg); }
.pd-profile-card__more > summary:hover { color: var(--pd-ink); }
.pd-profile-card__more .pd-profile-card__facts { margin-top: 0.75rem; }
.pd-profile-card__contacts { margin-top: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .pd-profile-card__more > summary::before { transition: none; } }

.pd-cfile { border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); overflow: hidden; }
.pd-cfile__head { display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; align-items: center; justify-content: space-between; padding: 0.875rem 1rem; border-bottom: 1px solid var(--pd-line); }
.pd-cfile__head h2 { font-size: 1rem; font-weight: 600; }
.pd-cfile__head h2 span { font-weight: 500; color: var(--gray-500); }
.pd-cfile__head-do { display: flex; gap: 0.5rem; }
.pd-cfile__jump { font-size: 0.875rem; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }
.pd-cfile__split.is-ledger { grid-template-columns: minmax(0, 1fr); }
.pd-cfile__split.is-ledger .pd-cfile__list { border-right: 0; }
.pd-cfile__split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr); min-height: 32rem; }
@media (max-width: 1023px) { .pd-cfile__split { grid-template-columns: 1fr; } .pd-cfile__detail { border-top: 1px solid var(--pd-line); } }
.pd-cfile__list { display: grid; gap: 0.25rem; align-content: start; min-width: 0; padding: 0.75rem; border-right: 1px solid var(--pd-line); }
@media (max-width: 1023px) { .pd-cfile__list { border-right: 0; } }
.pd-cfile__search { width: 100%; padding: 0.4375rem 0.625rem; border: 1px solid var(--pd-line); border-radius: 0.5rem; background: var(--pd-well); font-size: 0.875rem; }
.pd-cfile__note { display: grid; gap: 0.5rem; justify-items: start; padding-bottom: 0.5rem; }
.pd-cfile__note textarea { width: 100%; padding: 0.5rem 0.625rem; border: 1px solid var(--pd-line); border-radius: 0.5rem; background: var(--pd-well); font-size: 0.875rem; }
.pd-cfile__lines { display: grid; gap: 1px; margin: 0; padding: 0; list-style: none; }
.pd-cfile__month { padding: 0.75rem 0.5rem 0.25rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.07em; text-transform: uppercase; color: var(--gray-500); }
.pd-cfile__month:first-child { padding-top: 0.25rem; }
.pd-cfile__line { display: grid; grid-template-columns: 1.75rem minmax(0, 1fr) auto; gap: 0.625rem; align-items: center; width: 100%; padding: 0.5rem; border: 1px solid transparent; border-radius: 0.625rem; text-align: left; }
.pd-cfile__line:not(:disabled):hover { background: var(--pd-well); }
.pd-cfile__line.is-open { background: var(--pd-well); border-color: var(--pd-line-strong); }
.pd-cfile__line:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: 1px; }
.pd-cfile__line:disabled { cursor: default; }
.pd-cfile__icon { display: grid; place-items: center; width: 1.75rem; height: 1.75rem; border: 1px solid var(--pd-line); border-radius: 0.5rem; background: var(--pd-well); color: var(--gray-500); }
.pd-cfile__icon svg { width: 0.875rem; height: 0.875rem; }
.pd-cfile__text { display: grid; min-width: 0; }
.pd-cfile__text strong, .pd-cfile__text small { overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.pd-cfile__text strong { font-size: 0.875rem; font-weight: 550; }
.pd-cfile__text small { font-size: 0.75rem; color: var(--gray-500); }
.pd-cfile__line.is-log .pd-cfile__text strong { font-weight: 450; color: var(--gray-500); }
.pd-cfile__side { display: grid; justify-items: end; gap: 2px; font-size: 0.75rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-cfile__side .pd-file__sum { font-size: 0.8125rem; color: var(--pd-ink); }
.pd-file__kept-icon { width: 0.875rem; height: 0.875rem; color: var(--success-600); }
.dark .pd-file__kept-icon { color: var(--success-400); }
.pd-cfile__empty { padding: 0.75rem 0.5rem; font-size: 0.875rem; color: var(--gray-500); }
.pd-cfile__ledger { width: 100%; border-collapse: collapse; font-size: 0.8125rem; }
.pd-cfile__ledger th { padding: 0.375rem 0.5rem; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; text-align: left; color: var(--gray-500); }
.pd-cfile__ledger td { padding: 0.5rem; border-top: 1px solid var(--pd-line); white-space: nowrap; font-variant-numeric: tabular-nums; vertical-align: top; }
.pd-cfile__ledger td small { display: block; font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); }
.pd-cfile__ledger td small[data-tone="ok"] { color: var(--success-600); }
.pd-cfile__ledger td small[data-tone="warn"], .pd-cfile__ledger td small.is-warn { color: var(--warning-600); }
.pd-cfile__ledger .is-num { text-align: right; }
.pd-cfile__ledger tr.is-clickable { cursor: pointer; }
.pd-cfile__ledger tr.is-clickable:hover td { background: color-mix(in oklab, var(--pd-well) 60%, transparent); }
.pd-cfile__ledger td.is-doc { max-width: 28rem; overflow: hidden; text-overflow: ellipsis; }
.pd-cfile__status { display: inline-flex; align-items: center; gap: 0.25rem; padding: 0.0625rem 0.5rem; border-radius: 999px; background: color-mix(in oklab, var(--success-500) 12%, transparent); color: var(--success-700); font-size: 0.75rem; font-weight: 600; }
.dark .pd-cfile__status { color: var(--success-400); }
.pd-cfile__status svg { width: 0.75rem; height: 0.75rem; }
.pd-cfile__status.is-not { background: var(--pd-well); color: var(--gray-500); }
.pd-cfile__busy { font-size: 0.8125rem; color: var(--gray-500); }
.pd-cfile.is-dropping { position: relative; }
.pd-cfile.is-dropping::after { content: attr(data-drop); position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; border: 2px dashed var(--pd-ink); border-radius: 0.75rem; background: color-mix(in oklab, var(--pd-panel) 82%, transparent); backdrop-filter: blur(6px); font-size: 1rem; font-weight: 600; pointer-events: none; }
.pd-cfile__mailtext { margin: 0; white-space: pre-line; font-size: 0.8125rem; color: var(--gray-600); }
.dark .pd-cfile__mailtext { color: var(--gray-300); }
.pd-cfile__ledger .is-num .pd-file__kept-icon { display: inline-block; margin-left: 0.375rem; vertical-align: -2px; }
.pd-cfile__ledger a, .pd-cfile__link { font-weight: 550; }
.pd-cfile__ledger a:hover, .pd-cfile__link:hover { text-decoration: underline; }
.pd-cfile__detail { display: grid; gap: 0.75rem; align-content: start; min-width: 0; padding: 1rem 1.25rem; }
.pd-cfile__detail-where { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; font-size: 0.8125rem; color: var(--gray-500); }
.pd-cfile__tag { padding: 1px 0.375rem; border: 1px solid var(--pd-line); border-radius: 0.375rem; font-size: 0.6875rem; font-weight: 600; }
.pd-cfile__detail-title { font-size: 1.0625rem; font-weight: 650; letter-spacing: -0.01em; }
.pd-cfile__sum { font-size: 1.375rem; font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }

/* Records of the contact's file: the table of what still lacks details, a record opened (filament/clients/file.blade.php, partials/record-detail). */
.pd-cfile__edit input, .pd-cfile__edit select { width: 100%; padding: 0.3125rem 0.4375rem; border: 1px solid var(--pd-line); border-radius: 0.4375rem; background: var(--pd-panel); font-size: 0.8125rem; }
.pd-cfile__ledger tr.is-open td { background: var(--pd-well); }
.pd-cfile__facts { margin: 0; }
.pd-cfile__differs { display: flex; gap: 0.375rem; align-items: center; font-size: 0.8125rem; color: var(--warning-700); }
.pd-cfile__differs svg { width: 1rem; height: 1rem; flex: none; }
.pd-cfile__edit { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.5rem 0.75rem; }
.pd-cfile__edit label { display: grid; gap: 0.25rem; font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.pd-cfile__edit .is-wide { grid-column: 1 / -1; }
.pd-cfile__history { display: grid; gap: 0.25rem; font-size: 0.8125rem; color: var(--gray-500); }
.pd-cfile__history h4 { font-size: 0.8125rem; font-weight: 600; color: var(--pd-ink); }
.pd-cfile__history time { font-variant-numeric: tabular-nums; }
.pd-cfile__list > * { min-width: 0; }
.pd-cfile__ledger-scroll { overflow-x: auto; }

/*
 * The contact's file (filament/clients/page.blade.php): a head of facts across the width, "Important" and
 * "Next up" as bands, tabs, the tab beside the side cards; a line opened takes the side cards' place.
 */
.pd-akte { display: grid; gap: 12px; }
.pd-akte__head { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr) minmax(0, 1fr) auto; gap: 16px 28px; align-items: start; padding: 18px 22px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); }
@media (max-width: 767px) { .pd-akte__head { grid-template-columns: minmax(0, 1fr); padding: 16px; } }
.pd-akte__ident { display: flex; gap: 14px; align-items: flex-start; min-width: 0; }
.pd-akte__avatar { flex: none; display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: color-mix(in oklab, var(--pd-area, #c9775a) 18%, var(--pd-panel)); color: var(--pd-area, #c9775a); font-weight: 700; }
.pd-akte__who { display: grid; gap: 4px; min-width: 0; }
.pd-akte__who h1 { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; font-size: 1.5rem; font-weight: 650; letter-spacing: -0.02em; line-height: 1.15; text-wrap: balance; }
.pd-akte__sub { font-size: 0.8125rem; color: var(--gray-500); }
.pd-akte__num { font-variant-numeric: tabular-nums; font-weight: 600; color: var(--pd-ink); }
.pd-akte__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.pd-akte__tag { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 999px; background: color-mix(in oklab, var(--tag) 14%, var(--pd-panel)); color: var(--tag); font-size: 0.75rem; font-weight: 600; }
.pd-akte__tag::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--tag); }
.pd-akte__tag.is-add { border: 1px dashed var(--pd-line-strong); background: transparent; color: var(--gray-500); }
.pd-akte__tag.is-add::before { display: none; }
.pd-akte__tag.is-add:hover { color: var(--pd-ink); }
.pd-akte__reach { min-width: 0; }
.pd-akte__facts { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 14px; align-items: start; margin: 0; font-size: 0.8125rem; }
.pd-akte__facts > div { display: contents; }
.pd-akte__facts dt { font-size: 0.75rem; color: var(--gray-500); }
.pd-akte__facts dd { min-width: 0; margin: 0; overflow-wrap: anywhere; }
.pd-akte__edit { max-width: 100%; margin: -2px -6px; padding: 2px 6px; border-radius: 6px; text-align: left; cursor: text; }
.pd-akte__edit:hover { background: var(--pd-soft); }
.pd-akte__edit:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: 1px; }
.pd-akte__edit.is-block { display: block; width: calc(100% + 12px); }
.pd-akte__edit .is-empty { color: var(--gray-400); }
.pd-akte__input { width: 100%; padding: 3px 8px; border: 1px solid var(--pd-line-strong); border-radius: 7px; background: var(--pd-well); font: inherit; color: inherit; }
.pd-akte__input.is-area { resize: vertical; min-height: 2.5rem; }
.pd-akte__address { display: grid; grid-template-columns: minmax(0, 0.6fr) minmax(0, 1fr); gap: 6px; }
.pd-akte__address .is-wide { grid-column: 1 / -1; }
.pd-akte__address-do { display: flex; gap: 6px; }
.pd-akte__more { margin-top: 8px; font-size: 0.8125rem; }
.pd-akte__more > summary { display: inline-flex; gap: 6px; align-items: center; cursor: pointer; color: var(--gray-500); font-size: 0.75rem; font-weight: 600; list-style: none; }
.pd-akte__more > summary::-webkit-details-marker { display: none; }
.pd-akte__more > summary::before { content: ""; width: 5px; height: 5px; border-right: 1.5px solid currentColor; border-bottom: 1.5px solid currentColor; transform: rotate(-45deg); transition: transform 180ms cubic-bezier(.2, .9, .25, 1); }
.pd-akte__more[open] > summary::before { transform: rotate(45deg); }
.pd-akte__more > summary:hover { color: var(--pd-ink); }
.pd-akte__more .pd-akte__facts { margin-top: 8px; }
.pd-akte__kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; }
.pd-akte__kpi { display: grid; gap: 1px; min-width: 0; }
.pd-akte__kpi strong { font-size: 1.0625rem; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.pd-akte__kpi small { font-size: 0.75rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-akte__label { font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); }
.pd-akte__actions { display: flex; flex-direction: column; gap: 8px; align-items: stretch; }
@media (max-width: 1279px) { .pd-akte__head { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .pd-akte__actions { grid-column: 1 / -1; flex-direction: row; flex-wrap: wrap; align-items: center; } }
@media (max-width: 767px) { .pd-akte__head { grid-template-columns: minmax(0, 1fr); } }
.pd-akte__band { display: flex; align-items: center; gap: 14px; padding: 10px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-panel); font-size: 0.875rem; }
.pd-akte__band-label { display: inline-flex; align-items: center; gap: 4px; flex: none; width: 104px; font-size: 0.6875rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--gray-500); }
.pd-akte__band-label svg { width: 0.875rem; height: 0.875rem; color: var(--warning-600); }
.pd-akte__band-body { flex: 1; min-width: 0; }
.pd-akte__band-meta { flex: none; font-size: 0.75rem; color: var(--gray-500); }
.pd-akte__next { display: grid; gap: 6px; flex: 1; min-width: 0; margin: 0; padding: 0; list-style: none; }
.pd-akte__next li { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; }
.pd-akte__next li > :last-child { margin-left: auto; }
.pd-akte__next li strong { min-width: 0; overflow-wrap: anywhere; }
.pd-akte__next li.is-late strong { color: var(--warning-700); }
.pd-akte__when { font-size: 0.75rem; color: var(--gray-500); }
@media (max-width: 767px) { .pd-akte__band { flex-direction: column; align-items: stretch; gap: 6px; } .pd-akte__band-label { width: auto; } }
.pd-akte__tabs { display: flex; gap: 2px; margin-top: 6px; border-bottom: 1px solid var(--pd-line); overflow-x: auto; scrollbar-width: none; }
.pd-akte__tabs button { display: inline-flex; align-items: center; gap: 6px; margin-bottom: -1px; padding: 10px 14px; border-bottom: 2px solid transparent; font-size: 0.8125rem; font-weight: 600; color: var(--gray-500); white-space: nowrap; }
.pd-akte__tabs button:hover { color: var(--pd-ink); }
.pd-akte__tabs button[aria-selected="true"] { border-color: var(--pd-ink); color: var(--pd-ink); }
.pd-akte__tabs button:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: -2px; }
.pd-akte__count { padding: 0 6px; border-radius: 999px; background: var(--pd-soft); font-size: 0.6875rem; color: var(--gray-500); font-variant-numeric: tabular-nums; }
.pd-akte__work { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 20px; align-items: start; margin-top: 6px; transition: opacity 150ms; }
.pd-akte__work.is-reading { grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr); }
.pd-akte__work.is-reading.is-ledger { grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); }
.pd-akte__work.is-stale { opacity: 0.6; }
@media (max-width: 1023px) { .pd-akte__work, .pd-akte__work.is-reading, .pd-akte__work.is-reading.is-ledger { grid-template-columns: minmax(0, 1fr); } }
.pd-akte__main { display: grid; gap: 10px; align-content: start; min-width: 0; }
.pd-akte__aside { display: grid; gap: 12px; align-content: start; min-width: 0; }
.pd-akte__card { padding: 14px 16px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); min-width: 0; }
.pd-akte__card-title { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 10px; font-size: 0.8125rem; font-weight: 700; }
.pd-akte__card-do { display: grid; place-items: center; width: 26px; height: 26px; border: 1px solid var(--pd-line-strong); border-radius: 50%; }
.pd-akte__card-do svg { width: 0.875rem; height: 0.875rem; }
.pd-akte__card-do:hover, .pd-akte__card-link:hover { background: var(--pd-soft); }
.pd-akte__card-link { padding: 2px 10px; border: 1px solid var(--pd-line-strong); border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pd-akte__card-line { font-size: 0.8125rem; }
.pd-akte__card-sub { font-size: 0.75rem; color: var(--gray-500); }
.pd-akte__none { font-size: 0.8125rem; color: var(--gray-500); }
.pd-akte__people { display: grid; gap: 4px; margin: 0; padding: 0; list-style: none; }
.pd-akte__people a { display: flex; align-items: center; gap: 10px; margin: 0 -6px; padding: 4px 6px; border-radius: 8px; }
.pd-akte__people a:hover { background: var(--pd-well); }
.pd-akte__mini { flex: none; display: grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; background: var(--pd-soft); color: var(--gray-500); font-size: 0.6875rem; font-weight: 700; }
.pd-akte__person { display: grid; min-width: 0; font-size: 0.8125rem; }
.pd-akte__person small { font-size: 0.75rem; color: var(--gray-500); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pd-akte__manage { margin-top: 10px; }
.pd-akte__consents { display: grid; gap: 6px; margin: 0; font-size: 0.8125rem; }
.pd-akte__consents > div { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.pd-akte__consents dt small { display: block; font-size: 0.75rem; color: var(--gray-500); }
.pd-akte__consents dd { margin: 0; }
.pd-akte__composer { display: grid; gap: 6px; padding: 10px 14px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-akte__composer textarea { width: 100%; min-height: 2.75rem; border: 0; background: transparent; font: inherit; font-size: 0.875rem; resize: vertical; outline: none; }
.pd-akte__composer-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; }
.pd-akte__hint { font-size: 0.75rem; color: var(--gray-400); }
.pd-akte__chips { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-akte__chips button { padding: 3px 10px; border: 1px solid var(--pd-line-strong); border-radius: 999px; background: var(--pd-panel); font-size: 0.75rem; font-weight: 600; color: var(--gray-500); }
.pd-akte__chips button[aria-pressed="true"] { border-color: var(--pd-ink); background: var(--pd-ink); color: var(--pd-canvas, #fff); }
.pd-akte__chips button:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: 2px; }
.pd-akte__switch { display: inline-flex; gap: 6px; align-items: center; margin-left: auto; font-size: 0.75rem; color: var(--gray-500); cursor: pointer; }
.pd-akte__lines { gap: 6px; }
.pd-akte__lines .pd-cfile__line { border-color: var(--pd-line); background: var(--pd-panel); padding: 10px 12px; transition: background 120ms, box-shadow 200ms, transform 120ms ease-out; }
.pd-akte__lines .pd-cfile__line:not(:disabled):hover { box-shadow: 0 10px 24px -16px rgb(0 0 0 / .35); }
.pd-akte__lines .pd-cfile__line:not(:disabled):active { transform: scale(.995); }
.pd-akte__lines .pd-cfile__line.is-open { border-color: var(--pd-ink); }
.pd-akte__lines .pd-cfile__line.is-log { border-style: dashed; background: transparent; padding-block: 6px; }
.pd-akte__lines .pd-cfile__icon[data-tone="in"] { background: color-mix(in oklab, var(--info-500) 14%, transparent); color: var(--info-700); border-color: transparent; }
.pd-akte__lines .pd-cfile__icon[data-tone="money"] { background: color-mix(in oklab, var(--success-500) 14%, transparent); color: var(--success-700); border-color: transparent; }
.pd-akte__lines .pd-cfile__icon[data-tone="call"] { background: color-mix(in oklab, var(--warning-500) 16%, transparent); color: var(--warning-700); border-color: transparent; }
.pd-akte__job { margin-left: 6px; padding: 0 6px; border-radius: 5px; background: var(--pd-soft); font-size: 0.6875rem; font-weight: 600; color: var(--gray-500); }
.pd-akte__kept { display: inline-flex; gap: 3px; align-items: center; font-size: 0.6875rem; }
.pd-akte__reader { position: sticky; top: 12px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); animation: pd-akte-slide 320ms cubic-bezier(.2, .9, .25, 1); }
.pd-akte__aside > .pd-cfile__detail { border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); box-shadow: var(--pd-shadow); animation: pd-akte-slide 320ms cubic-bezier(.2, .9, .25, 1); }
@keyframes pd-akte-slide { from { opacity: 0; transform: translateX(16px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: reduce) { .pd-akte__reader, .pd-akte__aside > .pd-cfile__detail { animation: pd-akte-fade 160ms; } .pd-akte__more > summary::before, .pd-akte__lines .pd-cfile__line { transition: none; } }
@keyframes pd-akte-fade { from { opacity: 0; } to { opacity: 1; } }
.pd-akte__close { margin-left: auto; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: var(--gray-500); }
.pd-akte__close:hover { background: var(--pd-soft); color: var(--pd-ink); }
.pd-akte__close svg { width: 1rem; height: 1rem; }
.pd-akte__toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; }
.pd-akte__toolbar-search { flex: 1 1 14rem; width: auto; margin-left: auto; }
.pd-akte__archive.is-dropping { position: relative; }
.pd-akte__archive.is-dropping::after { content: attr(data-drop); position: absolute; inset: 0; z-index: 20; display: grid; place-items: center; border: 2px dashed var(--pd-ink); border-radius: 0.75rem; background: color-mix(in oklab, var(--pd-panel) 82%, transparent); backdrop-filter: blur(6px); font-size: 1rem; font-weight: 600; pointer-events: none; }
.pd-akte__stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 12px; }
.pd-akte__stat { display: grid; gap: 2px; }
.pd-akte__stat strong { font-size: 1.0625rem; font-weight: 700; font-variant-numeric: tabular-nums; }
.pd-akte__stat small { font-size: 0.75rem; color: var(--gray-500); }
.pd-akte__table td.is-wrap { white-space: normal; min-width: 14rem; }
.pd-akte__panel { min-width: 0; }

/* Procedure documentation and record of processing activities: printed text at reading width (filament/settings/procedure-documentation, processing-record). */
.pd-procedure { display: grid; gap: 10px; padding: 20px 24px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius); background: var(--pd-panel); }
.pd-procedure > p, .pd-procedure > ul, .pd-procedure > dl { max-width: 75ch; font-size: 0.875rem; line-height: 1.55; }
.pd-procedure h2 { font-size: 1.125rem; font-weight: 650; }
.pd-procedure h3 { margin-top: 8px; font-size: 0.9375rem; font-weight: 650; }
.pd-procedure ul { display: grid; gap: 4px; padding-left: 1.1rem; list-style: disc; }
.pd-procedure dl { display: grid; grid-template-columns: auto 1fr; gap: 4px 16px; }
.pd-procedure dt { color: var(--gray-500); }
.pd-procedure__meta { font-size: 0.8125rem; color: var(--gray-500); }
@media print { .fi-topbar, .fi-sidebar, .fi-header, .pd-settings-nav, form .fi-section { display: none !important; } .pd-procedure { border: 0; padding: 0; } }
.pd-akte__proof code { font-size: 0.6875rem; color: var(--gray-500); }
.pd-akte__proof small.is-warn, .pd-akte__stat small.is-warn, .pd-akte__proofbox .is-warn { color: var(--danger-600); }
.pd-akte__proofbox { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 4px 12px; margin: 0; padding: 10px 12px; border: 1px solid var(--pd-line); border-radius: var(--pd-radius-sm); background: var(--pd-well); font-size: 0.75rem; }
.pd-akte__proofbox dt { color: var(--gray-500); }
.pd-akte__proofbox dd { margin: 0; min-width: 0; overflow-wrap: anywhere; }
.pd-akte__proofbox code { font-size: 0.6875rem; }
.pd-akte__card-gap { margin-top: 8px; }
.pd-akte__seg { display: inline-flex; flex-wrap: wrap; gap: 2px; padding: 3px; border-radius: 999px; background: var(--pd-soft); justify-self: start; }
.pd-akte__seg button { padding: 3px 12px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; color: var(--gray-500); transition: background 150ms, color 150ms; }
.pd-akte__seg button[aria-checked="true"] { background: var(--pd-panel); color: var(--pd-ink); box-shadow: var(--pd-shadow); }
.pd-akte__seg button:hover { color: var(--pd-ink); }
.pd-akte__seg button:focus-visible { outline: 2px solid var(--pd-ink); outline-offset: 1px; }
.pd-akte__seg.is-small button { padding: 2px 9px; }
.pd-akte__fields { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.pd-akte__input.is-narrow { width: 5rem; }
.pd-akte__input.is-auto { width: auto; }
.pd-akte__composer .pd-akte__input { font-size: 0.75rem; padding: 3px 8px; }
.pd-akte__composer-foot .pd-akte__input { margin-right: auto; max-width: 100%; }
.pd-akte__check { display: inline-flex; gap: 6px; align-items: center; font-size: 0.75rem; }
@media (prefers-reduced-motion: reduce) { .pd-akte__seg button { transition: none; } }
.pd-akte__next-do { display: inline-flex; gap: 6px; margin-left: auto; }
.pd-akte__composer-foot { flex-wrap: wrap; }
.pd-akte__composer-foot .fi-btn { white-space: nowrap; }
@media (hover: none) { .pd-akte__composer-foot .pd-akte__hint { display: none; } }
.pd-akte__main > *, .pd-akte__archive > * { min-width: 0; }
.pd-akte__stats { grid-template-columns: repeat(auto-fit, minmax(min(12rem, 100%), 1fr)); }
.pd-mail__restricted { display: flex; gap: 6px; align-items: center; } .pd-mail__restricted svg { width: 1rem; height: 1rem; flex: none; }
