/* =========================================================
   Sunday.je Business Portal
   "Sunday.je, business-owner mode": the same navy frame, palette and
   tokens as the public site (site.css loads first - --action,
   --page-gutter, --header-height, --ease-*, --duration-*, --shadow-*)
   with portal-only structure here. site.css never depends on portal
   markup.
   ========================================================= */

:root {
    --portal-status-positive: #39704f;
    --portal-status-negative: #9a4e42;
    /* Deepened from #a5762f, which was only 3.4:1 on its badge. */
    --portal-status-pending: #86601f;
    --portal-border: #e8e6e1;
    --portal-border-strong: #d9d7d1;
    /* Deepened from #697178 so muted text clears 4.5:1 on every portal
       surface, including the claim page's #f3f1ea bands. */
    --portal-muted: #626a70;

    /* Portal width system. Dashboard, business and claims pages use the
       frame; forms and focused content keep a reading width but stay on
       the frame's left edge, so header, hero and content share one
       edge. Auth and confirmation cards stay centred and narrow. */
    --portal-frame: 1080px;
    --portal-form: 640px;
    --portal-narrow: 560px;
}

/* Header, main, footer in a viewport-tall column: short pages keep the
   footer at the bottom (same principle as the public .site-shell). */
body.portal-page {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    min-height: 100dvh;
    background: #faf9f6;
}

.portal-main {
    flex: 1 0 auto;
    padding-bottom: 64px;
}

.portal-container {
    width: min(var(--portal-frame), calc(100% - 2 * var(--page-gutter)));
    margin: 0 auto;
}

/* Forms (edit listing, Sunday hours): on the frame, held to a form
   width. */
.portal-container-form > * {
    max-width: var(--portal-form);
}

/* Centred, focused confirmation/status content. */
.portal-container-narrow {
    width: min(var(--portal-narrow), calc(100% - 2 * var(--page-gutter)));
}


/* ---------------------------------------------------------
   Header - navy, like the public masthead
   --------------------------------------------------------- */

.portal-header {
    background: #16202a;
    color: #faf9f6;
}

.portal-header-inner {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    column-gap: 16px;
    min-height: var(--header-height);
}

.portal-logo {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 5px;
    margin-right: auto;
    padding: 12px 0;
    color: #faf9f6;
    text-decoration: none;
}

.portal-logo-wordmark {
    display: block;
    width: 115px;
    height: auto;
}

/* TEMPORARY light logo treatment - see the note in portal/base.html
   (and the matching public rule in site.css). Delete when the approved
   reversed wordmark asset is in place. */
.portal-header .logo-temp-light {
    filter: brightness(0) invert(1);
}

.portal-logo-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 9px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    color: #d8dee2;
}

.portal-nav {
    display: flex;
    gap: 24px;
    order: 3;
    width: 100%;
    padding: 12px 0 14px;
    border-top: 1px solid rgba(250, 249, 246, 0.12);
}

.portal-nav a {
    position: relative;
    padding: 4px 0;
    color: #d8dee2;
    text-decoration: none;
    font-size: 14px;
    transition: color var(--duration-fast) ease;
}

/* Current page: ivory text with a brand-terracotta rule (decorative -
   no text sits on it). */
.portal-nav a[aria-current="page"] {
    color: #faf9f6;
    font-weight: 600;
    box-shadow: inset 0 -2px 0 var(--terracotta);
}

@media (hover: hover) and (pointer: fine) {
    .portal-nav a:hover {
        color: #faf9f6;
    }
}

.portal-switcher {
    margin: 0;
}

.portal-header .portal-switcher select {
    max-width: 200px;
    padding-top: 9px;
    padding-bottom: 9px;
    border-color: rgba(250, 249, 246, 0.3);
    background-color: rgba(250, 249, 246, 0.06);
    color: #faf9f6;
}

/* The native option list opens on a light surface in most browsers. */
.portal-header .portal-switcher option {
    background: #ffffff;
    color: #16202a;
}

.portal-header .portal-btn-ghost {
    border-color: rgba(250, 249, 246, 0.3);
    color: #faf9f6;
}

