/* Fraunces (headings/brand moments - reads as "premium travel", not
   generic SaaS) and Inter (UI/body text) load via <link> tags in
   base.html's <head>, not @import here, so the browser can fetch the
   fonts and this stylesheet in parallel instead of blocking on one. */

:root {
    --color-primary: #1d6f6a;
    --color-primary-dark: #14514d;
    --color-primary-light: #e4f0ee;
    --color-accent: #c96f3e;
    --color-accent-dark: #a8582e;
    --color-accent-light: #fbeee5;
    --color-bg: #f7f8fa;
    --color-surface: #ffffff;
    --color-sand: #fbf8f3;
    --color-text: #1f2933;
    --color-text-muted: #5a6572;
    --color-border: #dde2e7;
    --color-success-bg: #e3f6e8;
    --color-success-text: #1e6b3a;
    --color-error-bg: #fdeceb;
    --color-error-text: #a4302a;
    --color-warning-bg: #fff5e0;
    --color-warning-text: #8a5a00;
    --color-info-bg: #e8f0fe;
    --color-info-text: #1c4587;
    --color-danger: #b3392f;
    --radius: 0.65rem;
    --radius-lg: 1.15rem;
    --radius-pill: 999px;
    --shadow-sm: 0 1px 2px rgba(31, 41, 51, 0.06), 0 1px 1px rgba(31, 41, 51, 0.04);
    --shadow-md: 0 8px 24px rgba(31, 41, 51, 0.08), 0 2px 6px rgba(31, 41, 51, 0.05);
    --shadow-lg: 0 20px 48px rgba(31, 41, 51, 0.12), 0 6px 16px rgba(31, 41, 51, 0.06);
    --font-sans:
        "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial,
        sans-serif;
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: var(--font-sans);
    color: var(--color-text);
    background: var(--color-bg);
    display: flex;
    flex-direction: column;
    /* Fixed height, not min-height: flex children with min-height:0 (like
       .content-flush / .chat-messages) need a bounded box to shrink into
       and scroll inside - min-height alone lets body grow past one
       viewport instead, which used to let the chat input drift
       off-screen below a long conversation. 100dvh handles mobile browser
       chrome; the min-height:100vh fallback keeps short/legacy pages
       filling the screen where dvh isn't supported. */
    min-height: 100vh;
    height: 100dvh;
}

h1, h2, h3 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--color-text);
    letter-spacing: -0.01em;
}

h1 {
    font-size: 1.9rem;
    margin: 0 0 0.6rem;
}

h2 {
    font-size: 1.35rem;
    margin: 1.75rem 0 0.75rem;
}

p {
    line-height: 1.6;
}

a {
    color: var(--color-primary);
}

a:hover {
    color: var(--color-primary-dark);
}

/* Header / nav */

.site-header {
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-shrink: 0;
}

.site-header-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 0.85rem 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.brand {
    display: flex;
    align-items: center;
    text-decoration: none;
    margin-right: auto;
}

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

.site-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.site-nav a {
    text-decoration: none;
    color: var(--color-text-muted);
    font-size: 0.95rem;
}

.site-nav a:hover {
    color: var(--color-primary);
}

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

.lang-switcher {
    margin: 0;
}

.lang-switcher select {
    font: inherit;
    font-size: 0.9rem;
    color: var(--color-text-muted);
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.3rem 0.5rem;
    cursor: pointer;
}

.lang-switcher select:hover {
    color: var(--color-primary);
    border-color: var(--color-primary);
}

.link-button {
    background: none;
    border: none;
    padding: 0;
    font: inherit;
    color: var(--color-text-muted);
    cursor: pointer;
    text-decoration: underline;
}

.link-button:hover {
    color: var(--color-primary);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 4px;
    background: none;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    cursor: pointer;
}

.nav-toggle span {
    display: block;
    width: 1.1rem;
    height: 2px;
    background: var(--color-text);
    border-radius: 1px;
}

