:root {
    --blue: #6d28d9;
    --blue-dark: #5b21b6;
    --blue-light: #f3e8ff;
    --blue-glow: rgba(109, 40, 217, 0.14);
    --blue-hover: #5b21b6;
    --green: #16a34a;
    --green-dark: #15803d;
    --green-light: #f0fdf4;
    --green-bright: #22c55e;
    --navy: #111827;
    --text: #111827;
    --text-muted: #6b7280;
    --bg: #f4f6fb;
    --surface: #ffffff;
    --surface-raised: #ffffff;
    --border: #e5e7eb;
    --border-strong: #ddddf8;
    --error: #dc2626;
    --error-light: #fef2f2;
    --radius: 16px;
    --radius-sm: 10px;
    --radius-lg: 20px;
    --shadow-sm: 0 1px 2px rgba(17, 24, 39, 0.04);
    --shadow: 0 8px 24px rgba(17, 24, 39, 0.06);
    --shadow-lg: 0 16px 40px rgba(17, 24, 39, 0.08);
    --max-content: 1120px;
    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-5: 20px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --space-16: 64px;
    --container-px: var(--space-5);
    --header-px: var(--space-5);
    --header-y: 10px;
    --page-gap: var(--space-6);
    --section-y: var(--space-12);
    --section-gap: var(--space-5);
    --block-gap: var(--space-4);
    --card-pad: var(--space-5);
    --stack-sm: var(--space-2);
    --stack-md: var(--space-4);
    --stack-lg: var(--space-6);
    --scroll-offset: 72px;
}

*, *::before, *::after {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: var(--scroll-offset);
}

[id] {
    scroll-margin-top: var(--scroll-offset);
}

body {
    font-family: Inter, system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    margin: 0;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--blue);
    text-decoration: none;
}

a:hover {
    color: var(--blue-dark);
}

.container {
    max-width: var(--max-content);
    margin: 0 auto;
    padding: 0 var(--container-px);
}

.site-header {
    background: #fff;
    border-bottom: 1px solid var(--border);
    position: sticky;
    top: 0;
    z-index: 200;
    flex-shrink: 0;
}

.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-block: var(--header-y);
    padding-inline: max(var(--header-px), env(safe-area-inset-left, 0px)) max(var(--header-px), env(safe-area-inset-right, 0px));
    gap: var(--space-4);
    position: relative;
}

.site-header__actions {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    flex-shrink: 0;
    order: 3;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--navy);
    min-width: 0;
    flex-shrink: 0;
    order: 1;
}

.logo:hover {
    color: var(--navy);
}

.logo__img {
    height: 40px;
    width: auto;
    display: block;
    flex-shrink: 0;
}

.logo__text,
.logo__text-main,
.logo__text-sub {
    display: none;
}

.lang-switcher {
    position: relative;
}

.pwa-install {
    display: none;
    align-items: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 var(--space-3);
    border: none;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    flex-shrink: 0;
}

.pwa-install[hidden] {
    display: none !important;
}

.pwa-install:hover {
    background: var(--blue-hover);
}

.pwa-install__label {
    white-space: nowrap;
}

.pwa-ios-hint {
    position: fixed;
    inset: 0;
    z-index: 500;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: var(--space-4);
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px));
}

.pwa-ios-hint[hidden] {
    display: none !important;
}

.pwa-ios-hint__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(17, 24, 39, 0.45);
}

.pwa-ios-hint__panel {
    position: relative;
    width: min(100%, 420px);
    padding: var(--space-5);
    border-radius: var(--radius-sm);
    background: #fff;
    box-shadow: var(--shadow-lg);
}

.pwa-ios-hint__panel p {
    margin: 0 0 var(--space-4);
    color: var(--navy);
    line-height: 1.5;
}

.pwa-ios-hint__close {
    width: 100%;
    height: 44px;
    border: none;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
}

.lang-switcher__btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    height: 36px;
    padding: 0 var(--space-3);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font-family: inherit;
    font-size: 0.82rem;
    font-weight: 600;
    cursor: pointer;
    max-width: 140px;
}

.lang-switcher__btn:hover,
.lang-switcher.is-open .lang-switcher__btn {
    background: var(--blue-light);
    border-color: #c4b5fd;
}

