:root {
    --wk-blue: #007AC3;
    --wk-blue-medium: #409BD2;
    --wk-blue-light: #A6D0EA;
    --wk-blue-ultra-light: #E8F4FB;
    --wk-green: #5A8A15;
    --wk-green-medium: #7BAA3C;
    --wk-teal: #00A3A1;
    --wk-teal-medium: #33B8B6;
    --wk-orange: #FF6B35;
    --wk-orange-medium: #FF8F66;
    --wk-orange-light: #FFDAC1;
    --wk-orange-ultra-light: #FFF3EC;
    --wk-red: #E5202E;
    --wk-purple: #6B21A8;
    --card-border-color: rgba(0, 0, 0, 0.3);
    --gray-50: #F9FAFB;
    --gray-100: #F3F4F6;
    --gray-200: #E5E7EB;
    --gray-300: #D1D5DB;
    --gray-400: #9CA3AF;
    --gray-500: #6B7280;
    --gray-600: #4B5563;
    --gray-700: #374151;
    --gray-800: #1F2937;
    --gray-900: #111827;
    --header-height: 56px;
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
}

body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 11pt;
    color: var(--gray-800);
    line-height: 1.6;
}

/* ── Header ─────────────────────────────────────────────────────────────── */

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 100;
    background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.header-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: white;
    font-size: 14px;
    font-weight: 600;
}

.header-logo:hover { text-decoration: none; }

.logo-mark {
    background: var(--wk-blue);
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: 700;
    font-size: 13px;
}

.logo-img {
    height: 28px;
    width: auto;
}

.primary-nav {
    display: flex;
    align-items: center;
    gap: 4px;
}

.primary-nav a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    padding: 8px 14px;
    border-radius: 6px;
    transition: all 0.2s;
}

.primary-nav a:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.primary-nav a.active {
    color: white;
    background: rgba(255, 255, 255, 0.15);
}

.nav-divider {
    width: 1px;
    height: 20px;
    background: rgba(255,255,255,0.2);
    margin: 0 6px;
}

.help-link {
    color: rgba(255,255,255,0.7);
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 4px;
}

.help-link:hover { color: white; background: rgba(255,255,255,0.1); text-decoration: none; }
.help-link svg { width: 15px; height: 15px; fill: currentColor; }

/* ── Page Container ─────────────────────────────────────────────────────── */

.page-container {
    display: flex;
    position: fixed;
    top: var(--header-height);
    left: 0;
    right: 0;
    bottom: 0;
}

/* ── Sidebar ────────────────────────────────────────────────────────────── */

.sidebar-nav {
    width: 260px;
    min-width: 260px;
    background: white;
    border-right: 1px solid var(--gray-200);
    overflow-y: auto;
    padding: 16px 12px;
}

.sidebar-section {
    margin-bottom: 20px;
}

.sidebar-heading {
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--gray-400);
    padding: 0 12px;
    margin-bottom: 6px;
}

.sidebar-nav ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.sidebar-nav li {
    margin: 0;
    padding: 0;
}

.sidebar-nav a {
    display: block;
    font-size: 13px;
    color: var(--gray-600);
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.15s;
    line-height: 1.4;
}

.sidebar-nav a:hover {
    color: var(--wk-blue);
    background: var(--wk-blue-ultra-light);
}

.sidebar-nav a.active {
    color: var(--wk-blue);
    background: var(--wk-blue-ultra-light);
    font-weight: 600;
}

/* ── Content Pane ───────────────────────────────────────────────────────── */

.content-pane {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

.overview-content {
    padding: 32px 48px;
    max-width: 1200px;
}

/* ── Typography ─────────────────────────────────────────────────────────── */

h1 {
    color: var(--wk-blue);
    font-size: 28pt;
    font-weight: 700;
    margin-bottom: 12px;
    line-height: 1.2;
}

.lead {
    font-size: 13pt;
    color: var(--gray-600);
    line-height: 1.6;
    margin-bottom: 32px;
}

h2 {
    font-size: 18pt;
    font-weight: 700;
    color: var(--gray-800);
    margin-top: 32px;
    margin-bottom: 16px;
    padding-top: 24px;
    border-top: 2px solid var(--wk-blue);
}

h2:first-of-type {
    border-top: none;
    padding-top: 0;
}

.category-desc {
    font-size: 11pt;
    color: var(--gray-500);
    margin-bottom: 16px;
    line-height: 1.5;
}

/* ── Category Row (side-by-side sections) ───────────────────────────────── */

.category-row {
    display: flex;
    gap: 24px;
    align-items: flex-start;
    margin-bottom: 32px;
}

.category-row .category-col {
    flex: 1;
    min-width: 0;
}

@media (max-width: 900px) {
    .category-row {
        flex-direction: column;
    }
}

/* ── Tile Grid ──────────────────────────────────────────────────────────── */

.tile-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    margin-top: 20px;
}

