* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
    color: #1f2937;
    background: #f7f5ef;
    line-height: 1.6;
}

a {
    color: inherit;
}

.container {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
}

.site-header {
    background: #17202a;
    color: #ffffff;
    border-bottom: 4px solid #c8922e;
}

.header-inner {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand {
    font-size: 24px;
    font-weight: 800;
    text-decoration: none;
}

nav {
    display: flex;
    gap: 20px;
}

nav a {
    text-decoration: none;
    font-weight: 700;
}

.hero {
    padding: 72px 0 48px;
}

.hero-box {
    background: #ffffff;
    border: 1px solid #e5dfd2;
    border-radius: 20px;
    padding: 48px;
    box-shadow: 0 18px 50px rgba(23, 32, 42, 0.08);
}

.eyebrow {
    color: #9a6816;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

h1 {
    margin: 8px 0 16px;
    font-size: clamp(36px, 6vw, 64px);
    line-height: 1.05;
}

h2 {
    margin-top: 0;
}

.lead {
    max-width: 760px;
    font-size: 19px;
    color: #5b6470;
}

.tools-section {
    padding: 16px 0 72px;
}

.tool-card {
    max-width: 520px;
    background: #ffffff;
    border: 1px solid #e5dfd2;
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 12px 32px rgba(23, 32, 42, 0.06);
}

.tool-card p {
    color: #606a75;
}

.button {
    display: inline-block;
    margin-top: 12px;
    padding: 13px 20px;
    border-radius: 10px;
    background: #c8922e;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
}

.tool-page {
    padding: 56px 0 80px;
}

.notice {
    max-width: 760px;
    padding: 24px;
    border-left: 5px solid #c8922e;
    background: #ffffff;
    border-radius: 12px;
}

.site-footer {
    padding: 28px 0;
    background: #17202a;
    color: #d9dde2;
    text-align: center;
}

@media (max-width: 700px) {
    .header-inner {
        align-items: flex-start;
        flex-direction: column;
        padding: 18px 0;
    }

    nav {
        flex-wrap: wrap;
    }

    .hero {
        padding-top: 40px;
    }

    .hero-box {
        padding: 28px;
    }
}


/* ==========================================================
   GALLOP PAINT CALCULATOR
   ========================================================== */

.paint-tool {
    padding-top: 44px;
}

.paint-tool h1 {
    margin-bottom: 12px;
    font-size: clamp(40px, 6vw, 68px);
}

.tool-intro {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 28px;
    margin-bottom: 34px;
}

.tool-lead {
    max-width: 720px;
    margin: 0;
    color: #5f6874;
    font-size: 18px;
}

.tool-badge {
    flex: 0 0 auto;
    padding: 10px 16px;
    border: 1px solid #e4d3b2;
    border-radius: 999px;
    background: #fff9ed;
    color: #8b5c0d;
    font-size: 14px;
    font-weight: 800;
}

.calculator-alert {
    margin-bottom: 24px;
    padding: 16px 18px;
    border: 1px solid #efb6b6;
    border-left: 5px solid #b42318;
    border-radius: 12px;
    background: #fff4f4;
    color: #861c16;
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 310px;
    gap: 28px;
    align-items: start;
}

.calculator-card,
.tips-card,
.paint-report,
.calculator-content {
    border: 1px solid #e4ddcf;
    border-radius: 20px;
    background: #ffffff;
    box-shadow: 0 14px 38px rgba(23, 32, 42, 0.07);
}

.calculator-form {
    padding: 32px;
}

.card-heading > div {
    display: flex;
    align-items: flex-start;
    gap: 14px;
}

.card-heading h2 {
    margin: 0 0 4px;
    font-size: 23px;
}

.card-heading p {
    margin: 0;
    color: #68727d;
}

.compact-heading {
    margin-top: 4px;
}

.step-number {
    display: inline-grid;
    flex: 0 0 38px;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 12px;
    background: #17202a;
    color: #ffffff;
    font-weight: 900;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    margin-top: 26px;
}

.form-group {
    min-width: 0;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #26313d;
    font-size: 14px;
    font-weight: 800;
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 11px 13px;
    border: 1px solid #cfd4da;
    border-radius: 10px;
    background: #ffffff;
    color: #17202a;
    font: inherit;
    outline: none;
    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.form-group input:focus {
    border-color: #c8922e;
    box-shadow: 0 0 0 4px rgba(200, 146, 46, 0.14);
}

.form-group small {
    display: block;
    margin-top: 7px;
    color: #737d87;
    font-size: 12px;
    line-height: 1.45;
}

.input-unit {
    display: flex;
    align-items: stretch;
}

.input-unit input {
    border-radius: 10px 0 0 10px;
}

.input-unit span {
    display: grid;
    min-width: 65px;
    place-items: center;
    padding: 0 11px;
    border: 1px solid #cfd4da;
    border-left: 0;
    border-radius: 0 10px 10px 0;
    background: #f3f1eb;
    color: #505a65;
    font-size: 13px;
    font-weight: 800;
}

.currency-input span {
    min-width: 70px;
}

.section-divider {
    height: 1px;
    margin: 32px 0;
    background: #ebe5da;
}

.option-panel {
    margin-top: 24px;
    padding: 20px;
    border: 1px solid #e4ddcf;
    border-radius: 15px;
    background: #faf8f3;
}

.option-toggle {
    display: flex;
    align-items: flex-start;
    gap: 13px;
    cursor: pointer;
}

.option-toggle input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.toggle-box {
    position: relative;
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    margin-top: 1px;
    border: 2px solid #9ba3aa;
    border-radius: 6px;
    background: #ffffff;
}

.option-toggle input:checked + .toggle-box {
    border-color: #c8922e;
    background: #c8922e;
}

.option-toggle input:checked + .toggle-box::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 6px;
    width: 5px;
    height: 10px;
    border-right: 2px solid #ffffff;
    border-bottom: 2px solid #ffffff;
    transform: rotate(45deg);
}

.option-toggle strong {
    display: block;
    color: #202b37;
}

.option-toggle small {
    display: block;
    margin-top: 2px;
    color: #68727d;
}

.option-fields {
    max-width: 220px;
    margin-top: 18px;
    margin-left: 35px;
}

.option-fields-grid {
    display: grid;
    max-width: none;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
}

.form-actions {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-top: 30px;
}

.calculate-button {
    border: 0;
    cursor: pointer;
    font: inherit;
}

.reset-button,
.print-button {
    display: inline-flex;
    min-height: 46px;
    align-items: center;
    justify-content: center;
    padding: 11px 18px;
    border: 1px solid #cfd4da;
    border-radius: 10px;
    background: #ffffff;
    color: #293440;
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    cursor: pointer;
}

.tips-card {
    position: sticky;
    top: 24px;
    padding: 25px;
}

.tips-icon {
    display: grid;
    width: 38px;
    height: 38px;
    margin-bottom: 16px;
    place-items: center;
    border-radius: 50%;
    background: #c8922e;
    color: #ffffff;
    font-family: Georgia, serif;
    font-size: 22px;
    font-weight: 800;
}

.tips-card h2 {
    margin-bottom: 8px;
    font-size: 22px;
}

.tips-card p,
.tips-card li {
    color: #626d78;
}

.tips-card ul {
    padding-left: 19px;
    margin-bottom: 0;
}

.paint-report {
    margin-top: 34px;
    padding: 34px;
}

.report-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding-bottom: 24px;
    border-bottom: 1px solid #ebe5da;
}

.report-header h2 {
    margin: 5px 0;
    font-size: 32px;
}

.report-header p {
    margin: 0;
    color: #6d7781;
}

.print-button {
    border-color: #17202a;
    background: #17202a;
    color: #ffffff;
}

.result-highlight-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin: 26px 0;
}