.site-nav-backdrop {
    display: none;
}

@media (max-width: 640px) {
    .nav-toggle {
        display: flex;
    }

    /* Overlays the page instead of pushing content down like it used to.
       Stays display: flex at all times so the transform can actually
       animate; position: fixed pulls it out of the header's flow
       entirely, so it never affects .site-header-inner's layout. */
    .site-nav {
        position: fixed;
        top: 0;
        left: 0;
        bottom: 0;
        z-index: 50;
        width: 80%;
        max-width: 300px;
        margin: 0;
        background: var(--color-surface);
        box-shadow: var(--shadow-lg);
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
        padding: 4.5rem 1.5rem 1.5rem;
        overflow-y: auto;
        transform: translateX(-100%);
        transition: transform 0.2s ease;
    }

    .site-nav.is-open {
        transform: translateX(0);
    }

    .site-nav-backdrop {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(31, 41, 51, 0.45);
        z-index: 49;
    }

    .site-nav-backdrop.is-open {
        display: block;
    }
}

/* Messages */

.messages {
    list-style: none;
    margin: 0 auto;
    padding: 0.75rem 1rem 0;
    max-width: 760px;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.message {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius);
    font-size: 0.95rem;
    background: var(--color-info-bg);
    color: var(--color-info-text);
}

.message.success {
    background: var(--color-success-bg);
    color: var(--color-success-text);
}

.message.error {
    background: var(--color-error-bg);
    color: var(--color-error-text);
}

.message.warning {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
}

.message-close {
    background: none;
    border: none;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
    color: inherit;
    opacity: 0.6;
}

.message-close:hover {
    opacity: 1;
}

/* Permanent, non-dismissible - same reasoning as the usage-data footer
   note. "In beta" stays true the whole time it's shown, so letting
   people dismiss it would just mean most never see it again. */

.beta-banner {
    background: var(--color-info-bg);
    color: var(--color-info-text);
    text-align: center;
    font-size: 0.85rem;
    padding: 0.45rem 1rem;
}

/* Styled like an info-level .message rather than a modal - it's a soft
   "want to switch?" nudge, never a forced interruption. Starts [hidden]
   in the markup (base.html); JS only reveals it once sessionStorage
   confirms it wasn't already dismissed this session - see
   static/js/main.js. */

.language-suggestion {
    max-width: 760px;
    margin: 0.75rem auto 0;
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius);
    background: var(--color-info-bg);
    color: var(--color-info-text);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.95rem;
}

/* [hidden] alone loses to our display: flex above (same specificity,
   loads later) - this override keeps it actually hidden until JS
   reveals it. */
.language-suggestion[hidden] {
    display: none;
}

.language-suggestion-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-shrink: 0;
}

.language-suggestion-switch {
    background: var(--color-info-text);
    color: var(--color-surface);
    border: none;
    border-radius: var(--radius-pill);
    padding: 0.35rem 0.9rem;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
}

.language-suggestion-switch:hover {
    opacity: 0.9;
}

.language-suggestion-dismiss {
    background: none;
    border: none;
    color: inherit;
    opacity: 0.75;
    font-size: 0.85rem;
    cursor: pointer;
    text-decoration: underline;
}

.language-suggestion-dismiss:hover {
    opacity: 1;
}

/* Page content */

.site-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 760px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

/* For pages with their own internally-scrolling region (e.g. /chat/'s
   .chat-messages) - fills the space left by the header/footer like
   .site-content, but skips its padding/max-width. min-height:0 lets the
   flex child get squeezed down to one viewport's worth of space, so its
   own overflow:auto can absorb the rest. Don't reach for this on a page
   without that scroll region: the landing page tried it once before it
   had one, and <main> got silently capped shorter than its actual
   content, pushing the footer up over the destinations section instead
   of below it - see .content-wide instead. */
