:root {
    --bg-base: #1c1f24;
    --bg-surface: #262a33;
    --bg-surface-hover: #2e333d;
    --text-main: #e5e7eb;
    --text-muted: #9ca3af;
    --accent: #14b8a6;
    --accent-hover: #0f8f81;
    --border: #374151;
    --font-stack: "Trebuchet MS", "Segoe UI", sans-serif;
    --radius: 4px;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;
}

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

body {
    margin: 0;
    font-family: var(--font-stack);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.8;
    font-size: 1rem;
    overflow-wrap: anywhere;
    hyphens: auto;
}

h1, h2, h3, h4, h5, h6 {
    margin: 0 0 var(--space-md) 0;
    line-height: 1.3;
    font-weight: 700;
    color: var(--text-main);
}

h1 { font-size: 2.5rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.5rem; }

a {
    color: var(--accent);
    text-decoration: none;
    transition: color 0.2s ease, text-decoration 0.2s ease;
}

a:hover, a:focus-visible {
    color: var(--accent-hover);
    text-decoration: underline;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
    border-radius: var(--radius);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.narrow-container {
    max-width: 72ch;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* Header */
.site-header {
    padding: var(--space-lg) 0;
    background-color: var(--bg-base);
    border-bottom: 1px solid var(--border);
    text-align: center;
    position: relative;
}

.brand-logo {
    display: inline-block;
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    color: var(--text-main);
    margin-bottom: var(--space-md);
    text-transform: uppercase;
}

.brand-logo:hover {
    text-decoration: none;
    color: var(--text-main);
}

.main-nav {
    display: flex;
    justify-content: center;
    gap: var(--space-lg);
    flex-wrap: wrap;
}

.main-nav a {
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    font-size: 0.875rem;
}

.main-nav a:hover,
.main-nav a[aria-current="page"] {
    color: var(--accent);
    text-decoration: none;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-main);
    font-size: 1.5rem;
    cursor: pointer;
    position: absolute;
    top: var(--space-lg);
    right: var(--space-lg);
}

/* Buttons */
.btn, button {
    display: inline-block;
    font-family: var(--font-stack);
    background: transparent;
    color: var(--accent);
    border: 2px solid var(--accent);
    padding: 0.75rem 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    border-radius: 0; /* Square ends as requested */
    transition: all 0.2s ease;
    text-align: center;
}

.btn:hover, button:hover:not(:disabled) {
    background: var(--accent);
    color: var(--bg-base);
    text-decoration: none;
}

button:disabled {
    border-color: var(--border);
    color: var(--text-muted);
    cursor: not-allowed;
}

/* Hero */
.hero {
    position: relative;
    margin-bottom: var(--space-xl);
    border-radius: var(--radius);
    overflow: hidden;
}

.hero-img-wrap {
    width: 100%;
    height: 60vh;
    min-height: 400px;
    background-color: var(--bg-surface);
}

.hero-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 0;
}

.hero-floating-card {
    position: absolute;
    bottom: var(--space-xl);
    left: var(--space-xl);
    background: var(--bg-surface);
    padding: var(--space-lg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 450px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.hero-floating-card h1 {
    margin-bottom: var(--space-sm);
    font-size: 2rem;
}

.stat-list {
    list-style: none;
    padding: 0;
    margin: var(--space-md) 0 0 0;
    border-top: 1px solid var(--border);
}

.stat-list li {
    padding: var(--space-sm) 0;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    font-size: 0.875rem;
}

.stat-list li span:last-child {
    color: var(--accent);
    font-weight: 700;
}

/* Sections */
.section {
    padding: var(--space-xl) 0;
    border-bottom: 1px solid var(--border);
}

.section:last-of-type {
    border-bottom: none;
}

/* Grids */
.grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-lg);
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
    display: flex;
    flex-direction: column;
}

.card-img-wrap {
    position: relative;
    height: 200px;
}

.card-img-wrap img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-bottom-left-radius: 0;
    border-bottom-right-radius: 0;
}

.card-badge {
    position: absolute;
    bottom: 0;
    left: var(--space-md);
    transform: translateY(50%);
    background: var(--accent);
    color: var(--bg-base);
    padding: 0.25rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 2px;
}

