/* Inter font - self-hosted */
@font-face {
    font-family: 'Inter';
    font-style: normal;
    font-weight: 400 700;
    font-display: swap;
    src: url('/assets/inter-latin.woff2') format('woff2');
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* Material Icons - self-hosted */
@font-face {
    font-family: 'Material Icons Outlined';
    font-style: normal;
    font-weight: 400;
    font-display: block;
    src: url('/assets/material-icons-outlined.woff2') format('woff2');
}

.material-icons-outlined {
    font-family: 'Material Icons Outlined';
    font-weight: normal;
    font-style: normal;
    font-size: 24px;
    line-height: 1;
    letter-spacing: normal;
    text-transform: none;
    display: inline-block;
    white-space: nowrap;
    word-wrap: normal;
    direction: ltr;
    -webkit-font-smoothing: antialiased;
    width: 1em;
    height: 1em;
    overflow: hidden;
}

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

:root {
    --accent: #D41C1C;
    --accent-dark: #B01818;
    --accent-light: #FDE8E8;
    --bg: #F7F9FF;
    --text: #181C1F;
    --text-muted: #5F6672;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --focus-ring: rgba(212, 28, 28, 0.15);
    --accent-border: rgba(212, 28, 28, 0.15);
    --card-shadow: rgba(212, 28, 28, 0.06);
    color-scheme: light dark;
}

[data-theme="dark"] {
    --accent: #F87171;
    --accent-dark: #FCA5A5;
    --accent-light: #2E1515;
    --bg: #121218;
    --text: #E8E8ED;
    --text-muted: #9CA3AF;
    --surface: #1E1E26;
    --border: #2E2E3A;
    --focus-ring: rgba(248, 113, 113, 0.2);
    --accent-border: rgba(248, 113, 113, 0.15);
    --card-shadow: rgba(248, 113, 113, 0.08);
}

html {
    scroll-padding-top: 72px;
}

.no-transitions,
.no-transitions *,
.no-transitions *::before,
.no-transitions *::after {
    transition: none !important;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    -webkit-font-smoothing: antialiased;
    line-height: 1.6;
    font-size: 16px;
    padding-top: 57px;
}

a {
    color: var(--accent);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}


/* Skip link */
.skip-link {
    position: absolute;
    top: -100px;
    left: 0;
    background: var(--accent);
    color: #fff;
    padding: 8px 16px;
    z-index: 200;
    font-size: 14px;
    text-decoration: none;
    border-radius: 0 0 8px 0;
}

.skip-link:focus {
    top: 0;
}

/* Header */
.header {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    padding: 0 24px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
}

[data-theme="dark"] .header {
    background: rgba(18, 18, 24, 0.7);
}

.header-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 56px;
}

.header-logo img {
    height: 28px;
    width: auto;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    display: flex;
    align-items: center;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    height: 38px;
    width: 320px;
    transition: border-color 0.15s;
}

.search-box:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.search-box .material-icons-outlined {
    font-size: 18px;
    color: var(--text-muted);
    margin-right: 8px;
}

.search-box input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 14px;
    color: var(--text);
    width: 100%;
}

.search-box input::placeholder {
    color: var(--text-muted);
}

.theme-toggle {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    transition: border-color 0.15s, color 0.15s;
    flex-shrink: 0;
}

.theme-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.theme-toggle .material-icons-outlined {
    font-size: 20px;
}

/* Show correct theme icon without JS */
.theme-icon-dark { display: none; }
[data-theme="dark"] .theme-icon-light { display: none; }
[data-theme="dark"] .theme-icon-dark { display: inline-block; }

/* App menu */
.app-menu-wrap {
    position: relative;
}

.app-menu {
    display: none;
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    z-index: 200;
    grid-template-columns: repeat(3, 80px);
    gap: 8px;
}

.app-menu.open {
    display: grid;
}

.app-menu-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 12px 4px;
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 11px;
    font-weight: 500;
    text-align: center;
    transition: background 0.15s;
    cursor: pointer;
}

.app-menu-item:hover {
    background: var(--accent-light);
}

.app-menu-item.dimmed {
    opacity: 0.4;
    pointer-events: none;
    cursor: default;
}

.app-menu-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
}

.app-menu-icon .material-icons-outlined {
    font-size: 22px;
}

