:root {
    --ink: #1a1a2e;
    --ink-soft: #3f4254;
    --muted: #6b7280;
    --line: #e5e7eb;
    --line-strong: #d1d5db;
    --bg: #f9fafb;
    --surface: #ffffff;
    --surface-soft: #f3f4f6;
    --accent: #4f46e5;
    --accent-dark: #3730a3;
    --success: #16803a;
    --warning: #a16207;
    --danger: #b42318;
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lift: 0 18px 50px rgba(26, 26, 46, 0.10);
    --radius-card: 10px;
    --radius-control: 8px;
    --container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink-soft);
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    font-size: 16px;
    line-height: 1.6;
    overflow-x: hidden;
}

img,
svg,
canvas {
    max-width: 100%;
}

a {
    color: inherit;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    cursor: pointer;
}

:focus-visible {
    outline: 3px solid rgba(79, 70, 229, 0.35);
    outline-offset: 3px;
}

.skip-link {
    position: fixed;
    top: 12px;
    left: 12px;
    z-index: 100;
    transform: translateY(-140%);
    background: var(--ink);
    color: #fff;
    padding: 10px 14px;
    border-radius: var(--radius-control);
}

.skip-link:focus {
    transform: translateY(0);
}

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

.container {
    width: min(100% - 32px, var(--container));
    margin: 0 auto;
}

.narrow {
    width: min(100% - 32px, 780px);
}

.site-header {
    position: sticky;
    top: 0;
    z-index: 40;
    background: rgba(255, 255, 255, 0.94);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.nav-shell {
    min-height: 72px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.brand,
.footer-brand {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--ink);
    font-weight: 800;
}

.brand img,
.footer-brand img {
    width: 132px;
    height: auto;
    object-fit: contain;
}

.brand span,
.footer-brand span {
    border-left: 1px solid var(--line-strong);
    padding-left: 10px;
    color: var(--accent);
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 8px;
}

.site-nav a,
.nav-dropdown > button {
    display: inline-flex;
    align-items: center;
    min-height: 40px;
    padding: 8px 12px;
    border: 0;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--ink);
    text-decoration: none;
    font-weight: 650;
    font-size: 0.94rem;
}

.site-nav a:hover,
.site-nav a.is-active,
.nav-dropdown > button:hover {
    background: var(--surface-soft);
    color: var(--accent);
}

.nav-dropdown {
    position: relative;
}

.nav-dropdown__menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 230px;
    padding: 8px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow-lift);
    opacity: 0;
    transform: translateY(8px);
    pointer-events: none;
    transition: opacity 160ms ease, transform 160ms ease;
}

