:root {
    --bg-white: #ffffff;
    --bg-off-white: #f8fafc;
    --bg-gray: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --accent: #f83031;
    --accent-hover: #d91f23;
    --accent-soft: #fff0f0;
    --border: #e2e8f0;
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.07);
    --radius: 12px;
    --radius-sm: 8px;
    --header-h: 64px;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--header-h);
}

body {
    margin: 0;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background: var(--bg-off-white);
    color: var(--text-primary);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    display: block;
    max-width: 100%;
}

a {
    color: inherit;
    text-decoration: none;
    -webkit-tap-highlight-color: transparent;
}

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

button {
    color: inherit;
    -webkit-tap-highlight-color: transparent;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.shell {
    width: min(1200px, calc(100% - 2.5rem));
    margin: 0 auto;
}

.shell-home {
    max-width: 760px;
}

.shell-single,
.shell-narrow {
    max-width: 980px;
}

main {
    min-height: 60vh;
}

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

.header-shell {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: var(--header-h);
}

.brand {
    display: inline-flex;
    align-items: center;
    color: var(--text-primary);
    white-space: nowrap;
}

.brand-logo {
    display: block;
    width: auto;
    height: 36px;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-toggle {
    background: none;
    border: 0;
    padding: 0.25rem;
    font-size: 1.15rem;
    cursor: pointer;
    color: var(--text-secondary);
}

.nav-toggle {
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
    border-radius: 999px;
    padding: 0.45rem 0.85rem;
    font-size: 0.94rem;
    font-weight: 500;
    cursor: pointer;
}

.site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1.4rem 1.25rem;
    background: var(--bg-white);
    border-bottom: 1px solid var(--border);
    box-shadow: var(--shadow-md);
    transform: translateY(-120%);
    opacity: 0;
    pointer-events: none;
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.site-nav.is-open {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.site-nav a {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
}

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

.search-bar-wrapper {
    position: relative;
    padding-bottom: 1rem;
}

.search-bar-wrapper[hidden] {
    display: none;
}

.search-bar-wrapper input {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
}

[data-search-results] {
    position: absolute;
    top: calc(100% - 0.45rem);
    left: 0;
    right: 0;
    display: none;
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-md);
    overflow: hidden;
    z-index: 30;
}

[data-search-results].is-open {
    display: block;
}

[data-search-results] a {
    display: block;
    padding: 0.8rem 1rem;
    border-top: 1px solid var(--border);
}

[data-search-results] a:first-child {
    border-top: 0;
}

[data-search-results] a:hover {
    background: var(--bg-off-white);
}

[data-search-results] strong {
    display: block;
    color: var(--text-primary);
    font-size: 0.95rem;
}

[data-search-results] small {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.search-empty {
    padding: 0.8rem 1rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.hero {
    padding: 3.5rem 0 2.5rem;
    background: linear-gradient(180deg, var(--bg-white) 0%, var(--bg-off-white) 100%);
    text-align: center;
}

.hero h1,
.page-section h1,
.page-hero h1 {
    margin: 0 0 0.75rem;
    font-size: clamp(2rem, 5vw, 3.4rem);
    line-height: 1.15;
    font-weight: 700;
}

.hero p,
.page-section > .shell > p,
.page-hero p,
.section-head p,
.category-card p,
.tool-card p,
.feature-card p,
.footer-brand p,
.footer-col a,
.reading-flow p,
.faq-item p,
.field-help,
.filter-summary,
.result-banner p,
.empty-card p {
    color: var(--text-secondary);
}

.hero p {
    max-width: 660px;
    margin: 0 auto 2rem;
    font-size: 1.08rem;
}

.hero-search {
    max-width: 500px;
    margin: 0 auto;
}

.hero-search input {
    width: 100%;
    padding: 0.85rem 1.25rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.page-section,
.page-hero {
    padding: 2.5rem 0 4rem;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.3rem;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover,
.breadcrumb .current {
    color: var(--text-secondary);
}

.section {
    padding: 0 0 4rem;
}

.section-head {
    margin-bottom: 2rem;
}

.section-head-center {
    text-align: center;
}

.section-head h2,
.reading-flow h2,
.related-tools h2,
.empty-card h2,
.side-card h2 {
    margin: 0 0 0.5rem;
    font-size: 1.85rem;
    line-height: 1.2;
}

.section-head p {
    max-width: 560px;
    margin: 0;
}

.section-head-center p {
    margin: 0 auto;
}

.category-grid,
.tool-grid,
.feature-grid,
.mini-grid,
.stats-grid,
.faq-list,
.font-preview-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
}

.category-grid-action {
    display: grid;
    width: 100%;
    place-items: center;
    margin: 1.75rem auto 0;
    text-align: center;
}

.category-grid-action .button {
    min-width: 168px;
}

.category-card,
.tool-card,
.feature-card,
.mini-card,
.empty-card,
.tool-box,
.result-card,
.faq-item,
.side-card,
.font-preview-card {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
}

.category-card,
.tool-card,
.feature-card,
.mini-card,
.empty-card {
    padding: 1.3rem 1.15rem;
}

.category-card,
.tool-card {
    display: block;
    color: var(--text-primary);
    transition: box-shadow 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

.category-card:hover,
.tool-card:hover {
    border-color: #cbd5e1;
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.category-card h3,
.tool-card h2,
.tool-card h3,
.feature-card h3,
.mini-card h3,
.faq-item h3,
.result-card h3 {
    margin: 0 0 0.35rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.tool-card p,
.feature-card p,
.mini-card p {
    margin: 0;
    font-size: 0.92rem;
}

.category-card p {
    margin: 0 0 0.7rem;
    font-size: 0.94rem;
}

.card-link {
    display: inline-block;
    margin-top: 0.1rem;
    color: var(--accent);
    font-size: 0.9rem;
    font-weight: 500;
}

.feature-grid {
    gap: 1.5rem;
}

.feature-card {
    text-align: center;
    padding: 2rem 1.5rem;
}

.feature-icon {
    display: block;
    margin-bottom: 0.75rem;
    font-size: 2rem;
}

.filter-summary {
    margin: 0.2rem 0 1rem;
    font-size: 0.95rem;
}

.category-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 0.55rem;
    margin: 1.5rem 0 2rem;
}

.tab-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 999px;
    background: var(--bg-white);
    color: var(--text-secondary);
    font-size: 0.86rem;
    font-weight: 500;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.tab-chip:hover,
.tab-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
    color: #ffffff;
}

.tool-box {
    margin: 2rem 0;
    overflow: hidden;
}

.tool-box-head {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--border);
    background: var(--bg-off-white);
}

.tool-box-head h2 {
    margin: 0;
    font-size: 1.08rem;
    font-weight: 600;
}

.tool-box-body {
    padding: 1.5rem;
}

.tool-form,
.client-tool {
    display: grid;
    gap: 1rem;
}

.field {
    display: grid;
    gap: 0.45rem;
}

.field label {
    font-weight: 500;
}

.field input,
.field select,
.field textarea,
.client-tool input,
.client-tool textarea,
.result-card textarea {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-white);
    color: var(--text-primary);
}

.field textarea,
.client-tool textarea,
.result-card textarea {
    min-height: 160px;
    resize: vertical;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.client-tool input:focus,
.client-tool textarea:focus,
.hero-search input:focus,
.search-bar-wrapper input:focus,
.result-card textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(248, 48, 49, 0.15);
}

.checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    color: var(--text-secondary);
}

.checkbox input {
    width: auto;
}

.button,
.hero-actions a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    border-radius: var(--radius-sm);
    padding: 0.72rem 1.15rem;
    border: 0;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.12s ease;
}

.button:active,
.hero-actions a:active {
    transform: scale(0.98);
}

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

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

.button-secondary {
    background: var(--bg-gray);
    color: var(--text-primary);
    border: 1px solid var(--border);
}

.button-secondary:hover {
    background: #e2e8f0;
}

.button-small {
    padding: 0.55rem 0.9rem;
    font-size: 0.88rem;
}

.button-block {
    width: 100%;
}

.button-row,
.download-list,
.hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.result-stack {
    display: grid;
    gap: 1rem;
    margin-top: 1rem;
}

.result-banner {
    padding: 1rem 1.1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-off-white);
}

.result-success {
    background: var(--accent-soft);
    border-color: #bfdbfe;
}

.result-error {
    background: #fff1f2;
    border-color: #fecdd3;
}

.result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.result-card {
    padding: 1rem;
}

.result-image,
.preview-block,
.preview-card,
.preview-swatch,
.preview-contrast {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.preview-block,
.preview-card,
.preview-contrast {
    display: grid;
    place-items: center;
    min-height: 180px;
    padding: 1rem;
    background: var(--bg-white);
}

.preview-swatch {
    min-height: 130px;
}

.swatch-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin: 0.75rem 0;
}

.swatch-row span {
    display: block;
    aspect-ratio: 1 / 1;
    border-radius: 10px;
}

.stats-grid {
    gap: 0.75rem;
}

.stat-chip {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--bg-off-white);
}

