:root {
    --md-sys-color-primary: #6750a4;
    --md-sys-color-on-primary: #ffffff;
    --md-sys-color-primary-container: #eaddff;
    --md-sys-color-on-primary-container: #21005d;

    --md-sys-color-secondary: #625b71;
    --md-sys-color-on-secondary: #ffffff;
    --md-sys-color-secondary-container: #e8def8;
    --md-sys-color-on-secondary-container: #1d192b;

    --md-sys-color-tertiary: #7d5260;
    --md-sys-color-on-tertiary: #ffffff;

    --md-sys-color-surface: #fef7ff;
    --md-sys-color-surface-container: #f3edf7;
    --md-sys-color-surface-container-high: #ece6f0;
    --md-sys-color-surface-container-highest: #e6e0e9;
    --md-sys-color-surface-variant: #e7e0ec;

    --md-sys-color-on-surface: #1d1b20;
    --md-sys-color-on-surface-variant: #49454f;
    --md-sys-color-outline: #79747e;
    --md-sys-color-outline-variant: #cac4d0;

    --md-sys-color-error: #b3261e;
    --md-sys-color-on-error: #ffffff;

    --md-shape-corner-xs: 8px;
    --md-shape-corner-sm: 12px;
    --md-shape-corner-md: 16px;
    --md-shape-corner-lg: 20px;
    --md-shape-corner-xl: 28px;
    --md-shape-corner-full: 999px;

    --md-elevation-1: 0 1px 2px rgba(0, 0, 0, 0.18), 0 1px 3px rgba(0, 0, 0, 0.12);
    --md-elevation-2: 0 2px 6px rgba(0, 0, 0, 0.15);
    --md-elevation-3: 0 4px 12px rgba(0, 0, 0, 0.16);
}

@import url("https://fonts.googleapis.com/css2?family=Roboto:wght@400;500;700&family=Roboto+Mono:wght@400;500&display=swap");

html,
body {
    min-height: 100%;
}

body.site-body {
    font-family: "Roboto", system-ui, sans-serif;
    background: var(--md-sys-color-surface);
    color: var(--md-sys-color-on-surface);
    line-height: 1.5;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: "Roboto", system-ui, sans-serif;
    letter-spacing: 0;
    color: var(--md-sys-color-on-surface);
}

pre,
code,
kbd {
    font-family: "Roboto Mono", monospace;
}

a {
    color: var(--md-sys-color-primary);
}

a:hover {
    color: var(--md-sys-color-on-primary-container);
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
}

.skip-link:focus {
    left: 16px;
    top: 16px;
    z-index: 2100;
    padding: 10px 14px;
    border-radius: var(--md-shape-corner-sm);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    text-decoration: none;
    box-shadow: var(--md-elevation-2);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 1200;
    background: color-mix(in srgb, var(--md-sys-color-surface) 92%, white);
    border-bottom: 1px solid var(--md-sys-color-outline-variant);
    backdrop-filter: blur(8px);
}

.navbar {
    min-height: 64px;
}

.brand-mark {
    display: inline-flex;
    align-items: baseline;
    gap: 2px;
    padding: 8px 12px;
    border-radius: var(--md-shape-corner-md);
    background: var(--md-sys-color-primary-container);
    color: var(--md-sys-color-on-primary-container);
    text-decoration: none;
}

.brand-mark-main,
.brand-mark-dot,
.brand-mark-sub {
    font-family: "Roboto", system-ui, sans-serif;
    font-weight: 700;
    line-height: 1;
}

.brand-mark-main {
    font-size: 1.1rem;
}

.brand-mark-dot {
    font-size: 1.1rem;
}

.brand-mark-sub {
    font-size: 0.92rem;
}

.navbar .nav-link {
    border-radius: var(--md-shape-corner-full);
    padding: 8px 14px;
    color: var(--md-sys-color-on-surface-variant);
    font-weight: 500;
    transition: background-color 0.18s ease, color 0.18s ease;
}

.navbar .nav-link:hover {
    background: var(--md-sys-color-surface-container-high);
    color: var(--md-sys-color-on-surface);
}

.navbar .nav-link.active {
    background: var(--md-sys-color-secondary-container);
    color: var(--md-sys-color-on-secondary-container);
}

.main-content {
    padding: 24px 0 56px;
}

.container .breadcrumb {
    border: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container) !important;
    border-radius: var(--md-shape-corner-sm) !important;
}

.container .breadcrumb a {
    color: var(--md-sys-color-primary);
}

.card,
.sidebar-widget,
.table,
.alert,
.accordion-item,
.list-group-item {
    border: 1px solid var(--md-sys-color-outline-variant) !important;
    border-radius: var(--md-shape-corner-md) !important;
    box-shadow: var(--md-elevation-1);
    background: var(--md-sys-color-surface-container);
}

.card {
    overflow: hidden;
}

.card-img-top {
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.blog-content,
.blog-content p,
.blog-content li {
    color: var(--md-sys-color-on-surface);
    line-height: 1.75;
}

.blog-content h2,
.blog-content h3,
.blog-content h4 {
    margin-top: 1.8rem;
}

pre {
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-sm);
    background: var(--md-sys-color-surface-container-high);
}

