:root {
    --accent: #f36b2b;
    --accent-dark: #d9551a;
    --ink: #f7f7f7;
    --muted: #c9c9c9;
    --surface: #0d0d0d;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
    background: var(--surface);
}

body {
    margin: 0;
    color: #707070;
    font: 15px/1.45 "Open Sans", Arial, sans-serif;
    background: #fff;
}

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

.container {
    width: min(1070px, calc(100% - 32px));
    margin: 0 auto;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.site-header {
    min-height: 90px;
    padding: 10px 0;
    color: #fff;
    background: #000;
}

.header-inner {
    min-height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 32px;
}

.brand {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.brand img {
    display: block;
    width: 280px;
    height: auto;
}

.header-contact {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 11px;
    color: #f1f1f1;
    font-size: 15px;
    white-space: nowrap;
}

.header-contact a {
    transition: color .2s ease;
}

.header-contact a:hover,
.header-contact a:focus-visible,
.header-logout-form button:hover,
.header-logout-form button:focus-visible {
    color: var(--accent);
}

.header-account-name {
    max-width: 220px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.header-logout-form {
    margin: 0;
}

.header-logout-form button {
    padding: 0;
    border: 0;
    color: inherit;
    background: transparent;
    font: inherit;
    cursor: pointer;
    transition: color .2s ease;
}

.contact-icon {
    color: var(--accent);
    margin-right: 4px;
}

.divider {
    color: #777;
}

.lookup-hero {
    position: relative;
    min-height: 520px;
    padding: 100px 0 40px;
    color: #fff;
    background: #444 url("../images/hero-teeth.png") no-repeat center top / cover;
    isolation: isolate;
}

.lookup-hero.has-result {
    min-height: 640px;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(35, 35, 35, .72);
}

.lookup-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.lookup-content h1 {
    margin: 0 0 24px;
    color: #fff;
    font-size: clamp(34px, 4vw, 48px);
    line-height: 1.15;
    font-weight: 800;
    text-align: center;
    text-shadow: 0 1px 2px rgba(0, 0, 0, .22);
}

.lookup-form {
    width: min(800px, 100%);
    display: flex;
    gap: 0;
    padding: 11px;
    border-radius: 6px;
    background: rgba(255, 255, 255, .42);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .12);
}

.lookup-form input {
    min-width: 0;
    flex: 1 1 auto;
    height: 46px;
    padding: 0 12px;
    border: 1px solid #eee;
    border-radius: 5px 0 0 5px;
    outline: none;
    color: #333;
    background: #fff;
    font: inherit;
}

.lookup-form input:focus {
    border-color: var(--accent);
    box-shadow: inset 0 0 0 1px var(--accent);
}

.lookup-form button {
    flex: 0 0 120px;
    height: 46px;
    border: 0;
    border-radius: 4px;
    color: #fff;
    background: var(--accent);
    font: 600 14px/1 "Open Sans", Arial, sans-serif;
    cursor: pointer;
    transition: background .2s ease, transform .2s ease;
}

.lookup-form button:hover,
.lookup-form button:focus-visible {
    background: var(--accent-dark);
}

.lookup-form button:active {
    transform: translateY(1px);
}

.lookup-form button span {
    display: inline-block;
    margin-left: 3px;
    font-size: 22px;
    line-height: 0;
    transform: translateY(2px) rotate(-20deg);
}

.lookup-message,
.lookup-results {
    width: min(800px, 100%);
    margin-top: 20px;
}

.lookup-message {
    padding: 17px 20px;
    border-left: 4px solid var(--accent);
    border-radius: 5px;
    color: #343434;
    background: rgba(255, 255, 255, .95);
    box-shadow: 0 8px 24px rgba(0, 0, 0, .18);
}

.lookup-message strong,
.lookup-message span {
    display: block;
}

.lookup-message span {
    margin-top: 3px;
    color: #666;
}

.lookup-message--error {
    border-left-color: #c53a35;
}

.lookup-results {
    display: grid;
    gap: 24px;
}

.guarantee-certificate {
    position: relative;
    overflow: hidden;
    border-radius: 24px;
    color: #252525;
    background: rgba(244, 244, 244, .98);
    box-shadow: 0 15px 38px rgba(0, 0, 0, .26);
}

.certificate-face {
    position: relative;
    min-height: 235px;
    padding: 30px 48px 24px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(247, 247, 248, .99) 0%, rgba(247, 247, 248, .96) 54%, rgba(247, 247, 248, .72) 100%),
        url("../images/hero-teeth.png") no-repeat 110% 48% / 65% auto;
}

.certificate-face::after {
    content: "";
    position: absolute;
    top: -100px;
    right: -45px;
    width: 360px;
    height: 500px;
    border: 11px solid rgba(190, 190, 195, .22);
    border-radius: 48% 45% 40% 52%;
    transform: rotate(-13deg);
    pointer-events: none;
}

.certificate-brands {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: center;
    gap: 30px;
}

.certificate-brands img {
    display: block;
    height: auto;
    object-fit: contain;
}

.certificate-company-logo {
    width: auto;
    max-width: 260px;
    max-height: 70px;
}

.certificate-code {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-start;
    gap: 25px;
    margin-top: 36px;
}

.certificate-code > span {
    color: #222;
    font-size: 16px;
    line-height: 1.05;
}

.certificate-code small {
    display: block;
    margin-top: 3px;
    font-size: 13px;
    font-style: italic;
}

.certificate-code strong {
    color: #050505;
    font-size: 17px;
}

.made-in-germany {
    position: absolute;
    z-index: 1;
    left: 48px;
    bottom: 25px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: #29272a;
    font-size: 18px;
    letter-spacing: .13em;
}

.certificate-face-toggle {
    position: absolute;
    z-index: 3;
    top: 18px;
    right: 20px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 7px 11px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: #555;
    background: rgba(255, 255, 255, .9);
    font: 600 12px/1.2 "Open Sans", Arial, sans-serif;
    cursor: pointer;
}

.certificate-face-toggle:hover,
.certificate-face-toggle:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.face-toggle-chevron {
    width: 8px;
    height: 8px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(2px) rotate(225deg);
}

.when-face-hidden {
    display: none;
}

.guarantee-certificate.is-face-hidden .certificate-face {
    display: none;
}

.guarantee-certificate.is-face-hidden .certificate-face-toggle {
    position: relative;
    top: auto;
    right: auto;
    width: max-content;
    margin: 14px 16px 0 auto;
}

.guarantee-certificate.is-face-hidden .face-toggle-chevron {
    transform: translateY(-2px) rotate(45deg);
}

.guarantee-certificate.is-face-hidden .when-face-visible {
    display: none;
}

.guarantee-certificate.is-face-hidden .when-face-hidden {
    display: inline;
}

.germany-flag {
    display: inline-flex;
    overflow: hidden;
    width: 62px;
    height: 11px;
}

.germany-flag i {
    flex: 1;
}

.germany-flag i:nth-child(1) { background: #1d1d1d; }
.germany-flag i:nth-child(2) { background: #e4262c; }
.germany-flag i:nth-child(3) { background: #ffbd39; }

.certificate-details {
    border-top: 1px solid #efefef;
}

.certificate-details summary {
    width: max-content;
    margin: 14px auto;
    padding: 7px 13px;
    border: 1px solid #ddd;
    border-radius: 5px;
    color: var(--accent);
    background: #f7f7f7;
    cursor: pointer;
    list-style: none;
    user-select: none;
}

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

.details-chevron {
    display: inline-block;
    width: 8px;
    height: 8px;
    margin-right: 5px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: translateY(-1px) rotate(45deg);
}

.certificate-details[open] .details-chevron {
    transform: translateY(2px) rotate(225deg);
}

.certificate-details .when-closed,
.certificate-details:not([open]) .when-open {
    display: none;
}

.certificate-details:not([open]) .when-closed {
    display: inline;
}

.certificate-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px 8px;
    margin: 0;
    padding: 0 16px 17px;
}

.certificate-grid > div {
    display: grid;
    grid-template-columns: 47% minmax(0, 1fr);
    min-height: 35px;
    background: #fafafa;
}

.certificate-grid dt,
.certificate-grid dd {
    display: flex;
    align-items: center;
    min-width: 0;
    margin: 0;
    padding: 6px 7px;
    overflow-wrap: anywhere;
}

.certificate-grid dt {
    color: #333;
    font-size: 14px;
}

.certificate-grid dt span {
    flex: 0 0 18px;
    margin-right: 3px;
    color: #aaa;
    font-size: 13px;
    text-align: center;
}

.certificate-grid dd {
    color: #fa5a18;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.tooth-positions {
    flex-wrap: wrap;
    gap: 5px;
}

.tooth-positions span {
    min-width: 36px;
    padding: 3px 8px;
    border-radius: 5px;
    color: #252525;
    background: #ffd3c0;
    text-align: center;
}

.certificate-notes {
    margin: 0 16px 17px;
    padding: 12px 14px;
    border-radius: 5px;
    color: #444;
    background: #fff7f2;
}

.certificate-notes strong {
    color: #222;
}

.certificate-notes p {
    margin: 4px 0 0;
}

.account-cards-section {
    padding: 52px 0 60px;
    color: #292929;
    background: #f5f5f5;
}

.account-cards-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 22px;
}

.account-cards-eyebrow {
    display: block;
    margin-bottom: 5px;
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.account-cards-heading h2 {
    margin: 0;
    color: #171717;
    font-size: clamp(23px, 3vw, 31px);
    line-height: 1.25;
}

.account-cards-total {
    flex: 0 0 auto;
    padding: 7px 12px;
    border-radius: 999px;
    color: #8b390f;
    background: #ffe4d7;
    font-size: 13px;
    font-weight: 700;
}

.account-cards-empty {
    padding: 28px;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    color: #666;
    background: #fff;
    text-align: center;
}

.account-cards-table-wrap {
    overflow-x: auto;
    border: 1px solid #e4e4e4;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(0, 0, 0, .05);
}

.account-cards-table {
    width: 100%;
    min-width: 920px;
    border-collapse: collapse;
}

.account-cards-table th,
.account-cards-table td {
    padding: 13px 14px;
    border-bottom: 1px solid #ececec;
    text-align: left;
    vertical-align: middle;
}

.account-cards-table th {
    color: #555;
    background: #fafafa;
    font-size: 12px;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.account-cards-table tbody tr:last-child td {
    border-bottom: 0;
}

.account-cards-table tbody tr:hover {
    background: #fffaf7;
}

.account-card-status {
    display: inline-flex;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}

.account-card-status.is-active {
    color: #176c35;
    background: #dff5e7;
}

.account-card-status.is-inactive {
    color: #8a3c35;
    background: #fbe4e1;
}

.account-card-action {
    text-align: right !important;
}

.account-card-detail-button,
.account-card-modal-footer button {
    padding: 8px 12px;
    border: 0;
    border-radius: 5px;
    color: #fff;
    background: var(--accent);
    font: 600 13px/1 "Open Sans", Arial, sans-serif;
    white-space: nowrap;
    cursor: pointer;
}

.account-card-detail-button:hover,
.account-card-detail-button:focus-visible,
.account-card-modal-footer button:hover,
.account-card-modal-footer button:focus-visible {
    background: var(--accent-dark);
}

.account-pagination {
    margin-top: 22px;
}

.account-pagination .pagination-nav {
    display: flex;
    justify-content: flex-end;
}

.account-pagination .pagination {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.account-pagination .page-link {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 9px;
    border: 1px solid #dedede;
    border-radius: 4px;
    color: #555;
    background: #fff;
}

.account-pagination .active .page-link {
    border-color: var(--accent);
    color: #fff;
    background: var(--accent);
}

.account-pagination .disabled .page-link {
    color: #aaa;
    cursor: not-allowed;
}

.account-card-modal {
    width: min(820px, calc(100% - 30px));
    max-height: calc(100vh - 40px);
    padding: 0;
    overflow: hidden;
    border: 0;
    border-radius: 12px;
    color: #333;
    background: #fff;
    box-shadow: 0 24px 70px rgba(0, 0, 0, .35);
}

.account-card-modal::backdrop {
    background: rgba(0, 0, 0, .68);
}

.account-card-modal-content {
    max-height: calc(100vh - 40px);
    overflow-y: auto;
}

.account-card-modal-loading,
.account-card-modal-error {
    padding: 55px 24px;
    color: #666;
    text-align: center;
}

.account-card-modal-error {
    color: #a52d24;
}

.account-card-modal-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
}

.account-card-modal-header span {
    display: block;
    margin-bottom: 3px;
    color: #777;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.account-card-modal-header h2 {
    margin: 0;
    color: #171717;
    font-size: 25px;
}

.account-card-modal-close {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: #555;
    background: #f1f1f1;
    font-size: 27px;
    line-height: 34px;
    cursor: pointer;
}

.account-card-modal-body {
    padding: 22px 24px;
}

.account-card-detail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0;
}

.account-card-detail-grid > div {
    display: grid;
    grid-template-columns: 42% minmax(0, 1fr);
    min-height: 42px;
    border: 1px solid #eee;
    border-radius: 5px;
    overflow: hidden;
}

.account-card-detail-grid dt,
.account-card-detail-grid dd {
    display: flex;
    align-items: center;
    margin: 0;
    padding: 8px 10px;
    overflow-wrap: anywhere;
}

.account-card-detail-grid dt {
    color: #555;
    background: #f7f7f7;
    font-size: 13px;
}

.account-card-detail-grid dd {
    color: #e9561b;
    font-size: 13px;
    font-weight: 700;
}

.account-card-detail-notes {
    margin-top: 14px;
    padding: 13px 15px;
    border-radius: 6px;
    background: #fff5ef;
}

.account-card-detail-notes p {
    margin: 5px 0 0;
}

.account-card-modal-footer {
    display: flex;
    justify-content: flex-end;
    padding: 14px 24px;
    border-top: 1px solid #eee;
    background: #fafafa;
}

.site-footer {
    padding: 30px 0 42px;
    color: #dedede;
    background: var(--surface);
}

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

.site-footer h2 {
    position: relative;
    margin: 0 0 20px;
    padding-bottom: 13px;
    border-bottom: 1px solid #323232;
    color: #fff;
    font-size: 18px;
    line-height: 1.3;
    font-weight: 600;
}

.site-footer h2::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -1px;
    width: 31px;
    height: 1px;
    background: var(--accent);
}

.footer-intro ul {
    display: grid;
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-intro li {
    position: relative;
    padding-left: 17px;
}

.footer-intro li::before {
    content: "■";
    position: absolute;
    left: 0;
    top: 3px;
    color: var(--accent);
    font-size: 7px;
}

.footer-intro a:hover,
.footer-intro a:focus-visible,
.office-card a:hover,
.office-card a:focus-visible {
    color: var(--accent);
}

.office-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 36px;
    row-gap: 17px;
}

.office-card h3 {
    margin: 0 0 5px;
    color: #fff;
    font-size: 15px;
    font-weight: 400;
}

.office-card p,
.office-card a {
    margin: 0;
    color: #ddd;
    font-size: 14px;
    line-height: 1.45;
}

.office-card p span,
.office-card a span {
    margin-right: 4px;
    color: var(--accent);
    font-size: 13px;
}

@media (max-width: 820px) {
    .container {
        width: calc(100% - 30px);
    }

    .site-header {
        min-height: 146px;
        padding: 14px 0 10px;
    }

    .header-inner {
        min-height: 122px;
        flex-direction: column;
        align-items: stretch;
        justify-content: center;
        gap: 12px;
    }

    .brand {
        justify-content: flex-start;
    }

    .brand img {
        width: min(100%, 350px);
    }

    .header-contact {
        justify-content: flex-end;
        flex-wrap: wrap;
        gap: 6px;
        font-size: 13px;
    }

    .header-account-name {
        max-width: 170px;
    }

    .header-contact .email-link,
    .header-contact .email-link + .divider,
    .header-contact .desktop-label {
        display: none;
    }

    .lookup-hero {
        min-height: 520px;
        padding-top: 98px;
        background-position: 40% top;
    }

    .lookup-hero.has-result {
        min-height: 650px;
    }

    .lookup-content h1 {
        margin-bottom: 24px;
        font-size: clamp(29px, 8vw, 38px);
        white-space: nowrap;
    }

    .lookup-form {
        padding: 11px 9px;
    }

    .lookup-form button {
        flex-basis: 120px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .footer-intro {
        margin-bottom: 0;
    }

    .account-cards-heading {
        align-items: flex-start;
    }

    .account-card-detail-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .lookup-content h1 {
        font-size: 31px;
        letter-spacing: -.8px;
    }

    .lookup-form input {
        padding: 0 10px;
        font-size: 14px;
    }

    .lookup-form button {
        flex-basis: 120px;
    }

    .guarantee-certificate {
        border-radius: 18px;
    }

    .certificate-face {
        min-height: 225px;
        padding: 26px 24px 22px;
        background-size: 95% auto;
        background-position: 145% 50%;
    }

    .certificate-brands {
        gap: 15px;
    }

    .certificate-company-logo {
        max-width: 175px;
        max-height: 55px;
    }

    .certificate-code {
        gap: 18px;
        margin-top: 34px;
    }

    .certificate-face-toggle {
        top: 14px;
        right: 14px;
        padding: 6px 9px;
    }

    .made-in-germany {
        left: 24px;
        bottom: 21px;
        font-size: 14px;
    }

    .certificate-grid {
        grid-template-columns: 1fr;
        gap: 5px;
        padding-right: 10px;
        padding-left: 10px;
    }

    .certificate-notes {
        margin-right: 10px;
        margin-left: 10px;
    }

    .office-grid {
        column-gap: 15px;
        row-gap: 17px;
    }

    .office-card p,
    .office-card a {
        font-size: 13.5px;
    }

    .account-cards-section {
        padding: 38px 0 44px;
    }

    .account-cards-heading {
        flex-direction: column;
        gap: 10px;
    }

    .account-pagination .pagination-nav {
        justify-content: center;
    }

    .account-card-modal-header,
    .account-card-modal-body,
    .account-card-modal-footer {
        padding-right: 16px;
        padding-left: 16px;
    }

    .account-card-detail-grid > div {
        grid-template-columns: 40% minmax(0, 1fr);
    }
}

@media (max-width: 360px) {
    .lookup-content h1 {
        font-size: 27px;
    }

    .lookup-form button {
        flex-basis: 105px;
    }

    .office-grid {
        grid-template-columns: 1fr;
    }
}