.lang-switcher__current {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.lang-switcher__chevron {
    flex-shrink: 0;
    transition: transform 0.2s;
}

.lang-switcher.is-open .lang-switcher__chevron {
    transform: rotate(180deg);
}

.lang-switcher__menu {
    position: absolute;
    top: calc(100% + var(--space-2));
    right: 0;
    z-index: 220;
    min-width: 180px;
    max-height: min(320px, 60vh);
    margin: 0;
    padding: var(--space-2);
    list-style: none;
    overflow-y: auto;
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-lg);
}

.lang-switcher__menu[hidden] {
    display: none;
}

.lang-switcher__option {
    display: block;
    padding: var(--space-2) var(--space-3);
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--navy);
}

.lang-switcher__option:hover,
.lang-switcher__option.is-active {
    background: var(--blue-light);
    color: var(--blue);
}

.nav-toggle {
    display: none;
    flex-shrink: 0;
    width: 40px;
    height: 40px;
    padding: 0;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    align-items: center;
    justify-content: center;
}

.nav-toggle__lines {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 18px;
}

.nav-toggle__lines span {
    display: block;
    height: 2px;
    width: 100%;
    background: var(--navy);
    border-radius: 2px;
    transition: transform 0.25s, opacity 0.2s;
}

.site-header.is-nav-open .nav-toggle__lines span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.site-header.is-nav-open .nav-toggle__lines span:nth-child(2) {
    opacity: 0;
}

.site-header.is-nav-open .nav-toggle__lines span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

.nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(17, 24, 39, 0.35);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.25s;
    pointer-events: none;
}

.nav-backdrop.is-visible {
    opacity: 1;
    pointer-events: auto;
}

.site-nav {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    align-items: center;
    order: 2;
    margin-left: auto;
    margin-right: var(--space-3);
}

.site-nav a {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    padding: 6px 10px;
    border-radius: 6px;
    white-space: nowrap;
}

.site-nav a:hover {
    color: var(--blue);
    background: var(--blue-light);
}

.hero {
    padding: var(--space-10) 0 var(--space-4);
    text-align: center;
}

.hero__logo,
.hero__badge {
    display: none;
}

.hero h1 {
    font-size: clamp(1.6rem, 3vw, 1.9rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    line-height: 1.25;
    margin: 0 0 var(--space-2);
    color: var(--navy);
}

.hero__lead {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 52ch;
    margin: 0 auto;
}

.hero__trust {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 8px 18px;
    margin-top: var(--space-4);
    color: var(--text-muted);
    font-size: 0.82rem;
}

.hero__trust span {
    position: relative;
}

.hero__trust span:not(:last-child)::after {
    content: "·";
    position: absolute;
    right: -12px;
    color: #c4c9d4;
}

.tool-chips {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: var(--space-6);
}

.tool-chip {
    display: inline-flex;
    align-items: center;
    height: 36px;
    padding: 0 14px;
    border-radius: 999px;
    background: #fff;
    border: 1px solid var(--border);
    color: #374151;
    font-size: 0.82rem;
    font-weight: 500;
    box-shadow: var(--shadow-sm);
}

.tool-chip:hover {
    color: var(--blue);
    border-color: #c4b5fd;
}

.tools-stack {
    display: flex;
    flex-direction: column;
    gap: var(--space-8);
    margin-bottom: var(--space-10);
}

.workspace__title {
    margin: 0 0 var(--space-4);
    font-size: 1.15rem;
    font-weight: 600;
    text-align: center;
    color: var(--navy);
}

.workspace__card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-5);
    box-shadow: var(--shadow-sm);
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 10px;
    min-height: 220px;
    padding: var(--space-8) var(--space-5);
    border: 1.6px dashed var(--border-strong);
    border-radius: 12px;
    background: #fafbff;
    cursor: pointer;
}

.dropzone:hover,
.dropzone.is-dragover {
    border-color: #a78bfa;
    background: #f5f3ff;
}

.dropzone.has-file {
    border-color: #86efac;
    background: var(--green-light);
}

.dropzone-label {
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--navy);
}

.dropzone-hint {
    font-size: 0.82rem;
    color: var(--text-muted);
    text-align: center;
}

.dropzone-browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    height: 40px;
    padding: 0 18px;
    margin-top: 4px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    pointer-events: none;
}

#custom-text {
    font-weight: 600;
    font-size: 0.88rem;
    color: var(--green-dark);
    word-break: break-all;
    text-align: center;
}

input[type="file"] {
    position: absolute;
    inset: 0;
    opacity: 0;
    cursor: pointer;
}