.card-content {
    padding: var(--space-lg) var(--space-md) var(--space-md);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.card-content h3 {
    margin-bottom: var(--space-sm);
    font-size: 1.25rem;
}

.card-content p {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: var(--space-md);
    flex: 1;
}

/* Stat Strip */
.stat-strip {
    background: var(--bg-surface);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
    display: flex;
    gap: var(--space-xl);
    flex-wrap: wrap;
    justify-content: center;
}

.stat-strip-item {
    text-align: center;
}

.stat-strip-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.1em;
}

.stat-strip-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
}

.stat-strip-teal {
    background: var(--accent);
    border-color: var(--accent);
}

.stat-strip-teal .stat-strip-label,
.stat-strip-teal .stat-strip-value {
    color: var(--bg-base);
}

/* Tabbed Panels / Analyzer */
.analyzer-panel {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
}

.analyzer-tabs {
    display: flex;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}

.analyzer-tab {
    flex: 1;
    border: none;
    border-right: 1px solid var(--border);
    padding: var(--space-md);
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
    min-width: max-content;
}

.analyzer-tab:last-child {
    border-right: none;
}

.analyzer-tab:hover {
    background: var(--bg-surface-hover);
    color: var(--text-main);
}

.analyzer-tab.active {
    background: var(--bg-base);
    color: var(--accent);
    border-bottom: 2px solid var(--accent);
}

.analyzer-content {
    display: none;
    padding: var(--space-lg);
}

.analyzer-content.active {
    display: block;
}

.analyzer-data {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: var(--space-md);
    margin-top: var(--space-md);
    background: var(--bg-base);
    padding: var(--space-md);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.analyzer-data div {
    text-align: center;
}

.analyzer-data span {
    display: block;
}

.analyzer-data .data-val {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--accent);
}

/* Forms */
.form-group {
    margin-bottom: var(--space-md);
}

.form-label {
    display: block;
    margin-bottom: var(--space-sm);
    font-weight: 600;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-control {
    width: 100%;
    padding: 0.75rem;
    background: var(--bg-base);
    border: 1px solid var(--border);
    color: var(--text-main);
    border-radius: var(--radius);
    font-family: var(--font-stack);
    font-size: 1rem;
}

.form-control:focus {
    outline: none;
    border-color: var(--accent);
}

textarea.form-control {
    resize: vertical;
    min-height: 150px;
}

/* Tables */
.table-wrapper {
    overflow-x: auto;
    margin: var(--space-lg) 0;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

th, td {
    padding: var(--space-md);
    text-align: left;
    border-bottom: 1px solid var(--border);
}

th {
    background: var(--bg-surface);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.875rem;
    letter-spacing: 0.05em;
}

/* Footer */
.site-footer {
    padding: var(--space-xl) 0 var(--space-lg);
    background-color: var(--bg-base);
    text-align: center;
    border-top: 1px solid var(--border);
}

.footer-logo {
    display: inline-block;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: var(--space-md);
    letter-spacing: 0.05em;
}

.footer-logo:hover {
    color: var(--text-main);
    text-decoration: none;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
    margin-bottom: var(--space-lg);
    font-size: 0.875rem;
}

.footer-links a {
    color: var(--text-muted);
}

.footer-meta {
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 0;
}

/* Responsive */
@media (max-width: 768px) {
    .mobile-toggle {
        display: block;
    }

    .main-nav {
        display: none;
        flex-direction: column;
        gap: var(--space-md);
        padding-top: var(--space-md);
        border-top: 1px solid var(--border);
        margin-top: var(--space-md);
    }

    .main-nav.active {
        display: flex;
    }

    .hero-floating-card {
        position: relative;
        bottom: auto;
        left: auto;
        margin: -40px var(--space-md) 0;
        max-width: none;
    }

    .stat-strip {
        gap: var(--space-md);
        padding: var(--space-md);
    }
    
    .stat-strip-item {
        flex: 1 1 40%;
    }
}

@media (prefers-reduced-motion: reduce){*,*::before,*::after{animation-duration:.01ms!important;animation-iteration-count:1!important;transition-duration:.01ms!important;scroll-behavior:auto!important}}
