/* =========================================================
   CALCATLAS
   Main stylesheet
   ========================================================= */

:root {
    --background: #f7f8f6;
    --surface: #ffffff;
    --surface-soft: #eef4f2;
    --text: #273236;
    --text-soft: #667276;
    --primary: #3f7180;
    --primary-dark: #315d69;
    --secondary: #6f927d;
    --accent: #c39a5a;
    --border: #dde4e1;
    --radius-small: 6px;
    --radius-medium: 10px;
    --radius-large: 16px;
    --shadow-soft: 0 8px 28px rgba(27, 44, 49, 0.06);
    --page-width: 1240px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
    background: var(--background);
    color: var(--text);
    font-size: 17px;
    line-height: 1.65;
}

img {
    display: block;
    max-width: 100%;
    height: auto;
}

a {
    color: var(--primary);
    text-decoration: none;
}

a:hover {
    color: var(--primary-dark);
}

button,
input,
select,
textarea {
    font: inherit;
}

.site-container {
    width: min(92%, var(--page-width));
    margin-inline: auto;
}

/* =========================================================
   HEADER / MAIN NAVIGATION
   ========================================================= */

.site-header {
    position: relative;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--border);
}

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

.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    color: var(--text);
    font-size: 25px;
    font-weight: 750;
    line-height: 1;
    letter-spacing: -0.7px;
}

.site-logo:hover { color: var(--text); }

.site-logo-image {
    width: 31px;
    height: 31px;
    display: block;
    object-fit: contain;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 32px;
}

.nav-main-link,
.nav-dropdown-toggle {
    color: var(--text-soft);
    font-size: 15px;
    font-weight: 600;
}

.nav-main-link:hover,
.nav-dropdown-toggle:hover { color: var(--primary); }

.nav-dropdown { position: relative; }

.nav-dropdown-toggle {
    display: flex;
    align-items: center;
    gap: 7px;
    margin: 0;
    padding: 10px 0;
    background: transparent;
    border: 0;
    font-family: inherit;
    line-height: 1.4;
    cursor: pointer;
}

.nav-dropdown-arrow {
    display: inline-block;
    font-size: 12px;
    line-height: 1;
    transition: transform 0.18s ease;
}

.nav-dropdown.is-open .nav-dropdown-arrow { transform: rotate(180deg); }

.nav-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 245px;
    padding: 8px;
    background: #ffffff;
    border: 1px solid var(--border);
    border-radius: 10px;
    box-shadow: 0 12px 30px rgba(27, 44, 49, 0.12);
}

.nav-dropdown.is-open .nav-dropdown-menu { display: block; }

.nav-dropdown-menu a {
    display: block;
    padding: 10px 12px;
    color: var(--text-soft);
    border-radius: 6px;
    font-size: 15px;
    font-weight: 600;
}

.nav-dropdown-menu a:hover {
    background: var(--surface-soft);
    color: var(--primary);
}

.menu-button {
    display: none;
    padding: 9px 14px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: var(--radius-small);
    cursor: pointer;
}

/* Homepage hero */

.home-hero {
    padding: 92px 0 76px;
    text-align: center;
}

.hero-label {
    margin-bottom: 14px;
    color: var(--primary);
    font-size: 14px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.hero-title {
    max-width: 820px;
    margin: 0 auto;
    color: var(--text);
    font-size: clamp(42px, 6vw, 72px);
    font-weight: 780;
    line-height: 1.06;
    letter-spacing: -2.5px;
}

.hero-intro {
    max-width: 680px;
    margin: 24px auto 0;
    color: var(--text-soft);
    font-size: 20px;
    line-height: 1.6;
}

/* Search */

.calculator-search {
    max-width: 680px;
    margin: 40px auto 0;
    display: flex;
    padding: 7px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 14px;
    box-shadow: var(--shadow-soft);
}

.calculator-search input {
    flex: 1;
    min-width: 0;
    padding: 14px 17px;
    border: 0;
    outline: 0;
    background: transparent;
    color: var(--text);
}

.calculator-search input::placeholder {
    color: #899490;
}

.calculator-search button {
    padding: 13px 21px;
    border: 0;
    border-radius: 9px;
    background: var(--primary);
    color: #ffffff;
    font-weight: 700;
    cursor: pointer;
}

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

/* Sections */

.section {
    padding: 65px 0;
}

.section-heading {
    max-width: 700px;
    margin-bottom: 30px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 42px);
    line-height: 1.15;
    letter-spacing: -1px;
}

.section-heading p {
    margin: 10px 0 0;
    color: var(--text-soft);
}

/* Tool cards */

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

.tool-card {
    display: block;
    min-height: 190px;
    padding: 27px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-large);
    color: var(--text);
    transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.tool-card:hover {
    transform: translateY(-3px);
    color: var(--text);
    border-color: #cad6d2;
    box-shadow: var(--shadow-soft);
}

.tool-category {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--primary);
    font-size: 13px;
    font-weight: 750;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.tool-name {
    margin-bottom: 9px;
    font-size: 21px;
    font-weight: 750;
    line-height: 1.25;
    letter-spacing: -0.4px;
}

.tool-description {
    margin: 0;
    color: var(--text-soft);
    font-size: 15px;
    line-height: 1.55;
}

/* Responsive */

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .menu-button {
        display: block;
    }

    .home-hero {
        padding: 68px 0 58px;
    }

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

.why-layout {
    grid-template-columns: 1fr;
    gap: 45px;
}
	.footer-grid {
    grid-template-columns: 1fr 1fr;
}
}

/* =========================================================
   MOBILE / SMALL TABLET LAYOUT
   ========================================================= */

@media (max-width: 768px) {

    /* Browse by Category */

    .category-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 14px;
    }

    .category-card {
        width: 100%;
        padding: 18px;
        gap: 14px;
    }

    .category-icon {
        flex: 0 0 38px;
        width: 38px;
        height: 38px;
        font-size: 14px;
    }

    .category-content h3 {
        font-size: 18px;
        line-height: 1.25;
    }

    .category-content p {
        font-size: 14px;
        line-height: 1.45;
        margin-bottom: 9px;
    }


    /* Why CalcAtlas */

    .why-layout {
        display: block;
    }

    .why-intro {
        margin-bottom: 35px;
    }

    .why-grid {
        display: grid;
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .why-item {
        padding: 18px 0 0;
    }

    .why-intro h2 {
        font-size: 30px;
        line-height: 1.15;
    }

    .why-intro p {
        font-size: 16px;
    }
}

@media (max-width: 560px) {

    body {
        font-size: 16px;
    }

    .site-container {
        width: 91%;
    }

    .header-inner {
        min-height: 62px;
    }

    .site-logo {
        font-size: 20px;
    }

    .logo-mark {
        width: 27px;
        height: 27px;
        font-size: 19px;
        border-radius: 8px;
    }

    .menu-button {
        padding: 7px 11px;
        font-size: 14px;
    }

    .home-hero {
        padding: 48px 0 40px;
    }

    .hero-label {
        font-size: 12px;
        letter-spacing: 1.2px;
    }

    .hero-title {
        font-size: 38px;
        letter-spacing: -1.2px;
    }

    .hero-intro {
        margin-top: 20px;
        font-size: 17px;
        line-height: 1.55;
    }
	
	.calculator-search {
    margin-top: 30px;
    padding: 5px;
    border-radius: 12px;
}

.calculator-search input {
    padding: 10px 12px;
    font-size: 16px;
}

.calculator-search button {
    width: auto;
    padding: 10px 16px;
    font-size: 15px;
    border-radius: 8px;
}
	.section {
    padding: 42px 0;
}

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

.category-card {
    padding: 18px;
    gap: 14px;
    align-items: flex-start;
}

.category-icon {
    flex: 0 0 36px;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    font-size: 14px;
}

.category-content h3 {
    margin-bottom: 5px;
    font-size: 18px;
    line-height: 1.25;
}

.category-content p {
    margin-bottom: 10px;
    font-size: 14px;
    line-height: 1.45;
}

.category-link {
    font-size: 13px;
}

.category-section .section-heading {
    margin-bottom: 22px;
}

.category-section .section-heading h2 {
    font-size: 30px;
}

.category-section .section-heading p {
    font-size: 15px;
    line-height: 1.5;
}

.why-section {
    padding: 55px 0;
}

.why-layout {
    gap: 35px;
}

.why-intro h2 {
    font-size: 32px;
}

.why-intro p {
    font-size: 16px;
}

.why-grid {
    grid-template-columns: 1fr;
    gap: 25px;
}
	.footer-grid {
    grid-template-columns: 1fr;
    gap: 30px;
}
}

/* =========================================================
   CATEGORY SECTION
   ========================================================= */

.category-section {
    background: #ffffff;
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}

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

.category-card {
    display: flex;
    gap: 18px;
    align-items: flex-start;

    padding: 25px;

    background: var(--background);

    border: 1px solid var(--border);
    border-radius: var(--radius-large);

    color: var(--text);

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease;
}

.category-card:hover {
    transform: translateY(-2px);

    color: var(--text);

    border-color: #cad6d2;

    box-shadow: var(--shadow-soft);
}

.category-icon {
    flex: 0 0 45px;

    width: 45px;
    height: 45px;

    display: grid;
    place-items: center;

    border-radius: 12px;

    background: var(--surface-soft);
    color: var(--primary);

    font-size: 16px;
    font-weight: 800;
}

.category-content {
    min-width: 0;
}

.category-content h3 {
    margin: 0 0 7px;

    color: var(--text);

    font-size: 19px;
    line-height: 1.3;

    letter-spacing: -0.3px;
}

.category-content p {
    margin: 0 0 14px;

    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.55;
}

.category-link {
    color: var(--primary);

    font-size: 13px;
    font-weight: 700;
}


/* =========================================================
   WHY CALCATLAS
   ========================================================= */

.why-section {
    padding: 85px 0;
}

.why-layout {
    display: grid;

    grid-template-columns:
        minmax(0, 0.9fr)
        minmax(0, 1.1fr);

    gap: 80px;

    align-items: start;
}

.section-label {
    display: inline-block;

    margin-bottom: 14px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 750;

    letter-spacing: 1.2px;
    text-transform: uppercase;
}

.why-intro h2 {
    margin: 0;

    max-width: 520px;

    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.12;

    letter-spacing: -1.4px;
}

.why-intro p {
    max-width: 540px;

    margin: 22px 0 0;

    color: var(--text-soft);

    font-size: 17px;
}

.why-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 35px 30px;
}

.why-item {
    padding-top: 16px;

    border-top: 1px solid var(--border);
}

.why-number {
    display: block;

    margin-bottom: 10px;

    color: var(--primary);

    font-size: 13px;
    font-weight: 750;
}

.why-item h3 {
    margin: 0 0 7px;

    font-size: 18px;
}

.why-item p {
    margin: 0;

    color: var(--text-soft);

    font-size: 14px;
    line-height: 1.55;
}

/* Footer */

.site-footer {
    margin-top: 80px;
    padding: 55px 0 25px;
    background: #273236;
    color: #d9e0de;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.10fr 1.10fr 0.8fr;
    gap: 40px;
}

.footer-logo {
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 23px;
    font-weight: 750;
}

.site-footer p {
    max-width: 390px;
    color: #aebbb7;
}

.site-footer strong {
    display: block;
    margin-bottom: 12px;
    color: #ffffff;
    font-size: 15px;
}

.site-footer a {
    display: block;
    margin: 7px 0;
    color: #b8c4c0;
    font-size: 14px;
}

.site-footer a:hover {
    color: #ffffff;
}

.footer-bottom {
    margin-top: 45px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    color: #8f9d99;
    font-size: 13px;
}

/* =========================================================
   NARROW SCREEN CATEGORY + WHY LAYOUT
   ========================================================= */

@media (max-width: 1200px) {

    /* Browse by Category */

    .category-grid {
        grid-template-columns: 1fr !important;
    }

    .category-card {
        width: 100%;
    }


    /* Why CalcAtlas */

    .why-layout {
        grid-template-columns: 1fr !important;
    }

    .why-grid {
        grid-template-columns: 1fr !important;
    }
}

/* =========================================================
   CALCATLAS - REAL MOBILE OVERRIDES
   ========================================================= */

@media (max-width: 600px) {

    html,
    body {
        width: 100%;
        max-width: 100%;
        overflow-x: hidden;
    }

    .site-container {
        width: 90%;
        max-width: 100%;
    }


    /* -------------------------
       HEADER
       ------------------------- */

    .site-header {
        width: 100%;
    }

    .header-inner {
        position: relative;
        min-height: 68px;
    }

    .site-logo {
        font-size: 21px;
    }

    .site-logo-image {
    width: 30px;
    height: 30px;
}

    .menu-button {
        display: block;
        padding: 8px 13px;
        font-size: 15px;
    }


    /* -------------------------
       MOBILE NAVIGATION
       ------------------------- */

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 68px);
        max-height: calc(100dvh - 68px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding: 6px 5% 10px;
        background: #ffffff;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(27, 44, 49, 0.08);
    }

    .main-nav.is-open { display: flex; }

    .main-nav > .nav-main-link {
        display: block;
        width: 100%;
        padding: 14px 4px;
        border-bottom: 1px solid var(--border);
        color: var(--text-soft);
        font-size: 16px;
        font-weight: 600;
    }

    .main-nav > .nav-dropdown {
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-dropdown-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 4px;
        color: var(--text-soft);
        font-size: 16px;
        font-weight: 600;
        text-align: left;
    }

    .nav-dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        padding: 2px 0 6px 12px;
        background: transparent;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .nav-dropdown.is-open .nav-dropdown-menu { display: block; }

    .nav-dropdown-menu a {
        display: block;
        padding: 7px 10px;
        border: 0;
        color: var(--text-soft);
        font-size: 15px;
        font-weight: 500;
        line-height: 1.35;
    }

    .nav-dropdown-menu a:hover {
        background: var(--surface-soft);
        color: var(--primary);
    }

    .main-nav > .nav-main-link:last-child { border-bottom: 0; }


    /* -------------------------
       HERO
       ------------------------- */

    .home-hero {
        padding: 55px 0 48px;
    }

    .hero-label {
        font-size: 11px;
        letter-spacing: 1.1px;
    }

    .hero-title {
        font-size: 42px;
        line-height: 1.03;
        letter-spacing: -1.5px;
    }

    .hero-intro {
        max-width: 100%;

        margin-top: 22px;

        font-size: 17px;
        line-height: 1.55;
    }


    /* -------------------------
       SEARCH
       ------------------------- */

    .calculator-search {
        width: 100%;

        margin-top: 30px;
        padding: 5px;

        display: grid;
        grid-template-columns: minmax(0, 1fr) auto;

        border-radius: 12px;
    }

    .calculator-search input {
        width: 100%;
        min-width: 0;

        padding: 11px 10px;

        font-size: 15px;

        overflow: hidden;
        text-overflow: ellipsis;
    }

    .calculator-search button {
        width: auto;

        padding: 10px 14px;

        font-size: 14px;

        white-space: nowrap;
    }


    /* -------------------------
       GENERAL SECTIONS
       ------------------------- */

    .section {
        padding: 45px 0;
    }

    .section-heading {
        margin-bottom: 24px;
    }

    .section-heading h2 {
        font-size: 30px;
        line-height: 1.15;
    }

    .section-heading p {
        font-size: 16px;
        line-height: 1.5;
    }


    /* -------------------------
       POPULAR CALCULATORS
       ------------------------- */

    .card-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .tool-card {
        width: 100%;
        min-height: 0;

        padding: 21px;
    }

    .tool-category {
        margin-bottom: 10px;
        font-size: 12px;
    }

    .tool-name {
        margin-bottom: 7px;

        font-size: 20px;
        line-height: 1.25;
    }

    .tool-description {
        font-size: 15px;
        line-height: 1.5;
    }


    /* -------------------------
       CATEGORIES
       ------------------------- */

    .category-grid {
        grid-template-columns: 1fr !important;
        gap: 14px;
    }

    .category-card {
        width: 100%;

        padding: 18px;

        gap: 14px;
    }

    .category-icon {
        flex: 0 0 38px;

        width: 38px;
        height: 38px;
    }

    .category-content h3 {
        font-size: 18px;
    }

    .category-content p {
        font-size: 14px;
        line-height: 1.45;
    }


    /* -------------------------
       WHY CALCATLAS
       ------------------------- */

    .why-layout {
        display: block;
    }

    .why-intro {
        margin-bottom: 34px;
    }

    .why-intro h2 {
        font-size: 30px;
    }

    .why-grid {
        grid-template-columns: 1fr !important;
        gap: 22px;
    }


    /* -------------------------
       FOOTER
       ------------------------- */

    .site-footer {
        width: 100%;

        margin-top: 50px;

        padding: 42px 0 22px;
    }

    .footer-grid {
        display: grid;
        grid-template-columns: 1fr !important;

        gap: 28px;
    }

    .site-footer p {
        max-width: 100%;

        margin-bottom: 0;

        font-size: 15px;
        line-height: 1.55;
    }

    .footer-logo {
        font-size: 22px;
    }

    .site-footer strong {
        margin-bottom: 8px;
    }

    .site-footer a {
        margin: 6px 0;
        font-size: 15px;
    }

    .footer-bottom {
        margin-top: 30px;
        padding-top: 18px;
    }

}

/* =========================================================
   CATEGORY LANDING PAGES
   Engineering, Home & Building, Money, Conversions, etc.
   ========================================================= */

.page-container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 28px 24px 60px;
}


/* ---------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------- */

.page-container .breadcrumbs {
    margin-bottom: 28px;
    font-size: 0.95rem;
    color: #66757d;
}

.page-container .breadcrumbs a {
    color: #39758a;
    text-decoration: none;
}

.page-container .breadcrumbs a:hover {
    text-decoration: underline;
}

.page-container .breadcrumbs span {
    margin-left: 7px;
}


/* ---------------------------------------------------------
   Category introduction
   --------------------------------------------------------- */

.category-intro {
    max-width: 820px;
    margin-bottom: 42px;
    padding: 30px 32px;

    border: 1px solid #dbe5ea;
    border-radius: 14px;

    background: #f4f8fa;
}

.category-intro h1 {
    margin: 0 0 16px;

    font-size: 2.4rem;
    line-height: 1.15;
    letter-spacing: -0.5px;
}

.category-intro p {
    margin: 0 0 10px;

    color: #3e4a50;

    font-size: 1.08rem;
    line-height: 1.7;
}

.category-intro p:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   Calculator category section

   Scoped to .page-container so this does NOT interfere
   with the Browse by Category section on the homepage.
   --------------------------------------------------------- */