.workspace__bar {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: var(--space-4);
    align-items: end;
    margin-top: var(--space-5);
}

.workspace__hint {
    margin: var(--space-5) 0 var(--space-3);
    font-size: 0.85rem;
    color: var(--text-muted);
}

.field-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4);
}

.field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.field.full {
    grid-column: 1 / -1;
}

.field-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #4b5563;
}

select,
input[type="number"] {
    width: 100%;
    font: inherit;
    font-size: 0.92rem;
    color: var(--text);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 10px 12px;
    outline: none;
    appearance: none;
}

select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%23111827' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px;
}

select:focus,
input[type="number"]:focus {
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.options-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.option {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    padding: 12px 14px;
    border-radius: 10px;
    cursor: pointer;
    background: #fafbff;
    border: 1px solid var(--border);
}

.option--block {
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
}

.option--block:hover {
    border-color: #c4b5fd;
    background: var(--blue-light);
}

.option-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.option-hint {
    display: block;
    font-size: 0.75rem;
    color: var(--text-muted);
    line-height: 1.45;
    padding-left: 54px;
}

.option-hint code,
.guide-example code,
.card-desc code,
.feature-card code,
.faq-item code,
.step code,
.legal-section code {
    font-size: 0.9em;
    background: var(--blue-light);
    color: var(--blue-dark);
    padding: 1px 5px;
    border-radius: 4px;
}

.size-controls__grid {
    margin-top: var(--space-3);
}

.size-intro {
    margin: var(--space-4) 0 0;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--navy);
}

.option input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.option-track {
    flex-shrink: 0;
    width: 44px;
    height: 24px;
    background: #e5e7eb;
    border-radius: 999px;
    position: relative;
    transition: background 0.25s;
}

.option-track::after {
    content: "";
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    background: #fff;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(17, 24, 39, 0.2);
    transition: transform 0.25s;
}

.option input:checked + .option-track {
    background: var(--blue);
}

.option input:checked + .option-track::after {
    transform: translateX(20px);
}

.option-text {
    font-size: 0.88rem;
    color: var(--navy);
    font-weight: 600;
}

.size-controls.is-hidden,
.is-hidden {
    display: none !important;
}

.actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

.btn-primary {
    font: inherit;
    font-size: 0.95rem;
    font-weight: 600;
    color: #fff;
    background: var(--blue);
    border: none;
    border-radius: 8px;
    padding: 12px 28px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-primary:hover {
    background: var(--blue-hover);
}

.btn-primary:disabled {
    opacity: 0.55;
    cursor: not-allowed;
}

.btn-secondary {
    font: inherit;
    font-size: 0.88rem;
    font-weight: 600;
    color: var(--blue);
    background: var(--blue-light);
    border: 1px solid #ddd6fe;
    border-radius: 8px;
    padding: 8px 14px;
    cursor: pointer;
    white-space: nowrap;
}

.btn-secondary:hover {
    background: #ede9fe;
}

.progress-wrap {
    display: none;
}

.progress-wrap.is-visible {
    display: block;
}

.progress-label {
    display: flex;
    justify-content: space-between;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--blue);
    margin-bottom: var(--space-2);
}

progress {
    width: 100%;
    height: 8px;
    border: none;
    border-radius: 999px;
    overflow: hidden;
    background: var(--blue-light);
}

progress::-webkit-progress-bar {
    background: var(--blue-light);
    border-radius: 999px;
}

progress::-webkit-progress-value,
progress::-moz-progress-bar {
    background: var(--blue);
    border-radius: 999px;
}

.status {
    display: none;
    font-size: 0.9rem;
    font-weight: 500;
    padding: var(--space-4);
    border-radius: 8px;
    white-space: pre-line;
}

.status.is-visible {
    display: block;
}

.status--success {
    color: var(--green-dark);
    background: var(--green-light);
    border: 1px solid #bbf7d0;
}

.status--error {
    color: var(--error);
    background: var(--error-light);
    border: 1px solid #fecaca;
}

.download-link {
    display: none;
    text-align: center;
    font-weight: 700;
    font-size: 0.95rem;
    color: #fff;
    padding: 12px;
    border-radius: 8px;
    background: var(--green);
}

.download-link.is-visible {
    display: block;
}

.download-link:hover {
    color: #fff;
    background: var(--green-dark);
}

.ocr-section__lead {
    text-align: center;
    color: var(--text-muted);
    margin: 0 0 var(--space-3);
}