@media (hover: hover) and (pointer: fine) {
    .portal-header .portal-btn-ghost:hover {
        border-color: rgba(250, 249, 246, 0.7);
        color: #faf9f6;
    }
}

/* Focus on the navy frame: the site-wide sage ring is too dim here. */
.portal-header a:focus-visible,
.portal-header button:focus-visible,
.portal-header select:focus-visible {
    outline: 2px solid #faf9f6;
    outline-offset: 2px;
}

/* The claim page is a focused conversion flow, not back-office
   software - Dashboard/Claims are exit points that don't belong on
   it, so they're hidden on this page only (branding + log-out stay).
   Every other portal page keeps its normal navigation. */
body.portal-claim-page .portal-nav {
    display: none;
}

@media (min-width: 801px) {

    /* One row: brand, then Dashboard/Claims, then switcher + log out. */
    .portal-header-inner {
        flex-wrap: nowrap;
        column-gap: 20px;
    }

    .portal-logo {
        margin-right: 0;
    }

    .portal-nav {
        order: 0;
        width: auto;
        margin-left: 28px;
        margin-right: auto;
        padding: 0;
        border-top: 0;
    }

    .portal-nav a {
        padding: 8px 0;
    }

    /* With the nav hidden on the claim page, the brand pushes the
       switcher and log out to the right instead. */
    body.portal-claim-page .portal-logo {
        margin-right: auto;
    }

}

@media (max-width: 800px) {

    /* Compact header: brand + log out on the first row, Dashboard /
       Claims below, then the business switcher full-width - never all
       squeezed onto one line. */
    .portal-switcher {
        order: 4;
        flex-basis: 100%;
        padding-bottom: 14px;
    }

    .portal-header .portal-switcher select {
        width: 100%;
        max-width: none;
    }

}


/* ---------------------------------------------------------
   Footer - deliberately minimal
   --------------------------------------------------------- */

.portal-footer {
    padding: 22px 0;
    border-top: 1px solid var(--portal-border);
    font-size: 13px;
}

.portal-footer-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px 24px;
}

.portal-footer-brand {
    color: #16202a;
    font-family: var(--font-serif);
    font-size: 15px;
}

.portal-footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px 20px;
}

.portal-footer-links a {
    color: #4d585e;
    text-decoration: none;
}

.portal-footer-links a:hover {
    color: #16202a;
    text-decoration: underline;
}

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


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.portal-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    border: none;
    border-radius: 24px;
    padding: 13px 22px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    -webkit-user-select: none;
    user-select: none;
    transition:
        transform var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out),
        background var(--duration-fast) var(--ease-out);
}

/* White text needs the accessible action colour from site.css
   (--action 4.78:1, --action-hover 5.47:1), not the brand terracotta. */
.portal-btn-primary {
    background: var(--action);
    color: #ffffff;
}

@media (hover: hover) and (pointer: fine) {
    .portal-btn-primary:hover {
        background: var(--action-hover);
        box-shadow: 0 7px 18px rgba(184, 85, 56, 0.22);
        transform: translateY(-1px);
    }
}

.portal-btn-primary:active {
    background: var(--action-hover);
}

.portal-btn-secondary {
    background: #eef2eb;
    color: #46594d;
}

@media (hover: hover) and (pointer: fine) {
    .portal-btn-secondary:hover {
        background: #e3e9de;
    }
}

.portal-btn-ghost {
    background: transparent;
    color: #38434c;
    border: 1px solid var(--portal-border-strong);
}

@media (hover: hover) and (pointer: fine) {
    .portal-btn-ghost:hover {
        border-color: #4f6a5c;
        color: #4f6a5c;
    }
}

.portal-btn:active {
    transform: scale(0.97);
    transition-duration: var(--duration-press);
}

.portal-btn-sm {
    padding: 9px 16px;
    font-size: 13px;
}

.portal-btn-block {
    display: flex;
    width: 100%;
}

.portal-btn:focus-visible {
    outline: 2px solid #617b6d;
    outline-offset: 2px;
}


/* ---------------------------------------------------------
   Layout / messages
   --------------------------------------------------------- */

