:root {
    --font-sans: system-ui, -apple-system, sans-serif;
}

* { 
    box-sizing: border-box; 
    margin: 0; 
    padding: 0; 
}

.page {
    min-height: 100vh;
    background: #f8f7f5;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem 1rem 2.5rem;
}

.logo-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 0.15rem;
}

.logo-svg {
    width: 83%;
    max-width: 220px;
    height: auto;
    object-fit: contain;
    display: block;
}

#quizResult {
    white-space: pre-line;
}

.logo-tagline {
    font-size: 9px;
    letter-spacing: 0.16em;
    color: #b8922a;
    text-transform: uppercase;
    margin-top: 3px;
    font-family: var(--font-sans);
}

.logo-name {
    font-size: 15px;
    font-weight: 700;
    margin-top: 2px;
    font-family: var(--font-sans);
}

.logo-name span:first-child { color: #1e2d45; }
.logo-name span:last-child { color: #b8922a; }

.card {
    background: #fff;
    border-radius: 16px;
    border: 0.5px solid #e0ddd7;
    padding: 0.75rem 1.25rem 1.75rem;
    width: 100%;
    max-width: 420px;
}

.desc {
    font-size: 13px;
    color: #555;
    line-height: 1.65;
    text-align: center;
    margin-bottom: 1.25rem;
    font-family: var(--font-sans);
}

.desc-gold {
    color: #b8922a;
    font-size: 12px;
    display: block;
    margin-top: 4px;
}

.divider { 
    height: 1px; 
    background: #ece9e2; 
    margin-bottom: 1.25rem; 
}

.field { 
    margin-bottom: 1rem; 
}

.field label {
    display: block;
    font-size: 12px;
    font-weight: 500;
    color: #1e2d45;
    margin-bottom: 5px;
    font-family: var(--font-sans);
}

.field input, .field select {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 1.5px solid #eae8e2;
    border-radius: 10px;
    font-size: 15px;
    color: #1e2d45;
    background: #fdfcfa;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-sans);
    -webkit-appearance: none;
    appearance: none;
}

.field input:focus, .field select:focus {
    border-color: #b8922a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184,146,42,0.10);
}

.field input::placeholder { color: #ccc; }

.field select {
    color: #bbb;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23bbb' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-color: #fdfcfa;
}

.field select.picked { color: #1e2d45; }

.field.err input, .field.err select {
    border-color: #c0392b;
    box-shadow: 0 0 0 3px rgba(192,57,43,0.09);
}

.err-msg {
    font-size: 11px;
    color: #c0392b;
    margin-top: 4px;
    display: none;
    font-family: var(--font-sans);
}

.field.err .err-msg { display: block; }

.field textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #eae8e2;
    border-radius: 10px;
    font-size: 15px;
    color: #1e2d45;
    background: #fdfcfa;
    outline: none;
    transition: border 0.2s, box-shadow 0.2s;
    font-family: var(--font-sans);
    resize: none;
    line-height: 1.5;
}

.field textarea:focus {
    border-color: #b8922a;
    background: #fff;
    box-shadow: 0 0 0 3px rgba(184,146,42,0.10);
}

.field textarea::placeholder { color: #ccc; }

.success { 
    display: none; 
    flex-direction: column; 
    align-items: center; 
    text-align: center; 
    padding: 1rem 0 0.5rem; 
}
.success i { font-size: 48px; color: #b8922a; margin-bottom: 0.75rem; }
.success h3 { color: #1e2d45; font-size: 17px; font-weight: 600; margin-bottom: 6px; font-family: var(--font-sans); }
.success p { color: #666; font-size: 13px; line-height: 1.65; font-family: var(--font-sans); }

/* ── TWO-BUTTON ROW (ՈՒՂՂՎԱԾ) ── */
.btn-row {
    display: flex !important;
    flex-direction: row !important;
    gap: 12px !important;
    margin-top: 1.25rem !important;
    width: 100% !important;
    box-sizing: border-box !important;
}

.btn-submit, .btn-test {
    flex: 1 1 50% !important; /* Կիսում են լայնությունը 50/50 */
    height: 52px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    touch-action: manipulation;
    white-space: nowrap;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
    border: none;
    text-decoration: none;
}

/* Հիմնական հայտի կոճակը */
.btn-submit {
    background: #1e2d45;
    color: #fff;
}
.btn-submit:active { background: #0f1926; }

/* Թեստի կոճակը (Ոսկեգույն) */
.btn-test {
    background: #b8922a !important;
    color: #ffffff !important;
}
.btn-test:active { background: #a17e22 !important; }


/* ── QUIZ ── */
.quiz-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}
.quiz-section-label {
    font-size: 11px;
    font-weight: 600;
    color: #b8922a;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-family: var(--font-sans);
}
.quiz-progress-text {
    font-size: 12px;
    color: #999;
    font-family: var(--font-sans);
}
.quiz-progress-track {
    height: 4px;
    background: #eae8e2;
    border-radius: 2px;
    margin-bottom: 1.25rem;
    overflow: hidden;
}
.quiz-progress-fill {
    height: 100%;
    background: #b8922a;
    border-radius: 2px;
    transition: width 0.3s ease;
}
.quiz-question {
    font-size: 14px;
    font-weight: 600;
    color: #1e2d45;
    line-height: 1.55;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    min-height: 42px;
}
.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 0.75rem;
}
.quiz-option {
    width: 100%;
    padding: 11px 14px;
    background: #fdfcfa;
    border: 1.5px solid #eae8e2;
    border-radius: 10px;
    font-size: 14px;
    color: #1e2d45;
    text-align: left;
    cursor: pointer;
    font-family: var(--font-sans);
    transition: border 0.15s, background 0.15s;
    touch-action: manipulation;
}
.quiz-option.selected {
    border-color: #b8922a;
    background: #fdf5e4;
    font-weight: 600;
}
.quiz-option:active { background: #f5eedc; }
.quiz-err {
    font-size: 12px;
    color: #c0392b;
    display: none;
    margin-bottom: 6px;
    font-family: var(--font-sans);
}
.quiz-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 0.25rem;
}
.quiz-nav-btn {
    height: 44px;
    padding: 0 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: var(--font-sans);
    border: none;
    touch-action: manipulation;
}
.quiz-nav-back {
    background: #f0ebe0;
    color: #1e2d45;
    border: 1.5px solid #ddd8cc;
}
.quiz-nav-next {
    background: #1e2d45;
    color: #fff;
    margin-left: auto;
}
.quiz-nav-next:active { background: #0f1926; }

/* ── QUIZ RESULT ── */
.result-title {
    font-size: 15px;
    font-weight: 700;
    color: #1e2d45;
    text-align: center;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
}
.result-big {
    text-align: center;
    margin-bottom: 0.6rem;
}
.result-big-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
    letter-spacing: 0.07em;
    font-family: var(--font-sans);
    margin-bottom: 2px;
}
.result-big-num {
    font-size: 48px;
    font-weight: 800;
    font-family: var(--font-sans);
    line-height: 1.1;
}
.result-big-loss .result-big-num { font-size: 32px; }
.result-bars {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.rb-row {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    gap: 3px 8px;
    align-items: center;
}
.rb-label {
    font-size: 12px;
    color: #555;
    font-family: var(--font-sans);
    grid-column: 1;
    grid-row: 1;
}
.rb-pct {
    font-size: 12px;
    font-weight: 700;
    color: #1e2d45;
    font-family: var(--font-sans);
    grid-column: 2;
    grid-row: 1;
    text-align: right;
}
.rb-track {
    grid-column: 1 / 3;
    grid-row: 2;
    height: 7px;
    background: #eae8e2;
    border-radius: 4px;
    overflow: hidden;
}
.rb-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}
.result-cta-wrap {
    text-align: center;
    margin-top: 1.25rem;
}
.result-cta-text {
    font-size: 13px;
    color: #666;
    margin-bottom: 0.75rem;
    font-family: var(--font-sans);
    line-height: 1.5;
}

/* ---- RESPONSIVE ՄԵԴԻԱ ՀԱՐՑՈՒՄՆԵՐ (ՈՒՂՂՎԱԾ) ---- */
@media (max-height: 700px) {
    .page { padding: 0.5rem 1rem 1rem; }
    .logo-wrap { margin-bottom: 0.25rem; }
    .logo-svg { max-width: 120px; }
    .card { padding: 0.6rem 1.25rem 1rem; }
    .desc { margin-bottom: 0.5rem; font-size: 12px; }
    .divider { margin-bottom: 0.5rem; }
    .field { margin-bottom: 0.5rem; }
    .field input, .field select { height: 40px; font-size: 14px; }
    .field textarea { font-size: 14px; }
    
    /* Երկու կոճակներն էլ համաչափ փոքրանում են */
    .btn-submit, .btn-test { height: 44px; font-size: 14px; }
    .btn-row { margin-top: 0.5rem !important; }
}

@media (max-height: 600px) {
    .logo-svg { max-width: 90px; }
    .logo-tagline, .logo-name { display: none; }
    .desc { display: none; }
    .divider { display: none; }
    .field { margin-bottom: 0.4rem; }
    .field input, .field select { height: 38px; }
    
    /* Ավելի ցածր էկրանների համար */
    .btn-submit, .btn-test { height: 38px; }
}

@media (min-width: 768px) {
    .card { max-width: 480px; }
}