.page-container .category-section {
    margin-bottom: 55px;
    padding: 0 24px 18px;

    background: #ffffff;

    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}


/* Category heading */

.page-container .category-section > h2 {
    margin: 0 0 22px;
    padding-top: 10px;

    font-size: 1.7rem;
    line-height: 1.3;
}


/* Short CalcAtlas blue accent beneath heading */

.page-container .category-section > h2::after {
    content: "";

    display: block;

    width: 170px;
    height: 3px;

    margin-top: 12px;

    background: #337b98;
}


/* ---------------------------------------------------------
   Calculator card grid
   --------------------------------------------------------- */

.calculator-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 20px;
}


/* ---------------------------------------------------------
   Calculator cards
   --------------------------------------------------------- */

.calculator-card {
    position: relative;
    overflow: hidden;

    display: flex;
    flex-direction: column;

    min-height: 165px;

    padding: 26px 30px;

    background: #ffffff;

    border: 1px solid #d8e0e5;
    border-radius: 12px;

    color: inherit;
    text-decoration: none;
}

.calculator-card h3 {
    margin: 0 0 14px;

    color: var(--text);

    font-size: 1.2rem;
    line-height: 1.35;
}

.calculator-card p {
    margin: 0 0 20px;

    color: #536168;

    font-size: 0.98rem;
    line-height: 1.6;
}


/* ---------------------------------------------------------
   Live calculator card
   --------------------------------------------------------- */

a.calculator-card {
    padding-left: 34px;

    box-shadow:
        0 3px 12px rgba(0, 0, 0, 0.04);

    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        transform 0.15s ease;
}


/* Blue live-page accent */

a.calculator-card::before {
    content: "";

    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;

    width: 5px;

    background: #326d88;
}


a.calculator-card:hover {
    color: inherit;

    border-color: #9eb8c5;

    box-shadow:
        0 7px 20px rgba(0, 0, 0, 0.08);

    transform: translateY(-2px);
}


/* Live calculator CTA */

.calculator-link {
    margin-top: auto;

    color: #326d88;

    font-weight: 700;
}


/* ---------------------------------------------------------
   Coming soon cards
   --------------------------------------------------------- */

.calculator-card-coming {
    background: #f7f9fa;

    border-style: dashed;
}

.calculator-status {
    margin-top: auto;

    color: #748087;

    font-size: 0.95rem;
}


/* ---------------------------------------------------------
   Supporting category content
   --------------------------------------------------------- */

.page-container .category-content {
    max-width: 780px;

    margin: 0 0 45px;
}

.page-container .category-content h2 {
    margin: 0 0 16px;

    font-size: 1.6rem;
    line-height: 1.3;
}

.page-container .category-content p {
    margin: 0 0 16px;

    color: #3e4a50;

    line-height: 1.7;
}


/* =========================================================
   CATEGORY LANDING PAGES - MOBILE
   ========================================================= */

@media (max-width: 700px) {

    .page-container {
        padding: 24px 20px 48px;
    }


    /* Breadcrumbs */

    .page-container .breadcrumbs {
        margin-bottom: 24px;
    }


    /* Introduction */

    .category-intro {
        margin-bottom: 38px;

        padding: 24px 22px;
    }

    .category-intro h1 {
        font-size: 2rem;
    }

    .category-intro p {
        font-size: 1rem;
        line-height: 1.65;
    }


    /* Calculator section */

    .page-container .category-section {
        margin-bottom: 45px;

        padding-left: 18px;
        padding-right: 18px;
        padding-bottom: 16px;
    }

    .page-container .category-section > h2 {
        font-size: 1.5rem;
    }

    .page-container .category-section > h2::after {
        width: 120px;

        margin-top: 10px;
    }


    /* Calculator cards */

    .calculator-grid {
        grid-template-columns: 1fr;

        gap: 16px;
    }

    .calculator-card {
        min-height: 0;

        padding: 24px;
    }

    a.calculator-card {
        padding-left: 28px;
    }

    .calculator-card h3 {
        font-size: 1.2rem;
    }

    .calculator-card p {
        font-size: 0.95rem;
    }


    /* Supporting content */

    .page-container .category-content {
        margin-bottom: 38px;
    }

    .page-container .category-content h2 {
        font-size: 1.45rem;
    }

}

/* =========================================================
   CONTACT PAGE
   ========================================================= */

.contact-section {
    max-width: 780px;
}

.contact-form {
    margin-top: 28px;
}

.contact-field {
    margin-bottom: 24px;
}

.contact-field label {
    display: block;
    margin-bottom: 8px;

    color: var(--text);

    font-size: 15px;
    font-weight: 700;
}

.contact-optional {
    color: var(--text-soft);
    font-weight: 400;
}

.contact-field input,
.contact-field select,
.contact-field textarea {
    width: 100%;

    padding: 13px 14px;

    background: #ffffff;

    border: 1px solid #cfd9d6;
    border-radius: 8px;

    color: var(--text);

    font-size: 16px;
}

.contact-field textarea {
    min-height: 180px;
    resize: vertical;
}

.contact-field input:focus,
.contact-field select:focus,
.contact-field textarea:focus {
    outline: 2px solid rgba(63, 113, 128, 0.18);
    outline-offset: 1px;

    border-color: var(--primary);
}

.contact-field small {
    display: block;

    margin-top: 7px;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.5;
}


/* Submit area */

.contact-submit {
    margin-top: 30px;
}

.contact-submit button {
    padding: 13px 24px;

    background: var(--primary);
    color: #ffffff;

    border: 0;
    border-radius: 8px;

    font-weight: 700;

    cursor: pointer;
}

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

.contact-submit p {
    max-width: 600px;

    margin: 14px 0 0;

    color: var(--text-soft);

    font-size: 13px;
    line-height: 1.55;
}


/* Success and error messages */

.contact-message {
    margin: 24px 0;

    padding: 18px 20px;

    border-radius: 9px;
}

.contact-message strong {
    display: block;
    margin-bottom: 4px;
}

.contact-message p {
    margin: 0;
}

.contact-success {
    background: #eef6f1;
    border: 1px solid #c9ded0;
}

.contact-error {
    background: #fbf2f1;
    border: 1px solid #e3cbc7;
}


/* Honeypot - hidden from genuine users */

.contact-honeypot {
    position: absolute !important;

    width: 1px !important;
    height: 1px !important;

    overflow: hidden !important;

    clip: rect(0, 0, 0, 0) !important;

    white-space: nowrap !important;
}


/* Mobile */

@media (max-width: 700px) {

    .contact-field {
        margin-bottom: 21px;
    }

    .contact-field input,
    .contact-field select,
    .contact-field textarea {
        padding: 12px;
        font-size: 16px;
    }

    .contact-submit button {
        width: 100%;
    }

}

/* =========================================================
   FIRE HOSE FRICTION LOSS CALCULATOR
   ========================================================= */

.fhfl-page {
    padding: 0 0 60px;
}

.fhfl-page * {
    box-sizing: border-box;
}

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


/* INTRODUCTION */

.fhfl-intro {
    max-width: 850px;
    padding: 20px 0 28px;
}

.fhfl-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.fhfl-lead {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.75;
    color: #4b5563;
}


/* CALCULATOR */

.fhfl-calculator {
    margin: 10px 0 54px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.fhfl-calculator-header {
    padding: 25px 30px;
    border-bottom: 1px solid #e3e8eb;
    background: #f7fafb;
}

.fhfl-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.fhfl-calculator-header p {
    margin: 0;
    color: #5b6570;
    line-height: 1.6;
}

.fhfl-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}


/* INPUT PANEL */

.fhfl-input-panel,
.fhfl-results-panel {
    min-width: 0;
    padding: 30px;
}

.fhfl-input-panel {
    border-right: 1px solid #e3e8eb;
}

.fhfl-input-panel h3,
.fhfl-results-panel h3 {
    margin: 0 0 24px;
    font-size: 1.2rem;
}

.fhfl-field {
    margin-bottom: 22px;
}

.fhfl-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #26343d;
}

.fhfl-field select,
.fhfl-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #bfcbd1;
    border-radius: 7px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    font-size: 1rem;
}

.fhfl-field select:focus,
.fhfl-field input:focus {
    outline: 2px solid #337b98;
    outline-offset: 1px;
    border-color: #337b98;
}

.fhfl-field-note {
    margin: 8px 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #69757e;
}

.fhfl-input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.fhfl-input-with-unit input {
    border-radius: 7px 0 0 7px;
}

.fhfl-input-with-unit span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 70px;
    padding: 0 15px;
    border: 1px solid #bfcbd1;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f2f5f6;
    font-weight: 600;
    color: #45535c;
}


/* ERROR */

.fhfl-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #c86464;
    border-radius: 7px;
    background: #fff7f7;
    color: #8a2929;
    line-height: 1.5;
}


/* BUTTONS */

.fhfl-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.fhfl-actions button {
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.fhfl-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.fhfl-primary-button:hover {
    background: #286982;
}

.fhfl-secondary-button {
    border: 1px solid #b9c4ca;
    background: #ffffff;
    color: #34444e;
}

.fhfl-secondary-button:hover {
    background: #f4f7f8;
}


/* RESULTS */

.fhfl-results-panel {
    background: #fbfcfc;
}

.fhfl-main-result {
    margin-bottom: 22px;
    padding: 22px;
    border-left: 4px solid #337b98;
    border-radius: 8px;
    background: #edf5f8;
}

.fhfl-result-label {
    display: block;
    margin-bottom: 6px;
    color: #53616a;
    font-size: 0.94rem;
}

.fhfl-main-result strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.15;
    color: #1f5368;
}

.fhfl-result-list {
    border-top: 1px solid #dce3e6;
}

.fhfl-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #dce3e6;
}

.fhfl-result-row span {
    color: #58656d;
}

.fhfl-result-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}

.fhfl-worked {
    margin-top: 24px;
    padding: 18px;
    border-radius: 8px;
    background: #ffffff;
    border: 1px solid #dce4e8;
}

.fhfl-worked h4 {
    margin: 0 0 10px;
}

.fhfl-equation {
    margin-bottom: 8px;
    font-weight: 700;
    color: #1f5368;
}

.fhfl-worked p {
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}


/* CONTENT */

.fhfl-content-section {
    max-width: 880px;
    margin: 0 auto;
    padding: 36px 0;
    border-bottom: 1px solid #e3e8eb;
}

.fhfl-content-section h2 {
    margin: 0 0 18px;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    line-height: 1.25;
}

.fhfl-content-section h2::after {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin-top: 10px;
    background: #337b98;
}

.fhfl-content-section p {
    margin: 0 0 16px;
    line-height: 1.75;
    color: #45525b;
}


/* FORMULA */

.fhfl-formula-box {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #d9e3e7;
    border-radius: 10px;
    background: #f7fafb;
}

.fhfl-formula {
    margin-bottom: 22px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f5368;
}

.fhfl-definition-list {
    margin: 0;
}

.fhfl-definition-list div {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;
    padding: 8px 0;
}

.fhfl-definition-list dt {
    font-weight: 700;
}

.fhfl-definition-list dd {
    margin: 0;
    color: #4f5c64;
}


/* TABLE */

.fhfl-table-wrap {
    margin: 24px 0;
    overflow-x: auto;
}

.fhfl-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.fhfl-table th,
.fhfl-table td {
    padding: 12px 15px;
    border: 1px solid #dce3e6;
    text-align: left;
}

.fhfl-table th {
    background: #f2f6f7;
    color: #26343d;
}

.fhfl-note,
.fhfl-safety {
    padding: 16px 18px;
    border-left: 4px solid #337b98;
    background: #f4f8fa;
}


/* EXAMPLE */

.fhfl-example {
    margin: 22px 0;
    padding: 22px;
    border: 1px solid #dce3e6;
    border-radius: 10px;
    background: #fafcfc;
}

.fhfl-example p {
    margin-bottom: 10px;
}

.fhfl-example-equation {
    margin: 18px 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
}

.fhfl-example-answer {
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f5368;
}


/* FLOW COMPARISON */

.fhfl-comparison {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin: 22px 0;
}

.fhfl-comparison div {
    padding: 18px;
    border: 1px solid #dce3e6;
    border-radius: 8px;
    text-align: center;
    background: #fafcfc;
}

.fhfl-comparison strong,
.fhfl-comparison span {
    display: block;
}

.fhfl-comparison strong {
    margin-bottom: 5px;
}


/* LIST */

.fhfl-list {
    margin: 18px 0 20px;
    padding-left: 24px;
    color: #45525b;
}

.fhfl-list li {
    margin: 8px 0;
    line-height: 1.55;
}


/* FAQ */

.fhfl-faq {
    margin-top: 22px;
}

.fhfl-faq details {
    border-top: 1px solid #dce3e6;
}

.fhfl-faq details:last-child {
    border-bottom: 1px solid #dce3e6;
}

.fhfl-faq summary {
    padding: 17px 4px;
    cursor: pointer;
    font-weight: 600;
    color: #26343d;
}

.fhfl-faq details p {
    padding: 0 4px 17px;
    margin: 0;
}


/* REFERENCES */

.fhfl-reference-section {
    border-bottom: 0;
}


/* RELATED CALCULATORS */






/* MOBILE */

@media (max-width: 760px) {

    .fhfl-page {
        padding-bottom: 40px;
    }

    .fhfl-container {
        width: min(100% - 28px, 1120px);
    }

    .fhfl-intro {
        padding: 16px 0 22px;
    }

    .fhfl-calculator {
        margin-bottom: 38px;
    }

    .fhfl-calculator-header {
        padding: 20px;
    }

    .fhfl-calculator-grid {
        grid-template-columns: 1fr;
    }

    .fhfl-input-panel,
    .fhfl-results-panel {
        padding: 22px 20px;
    }

    .fhfl-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e3e8eb;
    }

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

    .fhfl-actions button {
        width: 100%;
        min-height: 48px;
    }

    .fhfl-result-row {
        align-items: flex-start;
    }

    .fhfl-content-section {
        padding: 30px 0;
    }

    .fhfl-formula-box {
        padding: 20px;
    }

    .fhfl-comparison {
        grid-template-columns: 1fr;
    }

    .fhfl-related-grid {
        grid-template-columns: 1fr;
    }

}


@media (max-width: 420px) {

    .fhfl-container {
        width: min(100% - 24px, 1120px);
    }

    .fhfl-result-row {
        display: block;
    }

    .fhfl-result-row strong {
        display: block;
        margin-top: 4px;
        text-align: left;
    }

    .fhfl-definition-list div {
        grid-template-columns: 38px minmax(0, 1fr);
    }

}
/* =========================================================
   SHARED RELATED CALCULATOR CARDS
   ========================================================= */

.related-calculators {
    margin-top: 34px;
    padding-top: 34px;
    border-top: 1px solid #dfe6e9;
}

.related-calculators h2 {
    margin: 0 0 20px;
    font-size: 1.5rem;
}


/* CARD GRID */

.related-calculators-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}


/* CARD */

.related-calculator-card {
    display: block;
    min-width: 0;
    padding: 22px;
    border: 1px solid #dce3e6;
    border-radius: 9px;
    background: #ffffff;
    color: inherit;
    text-decoration: none;
}


/* LIVE CLICKABLE CALCULATOR */

a.related-calculator-card {
    border-left: 4px solid #337b98;
}

a.related-calculator-card:hover {
    border-color: #9ebbc7;
    background: #f9fbfc;
}


/* CARD CONTENT */

.related-calculator-card strong,
.related-calculator-card span,
.related-calculator-card small {
    display: block;
}

.related-calculator-card strong {
    margin-bottom: 8px;
    color: #26343d;
}

.related-calculator-card span {
    line-height: 1.55;
    color: #5c6971;
}

.related-calculator-card small {
    margin-top: 12px;
    font-weight: 600;
    color: #758088;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .related-calculators-grid {
        grid-template-columns: 1fr;
    }

}

/* =========================================================
   PRESS BRAKE TONNAGE CALCULATOR
   ========================================================= */

.pbtc-page {
    padding: 0 0 60px;
}

.pbtc-page * {
    box-sizing: border-box;
}

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


/* =========================================================
   INTRODUCTION
   ========================================================= */

.pbtc-intro {
    max-width: 850px;
    padding: 20px 0 28px;
}

.pbtc-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.pbtc-lead {
    margin: 0;
    font-size: 1.08rem;
    line-height: 1.75;
    color: #4b5563;
}


/* =========================================================
   CALCULATOR
   ========================================================= */

.pbtc-calculator {
    margin: 10px 0 54px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    overflow: hidden;
    background: #ffffff;
}

.pbtc-calculator-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 24px;
    padding: 25px 30px;
    border-bottom: 1px solid #e3e8eb;
    background: #f7fafb;
}

.pbtc-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.pbtc-calculator-header p {
    margin: 0;
    color: #5b6570;
    line-height: 1.6;
}

.pbtc-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}


/* =========================================================
   UNIT TOGGLE
   ========================================================= */

.pbtc-unit-toggle {
    display: inline-flex;
    flex-shrink: 0;
    padding: 4px;
    border: 1px solid #cbd5da;
    border-radius: 9px;
    background: #ffffff;
}

.pbtc-unit-button {
    min-width: 76px;
    min-height: 38px;
    padding: 7px 14px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #44515a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pbtc-unit-button.active {
    background: #337b98;
    color: #ffffff;
}

.pbtc-unit-button:focus-visible {
    outline: 2px solid #337b98;
    outline-offset: 2px;
}


/* =========================================================
   INPUT PANEL
   ========================================================= */

.pbtc-input-panel,
.pbtc-results-panel {
    min-width: 0;
    padding: 30px;
}

.pbtc-input-panel {
    border-right: 1px solid #e3e8eb;
}

.pbtc-input-panel h3,
.pbtc-results-panel h3 {
    margin: 0 0 24px;
    font-size: 1.2rem;
}

.pbtc-field {
    margin-bottom: 22px;
}

.pbtc-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #26343d;
}

.pbtc-field select,
.pbtc-field input {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #bfcbd1;
    border-radius: 7px;
    background: #ffffff;
    color: #1f2933;
    font: inherit;
    font-size: 1rem;
}

.pbtc-field select:focus,
.pbtc-field input:focus {
    outline: 2px solid #337b98;
    outline-offset: 1px;
    border-color: #337b98;
}

.pbtc-field-note {
    margin: 8px 0 0;
    font-size: 0.88rem;
    line-height: 1.5;
    color: #69757e;
}

.pbtc-input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
}