.ocr-toolbar {
    margin-bottom: var(--space-4);
}

.ocr-toolbar .field {
    max-width: 280px;
}

.ocr-tool {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ocr-upload__area {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-3);
    min-height: 220px;
    padding: var(--space-8) var(--space-5);
    border: 1.6px dashed var(--border-strong);
    border-radius: 12px;
    background: #fafbff;
    overflow: hidden;
}

.ocr-upload__area.is-dragover,
.ocr-upload__area:focus-visible {
    outline: none;
    border-color: #a78bfa;
    background: #f5f3ff;
}

.ocr-upload__drag {
    margin: 0;
    text-align: center;
    font-size: 1.05rem;
    font-weight: 600;
    color: var(--navy);
    line-height: 1.4;
}

.ocr-upload__drag small {
    display: block;
    margin-top: 6px;
    font-size: 0.82rem;
    font-weight: 500;
    color: var(--text-muted);
}

.ocr-upload__paste {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-muted);
}

.ocr-upload__browse {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    min-height: 40px;
    padding: 0 18px;
    border-radius: 8px;
    background: var(--blue);
    color: #fff;
    font-size: 0.92rem;
    font-weight: 600;
    cursor: pointer;
}

.ocr-upload__browse:hover {
    background: var(--blue-hover);
}

.ocr-modes {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    width: min(100%, 480px);
}

.ocr-mode {
    position: relative;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #fff;
    cursor: pointer;
}

.ocr-mode input {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.ocr-mode__radio {
    flex-shrink: 0;
    width: 16px;
    height: 16px;
    margin-top: 2px;
    border: 2px solid #c4b5fd;
    border-radius: 50%;
}

.ocr-mode__radio::after {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    margin: 2px auto 0;
    border-radius: 50%;
    background: transparent;
}

.ocr-mode.is-active,
.ocr-mode:has(input:checked) {
    border-color: var(--blue);
    background: var(--blue-light);
}

.ocr-mode.is-active .ocr-mode__radio,
.ocr-mode:has(input:checked) .ocr-mode__radio {
    border-color: var(--blue);
}

.ocr-mode.is-active .ocr-mode__radio::after,
.ocr-mode:has(input:checked) .ocr-mode__radio::after {
    background: var(--blue);
}

.ocr-mode__title {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--navy);
}

.ocr-mode__subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.ocr-privacy {
    margin: var(--space-2) 0 0;
    text-align: center;
    font-size: 0.78rem;
    color: var(--text-muted);
    font-style: italic;
}

.ocr-work {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.ocr-preview {
    display: flex;
    justify-content: center;
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fafbff;
}

.ocr-preview__img {
    display: block;
    max-width: 100%;
    max-height: 320px;
    border-radius: 8px;
    object-fit: contain;
}

.ocr-work__actions {
    display: grid;
    grid-template-columns: 1fr 1.4fr;
    gap: var(--space-3);
}

.ocr-work__actions .btn-primary,
.ocr-work__actions .btn-secondary {
    width: 100%;
}

.ocr-result-panel {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: 12px;
    background: #fff;
}

.ocr-result-panel__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-3);
    flex-wrap: wrap;
}

.ocr-result-panel__title {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--navy);
}

.ocr-result-panel__tools {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-2);
}

.ocr-result {
    width: 100%;
    min-height: 220px;
    padding: var(--space-4);
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--navy);
    font: inherit;
    font-size: 0.95rem;
    line-height: 1.6;
    resize: vertical;
}

.ocr-result:focus {
    outline: none;
    border-color: #a78bfa;
    box-shadow: 0 0 0 3px var(--blue-glow);
}

.content-section {
    padding-block: var(--section-y);
    background: #fff;
    border-top: 1px solid var(--border);
}

.content-section:nth-child(odd) {
    background: var(--bg);
}

.content-section h2,
.legal-page h1 {
    font-size: clamp(1.35rem, 2.4vw, 1.75rem);
    font-weight: 600;
    letter-spacing: -0.03em;
    margin: 0 0 var(--space-3);
    color: var(--navy);
}

.section-lead,
.legal-page__updated {
    color: var(--text-muted);
    font-size: 1rem;
    max-width: 62ch;
    margin: 0 0 var(--section-gap);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
}

.feature-card {
    background: #fff;
    border: 1px solid #c7d2fe;
    border-radius: 12px;
    padding: var(--space-5);
}