.tile {
    width: 196px;
    min-height: 258px;
    border: 1px solid #6B6B6B;
    border-radius: 10px;
    background-image: linear-gradient(to bottom right, white, var(--wk-blue-ultra-light));
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 16px 12px 14px;
    text-decoration: none;
    color: inherit;
    transition: all 0.2s;
    cursor: pointer;
}

.tile.tax-calc:hover {
    border-color: var(--wk-teal);
    box-shadow: 0 0 0 1px var(--wk-blue), 5px 5px 10px rgba(0, 163, 161, 0.25);
}

.tile.research:hover {
    border-color: #AB47BC;
    box-shadow: 0 0 0 1px var(--wk-purple), 5px 5px 10px rgba(171, 71, 188, 0.25);
}

.tile.config:hover {
    border-color: #ffb347;
    box-shadow: 0 0 0 1px var(--wk-orange), 5px 5px 10px rgba(255, 179, 71, 0.25);
}

.tile.address:hover {
    border-color: #FF6B6B;
    box-shadow: 0 0 0 1px var(--wk-red), 5px 5px 10px rgba(255, 107, 107, 0.25);
}

.tile-title {
    font-size: 11pt;
    font-weight: 700;
    color: var(--gray-800);
    text-align: center;
    margin-bottom: 10px;
    line-height: 1.3;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.tile-icon-box {
    width: 52px;
    height: 52px;
    border: none;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 10px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.15);
}

.tile-icon-box svg {
    width: 26px;
    height: 26px;
    fill: white;
}

/* Category-specific icon colors */
.tile-icon-box.tax-calc {
    background: linear-gradient(135deg, var(--wk-blue), var(--wk-teal));
}

.tile-icon-box.research {
    background: linear-gradient(135deg, var(--wk-purple), #AB47BC);
}

.tile-icon-box.config {
    background: linear-gradient(135deg, var(--wk-orange), #ffb347);
}

.tile-icon-box.address {
    background: linear-gradient(135deg, var(--wk-red), #FF6B6B);
}

.tile-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: center;
    margin-bottom: 10px;
}

.tile-badge {
    font-size: 8pt;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 10px;
    line-height: 1.4;
}

.tile-badge.protocol {
    background: var(--gray-100);
    color: var(--gray-600);
}

.tile-badge.auth {
    background: var(--wk-blue-ultra-light);
    color: var(--wk-blue);
}

.tile-desc {
    font-size: 9pt;
    color: var(--gray-500);
    text-align: center;
    line-height: 1.5;
    flex: 1;
    margin-bottom: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tile-btn {
    display: inline-block;
    border: 1px solid var(--gray-300);
    border-radius: 4px;
    background: white;
    font-size: 9pt;
    font-weight: 600;
    color: var(--gray-600);
    padding: 6px 14px;
    transition: all 0.2s;
}

.tile.tax-calc:hover .tile-btn {
    background: linear-gradient(135deg, var(--wk-blue), var(--wk-teal));
    color: white;
    border-color: var(--wk-blue);
}

.tile.research:hover .tile-btn {
    background: linear-gradient(135deg, var(--wk-purple), #AB47BC);
    color: white;
    border-color: var(--wk-purple);
}

.tile.config:hover .tile-btn {
    background: linear-gradient(135deg, var(--wk-orange), #ffb347);
    color: white;
    border-color: var(--wk-orange);
}

.tile.address:hover .tile-btn {
    background: linear-gradient(135deg, var(--wk-red), #FF6B6B);
    color: white;
    border-color: var(--wk-red);
}

/* ── Summary Table ──────────────────────────────────────────────────────── */

.summary-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    font-size: 10pt;
}

.summary-table th {
    background: linear-gradient(135deg, var(--wk-blue) 0%, var(--wk-teal) 100%);
    color: white;
    padding: 10px 14px;
    text-align: left;
    font-weight: 600;
    font-size: 9pt;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.summary-table td {
    padding: 10px 14px;
    border-bottom: 1px solid var(--gray-200);
    color: var(--gray-700);
}

.summary-table tr:nth-child(even) {
    background: var(--gray-50);
}

.summary-table tr:hover {
    background: var(--wk-blue-ultra-light);
}

.summary-table a {
    color: var(--wk-blue);
    text-decoration: none;
    font-weight: 600;
}

.summary-table a:hover {
    text-decoration: underline;
}

/* ── Callout ────────────────────────────────────────────────────────────── */

.callout {
    border-left: 4px solid var(--wk-blue);
    background: var(--wk-blue-ultra-light);
    padding: 16px 20px;
    border-radius: 0 8px 8px 0;
    margin-top: 32px;
    font-size: 10pt;
    line-height: 1.6;
}

.callout strong {
    display: block;
    margin-bottom: 4px;
}

/* ── Responsive ─────────────────────────────────────────────────────────── */

@media (max-width: 900px) {
    .sidebar-nav {
        display: none;
    }

    .overview-content {
        padding: 24px 20px;
    }

    .tile {
        width: 100%;
        max-width: 280px;
    }
}
