@font-face {
    font-family: Inter;
    src: url('./inter-latin.woff2') format('woff2');
    font-display: swap;
    font-weight: 100 900;
}

:root {
    --paper: #fffbf3;
    --white: #fff;
    --ink: #102b31;
    --muted: #635b4a;
    --line: #e9dfc8;
    --accent: #f7cf55;
    --accent-light: #fcecc2;
    --orange: #ff5a25;
    color: var(--ink);
    background: var(--paper);
    font: 16px/1.5 Inter, system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
h1, h2, p { margin: 0; }
h1, h2 { line-height: 1.04; letter-spacing: -.055em; }
p { color: var(--muted); }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; }
:is(a, button, input):focus-visible { outline: 2px solid #94620b; outline-offset: 3px; }
.container { width: min(100% - 56px, 1180px); margin-inline: auto; }

.topbar { border-bottom: 1px solid var(--line); background: var(--paper); }
.nav { min-height: 72px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .nav nav { display: flex; align-items: center; }
.brand { flex-shrink: 0; gap: 9px; font-weight: 800; letter-spacing: -.04em; }
.brand img { width: 34px; height: 34px; }
.brand span { line-height: 1.2; }
.nav nav { gap: 21px; font-size: 14px; font-weight: 650; }
.nav nav a[aria-current="page"] { text-underline-offset: 6px; text-decoration: underline 3px #94620b; }
.nav nav form { margin: 0; }
.site-language { white-space: nowrap; }
[dir="rtl"] :is(h1, h2, .brand) { letter-spacing: normal; line-height: 1.22; }
[dir="rtl"] .auth-arrow { transform: scaleX(-1); }

.button {
    display: inline-flex;
    min-height: 47px;
    justify-content: center;
    align-items: center;
    gap: 9px;
    padding: 10px 16px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: none;
    color: var(--ink);
    text-align: center;
    font-size: 14px;
    font-weight: 740;
    cursor: pointer;
}
.button:hover { filter: brightness(.96); }
.button.small { min-height: 39px; padding: 8px 13px; font-size: 13px; }
.button.fill { width: 100%; }
.button.dark { color: var(--white); background: var(--ink); }
.button.yellow { background: var(--accent); }
.button.outline { border-color: #dcd8c9; background: #fff; }
.button.link { padding-inline: 0; min-height: 39px; text-decoration: underline; text-underline-offset: .17em; }

.hero { display: grid; grid-template-columns: 1.02fr .98fr; align-items: center; gap: clamp(26px, 5vw, 68px); padding-block: clamp(32px, 6vw, 82px); }
.hero h1 { font-size: clamp(44px, 5.6vw, 83px); line-height: .98; font-weight: 850; letter-spacing: -.08em; }
.hero-copy > p { max-width: 38ch; margin-top: 21px; font-size: clamp(15px, 1.55vw, 18px); line-height: 1.6; }
.downloads { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 24px; }
.downloads .button { min-height: 53px; justify-content: space-between; gap: 14px; }
.hero-copy > .release-note { margin-top: 10px; font-size: 12px; }
.hero-art { height: clamp(370px, 42vw, 535px); position: relative; display: grid; place-items: center; isolation: isolate; overflow: hidden; border-radius: 29px; background: var(--accent); }
.hero-art::before { position: absolute; content: ''; inset: 16px; border: 1px dashed #a2641980; border-radius: 19px; z-index: -1; }
.hero-art > img { display: block; height: 87%; width: auto; border: 7px solid var(--ink); border-radius: 25px; box-shadow: 11px 17px 0 #102b3133; transform: rotate(-8deg); }
.benefits { display: grid; grid-template-columns: repeat(3, 1fr); border-block: 1px solid var(--line); margin-bottom: 38px; }
.benefits article { padding: 23px 21px; }
.benefits article + article { border-left: 1px solid var(--line); }
.benefits h2 { margin-bottom: 6px; font-size: 20px; letter-spacing: -.035em; }
.benefits p { max-width: 36ch; font-size: 14px; }

.card { border: 1px solid var(--line); border-radius: 19px; background: var(--white); }
.auth-wrap { padding-block: clamp(28px, 5vw, 70px); }
.auth-card { max-width: 485px; margin-inline: auto; padding: clamp(21px, 4vw, 36px); }
.auth-card h1, .page-header h1 { font-size: clamp(35px, 5vw, 51px); font-weight: 835; }
.auth-card > p, .page-header p { margin: 10px 0 22px; }
.fields { display: grid; gap: 14px; }
label, fieldset { color: var(--ink); font-size: 13px; font-weight: 700; }
label:not(.checkbox, .choice) { display: grid; gap: 6px; min-width: 0; }
input:not([type=checkbox], [type=radio]) { width: 100%; min-width: 0; min-height: 43px; padding: 9px 10px; border: 1px solid #dedacf; border-radius: 9px; background: #fcfcf9; color: var(--ink); font-size: 16px; }
input::file-selector-button { margin-right: 7px; padding: 4px 8px; border: 0; border-radius: 5px; background: var(--accent-light); cursor: pointer; }
input[type=checkbox], input[type=radio] { margin: 0; margin-inline-end: 4px; accent-color: #94620b; }
.checkbox, .choice { display: flex; align-items: center; gap: 6px; min-height: 27px; cursor: pointer; }
.divider { display: flex; align-items: center; gap: 11px; margin: 14px 0; color: var(--muted); font-size: 12px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.google-mark { color: #1a73e8; font-size: 20px; font-weight: 850; line-height: 1; }
.auth-links { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 7px; margin-top: 17px; font-size: 13px; font-weight: 650; }
.auth-links a:hover { text-decoration: underline; }
.feedback { padding-top: 14px; }
.notice { background: #eaf6ee; color: #255b42; padding: 10px 12px; border-radius: 9px; font-size: 14px; }
.notice.error { background: #fff0ea; color: #8e301d; }

.portal { padding-block: 33px 48px; }
.dashboard-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(245px, .39fr); gap: 16px; align-items: start; }
.history, .account, .settings { padding: 17px; }
.filters { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 16px; }
.filters a { display: inline-flex; min-height: 38px; align-items: center; border: 1px solid var(--line); padding: 7px 10px; border-radius: 30px; font-size: 12px; font-weight: 700; }
.filters a[aria-current="page"] { background: var(--accent); border-color: var(--accent); }
.date-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 8px; align-items: end; padding: 0 0 15px; }
.date-form label input { font-size: 14px; }
.date-form .button { min-height: 43px; }
.scan-group + .scan-group { margin-top: 19px; }
.scan-group h2 { margin: 0 0 7px; color: var(--muted); font-size: 13px; letter-spacing: 0; }
.scan-group ul { list-style: none; margin: 0; padding: 0; border: 1px solid var(--line); border-radius: 11px; }
.scan-group li { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; padding: 9px 10px; }
.scan-group li + li { border-top: 1px solid var(--line); }
.scan-data { min-width: 0; }
.payload { font-size: 15px; font-weight: 700; white-space: pre-wrap; overflow-wrap: anywhere; }
.scan-data time { color: var(--muted); font-size: 12px; }
.copy { flex-shrink: 0; }
.empty { border: 1px dashed var(--line); border-radius: 11px; padding: 28px 11px; text-align: center; }
.empty p { margin-top: 3px; font-size: 13px; }
.pagination { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 15px; color: var(--muted); font-size: 13px; }
.account-head { display: flex; align-items: center; gap: 9px; padding-bottom: 13px; margin-bottom: 13px; border-bottom: 1px solid var(--line); overflow-wrap: anywhere; }
.account-head p { font-size: 12px; }
.account-head h2, .settings h2 { font-size: 22px; }
.avatar { display: grid; place-items: center; width: 45px; height: 45px; flex: 0 0 45px; border-radius: 11px; background: var(--accent); font-weight: 800; }
.settings-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; gap: 14px; }
.settings header { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-bottom: 1px solid var(--line); margin-bottom: 14px; padding-bottom: 12px; }
.state { background: var(--accent-light); padding: 5px 8px; border-radius: 18px; font-weight: 700; font-size: 11px; }
fieldset { padding: 7px 9px; border: 1px solid var(--line); border-radius: 9px; }
fieldset legend { padding: 0 4px; }
small { color: var(--muted); font-weight: 500; }
.remove-form { margin-top: 10px; }
.remove { color: #8e301d; }

@media (max-width: 720px) {
    .container { width: calc(100% - 32px); }
    .nav { min-height: 60px; }
    .nav nav { gap: 9px; font-size: 12px; }
    .nav nav .small { padding-inline: 8px; font-size: 11px; }
    .brand img { width: 29px; height: 29px; }
    .hero { grid-template-columns: 1fr; gap: 22px; padding-block: 26px; }
    .hero-art { height: clamp(320px, 87vw, 470px); }
    .hero-copy > p { margin-top: 13px; }
    .downloads { margin-top: 16px; }
    .benefits { grid-template-columns: 1fr; }
    .benefits article { padding: 15px 4px; }
    .benefits article + article { border-left: 0; border-top: 1px solid var(--line); }
    .dashboard-grid, .settings-grid { grid-template-columns: 1fr; }
    .account { grid-row: 1; }
}

@media (max-width: 375px) {
    .nav:has(.site-language) { flex-wrap: wrap; gap: 8px; padding-block: 9px; }
    .nav:has(.site-language) nav { flex-wrap: wrap; }
    .date-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .date-form button { justify-self: start; }
}
