
/* Postal details recall envelope stamps, sorting labels and paper forms. */
.cf-page {
    --post-red: #a7524c;
    --post-paper: #faf4e9;
    --post-ink: #253f4d;
    --post-rule: #d9cab7;
}

[data-theme='dark'] .cf-page {
    --post-red: #dc9a89;
}

.cf-page .cf-demo-wrap {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    background-color: #e9bea3;
}

.cf-page .cf-demo-wrap::before {
    position: absolute;
    inset: 0 0 auto;
    height: .33rem;
    background: repeating-linear-gradient(130deg, #a7524c 0 13px, #f4dcc9 13px 21px, #35596d 21px 34px, #f4dcc9 34px 42px);
    opacity: .76;
    content: '';
}

.cf-postmark {
    position: absolute;
    z-index: -1;
    right: 1.5rem;
    top: 1.15rem;
    width: 5rem;
    aspect-ratio: 1;
    border: .13rem solid #724a45;
    outline: .08rem solid #724a45;
    outline-offset: -.45rem;
    border-radius: 50%;
    transform: rotate(-12deg);
    opacity: .32;
    pointer-events: none;
}

.cf-postmark::after {
    position: absolute;
    top: 1.7rem;
    right: 3.95rem;
    width: 4.1rem;
    height: 1.5rem;
    background: repeating-linear-gradient(to bottom, #724a45 0 .1rem, transparent .1rem .42rem);
    mask-image: linear-gradient(to left, black, transparent);
    content: '';
}

.cf-post-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .4rem clamp(.9rem, 3vw, 2rem);
    padding: .85rem .35rem .75rem;
    margin: .75rem 0 0;
    border-bottom: 1px solid var(--shop-border);
    font-size: .9rem;
    font-weight: 690;
}

.cf-post-nav a, .cf-post-example-link a {
    color: var(--shop-text);
    text-decoration-thickness: 1px;
    text-underline-offset: .23em;
}

.cf-post-nav a:hover, .cf-post-example-link a:hover {
    color: var(--post-red);
}

.cf-page #demo, .cf-page .cf-post-panel {
    scroll-margin-top: 8rem;
}

.cf-post-panel {
    margin-top: clamp(1.4rem, 3.5vw, 2.5rem);
    border: 1px solid var(--shop-border);
    border-radius: clamp(1rem, 3vw, 1.7rem);
    padding: clamp(1.2rem, 4vw, 3.5rem);
    background: var(--shop-surface);
}

.cf-post-heading {
    margin-bottom: clamp(1.25rem, 3vw, 2.1rem);
}

.cf-post-heading h2 {
    max-width: 25ch;
    margin: 0;
    font: 700 clamp(1.85rem, 4vw, 3.15rem) / 1.1 var(--shop-display);
    letter-spacing: -.025em;
    text-wrap: balance;
}

.cf-post-heading p {
    max-width: 62ch;
    margin: .75rem 0 0;
    color: var(--shop-muted);
}

.cf-letter-grid, .cf-post-setup {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(.7rem, 2vw, 1.4rem);
}

.cf-letter {
    position: relative;
    display: flex;
    flex-direction: column;
    min-width: 0;
    padding: clamp(1rem, 2.6vw, 1.6rem);
    border: 1px solid var(--post-rule);
    border-radius: .75rem;
    background: var(--post-paper);
    color: var(--post-ink);
    box-shadow: 0 .35rem .7rem #243d4610;
}

.cf-letter-mark {
    display: block;
    width: 1.65rem;
    height: 1.32rem;
    margin-bottom: .7rem;
    transform: rotate(-7deg);
    border: 2px dotted #a7524c;
    background: #e9bea361;
}

.cf-letter:nth-child(2) .cf-letter-mark {
    border-color: #35596d;
    background: #91b1bb38;
}

.cf-letter:nth-child(3) .cf-letter-mark {
    border-color: #957543;
    background: #e9c46a43;
}