.stat-chip span {
    color: var(--text-secondary);
}

.stat-chip strong {
    color: var(--text-primary);
}

.table-wrap {
    overflow-x: auto;
}

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

.result-table th,
.result-table td {
    padding: 0.85rem 0.75rem;
    border-bottom: 1px solid var(--border);
    text-align: left;
    vertical-align: top;
}

.result-table th {
    width: 36%;
    color: var(--text-secondary);
    font-weight: 600;
}

.reading-flow {
    display: grid;
    gap: 1rem;
}

.page-content-page {
    padding-bottom: 3rem;
}

.content-sheet {
    background: var(--bg-white);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) + 2px);
    box-shadow: var(--shadow-sm);
    padding: 1.6rem 1.4rem;
}

.content-intro {
    display: grid;
    gap: 0.8rem;
    margin-bottom: 1.3rem;
}

.content-intro h1 {
    margin-bottom: 0;
}

.content-lead {
    margin: 0;
    max-width: 720px;
    font-size: 1rem;
    color: var(--text-secondary);
}

.content-meta {
    margin: 0;
    font-size: 0.88rem;
    color: var(--text-muted);
}

.content-copy {
    gap: 0.9rem;
}

.content-block {
    display: grid;
    gap: 0.75rem;
}

.content-copy p {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.75;
}

.content-copy a {
    color: var(--accent);
    font-weight: 500;
}

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

.content-list {
    margin: 0;
    padding-left: 1.2rem;
    color: var(--text-secondary);
}

.content-list li {
    margin-bottom: 0.7rem;
    line-height: 1.7;
}

.content-list li:last-child {
    margin-bottom: 0;
}

.contact-line {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    align-items: baseline;
}

.step-list {
    margin: 0;
    padding-left: 1.35rem;
    color: var(--text-secondary);
}

.step-list li {
    margin-bottom: 0.75rem;
}

.step-list strong {
    color: var(--text-primary);
}

.tool-guide {
    margin-top: 1rem;
}

.tool-note {
    margin-bottom: 2rem;
}

.related-tools {
    margin-top: 2.75rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.related-grid {
    margin-top: 1rem;
}

.seo-copy {
    padding-top: 0;
}

.faq-item {
    padding: 1rem 1.15rem;
}

.faq-item h3 {
    font-size: 1rem;
}

.faq-item p {
    margin: 0;
    font-size: 0.95rem;
}

.empty-card {
    grid-column: 1 / -1;
    text-align: center;
    padding: 2rem 1.25rem;
}

.side-card {
    padding: 1rem;
}

.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border);
    margin-top: 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    padding: 3rem 0 2rem;
}