.feature-card h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--space-2);
    color: var(--navy);
    text-align: center;
}

.feature-card p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.steps {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-5);
    counter-reset: step;
}

.step {
    position: relative;
    padding: var(--space-6) var(--space-5) var(--space-5);
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
}

.step::before {
    counter-increment: step;
    content: counter(step);
    display: grid;
    place-items: center;
    width: 32px;
    height: 32px;
    margin-bottom: var(--space-3);
    background: var(--blue);
    border-radius: 50%;
    font-weight: 700;
    font-size: 0.85rem;
    color: #fff;
}

.step h3 {
    font-size: 1rem;
    font-weight: 700;
    margin: 0 0 var(--space-2);
    color: var(--navy);
}

.step p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.formats-list {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.format-tag {
    background: #fff;
    border: 1px solid var(--border);
    color: #374151;
    border-radius: 999px;
    padding: 6px 14px;
    font-size: 0.85rem;
    font-weight: 600;
    box-shadow: var(--shadow-sm);
}

.faq-list {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.faq-item {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.faq-item summary {
    padding: 14px 18px;
    font-weight: 600;
    color: var(--navy);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: var(--space-3);
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "+";
    color: var(--blue);
    font-size: 1.2rem;
    font-weight: 400;
    line-height: 1;
}

.faq-item[open] summary::after {
    content: "−";
}

.faq-item[open] summary {
    background: var(--blue-light);
}

.faq-item p {
    margin: 0;
    padding: 0 18px 14px;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.privacy-box {
    background: var(--blue-light);
    border: 1px solid #ddd6fe;
    border-radius: 12px;
    padding: var(--space-6);
}

.privacy-box h3 {
    margin: 0 0 var(--space-3);
    color: var(--blue-dark);
    font-size: 1.05rem;
    font-weight: 700;
}

.privacy-box p {
    margin: 0;
    color: var(--text-muted);
    font-size: 0.92rem;
}

.site-footer {
    background: #111827;
    color: rgba(255, 255, 255, 0.72);
    padding: var(--space-10) 0;
    margin-top: auto;
    flex-shrink: 0;
}

#main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

#main-content > .content-section {
    flex: 1;
}

body.has-consent-banner #main-content {
    padding-bottom: calc(88px + env(safe-area-inset-bottom, 0px));
}

.consent-banner {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 1200;
    border-top: 1px solid var(--border);
    background: #fff;
    box-shadow: 0 -8px 32px rgba(17, 24, 39, 0.1);
}

.consent-banner__inner {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: space-between;
    gap: var(--space-4);
    padding-block: var(--space-4);
    padding-bottom: max(var(--space-4), env(safe-area-inset-bottom, 0px));
}

.consent-banner__content {
    flex: 1 1 0;
    min-width: 0;
}

.consent-banner__title {
    margin: 0 0 var(--space-2);
    font-size: 0.92rem;
    font-weight: 700;
    color: var(--navy);
}

.consent-banner__text {
    margin: 0;
    font-size: 0.82rem;
    line-height: 1.55;
    color: var(--text-muted);
}

.consent-banner__text a {
    font-weight: 600;
}

.consent-banner__actions {
    flex: 0 0 auto;
    align-self: center;
}

.consent-banner__accept {
    width: auto;
    min-width: 120px;
    padding-inline: var(--space-5);
}

.legal-page__body {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
}

.legal-section ul {
    margin: 0;
    padding-left: 1.25rem;
}

.legal-section li:last-child {
    margin-bottom: 0;
}

.legal-page__links {
    display: flex;
    flex-wrap: wrap;
    gap: var(--space-4);
    margin-top: var(--space-8);
    padding-top: var(--space-5);
    border-top: 1px solid var(--border);
}

.legal-page__links a {
    font-size: 0.88rem;
    font-weight: 600;
}

.footer-grid {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--space-6);
}

.footer-brand__name {
    display: block;
    font-size: 1.1rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 8px;
}

.footer-copy {
    font-size: 0.85rem;
    margin: 0;
    max-width: 42ch;
}

.footer-links {
    display: flex;
    gap: 12px 20px;
    flex-wrap: wrap;
}

.footer-links a {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    font-weight: 500;
}

.footer-links a:hover {
    color: #fff;
}

.guide-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--space-5);
}

.guide-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: var(--card-pad);
}

.guide-card--wide {
    grid-column: 1 / -1;
}