/* Logo swap */
.logo-light { display: block; }
.logo-dark { display: none; }
[data-theme="dark"] .logo-light { display: none; }
[data-theme="dark"] .logo-dark { display: block; }

/* Page layout with ToC sidebar */
.page-layout {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 32px 64px;
    display: grid;
    grid-template-columns: 1fr 200px;
    gap: 48px;
}

.page-wrapper {
    min-width: 0;
}

/* Table of contents */
.toc {
    padding-top: 8px;
}

.toc-inner {
    position: -webkit-sticky;
    position: sticky;
    top: 80px;
}

.toc-title {
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.toc ul {
    list-style: none;
}

.toc li {
    margin-bottom: 6px;
}

.toc a {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    display: block;
    padding: 4px 0 4px 12px;
    border-left: 2px solid transparent;
    transition: color 0.15s, border-color 0.15s;
    line-height: 1.4;
}

.toc a:hover {
    color: var(--accent);
}

.toc a.active {
    color: var(--accent);
    border-left-color: var(--accent);
    font-weight: 500;
}

/* Breadcrumb */
.breadcrumb ol {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
    list-style: none;
    padding-left: 0;
}

.breadcrumb li {
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb li:not(:last-child)::after {
    content: '>';
    font-size: 11px;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--accent);
    text-decoration: none;
}

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

/* Reverse link */
.reverse-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 16px;
}

.reverse-link:hover {
    text-decoration: none;
}

.reverse-link:hover span:not(.material-icons-outlined) {
    text-decoration: underline;
}

.reverse-link .material-icons-outlined {
    font-size: 16px;
}

/* Page headings */
h1 {
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    margin-bottom: 24px;
}

h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

p {
    color: var(--text);
    margin-bottom: 12px;
}

.intro {
    font-size: 15px;
    color: var(--text-muted);
    margin-bottom: 24px;
    line-height: 1.7;
}

/* Also converted block */
.also-converted {
    background: var(--accent-light);
    border-radius: 10px;
    padding: 16px 20px;
    margin-bottom: 24px;
}

.also-converted-title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 8px;
}

.also-converted-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 16px;
}

.also-converted-item {
    font-size: 14px;
    font-weight: 500;
}

.also-converted-item a {
    color: var(--accent);
    text-decoration: none;
}

.also-converted-item a:hover {
    text-decoration: underline;
}

/* Calculator card */
.calculator-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.calc-row {
    display: flex;
    align-items: center;
    gap: 16px;
}

.calc-field {
    flex: 1;
}

.calc-label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.calc-input-wrap {
    display: flex;
    align-items: center;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-height: 46px;
    overflow: hidden;
    position: relative;
    transition: border-color 0.15s;
}

.calc-input-wrap:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.calc-input-wrap input {
    border: none;
    outline: none;
    background: none;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    padding: 0 14px;
    width: 100%;
    height: 100%;
    color: var(--text);
}

.calc-unit {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    padding-right: 14px;
    white-space: nowrap;
}

.calc-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--accent);
    flex-shrink: 0;
    margin-top: 22px;
}

/* Hub calculator card */
.calc-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 28px 32px;
    margin-bottom: 32px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.calc-card .calc-label {
    text-align: center;
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

.calc-card .calc-row {
    display: flex;
    align-items: center;
    gap: 12px;
    justify-content: center;
    flex-wrap: wrap;
}

.calc-card .calc-field {
    position: relative;
    flex: 1 1 140px;
}

.calc-card .calc-field select {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 500;
    padding: 0 28px 0 12px;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    outline: none;
    transition: border-color 0.15s;
}

.calc-card .calc-field select:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.calc-swap-btn {
    background: none;
    border: 1px solid var(--border);
    border-radius: 8px;
    min-width: 46px;
    height: 46px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--accent);
    transition: border-color 0.15s, background 0.15s;
    flex-shrink: 0;
    padding: 0 10px;
}

.calc-swap-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.calc-card .calc-field input {
    width: 100%;
    height: 46px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    padding: 0 8px 0 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

/* Number input spin buttons */
.calc-card .calc-field input[type="number"]::-webkit-inner-spin-button,
.calc-card .calc-field input[type="number"]::-webkit-outer-spin-button {
    margin-right: 4px;
}

/* Select dropdown arrow spacing */
.calc-card .calc-field select,
.hero-converter select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%235F6672'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
    padding-right: 32px;
}