.table th {
    background: var(--md-sys-color-surface-container-highest) !important;
    color: var(--md-sys-color-on-surface) !important;
}

.table td {
    background: var(--md-sys-color-surface) !important;
}

.btn {
    border-radius: var(--md-shape-corner-full) !important;
    padding: 9px 18px;
    font-weight: 500;
    border-width: 1px !important;
    box-shadow: none;
    transition: background-color 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary {
    background: var(--md-sys-color-primary) !important;
    border-color: var(--md-sys-color-primary) !important;
    color: var(--md-sys-color-on-primary) !important;
}

.btn-primary:hover,
.btn-primary:focus {
    background: color-mix(in srgb, var(--md-sys-color-primary) 88%, black) !important;
    border-color: color-mix(in srgb, var(--md-sys-color-primary) 88%, black) !important;
}

.btn-outline-secondary {
    background: var(--md-sys-color-secondary-container) !important;
    border-color: transparent !important;
    color: var(--md-sys-color-on-secondary-container) !important;
}

.btn-outline-secondary:hover,
.btn-outline-secondary:focus {
    background: color-mix(in srgb, var(--md-sys-color-secondary-container) 86%, black) !important;
}

.badge {
    border: 0;
    box-shadow: none;
    border-radius: var(--md-shape-corner-full);
}

.bg-main {
    background: var(--md-sys-color-primary);
}

.bg-light {
    background: var(--md-sys-color-surface-container) !important;
}

.subscribe-form {
    position: relative;
    max-width: 560px;
}

.subscribe-form input {
    border-radius: var(--md-shape-corner-full);
    border: 1px solid var(--md-sys-color-outline-variant);
    padding-top: 0.85rem;
    padding-bottom: 0.85rem;
    background: var(--md-sys-color-surface);
}

.subscribe-form button {
    position: absolute;
    right: 8px;
    top: 7px;
    border-radius: var(--md-shape-corner-full);
    border: 0;
    padding: 9px 14px;
}

.pagination .page-link {
    border-radius: var(--md-shape-corner-full);
    border: 1px solid var(--md-sys-color-outline-variant);
    margin-inline: 2px;
    color: var(--md-sys-color-on-surface);
}

.pagination .active > .page-link,
.pagination .page-link.active {
    background: var(--md-sys-color-primary);
    border-color: var(--md-sys-color-primary);
    color: var(--md-sys-color-on-primary);
}

.site-footer {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    background: var(--md-sys-color-surface-container);
    color: var(--md-sys-color-on-surface);
}

.footer-brand-link {
    display: inline-flex;
    text-decoration: none;
}

.footer-note {
    color: var(--md-sys-color-on-surface-variant);
}

.footer-nav {
    display: flex;
    flex-wrap: wrap;
    gap: 12px 16px;
}

.footer-nav a {
    color: var(--md-sys-color-on-surface-variant);
    text-decoration: none;
    font-weight: 500;
}

.footer-nav a:hover {
    color: var(--md-sys-color-primary);
}

.footer-bottom {
    border-top: 1px solid var(--md-sys-color-outline-variant);
    text-align: center;
    color: var(--md-sys-color-on-surface-variant);
}

.tool-page .badge {
    font-size: 0.9rem;
}

.tool-playground .tool-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.tool-playground textarea {
    min-height: 120px;
}

.tool-preview-box {
    width: 100%;
    min-height: 140px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-sm);
}

.tool-preview-flex,
.tool-preview-grid {
    min-height: 160px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-sm);
    padding: 10px;
    background: var(--md-sys-color-surface);
}

.tool-preview-flex span,
.tool-preview-grid span {
    border: 1px solid var(--md-sys-color-outline-variant);
    padding: 8px 10px;
    border-radius: var(--md-shape-corner-xs);
    background: var(--md-sys-color-surface-container-high);
    font-weight: 500;
}

.tool-swatches {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tool-swatches span {
    width: 40px;
    height: 40px;
    border: 1px solid var(--md-sys-color-outline-variant);
    border-radius: var(--md-shape-corner-xs);
}

.tags-page .tags-hero {
    position: relative;
    overflow: hidden;
}

.tags-page .tags-letter-index .btn {
    min-width: 2.4rem;
}

.tag-chip {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    color: var(--md-sys-color-on-secondary-container);
    background: var(--md-sys-color-secondary-container);
    border: 1px solid transparent;
    padding: 7px 12px;
    border-radius: var(--md-shape-corner-full);
    font-weight: 500;
    transition: background-color 0.15s ease;
}

.tag-chip:hover {
    background: color-mix(in srgb, var(--md-sys-color-secondary-container) 84%, black);
    color: var(--md-sys-color-on-secondary-container);
}

@media (max-width: 991.98px) {
    .navbar .nav-link {
        margin-bottom: 6px;
    }
}

@media (max-width: 767.98px) {
    .tool-playground .tool-grid {
        grid-template-columns: 1fr;
    }
}