.nav-dropdown:hover .nav-dropdown__menu,
.nav-dropdown.is-open .nav-dropdown__menu {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.nav-dropdown__menu a {
    display: flex;
    width: 100%;
}

.nav-dropdown__menu button {
    display: flex;
    width: 100%;
    border: 0;
    background: transparent;
    color: var(--ink);
    text-align: left;
    font: inherit;
    font-weight: 650;
    padding: 8px 12px;
    border-radius: var(--radius-control);
    cursor: pointer;
}

.nav-dropdown__menu button:hover,
.nav-dropdown__menu button:focus-visible {
    background: var(--surface-soft);
    color: var(--accent);
    outline: none;
}

.nav-dropdown__label {
    display: block;
    margin: 10px 8px 4px;
    color: var(--muted);
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.nav-toggle {
    display: none;
    width: 42px;
    height: 42px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
}

.nav-toggle span:not(.sr-only) {
    display: block;
    width: 18px;
    height: 2px;
    margin: 4px auto;
    background: var(--ink);
    border-radius: 2px;
}

.hero,
.page-hero,
.tool-hero {
    background: var(--surface);
    border-bottom: 1px solid var(--line);
}

.hero__inner {
    min-height: 560px;
    display: grid;
    place-items: center;
    text-align: center;
    padding: 72px 0 58px;
}

.hero h1,
.page-hero h1,
.tool-hero h1 {
    width: min(100%, 900px);
    max-width: 900px;
    margin: 0 auto 18px;
    color: var(--ink);
    font-size: clamp(2.1rem, 4vw, 3.7rem);
    line-height: 1.08;
    font-weight: 800;
}

.page-hero h1,
.tool-hero h1 {
    font-size: clamp(2rem, 3vw, 2.8rem);
}

.lead {
    width: min(100%, 760px);
    max-width: 760px;
    margin: 0 auto;
    color: var(--muted);
    font-size: 1.12rem;
}

.eyebrow {
    margin: 0 0 10px;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 800;
    text-transform: uppercase;
}

.hero__actions,
.tool-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 10px 18px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    text-decoration: none;
    font-weight: 760;
    transition: transform 160ms ease, background 160ms ease, border-color 160ms ease;
}

.button:hover {
    transform: translateY(-1px);
}

.button--primary {
    background: var(--accent);
    color: #fff;
}

.button--primary:hover {
    background: var(--accent-dark);
}

.button--secondary {
    background: var(--surface);
    border-color: var(--line-strong);
    color: var(--ink);
}

.button--ghost {
    background: transparent;
    border-color: var(--line);
    color: var(--muted);
}

.hero-search {
    width: min(100%, 640px);
    margin-top: 34px;
}

.hero-search input,
.filter-bar input {
    width: 100%;
    min-height: 56px;
    padding: 0 18px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    box-shadow: var(--shadow);
    color: var(--ink);
}

.hero-search p {
    margin: 10px 0 0;
    color: var(--muted);
    font-size: 0.92rem;
}

.search-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.search-chips a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 7px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface-soft);
    color: var(--ink);
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 700;
}

.search-chips a:hover,
.search-chips a:focus-visible {
    border-color: var(--accent);
    color: var(--accent);
}

.section {
    padding: 64px 0;
}

.section--tight {
    padding-top: 16px;
}

.section--muted {
    background: var(--surface-soft);
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.section--tool {
    padding-top: 34px;
}

.section-heading {
    max-width: 720px;
    margin-bottom: 28px;
}

.section-heading h2,
.content-prose h2,
.sidebar-panel h2,
.site-footer h2 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 1.75rem;
    line-height: 1.2;
    font-weight: 750;
}

.section-heading p:not(.eyebrow) {
    margin: 0;
    color: var(--muted);
}

.tool-grid,
.category-grid,
.feature-grid,
.step-grid,
.article-grid,
.sitemap-grid {
    display: grid;
    gap: 18px;
}

.tool-grid--three,
.category-grid,
.feature-grid,
.article-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-grid--four {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.sitemap-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.tool-card,
.category-card,
.feature-grid article,
.step-grid article,
.article-card,
.sidebar-panel,
.faq-item,
.contact-form,
.tool-panel,
.result-panel,
.ad-slot,
.sitemap-grid section {
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    box-shadow: var(--shadow);
}

.tool-card,
.category-card,
.feature-grid article,
.step-grid article,
.article-card,
.sidebar-panel,
.sitemap-grid section {
    padding: 22px;
}

.tool-card {
    min-height: 226px;
    display: flex;
    flex-direction: column;
}

.tool-card--compact {
    min-height: 168px;
}

.tool-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 18px;
}

.tool-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 38px;
    padding: 0 10px;
    border-radius: var(--radius-control);
    background: #eef2ff;
    color: var(--accent);
    font-size: 0.78rem;
    font-weight: 850;
}

.category-pill {
    display: inline-flex;
    align-items: center;
    max-width: 150px;
    min-height: 28px;
    padding: 4px 9px;
    border: 1px solid var(--line);
    border-radius: 999px;
    color: var(--muted);
    font-size: 0.76rem;
    font-weight: 700;
    white-space: nowrap;
}

.tool-card h3,
.category-card h3,
.article-card h3,
.article-card h2,
.feature-grid h3,
.step-grid h3 {
    margin: 0 0 10px;
    color: var(--ink);
    font-size: 1.2rem;
    line-height: 1.25;
}

.tool-card h3 a,
.category-card h3 a,
.article-card a {
    text-decoration: none;
}

.tool-card p,
.category-card p,
.article-card p,
.feature-grid p,
.step-grid p,
.sidebar-panel p {
    margin: 0 0 16px;
    color: var(--muted);
}

