:root {
    --ink: #151515;
    --muted: #6e6d6b;
    --paper: #ffffff;
    --canvas: #f6f6f4;
    --input: #f4f4f3;
    --gold: #dcb65b;
    --gold_dark: #bc9131;
    --danger: #e4574f;
    --success: #4fc279;
    --radius: 18px;
    font-family: "Google Sans", Arial, Helvetica, sans-serif;
    color: var(--ink);
    background: var(--canvas);
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; background: var(--canvas); }
button, input, textarea { font: inherit; }
button, label, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }

.page_shell { width: min(1120px, calc(100% - 40px)); margin: 34px auto 64px; }
.landing_card, .quiz_card, .message_screen {
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--paper);
    box-shadow: 0 16px 35px rgba(20, 20, 20, .08);
}
.landing_card { display: grid; grid-template-columns: 1.02fr .98fr; min-height: 500px; }
.landing_content {
    display: flex;
    flex-direction: column;
    min-height: 500px;
    padding: clamp(28px, 4vw, 40px) clamp(40px, 7vw, 92px) clamp(40px, 7vw, 92px);
}
.landing_image { min-height: 360px; background: url("../images/hero.jpg") center / cover no-repeat; }
.landing_logo { display: block; flex: 0 0 auto; width: min(220px, 70%); height: auto; margin: 0; }
.landing_copy {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding-top: 28px;
}
.eyebrow { margin: 0 0 14px; color: var(--gold_dark); font-size: .78rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1, h2 { max-width: 760px; margin: 0; font-weight: 700; letter-spacing: -.045em; line-height: 1.12; }
h1 { font-size: 36px; }
h2 { font-size: 36px; }
.landing_text, .message_content p, .legal_content p, .terms_text { max-width: 590px; color: var(--muted); font-size: 1rem; line-height: 1.7; }
.landing_text { margin: 24px 0 32px; }

.button { border: 0; border-radius: 8px; cursor: pointer; font-weight: 700; transition: transform .2s, background .2s, border-color .2s; }
.button:hover { transform: translateY(-1px); }
.button_primary { min-height: 54px; padding: 0 25px; background: var(--gold); color: #fff; }
.button_primary:hover { background: var(--gold_dark); }
.button_secondary, .button_back { min-height: 54px; padding: 0 20px; background: #fff; border: 2px solid var(--gold); color: var(--gold_dark); }
.landing_copy .button { align-self: flex-start; }
.button_back {
    display: inline-flex;
    min-width: 54px;
    width: 54px;
    height: 54px;
    align-items: center;
    justify-content: center;
    padding: 0;
    font-size: 1.35rem;
    line-height: 1;
}

.quiz_card { min-height: 570px; }
#quiz_form { display: flex; min-height: 565px; padding: clamp(35px, 5vw, 70px); flex-direction: column; }
.quiz_step { display: none; animation: step_in .25s ease-out; }
.quiz_step.is_active { display: block; }
.quiz_step h2 { margin-bottom: 30px; }
.choice_grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 17px 64px; max-width: 730px; }
.choice_grid_images { grid-template-columns: repeat(2, minmax(170px, 245px)); gap: 25px; }
.image_choice, .radio_choice, .button_choice, .check_choice { cursor: pointer; }
.image_choice input, .radio_choice input, .button_choice input { position: absolute; opacity: 0; }
.image_choice { display: grid; gap: 11px; color: var(--muted); font-size: 1rem; }
.image_choice_photo {
    position: relative;
    display: block;
    aspect-ratio: 1;
    overflow: hidden;
    border: 0;
    border-radius: 11px;
    background-position: center;
    background-size: cover;
    transition: transform .2s, box-shadow .2s;
}
.image_choice:hover .image_choice_photo { transform: translateY(-2px); }
.image_choice input:checked + .image_choice_photo {
    box-shadow: 0 0 0 3px var(--gold);
}
.image_choice_check {
    position: absolute;
    top: 12px;
    left: 12px;
    display: grid;
    width: 34px;
    height: 34px;
    place-items: center;
    border-radius: 50%;
    background: var(--gold);
    color: #fff;
    opacity: 0;
    transform: scale(.85);
    transition: opacity .2s, transform .2s;
}
.image_choice_check::before {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    content: "✓";
}
.image_choice input:checked + .image_choice_photo .image_choice_check {
    opacity: 1;
    transform: scale(1);
}
.image_rent { background-image: url("../images/rent.jpg"); }
.image_buy { background-image: url("../images/buy.jpg"); }
.radio_choice { display: flex; align-items: center; gap: 13px; min-height: 35px; color: var(--muted); }
.radio_choice span::before {
    display: inline-block;
    width: 20px;
    height: 20px;
    margin-right: 12px;
    vertical-align: -5px;
    border: 2px solid #e6d29a;
    border-radius: 50%;
    background: #fff;
    box-sizing: border-box;
    content: "";
}
.radio_choice input:checked + span { color: var(--ink); font-weight: 700; }
.radio_choice input:checked + span::before {
    border-color: var(--gold);
    background: var(--gold);
    box-shadow: inset 0 0 0 3px #fff;
}
.choice_row { display: flex; gap: 13px; }
.button_choice span { display: inline-flex; min-width: 104px; min-height: 48px; align-items: center; justify-content: center; border: 2px solid var(--gold); border-radius: 7px; color: var(--gold_dark); font-weight: 700; }
.button_choice input:checked + span { background: var(--gold); color: #fff; }
.terms_text { margin-top: -10px; }
.terms_question { margin: 22px 0 15px; font-weight: 700; }
.field_group { margin-bottom: 20px; }
.field_label { display: block; margin-bottom: 8px; color: var(--muted); font-size: .93rem; }
input[type="text"], input[type="tel"], textarea { width: min(850px, 100%); border: 1px solid transparent; border-radius: 10px; outline: none; background: var(--input); padding: 16px 18px; color: var(--ink); }
textarea { resize: vertical; min-height: 145px; }
input:focus, textarea:focus { border-color: var(--gold); box-shadow: 0 0 0 3px rgba(220, 182, 91, .17); }

.iti { width: min(850px, 100%); }
.iti__tel-input {
    width: 100%;
    border: 1px solid transparent;
    border-radius: 10px;
    outline: none;
    background: var(--input);
    padding: 16px 18px;
    color: var(--ink);
}
.iti__tel-input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(220, 182, 91, .17);
}
.iti__selected-country { border-radius: 10px 0 0 10px; }
.iti__country-container { margin-left: 2px; }
.iti__dropdown-content {
    z-index: 40;
    border: 1px solid #ead9a8;
    border-radius: 10px;
    box-shadow: 0 14px 35px rgba(20, 20, 20, .12);
}
.iti__search-input {
    border: 1px solid #ead9a8;
    border-radius: 8px;
    outline: none;
}
.iti__search-input:focus { border-color: var(--gold); }

.check_choice { display: flex; max-width: 850px; align-items: flex-start; gap: 10px; margin: 15px 0; color: var(--muted); font-size: .88rem; line-height: 1.5; }
.check_choice input[type="checkbox"] {
    appearance: none;
    -webkit-appearance: none;
    flex: 0 0 20px;
    width: 20px;
    height: 20px;
    min-width: 20px;
    min-height: 20px;
    margin: 2px 0 0;
    border: 2px solid #bc9131;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    box-sizing: border-box;
}
.check_choice input[type="checkbox"]:checked {
    background-color: #fff;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='none' stroke='%23bc9131' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round' d='M3.5 8.2l3 3.1 6-6.4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 14px 14px;
}
.check_choice input[type="checkbox"]:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(188, 145, 49, .25);
}
.check_choice span { flex: 1 1 auto; min-width: 0; }
.check_choice a { color: #bc9131; }
.form_error { margin: 26px 0 0; padding: 14px 17px; border-radius: 7px; background: #fff0ef; color: #a92f29; }
.admin_login_form input[type="password"] {
    height: 54px;
    padding: 0 18px;
    border: 1px solid transparent;
    border-radius: 8px;
    outline: none;
    background: var(--input);
    color: var(--ink);
    vertical-align: top;
}
.admin_login_form input[type="password"]:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(220, 182, 91, .17);
}
.quiz_footer { display: flex; align-items: center; justify-content: space-between; gap: 25px; margin-top: auto; padding-top: 36px; color: #aaa; font-size: .88rem; }
.footer_actions { display: flex; gap: 10px; }

.message_screen { display: grid; min-height: 560px; place-items: center; text-align: center; }
.message_content { width: min(700px, 100%); padding: 65px 35px; }
.message_content p { margin: 22px auto 28px; }
.legal_content { max-width: 720px; padding: clamp(40px, 6vw, 70px); }
.legal_content .eyebrow,
.legal_content h1,
.legal_content p {
    max-width: none;
    margin-left: 0;
    margin-right: 0;
    text-align: left;
}
.legal_content h1 { margin-bottom: 10px; }
.legal_content p { margin: 18px 0; }
.social_actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; margin-top: 31px; }
.social_actions .button, .whatsapp_button { display: inline-flex; align-items: center; justify-content: center; text-decoration: none; }
.whatsapp_button { min-width: 260px; }
.text_button { margin-top: 28px; border: 0; background: transparent; color: var(--gold_dark); cursor: pointer; text-decoration: underline; }
.cookie_banner { position: fixed; z-index: 20; right: 20px; bottom: 20px; display: flex; width: min(480px, calc(100% - 40px)); align-items: center; justify-content: space-between; gap: 20px; padding: 19px; border-radius: 12px; background: #242320; box-shadow: 0 14px 35px rgba(0, 0, 0, .24); color: #fff; }
.cookie_banner p { margin: 0; font-size: .79rem; line-height: 1.5; }
.cookie_banner a { color: #f1d48c; }
.cookie_banner div { display: flex; gap: 8px; }
.cookie_banner .button { min-height: 40px; padding: 0 13px; font-size: .78rem; white-space: nowrap; }
.cookie_banner .button_secondary { border-color: #8d8b82; background: transparent; color: #fff; }
.is_hidden { display: none !important; }
.honeypot { position: absolute !important; left: -10000px !important; opacity: 0 !important; }
@keyframes step_in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.admin_shell {
    min-height: auto;
    padding: clamp(28px, 5vw, 56px);
}
.admin_header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 28px;
}
.admin_header h1 { font-size: clamp(28px, 4vw, 36px); }
.admin_meta {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: .9rem;
    line-height: 1.5;
}
.admin_actions {
    display: flex;
    flex-shrink: 0;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.admin_actions form { margin: 0; }
.admin_actions .button {
    display: inline-flex;
    min-height: 42px;
    align-items: center;
    justify-content: center;
    padding: 0 16px;
    text-decoration: none;
    font-size: .9rem;
}
.admin_periods {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    width: fit-content;
    max-width: 100%;
    margin-bottom: 28px;
    padding: 6px;
    border-radius: 12px;
    background: var(--input);
}
.admin_periods a {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--muted);
    font-size: .9rem;
    font-weight: 600;
    text-decoration: none;
    transition: background .2s, color .2s;
}
.admin_periods a:hover {
    color: var(--ink);
    background: rgba(255, 255, 255, .72);
}
.admin_periods a.is_active {
    background: var(--gold);
    color: #fff;
}
.metric_grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 40px;
}
.metric {
    padding: 20px 18px;
    border-radius: 12px;
    background: var(--input);
    animation: step_in .28s ease-out both;
}
.metric:nth-child(2) { animation-delay: .04s; }
.metric:nth-child(3) { animation-delay: .08s; }
.metric:nth-child(4) { animation-delay: .12s; }
.metric:nth-child(5) { animation-delay: .16s; }
.metric span {
    display: block;
    color: var(--muted);
    font-size: .75rem;
    font-weight: 600;
    letter-spacing: .02em;
    line-height: 1.35;
}
.metric strong {
    display: block;
    margin-top: 10px;
    font-size: clamp(1.55rem, 2.4vw, 2rem);
    font-weight: 700;
    letter-spacing: -.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.metric_accent {
    background: linear-gradient(160deg, #f7efd8 0%, #f3e6c0 100%);
}
.metric_accent strong { color: var(--gold_dark); }
.admin_section h2 {
    margin: 0 0 16px;
    font-size: 22px;
    letter-spacing: -.03em;
}
.source_panel {
    overflow: hidden;
    border: 1px solid #ebebe8;
    border-radius: 12px;
}
.source_table {
    width: 100%;
    border-collapse: collapse;
}
.source_table th,
.source_table td {
    padding: 14px 16px;
    border-bottom: 1px solid #ebebe8;
    text-align: left;
}
.source_table th {
    background: var(--input);
    color: var(--muted);
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.source_table td:last-child,
.source_table th:last-child {
    text-align: right;
    font-variant-numeric: tabular-nums;
}
.source_table tbody tr:last-child td { border-bottom: 0; }
.source_table tbody tr:hover td { background: #fafaf8; }
.source_empty {
    color: var(--muted);
    text-align: center !important;
}

@media (max-width: 900px) {
    .metric_grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .metric_accent { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
    .page_shell { width: min(100% - 24px, 1120px); margin: 12px auto 40px; }
    .landing_card { grid-template-columns: 1fr; }
    .landing_content { min-height: 0; padding: 24px 28px 40px; }
    .landing_copy { padding-top: 20px; }
    .landing_image { min-height: 270px; grid-row: 1; }
    #quiz_form { min-height: 600px; padding: 34px 27px; }
    .choice_grid { grid-template-columns: 1fr; gap: 10px; }
    .choice_grid_images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .quiz_footer { align-items: flex-end; flex-wrap: wrap; }
    .quiz_footer > span { width: 100%; }
    .footer_actions { width: 100%; }
    .footer_actions .button_primary { flex: 1; }
    .social_actions { grid-template-columns: 1fr; }
    .cookie_banner { align-items: flex-start; flex-direction: column; gap: 13px; }
    .admin_shell { padding: 24px 22px 32px; }
    .admin_header { flex-direction: column; }
    .admin_periods { width: 100%; }
    .admin_actions { width: 100%; }
    .admin_actions .button { flex: 1; }
}