.content-flush {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

/* For full-width pages that are just taller than one viewport and should
   scroll normally (the landing page) - same flush styling as
   .content-flush but without min-height:0, so <main> is free to grow to
   its full content height instead of getting capped to the space left by
   the header/footer. */
.content-wide {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
}

/* Forms - targets the default {{ form.as_p }} output, no per-template markup needed */

form p {
    margin: 0 0 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

form label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

input, select, textarea {
    font: inherit;
    padding: 0.55rem 0.7rem;
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    background: var(--color-surface);
    color: var(--color-text);
}

input:focus, select:focus, textarea:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 1px;
}

textarea {
    resize: vertical;
    min-height: 4.5rem;
}

/* CheckboxSelectMultiple etc. render as a plain <ul> inside the wrapping
   <p> - style it as a clean option list rather than bullet points. */
form ul {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

form ul label {
    font-weight: 400;
    color: var(--color-text);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

form ul input[type="checkbox"], form ul input[type="radio"] {
    width: auto;
}

ul.errorlist {
    list-style: none;
    margin: 0 0 0.4rem;
    padding: 0;
    color: var(--color-error-text);
    font-size: 0.85rem;
}

/* Buttons */

button, .btn {
    display: inline-block;
    font: inherit;
    font-weight: 600;
    padding: 0.6rem 1.2rem;
    border-radius: var(--radius-pill);
    border: 1px solid var(--color-primary);
    background: var(--color-primary);
    color: #fff;
    cursor: pointer;
    text-decoration: none;
    line-height: 1.2;
    box-shadow: var(--shadow-sm);
    transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease,
        box-shadow 0.15s ease;
}

button:hover, .btn:hover {
    background: var(--color-primary-dark);
    border-color: var(--color-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:active, .btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

button:focus-visible, .btn:focus-visible {
    outline: 2px solid var(--color-primary-dark);
    outline-offset: 2px;
}

.btn-secondary {
    background: var(--color-surface);
    color: var(--color-text);
    border-color: var(--color-border);
}

.btn-secondary:hover {
    background: var(--color-bg);
    color: var(--color-text);
    border-color: var(--color-text-muted);
}

.btn-accent {
    background: var(--color-accent);
    border-color: var(--color-accent);
}

.btn-accent:hover {
    background: var(--color-accent-dark);
    border-color: var(--color-accent-dark);
}

.btn-danger {
    background: var(--color-danger);
    border-color: var(--color-danger);
}

.btn-danger:hover {
    background: #8f2d25;
    border-color: #8f2d25;
}

.btn-lg {
    padding: 0.85rem 1.75rem;
    font-size: 1.05rem;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin: 1rem 0;
}

/* Cards / item lists (trips, travel history) */

.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.1rem 1.25rem;
    margin-bottom: 1rem;
    box-shadow: var(--shadow-sm);
}

.item-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.item-list li {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius);
    padding: 0.85rem 1rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    transition: box-shadow 0.15s ease;
}

.item-list li:hover {
    box-shadow: var(--shadow-sm);
}

.item-list .item-title {
    font-weight: 600;
}

.item-list .item-actions {
    display: flex;
    gap: 0.75rem;
    font-size: 0.9rem;
}

.item-list .item-status {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.empty-state {
    color: var(--color-text-muted);
}

/* Footer */

.site-footer {
    border-top: 1px solid var(--color-border);
    padding: 1rem;
    text-align: center;
    flex-shrink: 0;
}

.site-footer small {
    color: var(--color-text-muted);
    max-width: 760px;
    display: inline-block;
}

/* Tags / badges - used by destination recommendation cards and the
   landing page (trip type, cost tier, climate, "why this fits you"). */

.tag {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.7rem;
    font-size: 0.82rem;
    font-weight: 600;
}

.tag-accent {
    background: var(--color-accent-light);
    color: var(--color-accent-dark);
}

.tag-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

/* Chat bubbles and recommendation cards - shared between the real chat
   page (ai/templates/ai/chat.html) and the landing page's product
   preview (core/templates/core/landing.html), so a visitor's first look
   at "what happens after the CTA" is the actual UI, not a disconnected
   mockup. Used to live only in chat.html's own <style> block; moved here
   once the landing page needed the same components instead of
   duplicating the rules. */

.chat-bubble {
    max-width: 85%;
    padding: 0.7rem 1rem;
    border-radius: var(--radius-lg);
    line-height: 1.5;
    word-wrap: break-word;
    box-shadow: var(--shadow-sm);
}

.chat-bubble.user {
    align-self: flex-end;
    background: var(--color-primary);
    color: #fff;
    white-space: pre-wrap;
    border-bottom-right-radius: 0.3rem;
}

/* Assistant replies get rendered from Markdown (chat.html's
   renderMarkdown()) into real <p>/<table>/<ul> elements, so no
   white-space: pre-wrap needed here - just resetting the browser's
   default block margins to keep spacing tight between chunks. */
.chat-bubble.assistant p {
    margin: 0 0 0.6rem;
}

.chat-bubble.assistant p:last-child {
    margin-bottom: 0;
}

.chat-bubble.assistant ul,
.chat-bubble.assistant ol {
    margin: 0 0 0.6rem;
    padding-left: 1.4rem;
}

.chat-bubble.assistant li {
    margin-bottom: 0.2rem;
}

.chat-bubble.assistant .table-scroll {
    overflow-x: auto;
    margin: 0 0 0.6rem;
}

.chat-bubble.assistant table {
    border-collapse: collapse;
    width: 100%;
    font-size: 0.92rem;
}

.chat-bubble.assistant th,
.chat-bubble.assistant td {
    border: 1px solid var(--color-border);
    padding: 0.4rem 0.6rem;
    text-align: left;
    vertical-align: top;
}

.chat-bubble.assistant th {
    background: rgba(0, 0, 0, 0.04);
}

.chat-bubble.assistant {
    align-self: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-bottom-left-radius: 0.3rem;
}

.chat-bubble.error {
    align-self: flex-start;
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border-bottom-left-radius: 0.3rem;
}

.chat-bubble.loading {
    align-self: flex-start;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text-muted);
    border-bottom-left-radius: 0.3rem;
    animation: chat-loading-pulse 1.6s ease-in-out infinite;
}

@keyframes chat-loading-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.55; }
}

.recommendation-cards {
    align-self: flex-start;
    max-width: 100%;
    width: 100%;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
}

.recommendation-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1rem 1.1rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.recommendation-card .destination-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.1rem;
}

