/* Brand tokens and proportions from digital-standart.ru, adapted to document workflows. */
:root {
  color-scheme: light;
  --paper: #f7f8fa;
  --white: #fff;
  --ink: #181b24;
  --muted: #626976;
  --blue: #3556df;
  --blue-hover: #2744bf;
  --blue-light: #e9eeff;
  --line: #d7dce5;
  --field-line: #929bab;
  --surface: #eef1f6;
  --dark: #191d26;
  --dark-muted: #b9c0ce;
  --dark-line: #3b424f;
  --dark-accent: #a9baff;
  --success: #215839;
  --success-bg: #e4f1e8;
  --warning: #795313;
  --warning-bg: #fff3d9;
  --error: #9c2735;
  --error-bg: #fff0f1;
  --radius: 7px;
  --space: 24px;
  --small: .875rem;
  --large: 1.3rem;
  --display: clamp(2.2rem, 4.7vw, 4.4rem);
  font-family: 'Golos Text', system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
  scroll-behavior: smooth;
  scroll-padding-top: 28px;
  scrollbar-gutter: stable;
}
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
main { flex: 1; min-width: 0; }
h1, h2, h3, p { margin: 0; }
p { line-height: 1.6; }
h1, h2, h3 { text-wrap: balance; }
h2 { font-size: var(--display); font-weight: 600; letter-spacing: -.052em; line-height: 1.08; }
h3 { font-weight: 600; line-height: 1.25; }
button, input { font: inherit; }
button, a, input { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-underline-offset: 4px; }
button { cursor: pointer; }
form { margin: 0; min-width: 0; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 5px; }
#main:focus { outline: none; }
::selection { background: #cdd7ff; color: var(--ink); }
.wrap { width: min(1280px, calc(100% - 96px)); margin-inline: auto; }
.accent { color: var(--blue); }
.muted, .hint { color: var(--muted); }
.hint { font-size: var(--small); line-height: 1.5; }
.eyebrow { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: var(--small); font-weight: 500; letter-spacing: .07em; text-transform: uppercase; }
.small-cross { color: var(--blue); font-size: 22px; line-height: 1; }
.intro { font-size: var(--large); line-height: 1.5; max-width: 55ch; }
.skip-link { position: absolute; top: -100px; left: 16px; z-index: 10; padding: 16px; background: var(--white); }
.skip-link:focus { top: 12px; }
.header { display: flex; align-items: center; justify-content: space-between; padding-block: 28px; gap: var(--space); }
.brand { display: flex; align-items: center; gap: 12px; color: var(--blue); text-decoration: none; font-size: 18px; font-weight: 600; line-height: 1.05; letter-spacing: -.025em; flex-shrink: 0; }
.brand-mark { display: block; width: 54px; height: 45px; background: var(--blue); mask: url('./brand/logo.png') left top / 54px 63px no-repeat; -webkit-mask: url('./brand/logo.png') left top / 54px 63px no-repeat; }
.header-nav { display: flex; align-items: center; gap: 36px; font-size: var(--small); }
.header-nav > a, .nav-button { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; padding: 12px 0; text-decoration: none; }
.header-nav > a:hover, .nav-button:hover { color: var(--blue-hover); }
.nav-button { background: transparent; border: 0; color: var(--blue); }
.nav-button span { font-size: 24px; line-height: 1; }
.product-name { color: var(--muted); }
.button { border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue); color: var(--white); min-height: 56px; padding: 16px 20px; display: inline-flex; align-items: center; justify-content: space-between; gap: var(--space); font-weight: 500; font-size: var(--small); text-decoration: none; }
.button:hover { background: var(--blue-hover); border-color: var(--blue-hover); }
.button:active { transform: translateY(1px); }
.button span { font-size: 23px; line-height: .8; }
.button-secondary { color: var(--blue); background: transparent; }
.button-secondary:hover { color: var(--blue-hover); background: var(--blue-light); }
.button:disabled { cursor: wait; opacity: .7; }
.text-link { display: inline-flex; align-items: center; gap: var(--space); min-height: 44px; color: var(--blue); text-decoration: none; font-size: var(--small); font-weight: 500; }
.text-link:hover { text-decoration: underline; }
.footer { border-top: 1px solid var(--line); padding-block: 36px 28px; display: flex; justify-content: space-between; gap: 32px; }
.footer p { color: var(--muted); font-size: var(--small); }
.footer-brand { display: inline-flex; align-items: center; gap: 16px; min-height: 44px; color: var(--blue); text-decoration: none; font-weight: 500; }
.footer-brand:hover { text-decoration: underline; }
.footer > p { padding-top: 12px; }