.pbtc-input-with-unit input {
    border-radius: 7px 0 0 7px;
}

.pbtc-input-with-unit span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 76px;
    padding: 0 15px;
    border: 1px solid #bfcbd1;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f2f5f6;
    font-weight: 600;
    color: #45535c;
}


/* =========================================================
   ERROR
   ========================================================= */

.pbtc-error {
    margin: 0 0 20px;
    padding: 12px 14px;
    border: 1px solid #c86464;
    border-radius: 7px;
    background: #fff7f7;
    color: #8a2929;
    line-height: 1.5;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.pbtc-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.pbtc-actions button {
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pbtc-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.pbtc-primary-button:hover {
    background: #286982;
}

.pbtc-secondary-button {
    border: 1px solid #b9c4ca;
    background: #ffffff;
    color: #34444e;
}

.pbtc-secondary-button:hover {
    background: #f4f7f8;
}


/* =========================================================
   RESULTS
   ========================================================= */

.pbtc-results-panel {
    background: #fbfcfc;
}

.pbtc-main-result {
    margin-bottom: 22px;
    padding: 22px;
    border-left: 4px solid #337b98;
    border-radius: 8px;
    background: #edf5f8;
}

.pbtc-result-label {
    display: block;
    margin-bottom: 6px;
    color: #53616a;
    font-size: 0.94rem;
}

.pbtc-main-result strong {
    display: block;
    overflow-wrap: anywhere;
    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.15;
    color: #1f5368;
}

.pbtc-result-list {
    border-top: 1px solid #dce3e6;
}

.pbtc-result-row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 20px;
    padding: 13px 0;
    border-bottom: 1px solid #dce3e6;
}

.pbtc-result-row span {
    color: #58656d;
}

.pbtc-result-row strong {
    text-align: right;
    overflow-wrap: anywhere;
}


/* =========================================================
   DIE STATUS
   ========================================================= */

.pbtc-die-status {
    margin-top: 20px;
    padding: 14px 16px;
    border: 1px solid #d5e0e4;
    border-radius: 8px;
    background: #f5f8f9;
    color: #4f5d65;
    line-height: 1.55;
}


/* =========================================================
   WORKED CALCULATION
   ========================================================= */

.pbtc-worked {
    margin-top: 24px;
    padding: 18px;
    border: 1px solid #dce4e8;
    border-radius: 8px;
    background: #ffffff;
}

.pbtc-worked h4 {
    margin: 0 0 10px;
}

.pbtc-equation {
    margin-bottom: 8px;
    font-weight: 700;
    color: #1f5368;
    overflow-wrap: anywhere;
}

.pbtc-worked p {
    margin: 0;
    line-height: 1.6;
    overflow-wrap: anywhere;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.pbtc-content-section {
    max-width: 880px;
    margin: 0 auto;
    padding: 36px 0;
    border-bottom: 1px solid #e3e8eb;
}

.pbtc-content-section h2 {
    margin: 0 0 18px;
    font-size: clamp(1.5rem, 3vw, 1.9rem);
    line-height: 1.25;
}

.pbtc-content-section h2::after {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin-top: 10px;
    background: #337b98;
}

.pbtc-content-section p {
    margin: 0 0 16px;
    line-height: 1.75;
    color: #45525b;
}


/* =========================================================
   FORMULA
   ========================================================= */

.pbtc-formula-box {
    margin: 24px 0;
    padding: 24px;
    border: 1px solid #d9e3e7;
    border-radius: 10px;
    background: #f7fafb;
}

.pbtc-formula {
    margin-bottom: 22px;
    font-size: 1.45rem;
    font-weight: 700;
    color: #1f5368;
    overflow-wrap: anywhere;
}

.pbtc-definition-list {
    margin: 0;
}

.pbtc-definition-list div {
    display: grid;
    grid-template-columns: 50px minmax(0, 1fr);
    gap: 12px;

    padding: 8px 0;
}

.pbtc-definition-list dt {
    font-weight: 700;
}

.pbtc-definition-list dd {
    margin: 0;
    color: #4f5c64;
}


/* =========================================================
   TABLE
   ========================================================= */

.pbtc-table-wrap {
    margin: 24px 0;
    overflow-x: auto;
}

.pbtc-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.pbtc-table th,
.pbtc-table td {
    padding: 12px 15px;
    border: 1px solid #dce3e6;
    text-align: left;
}

.pbtc-table th {
    background: #f2f6f7;
    color: #26343d;
}


/* =========================================================
   NOTES / SAFETY
   ========================================================= */

.pbtc-note,
.pbtc-safety {
    padding: 16px 18px;
    border-left: 4px solid #337b98;
    background: #f4f8fa;
}

.pbtc-safety strong {
    color: #26343d;
}


/* =========================================================
   WORKED EXAMPLE
   ========================================================= */

.pbtc-example {
    margin: 22px 0;
    padding: 22px;
    border: 1px solid #dce3e6;
    border-radius: 10px;
    background: #fafcfc;
}

.pbtc-example p {
    margin-bottom: 10px;
}

.pbtc-example-equation {
    margin: 18px 0 8px;
    font-size: 1.2rem;
    font-weight: 600;
    overflow-wrap: anywhere;
}

.pbtc-example-answer {
    margin-bottom: 12px;
    font-size: 1.35rem;
    font-weight: 700;
    color: #1f5368;
}


/* =========================================================
   LISTS
   ========================================================= */

.pbtc-list {
    margin: 18px 0 20px;
    padding-left: 24px;
    color: #45525b;
}

.pbtc-list li {
    margin: 8px 0;
    line-height: 1.55;
}


/* =========================================================
   FAQ
   ========================================================= */

.pbtc-faq {
    margin-top: 22px;
}

.pbtc-faq details {
    border-top: 1px solid #dce3e6;
}

.pbtc-faq details:last-child {
    border-bottom: 1px solid #dce3e6;
}

.pbtc-faq summary {
    padding: 17px 4px;
    cursor: pointer;
    font-weight: 600;
    color: #26343d;
}

.pbtc-faq details p {
    padding: 0 4px 17px;
    margin: 0;
}


/* =========================================================
   REFERENCES
   ========================================================= */

.pbtc-reference-section {
    border-bottom: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .pbtc-page {
        padding-bottom: 40px;
    }

    .pbtc-container {
        width: min(100% - 28px, 1120px);
    }

    .pbtc-intro {
        padding: 16px 0 22px;
    }

    .pbtc-calculator {
        margin-bottom: 38px;
    }

    .pbtc-calculator-header {
        align-items: flex-start;
        flex-direction: column;
        padding: 20px;
    }

    .pbtc-unit-toggle {
        width: 100%;
    }

    .pbtc-unit-button {
        flex: 1;
    }

    .pbtc-calculator-grid {
        grid-template-columns: 1fr;
    }

    .pbtc-input-panel,
    .pbtc-results-panel {
        padding: 22px 20px;
    }

    .pbtc-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e3e8eb;
    }

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

    .pbtc-actions button {
        width: 100%;
        min-height: 48px;
    }

    .pbtc-result-row {
        align-items: flex-start;
    }

    .pbtc-content-section {
        padding: 30px 0;
    }

    .pbtc-formula-box {
        padding: 20px;
    }
	/* =========================================================
   PRESS BRAKE - V-DIE GUIDANCE STATES
   ========================================================= */

/* Normal V-die range */
.pbtc-die-status.pbtc-die-normal {
    color: #46545c;
    background: #f7f9fa;
    border-left: 4px solid #aebbc1;
}

/* Narrow V-die opening - stronger warning */
.pbtc-die-status.pbtc-die-warning {
    color: #7a4b00;
    background: #fff7e3;
    border-left: 4px solid #c58a18;
}

/* Wide V-die opening - advisory */
.pbtc-die-status.pbtc-die-wide {
    color: #285f73;
    background: #f1f8fa;
    border-left: 4px solid #5f9caf;
}

}


@media (max-width: 420px) {

    .pbtc-container {
        width: min(100% - 24px, 1120px);
    }

    .pbtc-unit-toggle {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .pbtc-unit-button {
        min-width: 0;
    }

    .pbtc-result-row {
        display: block;
    }

    .pbtc-result-row strong {
        display: block;
        margin-top: 4px;
        text-align: left;
    }

    .pbtc-definition-list div {
        grid-template-columns: 38px minmax(0, 1fr);
    }

    .pbtc-input-with-unit span {
        min-width: 66px;
        padding: 0 12px;
    }

}

/* =========================================================
   PRESS BRAKE - V-DIE GUIDANCE STATES
   FINAL STATE OVERRIDES
   ========================================================= */

.pbtc-page .pbtc-results-panel .pbtc-die-status.pbtc-die-normal {
    color: #46545c !important;
    background: #f7f9fa !important;
    border-left: 4px solid #aebbc1 !important;
}

.pbtc-page .pbtc-results-panel .pbtc-die-status.pbtc-die-warning {
    color: #7a4b00 !important;
    background: #fff7e3 !important;
    border-left: 4px solid #c58a18 !important;
}

.pbtc-page .pbtc-results-panel .pbtc-die-status.pbtc-die-wide {
    color: #285f73 !important;
    background: #f1f8fa !important;
    border-left: 4px solid #5f9caf !important;
}

/* =========================================================
   GUTTER SIZE CALCULATOR
   ========================================================= */

.gsc-page {
    padding: 0 0 60px;
}


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


/* =========================================================
   INTRO
   ========================================================= */

.gsc-intro {
    max-width: 830px;
    margin-bottom: 32px;
}


.gsc-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.15;
    color: #26343d;
}


.gsc-intro p {
    margin: 0 0 10px;
    font-size: 1.06rem;
    line-height: 1.7;
    color: #5c6971;
}


/* =========================================================
   CALCULATOR SHELL
   ========================================================= */

.gsc-calculator {
    overflow: hidden;
    margin-bottom: 48px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    background: #ffffff;
}


.gsc-calculator-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 24px 26px;
    border-bottom: 1px solid #dce4e8;
    background: #f7f9fa;
}


.gsc-calculator-header h2 {
    margin: 0 0 5px;
    font-size: 1.45rem;
    color: #26343d;
}


.gsc-calculator-header p {
    margin: 0;
    color: #66737b;
}


/* =========================================================
   UNIT TOGGLE
   ========================================================= */

.gsc-unit-toggle {
    display: inline-flex;
    flex: 0 0 auto;
    padding: 4px;
    border: 1px solid #ccd8dd;
    border-radius: 8px;
    background: #ffffff;
}


.gsc-unit-toggle button {
    min-width: 78px;
    min-height: 40px;
    padding: 8px 15px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: #51616a;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}


.gsc-unit-toggle button.active {
    background: #337b98;
    color: #ffffff;
}


/* =========================================================
   MAIN GRID
   ========================================================= */

.gsc-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}


.gsc-input-panel,
.gsc-results-panel {
    min-width: 0;
    padding: 28px;
}


.gsc-input-panel {
    border-right: 1px solid #e0e7ea;
}


.gsc-input-panel h3,
.gsc-results-panel h3 {
    margin: 0 0 22px;
    font-size: 1.25rem;
    color: #26343d;
}


/* =========================================================
   FORM FIELDS
   ========================================================= */

.gsc-field {
    margin-bottom: 20px;
}


.gsc-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #34434c;
}


.gsc-field input,
.gsc-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #cbd7dc;
    border-radius: 7px;
    background: #ffffff;
    color: #26343d;
    font: inherit;
    font-size: 1rem;
}


.gsc-field input:focus,
.gsc-field select:focus {
    outline: 2px solid rgba(51, 123, 152, 0.2);
    border-color: #337b98;
}


.gsc-field small {
    display: block;
    margin-top: 6px;
    line-height: 1.5;
    color: #748087;
}


/* =========================================================
   INPUT WITH UNIT
   ========================================================= */

.gsc-input-with-unit {
    display: flex;
    width: 100%;
}


.gsc-input-with-unit input {
    min-width: 0;
    border-radius: 7px 0 0 7px;
}


.gsc-input-with-unit span {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 70px;
    padding: 0 12px;
    border: 1px solid #cbd7dc;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f4f7f8;
    font-size: 0.92rem;
    font-weight: 600;
    color: #5a6870;
}


/* =========================================================
   AREA METHOD
   ========================================================= */

.gsc-area-method-section[hidden] {
    display: none;
}


/* =========================================================
   ERROR
   ========================================================= */

.gsc-error {
    display: none;
    margin: 4px 0 18px;
    padding: 12px 14px;
    border-left: 4px solid #b8614a;
    background: #fff6f3;
    line-height: 1.5;
    color: #8a3f2e;
}


.gsc-error.visible {
    display: block;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.gsc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 24px;
}


.gsc-primary-button,
.gsc-secondary-button {
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 7px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}


.gsc-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}


.gsc-primary-button:hover {
    background: #28677f;
}


.gsc-secondary-button {
    border: 1px solid #aebdc4;
    background: #ffffff;
    color: #43525a;
}


.gsc-secondary-button:hover {
    background: #f6f8f9;
}


/* =========================================================
   RESULTS
   ========================================================= */

.gsc-results-panel {
    background: #fbfcfc;
}


.gsc-main-result {
    margin-bottom: 22px;
    padding: 21px;
    border: 1px solid #cfe0e7;
    border-radius: 10px;
    background: #f2f8fa;
}


.gsc-main-result span {
    display: block;
    margin-bottom: 7px;
    font-size: 0.94rem;
    color: #65737b;
}


.gsc-main-result strong {
    display: block;
    font-size: clamp(1.8rem, 4vw, 2.35rem);
    line-height: 1.2;
    color: #285f73;
}


/* =========================================================
   RESULT LIST
   ========================================================= */

.gsc-result-list {
    margin: 0;
}


.gsc-result-list > div {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    padding: 13px 0;
    border-bottom: 1px solid #e2e8eb;
}


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


.gsc-result-list dd {
    margin: 0;
    text-align: right;
    font-weight: 700;
    color: #26343d;
}


/* =========================================================
   DESIGN NOTE
   ========================================================= */

.gsc-design-note {
    margin-top: 22px;
    padding: 14px 16px;
    border-left: 4px solid #5f9caf;
    background: #f1f8fa;
    line-height: 1.55;
    color: #285f73;
}


/* =========================================================
   WORKED CALCULATION
   ========================================================= */

.gsc-worked-calculation {
    margin-top: 22px;
    padding: 18px;
    border: 1px solid #dde5e8;
    border-radius: 8px;
    background: #ffffff;
}


.gsc-worked-calculation h4 {
    margin: 0 0 12px;
    color: #34434c;
}


.gsc-worked-calculation p {
    margin: 6px 0;
    overflow-wrap: anywhere;
    font-family: Consolas, Monaco, monospace;
    color: #4b5a62;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.gsc-content-section {
    max-width: 900px;
    margin: 0 0 42px;
}


.gsc-content-section h2 {
    margin: 0 0 16px;
    font-size: 1.6rem;
    color: #26343d;
}


.gsc-content-section h2::after {
    content: "";
    display: block;
    width: 150px;
    height: 3px;
    margin-top: 12px;
    background: #337b98;
}


.gsc-content-section h3 {
    margin: 26px 0 9px;
    font-size: 1.12rem;
    color: #34434c;
}


.gsc-content-section p,

.gsc-content-section li {
    line-height: 1.7;
    color: #59666e;
}


.gsc-content-section ol,
.gsc-content-section ul {
    padding-left: 22px;
}


/* =========================================================
   FORMULA BOX
   ========================================================= */

.gsc-formula-box {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #d5e2e7;
    border-radius: 9px;
    background: #f6fafb;
}


.gsc-formula-box strong {
    display: block;
    margin-bottom: 15px;
    font-size: 1.22rem;
    color: #285f73;
}


.gsc-formula-box span {
    display: block;
    margin: 7px 0;
    color: #5a6870;
}


/* =========================================================
   TABLE
   ========================================================= */

.gsc-reference-table-wrap {
    width: 100%;
    margin: 20px 0;
}


.gsc-reference-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}


.gsc-reference-table th:first-child,
.gsc-reference-table td:first-child {
    width: 42%;
}


.gsc-reference-table th:last-child,
.gsc-reference-table td:last-child {
    width: 58%;
}


.gsc-reference-table th,
.gsc-reference-table td {
    padding: 13px 15px;
    border: 1px solid #dce4e8;
    text-align: left;
}


.gsc-reference-table th {
    background: #f3f7f8;
    color: #34434c;
}


.gsc-reference-table td {
    color: #59666e;
}


/* =========================================================
   NOTES
   ========================================================= */

.gsc-note,
.gsc-safety-note {
    margin-top: 20px;
    padding: 18px 20px;
    border-radius: 8px;
    line-height: 1.65;
}


.gsc-note {
    border-left: 4px solid #c58a18;
    background: #fff8e8;
    color: #684c16;
}


.gsc-safety-note {
    border: 1px solid #dde5e8;
    background: #f8fafb;
}


.gsc-safety-note p {
    margin: 0 0 12px;
}


.gsc-safety-note p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   EXAMPLE
   ========================================================= */

.gsc-example {
    padding: 20px;
    border: 1px solid #d8e3e7;
    border-radius: 9px;
    background: #f8fafb;
}


.gsc-example p {
    margin: 0 0 12px;
}


.gsc-example strong {
    display: block;
    margin: 14px 0;
    font-size: 1.1rem;
    color: #285f73;
}


/* =========================================================
   FAQ
   ========================================================= */

.gsc-faq h3:first-child {
    margin-top: 0;
}


.gsc-faq p {
    margin-top: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .gsc-container {
        width: min(100% - 24px, 1120px);
    }


    .gsc-calculator-header {
        flex-direction: column;
        align-items: stretch;
        padding: 20px;
    }


    .gsc-unit-toggle {
        width: 100%;
    }


    .gsc-unit-toggle button {
        flex: 1 1 50%;
    }


    .gsc-calculator-grid {
        grid-template-columns: 1fr;
    }


    .gsc-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e0e7ea;
    }


    .gsc-input-panel,
    .gsc-results-panel {
        padding: 22px 20px;
    }


    .gsc-result-list > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }


    .gsc-result-list dd {
        text-align: left;
    }


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


    .gsc-primary-button,
    .gsc-secondary-button {
        width: 100%;
    }
	
	.gsc-reference-table th,