.portal-section {
    padding: 32px 0;
}

.portal-section h1 {
    font-family: Georgia, serif;
    font-size: 28px;
    margin: 0 0 6px;
}

.portal-section h2 {
    font-family: Georgia, serif;
    font-size: 20px;
    margin: 32px 0 14px;
}

.portal-lede,
.portal-muted {
    color: var(--portal-muted);
    line-height: 1.5;
}

/* Plain content links (no component class) in the portal's own
   colour rather than browser-default blue. */
.portal-main a:not([class]) {
    color: #4f6a5c;
    text-underline-offset: 2px;
}

.portal-main a:not([class]):hover {
    color: #16202a;
}

.portal-messages {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-message {
    padding: 12px 16px;
    border-radius: 12px;
    font-size: 14px;
    border: 1px solid transparent;
}

.portal-message-success {
    background: #eef2eb;
    color: #39704f;
    border-color: #cfe0c8;
}

.portal-message-error {
    background: #f7e9e6;
    color: #9a4e42;
    border-color: #eaccc4;
}

.portal-message-info,
.portal-message-warning,
.portal-message-debug {
    background: #f1efe9;
    color: #38434c;
    border-color: var(--portal-border);
}


/* ---------------------------------------------------------
   Auth
   --------------------------------------------------------- */

.portal-auth {
    padding: 56px 0;
}

.portal-auth-inner {
    display: flex;
    justify-content: center;
}

.portal-auth-card {
    width: 100%;
    max-width: 400px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    padding: 32px 28px;
    box-shadow: var(--shadow-sm);
}

.portal-auth-card h1 {
    font-family: Georgia, serif;
    font-size: 24px;
    margin: 0 0 6px;
}

.portal-auth-lede {
    color: var(--portal-muted);
    margin: 0 0 24px;
    line-height: 1.5;
}

.portal-auth-footnote {
    margin: 20px 0 0;
    font-size: 13px;
    color: var(--portal-muted);
    line-height: 1.6;
}

.portal-auth-footnote a {
    color: #617b6d;
}

.portal-claim-cancel {
    margin: 20px 0 0;
    padding: 14px 16px;
    border: 1px solid var(--portal-border, #e2ddd3);
    border-radius: 8px;
}

.portal-claim-cancel summary {
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
}

.portal-claim-cancel p {
    margin: 10px 0;
    font-size: 13px;
}

.portal-claim-cancel form {
    margin-top: 8px;
}


/* ---------------------------------------------------------
   Forms
   --------------------------------------------------------- */

.portal-form {
    margin-top: 20px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.portal-field-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
}

@media (min-width: 560px) {
    .portal-field-row {
        grid-template-columns: 1fr 1fr;
    }
}

.portal-field label,
.portal-field-legend {
    font-size: 13px;
    font-weight: 600;
    color: #16202a;
}

.portal-field-help {
    margin: 0;
    font-size: 12px;
    color: var(--portal-muted);
}

.portal-field-error {
    margin: 0;
    font-size: 13px;
    color: var(--portal-status-negative);
}

.portal-form-errors {
    margin: 0;
    padding: 12px 16px;
    background: #f7e9e6;
    border: 1px solid #eaccc4;
    border-radius: 12px;
    color: #9a4e42;
    font-size: 13px;
    list-style: none;
}

.portal-form input[type="text"],
.portal-form input[type="email"],
.portal-form input[type="url"],
.portal-form input[type="tel"],
.portal-form input[type="search"],
.portal-form input[type="time"],
.portal-form input[type="password"],
.portal-form input[type="file"],
.portal-form textarea,
.portal-form select,
.portal-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--portal-border-strong);
    border-radius: 12px;
    background: #ffffff;
    color: #16202a;
    font: inherit;
    font-size: 15px;
    transition:
        border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out);
}

.portal-form textarea {
    resize: vertical;
    min-height: 90px;
}

.portal-form input:focus-visible,
.portal-form textarea:focus-visible,
.portal-form select:focus-visible {
    outline: none;
    border-color: #617b6d;
    box-shadow: 0 0 0 3px rgba(97, 123, 109, 0.18);
}

