:root {
    color-scheme: light;
    --green: #1f513b;
    --ink: #183829;
    --ivory: #fcfaf3;
    --sage: #e7eee4;
    --clay: #a54026;
    --pale-clay: #f9eee7;
    --muted: #4d6255;
    --line: #b6c5b8;
    font-family: system-ui, sans-serif;
    color: var(--ink);
    background: var(--ivory);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
[hidden] { display: none !important; }
a { color: var(--green); text-underline-offset: .2em; }
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; }
:focus-visible { outline: 3px solid var(--clay); outline-offset: 3px; }
.site-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem max(1.25rem, calc((100vw - 74rem) / 2));
    border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: .5rem; font-size: 1.35rem; font-weight: 750; text-decoration: none; }
.tagline { color: var(--muted); font-size: .85rem; }
.account {
    max-width: 74rem;
    margin: 1.75rem auto;
    padding: 0 1.25rem;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    gap: clamp(2rem, 6vw, 6rem);
    align-items: stretch;
}
.account-image {
    grid-column: 2;
    grid-row: 1;
    min-height: 34rem;
    border-radius: 1.25rem;
    background: var(--sage) url('./produce.jpg') center / cover;
}
.account-content { grid-column: 1; grid-row: 1; padding: 1.25rem 0 2rem; min-width: 0; }
h1 { font-size: clamp(2rem, 4.5vw, 3.25rem); line-height: 1.08; margin: 0 0 1rem; letter-spacing: -.035em; }
p { line-height: 1.5; }
p:empty { display: none; }
.tabs { display: flex; border-bottom: 1px solid var(--line); gap: 1.5rem; margin-bottom: 1.5rem; }
.tabs a { display: inline-block; padding: .65rem .15rem; text-decoration: none; }
.tabs [aria-current] { border-bottom: 3px solid var(--green); font-weight: 700; }
.step { color: var(--clay); font-size: .85rem; font-weight: 750; margin: .5rem 0; }
form { display: grid; gap: .65rem; margin-bottom: .85rem; }
fieldset { margin: 0 0 .55rem; padding: 0; border: 0; min-width: 0; }
legend, form > label { font-weight: 650; }
small { display: block; color: var(--muted); line-height: 1.45; }
.roles { display: grid; grid-template-columns: 1fr 1fr; gap: .5rem; margin: .45rem 0; }
.roles label {
    display: flex;
    align-items: center;
    gap: .4rem;
    border: 1px solid var(--line);
    border-radius: .45rem;
    padding: .7rem .55rem;
}
.roles label:has(input:checked) { background: var(--pale-clay); border-color: var(--ink); }
input[type="checkbox"], input[type="radio"] { accent-color: var(--green); }
input:not([type="checkbox"], [type="radio"]), select {
    display: block;
    width: 100%;
    min-height: 2.85rem;
    padding: .65rem .75rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: #fffefa;
    color: var(--ink);
}
.phone-field, .password-field { display: flex; align-items: stretch; gap: .45rem; }
.phone-field span { padding: .65rem .75rem; border: 1px solid var(--line); border-radius: .5rem; }
.password-field button, .secondary {
    min-height: 2.75rem;
    padding: .5rem .8rem;
    border: 1px solid var(--line);
    border-radius: .5rem;
    background: var(--sage);
    color: var(--green);
}
.primary { min-height: 3rem; border: 0; border-radius: .55rem; background: var(--green); color: white; font-weight: 700; margin-top: .45rem; }
.primary:disabled, .secondary:disabled { color: var(--muted); background: var(--sage); }
.form-link { justify-self: end; font-size: .9rem; }
.consent { display: flex; gap: .55rem; align-items: start; padding: .6rem 0; font-size: .9rem; }
.consent input { margin-top: .2rem; }
[data-error], .field-error { color: #8e3226; }
.field-error { margin: 0; font-size: .85rem; }
.identity-note { margin: .25rem 0; padding: .65rem; background: var(--sage); border-radius: .4rem; }
.place-level { display: grid; gap: .35rem; margin-bottom: .75rem; }
details { margin-top: .75rem; }
summary { cursor: pointer; color: var(--green); font-weight: 650; }
details form { margin-top: .75rem; }
.document { max-width: 48rem; padding: 2rem 1.25rem; margin: auto; overflow-wrap: anywhere; }
@media (max-width: 700px) {
    .site-header { flex-wrap: wrap; gap: .35rem; padding: .75rem 1.1rem; }
    .tagline { font-size: .75rem; }
    .account { grid-template-columns: 1fr; gap: 0; padding: 0; margin: 0; }
    .account-content { grid-column: 1; grid-row: 1; padding: 1rem 1.1rem 1.75rem; }
    .account-image { display: none; }
    .account--login .account-image {
        display: block;
        grid-column: 1;
        grid-row: 1;
        align-self: start;
        min-height: 14rem;
        border-radius: 0;
        background-image: linear-gradient(to bottom, transparent 38%, var(--ivory) 100%), url('./produce.jpg');
        background-position: center, center 49%;
    }
    .account--login .account-content { z-index: 1; padding-top: 9.5rem; }
    .account--login .tabs { background: var(--ivory); border-radius: .5rem .5rem 0 0; padding-inline: .6rem; margin-bottom: .75rem; }
    .account--register .account-image { display: block; grid-column: 1; grid-row: 2; min-height: 8rem; margin: 0 1.1rem 1.1rem; background-position: center 49%; }
}
.welcome-links { display: flex; flex-wrap: wrap; gap: .75rem; }
.welcome-links a { display: inline-flex; align-items: center; margin: 0; padding: .65rem 1rem; text-decoration: none; }
@media (max-width: 700px) {
    .account--choose .account-image, .account--welcome .account-image {
        display: block; grid-column: 1; grid-row: 1; min-height: 12rem; border-radius: 0; background-position: center 49%;
    }
    .account--choose .account-content, .account--welcome .account-content { grid-row: 2; }
}

/* Header end, language, footer */
.header-end { display: flex; align-items: center; gap: 1rem; }
.language select { min-height: 2.2rem; padding: .3rem .5rem; width: auto; font-size: .85rem; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.site-footer { margin-top: 3rem; padding: 1.75rem max(1.25rem, calc((100vw - 74rem) / 2)); border-top: 1px solid var(--line); color: var(--muted); font-size: .9rem; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; margin-bottom: .5rem; }
.site-footer p { margin: 0; }

/* About sections on the welcome and country pages */
.about { max-width: 74rem; margin: 1rem auto 0; padding: 0 1.25rem; }
.about h2 { font-size: clamp(1.45rem, 3vw, 2rem); letter-spacing: -.02em; margin: 2.75rem 0 1rem; }
.about-lead { max-width: 46rem; color: var(--muted); font-size: 1.05rem; }
.cards { list-style: none; padding: 0; margin: 1.25rem 0 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cards li { background: #fffefa; border: 1px solid var(--line); border-radius: .85rem; padding: 1.1rem 1.15rem; }
.cards h3 { margin: 0 0 .4rem; font-size: 1.05rem; color: var(--ink); }
.cards p { margin: 0; color: var(--muted); font-size: .95rem; }
.roles-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: .75rem 2rem; }
.roles-list li { padding-left: 1rem; border-left: 3px solid var(--green); line-height: 1.5; }
.steps { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.steps li { display: flex; gap: .8rem; align-items: start; }
.steps span { flex: none; display: grid; place-items: center; width: 2.1rem; height: 2.1rem; border-radius: 50%; background: var(--green); color: white; font-weight: 750; }
.steps p { margin: .2rem 0 0; color: var(--muted); font-size: .95rem; }
.join { margin: 3rem 0 0; padding: 1.75rem; border-radius: 1rem; background: var(--sage); display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 1rem; }
.join h2 { margin: 0 0 .25rem; }
.join p { margin: 0; color: var(--muted); }
.join .primary { display: inline-flex; align-items: center; padding: .65rem 1.4rem; text-decoration: none; margin: 0; }
.error-page { padding-top: 3rem; padding-bottom: 3rem; }
@media (max-width: 900px) {
    .cards { grid-template-columns: repeat(2, 1fr); }
    .steps { grid-template-columns: 1fr; }
}
@media (max-width: 700px) {
    .header-end { width: 100%; justify-content: space-between; }
    .about { padding: 0 1.1rem; }
    .about h2 { margin-top: 2rem; }
    .cards, .roles-list { grid-template-columns: 1fr; }
    .join { padding: 1.25rem; }
}

/* Login and sign-up: market story layout */
.account--login, .account--register { grid-template-columns: 1.05fr 1fr; align-items: start; gap: 1.6rem; }
.account--register { grid-template-columns: 1fr 1.05fr; }
.story {
    grid-column: 1; grid-row: 1; position: relative; overflow: hidden; border-radius: 1.4rem;
    min-height: 34rem; background: var(--ink); color: #fff; display: flex;
}
.story-photo { position: absolute; inset: 0 0 0 48%; background: url('./produce.jpg') center / cover; }
.story::before {
    content: ""; position: absolute; z-index: 1; top: -10%; bottom: -10%; left: 42%; width: 14%;
    background: var(--ink); border-radius: 0 60% 60% 0 / 0 50% 50% 0; box-shadow: 6px 0 0 #6cc24a;
}
.story-text { position: relative; z-index: 2; width: 52%; padding: 2rem 1.75rem; display: flex; flex-direction: column; justify-content: center; gap: .9rem; }
.story-kicker { color: #b9e6a4; font-size: .78rem; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.story-title { font-size: clamp(1.5rem, 2.6vw, 2.15rem); line-height: 1.1; font-weight: 750; letter-spacing: -.03em; margin: 0; }
.story-points { list-style: none; padding: 0; margin: .4rem 0 0; display: grid; gap: .55rem; }
.story-points li { display: flex; gap: .55rem; align-items: flex-start; color: #e7efe6; line-height: 1.4; font-size: .95rem; }
.story-points li::before {
    content: "✓"; flex: none; display: grid; place-items: center; width: 1.3rem; height: 1.3rem; margin-top: .05rem;
    border-radius: 50%; background: #6cc24a; color: var(--ink); font-weight: 900; font-size: .72rem;
}
.account--login .account-content, .account--register .account-content {
    grid-column: 2; background: #fff; border: 1px solid var(--line); border-radius: 1.4rem; padding: 1.6rem 1.8rem;
}
.account--login .tabs, .account--register .tabs {
    display: grid; grid-template-columns: 1fr 1fr; gap: 0; border: 0; background: var(--sage); border-radius: 2rem; padding: .25rem; margin-bottom: 1.25rem;
}
.account--login .tabs a, .account--register .tabs a { text-align: center; padding: .55rem; border-radius: 2rem; font-weight: 700; color: var(--muted); }
.account--login .tabs [aria-current], .account--register .tabs [aria-current] { border: 0; background: var(--green); color: #fff; }
.account--login h1, .account--register h1 { font-size: clamp(1.6rem, 3vw, 2.1rem); }
.progress { display: flex; gap: .35rem; margin: -.2rem 0 1rem; }
.progress i { flex: 1; height: .3rem; border-radius: 1rem; background: #dfe6dc; }
.progress i.on { background: var(--green); }
.account--register .roles { display: flex; flex-wrap: wrap; gap: .45rem; }
.account--register .roles label { border-radius: 2rem; padding: .5rem .9rem; font-weight: 650; background: #fff; border-width: 1.5px; }
.account--register .roles label:has(input:checked) { background: var(--pale-clay); border-color: var(--ink); color: var(--ink); }
.account--register .roles input { position: absolute; opacity: 0; pointer-events: none; }
.account--register .roles label:has(input:focus-visible) { outline: 3px solid var(--clay); outline-offset: 2px; }
.strength { display: flex; gap: .3rem; margin-top: .1rem; }
.strength i { flex: 1; height: .3rem; border-radius: 1rem; background: #dfe6dc; }
.strength[data-strength="1"] i:nth-child(-n+1), .strength[data-strength="2"] i:nth-child(-n+2) { background: #d9a23b; }
.strength[data-strength="3"] i:nth-child(-n+3), .strength[data-strength="4"] i { background: #3fa535; }
[data-strength-label]:not(:empty) { font-weight: 700; color: var(--ink); }
[data-strength-label]:not(:empty)::after { content: " ·"; }
.lang-chips { list-style: none; display: flex; flex-wrap: wrap; gap: .4rem; padding: 0; margin: 1rem 0 0; }
.lang-chips li { padding: .3rem .65rem; border-radius: 2rem; border: 1px dashed var(--line); font-size: .8rem; color: #7e8d83; background: #fff; }
.lang-chips li.on { background: var(--green); border: 1px solid var(--green); color: #fff; }
@media (max-width: 860px) {
    .account--login, .account--register { grid-template-columns: 1fr; gap: 1rem; margin: 1rem auto; padding: 0 1rem; }
    .story { grid-column: 1; grid-row: 1; min-height: 12rem; border-radius: 1.1rem; }
    .story-text { width: 60%; padding: 1.2rem; }
    .story-points { display: none; }
    .account--login .account-content, .account--register .account-content { grid-column: 1; grid-row: 2; padding: 1.25rem; border-radius: 1.1rem; }
    .account--login .account-image, .account--register .account-image { display: none; }
}
