
:root {
    --blue: #1769e0;
    --blue-dark: #1054bd;
    --dark: #101827;
    --text: #172033;
    --muted: #697586;
    --border: #e3e8ef;
    --bg: #f3f6fa;
    --white: #ffffff;
    --green: #16865b;
    --orange: #b86b12;
    --radius: 16px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font-family: Inter, Arial, sans-serif;
    line-height: 1.6;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.speed-wrapper {
    width: min(1440px, 100%);
    margin: auto;
    padding: 0 28px;
}

.speed-header {
    min-height: 76px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.speed-brand {
    color: var(--dark);
    text-decoration: none;
    font-size: 22px;
    font-weight: 850;
    letter-spacing: -1px;
}

.speed-brand span {
    color: var(--blue);
}

.speed-brand small {
    margin-left: 7px;
    color: var(--muted);
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0;
}

.back-link {
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.back-link:hover,
.seo-back a:hover {
    color: var(--blue);
}

/* =========================================
   MNIEJSZA SEKCJA TYTUŁOWA CNC SPEED
========================================= */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(22px, 3.5vw, 42px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: clamp(13px, 2vw, 18px);
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(23,105,224,.25),
            transparent 35%
        ),
        linear-gradient(125deg, #101827, #1c2c45);
    color: #fff;
}

.hero-eyebrow {
    color: #8bb8ff;
    font-size: clamp(9px, 1.1vw, 11px);
    font-weight: 800;
    letter-spacing: 1.3px;
}

.hero h1 {
    max-width: 800px;
    margin: clamp(8px, 1.5vw, 12px) 0;
    font-size: clamp(23px, 3.2vw, 38px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.hero h1 span {
    color: #69a3ff;
}



.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 7px;
    margin-top: clamp(14px, 2vw, 19px);
}

.hero-tags span {
    padding: 5px 10px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 30px;
    color: #e5edfa;
    font-size: clamp(9px, 1vw, 11px);
}

/* Dodatkowe dopasowanie na smartfonach */

@media (max-width: 650px) {
    .hero {
        padding: clamp(18px, 5vw, 25px);
        border-radius: 14px;
    }

    .hero h1 {
        font-size: clamp(21px, 6vw, 29px);
        line-height: 1.2;
        letter-spacing: -.6px;
    }

    .hero p {
        font-size: clamp(8px, 3.4vw, 14px);
        line-height: 1.6;
    }

    .hero-tags {
        gap: 6px;
        margin-top: 13px;
    }

    .hero-tags span {
        padding: 5px 8px;
        font-size: clamp(9px, 2.5vw, 10px);
    }
}

.calculator-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.4fr) minmax(310px, .8fr);
    gap: 22px;
    align-items: start;
    margin-top: 24px;
}

.results-column {
    display: grid;
    gap: 22px;
}

.panel {
    min-width: 0;
    padding: clamp(18px, 3vw, 28px);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: 0 8px 25px rgba(20,35,60,.035);
}

.panel-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.panel h2 {
    margin: 4px 0 0;
    font-size: 21px;
    line-height: 1.3;
    letter-spacing: -.4px;
}

.free-label {
    padding: 6px 10px;
    border-radius: 30px;
    background: #e9f7f0;
    color: var(--green);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .5px;
}

.field-section {
    margin-top: 24px;
    padding-top: 21px;
    border-top: 1px solid #edf0f4;
}

.field-section:first-of-type {
    margin-top: 0;
    padding-top: 0;
    border: 0;
}

.field-section > label,
.form-group label,
.section-title {
    display: block;
    margin-bottom: 9px;
    color: #354052;
    font-size: 13px;
    font-weight: 750;
}

.field-section h3 {
    margin: 0 0 14px;
    font-size: 15px;
}

.mode-switch {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 7px;
    padding: 5px;
    border-radius: 12px;
    background: #eef2f7;
}

.mode-button {
    min-height: 43px;
    padding: 9px 12px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #657184;
    font-size: 13px;
    font-weight: 750;
}

.mode-button.active {
    background: var(--white);
    color: var(--blue);
    box-shadow: 0 2px 8px rgba(20,35,60,.1);
}

select,
input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #dce2ea;
    border-radius: 9px;
    outline: none;
    background: white;
    color: var(--text);
    font-size: 14px;
    transition: border-color .2s, box-shadow .2s;
}

select:focus,
input:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(23,105,224,.1);
}

.field-help {
    display: block;
    margin-top: 7px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.5;
}

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

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