.gsc-reference-table td {
    padding: 10px 9px;
    font-size: 0.92rem;
    line-height: 1.45;
    overflow-wrap: anywhere;
}

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .gsc-container {
        width: min(100% - 18px, 1120px);
    }


    .gsc-calculator-header,
    .gsc-input-panel,
    .gsc-results-panel {
        padding-left: 16px;
        padding-right: 16px;
    }


    .gsc-main-result strong {
        font-size: 1.7rem;
    }


    .gsc-input-with-unit span {
        min-width: 62px;
        padding-left: 8px;
        padding-right: 8px;
    }
	
	.gsc-reference-table th,
.gsc-reference-table td {
    padding: 9px 7px;
    font-size: 0.88rem;
}

}

/* =========================================================
   POOL SURFACE AREA CALCULATOR
   ========================================================= */

.psac-page {
    padding: 0 20px 60px;
}

.psac-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================================================
   INTRO
   ========================================================= */

.psac-intro {
    max-width: 850px;
    margin-bottom: 30px;
}

.psac-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.psac-lead {
    margin: 0 0 12px;
    font-size: 1.15rem;
    line-height: 1.65;
    color: #334b57;
}

.psac-intro p {
    line-height: 1.7;
}


/* =========================================================
   CALCULATOR SHELL
   ========================================================= */

.psac-calculator {
    margin: 34px 0 46px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.psac-calculator-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 30px;
    padding: 24px 26px;
    border-bottom: 1px solid #e1e7ea;
    background: #f7f9fa;
}

.psac-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.psac-calculator-header p {
    max-width: 680px;
    margin: 0;
    color: #5c6c73;
    line-height: 1.55;
}


/* =========================================================
   UNIT TOGGLE
   ========================================================= */

.psac-unit-toggle {
    display: flex;
    flex-shrink: 0;
    padding: 3px;
    border: 1px solid #ccd7dc;
    border-radius: 9px;
    background: #ffffff;
}

.psac-unit-button {
    min-width: 76px;
    min-height: 40px;
    padding: 8px 14px;
    border: 0;
    border-radius: 7px;
    background: transparent;
    color: #42545d;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.psac-unit-button.active {
    background: #337b98;
    color: #ffffff;
}


/* =========================================================
   CALCULATOR GRID
   ========================================================= */

.psac-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
}

.psac-input-panel,
.psac-results-panel {
    min-width: 0;
    padding: 28px 26px;
}

.psac-input-panel {
    border-right: 1px solid #e1e7ea;
}

.psac-results-panel {
    background: #fbfcfc;
}


/* =========================================================
   FIELDS
   ========================================================= */

.psac-field {
    margin-bottom: 21px;
}

.psac-field label {
    display: block;
    margin-bottom: 8px;
    color: #263b45;
    font-weight: 600;
}

.psac-field select,
.psac-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #bccbd1;
    border-radius: 8px;
    background: #ffffff;
    color: #25363e;
    font: inherit;
    font-size: 1rem;
}

.psac-field select:focus,
.psac-field input:focus {
    outline: 3px solid rgba(51, 123, 152, 0.14);
    border-color: #337b98;
}


/* =========================================================
   INPUT WITH UNIT
   ========================================================= */

.psac-input-with-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.psac-input-with-unit input {
    border-radius: 8px 0 0 8px;
}

.psac-unit-label {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 58px;
    padding: 0 12px;
    border: 1px solid #bccbd1;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #eef3f5;
    color: #475b65;
    font-weight: 600;
}


/* =========================================================
   VISIBILITY
   ========================================================= */

.psac-hidden {
    display: none !important;
}


/* =========================================================
   ERROR
   ========================================================= */

.psac-error {
    min-height: 24px;
    margin: 3px 0 12px;
    color: #9b2f2f;
    font-size: 0.94rem;
    line-height: 1.45;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.psac-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.psac-primary-button,
.psac-secondary-button {
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.psac-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.psac-primary-button:hover {
    background: #28677f;
}

.psac-secondary-button {
    border: 1px solid #bdcbd1;
    background: #ffffff;
    color: #3e535d;
}

.psac-secondary-button:hover {
    background: #f3f6f7;
}


/* =========================================================
   RESULTS
   ========================================================= */

.psac-results-label {
    margin: 0 0 7px;
    color: #5b6c74;
    font-size: 0.93rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.psac-main-result {
    margin-bottom: 24px;
    color: #235f77;
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.psac-result-list {
    margin: 0;
}

.psac-result-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e3e8eb;
}

.psac-result-list dt {
    color: #55666f;
}

.psac-result-list dd {
    margin: 0;
    text-align: right;
    color: #243840;
    font-weight: 600;
}


/* =========================================================
   APPROXIMATION NOTE
   ========================================================= */

.psac-approximation-note {
    margin-top: 20px;
    padding: 13px 15px;
    border-left: 4px solid #c58a18;
    background: #fff7e3;
    color: #704600;
    line-height: 1.55;
}


/* =========================================================
   WORKED CALCULATION
   ========================================================= */

.psac-worked-calculation {
    margin-top: 24px;
    padding: 17px 18px;
    border: 1px solid #d8e2e6;
    border-radius: 9px;
    background: #ffffff;
}

.psac-worked-calculation h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.psac-worked-calculation p {
    margin: 0;
    color: #455b64;
    line-height: 1.55;
    overflow-wrap: anywhere;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.psac-content-section {
    max-width: 900px;
    margin: 0 0 44px;
}

.psac-content-section > h2 {
    position: relative;
    margin: 0 0 21px;
    font-size: 1.65rem;
    line-height: 1.3;
}

.psac-content-section > h2::after {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin-top: 11px;
    background: #337b98;
}

.psac-content-section p,
.psac-content-section li {
    line-height: 1.72;
}

.psac-content-section ol,
.psac-content-section ul {
    padding-left: 23px;
}


/* =========================================================
   FORMULA CARDS
   ========================================================= */

.psac-formula-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-top: 22px;
}

.psac-formula-card {
    padding: 20px;
    border: 1px solid #dce4e8;
    border-radius: 10px;
    background: #fafbfc;
}

.psac-formula-card h3 {
    margin: 0 0 13px;
    font-size: 1.08rem;
}

.psac-formula-card p {
    margin: 12px 0 0;
    color: #52666f;
}

.psac-formula {
    padding: 13px 15px;
    border-left: 4px solid #6f9faf;
    background: #eef5f7;
    color: #234c5c;
    font-size: 1.04rem;
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* =========================================================
   EXAMPLES
   ========================================================= */

.psac-example {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #dce4e8;
    border-radius: 10px;
    background: #fafbfc;
}

.psac-example h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
}

.psac-example p {
    margin: 8px 0;
}

.psac-example-calculation {
    margin: 14px 0;
    padding: 12px 15px;
    border-left: 4px solid #7ea8b8;
    background: #eef5f7;
    color: #294e5d;
    font-weight: 700;
}


/* =========================================================
   NOTE
   ========================================================= */

.psac-note {
    padding: 18px 20px;
    border-left: 4px solid #7b969f;
    background: #f4f7f8;
}

.psac-note p {
    margin: 0 0 10px;
}

.psac-note p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   FAQ
   ========================================================= */

.psac-faq details {
    margin: 0 0 12px;
    border: 1px solid #dce4e8;
    border-radius: 9px;
    background: #ffffff;
}

.psac-faq summary {
    padding: 16px 18px;
    color: #2f4650;
    font-weight: 700;
    cursor: pointer;
}

.psac-faq details p {
    margin: 0;
    padding: 0 18px 18px;
    color: #53666f;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .psac-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .psac-calculator-header {
        flex-direction: column;
        gap: 17px;
        padding: 21px 18px;
    }

    .psac-unit-toggle {
        width: 100%;
    }

    .psac-unit-button {
        flex: 1;
    }

    .psac-calculator-grid {
        grid-template-columns: 1fr;
    }

    .psac-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e1e7ea;
    }

    .psac-input-panel,
    .psac-results-panel {
        padding: 22px 18px;
    }

    .psac-formula-grid {
        grid-template-columns: 1fr;
    }

    .psac-result-list > div {
        gap: 12px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .psac-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .psac-intro h1 {
        font-size: 2rem;
    }

    .psac-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .psac-primary-button,
    .psac-secondary-button {
        width: 100%;
    }

    .psac-result-list > div {
        display: block;
    }

    .psac-result-list dd {
        margin-top: 4px;
        text-align: left;
    }

    .psac-main-result {
        font-size: 2.25rem;
    }

    .psac-formula-card,
    .psac-example {
        padding: 16px;
    }

}

/* =========================================================
   IRREGULAR POLYGON AREA CALCULATOR
   ========================================================= */

.ipac-page {
    padding: 0 20px 60px;
}

.ipac-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================================================
   INTRO
   ========================================================= */

.ipac-intro {
    max-width: 860px;
    margin-bottom: 30px;
}

.ipac-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.ipac-lead {
    margin: 0 0 12px;
    color: #334b57;
    font-size: 1.15rem;
    line-height: 1.65;
}

.ipac-intro p {
    line-height: 1.7;
}


/* =========================================================
   CALCULATOR SHELL
   ========================================================= */

.ipac-calculator {
    margin: 34px 0 46px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.ipac-calculator-header {
    padding: 24px 26px;
    border-bottom: 1px solid #e1e7ea;
    background: #f7f9fa;
}

.ipac-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.ipac-calculator-header p {
    max-width: 760px;
    margin: 0;
    color: #5c6c73;
    line-height: 1.6;
}


/* =========================================================
   CALCULATOR GRID
   ========================================================= */

.ipac-calculator-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);
}

.ipac-input-panel,
.ipac-results-panel {
    min-width: 0;
    padding: 28px 26px;
}

.ipac-input-panel {
    border-right: 1px solid #e1e7ea;
}

.ipac-results-panel {
    background: #fbfcfc;
}


/* =========================================================
   GENERAL FIELDS
   ========================================================= */

.ipac-field {
    margin-bottom: 26px;
}

.ipac-field > label {
    display: block;
    margin-bottom: 8px;
    color: #263b45;
    font-weight: 600;
}

.ipac-field select,
.ipac-coordinate-row input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #bccbd1;
    border-radius: 8px;
    background: #ffffff;
    color: #25363e;
    font: inherit;
    font-size: 1rem;
}

.ipac-field select:focus,
.ipac-coordinate-row input:focus {
    outline: 3px solid rgba(51, 123, 152, 0.14);
    border-color: #337b98;
}

.ipac-field-help {
    display: block;
    margin-top: 7px;
    color: #687981;
    font-size: 0.9rem;
    line-height: 1.45;
}


/* =========================================================
   POINTS HEADER
   ========================================================= */

.ipac-points-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 15px;
}

.ipac-points-header h3 {
    margin: 0 0 4px;
    font-size: 1.1rem;
}

.ipac-points-header p {
    margin: 0;
    color: #65767e;
    font-size: 0.93rem;
}

.ipac-point-count {
    flex-shrink: 0;
    padding: 5px 9px;
    border-radius: 6px;
    background: #eef3f5;
    color: #47616c;
    font-size: 0.88rem;
    font-weight: 700;
}


/* =========================================================
   COORDINATE TABLE
   ========================================================= */

.ipac-coordinate-heading,
.ipac-coordinate-row {
    display: grid;
    grid-template-columns:
        52px
        minmax(0, 1fr)
        minmax(0, 1fr)
        42px;
    gap: 9px;
    align-items: center;
}

.ipac-coordinate-heading {
    padding: 0 4px 8px;
    color: #697980;
    font-size: 0.84rem;
    font-weight: 700;
}

.ipac-coordinate-list {
    display: grid;
    gap: 9px;
}

.ipac-coordinate-row {
    padding: 9px;
    border: 1px solid #dce4e8;
    border-radius: 9px;
    background: #f9fbfb;
}

.ipac-point-label {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #e7f0f3;
    color: #2b6378;
    font-weight: 700;
}

.ipac-mobile-label {
    min-width: 0;
}

.ipac-mobile-label > span {
    display: none;
}

.ipac-coordinate-row input {
    min-width: 0;
}

.ipac-remove-point {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #cfd9dd;
    border-radius: 7px;
    background: #ffffff;
    color: #687980;
    font: inherit;
    font-size: 1.3rem;
    line-height: 1;
    cursor: pointer;
}

.ipac-remove-point:hover:not(:disabled) {
    border-color: #a85757;
    background: #fff5f5;
    color: #903b3b;
}

.ipac-remove-point:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}


/* =========================================================
   ADD POINT
   ========================================================= */

.ipac-add-point {
    width: 100%;
    min-height: 44px;
    margin-top: 12px;
    padding: 9px 14px;
    border: 1px dashed #9eb6c0;
    border-radius: 8px;
    background: #f7fafb;
    color: #356b80;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ipac-add-point:hover:not(:disabled) {
    border-color: #337b98;
    background: #eef5f7;
}

.ipac-add-point:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}


/* =========================================================
   ERROR
   ========================================================= */

.ipac-error {
    min-height: 25px;
    margin: 12px 0 10px;
    color: #9b2f2f;
    font-size: 0.94rem;
    line-height: 1.45;
}


/* =========================================================
   BUTTONS
   ========================================================= */