.text-link {
    margin-top: auto;
    color: var(--accent);
    text-decoration: none;
    font-weight: 800;
}

.text-link:hover {
    color: var(--accent-dark);
}

.feature-grid span,
.step-grid span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #eef2ff;
    color: var(--accent);
    font-weight: 850;
}

.ad-slot {
    min-height: 96px;
    display: grid;
    place-items: center;
    margin: 28px 0;
    border-style: dashed;
    color: var(--muted);
    background: rgba(255, 255, 255, 0.74);
}

.ad-slot span {
    font-size: 0.78rem;
    text-transform: uppercase;
    font-weight: 800;
}

.page-hero__inner,
.tool-hero__inner {
    padding: 62px 0;
}

.page-hero__inner {
    text-align: center;
}

.page-hero .button {
    margin-top: 24px;
}

.tool-hero__inner {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: center;
    gap: 24px;
}

.tool-hero .lead,
.tool-hero h1 {
    margin-left: 0;
}

.tool-hero__badge .tool-badge {
    width: 86px;
    height: 86px;
    font-size: 1.1rem;
}

.content-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 28px;
    align-items: start;
}

.sidebar {
    display: grid;
    gap: 18px;
    position: sticky;
    top: 94px;
}

.sidebar-panel nav,
.site-footer div,
.sitemap-grid section {
    display: grid;
    gap: 8px;
}

.sidebar-panel a,
.site-footer a,
.sitemap-grid a {
    color: inherit;
    text-decoration: none;
}

.sidebar-panel a:hover,
.site-footer a:hover,
.sitemap-grid a:hover {
    color: var(--accent);
}

.sidebar-panel--accent {
    background: #eef2ff;
    border-color: #c7d2fe;
}

.filter-bar {
    display: grid;
    gap: 14px;
    margin-bottom: 20px;
}

.filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.filter-tabs button,
.segmented button,
.quick-picks button,
.button-grid button,
.list-heading button {
    min-height: 38px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-weight: 730;
}

.filter-tabs button.is-selected,
.segmented button.is-selected,
.quick-picks button:hover,
.button-grid button:hover {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
}

.tool-workspace {
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(320px, 0.9fr);
    gap: 22px;
    align-items: start;
}

.tool-panel,
.result-panel {
    padding: 24px;
}

.tool-panel--wide {
    min-width: 0;
}

.tool-panel label,
.result-panel label,
.contact-form label {
    display: grid;
    gap: 7px;
    margin-bottom: 14px;
    color: var(--ink);
    font-weight: 730;
}

input,
select,
textarea {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
}

textarea {
    resize: vertical;
}

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

.span-2 {
    grid-column: span 2;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px;
}

.segmented,
.quick-picks,
.button-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 18px;
}

.button-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.check-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin: 0 0 18px;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
}

.check-grid legend {
    color: var(--ink);
    font-weight: 800;
}

.check-grid label {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--ink-soft);
    font-weight: 650;
}

.check-grid input[type="checkbox"] {
    width: 18px;
    min-height: 18px;
}

.formula,
.form-note {
    margin: 14px 0 0;
    padding: 12px 14px;
    border-radius: var(--radius-control);
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.92rem;
}

.result-panel h2,
.result-panel h3 {
    margin-top: 0;
    color: var(--ink);
}

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

.metric {
    min-height: 92px;
    padding: 14px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-soft);
}

.metric span {
    display: block;
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 800;
    text-transform: uppercase;
}

.metric strong {
    display: block;
    margin-top: 6px;
    color: var(--ink);
    font-size: 1.35rem;
    line-height: 1.2;
}

.metric.is-good strong {
    color: var(--success);
}

.metric.is-warning strong {
    color: var(--warning);
}

.metric.is-danger strong {
    color: var(--danger);
}

.progress {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    background: var(--surface-soft);
}

.progress span {
    display: block;
    height: 100%;
    width: var(--value, 0%);
    max-width: 100%;
    background: var(--accent);
}

.table-wrap {
    overflow-x: auto;
    margin-top: 18px;
}

.input-table,
.result-table {
    width: 100%;
    border-collapse: collapse;
}

