/* Inter - 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: #7F6B00;
    --accent-dark: #6B5A00;
    --accent-light: #FFF9E0;
    --accent-brand: #CFB028;
    --bg: #FAFAF7;
    --text: #1A1A18;
    --text-muted: #5F6672;
    --surface: #FFFFFF;
    --border: #E5E7EB;
    --focus-ring: rgba(127, 107, 0, 0.15);
    --accent-border: rgba(207, 176, 40, 0.15);
    --card-shadow: rgba(207, 176, 40, 0.06);
    color-scheme: light dark;
}

[data-theme="dark"] {
    --accent: #E0C232;
    --accent-dark: #F0D442;
    --accent-light: #2A2510;
    --accent-brand: #E0C232;
    --bg: #121218;
    --text: #E8E8ED;
    --text-muted: #9CA3AF;
    --surface: #1E1E26;
    --border: #2E2E3A;
    --focus-ring: rgba(224, 194, 50, 0.2);
    --accent-border: rgba(224, 194, 50, 0.15);
    --card-shadow: rgba(224, 194, 50, 0.08);
}

html {
    scroll-behavior: smooth;
    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;
    padding-top: 57px;
    font-size: 16px;
}

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-label {
    grid-column: 1 / -1;
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    padding: 4px 4px 0;
}

.app-menu-label:not(:first-child) {
    border-top: 1px solid var(--border);
    margin-top: 4px;
    padding-top: 10px;
}

@media (max-width: 730px) {
    .app-menu {
        max-height: 70vh;
        overflow-y: auto;
        overflow-x: hidden;
    }
}

.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 */
.calc-sub-result {
    text-align: center;
    font-size: 14px;
    color: var(--text-muted);
    margin-top: 8px;
}

.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: flex-end;
    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;
    background: var(--bg);
}

.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: 46px;
    color: var(--accent);
    flex-shrink: 0;
}

/* 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: 640px;
    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;
}

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

.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 14px;
    background: var(--bg);
    color: var(--text);
    outline: none;
    transition: border-color 0.15s;
}

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

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

.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;
}

/* Hide native number input spinner arrows on hub calculators */
.calc-card input[type="number"]::-webkit-inner-spin-button,
.calc-card input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.calc-card input[type="number"] {
    -moz-appearance: textfield;
}

.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-brand);
}

.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);
    text-decoration: none;
}

.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:not(:first-child) {
    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:visited {
    color: inherit;
}

.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: 80px 40px 64px;
    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: 28px 32px;
    margin: 32px auto 24px;
    max-width: 800px;
}

.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 {
    width: 200px;
    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);
    -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;
    cursor: pointer;
    outline: none;
}

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

/* Select inside calc-input-wrap */
.calc-select {
    border: none;
    outline: none;
    background: none;
    font: inherit;
    font-size: 16px;
    font-weight: 600;
    color: var(--text);
    width: 100%;
    height: 46px;
    padding: 0 32px 0 14px;
    cursor: pointer;
    -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;
}

select option {
    background: var(--bg);
    color: var(--text);
}

select option:checked {
    background: var(--accent-light);
    color: var(--text);
}

[data-theme="dark"] .hero-converter select,
[data-theme="dark"] .calc-card .calc-field select,
[data-theme="dark"] .calculator-card select,
[data-theme="dark"] .calc-select {
    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='%239CA3AF'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.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;
}

.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;
    gap: 6px;
    min-width: 90px;
}

.hero-converter-result output {
    font-size: 16px;
    font-weight: 600;
    color: var(--accent-dark);
    font-variant-numeric: tabular-nums;
    min-width: 60px;
    text-align: right;
}

.hero-unit-select {
    width: 120px;
}

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

/* ─── Info Tooltip ──────────────────────────────────── */
.info-tip {
    position: relative;
    display: inline-block;
}

.info-tip::after {
    content: attr(data-tip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--border);
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.6;
    text-transform: none;
    letter-spacing: normal;
    white-space: normal;
    width: 280px;
    text-align: left;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s;
    z-index: 50;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
}

.info-tip:hover::after {
    opacity: 1;
}

.hero-variants {
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 12px;
    line-height: 1.6;
}

.hero-variants span { white-space: nowrap; }
.hero-variants .hero-variant-sep { margin: 0 6px; opacity: 0.4; }

