* {
    outline: 0;
    box-sizing: border-box;
    font-family: "DM Sans", sans-serif;
}

body {
    margin: 0;
    padding: 0;
    background-color: #fffdd9;
    font-family: "DM Sans", sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
}

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

body.nav-drawer-open {
    overflow: hidden;
}

p,
b,
strong,
span {
    margin: 5px 0;
    padding: 0;
    font-family: "DM Sans", sans-serif;
}

a {
    color: #009436;
    padding: 0;
    font-family: "DM Sans", sans-serif;
    overflow-wrap: anywhere;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    margin: 10px 0;
    padding: 0;
    font-family: "Stack Sans Text", sans-serif;
}

.text-heading {
    font-family: "Stack Sans Text", sans-serif;
}

.text-badge {
    background: #e1da52;
    color: #3d3d03;
}

h1 {
    font-size: 2.5em;
}

h2 {
    font-size: 2em;
}

h3 {
    font-size: 1.75em;
}

h4 {
    font-size: 1.5em;
}

h5 {
    font-size: 1.25em;
}

h6 {
    font-size: 1em;
}

main {
    width: min(1200px, calc(100% - 2rem));
    margin: 0 auto;
}

header {
    background-color: #009436;
    min-height: 68px;
    padding: 0;
    margin: 0;
    z-index: 99999 !important;
}

header main * {
    color: #fff;
}

nav li a {
    font-weight: 500;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-decoration: none;
}

nav li {
    padding: 9px 12px;
    text-align: center;
}

img,
svg,
iframe {
    max-width: 100%;
}

button,
input,
select,
textarea {
    max-width: 100%;
}

nav li:hover {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

header nav li a {
    color: #fff;
}

header nav li a svg,
header nav li a i {
    color: #fff;
    stroke: #fff;
}

.homearea {
    background-color: #009436;
}

.btn {
    background-color: #009436;
}

footer {
    background-color: #009436;
    margin-top: 50px;
}

footer main * {
    color: #fff;
}

label {
    font-weight: 600;
    display: block;
    margin-bottom: 7px;
}

input,
select,
textarea {
    background: #fffdd9;
    font-family: "DM Sans", sans-serif;
    font-size: 16px;
}

.result-answer {
    background-color: #fffdd9 !important;
}

.result-answer ul {
    display: block;
    padding: 0;
    margin-bottom: 3px;
}

.result-answer ul li {
    font-size: 15px;
    padding: 3px 0;
}

.result-answer p {
    font-size: 17px;
    margin: 15px 0 5px;
    text-decoration: underline;
}

.result-answer b {
    font-weight: 700;
}

.cat-desc {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.search-result {
    z-index: 1000;
    position: absolute;
}

.hero-search-row {
    display: flex;
    align-items: center;
}

.hero-search-wrap {
    position: relative;
    width: min(100%, 40rem);
    max-width: 100%;
}

.hero-search-input {
    width: 100% !important;
}

.hero-search-results {
    width: 100% !important;
    left: 0;
    right: auto;
}

.sresult:hover {
    background: #fffdd9;
    cursor: pointer;
}

.spin {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

#loadingIcon {
    display: none;
}

#hide {
    display: none;
}

#show {
    display: block;
}

.sharearea img {
    width: 32px;
    height: 32px;
    cursor: pointer;
    border-radius: 100px;
}

.sharebtn {
    min-height: 39px;
    min-width: 39px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.site-header-inner {
    min-height: 68px;
    gap: 0.75rem;
    position: relative;
    flex-wrap: nowrap;
    align-items: center;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
}

.site-brand {
    flex: 1 1 auto;
    min-width: 0;
    max-width: calc(100% - 3.5rem);
    line-height: 1.05;
    display: block;
    overflow-wrap: normal;
    word-break: keep-all;
    white-space: nowrap;
    text-overflow: ellipsis;
    overflow: hidden;
}

.mobile-nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid rgba(255, 255, 255, 0.5);
    border-radius: 8px;
    color: #fff;
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
    line-height: 1;
    flex: 0 0 auto;
    margin-left: auto;
}

.mobile-nav-toggle-box {
    display: flex;
    flex-direction: column;
    gap: 0;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 18px;
}

