@import url("palette.css");
/* Site header (layouts/partials/site_header.blade.php), on every layouts/main page.
   One bar: brand with tagline, info-page links, then calculator and account actions.
   At 1180px and below the links move into a sheet opened by the menu button. */

.dh {
    position: relative;
    z-index: 20;
    background: #fff;
    border-bottom: 1px solid var(--sc-line);
    font-family: 'Rubik', sans-serif;
    color: var(--sc-ink);
}
.dh a,
.dh a:hover,
.dh a:focus {
    color: inherit;
    text-decoration: none;
}
.dh button {
    background: none;
    border: 0;
    padding: 0;
    color: inherit;
    font: inherit;
    transition: none;
}
.dh a:focus-visible,
.dh button:focus-visible {
    outline: 2px solid var(--sc-accent);
    outline-offset: 2px;
}

.dh-bar {
    display: flex;
    align-items: stretch;
    gap: 16px;
    max-width: 1240px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Brand */
.dh-brand {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 2px;
    flex-shrink: 0;
}
.dh-brand img {
    display: block;
    width: 120px;
    height: auto;
}
.dh-tagline {
    font-size: 13px;
    line-height: 1.2;
    color: var(--sc-muted);
    white-space: nowrap;
}

/* Links */
.dh-nav {
    display: flex;
    align-items: stretch;
}
.dh-links {
    display: flex;
    align-items: stretch;
    margin: 0;
    padding: 0;
    list-style: none;
}
.dh-links li {
    display: flex;
}
.dh-links a {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 0 9px;
    font-size: 15px;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: color .2s var(--sc-ease), border-color .2s var(--sc-ease);
}
.dh-links a:hover {
    color: var(--sc-accent-dark);
}
.dh-links a[aria-current="page"] {
    color: var(--sc-accent-dark);
    font-weight: 600;
    border-bottom-color: var(--sc-accent);
}
.dh-new {
    padding: 2px 6px;
    border-radius: 6px;
    background: var(--sc-accent-soft);
    color: var(--sc-accent-dark);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.3;
}
.dh-sheet-actions {
    display: none;
}

/* Actions */
.dh-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-inline-start: auto;
    flex-shrink: 0;
}
.dh .dh-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    white-space: nowrap;
    transition: background-color .2s var(--sc-ease), border-color .2s var(--sc-ease);
}
.dh .dh-btn-primary,
.dh .dh-btn-primary:hover,
.dh .dh-btn-primary:focus {
    background: var(--sc-accent);
    color: #fff;
}
.dh .dh-btn-primary:hover {
    background: var(--sc-accent-dark);
}
.dh .dh-btn-line {
    border: 1px solid var(--sc-line);
}
.dh .dh-btn-line:hover {
    border-color: var(--sc-field-line);
}

/* The calculator: the one tinted control, with the live starting price. */
.dh .dh-calc {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    min-height: 48px;
    padding: 4px 16px 4px 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    background: var(--sc-accent-soft);
    color: var(--sc-accent-dark);
    white-space: nowrap;
    transition: border-color .2s var(--sc-ease);
}
.dh .dh-calc:hover,
.dh .dh-calc[aria-current="page"] {
    border-color: var(--sc-accent);
}
.dh-ic {
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    fill: none;
    stroke: currentColor;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.dh-calc-text {
    display: flex;
    flex-direction: column;
    line-height: 1.25;
}
.dh-calc-label {
    font-size: 16px;
    font-weight: 600;
}
.dh-calc-from {
    font-size: 13px;
    color: var(--sc-on-soft);
}
.dh-calc-from bdi {
    font-variant-numeric: tabular-nums;
}

.dh .dh-signin {
    height: 44px;
    padding: 0 6px;
    font-size: 16px;
    text-decoration: underline;
    text-underline-offset: 4px;
    white-space: nowrap;
}
.dh .dh-signin:hover {
    color: var(--sc-accent-dark);
}

.dh .dh-packages {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sc-line);
    border-radius: 8px;
    font-size: 15px;
    white-space: nowrap;
    transition: border-color .2s var(--sc-ease);
}
.dh .dh-packages:hover,
.dh .dh-packages[aria-current="page"] {
    border-color: var(--sc-field-line);
}
.dh-count {
    font-weight: 700;
    color: var(--sc-accent-dark);
    font-variant-numeric: tabular-nums;
}