.preset-box {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-top: 22px;
    padding: 15px;
    border: 1px solid #dce8fa;
    border-radius: 12px;
    background: #f4f8ff;
}

.preset-box strong {
    font-size: 13px;
}

.preset-box p {
    margin: 3px 0 0;
    color: var(--muted);
    font-size: 11px;
}

.button {
    min-height: 42px;
    padding: 10px 15px;
    border: 0;
    border-radius: 9px;
    font-size: 12px;
    font-weight: 750;
    transition: background .2s, transform .2s;
}

.button:hover {
    transform: translateY(-1px);
}

.button-primary {
    background: var(--blue);
    color: white;
}

.button-primary:hover {
    background: var(--blue-dark);
}

.button-light {
    border: 1px solid #dce2ea;
    background: white;
    color: #3e4a5d;
}

.form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 25px;
}

.form-actions .button {
    flex: 1;
}

.message {
    min-height: 20px;
    margin-top: 10px;
    color: var(--green);
    font-size: 12px;
}

.result-icon {
    display: grid;
    width: 38px;
    height: 38px;
    place-items: center;
    border-radius: 10px;
    background: #edf4ff;
    color: var(--blue);
    font-size: 22px;
}

.result-main {
    padding: 22px;
    border-radius: 14px;
    background: linear-gradient(135deg, #101827, #20395d);
    color: white;
}

.result-main span,
.result-main small {
    display: block;
    color: #c2d0e2;
    font-size: 12px;
}

.result-main strong {
    display: block;
    margin: 7px 0 0;
    color: #8dbaff;
    font-size: clamp(34px, 5vw, 46px);
    line-height: 1.15;
    font-weight: 850;
    letter-spacing: -1px;
    font-variant-numeric: tabular-nums;
}

.result-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 13px;
}

.result-item {
    min-width: 0;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 11px;
}

.result-item span,
.result-item small {
    display: block;
    color: var(--muted);
    font-size: 10px;
}

.result-item strong {
    display: block;
    margin: 5px 0;
    color: var(--text);
    font-size: 22px;
    font-weight: 800;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.result-line {
    margin-top: 15px;
    padding: 12px 0;
    border-bottom: 1px solid #edf0f4;
    color: var(--muted);
    font-size: 12px;
}

.result-line strong {
    color: var(--text);
}

.result-line small {
    color: var(--muted);
}

.warning-box {
    margin-top: 15px;
    padding: 13px;
    border: 1px solid #f1d7ad;
    border-radius: 10px;
    background: #fff8ed;
    color: #805014;
    font-size: 12px;
}

.formula-box {
    margin-top: 20px;
    padding: 16px;
    border-radius: 12px;
    background: #f4f6f9;
}

.formula-box h3 {
    margin: 0 0 10px;
    font-size: 13px;
}

.formula-line {
    margin-top: 8px;
    color: #4d596b;
    font-size: 12px;
    line-height: 1.7;
}

.formula-line strong {
    color: var(--text);
}

.info-panel h2 {
    margin: 0 0 12px;
    font-size: 17px;
}

.info-panel ol {
    margin: 0;
    padding-left: 20px;
    color: #596577;
    font-size: 13px;
}

.info-panel li {
    padding: 4px 0;
}

.seo-content {
    margin-top: 24px;
    padding: clamp(22px, 4vw, 38px);
}

.seo-content h2 {
    margin: 28px 0 9px;
    font-size: 21px;
}

.seo-content h2:first-child {
    margin-top: 0;
}

.seo-content p {
    max-width: 900px;
    color: #596577;
    font-size: 14px;
    line-height: 1.8;
}

.disclaimer {
    margin-top: 24px;
    padding: 16px;
    border-left: 4px solid var(--orange);
    border-radius: 8px;
    background: #fff8ed;
    color: #70501f;
    font-size: 13px;
}

.seo-back {
    margin-top: 24px;
}

.seo-back a {
    color: var(--blue);
    text-decoration: none;
    font-size: 13px;
    font-weight: 750;
}

.speed-footer {
    display: flex;
    justify-content: space-between;
    gap: 15px;
    padding: 28px 0;
    color: var(--muted);
    font-size: 12px;
}

.speed-footer strong {
    color: var(--text);
}

.hidden {
    display: none !important;
}

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

    .results-column {
        grid-template-columns: 1fr 1fr;
        align-items: start;
    }
}

