/* The portal's own pages, as designed in Pencil (untitled.pen): its colour variables, light and dark. */

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin-ext.woff2') format('woff2-variations');
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-display: swap;
    font-weight: 100 900;
    src: url('../fonts/inter/inter-latin.woff2') format('woff2-variations');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
    color-scheme: light;
    --bg: #F8F9FB;
    --surface: #FFFFFF;
    --soft: #EFF1F5;
    --ink: #14151A;
    --muted: #555A66;
    --line: #DFE2E9;
    --pink: #A43850;
    --tint: #FCEBF0;
    --button: #17181D;
    --onbutton: #FFFFFF;
    --bad: #A42C45;
    --bad-bg: #FCE8EE;
    --good: #216449;
    --good-bg: #E4F3EA;
    --warn: #80511C;
    --warn-bg: #FFF0DC;
    /* The Crab Atlas map on Home. */
    --atlas-bg: #FCF5F7;
    --atlas-wash: #F8E5EC;
    --atlas-grid: #68384913;
    --atlas-border: #EAD8E0;
    --atlas-land: #A06F86;
    --atlas-text: #643549;
    --atlas-note: #644D5A;
    --atlas-pin: #AA3F5C;
    --atlas-pin-icon: #FFFFFF;
    --atlas-pin-outline: #FFF9FB;
    --atlas-tag: #FFFBFC;
    --atlas-tag-border: #DBC1CD;
}

/* Dark: chosen with the header's switch (data-theme on <html>), else the device's own setting. */
@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) {
        color-scheme: dark;
        --bg: #121316;
        --surface: #1B1D22;
        --soft: #23262C;
        --ink: #F4F4F6;
        --muted: #AFB1BD;
        --line: #32353E;
        --pink: #FFA1AC;
        --tint: #3C242F;
        --button: #F6F5F7;
        --onbutton: #141519;
        --bad: #FFADBA;
        --bad-bg: #48232D;
        --good: #9BE0B9;
        --good-bg: #203A30;
        --warn: #FFD399;
        --warn-bg: #40301F;
        --atlas-bg: #19151D;
        --atlas-wash: #39232F;
        --atlas-grid: #FFFFFF0B;
        --atlas-border: #FFFFFF0C;
        --atlas-land: #C496A7;
        --atlas-text: #FFD4DB;
        --atlas-note: #E1B9C4;
        --atlas-pin: #FFA1AC;
        --atlas-pin-icon: #331C28;
        --atlas-pin-outline: #271B26;
        --atlas-tag: #211923;
        --atlas-tag-border: #644550;
    }
}

:root[data-theme="dark"] {
    color-scheme: dark;
    --bg: #121316;
    --surface: #1B1D22;
    --soft: #23262C;
    --ink: #F4F4F6;
    --muted: #AFB1BD;
    --line: #32353E;
    --pink: #FFA1AC;
    --tint: #3C242F;
    --button: #F6F5F7;
    --onbutton: #141519;
    --bad: #FFADBA;
    --bad-bg: #48232D;
    --good: #9BE0B9;
    --good-bg: #203A30;
    --warn: #FFD399;
    --warn-bg: #40301F;
    --atlas-bg: #19151D;
    --atlas-wash: #39232F;
    --atlas-grid: #FFFFFF0B;
    --atlas-border: #FFFFFF0C;
    --atlas-land: #C496A7;
    --atlas-text: #FFD4DB;
    --atlas-note: #E1B9C4;
    --atlas-pin: #FFA1AC;
    --atlas-pin-icon: #331C28;
    --atlas-pin-outline: #271B26;
    --atlas-tag: #211923;
    --atlas-tag-border: #644550;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
}

body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background: var(--bg);
    color: var(--ink);
    font-family: 'Inter', system-ui, sans-serif;
    font-size: 14px;
    line-height: normal;
}

a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