.input-table th,
.input-table td,
.result-table th,
.result-table td {
    padding: 10px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.input-table th,
.result-table th {
    color: var(--ink);
    font-size: 0.86rem;
}

.input-table input {
    min-width: 110px;
}

.small-button {
    min-height: 34px;
    padding: 6px 9px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
}

.invoice-preview {
    background: #fff;
}

.invoice-doc {
    color: var(--ink);
}

.invoice-doc__top {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    border-bottom: 2px solid var(--ink);
    padding-bottom: 16px;
    margin-bottom: 18px;
}

.invoice-doc table {
    width: 100%;
    border-collapse: collapse;
    margin: 18px 0;
}

.invoice-doc th,
.invoice-doc td {
    padding: 10px 8px;
    border-bottom: 1px solid var(--line);
    text-align: left;
}

.invoice-totals {
    margin-left: auto;
    width: min(100%, 280px);
}

.invoice-totals div {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
}

.invoice-totals .total {
    border-top: 2px solid var(--ink);
    margin-top: 6px;
    padding-top: 10px;
    font-weight: 850;
}

.dual-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.list-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.list-heading h2 {
    margin: 0;
    color: var(--ink);
    font-size: 1.2rem;
}

.budget-row {
    display: grid;
    grid-template-columns: 1fr 110px auto;
    gap: 8px;
    margin-bottom: 8px;
}

.password-output {
    display: grid;
    gap: 8px;
    margin-bottom: 16px;
}

.password-line,
.name-line,
.history-line,
.image-line {
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface-soft);
    color: var(--ink);
    overflow-wrap: anywhere;
}

.result-panel--list {
    display: grid;
    gap: 12px;
}

.result-panel--list h2,
.result-panel--list h3 {
    margin-bottom: 0;
}

.history-line p,
.image-line p,
.name-line p {
    margin: 6px 0 10px;
    color: var(--muted);
}

.history-line small,
.image-line small {
    display: block;
    margin-top: 6px;
    color: var(--muted);
}

.pie-chart {
    width: min(220px, 100%);
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    margin: 22px auto 0;
    border-radius: 50%;
    background: conic-gradient(var(--accent) 0 var(--slice, 0%), var(--surface-soft) 0 100%);
}

.pie-chart span {
    width: 58%;
    aspect-ratio: 1;
    display: grid;
    place-items: center;
    padding: 12px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--ink);
    text-align: center;
    font-weight: 800;
    font-size: 0.86rem;
}

.qr-preview {
    display: grid;
    place-items: center;
    min-height: 390px;
}

.drop-zone {
    min-height: 180px;
    display: grid;
    place-items: center;
    text-align: center;
    border: 1px dashed var(--line-strong);
    border-radius: var(--radius-card);
    background: var(--surface-soft);
}

.drop-zone input {
    max-width: 330px;
}

.code-output {
    min-height: 280px;
    padding: 16px;
    overflow: auto;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: #111827;
    color: #e5e7eb;
    white-space: pre-wrap;
}

.faq-list {
    display: grid;
    gap: 12px;
}

.faq-item {
    padding: 0;
    overflow: hidden;
}

.faq-item summary {
    padding: 18px 20px;
    color: var(--ink);
    font-weight: 800;
    cursor: pointer;
}

.faq-item p {
    margin: 0;
    padding: 0 20px 20px;
    color: var(--muted);
}

.content-prose {
    max-width: 780px;
}

.content-prose p,
.content-prose li {
    color: var(--ink-soft);
}

.content-prose h2 {
    margin-top: 30px;
}

.contact-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 320px;
    gap: 24px;
    align-items: start;
}

.contact-form {
    padding: 24px;
}

.notice {
    margin-bottom: 18px;
    padding: 14px;
    border-radius: var(--radius-control);
    background: #ecfdf3;
    color: var(--success);
    font-weight: 750;
}

.final-cta {
    padding: 58px 0;
    background: var(--ink);
    color: #fff;
}

.final-cta__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.final-cta h2 {
    margin: 0;
    font-size: clamp(1.7rem, 3vw, 2.5rem);
    line-height: 1.14;
}