.recommendation-card .destination-country {
    color: var(--color-text-muted);
    font-size: 0.88rem;
    margin-top: -0.35rem;
}

/* One-line verdict ("Strong match for your trip") between the
   destination's own facts and the "why this fits you" breakdown. Kept
   separate from .fit-reasons-label - that's a section header for the
   content below it, this has nothing beneath it directly - so the two
   don't read as duplicate captions back to back. Reuses --color-primary
   rather than a new token, matching the fit-reasons checkmarks below. */
.recommendation-card .fit-match-strength {
    margin: 0.1rem 0 0.15rem;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-primary);
}

/* "Why this fits you" - visually separated from the destination's own
   facts (name/country/tags above) so the personalized rationale reads as
   clearly distinct from generic description. */
.recommendation-card .fit-reasons-label {
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: var(--color-accent-dark);
    margin: 0.15rem 0 -0.15rem;
}

.recommendation-card .fit-reasons {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.2rem;
    font-size: 0.85rem;
    color: var(--color-text);
}

.recommendation-card .fit-reasons li::before {
    content: "✓ ";
    color: var(--color-primary);
    font-weight: 700;
}

.recommendation-card .fit-tradeoff {
    margin: 0;
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.recommendation-card .btn {
    margin-top: auto;
    align-self: flex-start;
    font-size: 0.88rem;
    padding: 0.45rem 0.9rem;
}

@media (max-width: 480px) {
    .chat-bubble { max-width: 95%; }
    .recommendation-cards { grid-template-columns: 1fr; }
}

/* Auth pages (login/register) - a centered card instead of a bare
   {{ form.as_p }} dropped into the generic content column. */

.auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100%;
    padding: 2rem 1rem;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 2rem 1.75rem;
}

