/* ==========================
   Sys-Metrics Global CSS
   ========================== */

/* Base Reset */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: "Onest", sans-serif;
    background: #fafafa;
    color: #111;
    line-height: 1.5;
}

/* Header */
header {
    padding: 20px 16px;
    text-align: center;
}

.tagline {
    font-size: 0.85rem;
    color: #555;
    margin-bottom: 6px;
}

h1, h2, h3 {
    font-weight: 600;
}

h1 {
    font-size: clamp(1.6rem, 2.5vw, 2.2rem);
}

h2 {
    font-size: clamp(1.3rem, 2vw, 1.8rem);
    margin-top: 30px;
    margin-bottom: 16px;
}

h3 {
    font-size: 1.1rem;
    margin-top: 20px;
    margin-bottom: 10px;
}

/* Container */
.container {
    max-width: 1100px;
    padding: 20px 16px;
    margin: auto;
}

/* Form Elements */
form {
    margin-top: 20px;
}

label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

input[type="number"],
input[type="text"],
select {
    width: 100%;
    padding: 10px;
    margin-top: 4px;
    margin-bottom: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 1rem;
}

button {
    background-color: #0066cc;
    color: #fff;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1rem;
    transition: background-color 0.2s ease;
}

button:hover {
    background-color: #004a99;
}

/* Calculator Grid (on index) */
.calculator-grid {
    display: grid;
    gap: 16px;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    margin-bottom: 30px;
}

.calc-card {
    background: #fff;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    transition: box-shadow 0.2s;
    text-align: center;
}

.calc-card:hover {
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
}

.calc-card a {
    text-decoration: none;
    color: #222;
    font-weight: 600;
}

/* Results and Explanation Boxes */
.result-box, .explanation-box {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 20px;
    margin-top: 20px;
}

.result-box p {
    font-size: 1.1rem;
    font-weight: 600;
}

.explanation-box ul {
    padding-left: 20px;
}

.explanation-box li {
    margin-bottom: 6px;
}

/* Tables (for calculators that use tables) */
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table th,
table td {
    border: 1px solid #ddd;
    padding: 12px;
    text-align: center;
}

table th {
    background-color: #f2f2f2;
    font-weight: 600;
}

/* Social Links */
.social {
    margin: 25px 0;
    text-align: center;
}

.social a {
    margin: 0 10px;
    color: #444;
    font-weight: 600;
    text-decoration: none;
}

.social a:hover {
    text-decoration: underline;
}

/* Footer */
footer {
    margin-top: 40px;
    padding: 30px 16px;
    text-align: center;
    font-size: 0.9rem;
    color: #555;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-20 { margin-top: 20px; }
.mb-20 { margin-bottom: 20px; }

/* Responsive */
@media (max-width: 600px) {
    input[type="number"], input[type="text"], select, button {
        font-size: 0.95rem;
    }

    .calc-card {
        padding: 16px;
    }
}