.calc-card .calc-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.calc-prefix {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.calc-card .calc-field input.has-prefix {
    padding-left: 28px;
}

.calc-suffix {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
    pointer-events: none;
}

.calc-of {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-muted);
}

.calc-result-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 16px;
}

.calc-equals {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-muted);
}

.calc-output {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.calc-formula {
    text-align: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
}

.calc-link {
    display: block;
    text-align: center;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    margin-top: 12px;
}

.calc-link:hover {
    text-decoration: underline;
}

/* Screen reader only */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.calc-result {
    background: var(--accent-light);
    border-color: var(--accent-border);
}

.calc-result output {
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 18px;
    font-weight: 600;
    white-space: nowrap;
    padding: 0 14px;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    color: var(--accent-dark);
    background: none;
}

/* Content sections */
.section {
    margin-bottom: 32px;
}

.formula-block {
    background: var(--surface);
    border: 1px solid var(--border);
    border-left: 3px solid var(--accent);
    border-radius: 4px 8px 8px 4px;
    padding: 16px 20px;
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    font-family: 'Courier New', monospace;
    color: var(--text);
}

/* Common queries */
.common-queries {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-top: 12px;
}

.common-query-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 14px;
    color: var(--text);
    text-decoration: none;
    transition: border-color 0.15s;
}

.common-query-link:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.common-query-link .material-icons-outlined {
    font-size: 16px;
    color: var(--accent);
}

.common-query-desc {
    display: block;
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 400;
    margin-top: 2px;
}

/* Conversion table */
.table-wrap {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 12px;
}

.conv-table {
    width: 100%;
    border-collapse: collapse;
    table-layout: fixed;
}

.conv-table th {
    text-align: left;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 12px 16px;
    border-bottom: 1px solid var(--border);
    background: var(--bg);
}

.conv-table td {
    padding: 10px 16px;
    font-size: 14px;
    border-bottom: 1px solid var(--border);
}

.conv-table tr:last-child td {
    border-bottom: none;
}

.conv-table tbody tr:hover {
    background: var(--accent-light);
}

.conv-table td:first-child {
    font-weight: 500;
}

.conv-table td:last-child {
    color: var(--accent-dark);
    font-weight: 600;
}

.conv-table tr.highlight {
    background: var(--accent-light);
}

.conv-table a {
    color: inherit;
    text-decoration: none;
}

.main-content.hub-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 32px 64px;
}

.hub-content .section {
    margin-top: 32px;
    margin-bottom: 32px;
}

.hub-content h2 {
    margin-top: 32px;
}

.formula-cell {
    font-family: 'Courier New', monospace;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.conv-table:has(.formula-cell) {
    table-layout: auto;
}

.content-list {
    margin-left: 20px;
    margin-bottom: 12px;
}

.content-list li {
    margin-bottom: 8px;
}

.link-purple {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.link-purple:hover {
    text-decoration: underline;
}

.table-footer {
    margin-top: 12px;
}

.conv-table a:hover {
    color: var(--accent);
}

.conv-table .table-desc {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 400;
}

.table-more {
    display: block;
    text-align: center;
    padding: 12px;
    font-size: 14px;
    font-weight: 500;
    color: var(--accent);
    text-decoration: none;
    border-top: 1px solid var(--border);
}

.table-more:hover {
    background: var(--accent-light);
}

/* Related links */
.related-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 12px;
}

.related-col h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.related-col ul {
    list-style: none;
}

.related-col li {
    margin-bottom: 4px;
}

.related-col a {
    font-size: 14px;
    color: var(--accent);
    text-decoration: none;
}

.related-col a:hover {
    text-decoration: underline;
}

/* FAQ */
.faq-item {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    margin-bottom: 12px;
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 18px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text);
    font-family: inherit;
}

.faq-question:hover {
    color: var(--accent);
}

.faq-question .material-icons-outlined {
    font-size: 20px;
    color: var(--text-muted);
    transition: transform 0.2s;
}

.faq-item.open .faq-question .material-icons-outlined {
    transform: rotate(180deg);
}

.faq-answer {
    display: none;
    padding: 0 18px 16px;
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
}

.faq-answer a {
    color: var(--accent);
    text-decoration: none;
}