.result-highlight {
    min-height: 150px;
    padding: 22px;
    border: 1px solid #e4ddcf;
    border-radius: 16px;
    background: #faf8f3;
}

.result-highlight span,
.result-highlight small {
    display: block;
}

.result-highlight span {
    margin-bottom: 9px;
    color: #596570;
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.result-highlight strong {
    display: block;
    color: #17202a;
    font-size: clamp(26px, 4vw, 38px);
    line-height: 1.15;
}

.result-highlight small {
    margin-top: 8px;
    color: #747e88;
}

.primary-result {
    border-color: #d9b970;
    background: linear-gradient(135deg, #fff9eb, #fffdf7);
}

.primary-result strong {
    color: #9a6816;
}

.report-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
}

.report-card {
    padding: 24px;
    border: 1px solid #e4ddcf;
    border-radius: 16px;
    background: #ffffff;
}

.report-card h3 {
    margin: 0 0 18px;
    color: #17202a;
    font-size: 20px;
}

.result-list {
    margin: 0;
}

.result-list > div {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #eee9df;
}

.result-list > div:last-child {
    border-bottom: 0;
}

.result-list dt {
    color: #5e6873;
}

.result-list dd {
    margin: 0;
    color: #17202a;
    font-weight: 800;
    text-align: right;
}

.grand-total-row {
    margin-top: 8px;
    padding-top: 17px !important;
    border-top: 2px solid #d3b16d;
}

.grand-total-row dt,
.grand-total-row dd {
    color: #8d5e0e;
    font-size: 17px;
    font-weight: 900;
}

.can-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
}

