/* Normalize all calculator guide text, then increase the common 14px baseline by 25%. */
.calculator-guide,
.calculator-guide * {
    font-size: 17.5px !important;
}

.calculator-guide {
    line-height: 1.7;
}

/* Align explanatory paragraphs and list copy consistently across calculator pages. */
.calculator-guide p,
.calculator-guide li {
    text-align: justify;
    text-justify: inter-word;
}

.text-sm {
    line-height: 1.60rem;
}

/* Add extra breathing room only to the calorie activity factor descriptions. */
.activity-levels > li {
    line-height: 1.9;
}

/* Keep wrapped formula descriptions and equations from running together. */
.formula-details p,
.formula-details li {
    line-height: 1.5;
}

.calculator-tool {
    font-size: 20px !important;
}

/* Make calculator controls comfortable to tap on phones. */
.calculator-tool button,
.calculator-tool input:not([type="hidden"]):not([type="radio"]):not([type="checkbox"]),
.calculator-tool select {
    min-height: 44px;
    touch-action: manipulation;
}

.calculator-tool input[type="radio"],
.calculator-tool input[type="checkbox"] {
    min-width: 20px;
    min-height: 20px;
    cursor: pointer;
}

.calculator-tool .text-xs { font-size: 15px !important; }
.calculator-tool .text-sm { font-size: 17.5px !important; }
.calculator-tool .text-base { font-size: 20px !important; }
.calculator-tool .text-lg { font-size: 22.5px !important; }
.calculator-tool .text-xl { font-size: 25px !important; }
.calculator-tool .text-2xl { font-size: 30px !important; }
.calculator-tool .text-3xl { font-size: 37.5px !important; }
.calculator-tool .calc-font-11 { font-size: 13.75px !important; }

/* Keep only the interactive calculator visible inside the embeddable view. */
body.embed-mode {
    min-height: 0;
}

.embed-calculator-heading {
    padding: 0.5rem 1rem 0;
    color: #e2e8f0;
    font-size: 1.125rem;
    font-weight: 700;
    text-align: center;
}

body.embed-mode #embed-calculator-shell {
    padding: 0.75rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
}

body.embed-mode #embed-calculator-shell > div {
    max-width: 100%;
    padding-right: 0.75rem;
    padding-left: 0.75rem;
}

body.embed-mode .calculator-tool {
    max-width: 100%;
}

body.embed-mode .calculator-guide {
    display: none !important;
}

.embed-powered-by {
    padding: 0.25rem 1rem 0.75rem;
    color: #94a3b8;
    font-size: 0.875rem;
    text-align: center;
}

.embed-powered-by a {
    color: #67e8f9;
    font-weight: 700;
    text-decoration: underline;
}

/* Preserve the guide size set above inside the calculator's outer wrapper. */
.calculator-tool .calculator-guide,
.calculator-tool .calculator-guide * {
    font-size: 14.5px !important;
}

.bmi-chart {
    max-height: 340px;
}

/* Light palette for all calculator pages and the embedded calculator view. */
body {
    background: #f8fafc !important;
    color: #1e293b !important;
}

body [class*="bg-slate-950"],
body [class*="bg-slate-900"],
body [class*="bg-slate-800"],
body [class*="bg-slate-700"] {
    background-color: #fff !important;
}

body [class*="bg-[#090d16]"],
body [class*="from-[#090d16]"],
body [class*="from-purple-950"] {
    --tw-gradient-from: #f1f5f9 var(--tw-gradient-from-position) !important;
    background-color: #f1f5f9 !important;
}

body [class*="text-white"],
body [class*="text-slate-100"],
body [class*="text-slate-200"],
body [class*="text-slate-300"],
body [class*="text-pink-"],
body [class*="text-purple-"],
body [class*="text-cyan-"],
body [class*="text-indigo-"],
body [class*="text-rose-"],
body [class*="text-emerald-"],
body [class*="text-green-"],
body [class*="text-amber-"],
body [class*="text-yellow-"],
body [class*="text-blue-"],
body [class*="text-red-"] {
    color: #334155 !important;
}

body [class*="text-slate-400"],
body [class*="text-slate-500"] {
    color: #64748b !important;
}

body [class*="border-purple-"],
body [class*="border-cyan-500"],
body [class*="border-indigo-500"] {
    border-color: #cbd5e1 !important;
}

body input,
body select,
body textarea {
    color: #1e293b;
    background-color: #fff;
}

body input::placeholder,
body textarea::placeholder {
    color: #94a3b8;
}

body a:not([class*="bg-"]) {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border: 1px solid #ddd6fe;
    border-radius: 0.5rem;
    background: #f5f3ff;
    color: #5b21b6;
    font-weight: 600;
    text-decoration: none;
    transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease;
}

/* Utility-styled anchors (such as the site logo) keep their layout but still
   get the same clear clickable boundary and pointer affordance. */
body a {
    border-color: #ddd6fe;
    cursor: pointer;
}

body a:not([class*="bg-"]):hover {
    border-color: #4c1d95;
    background: #ede9fe;
    color: #4c1d95;
}

body a:hover {
    border-color: #a78bfa;
}

/* Footer navigation uses plain text-link styling instead of button styling. */
body footer a,
body footer a:not([class*="bg-"]) {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #5b21b6;
    font-weight: 600;
    text-decoration: none;
}

body footer a:hover,
body footer a:not([class*="bg-"]):hover {
    border: 0;
    background: transparent;
    color: #4c1d95;
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* Header navigation is text-link navigation; retain the logo's own styling. */
body header nav a,
body header nav a:not([class*="bg-"]) {
    display: inline;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
    color: #475569;
    font-weight: 600;
    text-decoration: none;
}

body header nav a:hover,
body header nav a:not([class*="bg-"]):hover {
    border: 0;
    background: transparent;
    color: #5b21b6;
    text-decoration: underline;
    text-underline-offset: 3px;
}

body a:focus-visible,
body button:focus-visible,
body input[type="button"]:focus-visible,
body input[type="submit"]:focus-visible {
    outline: 3px solid #8b5cf6;
    outline-offset: 3px;
}

body button,
body input[type="button"],
body input[type="submit"],
body label[for] {
    cursor: pointer;
}

body.embed-mode .embed-calculator-heading {
    color: #1e293b;
}


/* Smaller calculator links on the homepage. */
.home-page main a.text-sm {
    font-size: 0.775rem !important;
}