.dh-account {
    position: relative;
}
.dh .dh-account-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    height: 44px;
    padding: 0 14px;
    border: 1px solid var(--sc-line);
    border-radius: 8px;
    font-size: 15px;
    white-space: nowrap;
}
.dh .dh-account-btn:hover {
    border-color: var(--sc-field-line);
}
.dh-chevron {
    width: 7px;
    height: 7px;
    margin-top: -4px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    transition: transform .25s var(--sc-ease);
}
.dh-account-btn[aria-expanded="true"] .dh-chevron {
    margin-top: 3px;
    transform: rotate(-135deg);
}
.dh-account-menu {
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    min-width: 180px;
    margin: 0;
    padding: 6px;
    list-style: none;
    background: #fff;
    border: 1px solid var(--sc-line);
    border-radius: 14px;
}
.dh-account-menu[hidden] {
    display: none;
}
.dh .dh-account-menu a,
.dh .dh-account-menu button {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border-radius: 8px;
    font-size: 15px;
    text-align: start;
}
.dh .dh-account-menu a:hover,
.dh .dh-account-menu button:hover {
    background: var(--sc-page);
    color: var(--sc-accent-dark);
}

.dh-menu-btn {
    display: none;
}
.dh-narrow {
    display: none;
}

/* Wide labels give way first. */
@media (max-width: 1360px) {
    .dh.is-member .dh-packages .dh-wide { display: none; }
    .dh.is-member .dh-packages .dh-narrow { display: inline; }
}

/* Links move into the sheet. */
@media (max-width: 1180px) {
    .dh-bar {
        flex-wrap: wrap;
        row-gap: 0;
        min-height: 0;
        padding: 0 16px;
    }
    .dh-brand {
        min-height: 68px;
    }
    .dh .dh-menu-btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 44px;
        height: 44px;
        border: 1px solid var(--sc-line);
        border-radius: 8px;
    }
    .dh-bars,
    .dh-bars::before,
    .dh-bars::after {
        display: block;
        width: 18px;
        height: 2px;
        background: currentColor;
    }
    .dh-bars {
        position: relative;
    }
    .dh-bars::before,
    .dh-bars::after {
        content: "";
        position: absolute;
        inset-inline-start: 0;
        transition: transform .25s var(--sc-ease);
    }
    .dh-bars::before { top: -6px; }
    .dh-bars::after { top: 6px; }
    .dh-menu-btn[aria-expanded="true"] .dh-bars { background: transparent; }
    .dh-menu-btn[aria-expanded="true"] .dh-bars::before { transform: translateY(6px) rotate(45deg); }
    .dh-menu-btn[aria-expanded="true"] .dh-bars::after { transform: translateY(-6px) rotate(-45deg); }

    .dh-nav {
        display: none;
        order: 3;
        flex-direction: column;
        width: 100%;
        padding: 4px 0 16px;
        border-top: 1px solid var(--sc-line);
    }
    .dh.is-open .dh-nav {
        display: flex;
    }
    .dh-links {
        flex-direction: column;
    }
    .dh-links a {
        flex: 1;
        min-height: 48px;
        padding: 0 4px;
        font-size: 16px;
        border-bottom: 1px solid var(--sc-line);
    }
    .dh-links a[aria-current="page"] {
        border-bottom-color: var(--sc-line);
    }
    .dh-sheet-actions {
        display: flex;
        gap: 8px;
        margin-top: 14px;
    }
    .dh .dh-sheet-actions .dh-btn {
        flex: 1;
        height: 46px;
    }
    .dh-signin,
    .dh-account {
        display: none;
    }
}

@media (max-width: 600px) {
    .dh-bar {
        gap: 8px;
    }
    .dh-brand {
        min-height: 60px;
    }
    .dh-brand img {
        width: 96px;
    }
    .dh-tagline {
        display: none;
    }
    .dh-actions {
        gap: 6px;
    }
    .dh .dh-calc {
        gap: 6px;
        min-height: 44px;
        padding: 2px 10px;
    }
    .dh-ic {
        width: 20px;
        height: 20px;
    }
    .dh-calc-label .dh-wide,
    .dh .dh-packages .dh-wide { display: none; }
    .dh-calc-label .dh-narrow,
    .dh .dh-packages .dh-narrow { display: inline; }
    .dh-calc-label {
        font-size: 14px;
    }
    .dh-calc-from {
        font-size: 13px;
    }
    .dh .dh-register {
        height: 44px;
        padding: 0 14px;
        font-size: 15px;
    }
    .dh .dh-packages {
        padding: 0 10px;
    }
}

@media (max-width: 420px) {
    .dh-bar {
        gap: 6px;
        padding: 0 12px;
    }
    .dh .dh-calc {
        padding: 2px 8px;
    }
    .dh .dh-packages {
        padding: 0 8px;
    }
}

@media (max-width: 389px) {
    .dh-calc-from {
        display: none;
    }
}

@media (max-width: 340px) {
    .dh-brand img {
        width: 76px;
    }
    .dh .dh-calc .dh-ic {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .dh *,
    .dh *::before,
    .dh *::after {
        transition: none !important;
    }
}