.site-footer {
    background: var(--ink);
    color: rgba(255, 255, 255, 0.78);
    padding: 52px 0 24px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr repeat(3, 1fr);
    gap: 28px;
}

.site-footer h2 {
    color: #fff;
    font-size: 1rem;
}

.site-footer a {
    color: rgba(255, 255, 255, 0.78);
}

.footer-brand {
    color: #fff;
    margin-bottom: 14px;
}

.footer-brand span {
    border-color: rgba(255, 255, 255, 0.24);
}

.footer-small,
.footer-bottom {
    color: rgba(255, 255, 255, 0.58);
    font-size: 0.9rem;
}

.footer-bottom {
    margin-top: 34px;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.is-hidden {
    display: none !important;
}

@media (max-width: 940px) {
    .nav-toggle {
        display: inline-block;
    }

    .site-nav {
        position: absolute;
        left: 16px;
        right: 16px;
        top: 72px;
        display: none;
        padding: 12px;
        background: var(--surface);
        border: 1px solid var(--line);
        border-radius: var(--radius-card);
        box-shadow: var(--shadow-lift);
    }

    .site-nav.is-open {
        display: grid;
        align-items: stretch;
    }

    .nav-dropdown__menu {
        position: static;
        display: none;
        opacity: 1;
        transform: none;
        pointer-events: auto;
        box-shadow: none;
        margin-top: 6px;
    }

    .nav-dropdown.is-open .nav-dropdown__menu {
        display: grid;
    }

    .content-layout,
    .contact-layout,
    .tool-workspace,
    .tool-hero__inner {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }

    .tool-grid--three,
    .category-grid,
    .feature-grid,
    .article-grid,
    .tool-grid--four,
    .step-grid,
    .sitemap-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .tool-hero__badge {
        display: none;
    }
}

@media (max-width: 640px) {
    .container,
    .narrow {
        width: min(100% - 24px, var(--container));
    }

    .hero__inner {
        min-height: auto;
        padding: 52px 0 42px;
    }

    .hero h1,
    .page-hero h1,
    .tool-hero h1 {
        font-size: 1.86rem;
        line-height: 1.18;
        max-width: 100%;
    }

    .lead {
        font-size: 1rem;
    }

    .section-heading h2,
    .content-prose h2 {
        font-size: 1.45rem;
    }

    .section {
        padding: 46px 0;
    }

    .tool-grid--three,
    .category-grid,
    .feature-grid,
    .article-grid,
    .tool-grid--four,
    .step-grid,
    .sitemap-grid,
    .footer-grid,
    .tool-form-grid,
    .form-row,
    .dual-list,
    .check-grid,
    .button-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: auto;
    }

    .tool-panel,
    .result-panel,
    .tool-card,
    .category-card,
    .feature-grid article,
    .step-grid article,
    .article-card,
    .sidebar-panel {
        padding: 18px;
    }

    .tool-card__top {
        align-items: flex-start;
        flex-direction: column;
    }

    .category-pill {
        max-width: 100%;
        white-space: normal;
    }

    .hero__actions,
    .tool-actions,
    .final-cta__inner {
        align-items: stretch;
        flex-direction: column;
    }

    .button {
        width: 100%;
    }

    .budget-row {
        grid-template-columns: 1fr;
    }
}

@media print {
    .site-header,
    .site-footer,
    .tool-panel,
    .ad-slot,
    .tool-hero,
    .section:not(.section--tool) {
        display: none !important;
    }

    body {
        background: #fff;
    }

    .tool-workspace,
    .container {
        display: block;
        width: 100%;
    }

    .result-panel {
        border: 0;
        box-shadow: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        scroll-behavior: auto !important;
        transition: none !important;
        animation: none !important;
    }
}