@media (max-width: 650px) {
    .speed-wrapper {
        padding: 0 14px;
    }

    .speed-header {
        min-height: 64px;
    }

    .speed-brand {
        font-size: 19px;
    }

    .back-link {
        font-size: 11px;
        text-align: right;
    }

    .hero {
        padding: 30px 22px;
        border-radius: 16px;
    }

    .hero h1 {
        font-size: 43px;
    }

    .calculator-layout {
        gap: 14px;
        margin-top: 14px;
    }

    .panel {
        padding: 18px;
        border-radius: 13px;
    }

    .results-column {
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .preset-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .preset-box .button {
        width: 100%;
    }

    .form-grid {
        gap: 12px;
    }

    .form-group label {
        min-height: 36px;
        font-size: 11px;
    }

    .result-main strong {
        font-size: 38px;
    }

    .speed-footer {
        font-size: 10px;
    }
}

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

    .form-group label {
        min-height: auto;
    }

    .form-actions {
        flex-direction: column;
    }
}



/* =========================================
   ARTSITES CNC – NOWOCZESNA STOPKA
========================================= */

.speed-footer {
    width: 100%;
    margin-top: 60px;
    padding: 0;
    background: #101827;
    color: #cbd5e1;
    border-top: 3px solid #1769e0;
}

.speed-footer-inner {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
}

.speed-footer-top {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 50px;
    padding: 48px 0 42px;
}

.speed-footer-brand {
    max-width: 340px;
}

.speed-footer-logo {
    display: inline-block;
    color: #ffffff;
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -1.5px;
    text-decoration: none;
}

.speed-footer-logo span {
    color: #3987ff;
}

.speed-footer-brand p {
    margin: 14px 0 0;
    color: #94a3b8;
    font-size: 14px;
    line-height: 1.7;
}

.speed-footer-nav {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
}

.speed-footer-nav h3 {
    margin: 4px 0 8px;
    color: #ffffff;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.speed-footer-nav a {
    color: #94a3b8;
    font-size: 14px;
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

.speed-footer-nav a:hover {
    color: #60a5fa;
    transform: translateX(3px);
}

.speed-footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    min-height: 65px;
    padding: 15px 0;
    border-top: 1px solid rgba(148, 163, 184, 0.16);
    color: #64748b;
    font-size: 12px;
}

.speed-footer-note {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: #94a3b8;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.2px;
}

.speed-footer-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #3987ff;
    box-shadow: 0 0 10px rgba(57, 135, 255, 0.7);
}

/* TELEFONY I TABLETY */

@media (max-width: 700px) {
    .speed-footer {
        margin-top: 40px;
    }

    .speed-footer-inner {
        width: calc(100% - 32px);
    }

    .speed-footer-top {
        grid-template-columns: 1fr 1fr;
        gap: 30px 20px;
        padding: 35px 0 30px;
    }

    .speed-footer-brand {
        grid-column: 1 / -1;
    }

    .speed-footer-logo {
        font-size: 27px;
    }

    .speed-footer-bottom {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
        padding: 18px 0;
    }
}

@media (max-width: 380px) {
    .speed-footer-top {
        grid-template-columns: 1fr;
    }

    .speed-footer-brand {
        grid-column: auto;
    }
}
/* =========================================
   GÓRA STRONY – NAGŁÓWEK CNC SPEED
========================================= */

.speed-header {
    min-height: 82px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 10px 0;
}

.speed-brand {
    display: inline-flex;
    align-items: center;
    color: #101827;
    font-size: clamp(19px, 3vw, 23px);
    font-weight: 850;
    letter-spacing: -1px;
    text-decoration: none;
}

.speed-brand span {
    color: #1769e0;
}

.speed-brand i {
    margin-left: 7px;
    color: #697586;
    font-size: 0.65em;
    font-style: normal;
    font-weight: 700;
    letter-spacing: 1px;
}

.top-return-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid #d5e2f5;
    border-radius: 10px;
    background: #f1f6ff;
    color: #1769e0;
    font-size: clamp(12px, 2vw, 14px);
    font-weight: 750;
    line-height: 1.4;
    text-decoration: none;
    transition: all .2s ease;
}

.top-return-link span {
    font-size: 18px;
    transition: transform .2s ease;
}

.top-return-link:hover {
    border-color: #1769e0;
    background: #1769e0;
    color: #fff;
}

.top-return-link:hover span {
    transform: translateX(-3px);
}

/* Okruszki nawigacyjne */

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 9px;
    margin: 4px 0 18px;
    color: #697586;
    font-size: clamp(11px, 1.8vw, 13px);
}

.breadcrumb a {
    color: #1769e0;
    text-decoration: none;
    transition: color .2s ease;
}