.brand-footer {
    display: inline-flex;
}

.brand-footer .brand-logo {
    height: 32px;
}

.footer-brand p {
    margin: 0.6rem 0 0;
    max-width: 320px;
    font-size: 0.94rem;
}

.footer-col h2 {
    margin: 0 0 0.75rem;
    font-size: 1rem;
}

.footer-col a {
    display: block;
    padding: 0.2rem 0;
    font-size: 0.94rem;
}

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

.footer-bottom {
    border-top: 1px solid var(--border);
    padding: 1.4rem 0 1.6rem;
    text-align: center;
    font-size: 0.86rem;
    color: var(--text-muted);
}

.client-tool p {
    margin: 0;
}

.typing-workbench {
    display: grid;
    gap: 1.25rem;
}

.typing-workbench-head,
.typing-card-head,
.typing-meta,
.typing-status-stack,
.typing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.typing-workbench-head,
.typing-card-head {
    align-items: flex-start;
    justify-content: space-between;
}

.typing-status-stack {
    align-items: center;
}

.typing-section-label,
.typing-card-label,
.typing-current-label,
.typing-suggestion-rank {
    color: var(--text-muted);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.03em;
}

.typing-workbench-head h3,
.typing-card-head h3 {
    margin: 0.15rem 0 0;
    font-size: 1.08rem;
    line-height: 1.3;
}

.typing-workbench-head p,
.typing-card-head p {
    margin: 0.35rem 0 0;
    max-width: 620px;
    font-size: 0.94rem;
    color: var(--text-secondary);
}

.typing-live-pill,
.typing-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 2rem;
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    font-size: 0.82rem;
    font-weight: 600;
}

.typing-live-pill {
    background: #eff6ff;
    color: var(--accent);
}

.typing-status {
    border: 1px solid var(--border);
    background: var(--bg-off-white);
    color: var(--text-secondary);
}

.typing-status.is-loading {
    background: #eff6ff;
    border-color: #bfdbfe;
    color: #1d4ed8;
}

.typing-status.is-ready {
    background: #ecfeff;
    border-color: #a5f3fc;
    color: #0f766e;
}

.typing-status.is-error {
    background: #fff1f2;
    border-color: #fecdd3;
    color: #be123c;
}

.typing-editor-grid,
.typing-choice-panel {
    display: grid;
    gap: 1rem;
}

.typing-card,
.typing-current-card {
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
}

.typing-card {
    display: grid;
    gap: 1rem;
}

.typing-example-strip,
.typing-suggestion-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.typing-example-chip,
.typing-suggestion-chip,
.typing-empty-chip {
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--bg-white);
    color: var(--text-primary);
}

.typing-example-chip {
    padding: 0.55rem 0.9rem;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.typing-example-chip:hover {
    border-color: #cbd5e1;
    background: var(--bg-off-white);
}

.typing-textarea {
    min-height: 220px;
}

.typing-meta {
    align-items: center;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.typing-choice-panel {
    padding-top: 0.2rem;
}

.typing-current-card {
    display: grid;
    gap: 0.15rem;
    background: var(--bg-off-white);
}

.typing-current-card strong {
    font-size: 1rem;
    line-height: 1.35;
}

.typing-current-card small {
    color: var(--text-secondary);
}

.typing-current-card.is-loading {
    border-color: #bfdbfe;
}

.typing-current-card.is-ready {
    border-color: #cbd5e1;
}

.typing-empty-chip {
    display: inline-flex;
    align-items: center;
    padding: 0.65rem 0.95rem;
    color: var(--text-secondary);
}

.typing-suggestion-chip {
    display: grid;
    gap: 0.08rem;
    padding: 0.7rem 0.95rem;
    text-align: left;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}

.typing-suggestion-chip:hover {
    border-color: #cbd5e1;
    background: var(--bg-off-white);
}

.typing-suggestion-chip.is-active {
    border-color: var(--accent);
    background: var(--accent-soft);
    box-shadow: 0 0 0 3px rgba(248, 48, 49, 0.12);
}

.typing-suggestion-word {
    font-size: 0.98rem;
    font-weight: 600;
}

.password-output-row {
    display: grid;
    gap: 0.75rem;
}

.range-group {
    display: grid;
    gap: 0.75rem;
}

.range-group label {
    color: var(--text-primary);
}

.range-group input[type="range"] {
    width: 100%;
    accent-color: var(--accent);
}

.options-group {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem 1.5rem;
}

.options-group label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.options-group input[type="checkbox"] {
    width: 1rem;
    height: 1rem;
    accent-color: var(--accent);
}

.timer-display {
    display: grid;
    place-items: center;
    min-height: 140px;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    background: var(--bg-off-white);
    color: var(--accent);
    font-size: clamp(2rem, 8vw, 3.25rem);
    font-weight: 700;
}

.typing-sample {
    padding: 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-off-white);
}

.keyboard {
    display: grid;
    gap: 0.5rem;
}

.keyboard-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.45rem;
}

.keyboard button {
    min-width: 2.7rem;
    padding: 0.65rem 0.8rem;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: var(--bg-white);
    cursor: pointer;
}

.font-preview-card {
    padding: 1rem;
}

.font-preview-card strong {
    display: block;
    margin-bottom: 0.35rem;
}

.font-style-sans {
    font-family: "Noto Sans Malayalam", Inter, sans-serif;
}

.font-style-serif {
    font-family: "Noto Serif Malayalam", Georgia, serif;
}

.font-style-mono {
    font-family: "SF Mono", Consolas, monospace;
}

.font-style-wide {
    letter-spacing: 0.08em;
}

.preview-grid,
.preview-flex {
    min-height: 200px;
    padding: 1rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--bg-white);
}

.preview-grid span,
.preview-flex span {
    display: grid;
    place-items: center;
    min-height: 56px;
    border-radius: 12px;
    background: #eff6ff;
    color: #1d4ed8;
    font-weight: 600;
}