.faq-answer a:hover {
    text-decoration: underline;
}

.faq-item.open .faq-answer {
    display: block;
}

/* E-E-A-T footer */
.eeat-footer {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 0;
    border-top: 1px solid var(--border);
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 32px;
}

.eeat-footer span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.eeat-footer .material-icons-outlined {
    font-size: 14px;
}

/* Hero (homepage) */
.hero {
    max-width: 100%;
    padding: 64px 24px 48px;
    text-align: center;
    background: linear-gradient(135deg, var(--accent-light) 0%, var(--bg) 100%);
    border-bottom: 1px solid var(--border);
}

.hero h1 {
    font-size: 36px;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 16px;
    max-width: 720px;
    margin-left: auto;
    margin-right: auto;
}

.hero p {
    font-size: 17px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto 32px;
}

.hero-search {
    display: flex;
    align-items: center;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0 16px;
    height: 52px;
    max-width: 480px;
    margin: 0 auto;
    transition: border-color 0.15s;
}

.hero-search:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 4px var(--focus-ring);
}

.hero-search .material-icons-outlined {
    font-size: 22px;
    color: var(--text-muted);
    margin-right: 12px;
}

.hero-search input {
    border: none;
    background: none;
    outline: none;
    font-family: inherit;
    font-size: 16px;
    color: var(--text);
    width: 100%;
}

.hero-search input::placeholder {
    color: var(--text-muted);
}

/* Hero converter */
.hero-converter {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px 36px;
    margin: 24px auto 16px;
    max-width: 840px;
}

.hero-converter-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.hero-calc-label {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-muted);
}

.hero-converter-field input {
    width: 90px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 12px;
    font-size: 16px;
    font-weight: 600;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    outline: none;
}

.hero-converter-field input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--focus-ring);
}

.hero-converter select {
    min-width: 240px;
    width: 240px;
    height: 42px;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 0 32px 0 12px;
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    background: var(--bg);
    color: var(--text);
    cursor: pointer;
    outline: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='%235F6672'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 20px;
}

.hero-converter select:focus {
    border-color: var(--accent);
}

.hero-converter-arrow {
    font-size: 20px;
    color: var(--accent);
    flex-shrink: 0;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    transition: background 0.15s;
    width: 28px;
    height: 28px;
    overflow: hidden;
    margin: 0 8px;
}

.hero-converter-arrow:hover {
    background: var(--accent-light);
}

.hero-converter-result {
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: 8px;
    padding: 0 14px;
    height: 42px;
    display: flex;
    align-items: center;
    min-width: 140px;
}

.hero-converter-result output {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-dark);
    white-space: nowrap;
}

.hero-converter-link {
    display: block;
    text-align: center;
    margin-top: 12px;
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
}

.hero-converter-link:hover {
    text-decoration: underline;
}

/* Try these links */
.hero-try {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
    font-size: 13px;
}

.hero-try-label {
    color: var(--text-muted);
}

.hero-try a {
    color: var(--accent);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.15s;
}

.hero-try a:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

@media (max-width: 860px) {
    .hero-converter {
        padding: 20px 20px;
    }

    .hero-converter-row {
        flex-direction: column;
        gap: 8px;
    }

    .hero-converter-field input,
    .hero-converter select,
    .hero-converter-result {
        width: 100%;
        min-width: unset;
    }

    .hero-converter-arrow {
        transform: rotate(90deg);
        margin: 4px 0;
    }

    .hero-try a {
        font-size: 12px;
    }
}

.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0;
    margin-top: 32px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 16px 0;
    max-width: 420px;
    margin-left: auto;
    margin-right: auto;
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    flex: 1;
    padding: 4px 16px;
}

.hero-stat-number {
    font-size: 24px;
    font-weight: 700;
    color: var(--accent);
}

.hero-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 2px;
    white-space: nowrap;
}

.hero-stat-divider {
    width: 1px;
    height: 36px;
    background: var(--border);
}

/* Main content (homepage) */
.main-content {
    max-width: 1100px;
    margin: 0 auto;
    padding: 32px 32px 64px;
}

.section-title {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 16px;
    padding-left: 12px;
    border-left: 3px solid var(--accent);
}

.category-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 48px;
}