.auth-card h1 {
    text-align: center;
    margin-bottom: 0.35rem;
}

.auth-card .auth-subtitle {
    text-align: center;
    color: var(--color-text-muted);
    margin: 0 0 1.5rem;
    font-size: 0.95rem;
}

.auth-card button, .auth-card .btn {
    width: 100%;
    text-align: center;
    justify-content: center;
    margin-top: 0.25rem;
}

.auth-card .auth-footer {
    text-align: center;
    margin: 1.25rem 0 0;
    font-size: 0.9rem;
    color: var(--color-text-muted);
}

.auth-forgot-password {
    text-align: center;
    margin: 0.6rem 0 0;
    font-size: 0.85rem;
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.25rem 0;
    color: var(--color-text-muted);
    font-size: 0.85rem;
}

.auth-divider::before, .auth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--color-border);
}

.btn-google {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
}

.btn-google-icon {
    flex-shrink: 0;
}

/* Account page */

.account-header {
    display: flex;
    align-items: center;
    gap: 1.1rem;
}

.avatar-circle {
    flex-shrink: 0;
    width: 3.25rem;
    height: 3.25rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.4rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.account-header h1 {
    margin-bottom: 0.15rem;
}

.account-meta {
    margin: 0;
    color: var(--color-text);
}

.account-meta-muted {
    color: var(--color-text-muted);
    font-size: 0.9rem;
}

.quick-link-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 0.85rem;
    margin: 1.25rem 0;
}

.quick-link-card {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1rem 1.1rem;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    color: var(--color-text);
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.quick-link-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
    color: var(--color-text);
}