.mobile-nav-toggle-line {
    width: 24px;
    height: 2px;
    margin: 2px !important;
    background: #ffffff;
    display: block;
    flex-shrink: 0;
    border-radius: 2px;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.site-nav {
    display: none;
    width: min(20rem, calc(100vw - 2rem));
    max-width: 100%;
}

.site-nav.is-open {
    display: block;
}

.site-nav-drawer-header {
    display: none;
}

.site-nav-drawer-title {
    margin: 0;
    font-family: "Stack Sans Text", sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
}

.site-nav-close {
    display: none;
}

.site-nav-backdrop {
    display: none;
}

.site-nav-list {
    align-items: center;
}

.site-footer-links {
    flex-wrap: wrap;
    justify-content: center;
}

.main-layout {
    width: 100% !important;
    min-width: 0;
}

.page-shell,
.page-content,
.page-panel,
.page-sidebar,
.page-hero-copy,
.calculator-hero-actions,
.calculator-card-grid,
.home-card-grid,
.home-category-grid,
.hero-search-wrap {
    min-width: 0;
}

.sidebar {
    width: 100% !important;
    position: static !important;
    top: auto !important;
}

.calculator-box {
    display: flex;
    flex-direction: column;
    min-width: 0;
    height: 100%;
    overflow: hidden;
}

.calculator-box .btn {
    margin-top: auto;
    width: 100%;
}

.calculator-box p,
.calculator-box a {
    overflow-wrap: anywhere;
    word-break: break-word;
}

.card-meta-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
    margin-top: 0.25rem;
}

.card-meta-row p {
    margin: 0;
    max-width: 100%;
}

.homearea h1,
.page-panel h1,
.calculator-box .text-heading {
    overflow-wrap: anywhere;
}

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

.page-panel,
.page-sidebar,
.page-content,
.calculator-area,
.homearea,
.site-nav,
.site-footer-links,
.hero-search-wrap,
.home-card-grid,
.home-category-grid {
    overflow-x: hidden;
}

.page-hero-copy {
    width: 100% !important;
    max-width: 48rem;
    display: block;
    overflow: visible;
    white-space: normal;
    word-break: normal;
    text-wrap: pretty;
}

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

.calculator-hero-actions {
    flex-wrap: wrap;
    align-items: center;
}

.calculator-hero-actions > * {
    min-width: 0;
}

.sharearea {
    flex-wrap: wrap;
    max-width: 100%;
}

.btn {
    max-width: 100%;
}

.btn.inline-flex,
.page-panel .inline-flex.items-center,
.page-panel .inline-flex.items-center i,
.page-panel a.inline-flex,
.page-panel button.inline-flex {
    max-width: 100%;
}

.page-panel ul,
.page-panel ol {
    overflow-wrap: anywhere;
}

.page-panel .list-inside {
    padding-left: 1rem;
}

.page-panel .list-inside li {
    padding-left: 0.25rem;
}

.result-answer,
.outputarea,
.calculator-area {
    overflow-x: auto;
}