/* Karav Tools 2026 upgrade layer */
:root {
    --kt-bg: #f8fafc;
    --kt-surface: #ffffff;
    --kt-surface-soft: #f1f5f9;
    --kt-text: #0f172a;
    --kt-text-muted: #475569;
    --kt-text-soft: #64748b;
    --kt-border: #e2e8f0;
    --kt-border-strong: #cbd5e1;
    --kt-primary: #2563eb;
    --kt-primary-hover: #1d4ed8;
    --kt-primary-soft: #dbeafe;
    --kt-accent: #06b6d4;
    --kt-radius-sm: 10px;
    --kt-radius-md: 16px;
    --kt-radius-lg: 22px;
    --kt-shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.06);
    --kt-shadow-md: 0 12px 32px rgba(15, 23, 42, 0.08);
    --kt-shadow-lg: 0 24px 60px rgba(15, 23, 42, 0.12);
}

[data-theme="dark"] {
    --bg: #020617;
    --surface: #0f172a;
    --surface-soft: #111827;
    --ink: #f8fafc;
    --ink-soft: #cbd5e1;
    --muted: #94a3b8;
    --line: #1e293b;
    --line-strong: #334155;
    --accent: #60a5fa;
    --accent-dark: #93c5fd;
    --kt-bg: #020617;
    --kt-surface: #0f172a;
    --kt-surface-soft: #111827;
    --kt-text: #f8fafc;
    --kt-text-muted: #cbd5e1;
    --kt-text-soft: #94a3b8;
    --kt-border: #1e293b;
    --kt-border-strong: #334155;
    --kt-primary: #60a5fa;
    --kt-primary-hover: #93c5fd;
    --kt-primary-soft: rgba(37, 99, 235, 0.16);
}

[data-theme="dark"] .site-header,
[data-theme="dark"] .hero,
[data-theme="dark"] .page-hero,
[data-theme="dark"] .tool-hero {
    background: rgba(15, 23, 42, 0.94);
}

[data-theme="dark"] .brand img,
[data-theme="dark"] .footer-brand img {
    filter: invert(1) brightness(1.15);
}

.brand span,
.footer-brand span {
    min-width: max-content;
}

.nav-search-button,
.theme-toggle {
    min-height: 40px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    font-weight: 750;
}

.nav-search-button kbd {
    margin-left: 6px;
    padding: 2px 5px;
    border-radius: 5px;
    background: var(--surface-soft);
    color: var(--muted);
    font-size: 0.72rem;
}

.lead--small {
    margin-top: 12px;
    font-size: 1rem;
}

.trust-pills {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-top: 22px;
}

.trust-pills span,
.breadcrumbs a,
.breadcrumbs span {
    display: inline-flex;
    align-items: center;
    min-height: 30px;
    padding: 5px 10px;
    border: 1px solid var(--line);
    border-radius: 999px;
    background: var(--surface);
    color: var(--muted);
    font-size: 0.82rem;
    font-weight: 750;
    text-decoration: none;
}

.breadcrumbs {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 18px 0 0;
}

.task-grid,
.workflow-grid,
.tool-guide-grid {
    display: grid;
    gap: 18px;
}

.task-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
}

.task-card,
.workflow-card,
.info-card,
.disclaimer-box,
.trust-notice,
.preview-card {
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow);
}

.task-card {
    display: grid;
    gap: 8px;
    padding: 18px;
    text-decoration: none;
}

.task-card span {
    width: 42px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: var(--radius-control);
    background: var(--kt-primary-soft);
    color: var(--accent);
    font-weight: 850;
    font-size: 0.78rem;
}

.task-card strong,
.workflow-card h3,
.info-card h3,
.disclaimer-box h2 {
    color: var(--ink);
}

.task-card small {
    color: var(--muted);
}

.workflow-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.workflow-card,
.info-card,
.disclaimer-box {
    padding: 22px;
}

.workflow-card ol,
.info-card ul {
    margin: 0;
    padding-left: 20px;
}

.workflow-card a {
    color: var(--accent);
    font-weight: 760;
    text-decoration: none;
}

.tool-guide-grid {
    grid-template-columns: minmax(0, 1fr) 340px;
    align-items: start;
}

.guide-sidecards {
    display: grid;
    gap: 16px;
}

.trust-notice {
    display: inline-block;
    margin-top: 18px;
    padding: 12px 14px;
    color: var(--muted);
    background: var(--surface-soft);
}

.disclaimer-box {
    background: #fff7ed;
    border-color: #fed7aa;
}

