/* Palette 60-30-10 */

.p6010,
.p6010 * {
    box-sizing: border-box;
}

.p6010 {
    --p-main: #d98c7a;
    --p-secondary: #e4b09f;
    --p-accent: #3e8f9c;
    --p-main-text: #111827;
    --p-secondary-text: #111827;
    --p-accent-text: #ffffff;
    max-width: 980px;
    margin: 16px auto;
    padding: 12px;
    color: #111827;
    font-family: inherit;
}

.p6010-picker,
.p6010-result {
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 18px 45px rgba(17, 24, 39, .08);
}

.p6010-picker {
    margin-bottom: 14px;
    padding: 12px;
    background:
        radial-gradient(circle at 0 0, color-mix(in srgb, var(--p-main) 20%, transparent), transparent 36%),
        linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}

.p6010-head {
    display: grid;
    gap: 12px;
}

.p6010-title-row {
    width: 100%;
}

.p6010-primary-row {
    display: grid;
    grid-template-columns: minmax(140px, 180px) minmax(0, 1fr);
    gap: 12px;
    align-items: stretch;
}

.p6010-result-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.p6010-eyebrow {
    margin: 0 0 6px;
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
    letter-spacing: .12em;
    text-transform: uppercase;
}

.p6010 h2,
.p6010 h3,
.p6010 h4,
.p6010 p {
    margin-top: 0;
}

.p6010 h2 {
    margin-bottom: 8px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.08;
    letter-spacing: -.035em;
}

.p6010 h3 {
    margin-bottom: 6px;
    font-size: clamp(20px, 2.5vw, 26px);
    line-height: 1.15;
    letter-spacing: -.025em;
}

.p6010 h4 {
    margin: 8px 0 6px;
    font-size: 15px;
    line-height: 1.2;
}

.p6010-intro,
.p6010-result-head p,
.p6010-card-body p {
    color: #4b5563;
    line-height: 1.55;
}

.p6010-intro,
.p6010-result-head p {
    max-width: 720px;
    margin-bottom: 0;
    font-size: 15px;
}

.p6010-primary-row .p6010-intro {
    display: flex;
    align-items: center;
    max-width: none;
    min-height: 100%;
    margin: 0;
    padding: 12px 14px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
    font-size: 15px;
}

.p6010-current {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .1);
}

.p6010-current-swatch {
    display: block;
    height: 58px;
    background: var(--p-main);
}

.p6010-current-code {
    display: block;
    padding: 8px 10px;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 900;
    text-align: center;
    letter-spacing: .03em;
}

.p6010-top-controls {
    display: grid;
    grid-template-columns: minmax(150px, 200px) minmax(170px, 240px) auto;
    gap: 10px;
    align-items: end;
    margin-top: 14px;
}

.p6010-field label,
.p6010-slider-label label {
    display: block;
    margin-bottom: 7px;
    color: #374151;
    font-size: 12px;
    font-weight: 900;
}

.p6010-field input,
.p6010-field select,
.p6010-random,
.p6010-copy {
    width: 100%;
    min-height: 40px;
    border: 1px solid #d1d5db;
    border-radius: 14px;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-size: 15px;
    outline: none;
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease, background-color .18s ease;
}

.p6010-field input,
.p6010-field select {
    padding: 8px 10px;
}

.p6010-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-weight: 900 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.p6010-field input:focus,
.p6010-field select:focus,
.p6010-random:focus-visible,
.p6010-copy:focus-visible,
.p6010-presets button:focus-visible,
.p6010 input[type="range"]:focus-visible {
    border-color: var(--p-accent);
    box-shadow: 0 0 0 4px color-mix(in srgb, var(--p-accent) 18%, transparent);
}

.p6010-random,
.p6010-copy,
.p6010-presets button {
    cursor: pointer;
    font-weight: 900;
}

.p6010-random {
    padding: 0 18px;
    border-color: transparent;
    background: #111827;
    color: #ffffff;
    white-space: nowrap;
}