.portal-input-sm {
    padding: 8px 12px;
    font-size: 13px;
    border-radius: 10px;
}

.portal-checkbox-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
    padding: 4px 0;
}

@media (min-width: 480px) {
    .portal-checkbox-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.portal-checkbox-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #38434c;
    cursor: pointer;
}

.portal-checkbox-grid input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: #617b6d;
    flex-shrink: 0;
}

/* A single confirmation checkbox with its sentence beside it. */
.portal-checkbox-inline {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.45;
    color: #38434c;
    cursor: pointer;
}

.portal-checkbox-inline input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin: 1px 0 0;
    accent-color: #617b6d;
    flex-shrink: 0;
}

.portal-current-image {
    display: block;
    width: 160px;
    height: 120px;
    object-fit: cover;
    border-radius: 12px;
    margin-bottom: 8px;
    border: 1px solid var(--portal-border);
}

.portal-action-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 8px;
}


/* ---------------------------------------------------------
   Sunday hours editor
   --------------------------------------------------------- */

.portal-hours-mode {
    border: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-hours-mode legend {
    padding: 0 0 8px;
}

.portal-hours-mode-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--portal-border-strong);
    border-radius: 12px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color var(--duration-fast) var(--ease-out), background var(--duration-fast) var(--ease-out);
}

.portal-hours-mode-option:has(input:checked) {
    border-color: #617b6d;
    background: #eef2eb;
}

.portal-hours-mode-option input {
    width: 18px;
    height: 18px;
    accent-color: #617b6d;
    flex-shrink: 0;
}

.portal-hours-period {
    padding: 16px;
    border: 1px dashed var(--portal-border-strong);
    border-radius: 12px;
}

.portal-hours-period[hidden] {
    display: none;
}


/* ---------------------------------------------------------
   Business list (dashboard)
   --------------------------------------------------------- */

.portal-business-list {
    list-style: none;
    margin: 24px 0 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.portal-business-row-link {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    transition:
        border-color var(--duration-fast) var(--ease-out),
        box-shadow var(--duration-fast) var(--ease-out),
        transform var(--duration-fast) var(--ease-out);
}

@media (hover: hover) and (pointer: fine) {
    .portal-business-row-link:hover {
        border-color: var(--portal-border-strong);
        box-shadow: var(--shadow-sm);
        transform: translateY(-1px);
    }
}

.portal-business-row-link:active {
    transform: scale(0.99);
    transition-duration: var(--duration-press);
}

.portal-business-thumb {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    object-fit: cover;
    flex-shrink: 0;
}

.portal-business-thumb-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: #eef2eb;
    color: #46594d;
    font-family: Georgia, serif;
    font-size: 22px;
}

.portal-business-row-body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
    flex: 1;
}

.portal-business-row-name {
    font-weight: 600;
    color: #16202a;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.portal-business-row-meta {
    font-size: 13px;
    color: var(--portal-muted);
    text-transform: capitalize;
}

/* State line on claims-search rows (PR #34 semantics, unchanged). */
.portal-business-row-status {
    margin-top: 2px;
    color: #4d585e;
    font-size: 13px;
    line-height: 1.4;
}

/* Dashboard: businesses as a grid of cards on wider screens so several
   scan at a glance; a single column on phones. */
.portal-business-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 12px;
}

@media (min-width: 700px) {
    .portal-business-grid {
        grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
        gap: 14px;
    }
}

.portal-business-grid .portal-business-row-link {
    height: 100%;
    padding: 16px;
}

/* Cards have room for two lines, so names wrap instead of truncating. */
.portal-business-grid .portal-business-row-name {
    white-space: normal;
    line-height: 1.3;
}

.portal-business-grid .portal-business-thumb {
    width: 64px;
    height: 64px;
}

.portal-business-row-arrow {
    display: flex;
    flex-shrink: 0;
    color: var(--portal-muted);
    transition:
        transform var(--duration-fast) var(--ease-out),
        color var(--duration-fast) var(--ease-out);
}

.portal-business-row-arrow svg {
    width: 16px;
    height: 16px;
}