/* Main menu: the source site's typographic hero and ruled service grid. */
.hero { padding-top: 70px; }
.hero h1 { margin-top: 28px; font-size: clamp(2.5rem, 6.95vw, 6.45rem); letter-spacing: -.062em; font-weight: 600; line-height: 1.04; }
.hero h1 > span { display: block; }
.hero-bottom { display: grid; grid-template-columns: .85fr 1.25fr; gap: 80px; align-items: start; margin-top: 52px; }
.hero-bottom .intro { max-width: 36ch; }
.hero-action { justify-self: end; padding-top: 4px; }
.hero-action .button { min-width: 280px; }
.hero-action .hint { margin-top: 12px; }
.hero-caption { margin-top: 54px; border-top: 1px solid var(--line); padding: 18px 0; min-height: 80px; display: flex; align-items: center; justify-content: space-between; gap: 16px; color: var(--muted); font-size: var(--small); }
.hero-caption > .accent { font-size: 24px; }
.catalog { background: var(--surface); padding-block: 86px; }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 32px; margin-bottom: 52px; }
.section-heading > p { color: var(--muted); padding-bottom: 6px; }
.service-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.service { border-top: 1px solid #c9d0dc; display: grid; grid-template-columns: 30px 1fr 24px; align-items: start; gap: 18px; padding: 32px 12px 32px 0; min-width: 0; text-decoration: none; }
.service-index { font-family: ui-monospace, monospace; color: var(--muted); font-size: var(--small); padding-top: 6px; }
.service-content { display: flex; flex-direction: column; gap: 12px; }
.service h3 { font-size: clamp(1.15rem, 1.8vw, 1.55rem); letter-spacing: -.035em; }
.service p { color: #545e70; line-height: 1.55; }
.service-format { color: var(--muted); font-size: var(--small); line-height: 1.5; }
.service-cta { color: var(--blue); font-size: var(--small); font-weight: 500; padding-top: 12px; }
.service-arrow { font-size: 26px; line-height: 1; color: var(--blue); transition: transform 180ms ease-out; }
.service:hover h3 { color: var(--blue); }
.service:hover .service-arrow { transform: translate(2px, -2px); }
.upcoming-heading { display: flex; flex-wrap: wrap; align-items: center; gap: 16px; margin-top: 48px; margin-bottom: 24px; }
.upcoming-heading h3 { font-size: var(--large); letter-spacing: -.035em; }
.badge { border: 1px solid var(--field-line); border-radius: var(--radius); padding: 6px 10px; font-size: var(--small); color: var(--muted); }
.upcoming-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 48px; }
.upcoming-task { border-top: 1px solid var(--line); padding-block: 24px; }
.upcoming-task h3 { font-size: 1rem; line-height: 1.6; }
.soon { color: var(--muted); font-size: var(--small); font-weight: 400; margin-left: 8px; white-space: nowrap; }
.upcoming-task p { color: var(--muted); font-size: var(--small); margin-top: 8px; max-width: 55ch; }
.workflow { background: var(--dark); color: var(--paper); padding-block: 72px; }
.workflow h2 { font-size: clamp(2rem, 3.5vw, 3rem); }
.workflow h2 > span { color: #8da4ff; }
.workflow-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; list-style: none; padding: 0; margin: 40px 0 0; }
.workflow-steps li { border-top: 1px solid var(--dark-line); padding-top: 24px; }
.workflow-steps li > span { color: var(--dark-accent); font-size: var(--small); }
.workflow-steps h3 { font-size: var(--large); margin-top: 20px; letter-spacing: -.035em; }
.workflow-steps p { color: var(--dark-muted); margin-top: 12px; }

/* Shared forms and the login workspace. */
.login-layout { display: grid; grid-template-columns: 1.15fr 1fr; gap: 100px; align-items: start; padding-block: 90px 104px; }
.login-intro h1 { margin-top: 28px; font-size: var(--display); font-weight: 600; letter-spacing: -.052em; line-height: 1.08; }
.login-intro .intro { margin-top: 32px; max-width: 36ch; }
.login-caption { border-top: 1px solid var(--line); margin-top: 48px; padding-top: 20px; font-size: var(--small); color: var(--muted); }
.login-form-section { padding-top: 6px; }
.login-form-section h2 { font-size: clamp(1.65rem, 2.6vw, 2.3rem); letter-spacing: -.04em; line-height: 1.12; margin-bottom: 16px; }
.login-steps { padding-left: 24px; margin-block: 32px; }
.login-steps li { padding-left: 8px; margin-block: 12px; line-height: 1.6; }
.login-steps li::marker { color: var(--blue); }
.login-steps a { color: var(--blue); overflow-wrap: anywhere; }
code { background: var(--blue-light); border-radius: 3px; padding: 2px 6px; }
.pin-form { display: grid; gap: 12px; }
.pin-form label { font-size: var(--small); font-weight: 500; }
input[type=text] { width: 100%; background: transparent; color: var(--ink); border: 1px solid var(--field-line); border-radius: var(--radius); padding: 16px; min-height: 56px; }
input::placeholder { color: #667080; opacity: 1; }
input:hover { border-color: var(--blue); }
input[aria-invalid=true] { border-color: var(--error); }
.pin-input { font-variant-numeric: tabular-nums; }
.pin-form .button { margin-top: 12px; width: 100%; }
.alert { color: var(--error); background: var(--error-bg); border: 1px solid var(--error); padding: 16px; border-radius: var(--radius); margin-block: 20px; line-height: 1.5; overflow-wrap: anywhere; }

/* Task upload and job results use the same brand, with compact headings. */
.workspace { padding-block: 28px 96px; }
.breadcrumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; font-size: var(--small); color: var(--muted); margin-bottom: 40px; overflow-wrap: anywhere; }
.breadcrumbs a { min-height: 44px; display: inline-flex; align-items: center; text-decoration: none; }
.breadcrumbs a:hover { color: var(--blue); text-decoration: underline; }
.page-heading { margin-bottom: 48px; }
.page-heading h1 { font-size: var(--display); font-weight: 600; letter-spacing: -.052em; line-height: 1.08; margin-top: 24px; }
.page-heading .intro, .source-name { margin-top: 24px; color: var(--muted); }
.source-name { overflow-wrap: anywhere; }
.source-name strong { color: var(--ink); font-weight: 500; }
.upload-layout { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); gap: 72px; }
.upload-form { min-width: 0; border-top: 1px solid var(--line); padding-top: 32px; }
.upload-form h2, .upload-aside h2, .result-files h2 { font-size: var(--large); letter-spacing: -.035em; line-height: 1.25; margin-bottom: 12px; }
.file-area { margin-top: 28px; border: 1px dashed var(--field-line); border-radius: var(--radius); padding: 32px; background: var(--white); }
.file-area:focus-within { border-color: var(--blue); }
.file-area.is-dragging { border-color: var(--blue); background: var(--blue-light); }
.file-area .hint, .file-area .alert { overflow-wrap: anywhere; }
.file-area [hidden] { display: none; }
.upload-mark { display: block; color: var(--blue); font-size: 32px; margin-bottom: 20px; }
.file-area label { font-weight: 500; display: block; }
.file-area .hint { margin-top: 8px; }
input[type=file] { display: block; width: 100%; min-width: 0; min-height: 56px; margin-top: 24px; font-size: var(--small); color: var(--muted); cursor: pointer; }
input[type=file]::file-selector-button { min-height: 48px; padding: 12px 16px; margin-right: 12px; border: 1px solid var(--blue); border-radius: var(--radius); background: var(--blue-light); color: var(--blue); font: inherit; font-weight: 500; cursor: pointer; }
input[type=file]::file-selector-button:hover { background: var(--blue); color: var(--white); }
.form-actions { display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-top: 28px; }
.upload-aside { background: var(--surface); padding: 32px; border-radius: var(--radius); }
.next-steps { margin: 28px 0; padding-left: 24px; }
.next-steps li { padding-left: 8px; margin-block: 24px; }
.next-steps li::marker { color: var(--blue); font-size: var(--small); }
.next-steps strong { font-weight: 500; }
.next-steps p { font-size: var(--small); color: var(--muted); margin-top: 8px; }
.aside-note { border-top: 1px solid var(--line); padding-top: 20px; color: var(--muted); font-size: var(--small); }
.status-panel { border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); padding: 40px; }
.status-panel h2 { font-size: clamp(1.65rem, 2.6vw, 2.3rem); letter-spacing: -.04em; line-height: 1.12; margin-block: 24px 16px; }
.status-panel p { max-width: 65ch; overflow-wrap: anywhere; }
.status-top { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.status-mark { display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%; background: var(--blue-light); color: var(--blue); font-size: 26px; }
.spinner { background: transparent; border: 3px solid var(--blue-light); border-top-color: var(--blue); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.status-panel[data-status=success] .status-mark { color: var(--success); background: var(--success-bg); }
.status-panel[data-status=warning] .status-mark { color: var(--warning); background: var(--warning-bg); }
.status-panel[data-status=failed] .status-mark { color: var(--error); background: var(--error-bg); }
.status-panel[data-status=failed] h2 { color: var(--error); }
.status-note { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); font-size: var(--small); color: var(--muted); }
.error-details { margin-top: 24px; }
.error-details summary { min-height: 44px; padding-block: 12px; cursor: pointer; color: var(--error); }
.error-details pre { background: var(--error-bg); padding: 16px; border-radius: var(--radius); white-space: pre-wrap; overflow-wrap: anywhere; font-size: var(--small); line-height: 1.6; }
.result-files { margin-top: 40px; }
.artifact-list { list-style: none; margin: 24px 0 0; padding: 0; }
.artifact-list li { display: flex; align-items: center; justify-content: space-between; gap: 24px; padding-block: 24px; border-top: 1px solid var(--line); }
.artifact-info { min-width: 0; }
.artifact-info h3 { font-size: 1rem; overflow-wrap: anywhere; }
.artifact-info p { color: var(--muted); font-size: var(--small); margin-top: 8px; overflow-wrap: anywhere; }
.artifact-list .button { flex-shrink: 0; }
.empty-state { padding-block: 32px; color: var(--muted); }
.result-actions { justify-content: start; }

@media (min-width: 1500px) {
  .hero { padding-top: 90px; }
  .hero-bottom, .hero-caption { margin-top: 64px; }
}
@media (max-width: 1150px) {
  .hero-bottom { gap: 40px; }
  .login-layout { gap: 48px; }
  .upload-layout { gap: 32px; }
}
@media (max-width: 780px) {
  .wrap { width: calc(100% - 40px); }
  .header { padding-block: 22px; }
  .header-nav { gap: 16px; }
  .hero { padding-top: 48px; }
  .hero-bottom { grid-template-columns: 1fr; gap: 28px; margin-top: 32px; }
  .hero-bottom .intro { max-width: 48ch; }
  .hero-action { justify-self: start; }
  .hero-caption { margin-top: 36px; }
  .section-heading { align-items: start; flex-direction: column; gap: 24px; margin-bottom: 32px; }
  .catalog { padding-block: 56px; }
  .service-grid, .upcoming-grid { gap: 0 24px; }
  .service { grid-template-columns: 24px 1fr 22px; gap: 12px; padding-block: 24px; }
  .service h3 { font-size: 1.2rem; }
  .workflow { padding-block: 56px; }
  .workflow-steps { gap: 24px; }
  .workflow-steps h3 { font-size: 1rem; }
  .workflow-steps p { font-size: var(--small); }
  .login-layout { grid-template-columns: 1fr; gap: 48px; padding-block: 48px 64px; }
  .login-intro .intro { max-width: 48ch; }
  .login-caption { margin-top: 28px; }
  .login-form-section { max-width: 560px; width: 100%; }
  .workspace { padding-block: 16px 64px; }
  .breadcrumbs { margin-bottom: 24px; }
  .page-heading { margin-bottom: 32px; }
  .upload-layout { grid-template-columns: 1fr; }
  .status-panel { padding: 28px; }
}
@media (max-width: 480px) {
  .header { gap: 12px; }
  .brand { gap: 8px; font-size: 16px; }
  .brand-mark { width: 42px; height: 36px; mask-size: 42px 49px; -webkit-mask-size: 42px 49px; }
  .header-nav { gap: 12px; font-size: .8rem; }
  .nav-button { gap: 6px; }
  .nav-button span, .product-name { display: none; }
  .eyebrow { font-size: .75rem; gap: 8px; }
  .hero { padding-top: 32px; }
  .hero h1 { font-size: clamp(2.2rem, 8.5vw, 2.8rem); }
  .hero h1 > span { max-width: 100%; }
  .intro { font-size: 1rem; }
  .hero-action, .hero-action .button { width: 100%; min-width: 0; }
  .hero-caption { font-size: .8rem; }
  .service-grid, .upcoming-grid, .workflow-steps { grid-template-columns: 1fr; }
  .upcoming-task p, .workflow-steps p { font-size: 1rem; }
  .workflow-steps h3 { font-size: var(--large); }
  .login-layout { padding-top: 32px; gap: 40px; }
  .login-intro h1 { font-size: clamp(2rem, 8.8vw, 2.6rem); }
  .file-area, .upload-aside, .status-panel { padding: 24px 20px; }
  .file-area input { font-size: .8rem; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .upload-form .form-actions .button { order: -1; }
  .artifact-list li { align-items: start; flex-direction: column; }
  .artifact-list .button { width: 100%; }
  .footer { flex-direction: column; gap: 16px; }
  .footer > p { padding-top: 0; }
}
@media (prefers-reduced-motion: reduce) {
  :root { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