.p6010-random:hover,
.p6010-copy:hover,
.p6010-presets button:hover {
    transform: translateY(-1px);
}

.p6010-visible-picker {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
}

.p6010-slider-field {
    min-width: 0;
}

.p6010-slider-field:first-child {
    grid-column: 1 / -1;
}

.p6010-slider-label {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.p6010-slider-label span {
    color: #6b7280;
    font-size: 12px;
    font-weight: 900;
}

.p6010 input[type="range"] {
    width: 100%;
    height: 30px;
    margin: 0;
    border-radius: 999px;
    background: transparent;
    cursor: pointer;
    accent-color: var(--p-main);
}

.p6010-slider-field:first-child input[type="range"] {
    height: 36px;
}

.p6010 input[type="range"]::-webkit-slider-runnable-track {
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, .12);
}

.p6010 input[type="range"]::-moz-range-track {
    height: 14px;
    border-radius: 999px;
    border: 1px solid rgba(17, 24, 39, .12);
}

.p6010-slider-field:first-child input[type="range"]::-webkit-slider-runnable-track {
    height: 18px;
}

.p6010-slider-field:first-child input[type="range"]::-moz-range-track {
    height: 18px;
}

.p6010-hue::-webkit-slider-runnable-track {
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.p6010-hue::-moz-range-track {
    background: linear-gradient(90deg, #ff0000, #ffff00, #00ff00, #00ffff, #0000ff, #ff00ff, #ff0000);
}

.p6010-sat::-webkit-slider-runnable-track,
.p6010-light::-webkit-slider-runnable-track {
    background: var(--track, #e5e7eb);
}

.p6010-sat::-moz-range-track,
.p6010-light::-moz-range-track {
    background: var(--track, #e5e7eb);
}

.p6010 input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 24px;
    height: 24px;
    margin-top: -6px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 3px 10px rgba(17, 24, 39, .25);
}

.p6010-slider-field:first-child input[type="range"]::-webkit-slider-thumb {
    width: 28px;
    height: 28px;
    margin-top: -5px;
}

.p6010 input[type="range"]::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border: 3px solid #ffffff;
    border-radius: 999px;
    background: #111827;
    box-shadow: 0 3px 10px rgba(17, 24, 39, .25);
}

.p6010-slider-field:first-child input[type="range"]::-moz-range-thumb {
    width: 24px;
    height: 24px;
}

.p6010-presets {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}

.p6010-presets button {
    min-height: 40px;
    padding: 0 10px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 16px;
    background: #ffffff;
    color: #111827;
    font: inherit;
    font-size: 12px;
    transition: transform .18s ease, box-shadow .18s ease;
}

.p6010-presets button::before {
    content: '';
    display: inline-block;
    width: 14px;
    height: 14px;
    margin-right: 7px;
    border-radius: 999px;
    background: var(--preset);
    vertical-align: -2px;
    box-shadow: inset 0 0 0 1px rgba(17, 24, 39, .15);
}


.p6010-manual-secondary {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(170px, 240px);
    gap: 12px 16px;
    align-items: end;
    margin-top: 12px;
    padding: 12px;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: rgba(255, 255, 255, .78);
}

.p6010-check {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 40px;
    color: #111827;
    font-size: 15px;
    font-weight: 900;
    cursor: pointer;
}

.p6010-check input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--p-main);
}

.p6010-manual-hex {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace !important;
    font-weight: 900 !important;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.p6010-manual-field input:disabled {
    background: #f3f4f6;
    color: #9ca3af;
    cursor: not-allowed;
}

.p6010-manual-note {
    grid-column: 1 / -1;
    margin: 0;
    color: #6b7280;
    font-size: 12px;
    line-height: 1.45;
}

.p6010-result {
    padding: 12px;
}

.p6010-ratio {
    flex: 0 0 min(260px, 32vw);
    display: grid;
    grid-template-columns: 6fr 3fr 1fr;
    min-height: 42px;
    overflow: hidden;
    border: 4px solid #ffffff;
    border-radius: 20px;
    box-shadow: 0 12px 28px rgba(17, 24, 39, .11);
}

.p6010-ratio-main,
.p6010-ratio-secondary,
.p6010-ratio-accent {
    display: block;
}

.p6010-ratio-main { background: var(--p-main); }
.p6010-ratio-secondary { background: var(--p-secondary); }
.p6010-ratio-accent { background: var(--p-accent); }

.p6010-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-top: 12px;
}