.ipac-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.ipac-primary-button,
.ipac-secondary-button {
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.ipac-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.ipac-primary-button:hover {
    background: #28677f;
}

.ipac-secondary-button {
    border: 1px solid #bdcbd1;
    background: #ffffff;
    color: #3e535d;
}

.ipac-secondary-button:hover {
    background: #f3f6f7;
}


/* =========================================================
   RESULTS
   ========================================================= */

.ipac-results-label {
    margin: 0 0 7px;
    color: #5b6c74;
    font-size: 0.93rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.ipac-main-result {
    margin-bottom: 24px;
    color: #235f77;
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.ipac-result-list {
    margin: 0;
}

.ipac-result-list > div {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 12px 0;
    border-bottom: 1px solid #e3e8eb;
}

.ipac-result-list dt {
    color: #55666f;
}

.ipac-result-list dd {
    margin: 0;
    color: #243840;
    text-align: right;
    font-weight: 600;
}


/* =========================================================
   PREVIEW
   ========================================================= */

.ipac-preview-section {
    margin-top: 28px;
}

.ipac-preview-section h3 {
    margin: 0 0 6px;
    font-size: 1.05rem;
}

.ipac-preview-section > p {
    margin: 0 0 13px;
    color: #607179;
    font-size: 0.93rem;
    line-height: 1.5;
}

.ipac-preview-frame {
    width: 100%;
    padding: 8px;
    border: 1px solid #d8e2e6;
    border-radius: 9px;
    background: #ffffff;
}

.ipac-preview-svg {
    display: block;
    width: 100%;
    height: auto;
    min-height: 210px;
}

.ipac-preview-svg polygon {
    fill: #e6f0f3;
    stroke: #467f94;
    stroke-width: 2.5;
}

.ipac-preview-svg circle {
    fill: #337b98;
    stroke: #ffffff;
    stroke-width: 2;
}

.ipac-preview-svg text {
    fill: #314b56;
    font-size: 14px;
    font-weight: 700;
}


/* =========================================================
   WORKED CALCULATION
   ========================================================= */

.ipac-worked-calculation {
    margin-top: 25px;
    padding: 17px 18px;
    border: 1px solid #d8e2e6;
    border-radius: 9px;
    background: #ffffff;
}

.ipac-worked-calculation h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.ipac-worked-calculation > p {
    color: #455b64;
    line-height: 1.55;
}

.ipac-worked-total {
    margin: 15px 0 0;
    font-weight: 700;
}


/* =========================================================
   SHOELACE TABLE
   ========================================================= */

.ipac-shoelace-table-wrap {
    width: 100%;
    margin-top: 15px;
    overflow-x: auto;
}

.ipac-shoelace-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.91rem;
}

.ipac-shoelace-table th,
.ipac-shoelace-table td {
    padding: 9px 10px;
    border: 1px solid #dde5e8;
    text-align: right;
}

.ipac-shoelace-table th:first-child,
.ipac-shoelace-table td:first-child {
    text-align: left;
}

.ipac-shoelace-table thead th {
    background: #f1f5f6;
    color: #435a64;
}

.ipac-shoelace-table tfoot th,
.ipac-shoelace-table tfoot td {
    background: #f8fafb;
    font-weight: 700;
}


/* =========================================================
   CONTENT SECTIONS
   ========================================================= */

.ipac-content-section {
    max-width: 900px;
    margin: 0 0 44px;
}

.ipac-content-section > h2 {
    position: relative;
    margin: 0 0 21px;
    font-size: 1.65rem;
    line-height: 1.3;
}

.ipac-content-section > h2::after {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin-top: 11px;
    background: #337b98;
}

.ipac-content-section p,
.ipac-content-section li {
    line-height: 1.72;
}

.ipac-content-section ol,
.ipac-content-section ul {
    padding-left: 23px;
}


/* =========================================================
   NOTE
   ========================================================= */

.ipac-note {
    margin: 20px 0;
    padding: 18px 20px;
    border-left: 4px solid #7b969f;
    background: #f4f7f8;
    color: #425860;
}

.ipac-note strong {
    display: block;
    margin-bottom: 5px;
}

.ipac-note p {
    margin: 0 0 9px;
}

.ipac-note p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   FORMULA
   ========================================================= */

.ipac-formula-box {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #d6e1e5;
    border-left: 4px solid #6f9faf;
    border-radius: 8px;
    background: #eef5f7;
    text-align: center;
}

.ipac-formula-main {
    color: #244d5c;
    font-size: clamp(1.05rem, 3vw, 1.3rem);
    font-weight: 700;
    overflow-wrap: anywhere;
}


/* =========================================================
   EXAMPLE
   ========================================================= */

.ipac-example-coordinates {
    display: flex;
    flex-wrap: wrap;
    gap: 9px;
    margin: 18px 0;
}

.ipac-example-coordinates span {
    padding: 8px 11px;
    border: 1px solid #dbe4e7;
    border-radius: 7px;
    background: #f7f9fa;
    color: #405861;
    font-weight: 600;
}

.ipac-example-calculation {
    padding: 17px 18px;
    border-left: 4px solid #7ea8b8;
    background: #eef5f7;
}

.ipac-example-calculation p {
    margin: 0 0 9px;
    overflow-wrap: anywhere;
}

.ipac-example-calculation strong {
    color: #294e5d;
}


/* =========================================================
   FAQ
   ========================================================= */

.ipac-faq details {
    margin: 0 0 12px;
    border: 1px solid #dce4e8;
    border-radius: 9px;
    background: #ffffff;
}

.ipac-faq summary {
    padding: 16px 18px;
    color: #2f4650;
    font-weight: 700;
    cursor: pointer;
}

.ipac-faq details p {
    margin: 0;
    padding: 0 18px 18px;
    color: #53666f;
}


/* =========================================================
   TABLET / MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .ipac-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .ipac-calculator-header {
        padding: 21px 18px;
    }

    .ipac-calculator-grid {
        grid-template-columns: 1fr;
    }

    .ipac-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e1e7ea;
    }

    .ipac-input-panel,
    .ipac-results-panel {
        padding: 22px 18px;
    }

    .ipac-coordinate-heading {
        display: none;
    }

    .ipac-coordinate-row {
        grid-template-columns: 42px minmax(0, 1fr) 38px;
        align-items: end;
    }

    .ipac-coordinate-row .ipac-mobile-label:first-of-type {
        grid-column: 2;
    }

    .ipac-coordinate-row .ipac-mobile-label:nth-of-type(2) {
        grid-column: 2;
    }

    .ipac-coordinate-row .ipac-remove-point {
        grid-column: 3;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .ipac-point-label {
        grid-column: 1;
        grid-row: 1 / span 2;
        align-self: center;
    }

    .ipac-mobile-label > span {
        display: block;
        margin: 0 0 5px;
        color: #61727a;
        font-size: 0.82rem;
        font-weight: 700;
    }

    .ipac-preview-svg {
        min-height: 180px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .ipac-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .ipac-intro h1 {
        font-size: 2rem;
    }

    .ipac-points-header {
        display: block;
    }

    .ipac-point-count {
        display: inline-block;
        margin-top: 9px;
    }

    .ipac-coordinate-row {
        grid-template-columns: 37px minmax(0, 1fr) 36px;
        gap: 7px;
        padding: 8px;
    }

    .ipac-point-label {
        width: 32px;
        height: 32px;
    }

    .ipac-remove-point {
        width: 34px;
        height: 38px;
    }

    .ipac-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .ipac-primary-button,
    .ipac-secondary-button {
        width: 100%;
    }

    .ipac-result-list > div {
        display: block;
    }

    .ipac-result-list dd {
        margin-top: 4px;
        text-align: left;
    }

    .ipac-main-result {
        font-size: 2.2rem;
    }

    .ipac-worked-calculation {
        padding: 14px;
    }

    .ipac-shoelace-table th,
    .ipac-shoelace-table td {
        padding: 8px 6px;
        font-size: 0.84rem;
    }

}

/* =========================================================
   PUMP HEAD CALCULATOR
   ========================================================= */

.phc-page {
    padding: 0 20px 60px;
}

.phc-container {
    width: 100%;
    max-width: 1120px;
    margin: 0 auto;
}


/* =========================================================
   INTRO
   ========================================================= */

.phc-intro {
    max-width: 880px;
    margin-bottom: 30px;
}

.phc-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
}

.phc-lead {
    margin: 0 0 12px;
    color: #334b57;
    font-size: 1.15rem;
    line-height: 1.65;
}

.phc-intro p {
    line-height: 1.7;
}


/* =========================================================
   CALCULATOR
   ========================================================= */

.phc-calculator {
    margin: 34px 0 46px;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    background: #ffffff;
    overflow: hidden;
}

.phc-calculator-header {
    padding: 24px 26px;
    border-bottom: 1px solid #e1e7ea;
    background: #f7f9fa;
}

.phc-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.phc-calculator-header p {
    margin: 0;
    max-width: 760px;
    color: #5c6c73;
    line-height: 1.6;
}

.phc-calculator-grid {
    display: grid;
    grid-template-columns:
        minmax(0, 0.95fr)
        minmax(0, 1.05fr);
}

.phc-input-panel,
.phc-results-panel {
    min-width: 0;
    padding: 28px 26px;
}

.phc-input-panel {
    border-right: 1px solid #e1e7ea;
}

.phc-results-panel {
    background: #fbfcfc;
}


/* =========================================================
   UNIT TOGGLE
   ========================================================= */

.phc-unit-fieldset {
    padding: 0;
    margin: 0 0 25px;
    border: 0;
}

.phc-unit-fieldset legend {
    margin-bottom: 9px;
    color: #263b45;
    font-weight: 700;
}

.phc-unit-toggle {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 5px;
    border: 1px solid #d6e0e4;
    border-radius: 9px;
    background: #f3f6f7;
}

.phc-unit-toggle label {
    position: relative;
    cursor: pointer;
}

.phc-unit-toggle input {
    position: absolute;
    opacity: 0;
}

.phc-unit-toggle span {
    display: block;
    padding: 10px 14px;
    border-radius: 7px;
    text-align: center;
    font-weight: 700;
}

.phc-unit-toggle input:checked + span {
    background: #337b98;
    color: #ffffff;
}

.phc-unit-toggle input:focus-visible + span {
    outline: 3px solid rgba(51, 123, 152, 0.2);
}


/* =========================================================
   FIELDS
   ========================================================= */

.phc-field {
    margin-bottom: 22px;
}

.phc-field > label {
    display: block;
    margin-bottom: 8px;
    color: #263b45;
    font-weight: 600;
}

.phc-field select,
.phc-field input {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #bccbd1;
    border-radius: 8px;
    background: #ffffff;
    color: #25363e;
    font: inherit;
    font-size: 1rem;
}

.phc-field select:focus,
.phc-field input:focus {
    border-color: #337b98;
    outline: 3px solid rgba(51, 123, 152, 0.14);
}

.phc-input-unit {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: stretch;
}

.phc-input-unit input {
    min-width: 0;
    border-radius: 8px 0 0 8px;
}

.phc-input-unit span {
    display: flex;
    min-width: 62px;
    align-items: center;
    justify-content: center;
    padding: 8px 11px;
    border: 1px solid #bccbd1;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #f1f5f6;
    color: #51666f;
    font-weight: 700;
}

.phc-field-help {
    display: block;
    margin-top: 7px;
    color: #687981;
    font-size: 0.9rem;
    line-height: 1.45;
}

.phc-hidden {
    display: none !important;
}


/* =========================================================
   ADVANCED
   ========================================================= */

.phc-advanced {
    margin: 8px 0 21px;
    border: 1px solid #dae3e6;
    border-radius: 9px;
    background: #f8fafb;
}

.phc-advanced summary {
    padding: 14px 16px;
    color: #37515c;
    font-weight: 700;
    cursor: pointer;
}

.phc-advanced-body {
    padding: 0 16px 2px;
}

.phc-advanced-body > p {
    margin: 0 0 17px;
    color: #61727a;
    font-size: 0.92rem;
    line-height: 1.55;
}


/* =========================================================
   ERROR / BUTTONS
   ========================================================= */

.phc-error {
    min-height: 25px;
    margin: 8px 0 10px;
    color: #9b2f2f;
    font-size: 0.94rem;
    line-height: 1.45;
}

.phc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.phc-primary-button,
.phc-secondary-button {
    min-height: 46px;
    padding: 11px 20px;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.phc-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.phc-primary-button:hover {
    background: #28677f;
}

.phc-secondary-button {
    border: 1px solid #bdcbd1;
    background: #ffffff;
    color: #3e535d;
}

.phc-secondary-button:hover {
    background: #f3f6f7;
}


/* =========================================================
   RESULTS
   ========================================================= */

.phc-results-label {
    margin: 0 0 7px;
    color: #5b6c74;
    font-size: 0.93rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.phc-main-result {
    margin-bottom: 24px;
    color: #235f77;
    font-size: clamp(2.1rem, 5vw, 3.2rem);
    line-height: 1.1;
    font-weight: 700;
    overflow-wrap: anywhere;
}

.phc-result-list {
    margin: 0;
}

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

.phc-result-list dt {
    color: #55666f;
}

.phc-result-list dd {
    margin: 0;
    color: #243840;
    text-align: right;
    font-weight: 600;
}


/* =========================================================
   BREAKDOWN
   ========================================================= */

.phc-breakdown {
    margin-top: 27px;
    padding: 18px;
    border: 1px solid #d8e2e6;
    border-radius: 9px;
    background: #ffffff;
}

.phc-breakdown h3 {
    margin: 0 0 10px;
    font-size: 1.05rem;
}

.phc-breakdown dl {
    margin: 0;
}

.phc-breakdown dl > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #e7ecee;
}

.phc-breakdown dl > div:last-child {
    border-bottom: 0;
}

.phc-breakdown dt {
    color: #586a72;
}

.phc-breakdown dd {
    margin: 0;
    font-weight: 700;
    text-align: right;
}


/* =========================================================
   WORKED CALCULATION
   ========================================================= */

.phc-worked-calculation {
    margin-top: 20px;
    padding: 17px 18px;
    border: 1px solid #d8e2e6;
    border-radius: 9px;
    background: #ffffff;
}

.phc-worked-calculation h3 {
    margin: 0 0 9px;
    font-size: 1rem;
}

.phc-worked-calculation p {
    color: #455b64;
    line-height: 1.6;
    overflow-wrap: anywhere;
}

.phc-worked-calculation p:last-child {
    margin-bottom: 0;
    font-weight: 700;
}


/* =========================================================
   CONTENT
   ========================================================= */

.phc-content-section {
    max-width: 900px;
    margin: 0 0 44px;
}

.phc-content-section > h2 {
    position: relative;
    margin: 0 0 21px;
    font-size: 1.65rem;
    line-height: 1.3;
}

.phc-content-section > h2::after {
    content: "";
    display: block;
    width: 110px;
    height: 3px;
    margin-top: 11px;
    background: #337b98;
}

.phc-content-section p,
.phc-content-section li {
    line-height: 1.72;
}

.phc-content-section ol,
.phc-content-section ul {
    padding-left: 23px;
}


/* =========================================================
   FORMULA / EXAMPLE / NOTE
   ========================================================= */

.phc-formula-box {
    margin: 20px 0;
    padding: 20px;
    border: 1px solid #d6e1e5;
    border-left: 4px solid #6f9faf;
    border-radius: 8px;
    background: #eef5f7;
    text-align: center;
}

.phc-formula-box span {
    color: #244d5c;
    font-size: clamp(1.05rem, 3vw, 1.28rem);
    font-weight: 700;
    overflow-wrap: anywhere;
}

.phc-example-box {
    margin: 20px 0;
    padding: 18px 20px;
    border-left: 4px solid #7ea8b8;
    background: #eef5f7;
}

.phc-example-box p {
    margin: 0 0 8px;
}

.phc-example-box strong {
    color: #294e5d;
}

.phc-note {
    margin: 20px 0;
    padding: 18px 20px;
    border-left: 4px solid #7b969f;
    background: #f4f7f8;
    color: #425860;
}

.phc-note p {
    margin: 0 0 10px;
}

.phc-note p:last-child {
    margin-bottom: 0;
}


/* =========================================================
   FAQ
   ========================================================= */

.phc-faq details {
    margin: 0 0 12px;
    border: 1px solid #dce4e8;
    border-radius: 9px;
    background: #ffffff;
}

.phc-faq summary {
    padding: 16px 18px;
    color: #2f4650;
    font-weight: 700;
    cursor: pointer;
}

.phc-faq details p {
    margin: 0;
    padding: 0 18px 18px;
    color: #53666f;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .phc-page {
        padding-left: 15px;
        padding-right: 15px;
    }

    .phc-calculator-header {
        padding: 21px 18px;
    }

    .phc-calculator-grid {
        grid-template-columns: 1fr;
    }

    .phc-input-panel {
        border-right: 0;
        border-bottom: 1px solid #e1e7ea;
    }

    .phc-input-panel,
    .phc-results-panel {
        padding: 22px 18px;
    }

}


/* =========================================================
   SMALL MOBILE
   ========================================================= */

@media (max-width: 420px) {

    .phc-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .phc-intro h1 {
        font-size: 2rem;
    }

    .phc-actions {
        display: grid;
        grid-template-columns: 1fr;
    }

    .phc-primary-button,
    .phc-secondary-button {
        width: 100%;
    }

    .phc-result-list > div,
    .phc-breakdown dl > div {
        display: block;
    }

    .phc-result-list dd,
    .phc-breakdown dd {
        margin-top: 4px;
        text-align: left;
    }

    .phc-main-result {
        font-size: 2.2rem;
    }

}

/* =========================================================
   Wire Voltage Drop Calculator
   ========================================================= */

.wvdc-page {
    padding: 28px 20px 56px;
}

.wvdc-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.wvdc-intro {
    margin: 24px 0 26px;
    max-width: 720px;
}

.wvdc-intro h1 {
    margin: 0 0 12px;
}

.wvdc-intro p {
    margin: 0;
    line-height: 1.65;
}


/* Calculator */

.wvdc-calculator-shell {
    max-width: 640px;
    padding: 24px;
    margin-bottom: 28px;
    background: #fff;
    border: 1px solid #d7e0e5;
    border-radius: 10px;
}

.wvdc-calculator-header {
    margin-bottom: 22px;
}

.wvdc-calculator-header h2 {
    margin: 0 0 8px;
    font-size: 1.2rem;
}

.wvdc-calculator-header p {
    margin: 0;
    line-height: 1.55;
}

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

.wvdc-field {
    min-width: 0;
}

.wvdc-field.wvdc-full {
    grid-column: 1 / -1;
}

.wvdc-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
}

.wvdc-field input,
.wvdc-field select {
    width: 100%;
    min-height: 44px;
    padding: 9px 11px;
    font: inherit;
    color: inherit;
    background: #fff;
    border: 1px solid #bccbd3;
    border-radius: 5px;
    box-sizing: border-box;
}

.wvdc-field input:focus,
.wvdc-field select:focus {
    outline: 2px solid rgba(51, 123, 152, 0.18);
    border-color: #337b98;
}

.wvdc-field small {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    line-height: 1.45;
    color: #5d6a70;
}


/* Input + unit */

.wvdc-input-unit {
    display: flex;
    width: 100%;
}

.wvdc-input-unit input {
    min-width: 0;
    flex: 1 1 auto;
    border-radius: 5px 0 0 5px;
}

.wvdc-input-unit > span,
.wvdc-input-unit > select {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
    min-width: 58px;
    min-height: 44px;
    padding: 9px 10px;
    font-weight: 600;
    background: #f4f7f8;
    border: 1px solid #bccbd3;
    border-left: 0;
    border-radius: 0 5px 5px 0;
    box-sizing: border-box;
}

.wvdc-input-unit > select {
    width: auto;
    cursor: pointer;
}


/* Advanced */

.wvdc-advanced {
    margin-top: 22px;
    padding: 16px;
    background: #f7f9fa;
    border: 1px solid #dde5e9;
    border-radius: 7px;
}

.wvdc-advanced summary {
    cursor: pointer;
    font-weight: 600;
}

.wvdc-advanced-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 16px;
    margin-top: 18px;
}


/* Error */

.wvdc-error {
    display: none;
    margin-top: 18px;
	margin-bottom: 16px;
    padding: 11px 13px;
    line-height: 1.45;
    background: #fff6f5;
    border: 1px solid #d7a8a4;
    border-radius: 6px;
}

.wvdc-error.is-visible {
    display: block;
}


/* Buttons */

.wvdc-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 22px;
}

.wvdc-primary-button,
.wvdc-secondary-button {
    min-height: 42px;
    padding: 10px 16px;
    font: inherit;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

.wvdc-primary-button {
    color: #fff;
    background: #337b98;
    border: 1px solid #337b98;
}

.wvdc-primary-button:hover {
    background: #28677f;
}

.wvdc-secondary-button {
    color: #17252b;
    background: #edf1f3;
    border: 1px solid #d7e0e5;
}


/* Results */

.wvdc-results {
    max-width: 640px;
    margin: 0 0 42px;
    padding: 24px;
    background: #fff;
    border: 1px solid #d7e0e5;
    border-radius: 10px;
}

.wvdc-result-main {
    padding: 19px;
    margin-bottom: 18px;
    background: #f4f8fa;
    border-left: 4px solid #337b98;
    border-radius: 6px;
}

.wvdc-result-main span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.9rem;
}

.wvdc-result-main strong {
    display: block;
    font-size: 1.65rem;
}

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

.wvdc-result-card {
    padding: 14px;
    background: #fafbfc;
    border: 1px solid #e0e6e9;
    border-radius: 6px;
}

.wvdc-result-card span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.84rem;
    line-height: 1.35;
    color: #53646c;
}

.wvdc-result-card strong {
    font-size: 1.05rem;
}

.wvdc-status {
    margin-top: 16px;
    padding: 12px 14px;
    border-radius: 6px;
    font-weight: 600;
}

.wvdc-status.is-within {
    background: #f1f7f3;
    border: 1px solid #b9d2bf;
}

.wvdc-status.is-over {
    background: #fff6f5;
    border: 1px solid #d7a8a4;
}


/* Breakdown */

.wvdc-breakdown,
.wvdc-worked {
    margin-top: 24px;
}

.wvdc-breakdown h3,
.wvdc-worked h3 {
    margin: 0 0 13px;
    font-size: 1rem;
}

.wvdc-breakdown dl {
    margin: 0;
}

.wvdc-breakdown dl > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 9px 0;
    border-bottom: 1px solid #e3e8eb;
}

.wvdc-breakdown dt {
    color: #4f5e65;
}

.wvdc-breakdown dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.wvdc-worked p {
    margin: 0;
    padding: 14px;
    overflow-wrap: anywhere;
    line-height: 1.6;
    background: #f7f9fa;
    border-radius: 6px;
}


/* Content */

.wvdc-content-section {
    max-width: 760px;
    margin: 0 0 34px;
}

.wvdc-content-section h2 {
    margin: 0 0 16px;
}

.wvdc-content-section p {
    line-height: 1.7;
}

.wvdc-formula-box,
.wvdc-note-box {
    margin: 18px 0;
    padding: 18px;
    background: #f7f9fa;
    border-radius: 7px;
}

.wvdc-formula-box p:first-child,
.wvdc-note-box p:first-child {
    margin-top: 0;
}

.wvdc-formula-box p:last-child,
.wvdc-note-box p:last-child {
    margin-bottom: 0;
}

.wvdc-formula {
    font-weight: 600;
}


/* FAQ */

.wvdc-faq details {
    padding: 14px 0;
    border-bottom: 1px solid #dfe6e9;
}

.wvdc-faq summary {
    cursor: pointer;
    font-weight: 600;
}

.wvdc-faq details p {
    margin-bottom: 0;
}


/* Mobile */

@media (max-width: 760px) {

    .wvdc-page {
        padding: 22px 16px 44px;
    }

    .wvdc-form-grid,
    .wvdc-advanced-grid,
    .wvdc-result-grid {
        grid-template-columns: 1fr;
    }

    .wvdc-field.wvdc-full {
        grid-column: auto;
    }

}