@media (hover: hover) and (pointer: fine) {
    .portal-business-row-link:hover .portal-business-row-arrow {
        transform: translateX(3px);
        color: #16202a;
    }
}


/* ---------------------------------------------------------
   Badges
   --------------------------------------------------------- */

.portal-badge {
    display: inline-flex;
    align-items: center;
    flex-shrink: 0;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* Neutral badge (e.g. "Cancelled" on the claims page). */
.portal-badge-free {
    background: #f1efe9;
    color: #5f676d;
}

.portal-badge-pending {
    background: #f6ecdb;
    color: var(--portal-status-pending);
}

.portal-badge-active,
.portal-badge-approved {
    background: #eef2eb;
    color: var(--portal-status-positive);
}

.portal-badge-revoked,
.portal-badge-rejected {
    background: #f7e9e6;
    color: var(--portal-status-negative);
}


/* ---------------------------------------------------------
   Empty state / claims
   --------------------------------------------------------- */

.portal-empty-state {
    max-width: var(--portal-form);
    margin-top: 24px;
    padding: 28px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 16px;
    text-align: center;
}

.portal-empty-state p {
    color: var(--portal-muted);
    line-height: 1.6;
}

.portal-empty-state a {
    color: #617b6d;
    font-weight: 600;
}

.portal-pending-claims {
    max-width: var(--portal-form);
    margin-top: 36px;
    text-align: left;
}

.portal-pending-claims h2 {
    font-size: 15px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-weight: 600;
    margin: 0 0 10px;
}

.portal-claim-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.portal-claim-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 16px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 12px;
    font-size: 14px;
}

.portal-search-form {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.portal-search-form .portal-input {
    flex: 1;
}


/* ---------------------------------------------------------
   Business detail
   --------------------------------------------------------- */

.portal-page-header {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px 24px;
    margin-bottom: 28px;
}

.portal-page-header .portal-muted {
    margin: 4px 0 0;
}

.portal-kicker {
    margin: 0 0 6px;
    color: #4f6a5c;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.portal-page-actions {
    margin-top: 0;
}

/* Business detail: listing facts beside a Sunday-hours panel on wide
   screens; stacked (facts, then hours) on small ones. */
.portal-detail-layout {
    display: grid;
    gap: 32px;
}

@media (min-width: 900px) {
    .portal-detail-layout {
        grid-template-columns: minmax(0, 1.55fr) minmax(300px, 1fr);
        gap: 56px;
        align-items: start;
    }
}

.portal-panel-title {
    margin: 0 0 4px;
    font-family: var(--font-serif);
    font-size: 20px;
    color: #16202a;
}

.portal-section h2.portal-panel-title {
    margin: 0 0 4px;
}

.portal-detail-aside {
    padding: 22px 22px 24px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
}

.portal-hours-value {
    margin: 6px 0 0;
    color: #16202a;
    font-size: 18px;
    font-weight: 600;
    line-height: 1.4;
}

/* Inside the panel the confirmation box reads as a section of it,
   not a second card. */
.portal-detail-aside .portal-hours-confirm {
    margin-top: 18px;
    padding: 18px 0 0;
    background: none;
    border: 0;
    border-top: 1px solid var(--portal-border);
    border-radius: 0;
}

.portal-detail-aside .portal-hours-confirm-done {
    margin-left: -8px;
    margin-right: -8px;
    padding: 14px 16px;
    background: #eef2eb;
    border: 1px solid #d6e2d0;
    border-radius: 12px;
}

.portal-detail-list {
    margin: 16px 0 0;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.portal-detail-list > div {
    padding-bottom: 16px;
    border-bottom: 1px solid var(--portal-border);
}

.portal-detail-list dt {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--portal-muted);
    margin-bottom: 4px;
}

.portal-detail-list dd {
    margin: 0;
    color: #16202a;
    line-height: 1.5;
}

.portal-hours-confirm {
    margin-top: 20px;
    padding: 18px 20px;
    background: #ffffff;
    border: 1px solid var(--portal-border);
    border-radius: 14px;
}

.portal-hours-confirm p {
    margin: 0;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.5;
}

.portal-hours-confirm .portal-hours-confirm-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 4px;
    color: #16202a;
    font-size: 15px;
    font-weight: 600;
}

