:root {
  --ink: #111827; --muted: #4B5563; --line: #E5E7EB; --line-strong: #9CA3AF;
  --soft: #F3F4F6; --accent: #0F766E; --accent-dark: #134E4A; --white: #FFFFFF; --danger: #B42318;
  --head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; font-family: Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink); background: var(--white); line-height: 1.5; }
a { color: var(--accent); }
a:hover { color: var(--accent-dark); }
h1, h2, h3 { font-family: var(--head); font-weight: 700; margin: 0; line-height: 1.12; }
p { margin: 0; }
button, input, textarea, select { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #5EEAD4; outline-offset: 2px; }
.wrap { max-width: 1136px; margin: 0 auto; }
.eyebrow { font-size: 14px; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; color: var(--accent); }
.muted { color: var(--muted); }

/* header and footer */
.site-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; padding: 18px 48px; border-bottom: 1px solid var(--line); }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-family: var(--head); font-weight: 700; font-size: 20px; }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 28px; font-size: 15px; font-weight: 500; }
.site-nav a { color: #374151; text-decoration: none; padding: 8px 0; }
.site-nav a:hover { color: var(--accent); }
.site-footer { border-top: 1px solid var(--line); padding: 28px 48px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--muted); }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 24px; }
.site-footer a { color: #374151; text-decoration: none; }

/* buttons and fields */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 48px; padding: 0 22px; border-radius: 10px; border: 1px solid var(--line-strong); background: var(--white); color: var(--ink); font-weight: 600; font-size: 15px; text-decoration: none; cursor: pointer; }
.btn:hover { border-color: var(--ink); color: var(--ink); }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--white); }
.btn-primary:hover { background: var(--accent-dark); border-color: var(--accent-dark); color: var(--white); }
.btn-dark { background: var(--ink); border-color: var(--ink); color: var(--white); }
.btn-dark:hover { color: var(--white); background: #000; }
.btn-big { min-height: 60px; font-size: 18px; justify-content: space-between; width: 100%; border-radius: 12px; }
.btn-small { min-height: 44px; padding: 0 14px; font-size: 14px; }
.btn[disabled] { opacity: 0.6; cursor: default; }
.field { height: 48px; padding: 0 14px; font-size: 16px; border: 1px solid var(--line-strong); border-radius: 10px; background: var(--white); min-width: 0; }
.msg { font-size: 15px; color: var(--danger); min-height: 22px; }

/* home */
.hero { max-width: 1200px; margin: 0 auto; padding: 56px 32px 72px; display: flex; flex-wrap: wrap; align-items: flex-start; gap: 48px; }
.hero-text { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 22px; }
.hero-text h1 { font-size: clamp(34px, 5vw, 48px); }
.hero-text .lead { font-size: 18px; line-height: 1.55; color: var(--muted); }
.hero-actions { display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.code-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; max-width: 420px; }
.code-form label { flex: 1 1 100%; font-size: 15px; font-weight: 600; }
.code-form .field { flex: 1 1 200px; }
.preview { flex: 999 1 520px; min-width: 0; background: var(--soft); border: 1px solid var(--line); border-radius: 20px; padding: 20px; display: flex; flex-direction: column; gap: 16px; }
.preview-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.preview-code { font-family: var(--head); font-weight: 700; font-size: 24px; }
.preview-cols { display: flex; flex-wrap: wrap; gap: 16px; }
.preview-card { flex: 1 1 240px; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 18px; display: flex; flex-direction: column; gap: 10px; min-height: 300px; }
.label { font-size: 13px; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
.chip-row { display: flex; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--soft); border-radius: 10px; font-size: 14px; }
.dropzone-demo { margin-top: auto; padding: 22px 14px; border: 2px dashed var(--line-strong); border-radius: 12px; text-align: center; font-size: 15px; font-weight: 600; }
.band { padding: 72px 32px; }
.band-soft { background: var(--soft); }
.band-dark { background: var(--ink); color: #F9FAFB; padding: 64px 32px; }
.band h2 { font-size: clamp(28px, 4vw, 36px); }
.stack { display: flex; flex-direction: column; gap: 36px; }
.row { display: flex; flex-wrap: wrap; gap: 20px; }
.card { flex: 1 1 280px; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; gap: 12px; }
.card h3 { font-size: 22px; }
.card p { font-size: 16px; color: var(--muted); line-height: 1.55; }
.step-num { width: 44px; height: 44px; border-radius: 22px; background: var(--accent); color: var(--white); display: flex; align-items: center; justify-content: center; font-family: var(--head); font-weight: 700; font-size: 20px; }
.use { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; gap: 10px; border-top: 3px solid var(--accent); padding-top: 20px; }
.use h3 { font-size: 22px; }
.use p { color: var(--muted); line-height: 1.6; }
.point { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 8px; }
.point h3 { font-size: 20px; }
.point p { font-size: 15px; color: #D1D5DB; }
.plan { gap: 14px; }
.plan-featured { border: 2px solid var(--accent); }
.plan .price { font-family: var(--head); font-weight: 700; font-size: 34px; }
.plan .price small { font-family: Inter, sans-serif; font-weight: 500; font-size: 16px; color: var(--muted); }
.plan ul { margin: 0; padding-left: 20px; font-size: 15px; line-height: 1.9; }
.plan .btn { margin-top: auto; }
.tag { align-self: flex-start; font-size: 13px; font-weight: 600; padding: 4px 10px; border-radius: 999px; background: var(--soft); color: var(--muted); }
.faq { max-width: 820px; margin: 0 auto; display: flex; flex-direction: column; gap: 28px; }
.faq-item { display: flex; flex-direction: column; gap: 8px; border-bottom: 1px solid var(--line); padding-bottom: 22px; }
.faq-item:last-child { border-bottom: 0; }
.faq-item h3 { font-family: Inter, sans-serif; font-size: 18px; font-weight: 600; }
.faq-item p { color: var(--muted); line-height: 1.6; }

/* text pages */
.doc { max-width: 760px; margin: 0 auto; padding: 56px 32px 80px; display: flex; flex-direction: column; gap: 18px; }
.doc h1 { font-size: 40px; }
.doc h2 { font-size: 22px; margin-top: 14px; }
.doc p, .doc li { color: #374151; line-height: 1.65; }
.doc ul { margin: 0; padding-left: 22px; }

/* shelf */
.shelf-page { background: var(--soft); min-height: 100vh; display: flex; flex-direction: column; }
.shelf-bar { background: var(--white); border-bottom: 1px solid var(--line); padding: 16px 32px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; }
.shelf-code { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.shelf-code strong { font-family: var(--head); font-size: clamp(20px, 3.4vw, 28px); overflow-wrap: anywhere; }
.shelf-tools { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.timer { font-size: 14px; color: var(--muted); margin-right: 6px; }
.shelf-main { flex: 1; width: 100%; max-width: 1280px; margin: 0 auto; padding: 24px 32px 40px; display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.panel { flex: 1 1 380px; min-width: 0; background: var(--white); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; min-height: 480px; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
#notes { flex: 1; width: 100%; min-height: 360px; resize: vertical; border: 1px solid var(--line); border-radius: 12px; padding: 14px; font-size: 16px; line-height: 1.6; background: var(--white); }
.dropzone { border: 2px dashed var(--line-strong); border-radius: 14px; padding: 26px 16px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; background: var(--white); }
.dropzone.over { border-color: var(--accent); background: #F0FDFA; }
.file-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.file { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 14px; background: var(--soft); border-radius: 12px; }
.file-name { font-weight: 500; overflow-wrap: anywhere; min-width: 0; flex: 1 1 180px; }
.file-meta { font-size: 14px; color: var(--muted); }
.file-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.progress { flex: 1 1 100%; height: 6px; background: #D1D5DB; border-radius: 3px; overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--accent); }
.usage { font-size: 14px; color: var(--muted); }
.shelf-foot { text-align: center; font-size: 14px; color: var(--muted); padding: 0 24px 28px; }
.linklike { background: none; border: 0; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; font-size: inherit; }
.state { max-width: 560px; margin: 80px auto; padding: 0 24px; text-align: center; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.state h1 { font-size: 34px; }
dialog { border: 1px solid var(--line); border-radius: 16px; padding: 24px; max-width: 420px; width: calc(100% - 32px); }
dialog::backdrop { background: rgba(17, 24, 39, 0.45); }
dialog form { display: flex; flex-direction: column; gap: 14px; }
dialog h2 { font-size: 22px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; }
#qr { background: var(--white); padding: 10px; border-radius: 10px; display: flex; justify-content: center; }
[hidden] { display: none !important; }

@media (max-width: 640px) {
  .site-header, .site-footer { padding-left: 20px; padding-right: 20px; }
  .hero { padding: 36px 20px 48px; }
  .band { padding: 48px 20px; }
  .shelf-bar { padding: 14px 16px; }
  .shelf-main { padding: 16px; }
}