.category-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.category-card:hover {
    border-color: var(--accent);
    box-shadow: 0 2px 8px var(--card-shadow);
}

.category-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 4px;
    text-decoration: none;
    color: var(--text);
}

.category-card-header:hover {
    text-decoration: none;
}

.category-card-header:hover h3 {
    color: var(--accent);
}

.category-icon {
    width: 40px;
    height: 40px;
    background: var(--accent-light);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--accent);
    flex-shrink: 0;
}

.category-icon .material-icons-outlined {
    font-size: 22px;
}

.category-card h2 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 0;
}

.category-card.dimmed {
    opacity: 0.5;
    pointer-events: none;
}

.category-card.dimmed .category-card-header:hover h3 {
    color: var(--text);
}

.calc-count {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    display: block;
}

.category-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
    flex: 1;
}

.category-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.category-links a {
    font-size: 13px;
    color: var(--accent);
    text-decoration: none;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 6px;
    transition: border-color 0.15s;
}

.category-links a:hover {
    border-color: var(--accent);
    background: var(--accent-light);
    text-decoration: none;
}

/* Popular links */
.pop-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 48px;
}

.pop-item {
    display: block;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 14px 16px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    transition: border-color 0.15s, color 0.15s;
}

.pop-icon {
    font-size: 18px;
    color: var(--accent);
    vertical-align: middle;
    margin-right: 8px;
}

.pop-result {
    color: var(--text-muted);
    font-size: 13px;
    font-weight: 400;
    float: right;
}

.pop-item:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Content blocks */
.content-block {
    margin-bottom: 48px;
}

.content-block h2 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 12px;
}

.content-block p {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    max-width: 720px;
}

.content-block ul,
.content-block ol {
    max-width: 720px;
}

.content-block ul {
    list-style: none;
}

.content-block li {
    font-size: 15px;
    color: var(--text-muted);
    line-height: 1.7;
    padding-left: 20px;
    position: relative;
    margin-bottom: 4px;
}

.content-block ul > li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 11px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent);
}

ol {
    padding-left: 1.2em;
}

.content-block ol > li {
    padding-left: 0;
}

/* 404 page */
.slim-page {
    max-width: 720px;
    margin: 0 auto;
    padding: 64px 24px;
    text-align: center;
    min-height: 60vh;
}

.slim-page .hero-search {
    max-width: 480px;
    margin: 32px auto;
}

.slim-page-link {
    margin-top: 24px;
}

.slim-page-link a {
    color: var(--accent);
    text-decoration: none;
    font-weight: 500;
}

.slim-page-link a:hover {
    text-decoration: underline;
}

/* Privacy page */
.privacy-content {
    max-width: 860px;
    margin: 0 auto;
    padding: 32px 24px 64px;
}

.privacy-content ul,
.section ul {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 12px;
}

.privacy-content li,
.section li {
    margin-bottom: 4px;
}

/* Admin dashboard */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 12px;
    margin-bottom: 32px;
}

.admin-stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 20px 16px;
    text-align: center;
}

.admin-stat-number {
    font-size: 28px;
    font-weight: 700;
    color: var(--accent);
}

.admin-stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

.admin-badge {
    display: inline-block;
    font-size: 12px;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: 4px;
}

.admin-badge.live {
    background: #d1fae5;
    color: #065f46;
}

.admin-badge.planned {
    background: #fef3c7;
    color: #92400e;
}

.admin-badge.dimmed {
    background: var(--border);
    color: var(--text-muted);
}

[data-theme="dark"] .admin-badge.live {
    background: #064e3b;
    color: #6ee7b7;
}

[data-theme="dark"] .admin-badge.planned {
    background: #78350f;
    color: #fcd34d;
}

.admin-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
}

.admin-note code {
    background: var(--accent-light);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 12px;
}

.admin-controls {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
}

.admin-control-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 20px 24px;
}

.admin-control-card h3 {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 8px;
}

.admin-control-card p {
    font-size: 14px;
    color: var(--text-muted);
    margin-bottom: 12px;
}

.admin-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-inline-form {
    display: inline;
}

.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    text-decoration: none;
    transition: border-color 0.15s, background 0.15s;
}

.admin-btn:hover {
    border-color: var(--accent);
    background: var(--accent-light);
}

.admin-btn-sm {
    padding: 4px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: border-color 0.15s;
}