@media (max-width: 420px) {

    .wvdc-calculator-shell,
    .wvdc-results {
        padding: 18px 15px;
    }

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

    .wvdc-primary-button,
    .wvdc-secondary-button {
        width: 100%;
    }

    .wvdc-breakdown dl > div {
        display: block;
    }

    .wvdc-breakdown dd {
        margin-top: 3px;
        text-align: left;
    }

}

/* =========================================================
   Electrical Load Calculator
   ========================================================= */

.elc-page {
    padding: 32px 20px 60px;
}

.elc-container {
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
}

.elc-page-header {
    margin: 22px 0 28px;
}

.elc-page-header h1 {
    margin: 0 0 12px;
}

.elc-intro {
    max-width: 780px;
    margin: 0;
    line-height: 1.7;
}


/* Calculator */

.elc-calculator-shell {
    max-width: 760px;
    margin: 32px auto;
    padding: 28px;
    border: 1px solid #d9e1e5;
    border-radius: 14px;
    background: #ffffff;
    box-shadow: 0 8px 24px rgba(20, 50, 65, 0.07);
}

.elc-calculator-header {
    margin-bottom: 24px;
}

.elc-calculator-header h2 {
    margin: 0 0 8px;
}

.elc-calculator-header p {
    margin: 0;
    line-height: 1.6;
}


/* Supply settings */

.elc-system-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 28px;
}

.elc-field {
    display: flex;
    flex-direction: column;
    gap: 7px;
}

.elc-field label {
    font-weight: 600;
}

.elc-field input,
.elc-field select,
.elc-load-table input,
.elc-load-table select {
    width: 100%;
    min-height: 44px;
    padding: 9px 10px;
    border: 1px solid #b9c7ce;
    border-radius: 7px;
    background: #ffffff;
    color: #1c2d35;
    font: inherit;
    box-sizing: border-box;
}

.elc-field input:focus,
.elc-field select:focus,
.elc-load-table input:focus,
.elc-load-table select:focus {
    border-color: #337b98;
    outline: 2px solid rgba(51, 123, 152, 0.12);
    outline-offset: 1px;
}


/* Input with unit */

.elc-input-unit {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}

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

.elc-input-unit span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 46px;
    height: 44px;
    padding: 0 10px;
    border: 1px solid #b9c7ce;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f5f8f9;
    box-sizing: border-box;
}


/* Worksheet heading */

.elc-worksheet-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 4px 0 14px;
}

.elc-worksheet-heading h3 {
    margin: 0 0 4px;
}

.elc-worksheet-heading p {
    margin: 0;
    font-size: 0.94rem;
}

.elc-add-button {
    flex: 0 0 auto;
    min-height: 40px;
    padding: 8px 14px;
    border: 1px solid #337b98;
    border-radius: 7px;
    background: #ffffff;
    color: #337b98;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.elc-add-button:hover {
    background: #f4f9fb;
}


/* Worksheet */

.elc-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.elc-load-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 9px;
}

.elc-load-table th {
    padding: 0 5px 3px;
    font-size: 0.82rem;
    font-weight: 600;
    text-align: left;
}

.elc-load-table td {
    padding: 0 4px;
    vertical-align: middle;
}

.elc-load-table th:first-child {
    width: 24%;
}

.elc-load-table th:nth-child(2) {
    width: 10%;
}

.elc-load-table th:nth-child(3) {
    width: 16%;
}

.elc-load-table th:nth-child(4) {
    width: 14%;
}

.elc-load-table th:nth-child(5) {
    width: 12%;
}

.elc-load-table th:nth-child(6) {
    width: 16%;
}

.elc-load-table th:last-child {
    width: 8%;
}

.elc-percent-input {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
}

.elc-percent-input input {
    border-radius: 7px 0 0 7px;
}

.elc-percent-input span {
    display: flex;
    align-items: center;
    height: 44px;
    padding: 0 8px;
    border: 1px solid #b9c7ce;
    border-left: 0;
    border-radius: 0 7px 7px 0;
    background: #f5f8f9;
    box-sizing: border-box;
}

.elc-remove-cell {
    text-align: center;
}

.elc-remove-load {
    width: 36px;
    height: 36px;
    padding: 0;
    border: 1px solid #ccd6db;
    border-radius: 50%;
    background: #ffffff;
    color: #687a83;
    font-size: 1.35rem;
    line-height: 1;
    cursor: pointer;
}

.elc-remove-load:hover {
    border-color: #9c4a4a;
    color: #9c4a4a;
}


/* Help */

.elc-worksheet-help {
    margin-top: 8px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f5f8f9;
    font-size: 0.9rem;
    line-height: 1.55;
}

.elc-worksheet-help p {
    margin: 0;
}


/* Error */

.elc-error {
    display: none;
    margin-top: 18px;
    margin-bottom: 16px;
    padding: 13px 15px;
    border: 1px solid #d9a3a3;
    border-radius: 8px;
    background: #fff7f7;
    color: #7d2929;
    line-height: 1.5;
}

.elc-error.is-visible {
    display: block;
}

.elc-error ul {
    margin: 8px 0 0 20px;
    padding: 0;
}

.elc-error li + li {
    margin-top: 4px;
}


/* Buttons */

.elc-buttons {
    display: flex;
    gap: 12px;
    margin-top: 22px;
}

.elc-primary-button,
.elc-secondary-button {
    min-height: 46px;
    padding: 10px 20px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.elc-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.elc-primary-button:hover {
    opacity: 0.94;
}

.elc-secondary-button {
    border: 1px solid #b9c7ce;
    background: #ffffff;
    color: #263a44;
}

.elc-secondary-button:hover {
    background: #f5f8f9;
}


/* Results */

.elc-results {
    max-width: 760px;
    margin: 28px auto 42px;
}

.elc-result-main {
    padding: 24px;
    border: 1px solid #c4d7df;
    border-radius: 14px;
    background: #f5fafc;
    text-align: center;
}

.elc-result-label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.92rem;
}

.elc-result-main strong {
    display: block;
    font-size: 2rem;
    line-height: 1.2;
}

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

.elc-result-card {
    padding: 18px;
    border: 1px solid #d9e1e5;
    border-radius: 10px;
    background: #ffffff;
}

.elc-result-card span {
    display: block;
    margin-bottom: 6px;
    font-size: 0.86rem;
}

.elc-result-card strong {
    display: block;
    font-size: 1.22rem;
}


/* Breakdown */

.elc-breakdown,
.elc-worked {
    margin-top: 18px;
    padding: 20px;
    border: 1px solid #d9e1e5;
    border-radius: 10px;
    background: #ffffff;
}

.elc-breakdown h3,
.elc-worked h3 {
    margin: 0 0 14px;
}

.elc-breakdown dl {
    margin: 0;
}

.elc-breakdown dl > div {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    padding: 9px 0;
    border-bottom: 1px solid #edf1f3;
}

.elc-breakdown dl > div:last-child {
    border-bottom: 0;
}

.elc-breakdown dt {
    font-weight: 500;
}

.elc-breakdown dd {
    margin: 0;
    text-align: right;
    font-weight: 600;
}

.elc-worked p {
    margin: 0;
    line-height: 1.65;
    overflow-wrap: anywhere;
}


/* Content */

.elc-content {
    max-width: 760px;
    margin: 0 auto;
}

.elc-content h2 {
    margin-top: 38px;
    margin-bottom: 12px;
}

.elc-content h3 {
    margin-top: 24px;
    margin-bottom: 8px;
}

.elc-content p {
    line-height: 1.72;
}

.elc-formula {
    margin: 18px 0;
    padding: 16px;
    border-left: 4px solid #337b98;
    background: #f5f8f9;
    font-size: 1.08rem;
    font-weight: 600;
    text-align: center;
}

.elc-note {
    margin: 20px 0;
    padding: 16px 18px;
    border: 1px solid #d5dfe3;
    border-radius: 9px;
    background: #f8fafb;
    line-height: 1.65;
}

.elc-faq h3 {
    margin-top: 26px;
}
/* Disabled fields — used when PF does not apply, such as DC */
.elc-page input:disabled,
.elc-page select:disabled {
    background: #e5e9ec;
    border-color: #c4ccd2;
    color: #7a858d;
    cursor: not-allowed;
    opacity: 1;
}

.elc-page input:disabled {
    box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.02);
}


/* =========================================================
   Mobile
   ========================================================= */

@media (max-width: 760px) {

    .elc-page {
        padding: 24px 15px 50px;
    }

    .elc-calculator-shell {
        padding: 20px 16px;
        border-radius: 11px;
    }

    .elc-system-grid,
    .elc-result-grid {
        grid-template-columns: 1fr;
    }

    .elc-worksheet-heading {
        align-items: flex-start;
    }

    .elc-table-wrap {
        overflow: visible;
    }

    .elc-load-table,
    .elc-load-table tbody,
    .elc-load-table tr,
    .elc-load-table td {
        display: block;
        width: 100%;
    }

    .elc-load-table thead {
        display: none;
    }

    .elc-load-table {
        border-spacing: 0;
    }

    .elc-load-row {
        position: relative;
        margin-bottom: 18px;
        padding: 14px;
        border: 1px solid #d9e1e5;
        border-radius: 10px;
        background: #fafcfc;
        box-sizing: border-box;
    }

    .elc-load-table td {
        display: grid;
        grid-template-columns: 82px minmax(0, 1fr);
        align-items: center;
        gap: 10px;
        padding: 5px 0;
        box-sizing: border-box;
    }

    .elc-load-table td::before {
        content: attr(data-label);
        font-size: 0.82rem;
        font-weight: 600;
    }

    .elc-load-table .elc-remove-cell {
        display: flex;
        justify-content: flex-end;
        padding-top: 8px;
    }

    .elc-remove-cell::before {
        display: none;
    }

    .elc-buttons {
        flex-direction: column;
    }

    .elc-primary-button,
    .elc-secondary-button {
        width: 100%;
    }

    .elc-breakdown dl > div {
        flex-direction: column;
        gap: 3px;
    }

    .elc-breakdown dd {
        text-align: left;
    }

}


@media (max-width: 420px) {

    .elc-page {
        padding-left: 12px;
        padding-right: 12px;
    }

    .elc-calculator-shell {
        padding: 17px 12px;
    }

    .elc-worksheet-heading {
        flex-direction: column;
    }

    .elc-add-button {
        width: 100%;
    }

    .elc-load-table td {
        grid-template-columns: 68px minmax(0, 1fr);
    }

    .elc-result-main strong {
        font-size: 1.7rem;
    }
	}

/* =========================================================
   PRESENT VALUE OF CASH FLOWS CALCULATOR
   ========================================================= */


.pvcf-page {
    padding: 28px 20px 60px;
}


.pvcf-container {
    width: 100%;
    max-width: 1180px;
    margin: 0 auto;
}


/* ---------------------------------------------------------
   Breadcrumbs
   --------------------------------------------------------- */

.pvcf-page .breadcrumbs {
    margin-bottom: 24px;
    font-size: 0.92rem;
    line-height: 1.5;
}

.pvcf-page .breadcrumbs a {
    color: #337b98;
    text-decoration: none;
}

.pvcf-page .breadcrumbs a:hover {
    text-decoration: underline;
}

.pvcf-page .breadcrumbs span {
    margin: 0 5px;
}


/* ---------------------------------------------------------
   Page Header
   --------------------------------------------------------- */

.pvcf-page-header {
    max-width: 860px;
    margin-bottom: 34px;
}

.pvcf-page-header h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.pvcf-intro {
    margin: 0;
    max-width: 800px;
    color: #53616a;
    font-size: 1.08rem;
    line-height: 1.7;
}


/* ---------------------------------------------------------
   Calculator Shell
   --------------------------------------------------------- */

.pvcf-calculator-shell {
    max-width: 880px;
    margin: 0 auto 48px;
    padding: 30px;
    background: #ffffff;
    border: 1px solid #dce3e7;
    border-radius: 14px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.055);
}

.pvcf-calculator-shell > h2 {
    margin: 0 0 24px;
    font-size: 1.65rem;
}


/* ---------------------------------------------------------
   Settings
   --------------------------------------------------------- */

.pvcf-settings-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
    margin-bottom: 10px;
}

.pvcf-field {
    min-width: 0;
}

.pvcf-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 600;
    color: #27343c;
}

.pvcf-field input,
.pvcf-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #bcc9d0;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2930;
    font: inherit;
    box-sizing: border-box;
}

.pvcf-field input:focus,
.pvcf-field select:focus,
.pvcf-row-field input:focus {
    outline: none;
    border-color: #337b98;
    box-shadow: 0 0 0 3px rgba(51, 123, 152, 0.12);
}

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

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

.pvcf-input-unit span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0 12px;
    background: #f0f4f6;
    border: 1px solid #bcc9d0;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    font-weight: 600;
    color: #495860;
}

.pvcf-custom-currency-wrap {
    grid-column: span 1;
}

.pvcf-setting-help {
    margin: 10px 0 28px;
    color: #65737b;
    font-size: 0.93rem;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   Worksheet Heading
   --------------------------------------------------------- */

.pvcf-worksheet-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    margin: 30px 0 14px;
}

.pvcf-worksheet-heading h3 {
    margin: 0 0 5px;
    font-size: 1.25rem;
}

.pvcf-worksheet-heading p {
    margin: 0;
    color: #65737b;
    font-size: 0.93rem;
}

.pvcf-add-button {
    flex: 0 0 auto;
    min-height: 42px;
    padding: 9px 16px;
    border: 1px solid #337b98;
    border-radius: 8px;
    background: #ffffff;
    color: #337b98;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.pvcf-add-button:hover {
    background: #f2f7f9;
}


/* ---------------------------------------------------------
   Cash Flow Table
   --------------------------------------------------------- */

.pvcf-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pvcf-cash-flow-table {
    min-width: 650px;
    border: 1px solid #d9e1e5;
    border-radius: 10px;
    overflow: hidden;
}

.pvcf-table-header,
.pvcf-cash-flow-row {
    display: grid;
    grid-template-columns:
        110px
        minmax(180px, 1fr)
        minmax(170px, 0.8fr)
        52px;
}

.pvcf-table-header {
    background: #f2f5f7;
    border-bottom: 1px solid #d9e1e5;
}

.pvcf-table-header > div {
    padding: 11px 10px;
    font-size: 0.9rem;
    font-weight: 700;
    color: #44515a;
}

.pvcf-cash-flow-row {
    border-bottom: 1px solid #e2e7ea;
}

.pvcf-cash-flow-row:last-child {
    border-bottom: 0;
}

.pvcf-row-field,
.pvcf-row-remove {
    padding: 8px;
    min-width: 0;
}

.pvcf-row-field input {
    width: 100%;
    min-height: 42px;
    padding: 8px 10px;
    border: 1px solid #c7d0d5;
    border-radius: 7px;
    background: #ffffff;
    color: #202b31;
    font: inherit;
    box-sizing: border-box;
}