.kv-list {
    display: grid;
    gap: 0.6rem;
}

.kv-row {
    display: grid;
    gap: 0.25rem;
    padding: 0.85rem 0.95rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
}

.diff-table {
    display: grid;
    gap: 0.5rem;
}

.diff-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.75rem;
}

.diff-row span {
    padding: 0.8rem;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--bg-white);
    white-space: pre-wrap;
}

.diff-row.changed span {
    background: #fefce8;
}

.filters {
    display: grid;
    gap: 0.75rem;
    max-width: 640px;
    margin-top: 1.25rem;
}

@media (max-width: 767px) {
    .shell {
        width: min(1200px, calc(100% - 1.5rem));
    }

    .hero {
        padding: 3rem 0 2.2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .page-section,
    .page-hero {
        padding: 2rem 0 3.5rem;
    }

    .page-content-page {
        padding-bottom: 2.5rem;
    }

    .section-head h2,
    .reading-flow h2,
    .related-tools h2 {
        font-size: 1.55rem;
    }

    .content-sheet {
        padding: 1.25rem 1rem;
    }

    .content-intro {
        gap: 0.65rem;
        margin-bottom: 1rem;
    }

    .tool-box-body {
        padding: 1rem;
    }

    .options-group {
        flex-direction: column;
        gap: 0.75rem;
    }

    .typing-meta {
        flex-direction: column;
        align-items: flex-start;
    }
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        position: static;
        flex-direction: row;
        align-items: center;
        gap: 2rem;
        padding: 0;
        background: transparent;
        border: 0;
        box-shadow: none;
        transform: none;
        opacity: 1;
        pointer-events: auto;
    }

    .search-bar-wrapper {
        max-width: 360px;
        margin-left: auto;
    }

    .category-grid,
    .tool-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

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

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

    .footer-grid {
        grid-template-columns: 2fr 1fr 1fr 1fr;
    }

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

    .password-output-row {
        grid-template-columns: minmax(0, 1fr) auto;
        align-items: center;
    }

    .range-group {
        grid-template-columns: auto minmax(0, 1fr);
        align-items: center;
        column-gap: 1rem;
    }

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

    .typing-choice-panel {
        grid-template-columns: minmax(240px, 0.9fr) minmax(0, 1.1fr);
        align-items: start;
    }
}

@media (min-width: 1024px) {
    .category-grid,
    .tool-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

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

/* Modern interface refresh */
:root {
    --bg-white: #ffffff;
    --bg-off-white: #f6f8fc;
    --bg-gray: #eef2f8;
    --text-primary: #14213a;
    --text-secondary: #526079;
    --text-muted: #8b97aa;
    --accent: #f83031;
    --accent-hover: #d91f23;
    --accent-soft: #fff0f0;
    --coral: #f0526f;
    --border: #dfe5ef;
    --border-strong: #cdd6e4;
    --shadow-sm: 0 1px 2px rgba(20, 33, 58, 0.04), 0 6px 18px rgba(20, 33, 58, 0.03);
    --shadow-md: 0 18px 50px rgba(20, 33, 58, 0.1);
    --shadow-card: 0 12px 34px rgba(20, 33, 58, 0.06);
    --radius: 18px;
    --radius-sm: 12px;
    --header-h: 72px;
    color-scheme: light;
}

html {
    background: var(--bg-off-white);
}

body {
    overflow-x: hidden;
    font-family: "Avenir Next", Avenir, "Segoe UI Variable", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at 6% 12%, rgba(248, 48, 49, 0.05), transparent 25rem),
        radial-gradient(circle at 94% 38%, rgba(240, 82, 111, 0.035), transparent 24rem),
        var(--bg-off-white);
    color: var(--text-primary);
    line-height: 1.58;
    text-rendering: optimizeLegibility;
}

::selection {
    background: #ffd9da;
    color: var(--text-primary);
}

.shell {
    width: min(1120px, calc(100% - 3rem));
}

.shell-home {
    max-width: 800px;
}

.shell-single {
    max-width: 960px;
}

.shell-narrow {
    max-width: 880px;
}

.site-header {
    min-height: var(--header-h);
    background: rgba(255, 255, 255, 0.86);
    border-bottom-color: rgba(205, 214, 228, 0.72);
    box-shadow: 0 1px 0 rgba(20, 33, 58, 0.02);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    backdrop-filter: saturate(180%) blur(20px);
}

.header-shell {
    min-height: var(--header-h);
}

.brand-logo {
    height: 38px;
}

.site-nav {
    gap: 0.25rem;
}

.site-nav a {
    border-radius: 999px;
    padding: 0.52rem 0.88rem;
    font-size: 0.93rem;
    font-weight: 600;
    transition: color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.site-nav a:hover,
.site-nav a.is-current {
    background: var(--accent-soft);
    color: var(--accent);
}

.site-nav a:active {
    transform: scale(0.97);
}

.search-toggle,
.nav-toggle {
    min-width: 42px;
    min-height: 42px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 3px 10px rgba(20, 33, 58, 0.04);
}

.search-toggle {
    display: grid;
    place-items: center;
    padding: 0;
    border-radius: 50%;
}

.search-toggle:hover,
.search-toggle[aria-expanded="true"] {
    border-color: #f5b5b7;
    background: var(--accent-soft);
    color: var(--accent);
}

.search-toggle svg {
    width: 19px;
    height: 19px;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-width: 1.8;
}

.nav-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.78rem;
    font-size: 0.82rem;
    font-weight: 700;
}

.menu-lines {
    display: grid;
    gap: 4px;
    width: 16px;
}

.menu-lines i {
    display: block;
    width: 100%;
    height: 1.5px;
    border-radius: 99px;
    background: currentColor;
    transition: transform 0.2s ease;
}