.guide-tag {
    display: inline-block;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 999px;
    margin-bottom: var(--space-3);
}

.guide-tag--blue {
    background: var(--blue-light);
    color: var(--blue-dark);
}

.guide-tag--green {
    background: var(--green-light);
    color: var(--green-dark);
}

.guide-card h3,
.legal-section h2 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--navy);
    margin: 0 0 var(--space-3);
}

.guide-card p,
.legal-section p,
.legal-section li {
    margin: 0 0 var(--space-3);
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.55;
}

.guide-card ul,
.guide-card ol {
    margin: 0 0 var(--space-3);
    padding-left: 1.25rem;
    font-size: 0.88rem;
    color: var(--text-muted);
    line-height: 1.6;
}

.guide-example {
    background: var(--bg);
    border-left: 3px solid var(--blue);
    padding: var(--space-3) var(--space-4);
    border-radius: 0 8px 8px 0;
    font-size: 0.85rem !important;
}

.format-compare {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}

.format-compare strong {
    display: block;
    color: var(--navy);
    margin-bottom: var(--space-1);
}

.format-compare p {
    margin: 0;
    font-size: 0.85rem;
}

.scenarios {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--space-4);
    margin-top: var(--space-3);
}

.scenario {
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: var(--space-4);
}

.scenario strong {
    display: block;
    color: var(--navy);
    font-size: 0.92rem;
    margin-bottom: var(--space-2);
}

.scenario p {
    margin: 0;
    font-size: 0.85rem;
}

.formats-table-wrap {
    overflow-x: auto;
    margin-top: var(--space-6);
    border-radius: 10px;
    border: 1px solid var(--border);
}

.formats-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    background: #fff;
}

.formats-table th,
.formats-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.formats-table th {
    background: var(--bg);
    color: var(--navy);
    font-weight: 600;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.formats-table tr:last-child td {
    border-bottom: none;
}

.formats-table td:first-child {
    font-weight: 600;
    color: var(--navy);
}

@media (max-width: 980px) {
    .features-grid,
    .steps,
    .faq-list,
    .guide-grid,
    .scenarios,
    .format-compare {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    :root {
        --container-px: var(--space-4);
        --header-px: var(--space-4);
        --scroll-offset: 64px;
    }

    .site-header__inner {
        flex-wrap: wrap;
    }

    .site-header__actions {
        order: 2;
        margin-left: auto;
    }

    .logo {
        flex: 1 1 auto;
    }

    .site-nav {
        order: 4;
        margin: 0;
        width: 100%;
        position: absolute;
        top: calc(100% + 8px);
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        padding: 8px;
        background: #fff;
        border: 1px solid var(--border);
        border-radius: 12px;
        box-shadow: var(--shadow-lg);
        opacity: 0;
        visibility: hidden;
        z-index: 210;
        max-height: calc(100vh - 80px);
        overflow-y: auto;
    }

    .site-header.is-nav-open .site-nav {
        opacity: 1;
        visibility: visible;
    }

    .site-nav a {
        display: block;
        padding: 12px 14px;
        font-weight: 600;
        color: var(--navy);
        white-space: normal;
    }

    .nav-toggle {
        display: flex;
    }

    .pwa-install:not([hidden]) {
        display: inline-flex;
    }

    .workspace__bar,
    .options-list,
    .features-grid,
    .steps,
    .faq-list,
    .guide-grid,
    .scenarios,
    .format-compare,
    .ocr-modes,
    .ocr-work__actions,
    .field-grid {
        grid-template-columns: 1fr;
    }

    .ocr-toolbar .field {
        max-width: none;
    }

    .option-hint {
        padding-left: 0;
    }

    .ocr-result-panel__head {
        flex-direction: column;
        align-items: stretch;
    }
}

@media (max-width: 640px) {
    .consent-banner__inner {
        flex-direction: column;
        align-items: stretch;
    }

    .consent-banner__accept {
        width: 100%;
    }

    .footer-grid {
        flex-direction: column;
        text-align: left;
    }
}

body.nav-open {
    overflow: hidden;
}

[dir="rtl"] .site-header__inner {
    direction: rtl;
}

[dir="rtl"] .lang-switcher__menu {
    right: auto;
    left: 0;
}

[dir="rtl"] .site-nav {
    margin-left: 0;
    margin-right: auto;
}

[dir="rtl"] .hero__trust span:not(:last-child)::after {
    right: auto;
    left: -12px;
}