.portal-hours-confirm-title svg {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.portal-hours-confirm a:not(.portal-btn) {
    color: #617b6d;
}

.portal-hours-confirm .portal-action-row {
    margin-top: 14px;
}

.portal-hours-confirm .portal-action-row form {
    margin: 0;
}

.portal-hours-confirm-done {
    background: #eef2eb;
    border-color: #d6e2d0;
}

.portal-hours-confirm-done .portal-hours-confirm-title {
    color: #46594d;
}

.portal-confirmation {
    text-align: center;
    padding-top: 24px;
}

.portal-confirmation h1 {
    margin-bottom: 12px;
}

.portal-confirmation .portal-lede {
    margin-bottom: 24px;
}


/* ---------------------------------------------------------
   Claim page (conversion redesign)
   --------------------------------------------------------- */

@media (prefers-reduced-motion: no-preference) {
    /* :has() scopes this to the claim page only, without needing a
       class on <html> itself - the element that actually owns the
       document's scroll box. Degrades to an instant jump on browsers
       without :has() support, which is harmless. */
    html:has(body.portal-claim-page) {
        scroll-behavior: smooth;
    }
}

#claim-form {
    scroll-margin-top: 24px;
}

.claim-hero {
    padding: 48px 0 36px;
    background: #ffffff;
    border-bottom: 1px solid var(--portal-border);
}

.claim-hero h1 {
    font-family: Georgia, serif;
    font-size: 30px;
    line-height: 1.15;
    margin: 0 0 10px;
    color: #16202a;
}

.claim-hero-tagline {
    margin: 0 0 16px;
    color: #617b6d;
    font-size: 17px;
    font-weight: 700;
}

.claim-hero-lede {
    margin: 0 0 28px;
    max-width: 46ch;
    color: var(--portal-muted);
    font-size: 15px;
    line-height: 1.6;
}

.claim-hero-assurance {
    margin: 12px 0 0;
    color: var(--portal-muted);
    font-size: 12px;
    text-align: center;
}

/* The claim page shares the portal frame and its left edge with the
   header: the hero spans the frame (two columns on desktop) and the
   sections below keep a reading column on that same edge. */
.claim-hero-container {
    width: min(var(--portal-frame), calc(100% - 2 * var(--page-gutter)));
    margin: 0 auto;
}

.claim-hero-grid > * {
    max-width: var(--portal-narrow);
}

.claim-hero-grid {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.claim-hero-preview .claim-preview-caption {
    margin: 14px 0 0;
}

.claim-container {
    width: min(var(--portal-frame), calc(100% - 2 * var(--page-gutter)));
    margin: 0 auto;
}

.claim-container > * {
    max-width: 660px;
}

.claim-section {
    padding: 40px 0;
}

.claim-section-tight {
    padding: 28px 0;
}

.claim-section-alt {
    background: #f3f1ea;
}

.claim-section h2 {
    font-family: Georgia, serif;
    font-size: 21px;
    margin: 0 0 16px;
    color: #16202a;
}

.claim-section-eyebrow {
    margin: 0 0 14px;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: #4f6a5c;
}

.claim-body {
    max-width: 60ch;
    color: #38434c;
    font-size: 15px;
    line-height: 1.7;
}

.claim-lead {
    max-width: 46ch;
    margin: 0 0 14px;
    color: #16202a;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.4;
}

.claim-preview {
    display: block;
    overflow: hidden;
    background: #faf9f6;
    border: 1px solid #ebe8e2;
    border-radius: 18px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: inherit;
    transition:
        transform var(--duration-base) var(--ease-out),
        box-shadow var(--duration-base) var(--ease-out),
        border-color var(--duration-base) var(--ease-out);
}

.claim-preview:focus-visible {
    outline: 2px solid #617b6d;
    outline-offset: 3px;
}

@media (hover: hover) and (pointer: fine) {
    .claim-preview:hover {
        transform: translateY(-3px);
        box-shadow: var(--shadow-lg);
        border-color: #dedbd5;
    }

    .claim-preview:hover .claim-preview-image img {
        transform: scale(1.04);
    }
}

.claim-preview:active {
    transform: translateY(-1px) scale(0.99);
    transition-duration: var(--duration-press);
}

.claim-preview-image {
    height: 200px;
    overflow: hidden;
}

.claim-preview-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--duration-slow) var(--ease-in-out);
}