.breadcrumb a:hover {
    color: #1054bd;
    text-decoration: underline;
}

.breadcrumb span[aria-current="page"] {
    color: #354052;
    font-weight: 700;
}

/* Sekcja tytułowa */

.hero {
    position: relative;
    overflow: hidden;
    padding: clamp(30px, 6vw, 70px);
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 22px;
    background:
        radial-gradient(
            circle at 85% 20%,
            rgba(23,105,224,.28),
            transparent 35%
        ),
        linear-gradient(125deg, #101827, #1c2c45);
    color: #fff;
}

.hero-eyebrow {
    color: #8bb8ff;
    font-size: clamp(10px, 1.5vw, 11px);
    font-weight: 800;
    letter-spacing: 1.5px;
}

.hero h1 {
    max-width: 900px;
    margin: 14px 0;
    font-size: clamp(30px, 5.5vw, 64px);
    line-height: 1.08;
    letter-spacing: -1.8px;
}

.hero h1 span {
    color: #69a3ff;
}

.hero p {
    max-width: 690px;
    margin-top: 20px;
    color: #d0d9e7;
    font-size: clamp(20px, 2vw, 18px);
    line-height: 1.7;
}

.hero-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 25px;
}

.hero-tags span {
    padding: 7px 12px;
    border: 1px solid rgba(255,255,255,.2);
    border-radius: 30px;
    color: #e5edfa;
    font-size: clamp(10px, 1.5vw, 12px);
}

/* =========================================
   PRZYCISK POWROTU NA DOLE STRONY
========================================= */

.seo-back {
    margin-top: 26px;
}


/* =========================================
   LINK POWROTU DO NARZĘDZI CNC
========================================= */

.cnc-return-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    width: fit-content;
    max-width: 100%;

    margin-top: 12px;
    padding: 12px 20px;

    border: 1px solid #cbdcf5;
    border-radius: 10px;

    background: #f1f6ff;
    color: #1769e0;

    font-size: clamp(13px, 2.5vw, 15px);
    font-weight: 700;
    line-height: 1.4;

    text-decoration: none;

    transition:
        background 0.2s ease,
        color 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.cnc-return-link span {
    font-size: clamp(17px, 3vw, 20px);
    line-height: 1;
    transition: transform 0.2s ease;
}

.cnc-return-link:hover {
    background: #1769e0;
    border-color: #1769e0;
    color: #fff;
}

.cnc-return-link:hover span {
    transform: translateX(-4px);
}

.cnc-return-link:focus-visible {
    outline: 3px solid rgba(23, 105, 224, 0.3);
    outline-offset: 3px;
}

/* TELEFONY */

@media (max-width: 600px) {
    .cnc-return-link {
        gap: 8px;
        padding: 11px 15px;
        font-size: clamp(12px, 3.5vw, 14px);
    }
}

@media (max-width: 380px) {
    .speed-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 14px 0;
    }

    .top-return-link {
        align-self: flex-start;
    }
}


/* =========================================
   OSTATECZNE ZMNIEJSZENIE GÓRNEJ RAMKI CNC SPEED
========================================= */

.hero {
    padding: clamp(16px, 2.5vw, 30px) !important;
    border-radius: clamp(12px, 1.5vw, 16px) !important;
}

.hero-eyebrow {
    font-size: clamp(9px, 1vw, 10px) !important;
}

.hero h1 {
    max-width: 750px !important;
    margin: 8px 0 !important;
    font-size: clamp(20px, 2.7vw, 32px) !important;
    line-height: 1.15 !important;
    letter-spacing: -.7px !important;
}

.hero p {
    max-width: 600px !important;
    margin-top: 10px !important;
    font-size: clamp(11px, 1.15vw, 13px) !important;
    line-height: 1.7 !important;
}

.hero-tags {
    gap: 6px !important;
    margin-top: 13px !important;
}

.hero-tags span {
    padding: 4px 9px !important;
    font-size: clamp(12\1px, 1.9vw, 15px) !important;
    font-weight: 700;
}

/* Smartfony */

@media (max-width: 650px) {
    .hero {
        padding: clamp(15px, 4vw, 21px) !important;
    }

    .hero h1 {
        font-size: clamp(19px, 5.5vw, 25px) !important;
        line-height: 1.2 !important;
    }

    .hero p {
        font-size: clamp(10px, 3vw, 15px) !important;
        line-height: 1.5 !important;
    }

    .hero-tags {
        margin-top: 11px !important;
    }
}