.pvcf-row-remove {
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvcf-remove-cash-flow {
    width: 34px;
    height: 34px;
    border: 1px solid #c9d1d6;
    border-radius: 7px;
    background: #ffffff;
    color: #6c7780;
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
}

.pvcf-remove-cash-flow:hover {
    background: #f7eeee;
    border-color: #c99d9d;
    color: #8d3b3b;
}


/* ---------------------------------------------------------
   Help
   --------------------------------------------------------- */

.pvcf-help-box {
    display: flex;
    gap: 7px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    background: #f4f7f8;
    color: #56636b;
    font-size: 0.91rem;
    line-height: 1.55;
}


/* ---------------------------------------------------------
   Errors
   --------------------------------------------------------- */

.pvcf-error {
    margin-top: 20px;
    padding: 15px 17px;
    background: #fff4f3;
    border: 1px solid #e1b5b0;
    border-radius: 8px;
    color: #7c302a;
    line-height: 1.5;
}

.pvcf-error strong {
    display: block;
    margin-bottom: 6px;
}

.pvcf-error ul {
    margin: 6px 0 0;
    padding-left: 22px;
}

.pvcf-error li + li {
    margin-top: 4px;
}


/* ---------------------------------------------------------
   Buttons
   --------------------------------------------------------- */

.pvcf-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.pvcf-primary-button,
.pvcf-secondary-button {
    min-height: 46px;
    padding: 10px 22px;
    border-radius: 8px;
    font: inherit;
    font-weight: 700;
    cursor: pointer;
}

.pvcf-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.pvcf-primary-button:hover {
    background: #296b86;
}

.pvcf-secondary-button {
    border: 1px solid #bdc8ce;
    background: #ffffff;
    color: #35434b;
}

.pvcf-secondary-button:hover {
    background: #f3f6f7;
}


/* ---------------------------------------------------------
   Results
   --------------------------------------------------------- */

.pvcf-results {
    margin-top: 30px;
    padding-top: 28px;
    border-top: 1px solid #dfe5e8;
}

.pvcf-main-result {
    margin-bottom: 18px;
    padding: 22px;
    border-left: 5px solid #337b98;
    border-radius: 9px;
    background: #f2f7f9;
}

.pvcf-main-result span {
    display: block;
    margin-bottom: 6px;
    color: #53616a;
    font-size: 0.94rem;
}

.pvcf-main-result strong {
    display: block;
    font-size: clamp(1.8rem, 5vw, 2.45rem);
    line-height: 1.15;
    color: #1c3845;
}

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

.pvcf-result-card {
    padding: 16px;
    border: 1px solid #dce3e7;
    border-radius: 9px;
    background: #ffffff;
}

.pvcf-result-card span {
    display: block;
    margin-bottom: 5px;
    color: #68747c;
    font-size: 0.89rem;
}

.pvcf-result-card strong {
    display: block;
    color: #25333b;
    font-size: 1.15rem;
}


/* ---------------------------------------------------------
   Calculation Details
   --------------------------------------------------------- */

.pvcf-breakdown {
    margin-top: 28px;
}

.pvcf-breakdown h3,
.pvcf-pv-breakdown h3,
.pvcf-worked h3 {
    margin: 0 0 15px;
    font-size: 1.2rem;
}

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

.pvcf-breakdown-grid > div {
    padding: 14px 15px;
    border-radius: 8px;
    background: #f6f8f9;
}

.pvcf-breakdown-grid span {
    display: block;
    margin-bottom: 4px;
    color: #69757d;
    font-size: 0.88rem;
}

.pvcf-breakdown-grid strong {
    color: #26343c;
}


/* ---------------------------------------------------------
   Result Breakdown Table
   --------------------------------------------------------- */

.pvcf-pv-breakdown {
    margin-top: 30px;
}

.pvcf-result-table-wrap {
    width: 100%;
    overflow-x: auto;
}

.pvcf-result-table {
    width: 100%;
    min-width: 680px;
    border-collapse: collapse;
    font-size: 0.91rem;
}

.pvcf-result-table th,
.pvcf-result-table td {
    padding: 11px 10px;
    text-align: left;
    border-bottom: 1px solid #dfe5e8;
}

.pvcf-result-table th {
    background: #f2f5f7;
    color: #41505a;
    font-weight: 700;
}

.pvcf-result-table tbody tr:hover {
    background: #fafcfc;
}


/* ---------------------------------------------------------
   Worked Formula
   --------------------------------------------------------- */

.pvcf-worked {
    margin-top: 28px;
}

.pvcf-worked > div {
    padding: 16px;
    border-radius: 8px;
    background: #f5f7f8;
    color: #33434c;
    line-height: 1.7;
}


/* ---------------------------------------------------------
   Content Sections
   --------------------------------------------------------- */

.pvcf-content-section {
    max-width: 880px;
    margin: 0 auto 38px;
}

.pvcf-content-section h2 {
    position: relative;
    margin: 0 0 21px;
    padding-bottom: 12px;
    font-size: 1.6rem;
}

.pvcf-content-section h2::after {
    content: "";
    display: block;
    width: 120px;
    height: 3px;
    margin-top: 12px;
    background: #337b98;
}

.pvcf-content-section p {
    margin: 0 0 16px;
    color: #4f5d65;
    line-height: 1.75;
}

.pvcf-formula-box {
    margin: 18px 0;
    padding: 18px 20px;
    border-left: 4px solid #337b98;
    border-radius: 7px;
    background: #f2f7f9;
    font-size: 1.15rem;
}

.pvcf-note-box {
    display: flex;
    gap: 7px;
    margin-top: 18px;
    padding: 15px 17px;
    border: 1px solid #d5e0e5;
    border-radius: 8px;
    background: #f5f8f9;
    color: #4b5961;
    line-height: 1.6;
}


/* ---------------------------------------------------------
   FAQs
   --------------------------------------------------------- */

.pvcf-faq-section details {
    margin-bottom: 10px;
    border: 1px solid #dbe2e6;
    border-radius: 8px;
    background: #ffffff;
}

.pvcf-faq-section summary {
    padding: 15px 17px;
    cursor: pointer;
    font-weight: 700;
    color: #2b3941;
}

.pvcf-faq-section details p {
    padding: 0 17px 16px;
    margin: 0;
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .pvcf-page {
        padding:
            20px
            14px
            45px;
    }

    .pvcf-calculator-shell {
        padding: 20px 15px;
        border-radius: 11px;
    }

    .pvcf-settings-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .pvcf-custom-currency-wrap {
        grid-column: auto;
    }

    .pvcf-worksheet-heading {
        align-items: stretch;
        flex-direction: column;
        gap: 13px;
    }

    .pvcf-add-button {
        width: 100%;
    }


    /*
     * Convert worksheet table to stacked cards
     */

    .pvcf-table-wrap {
        overflow: visible;
    }

    .pvcf-cash-flow-table {
        min-width: 0;
        border: 0;
        overflow: visible;
    }

    .pvcf-table-header {
        display: none;
    }

    .pvcf-cash-flow-row {
        display: block;
        margin-bottom: 14px;
        padding: 14px;
        border: 1px solid #d8e0e4;
        border-radius: 9px;
        background: #fafcfc;
    }

    .pvcf-cash-flow-row:last-child {
        border-bottom:
            1px solid #d8e0e4;
    }

    .pvcf-row-field,
    .pvcf-row-remove {
        padding: 0;
        margin-bottom: 12px;
    }

    .pvcf-row-field::before,
    .pvcf-row-remove::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 6px;
        color: #46545c;
        font-size: 0.87rem;
        font-weight: 700;
    }

    .pvcf-row-remove {
        display: block;
        margin-bottom: 0;
    }

    .pvcf-remove-cash-flow {
        width: 42px;
        height: 38px;
    }


    /*
     * Results
     */

    .pvcf-result-grid,
    .pvcf-breakdown-grid {
        grid-template-columns: 1fr;
    }

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

    .pvcf-primary-button,
    .pvcf-secondary-button {
        width: 100%;
    }

    .pvcf-help-box,
    .pvcf-note-box {
        display: block;
    }

    .pvcf-help-box strong,
    .pvcf-note-box strong {
        display: block;
        margin-bottom: 4px;
    }

}


/* ---------------------------------------------------------
   Very Small Screens
   --------------------------------------------------------- */

@media (max-width: 420px) {

    .pvcf-page-header h1 {
        font-size: 1.85rem;
    }

    .pvcf-calculator-shell {
        padding:
            18px
            12px;
    }

    .pvcf-main-result {
        padding: 18px 15px;
    }

    .pvcf-main-result strong {
        font-size: 1.75rem;
    }

}

/* =========================================================
   COMMISSION CALCULATOR
   ========================================================= */

.commission-page {
    width: 100%;
}

.commission-container {
    width: min(1180px, calc(100% - 40px));
    margin: 0 auto;
    padding: 30px 0 60px;
}


/* Breadcrumb */

.commission-breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 28px;
    font-size: 0.9rem;
    color: #66737c;
}

.commission-breadcrumb a {
    color: #337b98;
    text-decoration: none;
}

.commission-breadcrumb a:hover {
    text-decoration: underline;
}


/* Header */

.commission-header {
    max-width: 850px;
    margin-bottom: 30px;
}

.commission-header h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.15;
    color: #1f2d35;
}

.commission-header p {
    margin: 0;
    font-size: 1.05rem;
    line-height: 1.7;
    color: #53616a;
}


/* Calculator shell */

.commission-calculator-shell {
    padding: 30px;
    border: 1px solid #dce4e8;
    border-radius: 16px;
    background: #ffffff;
    box-shadow: 0 6px 24px rgba(31, 45, 53, 0.06);
}


/* Fields */

.commission-mode-section {
    margin-bottom: 26px;
}

.commission-mode-section label,
.commission-field label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #263840;
}

.commission-mode-section select {
    width: 100%;
    max-width: 520px;
}

.commission-field input,
.commission-field select,
.commission-mode-section select {
    width: 100%;
    min-height: 48px;
    padding: 10px 12px;
    border: 1px solid #bcc9cf;
    border-radius: 8px;
    background: #ffffff;
    color: #1f2d35;
    font: inherit;
}

.commission-field input:focus,
.commission-field select:focus,
.commission-mode-section select:focus {
    outline: 2px solid rgba(51, 123, 152, 0.2);
    border-color: #337b98;
}

.commission-field small {
    display: block;
    margin-top: 7px;
    line-height: 1.45;
    color: #68777f;
}

.commission-optional {
    font-weight: 400;
    color: #7a878d;
}


/* Currency */

.commission-currency-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 20px;
    max-width: 760px;
    margin-bottom: 28px;
}

.commission-custom-currency[hidden] {
    display: none;
}


/* Input panels */

.commission-input-panel {
    margin-top: 8px;
    padding-top: 26px;
    border-top: 1px solid #e2e8eb;
}

.commission-input-panel[hidden] {
    display: none;
}

.commission-input-panel h2 {
    margin: 0 0 22px;
    font-size: 1.35rem;
    color: #263840;
}

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


/* Prefix / suffix inputs */

.commission-input-prefix,
.commission-input-suffix {
    display: flex;
    align-items: stretch;
}

.commission-input-prefix span,
.commission-input-suffix span {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 48px;
    padding: 0 10px;
    border: 1px solid #bcc9cf;
    background: #f4f7f8;
    color: #455760;
}

.commission-input-prefix span {
    border-right: 0;
    border-radius: 8px 0 0 8px;
}

.commission-input-suffix span {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.commission-input-prefix input {
    border-radius: 0 8px 8px 0;
}

.commission-input-suffix input {
    border-radius: 8px 0 0 8px;
}


/* Error */

.commission-error {
    margin-top: 24px;
    padding: 16px 18px;
    border: 1px solid #d7a6a6;
    border-radius: 9px;
    background: #fff7f7;
    color: #713939;
}

.commission-error[hidden] {
    display: none;
}

.commission-error strong {
    display: block;
    margin-bottom: 7px;
}

.commission-error ul {
    margin: 0;
    padding-left: 21px;
}

.commission-error li + li {
    margin-top: 4px;
}



/* Buttons */

.commission-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.commission-actions button {
    min-height: 48px;
    padding: 11px 24px;
    border-radius: 8px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.commission-primary-button {
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.commission-primary-button:hover {
    background: #28677f;
}

.commission-secondary-button {
    border: 1px solid #b8c4c9;
    background: #ffffff;
    color: #33474f;
}

.commission-secondary-button:hover {
    background: #f4f7f8;
}


/* Results */

.commission-results {
    margin-top: 32px;
    padding-top: 30px;
    border-top: 1px solid #dce4e8;
}

.commission-main-result {
    padding: 24px;
    margin-bottom: 20px;
    border: 1px solid #c9dce4;
    border-left: 5px solid #337b98;
    border-radius: 12px;
    background: #f7fbfc;
}

.commission-main-result span {
    display: block;
    margin-bottom: 7px;
    color: #56676f;
}

.commission-main-result strong {
    display: block;
    font-size: clamp(2rem, 6vw, 3rem);
    line-height: 1.1;
    color: #1f596f;
    overflow-wrap: anywhere;
}

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

.commission-result-grid[hidden] {
    display: none;
}

.commission-result-card {
    padding: 18px;
    border: 1px solid #dce4e8;
    border-radius: 10px;
    background: #ffffff;
}

.commission-result-card span {
    display: block;
    margin-bottom: 7px;
    font-size: 0.9rem;
    line-height: 1.4;
    color: #65747c;
}

.commission-result-card strong {
    display: block;
    font-size: 1.15rem;
    line-height: 1.35;
    color: #263840;
    overflow-wrap: anywhere;
}


/* Details */

.commission-details {
    margin-top: 28px;
}

.commission-details h2,
.commission-worked h2 {
    margin: 0 0 15px;
    font-size: 1.25rem;
    color: #263840;
}

.commission-detail-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    border: 1px solid #dce4e8;
    border-radius: 10px;
    overflow: hidden;
}

.commission-detail-grid > div {
    padding: 17px;
    background: #fafcfd;
}

.commission-detail-grid > div + div {
    border-left: 1px solid #dce4e8;
}

.commission-detail-grid span {
    display: block;
    margin-bottom: 5px;
    font-size: 0.88rem;
    line-height: 1.4;
    color: #69777e;
}

.commission-detail-grid strong {
    color: #293b43;
}


/* Worked calculation */

.commission-worked {
    margin-top: 28px;
}

.commission-worked-equation {
    padding: 18px 20px;
    border: 1px solid #d6e1e5;
    border-radius: 9px;
    background: #f5f8f9;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco,
        Consolas, "Liberation Mono", "Courier New", monospace;
    line-height: 1.6;
    color: #2a414b;
    overflow-wrap: anywhere;
}


/* Page content */

.commission-content {
    max-width: 900px;
    margin: 45px auto 0;
}

.commission-content h2 {
    margin: 34px 0 12px;
    color: #263840;
}

.commission-content p {
    line-height: 1.75;
    color: #4f6068;
}

.commission-formula-box {
    margin: 20px 0 28px;
    padding: 18px 20px;
    border-left: 4px solid #337b98;
    background: #f4f8fa;
}

.commission-formula-box strong {
    display: block;
    margin-bottom: 5px;
    color: #2b424c;
}

.commission-formula-box p {
    margin: 0;
    font-weight: 600;
    color: #354a53;
}

.commission-note {
    margin: 32px 0;
    padding: 22px;
    border: 1px solid #d9e2e6;
    border-radius: 10px;
    background: #fafcfd;
}

.commission-note h2 {
    margin-top: 0;
}


/* FAQ */

.commission-faq {
    margin-top: 42px;
}

.commission-faq > h2 {
    margin-bottom: 18px;
}

.commission-faq details {
    border-top: 1px solid #dce4e8;
}

.commission-faq details:last-child {
    border-bottom: 1px solid #dce4e8;
}

.commission-faq summary {
    padding: 18px 4px;
    font-weight: 600;
    color: #293c44;
    cursor: pointer;
}

.commission-faq details p {
    margin: 0;
    padding: 0 4px 20px;
}


/* Responsive */

@media (max-width: 820px) {

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

    .commission-detail-grid {
        grid-template-columns: 1fr;
    }

    .commission-detail-grid > div + div {
        border-left: 0;
        border-top: 1px solid #dce4e8;
    }
}


@media (max-width: 680px) {

    .commission-container {
        width: min(100% - 28px, 1180px);
        padding-top: 20px;
    }

    .commission-calculator-shell {
        padding: 20px 16px;
        border-radius: 12px;
    }

    .commission-currency-row,
    .commission-input-grid {
        grid-template-columns: 1fr;
    }

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

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

    .commission-actions button {
        width: 100%;
    }

    .commission-main-result {
        padding: 20px 16px;
    }
}


@media (max-width: 420px) {

    .commission-container {
        width: min(100% - 20px, 1180px);
    }

    .commission-header h1 {
        font-size: 2rem;
    }

    .commission-main-result strong {
        font-size: 1.9rem;
    }
}
/* =========================================================
   PTO PAYOUT CALCULATOR
   ========================================================= */

.pto-page {
    padding: 0 0 60px;
}

.pto-page * {
    box-sizing: border-box;
}

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


/* ---------------------------------------------------------
   BREADCRUMBS
   --------------------------------------------------------- */

.pto-container .breadcrumbs {
    margin: 22px 0 12px;
    font-size: 0.95rem;
    color: #66757d;
}

.pto-container .breadcrumbs a {
    color: #39758a;
    text-decoration: none;
}

.pto-container .breadcrumbs a:hover {
    text-decoration: underline;
}

.pto-container .breadcrumbs span {
    margin-left: 7px;
}


/* ---------------------------------------------------------
   INTRODUCTION
   --------------------------------------------------------- */

.pto-intro {
    max-width: 850px;
    padding: 20px 0 28px;
}

.pto-intro h1 {
    margin: 0 0 14px;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
}

.pto-lead {
    margin: 0;
    color: #4b5563;
    font-size: 1.08rem;
    line-height: 1.75;
}


/* ---------------------------------------------------------
   CALCULATOR
   --------------------------------------------------------- */

.pto-calculator {
    margin: 10px 0 54px;
    overflow: hidden;

    background: #ffffff;

    border: 1px solid #dce4e8;
    border-radius: 14px;
}

.pto-calculator-header {
    padding: 25px 30px;

    background: #f7fafb;

    border-bottom: 1px solid #e3e8eb;
}

.pto-calculator-header h2 {
    margin: 0 0 7px;
    font-size: 1.45rem;
}

.pto-calculator-header p {
    margin: 0;

    color: #5b6570;

    line-height: 1.6;
}

.pto-calculator-grid {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr)
        minmax(0, 1fr);
}


/* ---------------------------------------------------------
   PANELS
   --------------------------------------------------------- */

.pto-input-panel,
.pto-results-panel {
    min-width: 0;
    padding: 30px;
}

.pto-input-panel {
    border-right: 1px solid #e3e8eb;
}

.pto-results-panel {
    background: #fbfcfc;
}

.pto-input-panel h3,
.pto-results-panel h3 {
    margin: 0 0 24px;

    font-size: 1.2rem;
}


/* ---------------------------------------------------------
   FIELDS
   --------------------------------------------------------- */

.pto-field {
    margin-bottom: 22px;
}

.pto-field label {
    display: block;

    margin-bottom: 8px;

    color: #26343d;

    font-weight: 600;
}

.pto-field input,
.pto-field select {
    width: 100%;
    min-height: 48px;

    padding: 10px 12px;

    background: #ffffff;
    color: #1f2933;

    border: 1px solid #bfcbd1;
    border-radius: 7px;

    font: inherit;
    font-size: 1rem;
}

.pto-field input:focus,
.pto-field select:focus {
    outline: 2px solid #337b98;
    outline-offset: 1px;

    border-color: #337b98;
}

.pto-field-note {
    margin: 8px 0 0;

    color: #69757e;

    font-size: 0.88rem;
    line-height: 1.5;
}


/* Prefix input */

.pto-input-with-prefix {
    display: grid;

    grid-template-columns:
        auto minmax(0, 1fr);
}

.pto-input-with-prefix span {
    display: flex;

    align-items: center;
    justify-content: center;

    min-width: 48px;

    padding: 0 12px;

    background: #f2f5f6;
    color: #45535c;

    border: 1px solid #bfcbd1;
    border-right: 0;
    border-radius: 7px 0 0 7px;

    font-weight: 600;
}

.pto-input-with-prefix input {
    min-width: 0;

    border-radius: 0 7px 7px 0;
}


/* Suffix input */

.pto-input-with-suffix {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) auto;
}

.pto-input-with-suffix input {
    min-width: 0;

    border-radius: 7px 0 0 7px;
}

.pto-input-with-suffix span {
    display: flex;


    align-items: center;
    justify-content: center;

    min-width: 66px;

    padding: 0 14px;

    background: #f2f5f6;
    color: #45535c;

    border: 1px solid #bfcbd1;
    border-left: 0;
    border-radius: 0 7px 7px 0;

    font-weight: 600;
}


/* Input + select */

.pto-input-with-select {
    display: grid;

    grid-template-columns:
        minmax(0, 1fr) 125px;
}

.pto-input-with-select input {
    min-width: 0;

    border-radius: 7px 0 0 7px;
}

.pto-input-with-select select {
    min-width: 0;

    border-left: 0;
    border-radius: 0 7px 7px 0;

    background: #f2f5f6;

    font-weight: 600;
}


/* ---------------------------------------------------------
   ERROR
   --------------------------------------------------------- */

.pto-error {
    margin: 0 0 20px;

    padding: 14px 16px;

    background: #fff7f7;
    color: #8a2929;

    border: 1px solid #c86464;
    border-radius: 7px;

    line-height: 1.5;
}

.pto-error strong {
    display: block;

    margin-bottom: 6px;
}

.pto-error ul {
    margin: 0;

    padding-left: 20px;
}

.pto-error li {
    margin: 4px 0;
}


/* ---------------------------------------------------------
   BUTTONS
   --------------------------------------------------------- */

.pto-actions {
    display: flex;

    gap: 12px;

    flex-wrap: wrap;
}

