@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@400;600;700&family=Source+Sans+3:ital,wght@0,300;0,400;0,600;1,400&display=swap');

:root {
    /* Palette - Alps.ml Port */
    --color-primary: #e14d2a;       /* Orange/Red Action */
    --color-primary-hover: #c93e1e;
    --color-theme: #3e6d9c;         /* Medium Blue Border */
    --color-accent: #001253;        /* Navy Blue Headers */
    --color-text: #1c1b1d;          /* Off-black Body */
    --color-text-muted: #555555;

    /* Backgrounds */
    --color-bg: #ffffff;            /* Main Page White */
    --color-card-bg: #f9f9f9;       /* Content Areas Off-White */

    /* Borders */
    --color-border-light: #e0e0e0;  /* Subtle borders */

    /* Typography */
    --font-header: 'Poppins', sans-serif;
    --font-body: 'Source Sans 3', sans-serif;

    /* Spacing & Sizing */
    --spacing-unit: 1rem;
    --border-width: 18px;
    --radius-sm: 4px;
    --radius-md: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.04);
}

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

body {
    margin: 0;
    padding: 2rem;
    min-height: 100vh;
    font-family: var(--font-body);
    background-color: var(--color-bg);
    color: var(--color-text);
    border: var(--border-width) solid var(--color-theme);
    line-height: 1.6;

    /* Subtle geometric pattern for depth */
    background-image: radial-gradient(rgba(62, 109, 156, 0.08) 1.5px, transparent 1.5px);
    background-size: 24px 24px;
    background-attachment: fixed;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-header);
    margin-top: 0;
    line-height: 1.2;
    font-weight: 700;
}

h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    letter-spacing: -0.03em;
}

/* Breadcrumb Link */
.breadcrumb-link {
    color: var(--color-text-muted);
    opacity: 0.7;
    font-weight: 400;
    text-decoration: none;
    transition: all 0.2s ease;
}
.breadcrumb-link:hover {
    color: var(--color-primary);
    opacity: 1;
    text-decoration: none;
}

h2 {
    font-size: 1.5rem;
    border-bottom: 3px solid var(--color-primary);
    padding-bottom: 0.5rem;
    display: inline-block;
    margin-bottom: 1.5rem;
}

h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

p {
    margin-bottom: 1rem;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: all 0.2s ease;
}
a:hover { color: var(--color-primary-hover); text-decoration: underline; }

/* Layout Containers */
.main-container {
    max-width: 1100px; /* Slightly tighter for readability */
    margin: 0 auto;
}

/* Base Card */
.card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.card:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
}

/* Clickable Card (Link Wrapper) */
a.card-link {
    display: block;
    background: var(--color-card-bg);
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-md);
    padding: 2rem;
    margin-bottom: 0;
    box-shadow: var(--shadow-md);
    color: inherit;
    text-decoration: none;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
a.card-link:hover {
    box-shadow: var(--shadow-lg);
    border-color: var(--color-primary);
    text-decoration: none;
}
a.card-link h3 {
    color: var(--color-primary);
}
a.card-link p {
    color: var(--color-text);
}

/* Tool Columns Layout */
.tool-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    align-items: start;
}

/* Inputs & Buttons */
input, select, textarea, button {
    font-family: var(--font-body);
    font-size: 0.95rem;
}

input[type="text"], input[type="number"], select {
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--color-border-light);
    border-radius: var(--radius-sm);
    background: #ffffff; /* Inputs stay white for contrast against off-white card */
    color: var(--color-text);
    transition: all 0.2s ease;
    width: 100%;
}

/* Input with Datalist Arrow Hint */
input[list] {
    padding-right: 2rem;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="12" viewBox="0 0 24 24" fill="none" stroke="%23999" stroke-width="3" stroke-linecap="round" stroke-linejoin="round"><polyline points="6 9 12 15 18 9"></polyline></svg>');
    background-repeat: no-repeat;
    background-position: right 0.75rem center;
    background-size: 12px;
}

input:focus, select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px rgba(225, 77, 42, 0.15);
}

/* Readonly Input styling */
input[readonly] {
    background-color: #eef2f6; /* Explicit readonly color */
    border-color: transparent;
    color: var(--color-text-muted);
    cursor: default;
}

/* Tool Grid for Index */
.tool-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
    list-style: none;
    padding: 0;
}

/* Compact Input Stack */
.input-stack {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}
.input-row {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}
.input-row label {
    flex: 0 0 140px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--color-text); /* Darker label for better contrast */
}
.input-row input { flex: 1; }
.input-row select { width: auto; min-width: 80px; flex: 0 0 auto; }

/* Mobile */
@media (max-width: 768px) {
    .tool-columns { grid-template-columns: 1fr; }
    .input-row { flex-direction: column; align-items: stretch; gap: 0.25rem; }
    .input-row label { margin-bottom: 0.25rem; }
    .input-row select { width: 100%; }
    body { border-width: 8px; padding: 1rem; }
    h1 { font-size: 1.8rem; }
}
