* { box-sizing: border-box; }
:root {
    color-scheme: light;
    --ink: #171c2e;
    --muted: #505a71;
    --line: #dce1ec;
    --accent: #4940ad;
    --surface: #fff;
    font: 16px/1.6 system-ui, sans-serif;
}
body { margin: 0; background: #f6f7fb; color: var(--ink); }
a { color: var(--accent); text-underline-offset: .2em; }
button, input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid #6c55d9; outline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { width: min(1160px, calc(100% - 48px)); margin-inline: auto; }
header, footer { background: var(--surface); border-block: 1px solid var(--line); }
nav, footer .wrap { display: flex; align-items: center; gap: clamp(12px, 3vw, 30px); min-height: 66px; }
nav a, footer a { text-decoration: none; font-weight: 650; }
.brand { display: inline-flex; gap: 10px; align-items: center; margin-right: auto; color: var(--ink); font-weight: 800; letter-spacing: -.035em; font-size: 21px; }
.brand-icon { display: grid; place-items: center; width: 34px; aspect-ratio: 1; color: white; background: var(--accent); border-radius: 10px; }
.skip { position: absolute; inset: -90px auto auto 10px; z-index: 2; background: #fff; padding: 8px; }
.skip:focus { top: 5px; }
.hero { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); align-items: center; gap: clamp(22px, 5vw, 80px); margin: 32px 0 46px; padding: clamp(28px, 5vw, 67px); border-radius: 28px; background: radial-gradient(ellipse at 94% 16%, #44368b, transparent 62%), #171936; color: white; }
h1, h2, h3, p { margin-top: 0; }
h1 { font-size: clamp(36px, 6.5vw, 76px); line-height: 1.01; letter-spacing: -.065em; margin-bottom: 20px; }
.hero em { color: #c5b9ff; font-style: normal; }
.hero-copy > p:not(.eyebrow) { color: #e0ddf4; font-size: 19px; }
.eyebrow { text-transform: uppercase; letter-spacing: .15em; font-size: 12px; font-weight: 800; color: var(--accent); margin-bottom: 10px; }
.hero .eyebrow { color: #d7cdff; }
.primary, .panel button { display: inline-flex; align-items: center; gap: 12px; padding: 10px 16px; border: 1px solid transparent; border-radius: 10px; font-weight: 750; text-decoration: none; cursor: pointer; }
.primary { background: #d8ceff; color: #221748; }
.primary:hover { background: #ede6ff; }
.shortcuts { background: #fff1; border: 1px solid #fff3; border-radius: 18px; padding: 16px; }
.shortcuts a { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; color: white; padding: 9px; border-radius: 10px; text-decoration: none; }
.shortcuts a:hover { background: #fff2; }
.tile-icon { display: inline-grid; place-items: center; min-width: 36px; min-height: 36px; padding-inline: 5px; border-radius: 10px; background: #ece8ff; color: #46389d; font-weight: 800; }
.section-head { display: flex; justify-content: space-between; align-items: end; gap: 16px; margin-bottom: 18px; }
.section-head label { width: min(100%, 290px); }
h2 { font-size: clamp(24px, 4vw, 36px); letter-spacing: -.045em; line-height: 1.2; margin-bottom: 12px; }
.section-head h2 { margin: 0; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.filters button { border-radius: 999px; border: 1px solid var(--line); padding: 6px 13px; background: white; color: var(--ink); cursor: pointer; font-size: 14px; font-weight: 650; }
.filters button[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: white; }
.grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 275px), 1fr)); gap: 14px; margin-bottom: 54px; }
.card { background: white; border: 1px solid var(--line); border-radius: 16px; }
.card a { display: block; position: relative; height: 100%; padding: 18px 18px 35px; border-radius: inherit; text-decoration: none; color: inherit; }
.card:hover { border-color: #9382df; box-shadow: 0 6px 22px #26214910; }
.card h3 { margin: 14px 0 5px; line-height: 1.25; letter-spacing: -.025em; }
.card p, .tool-heading > p:last-child, .guide p { color: var(--muted); margin-bottom: 0; }
.tag { margin-left: 7px; font-size: 12px; font-weight: 720; color: var(--muted); }
.arrow { position: absolute; bottom: 10px; right: 17px; color: var(--accent); }
.tool-heading, .info { margin-block: 38px 28px; }
.tool-heading .eyebrow { margin-top: 22px; }
.tool-heading h1, .info h1 { font-size: clamp(36px, 6vw, 60px); }
.tool-heading > p:last-child { font-size: 19px; }
.workspace { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.panel, .guide, .info { background: white; border: 1px solid var(--line); border-radius: 16px; padding: clamp(18px, 4vw, 30px); }
.info { max-width: 780px; }
.guide h2 { font-size: 21px; }
.guide h2:not(:first-child) { margin-top: 24px; }
.guide ul { margin-bottom: 0; padding-left: 20px; }
.fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 190px), 1fr)); gap: 14px; margin-bottom: 16px; }
.fields:empty { display: none; }
.fields .wide { grid-column: 1 / -1; }
label { display: block; font-size: 14px; font-weight: 680; }
input, select, textarea { display: block; width: 100%; margin-top: 5px; padding: 9px; border: 1px solid #adb6cc; border-radius: 8px; background: #fbfbfe; color: var(--ink); min-width: 0; }
input[type="range"] { padding: 0; }
textarea { min-height: 120px; resize: vertical; }
.panel button { background: var(--accent); color: white; }
.panel button:hover { background: #372e91; }
.panel button:disabled { opacity: .55; cursor: default; }
.result { white-space: pre-wrap; overflow-wrap: anywhere; margin: 18px 0 0; padding: 14px; border-radius: 10px; background: #eeebff; }
.result:empty { display: none; }
.pages, .scan-row { display: grid; gap: 10px; }
.scan-row { border: 1px solid var(--line); border-radius: 10px; padding: 12px; }
.scan-preview { display: grid; place-items: center; overflow: hidden; min-height: 250px; }
.scan-preview img { max-width: min(100%, 220px); max-height: 220px; }
.actions { display: flex; flex-wrap: wrap; gap: 7px; }
.qr-preview { max-width: 100%; display: block; margin-top: 15px; }
footer { margin-top: 48px; }
@media (max-width: 760px) {
    .hero, .workspace { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .wrap { width: calc(100% - 28px); }
    .brand { font-size: 17px; }
    nav a, footer a { font-size: 14px; }
    .section-head { flex-direction: column; align-items: stretch; }
    .hero { margin-top: 18px; }
}

.camera { margin-bottom: 18px; }
.camera video { display: block; width: 100%; max-height: 440px; margin-top: 12px; border-radius: 10px; background: #171c2e; }
.camera p { margin: 8px 0 0; }
.camera p:empty { display: none; }

.drop-zone {
    display: grid;
    align-content: center;
    gap: 6px;
    grid-column: 1 / -1;
    min-width: 0;
    padding: 16px;
    border: 2px dashed #adb6cc;
    border-radius: 12px;
    background: #f8f7ff;
    cursor: pointer;
}
.drop-zone:hover, .drop-zone:focus-within, .drop-zone.is-dragging {
    border-color: var(--accent);
    background: #eeebff;
}
.drop-hint { color: var(--muted); font-weight: 500; }
.drop-zone input { margin-top: 0; cursor: pointer; }

.header-menu { position: relative; }
.header-menu summary {
    cursor: pointer;
    padding: 7px 12px;
    border: 1px solid var(--line);
    border-radius: 9px;
    color: var(--accent);
    font-weight: 700;
}
.header-menu-links {
    position: absolute;
    z-index: 5;
    inset-inline-end: 0;
    top: calc(100% + 8px);
    width: min(240px, calc(100vw - 28px));
    padding: 6px;
    background: var(--surface);
    border: 1px solid var(--line);
    border-radius: 12px;
    box-shadow: 0 8px 24px #26214920;
}
.header-menu-links a { display: block; padding: 6px 10px; border-radius: 6px; }
.header-menu-links a:hover, .header-menu-links a:focus-visible { background: #eeebff; }

.header-primary { display: flex; align-items: center; gap: 5px; }
.header-primary a { padding: 7px 11px; border-radius: 9px; white-space: nowrap; }
.header-primary a:hover, .header-primary a[aria-current="page"] { background: #eeebff; }
.header-primary .header-scan { display: inline-flex; align-items: center; gap: 8px; background: var(--accent); color: #fff; }
.header-primary .header-scan:hover, .header-primary .header-scan[aria-current="page"] { background: #372e91; }
.header-menu .header-mobile { display: none; }
@media (max-width: 740px) {
    .header-primary, .header-menu .header-more { display: none; }
    .header-menu .header-mobile { display: revert; }
    .header-menu-links a.header-mobile { display: block; }
}