.hero-converter-link {
    display: block;
    text-align: center;
    margin-top: 16px;
    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: 730px) {
    .hero {
        padding: 48px 20px 40px;
        overflow-x: hidden;
    }

    .hero-converter {
        padding: 20px 16px;
    }

    .hero-converter-row {
        display: grid;
        grid-template-columns: 1fr 2fr;
        gap: 8px;
        align-items: center;
        min-width: 0;
    }

    .hero-converter-row > * {
        min-width: 0;
    }

    .hero-converter-row .hero-calc-label {
        grid-column: 1 / -1;
        text-align: center;
        font-size: 13px;
    }

    .hero-converter-field input {
        width: 100%;
        height: 46px;
    }

    .hero-converter select,
    .hero-unit-select {
        width: 100% !important;
        max-width: 100%;
        height: 46px;
        box-sizing: border-box;
    }

    #heroIngWrap {
        grid-column: 1 / -1;
    }

    #heroIngWrap select {
        width: 100% !important;
    }

    #heroToUnit {
        grid-column: 1 / -1;
    }

    .hero-converter-result-row {
        flex-direction: column;
        gap: 6px;
        margin-top: 0;
    }

    .hero-converter-result {
        width: 100%;
        justify-content: center;
        height: 46px;
    }

    .hero-converter-link {
        font-size: 12px;
    }

    .hero-variants {
        font-size: 11px;
    }

    .hero-try {
        gap: 6px;
    }

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

    .hero-stats {
        gap: 16px;
    }
}

.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-brand);
}

.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,
.category-card:hover,
.category-card p,
.category-card h3 {
    text-decoration: none;
}

.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;
    color: inherit;
    cursor: pointer;
}

.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: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,
.section.content-block ul {
    list-style: none;
    padding-left: 0;
}

.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;
}

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

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

.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;
}

.search-empty {
    text-align: center;
    color: var(--text-muted);
    grid-column: 1 / -1;
}

.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 {
    list-style: disc;
    padding-left: 24px;
    margin-bottom: 12px;
}

.privacy-content 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: 730px) {
    .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;
}

/* Percentage donut chart */
.pct-chart {
    text-align: center;
}

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

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

.pct-donut-fill {
    fill: none;
    stroke: #CFB028;
    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: #CFB028;
}

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

.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: 731px) and (max-width: 960px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

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

    .search-box {
        display: none;
    }

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

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

    .calc-card {
        padding: 20px 16px;
    }

    .calc-card .calc-row {
        gap: 6px;
    }

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

    .calc-of {
        margin: 0;
        font-size: 13px;
    }

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

    .calc-output {
        font-size: 18px;
    }

    .calculator-card {
        padding: 16px;
    }

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

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

    .calculator-card .calc-arrow {
        display: none;
    }

    .calculator-card .calc-result output {
        font-size: 16px;
    }

    .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;
    }
}

/* ═══════════════════════════════════════════════════════
   CookingConvert-specific components
   ═══════════════════════════════════════════════════════ */

/* ─── Ingredient Select ────────────────────────────── */
.ingredient-select {
    width: 100%;
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    outline: none;
    transition: border-color 0.15s;
}

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

/* ─── Result Hero ───────────────────────────────────── */
.result-hero {
    background: var(--accent-light);
    border: 1px solid var(--accent-border);
    border-radius: 12px;
    padding: 32px;
    text-align: center;
    margin-bottom: 24px;
}

.result-from {
    font-size: 16px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-eq {
    font-size: 20px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.result-value {
    font-size: 48px;
    font-weight: 700;
    color: var(--accent-dark);
    line-height: 1.1;
}

.result-unit {
    font-size: 24px;
    font-weight: 600;
    margin-left: 4px;
}

/* ─── Also Converted Grid ───────────────────────────── */
.also-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 8px;
    margin-bottom: 24px;
}

.also-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    text-decoration: none;
    color: var(--text);
    font-size: 14px;
    transition: border-color 0.15s;
}

.also-item:hover { border-color: var(--accent); text-decoration: none; }
.also-label { font-size: 13px; }
.also-value { font-weight: 600; color: var(--accent-dark); white-space: nowrap; }

/* ─── Related Links ─────────────────────────────────── */
.related-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}

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