[data-theme="dark"] .disclaimer-box {
    background: rgba(245, 158, 11, 0.12);
    border-color: rgba(245, 158, 11, 0.3);
}

.ad-slot {
    margin: 56px 0;
    display: grid;
    gap: 8px;
    border: 0;
    box-shadow: none;
    background: transparent;
}

.ad-label {
    text-align: center;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
}

.ad-box {
    min-height: 96px;
    border: 1px dashed var(--line);
    border-radius: var(--kt-radius-md);
    background: var(--surface-soft);
}

.ad-after-tool .ad-slot {
    margin-top: 64px;
}

.command-palette[hidden] {
    display: none;
}

.command-palette {
    position: fixed;
    inset: 0;
    z-index: 100;
}

.command-palette__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 6, 23, 0.54);
}

.command-palette__dialog {
    position: relative;
    width: min(720px, calc(100% - 24px));
    margin: 8vh auto;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: var(--kt-radius-lg);
    background: var(--surface);
    box-shadow: var(--kt-shadow-lg);
}

.command-palette__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.command-palette__top h2 {
    margin: 0;
    color: var(--ink);
}

.command-palette__results {
    display: grid;
    gap: 8px;
    max-height: 55vh;
    overflow: auto;
    margin-top: 12px;
}

.command-section-label {
    margin: 8px 4px 0;
    color: var(--muted);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.command-result {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 4px 12px;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-control);
    text-decoration: none;
}

.command-result strong {
    color: var(--ink);
}

.command-result span,
.command-result small {
    color: var(--muted);
}

.empty-state,
.short-answer-box {
    margin: 0;
    padding: 16px;
    border: 1px solid var(--line);
    border-radius: var(--kt-radius-md);
    background: var(--surface-soft);
    color: var(--muted);
}

.short-answer-box {
    margin-bottom: 22px;
    color: var(--text);
}

.toast-region {
    position: fixed;
    right: 18px;
    bottom: 18px;
    z-index: 120;
    display: grid;
    gap: 8px;
}

.toast {
    transform: translateY(12px);
    opacity: 0;
    max-width: 320px;
    padding: 12px 14px;
    border-radius: var(--radius-control);
    background: var(--ink);
    color: var(--surface);
    box-shadow: var(--kt-shadow-md);
    transition: opacity 160ms ease, transform 160ms ease;
}

.toast.is-visible {
    transform: translateY(0);
    opacity: 1;
}

.toast--error {
    background: var(--danger);
    color: #fff;
}

.invoice-logo {
    max-width: 130px;
    max-height: 64px;
    object-fit: contain;
    margin-bottom: 10px;
}

.invoice-doc--modern {
    border-top: 8px solid var(--accent);
    padding-top: 16px;
}

.invoice-doc--minimal .invoice-doc__top {
    border-bottom-width: 1px;
}

.invoice-doc--bold {
    font-size: 1.04rem;
}

.qr-preview [data-qr-output] {
    position: relative;
    display: inline-grid;
    place-items: center;
}

.qr-logo {
    position: absolute;
    width: 20%;
    height: 20%;
    padding: 6px;
    border-radius: 12px;
    background: #fff;
    object-fit: contain;
    box-shadow: var(--shadow);
}

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

.preview-card {
    padding: 14px;
}

.preview-card strong,
.preview-card span {
    display: block;
}

.preview-card span {
    color: #15803d;
    font-size: 0.86rem;
}

.preview-card img {
    width: 100%;
    max-height: 120px;
    object-fit: cover;
    border-radius: var(--radius-control);
    margin-bottom: 8px;
}

.result-copy {
    margin-top: 14px;
}

.footer-grid {
    grid-template-columns: 1.35fr repeat(3, 1fr);
}

@media (max-width: 940px) {
    .task-grid,
    .workflow-grid,
    .tool-guide-grid,
    .preview-grid,
    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .nav-search-button,
    .theme-toggle {
        justify-content: flex-start;
    }
}

@media (max-width: 640px) {
    .task-grid,
    .workflow-grid,
    .tool-guide-grid,
    .preview-grid,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .command-palette__dialog {
        margin-top: 4vh;
    }

    .toast-region {
        left: 12px;
        right: 12px;
    }
}