.quick-link-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    border-radius: var(--radius-pill);
    background: var(--color-accent-light);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.quick-link-text {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.quick-link-title {
    font-weight: 600;
}

.quick-link-desc {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

/* Traveler profile page */

/* 10% wider than the site-wide .site-content default (760px), giving the
   3-column budget row (.field-row-3) more breathing room - its own
   <main> class instead of the shared one, so no other page is affected. */
.profile-content {
    flex: 1 1 auto;
    width: 100%;
    max-width: 836px;
    margin: 0 auto;
    padding: 1.5rem 1rem 2.5rem;
}

.page-subtitle {
    color: var(--color-text-muted);
    margin: -0.35rem 0 1.5rem;
}

.profile-form {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.profile-section + .profile-section {
    margin-top: 1.75rem;
    padding-top: 1.75rem;
    border-top: 1px solid var(--color-border);
}

.profile-section h2 {
    margin: 0 0 0.9rem;
    font-size: 1.15rem;
}

.profile-section-hint {
    margin: -0.5rem 0 1rem;
    color: var(--color-text-muted);
    font-size: 0.88rem;
}

.field-block {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    margin-bottom: 1rem;
    /* min-width: 0 overrides the browser default of min-width: auto on a
       grid/flex item - without it, a .field-row-3 cell won't shrink
       narrower than its <select>'s intrinsic content width
       (budget_currency's option text especially), pushing the row past
       .card's/.profile-content's right edge instead of wrapping the
       input inside its column. Harmless outside a grid - .field-block is
       also used standalone (home_country, travelers_count above), where
       this has no visible effect. */
    min-width: 0;
}

.field-block input,
.field-block select {
    width: 100%;
}

.field-block label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--color-text-muted);
}

.field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.field-row-3 {
    grid-template-columns: 1fr 1fr 1fr;
}

@media (max-width: 480px) {
    .field-row,
    .field-row-3 {
        grid-template-columns: 1fr;
    }

    .account-header {
        align-items: flex-start;
    }
}

.form-errors {
    background: var(--color-error-bg);
    color: var(--color-error-text);
    border-radius: var(--radius);
    padding: 0.65rem 0.9rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
}

/* Landing page */

.landing-hero {
    background: linear-gradient(180deg, var(--color-sand) 0%, var(--color-bg) 100%);
    border-bottom: 1px solid var(--color-border);
}

.landing-hero-inner {
    max-width: 760px;
    margin: 0 auto;
    padding: 4.5rem 1.25rem 3.5rem;
    text-align: center;
}

.landing-eyebrow {
    display: inline-block;
    color: var(--color-accent-dark);
    font-weight: 600;
    font-size: 0.85rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

.landing-hero h1 {
    font-size: 2.6rem;
    line-height: 1.15;
    margin: 0 auto 1rem;
    max-width: 640px;
}

.landing-hero-lede {
    font-size: 1.15rem;
    color: var(--color-text-muted);
    max-width: 540px;
    margin: 0 auto 2rem;
}

.landing-hero-cta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.landing-hero-hint {
    font-size: 0.85rem;
    color: var(--color-text-muted);
}

.landing-section {
    max-width: 900px;
    margin: 0 auto;
    padding: 2.75rem 1.25rem;
}

.landing-section h2 {
    text-align: center;
    margin-top: 0;
}

/* Product preview - a real .chat-bubble + .recommendation-card, not a
   drawn illustration. */
.landing-preview-caption {
    text-align: center;
    color: var(--color-text-muted);
    margin: -0.5rem 0 1.75rem;
}

.landing-preview-mock {
    max-width: 480px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.landing-preview-mock .chat-bubble.user {
    align-self: flex-end;
}

.landing-preview-mock .recommendation-cards {
    display: block;
}

.landing-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-top: 2.25rem;
}

.landing-step {
    text-align: center;
}

.landing-step-icon {
    width: 3rem;
    height: 3rem;
    border-radius: var(--radius-pill);
    background: var(--color-primary-light);
    color: var(--color-primary-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    margin: 0 auto 1rem;
}

.landing-step h3 {
    font-size: 1.05rem;
    margin: 0 0 0.4rem;
}

.landing-step p {
    color: var(--color-text-muted);
    font-size: 0.95rem;
    margin: 0;
}

.landing-destinations {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    border-bottom: 1px solid var(--color-border);
}

.landing-destination-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-top: 2.25rem;
}

.landing-destination-card {
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.landing-destination-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.landing-destination-card .destination-name {
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 1.15rem;
    margin-bottom: 0.1rem;
}

.landing-destination-card .destination-country {
    color: var(--color-text-muted);
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
}

.landing-final-cta {
    text-align: center;
    padding: 4rem 1.25rem;
}

.landing-final-cta h2 {
    margin-top: 0;
}

@media (max-width: 720px) {
    .landing-hero h1 {
        font-size: 2rem;
    }

    .landing-steps {
        grid-template-columns: 1fr;
    }
}

/* .profile-section alone (a thin divider between stacked form sections)
   read as an unstructured wall of text for a data-dense page like this -
   flagged in review as rough-looking. .dashboard-section reuses the same
   panel treatment already established for recommendation cards
   (surface/border/radius/shadow) instead of a new visual language, plus
   real table styling - nothing here used a plain <table> before this
   page. */
.dashboard-section {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.dashboard-section h2 {
    margin: 0 0 0.75rem;
    font-size: 1.15rem;
}

.dashboard-freshness-notice {
    background: var(--color-warning-bg);
    color: var(--color-warning-text);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-section table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.dashboard-section th,
.dashboard-section td {
    padding: 0.5rem 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.dashboard-section thead th {
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.dashboard-section tbody tr:hover {
    background: var(--color-bg);
}