.nav-toggle[aria-expanded="true"] .menu-lines i:first-child {
    transform: translateY(2.75px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .menu-lines i:last-child {
    transform: translateY(-2.75px) rotate(-45deg);
}

.search-bar-wrapper {
    padding-bottom: 0.85rem;
}

.search-bar-wrapper input,
.hero-search input {
    border-color: var(--border-strong);
    background-color: rgba(255, 255, 255, 0.96);
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%238b97aa' stroke-width='1.8' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='6.5'/%3E%3Cpath d='m16 16 4 4'/%3E%3C/svg%3E");
    background-position: 1rem center;
    background-repeat: no-repeat;
    box-shadow: 0 9px 28px rgba(20, 33, 58, 0.06);
}

.search-bar-wrapper input {
    min-height: 46px;
    padding-left: 3rem;
}

[data-search-results] {
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

[data-search-results] a {
    padding: 0.85rem 1rem;
}

.hero {
    position: relative;
    overflow: hidden;
    padding: 3.55rem 0 3.1rem;
    background:
        radial-gradient(circle at 50% -35%, rgba(248, 48, 49, 0.12), transparent 34rem),
        linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(246, 248, 252, 0.7));
}

.hero::before,
.hero::after {
    position: absolute;
    border-radius: 50%;
    content: "";
    pointer-events: none;
    filter: blur(2px);
}

.hero::before {
    top: 1.7rem;
    left: calc(50% - 390px);
    width: 8px;
    height: 8px;
    background: var(--coral);
    box-shadow: 0 0 0 7px rgba(240, 82, 111, 0.08);
}

.hero::after {
    right: calc(50% - 420px);
    bottom: 4.2rem;
    width: 10px;
    height: 10px;
    background: var(--accent);
    box-shadow: 0 0 0 9px rgba(248, 48, 49, 0.07);
}

.hero-kicker {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    border: 1px solid #f2d0d1;
    border-radius: 999px;
    padding: 0.38rem 0.7rem;
    background: rgba(255, 255, 255, 0.75);
    color: #455574;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.02em;
    box-shadow: 0 5px 16px rgba(20, 33, 58, 0.04);
}

.hero-kicker > span {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #25a875;
    box-shadow: 0 0 0 4px rgba(37, 168, 117, 0.1);
}

.hero h1,
.page-section h1,
.page-hero h1 {
    letter-spacing: -0.045em;
}

.hero h1 {
    max-width: 790px;
    margin: 0 auto 1rem;
    font-size: clamp(2.55rem, 6vw, 4.2rem);
    line-height: 1.04;
    font-weight: 700;
}

.hero p {
    max-width: 680px;
    margin-bottom: 2.15rem;
    font-size: 1.06rem;
    line-height: 1.7;
}

.hero-search {
    max-width: 570px;
}

.hero-search input {
    min-height: 58px;
    padding: 0.9rem 1.4rem 0.9rem 3.2rem;
    border-radius: 18px;
    font-size: 0.98rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.hero-search input:focus {
    transform: translateY(-1px);
    box-shadow: 0 14px 36px rgba(248, 48, 49, 0.11), 0 0 0 4px rgba(248, 48, 49, 0.1);
}

.section {
    padding-bottom: 5rem;
}

.section-head {
    margin-bottom: 1.75rem;
}

.section-head h2,
.reading-flow h2,
.related-tools h2,
.empty-card h2,
.side-card h2 {
    letter-spacing: -0.035em;
    font-size: 1.85rem;
    font-weight: 680;
}

.section-head p {
    font-size: 0.96rem;
}

.category-grid,
.tool-grid,
.feature-grid,
.mini-grid {
    gap: 0.9rem;
}

.category-card,
.tool-card,
.feature-card,
.mini-card,
.empty-card,
.tool-box,
.result-card,
.faq-item,
.side-card,
.font-preview-card,
.content-sheet {
    border-color: rgba(205, 214, 228, 0.86);
    box-shadow: var(--shadow-sm);
}

.category-card,
.tool-card {
    position: relative;
    overflow: hidden;
    transition: border-color 0.2s ease, box-shadow 0.25s ease, transform 0.25s ease, background 0.2s ease;
}

.category-card::after,
.tool-card::before {
    position: absolute;
    content: "";
    pointer-events: none;
}

.category-card::after {
    right: -32px;
    bottom: -42px;
    width: 105px;
    height: 105px;
    border-radius: 50%;
    background: rgba(248, 48, 49, 0.035);
}

.category-card:hover,
.tool-card:hover {
    border-color: #bfcce0;
    background: #ffffff;
    box-shadow: var(--shadow-card);
    transform: translateY(-3px);
}

.category-card {
    display: flex;
    min-height: 184px;
    flex-direction: column;
    padding: 1.35rem;
}

.category-card h3 {
    display: flex;
    align-items: center;
    gap: 0.72rem;
    margin-bottom: 0.65rem;
    line-height: 1.3;
}

.category-icon {
    display: grid;
    width: 38px;
    height: 38px;
    flex: 0 0 auto;
    place-items: center;
    border: 1px solid #f2d0d1;
    border-radius: 11px;
    background: linear-gradient(145deg, #fffafa, #fff0f0);
    font-size: 1.05rem;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}

.category-card p {
    margin-bottom: 0.85rem;
    font-size: 0.91rem;
    line-height: 1.55;
}

.card-link {
    margin-top: auto;
    font-size: 0.84rem;
    font-weight: 700;
}

.category-grid-action {
    margin-top: 1.7rem;
}

.category-grid-action .button {
    min-width: 176px;
}

.tool-card {
    display: flex;
    min-height: 132px;
    align-items: flex-start;
    justify-content: space-between;
    gap: 0.8rem;
    padding: 1.25rem;
}

.tool-card-copy {
    min-width: 0;
}

.tool-card h2,
.tool-card h3 {
    margin: 0;
    padding-right: 0.2rem;
    font-size: 1rem;
    line-height: 1.4;
}

.tool-card p {
    font-size: 0.88rem;
    line-height: 1.55;
}

.tool-card-arrow {
    display: grid;
    width: 30px;
    height: 30px;
    flex: 0 0 auto;
    place-items: center;
    border-radius: 9px;
    background: var(--bg-gray);
    color: var(--accent);
    font-size: 0.95rem;
    font-weight: 700;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.tool-card:hover .tool-card-arrow {
    background: var(--accent);
    color: #ffffff;
    transform: translateX(2px);
}

.feature-grid {
    gap: 0.9rem;
}

.feature-card {
    padding: 1.75rem 1.35rem;
    border-radius: 20px;
}

.feature-icon {
    display: grid;
    width: 46px;
    height: 46px;
    margin: 0 auto 0.85rem;
    place-items: center;
    border-radius: 14px;
    background: var(--accent-soft);
    font-size: 1.35rem;
}

.feature-card h3 {
    font-size: 1rem;
}

.button,
.hero-actions a {
    min-height: 44px;
    border-radius: 12px;
    padding: 0.72rem 1.2rem;
    font-size: 0.92rem;
    font-weight: 700;
    box-shadow: 0 6px 14px rgba(20, 33, 58, 0.04);
}

.button-primary {
    background: var(--accent);
    box-shadow: 0 9px 20px rgba(248, 48, 49, 0.22);
}

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

.button-secondary {
    background: #ffffff;
}

.page-section,
.page-hero {
    padding: 2.4rem 0 4.5rem;
}

.page-section h1,
.page-hero h1,
.content-intro h1 {
    margin-bottom: 0.6rem;
    font-size: clamp(2rem, 4vw, 2.8rem);
    line-height: 1.12;
    font-weight: 700;
}

.page-section > .shell > p,
.page-hero p {
    max-width: 760px;
    margin-top: 0;
    font-size: 1rem;
}

.breadcrumb {
    align-items: center;
    gap: 0.42rem;
    margin-bottom: 1.15rem;
    font-size: 0.8rem;
    font-weight: 600;
}

.breadcrumb > span:not(.current) {
    color: #c0c8d5;
}

.category-tabs {
    gap: 0.45rem;
    margin: 1.35rem 0 1.8rem;
}

.tab-chip {
    min-height: 38px;
    padding: 0.45rem 0.86rem;
    border-color: var(--border-strong);
    font-size: 0.8rem;
    font-weight: 650;
    box-shadow: 0 2px 8px rgba(20, 33, 58, 0.025);
}

.tab-chip:hover,
.tab-chip.is-active {
    background: var(--accent);
    border-color: var(--accent);
}

.tool-box {
    margin: 1.55rem 0 1.35rem;
    border-radius: 22px;
    box-shadow: 0 18px 45px rgba(20, 33, 58, 0.075);
}

.tool-box-head {
    padding: 1rem 1.35rem;
    background: linear-gradient(180deg, #fbfcff, #f5f8fc);
}

.tool-box-head h2 {
    font-size: 1rem;
    letter-spacing: -0.015em;
}

.tool-box-body {
    padding: 1.35rem;
}

.tool-form,
.client-tool {
    gap: 0.9rem;
}

.field {
    gap: 0.38rem;
}

.field label {
    color: #35435c;
    font-size: 0.88rem;
    font-weight: 650;
}

.field input,
.field select,
.field textarea,
.client-tool input,
.client-tool textarea,
.result-card textarea {
    min-height: 46px;
    border-color: var(--border-strong);
    border-radius: 12px;
    background: #fbfcfe;
    font-size: 0.94rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.field textarea,
.client-tool textarea,
.result-card textarea {
    min-height: 150px;
}

.field input:focus,
.field select:focus,
.field textarea:focus,
.client-tool input:focus,
.client-tool textarea:focus,
.hero-search input:focus,
.search-bar-wrapper input:focus,
.result-card textarea:focus {
    border-color: #ef7678;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(248, 48, 49, 0.1);
}

.result-card,
.result-banner,
.stat-chip,
.kv-row,
.typing-card,
.typing-current-card {
    border-radius: 14px;
}

.result-banner,
.stat-chip,
.typing-current-card,
.timer-display,
.typing-sample {
    background: #f6f8fc;
}

.tool-guide {
    margin: 0 0 1.45rem;
    padding: 1.2rem 1.3rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.7);
}

.tool-guide h2 {
    font-size: 1.25rem;
}

.step-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem 1.4rem;
    padding-left: 1.15rem;
    font-size: 0.9rem;
}

.step-list li {
    margin: 0;
    padding-left: 0.1rem;
}

.tool-note {
    margin: 0 0 1.7rem;
    padding: 0 0.15rem;
}

.tool-note p {
    margin: 0;
    color: var(--text-secondary);
}

.related-tools {
    margin-top: 2.3rem;
    padding-top: 1.8rem;
}

.seo-copy {
    padding-bottom: 4rem;
}

.seo-copy > .shell {
    padding: 1.6rem;
    border: 1px solid rgba(205, 214, 228, 0.7);
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.55);
}

.faq-list {
    gap: 0.7rem;
}

.faq-item {
    padding: 1rem 1.1rem;
    border-radius: 14px;
}

.page-content-page {
    padding-bottom: 4rem;
}

.content-sheet {
    padding: 2rem;
    border-radius: 22px;
    box-shadow: var(--shadow-card);
}

.content-intro {
    gap: 0.55rem;
    margin-bottom: 1.6rem;
    padding-bottom: 1.35rem;
    border-bottom: 1px solid var(--border);
}

.content-lead {
    font-size: 1.02rem;
    line-height: 1.65;
}

.content-copy {
    gap: 0;
}

.content-block {
    gap: 0.6rem;
    padding: 1.25rem 0;
    border-bottom: 1px solid #edf0f5;
}

.content-block:first-child {
    padding-top: 0;
}

.content-block:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.content-block h2 {
    margin-bottom: 0.15rem;
    font-size: 1.28rem;
}

.content-copy p,
.content-list li {
    font-size: 0.95rem;
    line-height: 1.68;
}

.content-list li {
    margin-bottom: 0.5rem;
}

.contact-line {
    width: fit-content;
    border-radius: 10px;
    padding: 0.65rem 0.8rem;
    background: var(--accent-soft);
}

.site-footer {
    margin-top: 0;
    border-top-color: rgba(205, 214, 228, 0.78);
    background: rgba(255, 255, 255, 0.78);
}

.footer-grid {
    gap: 2.4rem;
    padding: 2.7rem 0 2rem;
}

.brand-footer .brand-logo {
    height: 34px;
}

.footer-col h2 {
    margin-bottom: 0.65rem;
    color: #34415a;
    font-size: 0.8rem;
    font-weight: 750;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.footer-col a {
    width: fit-content;
    padding: 0.25rem 0;
    font-size: 0.89rem;
}

.footer-bottom {
    padding: 1rem 0 1.2rem;
}

.footer-bottom p {
    margin: 0;
}

.typing-workbench,
.typing-card {
    gap: 1rem;
}

.typing-card {
    background: #fbfcfe;
}

.typing-textarea {
    min-height: 190px;
}

.typing-example-chip,
.typing-suggestion-chip,
.typing-empty-chip,
.keyboard button {
    box-shadow: 0 3px 10px rgba(20, 33, 58, 0.035);
}

@media (min-width: 768px) {
    .nav-toggle {
        display: none;
    }

    .site-nav {
        gap: 0.2rem;
        padding: 0.25rem;
        border: 1px solid rgba(223, 229, 239, 0.8);
        border-radius: 999px;
        background: rgba(246, 248, 252, 0.82);
    }

    .header-shell {
        display: grid;
        grid-template-columns: 1fr auto 1fr;
    }

    .header-actions {
        justify-self: end;
    }

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

@media (max-width: 767px) {
    :root {
        --header-h: 60px;
        --radius: 16px;
    }

    body {
        background: #f7f9fc;
    }

    body::before {
        position: fixed;
        inset: calc(var(--header-h) + env(safe-area-inset-top)) 0 0;
        z-index: 89;
        background: rgba(20, 33, 58, 0.2);
        content: "";
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        -webkit-backdrop-filter: blur(2px);
        backdrop-filter: blur(2px);
    }

    body.nav-open::before {
        opacity: 1;
        pointer-events: auto;
    }

    .shell {
        width: calc(100% - 1.25rem);
    }

    .site-header {
        padding-top: env(safe-area-inset-top);
    }

    .header-shell {
        min-height: var(--header-h);
    }

    .brand-logo {
        height: 31px;
    }

    .header-actions {
        gap: 0.4rem;
    }

    .search-toggle {
        min-width: 38px;
        min-height: 38px;
    }

    .nav-toggle {
        min-width: auto;
        min-height: 38px;
        border-radius: 12px;
    }

    .site-nav {
        top: calc(var(--header-h) + env(safe-area-inset-top) + 0.55rem);
        right: 0.65rem;
        left: 0.65rem;
        z-index: 100;
        gap: 0.28rem;
        padding: 0.65rem;
        border: 1px solid rgba(205, 214, 228, 0.9);
        border-radius: 20px;
        box-shadow: 0 24px 60px rgba(20, 33, 58, 0.2);
        transform: translateY(-14px) scale(0.98);
        transform-origin: top right;
    }

    .site-nav.is-open {
        transform: translateY(0) scale(1);
    }

    .site-nav a {
        padding: 0.78rem 0.9rem;
        border-radius: 13px;
        font-size: 0.94rem;
    }

    .search-bar-wrapper {
        padding: 0 0 0.6rem;
    }

    [data-search-results] {
        top: calc(100% - 0.25rem);
        max-height: min(62vh, 440px);
        overflow-y: auto;
    }

    .hero {
        padding: 1.65rem 0 1.9rem;
    }

    .hero::before,
    .hero::after {
        display: none;
    }

    .hero-kicker {
        margin-bottom: 0.8rem;
        padding: 0.32rem 0.62rem;
        font-size: 0.7rem;
    }

    .hero h1 {
        max-width: 350px;
        margin-bottom: 0.72rem;
        font-size: clamp(1.98rem, 9.5vw, 2.35rem);
        line-height: 1.05;
    }

    .hero p {
        max-width: 350px;
        margin-bottom: 1.15rem;
        font-size: 0.9rem;
        line-height: 1.55;
    }

    .hero-search input {
        min-height: 50px;
        padding-left: 2.85rem;
        border-radius: 15px;
        font-size: 0.89rem;
        background-position: 0.9rem center;
    }

    .section {
        padding-bottom: 3.25rem;
    }

    .section-head {
        margin-bottom: 1.2rem;
    }

    .section-head h2,
    .reading-flow h2,
    .related-tools h2 {
        margin-bottom: 0.35rem;
        font-size: 1.42rem;
    }

    .section-head p {
        max-width: 330px;
        font-size: 0.86rem;
        line-height: 1.5;
    }

    .category-grid,
    .tool-grid,
    .mini-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.65rem;
    }

    .category-card {
        min-height: 124px;
        padding: 0.85rem;
        border-radius: 15px;
    }

    .category-card h3 {
        display: grid;
        gap: 0.45rem;
        margin: 0;
        font-size: 0.88rem;
        line-height: 1.25;
    }

    .category-icon {
        width: 32px;
        height: 32px;
        border-radius: 9px;
        font-size: 0.9rem;
    }

    .category-card p {
        display: none;
    }

    .card-link {
        margin-top: auto;
        font-size: 0;
    }

    .card-link::after {
        color: var(--text-muted);
        content: "Explore \2192";
        font-size: 0.72rem;
        font-weight: 650;
    }

    .category-grid-action {
        margin-top: 1.15rem;
    }

    .category-grid-action .button {
        width: min(100%, 220px);
        min-width: 0;
    }

    .tool-card {
        min-height: 104px;
        padding: 0.88rem;
        border-radius: 15px;
    }

    .tool-card h2,
    .tool-card h3 {
        margin: 0;
        font-size: 0.86rem;
        line-height: 1.32;
    }

    .tool-card p {
        display: none;
    }

    .tool-card-arrow {
        width: 26px;
        height: 26px;
        border-radius: 8px;
        font-size: 0.78rem;
    }

    .feature-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .feature-card {
        padding: 0.85rem 0.45rem;
        border-radius: 15px;
    }

    .feature-icon {
        width: 34px;
        height: 34px;
        margin-bottom: 0.55rem;
        border-radius: 10px;
        font-size: 1rem;
    }

    .feature-card h3 {
        margin: 0;
        font-size: 0.75rem;
        line-height: 1.25;
    }

    .feature-card p {
        display: none;
    }

    .page-section,
    .page-hero {
        padding: 1.35rem 0 3rem;
    }

    .page-section h1,
    .page-hero h1,
    .content-intro h1 {
        font-size: 1.82rem;
        line-height: 1.1;
    }

    .page-section > .shell > p,
    .page-hero p {
        font-size: 0.91rem;
        line-height: 1.55;
    }

    .breadcrumb {
        margin-bottom: 0.85rem;
        font-size: 0.72rem;
    }

    .category-tabs {
        width: calc(100% + 1.25rem);
        flex-wrap: nowrap;
        gap: 0.4rem;
        margin: 1rem -0.625rem 1.35rem;
        padding: 0 0.625rem 0.3rem;
        overflow-x: auto;
        scroll-snap-type: x proximity;
        scrollbar-width: none;
        -webkit-overflow-scrolling: touch;
    }

    .category-tabs::-webkit-scrollbar {
        display: none;
    }

    .tab-chip {
        min-height: 36px;
        flex: 0 0 auto;
        padding: 0.42rem 0.78rem;
        scroll-snap-align: start;
        font-size: 0.76rem;
    }

    .tool-box {
        margin: 1.1rem 0 1rem;
        border-radius: 18px;
    }

    .tool-box-head {
        padding: 0.85rem 1rem;
    }

    .tool-box-body {
        padding: 0.9rem;
    }

    .options-group {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.7rem;
    }

    .options-group label {
        align-items: flex-start;
        font-size: 0.86rem;
        line-height: 1.35;
    }

    .field input,
    .field select,
    .client-tool input {
        min-height: 44px;
    }

    .field textarea,
    .client-tool textarea,
    .result-card textarea {
        min-height: 130px;
    }

    .button,
    .hero-actions a {
        min-height: 43px;
        padding: 0.65rem 1rem;
        font-size: 0.86rem;
    }

    .tool-guide {
        margin-bottom: 1.1rem;
        padding: 1rem;
    }

    .tool-guide h2 {
        font-size: 1.15rem;
    }

    .step-list {
        grid-template-columns: 1fr;
        gap: 0.42rem;
        font-size: 0.85rem;
    }

    .related-tools {
        margin-top: 1.8rem;
        padding-top: 1.35rem;
    }

    .seo-copy {
        padding-bottom: 3rem;
    }

    .seo-copy > .shell {
        padding: 1.05rem;
        border-radius: 17px;
    }

    .page-content-page {
        padding-bottom: 3rem;
    }

    .content-sheet {
        padding: 1.15rem;
        border-radius: 18px;
    }

    .content-intro {
        margin-bottom: 1.15rem;
        padding-bottom: 1rem;
    }

    .content-lead {
        font-size: 0.92rem;
    }

    .content-block {
        padding: 1rem 0;
    }

    .content-block h2 {
        font-size: 1.13rem;
    }

    .content-copy p,
    .content-list li {
        font-size: 0.9rem;
        line-height: 1.62;
    }

    .footer-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 1.5rem 1rem;
        padding: 2rem 0 1.5rem;
    }

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

    .footer-brand p {
        max-width: 290px;
        font-size: 0.85rem;
    }

    .footer-col h2 {
        font-size: 0.72rem;
    }

    .footer-col a {
        font-size: 0.84rem;
    }

    .footer-bottom {
        padding-bottom: calc(1.2rem + env(safe-area-inset-bottom));
    }

    .typing-textarea {
        min-height: 155px;
    }

    .search-bar-wrapper input,
    .hero-search input,
    .field input,
    .field select,
    .field textarea,
    .client-tool input,
    .client-tool textarea,
    .result-card textarea {
        font-size: 16px;
    }
}

@media (max-width: 767px) and (orientation: portrait) {
    .home-category-grid .category-card:nth-child(9),
    .home-popular-grid .tool-card:nth-child(9) {
        display: none;
    }
}

@media (max-width: 370px) {
    .hero h1 {
        font-size: 1.9rem;
    }

    .category-card {
        min-height: 118px;
    }

    .category-card h3,
    .tool-card h2,
    .tool-card h3 {
        font-size: 0.8rem;
    }
}

@media (prefers-reduced-motion: no-preference) {
    .hero-kicker,
    .hero h1,
    .hero p,
    .hero-search,
    .section-head,
    .category-grid,
    .tool-grid,
    .feature-grid {
        animation: interface-rise 0.5s both;
    }

    .hero h1 {
        animation-delay: 0.04s;
    }

    .hero p,
    .section-head {
        animation-delay: 0.08s;
    }

    .hero-search,
    .category-grid,
    .tool-grid,
    .feature-grid {
        animation-delay: 0.12s;
    }
}

@keyframes interface-rise {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
