@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --paper: #fbf8ee;
    --paper-dark: #f3eedf;
    --page: #e9e2cf;
    --text: #292923;
    --muted: #706f65;
    --dim: #9a978b;
    --line: #d8d1bf;
    --blue-line: #c2d0d6;
    --accent: #9f4941;
    --accent-soft: #f0dfdb;
    --green: #60745b;
    --blue: #60758a;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    font-family: "Inter", Arial, sans-serif;
    color: var(--text);
    background-color: var(--page);
    background-image:
        repeating-linear-gradient(
            to bottom,
            transparent 0,
            transparent 31px,
            var(--blue-line) 32px,
            transparent 33px
        ),
        linear-gradient(
            to right,
            transparent 0,
            transparent 74px,
            rgba(159, 73, 65, 0.45) 75px,
            transparent 76px
        );

    line-height: 1.5;
}

.page {
    width: min(1100px, calc(100% - 48px));

    margin: 0 auto;
    padding: 48px 0 70px;
}

.header {
    position: relative;

    margin-bottom: 30px;
    padding-left: 15px;
}



.header h1 {
    display: inline-block;

    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.8px;

    line-height: 1.2;

    border-bottom: 2px solid var(--accent);
    padding-bottom: 3px;
}

.header > p {
    margin-top: 9px;

    max-width: 600px;

    color: var(--muted);

    font-size: 13px;
}

.status-pill {
    position: absolute;
    right: 0;
    top: 4px;

    display: flex;
    align-items: center;
    gap: 7px;

    padding: 5px 9px;

    background: var(--paper);

    border: 1px dashed var(--line);

    color: var(--muted);

    font-size: 10px;
    border-radius: 30px;
}

.dot {
    width: 6px;
    height: 6px;

    background: var(--green);

    border-radius: 50%;
}

.grid {
    display: grid;

    grid-template-columns: minmax(0, 1.55fr) minmax(300px, 0.85fr);

    gap: 28px;

    align-items: start;
}

.card,
.resultCard {
    background: var(--paper);

    border: 1px solid var(--line);

    box-shadow:
        2px 3px 0 rgba(50, 45, 30, 0.04),
        0 8px 20px rgba(50, 45, 30, 0.08);
    
    border-radius: 30px;

}

.card {
    padding: 27px 29px 30px;
}

.resultCard {
    position: sticky;
    top: 20px;

    padding: 27px 24px 21px;
}

.cardLabel {
    margin-bottom: 21px;
    padding-bottom: 10px;

    border-bottom: 1px dashed var(--line);

    color: var(--dim);

    font-size: 16px;
    font-weight: 700;
    letter-spacing: -0.4px;
}

.sectionTitle {
    margin: 22px 0 10px;

    color: var(--accent);

    font-size: 12px;
    font-weight: 600;
}

.sectionTitle:first-of-type {
    margin-top: 0;
}