.claim-preview-content {
    padding: 20px 22px 22px;
}

.claim-preview-name {
    margin: 10px 0 8px;
    font-family: Georgia, serif;
    font-size: 22px;
    color: #16202a;
}

.claim-preview-description {
    margin: 0 0 12px;
    color: #697178;
    font-size: 14px;
    line-height: 1.5;
}

.claim-preview-caption {
    margin: 14px 4px 0;
    color: var(--portal-muted);
    font-size: 13px;
    line-height: 1.5;
}

.claim-benefit-list {
    margin: 0 0 28px;
    display: flex;
    flex-direction: column;
    counter-reset: claim-benefit;
}

.claim-benefit {
    counter-increment: claim-benefit;
    display: grid;
    grid-template-columns: 28px 1fr;
    column-gap: 14px;
    padding: 20px 0;
    border-bottom: 1px solid var(--portal-border);
}

.claim-benefit:first-child {
    padding-top: 0;
}

/* The 01-04 numbers are generated, not markup: a <dl>'s groups may only
   hold <dt>/<dd>, and the numbers are decoration either way. */
.claim-benefit::before {
    content: counter(claim-benefit, decimal-leading-zero);
    grid-row: 1 / 3;
    padding-top: 3px;
    font-family: Georgia, serif;
    font-size: 13px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    color: #98604c;
}

.claim-benefit dt {
    margin: 0 0 5px;
    font-family: Georgia, serif;
    font-size: 19px;
    font-weight: 700;
    color: #16202a;
}

.claim-benefit dd {
    margin: 0;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.6;
}

.claim-faq {
    display: flex;
    flex-direction: column;
}

.claim-faq details {
    padding: 16px 0;
    border-bottom: 1px solid var(--portal-border);
}

.claim-faq details:first-child {
    padding-top: 0;
}

.claim-faq summary {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    list-style: none;
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    color: #16202a;
}

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

.claim-faq summary::after {
    content: "+";
    flex-shrink: 0;
    font-size: 18px;
    font-weight: 400;
    color: var(--portal-muted);
}

.claim-faq details[open] summary::after {
    content: "\2212";
}

.claim-faq summary:focus-visible {
    outline: 2px solid #617b6d;
    outline-offset: 2px;
}

.claim-faq p {
    margin: 12px 0 0;
    color: var(--portal-muted);
    font-size: 14px;
    line-height: 1.6;
}

@media (min-width: 900px) {
    .claim-hero {
        padding: 60px 0 50px;
    }

    .claim-hero-grid {
        display: grid;
        grid-template-columns: 1.05fr 0.95fr;
        gap: 64px;
        align-items: center;
    }

    .claim-hero-grid > * {
        max-width: none;
    }

    .claim-hero h1 {
        font-size: 38px;
    }

    .claim-hero-tagline {
        font-size: 18px;
    }

    .claim-hero-lede {
        font-size: 16px;
        max-width: none;
    }

    .claim-hero .portal-btn-block {
        display: inline-flex;
        width: auto;
        min-width: 260px;
    }

    .claim-hero-assurance {
        text-align: left;
    }

    .claim-section {
        padding: 50px 0;
    }

    .claim-section-tight {
        padding: 36px 0;
    }

    .claim-lead {
        font-size: 20px;
        max-width: 52ch;
    }

    .claim-body {
        max-width: 66ch;
    }

    .claim-preview-image {
        height: 240px;
    }

    .claim-preview-name {
        font-size: 24px;
    }

    .claim-benefit-list {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 4px 48px;
    }
}


/* ---------------------------------------------------------
   Reduced motion
   --------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
    .portal-btn,
    .portal-business-row-link,
    .claim-preview,
    .claim-preview-image img {
        transition: none;
    }
}