.result-answer * {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.result-answer table {
    display: block;
    width: max-content;
    max-width: 100%;
    overflow-x: auto;
    border-collapse: collapse;
}

.result-answer pre {
    white-space: pre-wrap;
    word-break: break-word;
}

.inputarea form .flex.items-center.gap-2 {
    flex-wrap: wrap;
}

.inputarea form .flex.items-center.gap-2 input {
    flex: 1 1 9rem;
    min-width: 0;
}

@media (max-width: 1023px) {
    header {
        min-height: 0;
    }

    .site-header-inner {
        flex-wrap: nowrap;
    }

    .site-nav {
        display: block;
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: auto;
        background: #ffffff;
        border-radius: 1.25rem 0 0 1.25rem;
        padding: 1rem;
        box-shadow: -24px 0 60px rgba(15, 23, 42, 0.22);
        transform: translateX(110%);
        transition: transform 0.22s ease, visibility 0.22s ease;
        visibility: hidden;
        overflow-y: auto;
        z-index: 100001;
    }

    .site-nav.is-open {
        transform: translateX(0);
        visibility: visible;
    }

    .site-nav-drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 1rem;
        padding-bottom: 0.75rem;
        margin-bottom: 0.75rem;
        border-bottom: 1px solid #e5e7eb;
    }

    .site-nav-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        width: 2.4rem;
        height: 2.4rem;
        border: 1px solid #d1d5db;
        border-radius: 0.75rem;
        background: #f8fafc;
        color: #0f172a;
        position: relative;
        flex: 0 0 auto;
    }

    .site-nav-close-line {
        position: absolute;
        width: 15px;
        height: 2px;
        border-radius: 2px;
        background: #334155;
        top: 50%;
        left: 50%;
        margin-top: -1px;
        margin-left: -7.5px;
    }

    .site-nav-close-line:first-child {
        transform: rotate(45deg);
    }

    .site-nav-close-line:last-child {
        transform: rotate(-45deg);
    }

    .site-nav-backdrop {
        display: block;
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.4);
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.22s ease, visibility 0.22s ease;
        border: 0;
        padding: 0;
        z-index: 100000;
    }

    .site-nav-backdrop.is-open {
        opacity: 1;
        visibility: visible;
    }

    .site-nav-list {
        flex-direction: column;
        align-items: stretch;
        gap: 0.35rem;
    }

    nav li {
        padding: 0;
    }

    nav li a {
        flex-direction: row;
        justify-content: flex-start;
        gap: 0.65rem;
        padding: 0.8rem 1rem;
        border-radius: 0.75rem;
        color: #1a202c !important;
        background: #f1f5f9;
        font-weight: 600;
        font-size: 0.95rem;
        text-decoration: none;
    }

    nav li a:hover {
        background: #e2e8f0;
        color: #009436 !important;
    }

    nav li a svg,
    nav li a i {
        color: #009436 !important;
        stroke: #009436 !important;
        width: 1rem;
        height: 1rem;
        flex-shrink: 0;
    }

    .sidebar {
        margin-top: 1.5rem;
    }

    .page-panel,
    .calculator-area {
        margin-top: 1rem !important;
        padding: 1.25rem !important;
    }

    .hero-search-row {
        flex-wrap: wrap;
        align-items: stretch;
        gap: 0.75rem;
    }

    .hero-search-wrap {
        width: 100%;
    }

    .homearea .flex.items-center.gap-4 {
        flex-wrap: wrap;
    }
}

@media (max-width: 767px) {
    main {
        width: min(100%, calc(100% - 1rem));
    }

    h1 {
        font-size: 2rem;
        line-height: 1.1;
    }

    h2 {
        font-size: 1.65rem;
        line-height: 1.2;
    }

    h3 {
        font-size: 1.35rem;
        line-height: 1.25;
    }

    .text-6xl {
        font-size: 2.25rem !important;
        line-height: 1.1 !important;
    }

    .homearea {
        padding-top: 0.75rem;
        padding-bottom: 1.25rem;
    }

    .homearea h1 {
        font-size: 1.9rem !important;
        line-height: 1.08;
    }

    .site-brand {
        max-width: calc(100% - 3rem);
        font-size: 1.35rem !important;
        line-height: 1.05;
        letter-spacing: -0.01em;
    }

    .mobile-nav-toggle {
        width: 2.25rem;
        height: 2.25rem;
    }

    .mobile-nav-toggle-line {
        width: 24px;
        margin: 2px !important;
    }

    .hero-search-results {
        position: static;
        width: 100% !important;
        margin-top: 0.75rem;
    }

    .page-hero-copy {
        max-width: 100%;
        font-size: 1rem !important;
        line-height: 1.55;
    }

    .calculator-card-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .home-card-grid,
    .home-category-grid {
        grid-template-columns: minmax(0, 1fr) !important;
    }

    .page-shell {
        gap: 1rem;
    }

    .page-panel {
        padding: 1rem !important;
        border-radius: 1rem;
    }

    .page-panel .inline-flex.items-center {
        flex-wrap: wrap;
    }

    .page-panel .btn,
    .page-panel a.btn {
        width: 100%;
    }

    .calculator-hero-actions .sharearea {
        width: 100%;
        justify-content: flex-start;
    }

    footer {
        margin-top: 32px;
    }

    .site-footer-copy {
        font-size: 1rem;
    }
}

@media (min-width: 1024px) {
    .site-header-inner {
        flex-wrap: nowrap;
    }

    .site-brand {
        max-width: none;
        overflow-wrap: normal;
        word-break: normal;
        white-space: nowrap;
        overflow: visible;
    }

    .mobile-nav-toggle {
        display: none;
    }

    .site-nav {
        display: block !important;
        position: static;
        width: auto;
        background: transparent;
        padding: 0;
        box-shadow: none;
    }

    .site-nav-list {
        flex-direction: row;
    }

    .sidebar {
        width: 20rem !important;
        flex: 0 0 20rem;
        position: sticky !important;
        top: 5rem !important;
    }
}