:focus-visible {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

[hidden] {
    display: none !important;
}

.icon {
    display: block;
    flex: none;
    fill: currentColor;
}

/* Which logo and switch icon shows for the mode in use. */
.when-dark {
    display: none;
}

:root[data-theme="dark"] .when-dark {
    display: block;
}

:root[data-theme="dark"] .when-light {
    display: none;
}

@media (prefers-color-scheme: dark) {
    :root:not([data-theme="light"]) .when-dark {
        display: block;
    }

    :root:not([data-theme="light"]) .when-light {
        display: none;
    }
}

/* Header ("Site header"). */
.site-header {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.site-nav {
    width: 100%;
    max-width: 1168px;
    height: 68px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.brand {
    display: flex;
    align-items: center;
    gap: 9px;
}

.brand:hover {
    text-decoration: none;
}

.brand-logo {
    width: 29.0625px;
    height: 31px;
    object-fit: contain;
}

.brand-name {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--ink);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-link {
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

.nav-link[aria-current="page"] {
    font-weight: 650;
    color: var(--ink);
}

.icon-button {
    width: 36px;
    height: 36px;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 1px solid var(--line);
    border-radius: 10px;
    background: transparent;
    color: var(--ink);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--soft);
}

.menu-button {
    display: none;
}

.site-menu {
    border-top: 1px solid var(--line);
    padding: 8px 22px 14px;
    display: flex;
    flex-direction: column;
}

.site-menu a {
    padding: 10px 0;
    font-size: 13px;
    font-weight: 500;
    color: var(--muted);
}

/* Buttons. */
.button {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    gap: 9px;
    border: 0;
    background: var(--button);
    color: var(--onbutton);
    font-family: inherit;
    font-weight: 600;
    cursor: pointer;
}

.button:hover {
    text-decoration: none;
    opacity: 0.88;
}

.button-small {
    height: 36px;
    padding: 0 14px;
    border-radius: 10px;
    font-size: 13px;
}

/* Page body. */
.site-main {
    flex: 1;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Footer ("Site footer"). */
.site-footer {
    border-top: 1px solid var(--line);
}

.footer-contents {
    width: 100%;
    max-width: 1168px;
    margin: 0 auto;
    padding: 23px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    font-size: 12px;
    color: var(--muted);
}

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

/* Log in and its two-step code ("Sign-in card", "Account form"). */
.auth-page {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 63px 24px 72px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 26px;
    /* The design's 34, less the 1px border: its borders are drawn inside and take no room. So for every padding by a border. */
    padding: 33px;
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.auth-intro {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.auth-icon {
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: var(--tint);
    color: var(--pink);
    display: flex;
    justify-content: center;
    align-items: center;
}

.auth-title {
    margin: 0;
    font-size: 43px;
    font-weight: 700;
    letter-spacing: -2.2px;
    color: var(--ink);
}

.auth-text {
    margin: 0;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.auth-fields {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.field-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--ink);
}

.input {
    width: 100%;
    height: 46px;
    padding: 0 12px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--bg);
    color: var(--ink);
    font-family: inherit;
    font-size: 14px;
}

.input::placeholder {
    color: var(--muted);
    opacity: 1;
}

.input[aria-invalid="true"] {
    border-color: var(--bad);
}

/* An input with a button inside it (the password's show and hide). */
.input-wrap {
    position: relative;
}

.input-wrap .input {
    padding-right: 42px;
}

.reveal {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 100%;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.reveal[aria-pressed="true"] {
    color: var(--ink);
}

.button-block {
    width: 100%;
    height: 48px;
    padding: 0 20px;
    border-radius: 13px;
    font-size: 14px;
}

.auth-link {
    align-self: flex-start;
    font-size: 12px;
    font-weight: 600;
    color: var(--pink);
}

.separator {
    width: 100%;
    height: 1px;
    margin: 0;
    border: 0;
    background: var(--line);
}

.auth-help {
    margin: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--muted);
}

.auth-help a {
    font-weight: 650;
    color: var(--pink);
}

/* The smaller card ("Account form": two-step code, forgot password): its own sizes in the design. */
.auth-page-small {
    padding-top: 62px;
}

.auth-card-small {
    max-width: 446px;
    border-radius: 20px;
    padding: 29px;
    gap: 17px;
}

.auth-card-small .auth-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
}

.auth-card-small .auth-title {
    font-size: 38px;
    font-weight: 650;
    letter-spacing: -1.7px;
    line-height: 1.12;
}

.auth-card-small .auth-text {
    font-size: 14px;
    line-height: 1.45;
}

.auth-card-small .auth-form {
    gap: 17px;
}

.auth-card-small .field {
    gap: 6px;
}

.auth-card-small .field-label {
    line-height: 1.25;
}

.auth-card-small .input {
    height: 41px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

/* A value shown, not typed ("Read-only value": the email on Set password), with a lock at its end (.input-icon). */
.input-readonly {
    background: var(--soft);
    color: var(--muted);
}

.input-readonly:focus-visible {
    outline: none;
}

.input-icon {
    position: absolute;
    top: 0;
    right: 0;
    width: 42px;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    color: var(--muted);
    pointer-events: none;
}

/* The show and hide button and the lock: their 14px icon 11px in from the edge, as the design. */
.auth-card-small .input-wrap .input {
    padding-right: 36px;
}

.auth-card-small .reveal,
.auth-card-small .input-icon {
    width: 36px;
}

.auth-card-small .button-block {
    height: 42px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
}

/* Notices ("Couldn’t save changes notice"). */
.notice {
    border-radius: 12px;
    padding: 13px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.notice-bad {
    background: var(--bad-bg);
    color: var(--bad);
}

/* "Changes saved notice". */
.notice-good {
    background: var(--good-bg);
    color: var(--good);
}

/* "Back link" under a form. */
.auth-back {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 650;
    color: var(--pink);
}

.notice-title {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 650;
    line-height: 1.26;
}

.notice-message {
    margin: 0;
    font-size: 13px;
    line-height: 1.45;
}

/* The order's payment page ("Payment request /order/{token}"). */
.order-page {
    width: 100%;
    max-width: 1168px;
    padding: 48px 24px 60px;
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.order-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    gap: 10px;
}

.order-identity {
    max-width: 600px;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.order-title {
    margin: 0;
    font-size: 48px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -1.7px;
    color: var(--ink);
}

.order-box {
    margin: 0;
    font-size: 22px;
    font-weight: 500;
    color: var(--muted);
}

.order-from {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.order-from-name {
    font-size: 13px;
    font-weight: 650;
    color: var(--ink);
}

.order-from-line {
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}

/* "Checkout columns · two from 1280px": under it, one column in the order header, package, business, details, payment. */
.order-columns {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.order-side {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

@media (min-width: 1280px) {
    .order-columns {
        flex-direction: row;
        align-items: flex-start;
    }

    .order-package {
        flex: none;
        width: 455px;
    }

    .order-side {
        flex: 1;
        min-width: 0;
    }
}

.panel {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 20px;
    padding: 23px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.panel-title,
.panel-subtitle {
    margin: 0;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

.panel-subtitle {
    font-size: 17px;
}

.panel-text {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.panel-note {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}

/* A label and its value on one line ("Box type detail"). */
.detail {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-size: 13px;
}

.detail-label {
    line-height: 1.3;
    color: var(--muted);
}

.detail-value {
    font-weight: 550;
    color: var(--ink);
    text-align: right;
}

.detail-strong .detail-label {
    font-weight: 650;
    color: var(--ink);
}

.detail-strong .detail-value {
    font-weight: 700;
}

.features {
    display: flex;
    flex-direction: column;
    gap: 7px;
    font-size: 13px;
    color: var(--muted);
}

.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    background: var(--soft);
    font-size: 11px;
    font-weight: 650;
    color: var(--ink);
}

.price-block {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

/* "First payment today". */
.first-payment {
    padding: 12px;
    border-radius: 11px;
    background: var(--tint);
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.first-payment .detail {
    font-size: 15px;
}

.first-payment .detail-label {
    font-weight: 650;
    color: var(--ink);
}

.first-payment .detail-value {
    font-weight: 700;
}

/* The form's fields: the small card's sizes (41 high, 13px). */
.panel .field {
    gap: 6px;
}

.panel .field-label {
    line-height: 1.25;
}

.panel .input {
    height: 41px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

.panel textarea.input {
    height: 76px;
    padding: 9px 10px;
    line-height: 1.2;
    resize: none;
}

/* "Payment provider": under Pay, centred. */
#pay-note,
#paying-note {
    text-align: center;
}

.panel .input-readonly {
    line-height: 1.2;
}

.panel .input-wrap .input {
    padding-right: 36px;
}

.panel .input-icon {
    width: 36px;
}

.panel select.input {
    appearance: none;
    cursor: pointer;
}

.panel .button-block {
    height: 42px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
}

/* Two fields side by side ("Business and assistant names"). */
.field-row {
    display: flex;
    align-items: flex-end;
    gap: 10px;
}

.field-row > .field {
    flex: 1;
    min-width: 0;
}

/* Under a field: what is wrong with it ("Field error"). */
.field-error {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--bad);
}

/* Stripe's card fields ("Stripe-hosted card element"). */
.card-box {
    min-height: 60px;
    padding: 11px;
    border: 1px solid var(--line);
    border-radius: 13px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* "Paying £79.00…": the button while the payment is confirmed. */
.button-block.is-paying {
    background: var(--soft);
    color: var(--muted);
    cursor: progress;
    opacity: 1;
}

.is-paying .icon {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@media (prefers-reduced-motion: reduce) {
    .is-paying .icon {
        animation: none;
    }
}

fieldset.order-fields {
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* "This payment link is no longer valid notice". */
.notice-warn {
    background: var(--warn-bg);
    color: var(--warn);
}

/* "Try again button", "Contact us button". */
.button-plain {
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    align-self: flex-start;
}

/* Home ("Home content": the introduction, the Crab Atlas map, the shortcuts). */
.home-page {
    width: 100%;
    max-width: 1168px;
    padding: 56px 24px 35px;
    display: flex;
    flex-direction: column;
    gap: 37px;
}

.home-intro {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    text-align: center;
}

.home-title {
    max-width: 900px;
    margin: 0;
    font-size: 70px;
    font-weight: 700;
    line-height: 1.01;
    letter-spacing: -4.8px;
    color: var(--ink);
}

.home-text {
    max-width: 485px;
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
    color: var(--muted);
}

.home-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    padding-top: 4px;
}

.button-large {
    height: 48px;
    padding: 0 20px;
    border-radius: 13px;
    font-size: 14px;
}

/* "Contact button": the surface, with a line. */
.button-outline {
    padding: 0 19px;
    border: 1px solid var(--line);
    background: var(--surface);
    color: var(--ink);
}

/* "Crab Atlas": the dotted map (the design's own, coloured here), its grid and glow, and a pin for each place. */
.atlas {
    position: relative;
    aspect-ratio: 1120 / 385;
    overflow: hidden;
    border: 1px solid var(--atlas-border);
    border-radius: 30px;
    background-color: var(--atlas-bg);
    background-image:
        linear-gradient(to right, transparent calc(100% - 1px), var(--atlas-grid) 0),
        linear-gradient(to bottom, transparent calc(100% - 1px), var(--atlas-grid) 0),
        radial-gradient(53% 62.5% at 50% 53%, var(--atlas-wash), var(--atlas-bg));
    background-size: calc(100% / 16) 100%, 100% calc(100% / 7), 100% 100%;
}

/* "World map with box location pins": 900 by 312 in the 1120 by 385 map. */
.atlas-map {
    position: absolute;
    left: 9.82%;
    top: 10.23%;
    width: 80.36%;
    height: 81.1%;
}

/* The dots only fill part of that box (the design's own drawing, atlas-dots.svg). */
.atlas-dots {
    position: absolute;
    left: 23.26%;
    top: 9.44%;
    width: 56.31%;
    height: 81.12%;
    background: var(--atlas-land);
    -webkit-mask: url('../images/atlas-dots.svg') center / 100% 100% no-repeat;
    mask: url('../images/atlas-dots.svg') center / 100% 100% no-repeat;
}

/* A place: its pin's point on the spot (App\Support\Atlas), its name beside it. */
.atlas-place {
    position: absolute;
    width: 0;
    height: 0;
}

.atlas-pin {
    position: absolute;
    left: -15px;
    top: -39px;
    width: 30px;
    height: 41px;
    display: block;
    transition: transform 0.15s ease;
}

.atlas-pin .pin-body {
    fill: var(--atlas-pin);
}

.atlas-pin .pin-outline {
    fill: var(--atlas-pin-outline);
}

.atlas-pin .pin-claw {
    fill: var(--atlas-pin-icon);
}

.atlas-tag {
    position: absolute;
    left: 19px;
    top: -34px;
    padding: 4px 8px;
    border: 1px solid var(--atlas-tag-border);
    border-radius: 7px;
    background: var(--atlas-tag);
    color: var(--atlas-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

.atlas-place:hover .atlas-pin,
.atlas-place:focus-within .atlas-pin {
    transform: translateY(-2px);
}

.atlas-place:focus-within .atlas-tag {
    outline: 2px solid var(--pink);
    outline-offset: 2px;
}

.atlas-label,
.atlas-key {
    position: absolute;
    left: 25px;
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
}

.atlas-label {
    top: 22px;
    color: var(--atlas-pin);
}

.atlas-key {
    bottom: 24px;
    font-size: 12px;
    color: var(--atlas-note);
}

.atlas-label span,
.atlas-key span {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.55px;
    color: var(--atlas-text);
}

/* "Portal shortcuts". */
.home-shortcuts {
    display: flex;
    gap: 26px;
}

.shortcut {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 13px;
    padding: 12px 13px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--surface);
}

.shortcut:hover {
    text-decoration: none;
}

.shortcut-icon {
    flex: none;
    width: 40px;
    height: 40px;
    border-radius: 11px;
    background: var(--tint);
    color: var(--pink);
    display: flex;
    justify-content: center;
    align-items: center;
}

.shortcut-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.shortcut-title {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
}

.shortcut-text {
    font-size: 12px;
    color: var(--muted);
}

@media (max-width: 720px) {
    .home-page {
        padding: 40px 22px 30px;
        gap: 30px;
    }

    .home-intro {
        gap: 13px;
    }

    .home-title {
        font-size: 43px;
        letter-spacing: -2.8px;
    }

    .home-text {
        max-width: 306px;
        font-size: 15px;
    }

    /* The phone's map: 346 by 253, the dots in a 328 by 114 box, 7 by 7 grid, smaller pins. */
    .atlas {
        aspect-ratio: 346 / 253;
        border-radius: 22px;
        background-size: calc(100% / 7) 100%, 100% calc(100% / 7), 100% 100%;
    }

    .atlas-map {
        left: 2.6%;
        top: 29.49%;
        width: 94.8%;
        height: 44.98%;
    }

    .atlas-pin {
        left: -10.5px;
        top: -27.3px;
        width: 21px;
        height: 28.7px;
    }

    /* The phone's map shows pins only; a place's name shows when its pin is tapped or focused. */
    .atlas-tag {
        left: 13px;
        top: -24px;
        padding: 3px 6px;
        font-size: 11px;
        opacity: 0;
        transition: opacity 0.15s ease;
    }

    .atlas-place:hover .atlas-tag,
    .atlas-place:focus-within .atlas-tag {
        opacity: 1;
        z-index: 2;
    }

    .atlas-label {
        left: 17px;
        top: 18px;
    }

    .atlas-key {
        left: 18px;
        bottom: 18px;
    }

    .shortcut {
        padding: 14px 0;
        border: 0;
        border-radius: 0;
        background: none;
    }
}

/* Contact ("Contact columns": the introduction and a tip beside the form). */
.contact-page {
    width: 100%;
    max-width: 1168px;
    padding: 74px 24px 78px;
}

.contact-columns {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 70px;
}

.contact-info {
    flex: 0 1 370px;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.contact-title {
    margin: 0;
    font-size: 60px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -3.5px;
    color: var(--ink);
}

.contact-tip {
    display: flex;
    align-items: center;
    gap: 12px;
}

.contact-tip-icon {
    flex: none;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: var(--tint);
    color: var(--pink);
    display: flex;
    justify-content: center;
    align-items: center;
}

.contact-tip-copy {
    display: flex;
    flex-direction: column;
    gap: 3px;
    font-size: 13px;
}

.contact-tip-title {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
}

.contact-tip-copy a {
    color: var(--pink);
}

/* "Contact form": the Log in card's field sizes (46 high, 14px). */
.contact-form {
    flex: 0 1 590px;
    padding: 31px;
    border: 1px solid var(--line);
    border-radius: 26px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.contact-form h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 650;
    letter-spacing: -0.6px;
    color: var(--ink);
}

.contact-fields {
    display: flex;
    flex-direction: column;
    gap: 17px;
}

.contact-fields .field-row {
    gap: 15px;
}

.contact-fields select.input {
    appearance: none;
    padding-right: 42px;
    cursor: pointer;
}

/* "Choose a topic", until one is: the placeholder's colour. */
.contact-fields select.input:invalid {
    color: var(--muted);
}

.contact-fields textarea.input {
    height: 116px;
    padding: 12px;
    line-height: normal;
    resize: none;
}

.contact-submit {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
}

.contact-submit p {
    margin: 0;
    font-size: 12px;
    line-height: 1.55;
    color: var(--muted);
}

@media (max-width: 720px) {
    .contact-page {
        padding: 40px 22px 42px;
    }

    .contact-columns {
        flex-direction: column;
        align-items: stretch;
        gap: 28px;
    }

    .contact-info,
    .contact-form {
        flex: none;
    }

    .contact-title {
        font-size: 42px;
        letter-spacing: -2.5px;
    }

    /* The phone's design has no separator or tip. */
    .contact-extra {
        display: none;
    }

    .contact-form {
        padding: 21px;
        border-radius: 22px;
    }

    .contact-submit {
        align-items: stretch;
    }
}

/* Terms and Privacy ("Terms content": an introduction, then "On this page" beside the document). */
.legal-page {
    width: 100%;
    max-width: 1168px;
    padding: 63px 24px 70px;
    display: flex;
    flex-direction: column;
    gap: 33px;
}

.legal-intro {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-kicker,
.legal-contents-label {
    margin: 0;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--muted);
}

.legal-title {
    margin: 0;
    font-size: 62px;
    font-weight: 700;
    line-height: 1.04;
    letter-spacing: -4px;
    color: var(--ink);
}

.legal-lead {
    margin: 0;
    font-size: 17px;
    line-height: 1.55;
    color: var(--muted);
}

/* "Draft notice": here, when the text last changed. */
.legal-notice {
    margin: 0;
    padding: 12px 14px;
    border-radius: 11px;
    background: var(--tint);
    color: var(--pink);
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.4;
}

.legal-layout {
    display: flex;
    align-items: flex-start;
    gap: 56px;
}

.legal-contents {
    flex: none;
    width: 220px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    font-size: 13px;
    color: var(--ink);
}

.legal-body {
    flex: 1;
    min-width: 0;
    max-width: 660px;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.legal-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    font-size: 15px;
    line-height: 1.55;
    color: var(--muted);
}

.legal-section p {
    margin: 0;
}

.legal-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.legal-number {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 1.5px;
    color: var(--pink);
}

.legal-section h2 {
    margin: 0;
    font-size: 22px;
    font-weight: 650;
    line-height: normal;
    letter-spacing: -0.45px;
    color: var(--ink);
}

.legal-section .legal-summary {
    font-weight: 500;
    color: var(--ink);
}

.legal-section h3 {
    margin: 0;
    font-size: 15px;
    font-weight: 650;
    color: var(--ink);
}

.legal-section ul {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.legal-section a {
    color: var(--pink);
    font-weight: 600;
}

.legal-links {
    display: flex;
    gap: 16px;
    font-size: 13px;
}

.legal-section details {
    border-top: 1px solid var(--line);
    padding-top: 10px;
}

.legal-section summary {
    font-weight: 600;
    color: var(--ink);
    cursor: pointer;
}

.legal-section details p {
    margin-top: 6px;
}

/* Phones: the Mobile frames. */
@media (max-width: 720px) {
    .legal-page {
        padding: 39px 22px 44px;
        gap: 27px;
    }

    .legal-title {
        font-size: 43px;
        letter-spacing: -2.8px;
    }

    .legal-lead {
        font-size: 15px;
    }

    .legal-layout {
        flex-direction: column;
        align-items: stretch;
        gap: 24px;
    }

    .legal-contents {
        width: auto;
    }

    .legal-body {
        gap: 20px;
    }
}

/* Phones: the Mobile frames. */
@media (max-width: 720px) {
    .order-page {
        padding: 32px 20px 38px;
    }

    .order-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .order-title {
        font-size: 36px;
    }

    .order-box {
        font-size: 18px;
    }

    .panel {
        padding: 17px;
    }

    .field-row {
        flex-direction: column;
        align-items: stretch;
    }

    .field-row.field-row-tight {
        flex-direction: row;
        align-items: flex-end;
    }
}

/* "Expiry and security code": side by side on a phone too. */
.field-row-tight {
    gap: 8px;
}

/* Phones: the Mobile frames. */
@media (max-width: 720px) {
    .site-nav {
        height: 62px;
        padding: 0 22px;
    }

    .nav-actions {
        gap: 11px;
    }

    .nav-actions .nav-link,
    .nav-actions .button-small {
        display: none;
    }

    .menu-button {
        display: flex;
    }

    .footer-contents {
        flex-direction: column;
        align-items: flex-start;
        padding: 22px 22px 25px;
    }

    .auth-page {
        padding: 40px 22px 44px;
    }

    .auth-card {
        border-radius: 22px;
        padding: 21px;
    }

    .auth-title {
        font-size: 36px;
    }

    .auth-page-small {
        padding: 40px 20px 45px;
    }

    .auth-card-small {
        border-radius: 20px;
    }

    .auth-card-small .auth-title {
        font-size: 32px;
    }
}

/* Logged in ("Signed-in shell"): the Portal navigation beside the page. */
.portal-shell {
    flex: 1;
    display: flex;
}

.portal-nav {
    position: sticky;
    top: 0;
    flex: none;
    width: 230px;
    height: 100vh;
    overflow-y: auto;
    padding: 24px 17px;
    border: 1px solid var(--line);
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 34px;
}

.portal-brand {
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-brand:hover {
    text-decoration: none;
}

.portal-logo {
    width: 27px;
    height: 29px;
    object-fit: contain;
}

.portal-wordmark {
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -0.6px;
    color: var(--ink);
}

.portal-menu {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.portal-menu-item {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 10px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--muted);
    font-family: inherit;
    font-size: 14px;
    font-weight: 650;
    cursor: pointer;
}

.portal-menu-item:hover {
    background: var(--soft);
    color: var(--ink);
    text-decoration: none;
}

.portal-menu-item[aria-current="page"] {
    background: var(--tint);
    color: var(--pink);
}

/* Not in the design: log out and the light and dark switch, at the foot of the menu. */
.portal-tools {
    margin-top: auto;
    display: flex;
    align-items: center;
    gap: 8px;
}

.portal-tools form {
    flex: 1;
    margin: 0;
}

.portal-logout {
    width: 100%;
}

.portal-main {
    flex: 1;
    min-width: 0;
    padding: 38px 40px 52px;
    display: flex;
    flex-direction: column;
    gap: 21px;
}

.portal-title {
    margin: 0;
    font-size: 42px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -1.7px;
    color: var(--ink);
}

/* Badges by state (the design's "Online badge", "Payment failed badge"). */
.badge-good {
    background: var(--good-bg);
    color: var(--good);
}

.badge-bad {
    background: var(--bad-bg);
    color: var(--bad);
}

.badge-warn {
    background: var(--warn-bg);
    color: var(--warn);
}

.badge-info {
    background: var(--tint);
    color: var(--pink);
}

/* "Removed", "Card": soft, in ink. */
.badge-plain {
    background: var(--soft);
    /* color: var(--muted); */
    color: var(--ink);
}

/* A notice's button ("Pay now button") is .button .button-plain. */
/* .notice-button {
    align-self: flex-start;
    height: 42px;
    padding: 0 13px;
    border: 1px solid var(--line);
    border-radius: 11px;
    background: var(--surface);
    color: var(--ink);
    font-size: 13px;
    font-weight: 650;
    display: inline-flex;
    align-items: center;
}

.notice-button:hover {
    background: var(--soft);
    text-decoration: none;
} */

.notice-message a {
    text-decoration: underline;
}

/* "Welcome and adverts". */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

.welcome-card,
.advert-card {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.advert-card {
    background: var(--tint);
}

.welcome-card h2,
.advert-card h2 {
    margin: 0;
    font-size: 25px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

.advert-card h2 {
    font-size: 18px;
}

.welcome-card p,
.advert-card p {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.advert-card p {
    font-size: 13px;
}

.advert-card a {
    align-self: flex-start;
    font-size: 13px;
    font-weight: 650;
    color: var(--pink);
}

.advert-card img {
    display: block;
    width: 100%;
    border-radius: 10px;
}

/* A panel of the logged-in pages ("Your boxes panel"). */
.portal-panel {
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 13px;
}

.portal-panel h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

/* "Your boxes table": a header row on soft, cells 9 apart, 7 in from each end. */
.portal-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    table-layout: fixed;
}

.portal-table th {
    padding: 9px 4.5px;
    background: var(--soft);
    text-align: left;
    font-size: 12px;
    font-weight: 650;
    line-height: 1.2;
    color: var(--muted);
}

.portal-table td {
    padding: 13px 4.5px;
    vertical-align: top;
    font-size: 13px;
    line-height: 1.32;
    color: var(--ink);
}

.portal-table th:first-child,
.portal-table td:first-child {
    padding-left: 7px;
}

.portal-table th:last-child,
.portal-table td:last-child {
    padding-right: 7px;
}

.portal-table th:first-child {
    border-radius: 7px 0 0 7px;
}

.portal-table th:last-child {
    border-radius: 0 7px 7px 0;
}

/* Not in the design (it shows one row): a line between rows. */
.portal-table tbody tr + tr td {
    border-top: 1px solid var(--line);
}

.portal-table .badge {
    display: inline-block;
}

/* The design's badges here are 21 high. */
.portal-menu .badge,
.portal-table .badge {
    line-height: 1.2;
}

.table-name {
    font-weight: 650;
    color: var(--pink);
}

.portal-table .table-empty {
    color: var(--muted);
}

@media (max-width: 720px) {
    .portal-shell {
        flex-direction: column;
    }

    .portal-nav {
        position: relative;
        width: auto;
        height: auto;
        overflow: visible;
        padding: 15px 17px;
        gap: 12px;
    }

    .portal-menu {
        flex-direction: row;
        justify-content: space-between;
        align-items: center;
        gap: 4px;
    }

    .portal-menu-item {
        padding: 7px;
        font-size: 12px;
    }

    .portal-menu .icon {
        display: none;
    }

    /* On the brand's row, at its right. */
    .portal-tools {
        position: absolute;
        top: 12px;
        right: 17px;
        margin: 0;
    }

    .portal-main {
        padding: 26px 18px 38px;
        gap: 16px;
    }

    .portal-title {
        font-size: 32px;
    }

    .dashboard-cards {
        grid-template-columns: minmax(0, 1fr);
    }

    .welcome-card h2 {
        font-size: 20px;
    }

    .portal-panel {
        padding: 14px;
    }

    .portal-panel h2 {
        font-size: 17px;
    }

    /* Each row as a list: the field's name (105 wide) beside its value. */
    .portal-table thead {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip-path: inset(50%);
    }

    .portal-table,
    .portal-table tbody {
        display: block;
    }

    .portal-table tr {
        display: flex;
        flex-direction: column;
        gap: 7px;
        padding: 9px 0;
    }

    .portal-table tbody tr + tr {
        border-top: 1px solid var(--line);
    }

    .portal-table tbody tr + tr td {
        border-top: 0;
    }

    .portal-table td,
    .portal-table td:first-child,
    .portal-table td:last-child {
        display: flex;
        justify-content: space-between;
        align-items: flex-start;
        gap: 8px;
        padding: 0;
    }

    .portal-table td[data-label]::before {
        content: attr(data-label);
        flex: none;
        width: 105px;
        font-size: 12px;
        line-height: 1.2;
        color: var(--muted);
    }

    .portal-table .cell-text {
        flex: 1;
    }
}

/* A dark button 42 high ("Start paying button"); .button-plain is its outlined twin. */
.button-medium {
    height: 42px;
    padding: 0 14px;
    border-radius: 11px;
    font-size: 13px;
    font-weight: 650;
}

/* The line under a page's title ("Box domain"). */
.portal-subtitle {
    margin: 0;
    font-size: 15px;
    line-height: 1.45;
    color: var(--muted);
}

/* Two panels side by side ("Addresses and box"). */
.panel-pair {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: start;
    gap: 14px;
}

/* A panel of label and value rows (.detail) ("Box panel"). */
.detail-panel {
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.detail-panel h2,
.dialog-title {
    margin: 0;
    font-size: 19px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

/* "Now status": the badge level with its label. */
.detail-badge {
    align-items: center;
    gap: 6px;
}

.detail-badge .detail-label {
    line-height: normal;
}

.detail-panel .badge {
    line-height: 1.2;
}

.detail-value a {
    color: var(--pink);
}

.panel-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

/* "Table heading": the title, and its button at the right. */
.panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 8px;
}

.panel-head .button-plain {
    flex: none;
    align-self: auto;
}

/* Dialogs ("Portal dialogs"): centred on desktop, a sheet along the bottom on a phone. The form is a .panel (its fields). */
.portal-dialog {
    width: min(418px, calc(100% - 32px));
    max-width: none;
    max-height: calc(100% - 32px);
    margin: auto;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
    overflow: auto;
}

.portal-dialog::backdrop {
    background: rgba(20, 21, 26, 0.45);
}

.portal-dialog .panel {
    margin: 0;
    padding: 16px;
    gap: 12px;
}

.dialog-title {
    font-size: 20px;
}

.dialog-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
}

.dialog-actions .button-plain {
    align-self: auto;
}

/* Not in the design: what an add-on costs, under its field. */
.field-hint {
    margin: 0;
    font-size: 12px;
    line-height: 1.45;
    color: var(--muted);
}

@media (max-width: 720px) {
    .panel-pair {
        grid-template-columns: minmax(0, 1fr);
    }

    .portal-dialog {
        width: 100%;
        max-height: 100%;
        margin: auto 0 0;
    }

    .portal-dialog .panel {
        border-radius: 20px 20px 0 0;
    }
}

/* A page's title and its buttons ("Billing toolbar"). */
.portal-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 7px;
}

.toolbar-actions form {
    margin: 0;
}

.toolbar-actions .button-plain {
    align-self: auto;
}

/* "View and print": a link in a table. */
.table-action {
    font-weight: 600;
    color: var(--pink);
}

/* "Printable invoice", "Printable statement". */
.printable {
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

.party {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.party h2 {
    margin: 0;
    font-size: 16px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

.party p,
.printable-note {
    margin: 0;
    font-size: 14px;
    line-height: 1.45;
    color: var(--muted);
}

.printable-title {
    margin: 0;
    font-size: 22px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

/* "Total detail". */
.detail-total {
    font-size: 16px;
}

.detail-total .detail-label {
    font-weight: 650;
    color: var(--ink);
}

.detail-total .detail-value {
    font-weight: 700;
}

/* "Period controls". */
.period-panel {
    margin: 0;
    padding: 21px;
    border: 1px solid var(--line);
    border-radius: 20px;
    background: var(--surface);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.period-panel h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

.date-range {
    display: flex;
    align-items: center;
    gap: 10px;
}

.date-range .field {
    flex: 1;
    min-width: 0;
    gap: 6px;
}

.date-range .field-label {
    line-height: 1.25;
}

.date-range .input {
    height: 41px;
    padding: 0 10px;
    border-radius: 10px;
    font-size: 13px;
}

@media (max-width: 720px) {
    .portal-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .parties,
    .date-range {
        grid-template-columns: minmax(0, 1fr);
        flex-direction: column;
        align-items: stretch;
    }
}

/* A ticket's "Messages": who and when, then what they said. */
.messages-title {
    margin: 0;
    font-size: 20px;
    font-weight: 650;
    line-height: 1.12;
    letter-spacing: -0.55px;
    color: var(--ink);
}

.message-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 6px;
}

.message-who {
    font-size: 14px;
    font-weight: 650;
    color: var(--ink);
}

.message-at {
    font-size: 12px;
    color: var(--muted);
}

.message-body {
    white-space: pre-line;
}

/* "Turn on two-step": the QR code ("Generated QR code placement", 104 square). */
.qr-code {
    display: block;
    width: 104px;
    height: 104px;
    padding: 6px;
    border-radius: 11px;
    background: #FFFFFF;
}

/* "Your recovery codes": two to a line. */
.recovery-codes {
    margin: 0;
    padding: 0;
    list-style: none;
    display: grid;
    grid-template-columns: repeat(2, max-content);
    gap: 0 18px;
    font-size: 14px;
    line-height: 1.45;
    color: var(--ink);
    font-variant-numeric: tabular-nums;
}

/* On paper: the invoice or statement alone. */
@media print {
    .portal-nav,
    .toolbar-actions,
    .no-print {
        display: none !important;
    }

    body {
        background: #FFFFFF;
    }

    .portal-main {
        padding: 0;
    }
}