.related-link:hover { border-color: var(--accent); text-decoration: none; }
.related-link .material-icons-outlined { font-size: 18px; color: var(--accent); }

/* ─── Comparison Chart ──────────────────────────────── */
.comparison-chart {
    width: 100%;
    max-width: 640px;
    margin: 24px 0;
    font-family: inherit;
}

.chart-label { font-size: 13px; fill: var(--text-muted); }
.chart-bar { fill: var(--accent-brand); opacity: 0.6; }
.chart-bar-highlight { opacity: 1; }
.chart-value { font-size: 13px; fill: var(--text); font-weight: 600; }

[data-theme="dark"] .chart-label { fill: #9C9A90; }
[data-theme="dark"] .chart-bar { fill: #E0C232; }
[data-theme="dark"] .chart-value { fill: #EDECE8; }

/* ─── Scale Controls ────────────────────────────────── */
.scale-portions-switch {
    display: inline-flex;
    align-items: center;
    cursor: pointer;
    flex-shrink: 0;
}

.scale-portions-switch input { display: none; }

.scale-switch-slider {
    width: 36px;
    height: 20px;
    background: #B0B0B0;
    border-radius: 10px;
    position: relative;
    transition: background 0.2s;
}

.scale-switch-slider::after {
    content: '';
    position: absolute;
    width: 16px;
    height: 16px;
    background: var(--surface);
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.15);
}

/* ─── Browse Category ───────────────────────────────── */
.browse-cat-title { margin-top: 24px; }
.browse-cat-grid { margin-bottom: 8px; }

/* Amount selector */
.amount-groups {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-top: 12px;
}

.amount-group-label {
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    margin-bottom: 6px;
}

.amount-selector {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.amount-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    background: var(--surface);
    transition: border-color 0.15s, color 0.15s, background 0.15s, box-shadow 0.15s;
    white-space: nowrap;
}

.amount-chip:hover {
    border-color: var(--accent);
    color: var(--accent);
    background: var(--accent-light);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    text-decoration: none;
}

/* ─── Calc Field Wide ──────────────────────────────── */
.calc-field-wide { flex: 2; }

.scale-portions-switch input:checked + .scale-switch-slider {
    background: var(--accent);
}

.scale-portions-switch input:checked + .scale-switch-slider::after {
    transform: translateX(16px);
}

.scale-portions-fields.disabled {
    opacity: 0.35;
    pointer-events: none;
}

.scale-portions-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
    padding: 16px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 10px;
}

.scale-portions-fields {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    transition: opacity 0.2s;
}

/* kept for backward compat - now unused */

.scale-portions-label {
    font-size: 15px;
    color: var(--text-muted);
    font-weight: 500;
}

.scale-portions-input {
    width: 60px;
    height: 38px;
    padding: 0 8px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 16px;
    font-weight: 700;
    text-align: center;
    outline: none;
    -moz-appearance: textfield;
}

.scale-portions-input::-webkit-inner-spin-button,
.scale-portions-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

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

.scale-quick-btns {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.scale-btn {
    padding: 10px 18px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.15s, background 0.15s, color 0.15s;
}

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

.scale-btn.active {
    border-color: var(--accent);
    background: var(--accent-light);
    color: var(--accent);
}

.scale-custom {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-left: 8px;
}

.scale-custom-label {
    font-size: 13px;
    color: var(--text-muted);
    font-weight: 500;
}

.scale-custom-input {
    width: 70px;
    height: 40px;
    padding: 0 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--bg);
    color: var(--text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    outline: none;
    transition: border-color 0.15s;
}

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

.scale-input {
    border: 1px solid transparent;
    border-radius: 4px;
    background: none;
    color: var(--text);
    font: inherit;
    font-size: 14px;
    padding: 4px 8px;
    outline: none;
    transition: border-color 0.15s;
}

.scale-input:focus {
    border-color: var(--accent);
    background: var(--bg);
}

.scale-name-input { width: 100%; }
.scale-amt-input {
    width: 70px;
    text-align: right;
    font-weight: 600;
    -moz-appearance: textfield;
}

.scale-amt-input::-webkit-inner-spin-button,
.scale-amt-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
select.scale-unit-input {
    width: 80px;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background: 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 2px center;
    background-size: 16px;
    padding-right: 20px;
    cursor: pointer;
}

select.scale-unit-input:focus {
    background-color: var(--bg);
    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 2px center;
    background-size: 16px;
}

[data-theme="dark"] select.scale-unit-input,
[data-theme="dark"] select.scale-unit-input:focus {
    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='%239CA3AF'%3E%3Cpath d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
}

.scale-result-cell {
    font-weight: 700;
    font-size: 15px;
    color: var(--accent);
    white-space: nowrap;
}

.scale-output-unit { font-weight: 400; font-size: 13px; }

.scale-remove-cell { width: 32px; text-align: center; }

.scale-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border: none;
    border-radius: 4px;
    background: none;
    color: var(--text-muted);
    cursor: pointer;
    opacity: 0.4;
    transition: opacity 0.15s, color 0.15s;
}

.scale-remove .material-icons-outlined { font-size: 16px; }
.scale-remove:hover { opacity: 1; color: #ef4444; }

.scale-add-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    padding: 8px 16px;
    border: 1px dashed var(--text-muted);
    border-radius: 8px;
    background: none;
    color: var(--text-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.scale-add-btn .material-icons-outlined { font-size: 18px; }
.scale-add-btn:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Search Results ────────────────────────────────── */
.search-results {
    list-style: none;
    margin: 0;
    padding: 0;
}

.search-results li {
    margin: 0;
    border-bottom: 1px solid var(--border);
}

.search-results a {
    display: block;
    padding: 12px 0;
    font-size: 15px;
}

/* ─── Embed Bar ────────────────────────────────────── */
.embed-bar-wrap {
    display: flex;
    justify-content: flex-end;
    gap: 6px;
    margin-top: 10px;
}

.embed-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 4px 10px;
    min-width: 72px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.embed-toggle .material-icons-outlined { font-size: 13px; }
.embed-toggle:hover { border-color: var(--accent); color: var(--accent); }

.embed-panel {
    margin-top: 12px;
}

.embed-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.embed-code {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 6px;
    background: var(--bg);
    color: var(--text);
    font-family: 'Courier New', monospace;
    font-size: 12px;
    resize: vertical;
    outline: none;
}

.embed-code:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px var(--focus-ring);
}

.embed-copy {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 8px;
    padding: 4px 10px;
    border: 1px solid var(--border);
    border-radius: 5px;
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.embed-copy .material-icons-outlined { font-size: 13px; }
.embed-copy:hover { border-color: var(--accent); color: var(--accent); }

/* ─── Print Button ─────────────────────────────────── */
.scale-print-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-top: 12px;
    margin-left: 12px;
    padding: 8px 16px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    color: var(--text-muted);
    font: inherit;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: border-color 0.15s, color 0.15s;
}

.scale-print-btn .material-icons-outlined { font-size: 18px; }
.scale-print-btn:hover { border-color: var(--accent); color: var(--accent); }

@media print {
    .header, .site-footer, .scale-quick-btns, .scale-portions-row,
    .scale-add-btn, .scale-print-btn, .scale-remove, .faq-section,
    .common-queries, .eeat-footer, .breadcrumb, .skip-link { display: none !important; }

    body { padding: 0; background: #fff; color: #000; }
    .main-content { padding: 16px 0; }
    .conv-table th { background: #f5f5f5; }
    .scale-input { border: none; padding: 0; }
    .scale-result-cell { color: #000; }
}

/* ─── CookingConvert Responsive ─────────────────────── */
@media (max-width: 730px) {
    .also-grid { grid-template-columns: 1fr; }
    .result-value { font-size: 36px; }
    .result-hero { padding: 24px 16px; }

    .scale-portions-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
        padding: 12px 16px;
    }

    .scale-portions-fields { width: 100%; }

    .scale-quick-btns {
        gap: 6px;
    }

    .scale-btn {
        padding: 8px 12px;
        font-size: 13px;
    }

    .scale-custom {
        width: 100%;
        margin-left: 0;
        margin-top: 4px;
    }

    .scale-name-input { width: 100%; min-width: 0; }
    .scale-amt-input { width: 55px; }
    select.scale-unit-input { width: 65px; font-size: 12px; }

    .scale-add-btn { width: 100%; justify-content: center; }
    .scale-print-btn { width: 100%; justify-content: center; margin-left: 0; }

    .conv-table td, .conv-table th { padding: 8px 10px; font-size: 13px; }
}