.paint-can {
    position: relative;
    min-height: 110px;
    padding: 16px 8px 11px;
    overflow: hidden;
    border: 2px solid #c8922e;
    border-radius: 13px 13px 9px 9px;
    background: linear-gradient(to bottom, #fffaf0, #f7e6bf);
    text-align: center;
}

.paint-can::before {
    content: "";
    position: absolute;
    top: 7px;
    left: 20%;
    width: 60%;
    height: 6px;
    border-radius: 999px;
    background: #8c6114;
}

.paint-can span,
.paint-can strong,
.paint-can small {
    display: block;
}

.paint-can span {
    margin-top: 10px;
    color: #80550e;
    font-size: 12px;
    font-weight: 900;
}

.paint-can strong {
    margin-top: 5px;
    color: #17202a;
    font-size: 28px;
}

.paint-can small {
    color: #606a74;
}

.primer-can {
    border-color: #64748b;
    background: linear-gradient(to bottom, #f8fafc, #e2e8f0);
}

.primer-can::before {
    background: #475569;
}

.primer-can span {
    color: #475569;
}

.purchase-summary {
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid #eee9df;
}

.purchase-summary p {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    margin: 10px 0;
    color: #5f6974;
}

.purchase-summary strong {
    color: #17202a;
}

.report-note {
    margin-top: 22px;
    padding: 17px 19px;
    border-left: 5px solid #c8922e;
    border-radius: 10px;
    background: #fff8e8;
    color: #5c513a;
}

.calculator-content {
    max-width: 850px;
    margin-top: 34px;
    padding: 30px;
}

.calculator-content h2 {
    font-size: 27px;
}

.calculator-content p {
    color: #626c76;
}

@media (max-width: 980px) {
    .calculator-layout {
        grid-template-columns: 1fr;
    }

    .tips-card {
        position: static;
    }

    .result-highlight-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 760px) {
    .tool-intro,
    .report-header {
        align-items: flex-start;
        flex-direction: column;
    }

    .calculator-form,
    .paint-report {
        padding: 23px;
    }

    .form-grid,
    .option-fields-grid,
    .report-grid {
        grid-template-columns: 1fr;
    }

    .option-fields {
        max-width: none;
        margin-left: 0;
    }

    .form-actions {
        align-items: stretch;
        flex-direction: column;
    }

    .calculate-button,
    .reset-button {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 480px) {
    .paint-tool {
        padding-top: 30px;
    }

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

@media print {
    body {
        background: #ffffff;
        color: #000000;
    }

    .site-header,
    .site-footer,
    .no-print {
        display: none !important;
    }

    .tool-page {
        padding: 0;
    }

    .container {
        width: 100%;
        max-width: none;
    }

    .paint-report {
        margin: 0;
        padding: 0;
        border: 0;
        box-shadow: none;
    }

    .report-grid,
    .result-highlight-grid {
        break-inside: avoid;
    }

    .report-card,
    .result-highlight {
        break-inside: avoid;
        box-shadow: none;
    }

    .report-header {
        padding-top: 0;
    }
}


/* ==========================================================
   GALLOP TILE CALCULATOR
   ========================================================== */

.tile-tool {
    padding-top: 44px;
}

.tile-tool h1 {
    margin-bottom: 12px;
    font-size: clamp(40px, 6vw, 68px);
}

.tile-box-card {
    display: flex;
    flex-direction: column;
}

.tile-box-visual {
    display: grid;
    min-height: 180px;
    place-items: center;
    align-content: center;
    padding: 24px;
    border: 3px solid #c8922e;
    border-radius: 14px;
    background:
        linear-gradient(
            135deg,
            rgba(200, 146, 46, 0.08) 25%,
            transparent 25%
        ) 0 0 / 26px 26px,
        linear-gradient(
            315deg,
            rgba(200, 146, 46, 0.08) 25%,
            transparent 25%
        ) 0 0 / 26px 26px,
        #fffaf0;
    text-align: center;
}

.tile-box-visual span,
.tile-box-visual strong,
.tile-box-visual small {
    display: block;
}

.tile-box-visual span {
    color: #8d5e0e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.tile-box-visual strong {
    margin: 5px 0;
    color: #17202a;
    font-size: 54px;
    line-height: 1;
}

.tile-box-visual small {
    color: #65707b;
}


/* ==========================================================
   GALLOP HOMEPAGE TOOLS GRID
   ========================================================== */

.tools-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 24px;
    align-items: stretch;
}

.tools-grid .tool-card {
    max-width: none;
    height: 100%;
}

@media (max-width: 760px) {
    .tools-grid {
        grid-template-columns: 1fr;
    }
}


/* ==========================================================
   GALLOP FLOORING CALCULATOR
   ========================================================== */

.flooring-tool {
    padding-top: 44px;
}

.flooring-tool h1 {
    margin-bottom: 12px;
    font-size: clamp(40px, 6vw, 68px);
}

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

.flooring-pack-card {
    display: flex;
    flex-direction: column;
}

.flooring-pack-visual {
    display: grid;
    min-height: 180px;
    place-items: center;
    align-content: center;
    padding: 24px;
    border: 3px solid #c8922e;
    border-radius: 14px;
    background:
        repeating-linear-gradient(
            90deg,
            rgba(200, 146, 46, 0.08) 0,
            rgba(200, 146, 46, 0.08) 28px,
            transparent 28px,
            transparent 58px
        ),
        #fffaf0;
    text-align: center;
}

.flooring-pack-visual span,
.flooring-pack-visual strong,
.flooring-pack-visual small {
    display: block;
}

.flooring-pack-visual span {
    color: #8d5e0e;
    font-size: 13px;
    font-weight: 900;
    letter-spacing: 0.12em;
}

.flooring-pack-visual strong {
    margin: 5px 0;
    color: #17202a;
    font-size: 54px;
    line-height: 1;
}

.flooring-pack-visual small {
    color: #65707b;
}

@media (max-width: 760px) {
    .flooring-option-grid {
        grid-template-columns: 1fr;
    }
}