.p6010-card {
    min-width: 0;
    overflow: hidden;
    border: 1px solid rgba(17, 24, 39, .08);
    border-radius: 18px;
    background: #ffffff;
    box-shadow: 0 14px 32px rgba(17, 24, 39, .08);
}

.p6010-swatch {
    min-height: 56px;
    background: #dddddd;
}

.p6010-card-main .p6010-swatch { background: var(--p-main); }
.p6010-card-secondary .p6010-swatch { background: var(--p-secondary); }
.p6010-card-accent .p6010-swatch { background: var(--p-accent); }

.p6010-card-body {
    padding: 12px;
}

.p6010-percent {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 54px;
    min-height: 26px;
    padding: 0 10px;
    border-radius: 999px;
    background: #f3f4f6;
    color: #111827;
    font-size: 12px;
    font-weight: 1000;
}

.p6010-card-body p {
    min-height: 38px;
    margin-bottom: 9px;
    font-size: 14px;
}

.p6010-code-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 7px;
}

.p6010-code {
    display: block;
    width: 100%;
    padding: 9px;
    border-radius: 12px;
    background: #f9fafb;
    color: #111827;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 16px;
    font-weight: 1000;
    letter-spacing: .04em;
    text-align: center;
}

.p6010-copy {
    padding: 0 12px;
    background: #ffffff;
}

@supports not (color: color-mix(in srgb, red 10%, transparent)) {
    .p6010-picker {
        background: #ffffff;
    }

    .p6010-field input:focus,
    .p6010-field select:focus,
    .p6010-random:focus-visible,
    .p6010-copy:focus-visible,
    .p6010-presets button:focus-visible,
    .p6010 input[type="range"]:focus-visible {
        box-shadow: 0 0 0 4px rgba(17, 24, 39, .12);
    }
}

@media (max-width: 920px) {
    .p6010-primary-row {
        grid-template-columns: 1fr;
    }

    .p6010-result-head {
        display: block;
    }

    .p6010-current,
    .p6010-ratio {
        width: 100%;
    }

    .p6010-ratio {
        margin-top: 16px;
    }

    .p6010-top-controls {
        grid-template-columns: 1fr;
    }

    .p6010-visible-picker {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p6010-manual-secondary {
        grid-template-columns: 1fr;
    }

    .p6010-presets {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .p6010-cards {
        grid-template-columns: 1fr;
    }

    .p6010-card {
        display: grid;
        grid-template-columns: minmax(150px, 35%) 1fr;
    }

    .p6010-swatch {
        min-height: 100%;
    }

    .p6010-card-body p {
        min-height: auto;
    }
}

@media (max-width: 560px) {
    .p6010 {
        margin: 12px auto;
        padding: 10px;
    }

    .p6010-picker,
    .p6010-result {
        padding: 15px;
        border-radius: 20px;
    }

    .p6010 h2 {
        font-size: 28px;
    }

    .p6010-top-controls {
        gap: 10px;
    }

    .p6010-presets {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .p6010-ratio {
        min-height: 42px;
        border-width: 4px;
        border-radius: 16px;
    }

    .p6010-card {
        display: block;
        border-radius: 20px;
    }

    .p6010-swatch {
        min-height: 112px;
    }

    .p6010-card-body {
        padding: 14px;
    }

    .p6010-field input,
    .p6010-field select,
    .p6010-random,
    .p6010-copy {
        min-height: 48px;
        font-size: 15px;
    }
}