.admin-btn-sm:hover {
    border-color: var(--accent);
}

.admin-btn-current {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
    box-shadow: 0 0 0 2px var(--focus-ring);
    cursor: default;
    font-weight: 600;
}

.admin-btn-danger {
    border-color: #ef4444;
    color: #ef4444;
}

.admin-btn-danger:hover {
    background: #fef2f2;
}

[data-theme="dark"] .admin-btn-danger:hover {
    background: #450a0a;
}

.admin-key {
    display: flex;
    gap: 16px;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.admin-category-list {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.admin-category-row {
    display: grid;
    grid-template-columns: 28px 180px 90px 90px 1fr;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.admin-category-row:last-child {
    border-bottom: none;
}

.admin-category-name {
    font-size: 14px;
    font-weight: 500;
}

.admin-category-pages {
    font-size: 13px;
    color: var(--text-muted);
}

.admin-cat-toggle {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid var(--border);
}

.admin-cat-toggle:last-child {
    border-bottom: none;
}

.admin-cat-icon {
    font-size: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

.admin-cat-name {
    font-size: 14px;
    font-weight: 500;
    min-width: 180px;
}

.admin-cat-pages {
    font-size: 13px;
    color: var(--text-muted);
    margin-left: auto;
    margin-right: 8px;
}

.admin-alert {
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 24px;
}

.admin-alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

[data-theme="dark"] .admin-alert-success {
    background: #064e3b;
    color: #6ee7b7;
    border-color: #065f46;
}

.admin-alert-info {
    background: #dbeafe;
    color: #1e40af;
    border: 1px solid #93c5fd;
}

[data-theme="dark"] .admin-alert-info {
    background: #1e3a5f;
    color: #93c5fd;
    border-color: #1e40af;
}

.disclaimer {
    background: var(--accent-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 24px;
}

@media (max-width: 640px) {
    .admin-stats {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Numeric value hero answer */
.hero-answer {
    background: var(--accent-light);
    border-radius: 12px;
    padding: 24px;
    margin-bottom: 24px;
    text-align: center;
}

.hero-answer .result {
    font-size: 32px;
    font-weight: 700;
    color: var(--accent);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.hero-answer .result-formula {
    font-size: 22px;
    font-weight: 600;
    color: var(--accent);
    white-space: normal;
    word-wrap: break-word;
}

.hero-answer .result-sub {
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 4px;
}

.result-note {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 8px;
    margin-bottom: 0;
}

/* Comparison bars chart */
.compare-chart {
    max-width: 600px;
    margin: 0 auto;
}

.compare-bar-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.compare-bar-label {
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    min-width: 120px;
    text-align: right;
    white-space: nowrap;
}

.compare-bar-track {
    flex: 1;
    height: 32px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.compare-bar-fill {
    height: 100%;
    border-radius: 5px;
    transition: width 0.6s ease-out;
}

.compare-bar-from {
    background: var(--accent);
}

.compare-bar-to {
    background: var(--accent-dark);
}

[data-theme="dark"] .compare-bar-from {
    background: var(--accent);
}

[data-theme="dark"] .compare-bar-to {
    background: var(--accent-dark);
}

.chart-caption {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    text-align: center;
    max-width: 520px;
    margin: 12px auto 0;
}

/* Thermometer chart */
.temp-chart {
    max-width: 400px;
    margin: 0 auto;
    text-align: center;
}

.temp-thermometer {
    display: flex;
    justify-content: center;
    margin-bottom: 16px;
}

.temp-track {
    position: relative;
    width: 32px;
    height: 240px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
}

.temp-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, var(--accent), var(--accent-dark));
    border-radius: 0 0 15px 15px;
    transition: height 0.6s ease-out;
}

.temp-marker {
    position: absolute;
    left: 100%;
    margin-left: 8px;
    transform: translateY(50%);
    display: flex;
    align-items: center;
    z-index: 2;
}

.temp-marker::before {
    content: '';
    width: 10px;
    height: 2px;
    background: var(--accent);
    flex-shrink: 0;
}

.temp-marker-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent);
    white-space: nowrap;
    padding-left: 6px;
}

.temp-ref {
    position: absolute;
    left: 100%;
    margin-left: 8px;
    transform: translateY(50%);
    display: flex;
    align-items: center;
}

.temp-ref-line {
    width: 6px;
    height: 1px;
    background: var(--border);
    flex-shrink: 0;
}

.temp-ref-label {
    font-size: 11px;
    color: var(--text-muted);
    white-space: nowrap;
    padding-left: 4px;
}

@media (max-width: 640px) {
    .compare-bar-label {
        min-width: 80px;
        font-size: 12px;
    }

    .compare-bar-track {
        height: 24px;
    }
}

/* Donut chart (visual aid for conversions) */
.pct-chart {
    text-align: center;
}

.pct-donut {
    width: 160px;
    height: 160px;
    margin: 0 auto 16px;
}

.pct-donut-bg {
    fill: none;
    stroke: #D41C1C;
    stroke-width: 12;
}

.pct-donut-fill {
    fill: none;
    stroke: #F87171;
    stroke-width: 12;
    stroke-linecap: round;
    transform: rotate(-90deg);
    transform-origin: center;
    transition: stroke-dasharray 0.6s ease-out;
}

.pct-donut-label {
    font-size: 18px;
    font-weight: 700;
    fill: var(--text);
    text-anchor: middle;
    dominant-baseline: central;
}

.pct-donut-sub {
    font-size: 13px;
    fill: var(--text-muted);
    text-anchor: middle;
    dominant-baseline: central;
}

.pct-chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-bottom: 12px;
    font-size: 14px;
}

.pct-legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    color: var(--text);
}

.pct-legend-swatch {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

.pct-legend-filled {
    background: #F87171;
}

.pct-legend-remainder {
    background: #D41C1C;
}

.pct-chart-caption {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 520px;
    margin: 0 auto;
}

/* Site footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: var(--surface);
    padding: 48px 24px 32px;
}

.footer-inner {
    max-width: 1100px;
    margin: 0 auto;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}

.footer-brand p {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 12px;
    margin-bottom: 0;
    max-width: 400px;
    line-height: 1.6;
}

.footer-brand img {
    height: 24px;
    width: auto;
}

.footer-heading {
    font-size: 13px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--text);
    margin-bottom: 12px;
}

.footer-col ul {
    list-style: none;
}

.footer-col li {
    margin-bottom: 8px;
}

.footer-col a {
    font-size: 14px;
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.footer-col a:hover {
    color: var(--accent);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    color: var(--text-muted);
}

.footer-bottom-links {
    display: flex;
    gap: 16px;
}

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

.footer-bottom-links a:hover {
    color: var(--accent);
}

.footer-credit {
    color: var(--text-muted);
    text-decoration: none;
}

.footer-credit:hover {
    color: var(--accent);
}

/* Responsive */
@media (max-width: 900px) {
    .page-layout {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .toc {
        display: none;
    }
}

@media (min-width: 641px) and (max-width: 960px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 640px) {
    .hero h1 {
        font-size: 28px;
    }

    .hero p {
        font-size: 15px;
    }

    .search-box {
        display: none;
    }

    .calc-row {
        flex-direction: column;
    }

    .calc-arrow {
        margin-top: 0;
        transform: rotate(90deg);
    }

    .calc-card {
        padding: 16px;
    }

    .calc-card .calc-row {
        flex-direction: column;
        gap: 8px;
    }

    .calc-card .calc-field {
        width: 100%;
        flex: none;
    }

    .calc-card .calc-field select,
    .calc-card .calc-field input {
        width: 100%;
    }

    .calc-swap-btn {
        transform: rotate(90deg);
        margin: 4px 0;
    }

    .calc-result-row {
        margin-top: 12px;
    }

    .calc-card .calc-label {
        margin-bottom: 8px;
    }

    .category-grid {
        grid-template-columns: 1fr;
    }

    .pop-grid {
        grid-template-columns: 1fr;
    }

    .related-grid {
        grid-template-columns: 1fr;
    }

    .common-queries {
        grid-template-columns: 1fr;
    }

    .hero-answer .result {
        font-size: 26px;
    }

    .conv-table .table-desc {
        display: none;
    }

    h1 {
        font-size: 24px;
    }

    .eeat-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 24px;
    }

    .footer-brand {
        grid-column: 1 / -1;
    }

    .footer-bottom {
        flex-direction: column;
        gap: 12px;
        text-align: center;
    }
}