.cf-letter h3, .cf-post-notes h3, .cf-post-setup h3 {
    margin: 0 0 .5rem;
    font-size: clamp(1rem, 1.9vw, 1.22rem);
    line-height: 1.28;
}

.cf-letter p, .cf-post-notes p, .cf-post-setup p {
    margin: 0;
}

.cf-letter-fields {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem .5rem;
    padding: .75rem 0 0;
    margin: 1.05rem 0 0;
    border-top: 1px dashed #ad9985;
    list-style: none;
    font-size: .81rem;
    font-weight: 660;
}

.cf-letter-fields li:not(:last-child)::after {
    margin-inline-start: .45rem;
    color: #83514b;
    content: '→';
}

.cf-post-example-link {
    margin-top: 1.1rem;
    font-weight: 680;
}

.cf-post-board {
    margin: 0;
    border: 1px solid #c6af9e;
    border-radius: 1rem;
    padding: clamp(.85rem, 3vw, 2.25rem);
    background-color: #eacfb9;
    background-image: repeating-linear-gradient(129deg, transparent 0 36px, #894f4614 37px 38px);
    color: var(--post-ink);
}

.cf-post-board-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
    align-items: stretch;
    gap: clamp(.55rem, 2vw, 1rem);
}

.cf-board-window {
    overflow: hidden;
    min-width: 0;
    border-radius: .82rem;
    background: #fffdf8;
    box-shadow: 0 .6rem 1.5rem #52362f1c;
}

.cf-board-bar {
    display: flex;
    align-items: center;
    gap: .55rem;
    padding: .6rem .86rem;
    background: #294b59;
    color: #fffdf8;
    font-size: .81rem;
}

.cf-board-bar > span {
    color: #ecc378;
    letter-spacing: .12em;
}

.cf-board-body {
    padding: clamp(.75rem, 2.6vw, 1.3rem);
}

.cf-board-body > small {
    display: block;
    margin-bottom: .5rem;
    color: #4d6268;
}

.cf-board-list {
    display: grid;
    gap: .4rem;
    padding: 0;
    margin: 0;
    list-style: none;
}

.cf-board-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: .55rem;
    padding: .42rem .55rem;
    border: 1px solid #d7dfdb;
    border-radius: .35rem;
    font-size: .83rem;
}

.cf-board-list small {
    white-space: nowrap;
    color: #3e646a;
}

.cf-board-message {
    padding: .65rem .75rem;
    border: 1px solid #d7dfdb;
    border-inline-start: 3px solid #a7524c;
    border-radius: .35rem;
    font-size: .88rem;
}

.cf-board-message p {
    margin: .25rem 0 .55rem;
}

.cf-board-status {
    display: inline-block;
    border-radius: .3rem;
    padding: .13rem .35rem;
    background: #e9efeb;
    color: #28565b;
    font-size: .75rem;
    font-weight: 690;
}

.cf-board-route {
    display: grid;
    align-items: center;
    color: #6c4c47;
    font-size: clamp(1.2rem, 3vw, 2rem);
}

.cf-post-board figcaption {
    margin-top: .9rem;
    color: #463e3a;
    font-size: .82rem;
    text-align: center;
}

.cf-post-notes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: clamp(1.15rem, 4vw, 2.5rem);
    margin-top: 1.6rem;
}

.cf-post-notes p, .cf-post-setup p, .cf-post-disclosures li {
    color: var(--shop-muted);
}

.cf-post-disclosures {
    display: grid;
    gap: .55rem;
}

.cf-post-disclosures details {
    border: 1px solid var(--shop-border);
    border-radius: .65rem;
    background: var(--shop-background);
}

.cf-post-disclosures summary {
    padding: .85rem 1rem;
    font-weight: 720;
    cursor: pointer;
}

.cf-post-disclosures summary::marker {
    color: var(--post-red);
}

.cf-post-disclosures ul {
    margin: 0;
    padding: 0 1.2rem .9rem 2.05rem;
}

.cf-post-disclosures li + li {
    margin-top: .4rem;
}