.field {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.field label {
    color: var(--muted);

    font-size: 10px;
    font-weight: 500;
}

.hint {
    color: var(--dim);
    font-weight: 400;
}

input[type="number"] {
    width: 100%;
    height: 35px;
    padding: 6px 2px;
    color: var(--text);
    background: transparent;
    border: 0;
    border-bottom: 3px solid var(--line);
    border-radius: 30px;
    font-family: inherit;
    font-size: 13px;
    outline: none;
    transition: 0.15s ease-in-out;
    padding: 10px 20px;
}

input[type="number"]:focus {
    border-bottom-color: var(--accent);
}

input[type="range"] {
    flex: 1;
    height: 2px;
    appearance: none;
    -webkit-appearance: none;
    background: #c9c2b2;
    outline: none;
    cursor: pointer;
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 15px;
    height: 15px;
    background: var(--paper);
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

input[type="range"]::-moz-range-thumb {
    width: 15px;
    height: 15px;
    background: var(--paper);
    border: 2px solid var(--accent);
    border-radius: 50%;
    cursor: pointer;
}

.sliderValue {
    min-width: 55px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 600;
    text-align: right;
}

.qualityPills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.qualityPills button {
    padding: 5px 10px;
    color: var(--muted);
    background: transparent;
    border: 1px solid var(--line);
    border-radius: 3px;
    font-family: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: 0.15s ease-in-out;
}

.qualityPills button:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.qualityPills button.active,
.qualityPills button.selected {
    color: var(--accent);
    background-color: var(--accent-soft);
    border-color: #c99791;
}

hr {
    margin: 25px 0;
    border: 0;
    border-top: 1px dashed var(--line);
}

.g2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.g3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.btn {
    width: 100%;
    height: 40px;
    margin-top: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    color: var(--paper);
    background: var(--accent);
    border: 1px solid var(--accent);
    border-radius: 30px;
    font-family: inherit;
    font-size: 17px;
    font-weight: 600;
    cursor: pointer;
    letter-spacing: -0.5px;
    transition: 0.15s ease-in-out;
}

.btn:hover {
    background: #893c36;
}

.btn:active{
    transform: translateY(1px);
}

.btn:disabled {
    opacity: 0.6;
    cursor: wait;
}

.spin {
    display: none;
    width: 12px;
    height: 12px;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}


.err {
    display: none;
    margin-top: 10px;
    color: var(--accent);
    font-size: 10px;
}

.infoTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.infoTable tr {
    border-bottom: 1px solid #e4dfd1;
}

.infoTable tr:last-child {
    border-bottom: 0;
}
.infoTable td {
    padding: 8px 3px;
    vertical-align: top;
}

.infoTable td:first-child {
    width: 70px;
    color: var(--text);
    font-weight: 600;
}

.infoTable td:last-child {
    color: var(--muted);
}

.placeholder {
    min-height: 275px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: var(--dim);
}

.placeholder-gem {
    margin-bottom: 13px;
    color: #aaa595;
    font-size: 35px;
}

.placeholder p {
    font-size: 10px;
    line-height: 1.7;
}

.priceBlock {
    padding: 5px 0 13px;
    text-align: center;
}

.priceLabel {
    color: var(--dim);
    font-size: 9px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1.2px;
}

.priceValue {
    margin-top: 6px;
    color: var(--text);
    font-size: 37px;
    font-weight: 700;
    letter-spacing: -1.2px;
}

.priceRange {
    margin-top: 5px;
    color: var(--muted);
    font-size: 10px;
}

.priceRange b {
    color: var(--text);
}

.statGrid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 2px;
}

.stat {
    padding: 10px;
    background: var(--paper-dark);
    border: 1px solid #e0d9c8;
    border-radius: 20px;
}

.statLabel {
    color: var(--dim);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: -0.3px;
}

.statValue {
    margin-top: 3px;
    color: var(--text);
    font-size: 16px;
    font-weight: 800;
}

.statValue.g {
    color: var(--green);
}

.statValue.b {
    color: var(--blue);
}

.statValue.a {
    color: var(--accent);
}

.grades {
    margin-top: 20px;
}

.gradeRow {
    display: grid;
    grid-template-columns: 50px 1fr 30px;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.gradeKey {
    color: var(--muted);
    font-size: 10px;
}

.gradeBg {
    height: 5px;
    overflow: hidden;
    background: #e3ddcd;
    border-radius: 3px;
}

.gradeFill {
    width: 0;
    height: 100%;
    background: var(--accent);
    border-radius: 3px;
    transition: 0.4s ease-in-out;
}

.gradeV {
    color: var(--text);
    font-size: 10px;
    font-weight: 600;
    text-align: right;
}

.modelFooter {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-top: 22px;
    padding: 10px;
    border-top: 1px dashed var(--line);
    color: var(--dim);
    font-size: 8px;
}

.modelFooter strong {
    color: var(--muted);
}

@media (max-width: 850px) {
    .grid {
        grid-template-columns: 1fr;
    }

    .resultCard {
        position: static;
    }

    .status-pill {
        position: static;
        width: fit-content;
        margin-top: 12px;
    }
}

@media (max-width: 600px) {
    .page {
        width: calc(100% - 30px);
        padding: 35px 0 50px;
    }

    .header h1 {
        font-size: 27px;
    }

    .card,
    .resultCard {
        padding: 22px;
    }

    .g2,
    .g3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .priceValue {
        font-size: 32px;
    }
}

@media (max-width: 400px) {
    .statGrid {
        grid-template: 1fr;
    }

    .modelFooter {
        flex-direction: column;
    }
}

