:root {
    color-scheme: light;
    --ink: #252d29;
    --muted: #68736d;
    --green: #315b49;
    --green-dark: #254638;
    --paper: #f5f5f0;
    --line: #e5e8df;
    --white: #fff;
    font-family: "DM Sans", "Segoe UI", sans-serif;
} 

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--paper); }
.site-header { height: 76px; padding: 0 max(6vw, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; background: var(--white); border-bottom: 1px solid var(--line); }
.brand { display: inline-flex; align-items: center; gap: 11px; color: var(--ink); text-decoration: none; font: 800 20px Manrope, sans-serif; letter-spacing: -.7px; }
.brand-mark { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 11px; color: white; background: var(--green); font-size: 17px; }
.header-note { color: var(--muted); font-size: 13px; }
.user-tools { display: flex; align-items: center; gap: 14px; color: var(--muted); font-size: 12px; }
.user-tools form { margin: 0; }
.page { width: min(100% - 40px, 1000px); margin: 0 auto; padding: 64px 0 38px; }
.intro { max-width: 670px; padding: 0 0 35px 6px; }
.eyebrow { margin: 0 0 12px; color: var(--green); font-size: 11px; font-weight: 700; letter-spacing: 1.55px; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 16px; font: 800 clamp(38px, 6vw, 58px)/1.12 Manrope, sans-serif; letter-spacing: -2.8px; }
h1 span { color: var(--green); }
.intro > p:last-child { max-width: 570px; margin-bottom: 0; color: var(--muted); font-size: 16px; line-height: 1.7; }
.panel { margin: 16px 0; padding: 30px; border: 1px solid var(--line); border-radius: 18px; background: var(--white); box-shadow: 0 5px 22px #34463108; }
.section-heading { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 24px; }
.section-heading .eyebrow { margin-bottom: 8px; }
h2 { margin-bottom: 0; font: 700 22px Manrope, sans-serif; letter-spacing: -.55px; }
.auth-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 18px; }
.auth-form { padding: 22px; display: flex; flex-direction: column; gap: 16px; border: 1px solid var(--line); border-radius: 12px; }
.auth-form h3 { margin: 0; font: 700 16px Manrope, sans-serif; }
.auth-form .button { margin-top: 2px; }
.auth-note { margin: 17px 0 0; color: var(--muted); font-size: 12px; }
.step-number { color: #bdc6bf; font: 700 13px Manrope, sans-serif; }
.target-form { display: grid; grid-template-columns: 86px minmax(130px, 1fr) minmax(140px, .85fr) auto; align-items: end; gap: 16px; }
.field { display: flex; min-width: 0; flex-direction: column; gap: 8px; color: #4d5952; font-size: 12px; font-weight: 600; }
.field input { width: 100%; min-width: 0; height: 44px; padding: 0 12px; border: 1px solid #dfe4dc; border-radius: 8px; outline: none; color: var(--ink); background: white; font: 500 14px "DM Sans", sans-serif; }
.field input:focus, .table-input:focus { border-color: #668c76; box-shadow: 0 0 0 3px #315b491a; }
.color-picker-wrap { height: 68px; display: flex; flex-direction: column; justify-content: space-between; color: #4d5952; font-size: 12px; font-weight: 600; }
.color-picker-wrap input { width: 44px; height: 38px; padding: 3px; border: 1px solid #dfe4dc; border-radius: 8px; background: white; cursor: pointer; }
.input-with-unit { height: 44px; display: flex; align-items: center; border: 1px solid #dfe4dc; border-radius: 8px; }
.input-with-unit input { border: 0; box-shadow: none !important; }
.input-with-unit > span { padding: 0 12px 0 3px; color: #7b857f; font-size: 13px; font-weight: 500; }
.button { min-height: 44px; padding: 0 17px; display: inline-flex; align-items: center; justify-content: center; gap: 12px; border: 0; border-radius: 8px; cursor: pointer; font: 700 13px "DM Sans", sans-serif; transition: background .15s ease, transform .15s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--green); }
.button.primary:hover { background: var(--green-dark); }
.button.secondary { color: var(--green-dark); background: #eaf0eb; }
.button.secondary:hover { background: #dde9df; }
.result { margin-top: 27px; padding: 24px; border: 1px solid #dfe8df; border-radius: 12px; background: #f8faf7; }
.result-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.result-heading .eyebrow { margin-bottom: 7px; }
.result-heading h3 { margin: 0; font: 700 18px Manrope, sans-serif; }
.color-comparison { display: flex; gap: 14px; color: var(--muted); font-size: 11px; }
.color-comparison span { display: flex; align-items: center; gap: 6px; }
.swatch { width: 22px; height: 22px; flex: 0 0 auto; display: inline-block; border: 1px solid #1f29331a; border-radius: 6px; background: var(--swatch, #ccc); vertical-align: middle; }
.swatch.large { width: 42px; height: 42px; border-radius: 10px; }
.swatch.small { width: 14px; height: 14px; margin-right: 8px; border-radius: 4px; }
.mix-list { margin: 19px 0; padding: 0; list-style: none; }
.mix-list li { min-height: 54px; display: flex; align-items: center; justify-content: space-between; gap: 12px; border-top: 1px solid var(--line); }
.paint-identity { display: flex; align-items: center; gap: 11px; }
.paint-identity strong { display: block; font-size: 13px; }
.paint-identity small { display: block; margin-top: 3px; color: var(--muted); font-size: 11px; }
.amount { color: var(--green-dark); font-size: 14px; }
.save-recipe-form { display: flex; align-items: end; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line); }
.save-recipe-form .field { flex: 1; }
.inventory-form { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px 14px; padding-bottom: 26px; border-bottom: 1px solid var(--line); }
.input-with-color { display: flex; align-items: center; gap: 9px; height: 44px; color: var(--muted); font-size: 12px; font-weight: 400; }
.input-with-color input { width: 44px; height: 38px; padding: 3px; }
.form-actions { display: flex; align-items: end; }
.table-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 22px 0 12px; }
.table-heading h3 { margin: 0; font: 700 16px Manrope, sans-serif; }
.table-heading p { margin: 0; color: var(--muted); font-size: 11px; }
.count { margin-left: 5px; color: #8c9890; font: 500 12px "DM Sans", sans-serif; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; text-align: left; }
th { padding: 10px 8px; color: #859087; font-size: 10px; font-weight: 700; letter-spacing: .45px; text-transform: uppercase; white-space: nowrap; }
td { padding: 7px 6px; border-top: 1px solid #edf0ea; }
.table-input { width: 100%; min-width: 80px; height: 34px; padding: 0 7px; border: 1px solid transparent; border-radius: 5px; outline: 0; color: var(--ink); background: transparent; font: 500 11px "DM Sans", sans-serif; }
.table-input:hover { border-color: #e2e7df; }
.table-input.name-input { min-width: 120px; font-weight: 700; }
.table-color { width: 35px; height: 32px; padding: 2px; border: 1px solid #e2e7df; border-radius: 6px; background: white; cursor: pointer; }
.table-stock { height: 34px; min-width: 90px; }
.table-stock .table-input { min-width: 57px; }
.table-stock > span { padding-right: 6px; font-size: 11px; }
.row-actions { white-space: nowrap; }
.row-actions form { display: inline; }
.text-button { padding: 5px; border: 0; color: var(--green); background: transparent; cursor: pointer; font: 700 11px "DM Sans", sans-serif; }
.delete-button { color: #9a514a; }
.empty-state { padding: 20px; border: 1px dashed #dce3da; border-radius: 10px; color: var(--muted); font-size: 13px; text-align: center; }
.recipe-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.recipe-card { padding: 17px; border: 1px solid var(--line); border-radius: 12px; }
.recipe-title { display: flex; align-items: center; gap: 12px; }
.recipe-title h3 { margin: 0 0 4px; font: 700 14px Manrope, sans-serif; }
.recipe-title p { margin: 0; color: var(--muted); font-size: 11px; }
.recipe-card ul { margin: 15px 0 0; padding: 0; list-style: none; }
.recipe-card li { padding: 9px 0; display: flex; justify-content: space-between; gap: 10px; border-top: 1px solid #edf0ea; font-size: 11px; }
.recipe-card li span { display: flex; align-items: center; }
.recipe-card li strong { white-space: nowrap; }
.disclaimer { margin: 19px 2px 0; padding: 16px 18px; display: flex; align-items: flex-start; gap: 12px; border: 1px solid #e7e6dc; border-radius: 12px; background: #f0efe7; }
.disclaimer p { margin: 0; color: #68716a; font-size: 12px; line-height: 1.65; }
.disclaimer strong { color: #39423c; }
.info-mark { width: 19px; height: 19px; flex: 0 0 auto; display: grid; place-items: center; border: 1px solid #9da598; border-radius: 50%; color: #68716a; font: 700 11px Georgia, serif; }
.alert { margin: 0 0 14px; padding: 13px 16px; border: 1px solid; border-radius: 9px; font-size: 13px; }
.alert.error { border-color: #edc9c2; color: #833d35; background: #fff4f1; }
.alert.success { border-color: #c8dfcd; color: #315b49; background: #f0f8f1; }
footer { min-height: 70px; padding: 0 max(6vw, calc((100vw - 1180px) / 2)); display: flex; align-items: center; justify-content: space-between; border-top: 1px solid var(--line); color: #7c877f; background: white; font-size: 11px; }
footer span:first-child { color: var(--green); font: 800 13px Manrope, sans-serif; }

@media (max-width: 760px) {
    .site-header { height: 64px; padding: 0 20px; }
    .header-note { display: none; }
    .user-tools { gap: 8px; font-size: 10px; }
    .page { width: min(100% - 28px, 1000px); padding-top: 42px; }
    h1 { letter-spacing: -1.8px; }
    .panel { padding: 21px 17px; }
    .target-form { grid-template-columns: 66px minmax(110px, 1fr); }
    .quantity-field, .target-form > .button { grid-column: span 2; }
    .target-form > .button { width: 100%; }
    .inventory-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .table-heading { align-items: flex-start; flex-direction: column; gap: 6px; }
    .recipe-grid { grid-template-columns: 1fr; }
    .auth-grid { grid-template-columns: 1fr; }
    .result-heading { flex-direction: column; }
    .save-recipe-form { align-items: stretch; flex-direction: column; }
    footer { padding: 18px 20px; align-items: flex-start; flex-direction: column; gap: 5px; }
}

@media (max-width: 420px) {
    .inventory-form { grid-template-columns: 1fr; }
    .section-heading h2 { max-width: 270px; font-size: 19px; }
    .color-comparison { gap: 9px; }
}