.cf-post-setup {
    margin: 0;
    padding: 0;
    list-style: none;
}

.cf-post-setup > li {
    min-width: 0;
    border-top: 1px solid var(--shop-border);
    padding-top: .75rem;
}

.cf-post-setup-number {
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    margin-bottom: .55rem;
    border: 1px solid var(--post-red);
    border-radius: 50%;
    color: var(--post-red);
    font-size: .82rem;
    font-weight: 760;
}

.cf-post-setup .cf-install-code {
    margin-top: .65rem;
    max-width: 100%;
    font-size: .83rem;
}

@media (max-width: 840px) {
    .cf-letter-grid, .cf-post-setup {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 650px) {
    .cf-post-board-content, .cf-post-notes {
        grid-template-columns: 1fr;
    }

    .cf-board-route {
        justify-content: center;
        line-height: 1;
    }

    .cf-board-route span {
        transform: rotate(90deg);
    }
}

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


.cf-post-examples .cf-post-heading {
    display: grid;
    grid-template: "title paper" auto "intro paper" auto / minmax(0, 1fr) auto;
    align-items: center;
    column-gap: clamp(.75rem, 3vw, 2.5rem);
}
.cf-post-examples .cf-post-heading h2 { grid-area: title; }
.cf-post-examples .cf-post-heading p { grid-area: intro; }
.cf-crumpled-letter {
    grid-area: paper;
    position: relative;
    display: grid;
    place-items: center;
    inline-size: clamp(4.2rem, 11vw, 8.5rem);
    aspect-ratio: 1.18;
    font-size: clamp(.62rem, 1.1vw, .9rem);
}
.cf-crumpled-letter::before {
    content: '';
    position: absolute;
    inset: 44% 24% 11% 0;
    border-bottom: .12rem dashed #ae7665;
    border-radius: 0 0 45% 65%;
    transform: rotate(-12deg);
}
.cf-crumpled-sheet {
    position: relative;
    display: block;
    inline-size: 61%;
    aspect-ratio: .85;
    filter: drop-shadow(0 .22rem .12rem #182c3835);
    transform: translate(1%, -7%) rotate(-13deg);
}
.cf-crumpled-sheet > span {
    position: absolute;
    inset: 0;
    clip-path: polygon(10% 8%, 35% 3%, 59% 7%, 72% 1%, 94% 21%, 91% 42%, 99% 54%, 88% 70%, 91% 92%, 62% 97%, 43% 89%, 23% 98%, 2% 82%, 9% 63%, 3% 47%, 13% 27%);
    background:
        conic-gradient(from 16deg at 58% 52%, #fff9ea 0 33deg, #d9cdba 35deg 76deg, #eee1cb 77deg 116deg, #bfae96 117deg 149deg, #f9efdb 151deg 192deg, #d4c6b0 194deg 228deg, #f9f0df 229deg 268deg, #dcd0bc 270deg 303deg, #ede2cd 304deg 360deg);
    border: 1px solid #ccbca3;
}
.cf-crumpled-sheet > span::before,
.cf-crumpled-sheet > span::after {
    content: '';
    position: absolute;
    block-size: 21%;
    background: repeating-linear-gradient(to bottom, #45606c8c 0 1px, transparent 1px 4px);
    border-radius: 1px;
}
.cf-crumpled-sheet > span::before { inset: 23% 30% auto 24%; transform: rotate(4deg); }
.cf-crumpled-sheet > span::after { inset: 56% 21% auto 39%; transform: rotate(-16deg); }
.cf-crumpled-return {
    position: absolute;
    inset: auto 5% 10% auto;
    display: grid;
    place-items: center;
    inline-size: 1.53em;
    aspect-ratio: 1;
    border: 1px solid #985344;
    border-radius: 50%;
    background: #f3d9cb;
    color: #713b31;
    font: 750 1.25em/1 var(--shop-sans);
}
@media (max-width: 36rem) {
    .cf-post-examples .cf-post-heading { grid-template-areas: "title paper" "intro intro"; }
}