.pto-actions button {
    min-height: 46px;

    padding: 10px 22px;

    border-radius: 7px;

    font: inherit;
    font-weight: 600;

    cursor: pointer;
}

.pto-primary-button {
    background: #337b98;
    color: #ffffff;

    border: 1px solid #337b98;
}

.pto-primary-button:hover {
    background: #286982;
}

.pto-secondary-button {
    background: #ffffff;
    color: #34444e;

    border: 1px solid #b9c4ca;
}

.pto-secondary-button:hover {
    background: #f4f7f8;
}


/* ---------------------------------------------------------
   MAIN RESULT
   --------------------------------------------------------- */

.pto-main-result {
    margin-bottom: 22px;

    padding: 22px;

    background: #edf5f8;

    border-left: 4px solid #337b98;
    border-radius: 8px;
}

.pto-result-label {
    display: block;

    margin-bottom: 6px;

    color: #53616a;

    font-size: 0.94rem;
}

.pto-main-result strong {
    display: block;

    overflow-wrap: anywhere;

    color: #1f5368;

    font-size: clamp(1.8rem, 5vw, 2.5rem);
    line-height: 1.15;
}


/* ---------------------------------------------------------
   RESULT LIST
   --------------------------------------------------------- */

.pto-result-list {
    border-top: 1px solid #dce3e6;
}

.pto-result-row {
    display: flex;

    justify-content: space-between;
    align-items: baseline;

    gap: 20px;

    padding: 13px 0;

    border-bottom: 1px solid #dce3e6;
}

.pto-result-row span {
    color: #58656d;
}

.pto-result-row strong {
    text-align: right;

    overflow-wrap: anywhere;
}


/* ---------------------------------------------------------
   WORKED CALCULATION
   --------------------------------------------------------- */

.pto-worked {
    margin-top: 24px;

    padding: 18px;

    background: #ffffff;

    border: 1px solid #dce4e8;
    border-radius: 8px;
}

.pto-worked h4 {
    margin: 0 0 10px;
}

.pto-equation {
    margin: 0 0 8px;

    overflow-wrap: anywhere;

    color: #1f5368;

    font-weight: 700;
}

.pto-worked p:last-child {
    margin: 0;

    line-height: 1.6;
}


/* ---------------------------------------------------------
   RESULT NOTE
   --------------------------------------------------------- */

.pto-result-note {
    margin-top: 22px;

    padding: 17px 18px;

    background: #f4f8fa;

    border-left: 4px solid #337b98;
}

.pto-result-note strong {
    display: block;

    margin-bottom: 6px;
}

.pto-result-note p {
    margin: 0;

    color: #4f5c64;

    font-size: 0.92rem;
    line-height: 1.6;
}


/* ---------------------------------------------------------
   CONTENT
   --------------------------------------------------------- */

.pto-content-section {
    max-width: 880px;

    margin: 0 auto;

    padding: 36px 0;

    border-bottom: 1px solid #e3e8eb;
}

.pto-content-section h2 {
    margin: 0 0 18px;

    font-size: clamp(1.5rem, 3vw, 1.9rem);
    line-height: 1.25;
}

.pto-content-section h2::after {
    content: "";

    display: block;

    width: 110px;
    height: 3px;

    margin-top: 10px;

    background: #337b98;
}

.pto-content-section p {
    margin: 0 0 16px;

    color: #45525b;

    line-height: 1.75;
}


/* ---------------------------------------------------------
   FORMULA
   --------------------------------------------------------- */

.pto-formula-box {
    margin: 24px 0;

    padding: 24px;

    background: #f7fafb;

    border: 1px solid #d9e3e7;
    border-radius: 10px;
}

.pto-formula {
    margin: 0 0 20px !important;

    color: #1f5368 !important;

    font-size: 1.3rem;
    font-weight: 700;
}

.pto-formula-secondary {
    margin: 8px 0 20px !important;

    color: #26343d !important;

    font-size: 1.08rem;
    font-weight: 600;
}


/* ---------------------------------------------------------
   EXAMPLES
   --------------------------------------------------------- */

.pto-example {
    margin: 22px 0;

    padding: 22px;

    background: #fafcfc;

    border: 1px solid #dce3e6;
    border-radius: 10px;
}

.pto-example p {
    margin-bottom: 10px;
}

.pto-example-equation {
    margin: 18px 0 8px !important;

    color: #26343d !important;

    font-size: 1.2rem;
    font-weight: 600;
}

.pto-example-answer {
    color: #1f5368 !important;

    font-size: 1.3rem;
    font-weight: 700;
}


/* ---------------------------------------------------------
   INFORMATION BOX
   --------------------------------------------------------- */

.pto-info-box {
    margin: 22px 0;

    padding: 20px 22px;

    background: #f4f8fa;

    border-left: 4px solid #337b98;
}

.pto-info-box p:last-child {
    margin-bottom: 0;
}


/* ---------------------------------------------------------
   FAQ
   --------------------------------------------------------- */

.pto-faq {
    margin-top: 22px;
}

.pto-faq details {
    border-top: 1px solid #dce3e6;
}

.pto-faq details:last-child {
    border-bottom: 1px solid #dce3e6;
}

.pto-faq summary {
    padding: 17px 4px;

    color: #26343d;

    font-weight: 600;

    cursor: pointer;
}

.pto-faq details p {
    margin: 0;

    padding: 0 4px 17px;
}


/* =========================================================
   PTO PAYOUT CALCULATOR - MOBILE
   ========================================================= */

@media (max-width: 760px) {

    .pto-page {
        padding-bottom: 40px;
    }

    .pto-container {
        width: min(100% - 28px, 1120px);
    }

    .pto-intro {
        padding: 16px 0 22px;
    }

    .pto-calculator {
        margin-bottom: 38px;
    }

    .pto-calculator-header {
        padding: 20px;
    }

    .pto-calculator-grid {
        grid-template-columns: 1fr;
    }

    .pto-input-panel,
    .pto-results-panel {
        padding: 22px 20px;
    }

    .pto-input-panel {
        border-right: 0;

        border-bottom: 1px solid #e3e8eb;
    }

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

    .pto-actions button {
        width: 100%;
        min-height: 48px;
    }

    .pto-result-row {
        align-items: flex-start;
    }

    .pto-content-section {
        padding: 30px 0;
    }

    .pto-formula-box {
        padding: 20px;
    }

}


@media (max-width: 420px) {

    .pto-container {
        width: min(100% - 24px, 1120px);
    }

    .pto-input-with-select {
        grid-template-columns:
            minmax(0, 1fr) 105px;
    }

    .pto-result-row {
        display: block;
    }

    .pto-result-row strong {
        display: block;

        margin-top: 4px;

        text-align: left;
    }

}

/* =========================================================
   VACATION ACCRUAL CALCULATOR
   ========================================================= */

.vacation-accrual-page {
    width: 100%;
}

.vacation-accrual-container {
    width: min(1000px, calc(100% - 40px));
    margin: 0 auto;
    padding: 28px 0 60px;
}


/* Intro */

.vacation-accrual-intro {
    margin-bottom: 30px;
}

.vacation-accrual-intro h1 {
    margin: 0 0 12px;
    font-size: clamp(2rem, 5vw, 3rem);
    line-height: 1.1;
}

.vacation-accrual-intro p {
    max-width: 760px;
    margin: 0;
    color: #52616b;
    font-size: 1.05rem;
    line-height: 1.7;
}


/* Calculator */

.vacation-accrual-calculator {
    margin-bottom: 48px;
}

.vacation-accrual-calculator-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    gap: 24px;
    align-items: start;
}

.vacation-accrual-input-panel,
.vacation-accrual-result-panel {
    background: #ffffff;
    border: 1px solid #dce4e8;
    border-radius: 14px;
    padding: 26px;
    box-shadow: 0 5px 18px rgba(0, 0, 0, 0.05);
}

.vacation-accrual-input-panel h2,
.vacation-accrual-result-panel h2 {
    margin: 0 0 24px;
    font-size: 1.35rem;
}


/* Fields */

.vacation-field {
    margin-bottom: 20px;
}

.vacation-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: 650;
    color: #263740;
}

.vacation-field input,
.vacation-field select {
    width: 100%;
    min-height: 46px;
    padding: 10px 12px;
    border: 1px solid #bdcbd2;
    border-radius: 8px;
    background: #ffffff;
    color: #1e2e36;
    font: inherit;
    box-sizing: border-box;
}

.vacation-field input:focus,
.vacation-field select:focus {
    outline: 2px solid rgba(51, 123, 152, 0.18);
    border-color: #337b98;
}

.vacation-input-group {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 130px;
}

.vacation-input-group input {
    border-radius: 8px 0 0 8px;
}

.vacation-input-group select {
    border-left: 0;
    border-radius: 0 8px 8px 0;
}

.vacation-input-with-suffix {
    display: flex;
    align-items: stretch;
}

.vacation-input-with-suffix input {
    min-width: 0;
    flex: 1;
    border-radius: 8px 0 0 8px;
}

.vacation-input-with-suffix span {
    display: flex;
    align-items: center;
    padding: 0 13px;
    border: 1px solid #bdcbd2;
    border-left: 0;
    border-radius: 0 8px 8px 0;
    background: #f4f7f8;
    color: #52616b;
    white-space: nowrap;
}

.vacation-field-help {
    margin: 7px 0 0;
    color: #697982;
    font-size: 0.88rem;
    line-height: 1.5;
}


/* Subsection */

.vacation-subsection {
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid #e0e7ea;
}

.vacation-subsection h3 {
    margin: 0 0 18px;
    font-size: 1.08rem;
}


/* Buttons */

.vacation-buttons {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.vacation-primary-button,
.vacation-secondary-button {
    min-height: 46px;
    padding: 11px 18px;
    border-radius: 8px;
    font: inherit;
    font-weight: 650;
    cursor: pointer;
}

.vacation-primary-button {
    flex: 1;
    border: 1px solid #337b98;
    background: #337b98;
    color: #ffffff;
}

.vacation-primary-button:hover {
    background: #28667f;
}

.vacation-secondary-button {
    border: 1px solid #bdcbd2;
    background: #ffffff;
    color: #31444d;
}


/* Errors */

.vacation-errors {
    margin-top: 20px;
    padding: 15px 17px;
    border: 1px solid #d8a5a5;
    border-radius: 8px;
    background: #fff7f7;
    color: #7b2f2f;
    line-height: 1.5;
}

.vacation-errors ul {
    margin: 8px 0 0;
    padding-left: 20px;
}


/* Results */

.vacation-empty-state {
    color: #687881;
    line-height: 1.65;
}

.vacation-main-result {
    margin-bottom: 20px;
    padding: 22px;
    border: 1px solid #c7dbe3;
    border-radius: 10px;
    background: #f5fafc;
}

.vacation-main-result span,
.vacation-main-result strong,
.vacation-main-result small {
    display: block;
}

.vacation-main-result span {
    margin-bottom: 7px;
    color: #52616b;
    font-size: 0.92rem;
}

.vacation-main-result strong {
    color: #245f77;
    font-size: 2rem;
    line-height: 1.15;
}

.vacation-main-result small {
    margin-top: 6px;
    color: #61717a;
    font-size: 0.95rem;
}

.vacation-result-list {
    border-top: 1px solid #e0e7ea;
}

.vacation-result-list > div {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    padding: 13px 0;
    border-bottom: 1px solid #e0e7ea;
}

.vacation-result-list span {
    color: #5d6c74;
}

.vacation-result-list strong {
    text-align: right;
    color: #263740;
}

.vacation-result-list .vacation-available-row strong {
    color: #245f77;
}

.vacation-worked-calculation {
    margin-top: 22px;
    padding: 17px;
    border-radius: 9px;
    background: #f5f7f8;
}

.vacation-worked-calculation h3 {
    margin: 0 0 8px;
    font-size: 1rem;
}

.vacation-worked-calculation p {
    margin: 0;
    color: #4d5e67;
    line-height: 1.6;
}


/* Content */

.vacation-content-section {
    margin: 48px 0;
}

.vacation-content-section > h2 {
    margin: 0 0 18px;
    font-size: 1.65rem;
}

.vacation-content-section > h2::after {
    content: "";
    display: block;
    width: 170px;
    height: 3px;
    margin-top: 14px;
    background: #337b98;
}

.vacation-content-section > p {
    max-width: 820px;
    color: #52616b;
    line-height: 1.75;
}

.vacation-formula-card,
.vacation-example-card {
    margin: 18px 0;
    padding: 22px;
    border: 1px solid #dce4e8;
    border-radius: 10px;
    background: #ffffff;
}

.vacation-formula-card h3 {
    margin: 0 0 15px;
}

.vacation-formula-card p,
.vacation-example-card p {
    color: #52616b;
    line-height: 1.7;
}

.vacation-formula {
    margin: 12px 0;
    padding: 14px 16px;
    border-left: 4px solid #337b98;
    background: #f4f8fa;
    font-weight: 650;
    line-height: 1.55;
}

.vacation-example-calculation {
    margin: 15px 0;
    padding: 13px 15px;
    border-radius: 7px;
    background: #f4f7f8;
    font-weight: 650;
}


/* FAQ */

.vacation-faq-list {
    border-top: 1px solid #dce4e8;
}

.vacation-faq-list details {
    border-bottom: 1px solid #dce4e8;
}

.vacation-faq-list summary {
    padding: 17px 4px;
    font-weight: 650;
    cursor: pointer;
}

.vacation-faq-list details p {
    margin: 0;
    padding: 0 4px 18px;
    color: #52616b;
    line-height: 1.7;
}


/* Tablet / Mobile */

@media (max-width: 760px) {

    .vacation-accrual-container {
        width: min(100% - 28px, 1000px);
        padding-top: 20px;
    }

    .vacation-accrual-calculator-grid {
        grid-template-columns: 1fr;
    }

    .vacation-accrual-input-panel,
    .vacation-accrual-result-panel {
        padding: 20px;
    }

    .vacation-buttons {
        flex-direction: column;
    }

    .vacation-primary-button,
    .vacation-secondary-button {
        width: 100%;
    }

}


@media (max-width: 420px) {

    .vacation-accrual-container {
        width: calc(100% - 22px);
    }

    .vacation-accrual-input-panel,
    .vacation-accrual-result-panel {
        padding: 17px;
        border-radius: 10px;
    }

    .vacation-input-group {
        grid-template-columns: minmax(0, 1fr) 105px;
    }

    .vacation-main-result {
        padding: 18px;
    }

    .vacation-main-result strong {
        font-size: 1.7rem;
    }

    .vacation-result-list > div {
        display: block;
    }

    .vacation-result-list strong {
        display: block;
        margin-top: 4px;
        text-align: left;
    }

    .vacation-formula-card,
    .vacation-example-card {
        padding: 17px;
    }

}

/* =========================================================
   MAIN NAVIGATION - MOBILE CATEGORY VIEW
   Final responsive navigation overrides
   ========================================================= */

/* Desktop-only helpers stay hidden. */
.nav-categories-back,
.nav-categories-title {
    display: none;
}

.nav-category-links {
    display: block;
}

@media (max-width: 900px) {

    .header-inner {
        position: relative;
    }

    .main-nav {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 0;
        max-height: calc(100vh - 76px);
        max-height: calc(100dvh - 76px);
        overflow-y: auto;
        overscroll-behavior: contain;
        -webkit-overflow-scrolling: touch;
        padding: 8px 5% 12px;
        background: #ffffff;
        border-top: 1px solid var(--border);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 20px rgba(27, 44, 49, 0.08);
    }

    .main-nav.is-open {
        display: flex;
    }

    .main-nav > .nav-main-link {
        display: block;
        width: 100%;
        padding: 14px 4px;
        border-bottom: 1px solid var(--border);
        color: var(--text-soft);
        font-size: 16px;
        font-weight: 600;
    }

    .main-nav > .nav-dropdown {
        position: static;
        width: 100%;
        border-bottom: 1px solid var(--border);
    }

    .nav-dropdown-toggle {
        width: 100%;
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 14px 4px;
        color: var(--text-soft);
        font-size: 16px;
        font-weight: 600;
        text-align: left;
    }

    .nav-dropdown-arrow {
        transform: rotate(-90deg);
    }

    .nav-dropdown.is-open .nav-dropdown-arrow {
        transform: rotate(-90deg);
    }

    /* The category panel becomes a separate mobile view. */
    .nav-dropdown-menu {
        display: none;
        position: static;
        width: 100%;
        padding: 0;
        background: #ffffff;
        border: 0;
        border-radius: 0;
        box-shadow: none;
    }

    .main-nav.categories-view {
        padding-top: 0;
    }

    .main-nav.categories-view > .nav-main-link,
    .main-nav.categories-view > .nav-dropdown > .nav-dropdown-toggle {
        display: none;
    }

    .main-nav.categories-view > .nav-dropdown {
        border-bottom: 0;
    }

    .main-nav.categories-view .nav-dropdown-menu {
        display: block;
    }

    .nav-categories-back {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        min-height: 48px;
        margin: 0;
        padding: 12px 4px;
        background: transparent;
        color: var(--primary);
        border: 0;
        border-bottom: 1px solid var(--border);
        font: inherit;
        font-size: 15px;
        font-weight: 700;
        text-align: left;
        cursor: pointer;
    }

    .nav-categories-title {
        display: block;
        padding: 18px 4px 10px;
        color: var(--text);
        font-size: 20px;
        font-weight: 750;
        line-height: 1.25;
    }

    .nav-category-links {
        display: block;
        padding-bottom: 8px;
    }

    .nav-category-links a,
    .nav-dropdown-menu .nav-category-links a {
        display: block;
        min-height: 44px;
        padding: 10px 4px;
        background: transparent;
        color: var(--text-soft);
        border: 0;
        border-bottom: 1px solid #edf1ef;
        border-radius: 0;
        font-size: 16px;
        font-weight: 500;
        line-height: 1.45;
    }

    .nav-category-links a:last-child {
        border-bottom: 0;
    }

    .nav-category-links a:hover,
    .nav-category-links a:focus-visible {
        background: var(--surface-soft);
        color: var(--primary);
    }
}

@media (max-width: 600px) {
    .main-nav {
        max-height: calc(100vh - 68px);
        max-height: calc(100dvh - 68px);
    }
}

/* =========================================================
   FOOTER EXPLORE LINKS - TWO COLUMNS ON DESKTOP
   ========================================================= */

.footer-explore-links {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: 28px;
    row-gap: 0;
}

.footer-explore-links a {
    margin: 7px 0;
}

@media (max-width: 600px) {
    .footer-explore-links {
        grid-template-columns: 1fr;
    }
}
