:root {
  --bg: #f6f8fc;
  --card: #ffffff;
  --text: #172033;
  --muted: #667085;
  --line: #d9e2f1;
  --blue: #2563eb;
  --violet: #7c3aed;
  --cyan: #0891b2;
  --green: #15803d;
  --red: #b42318;
  --shadow: 0 18px 45px rgba(35, 48, 84, 0.12);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
  background: radial-gradient(circle at top left, rgba(37, 99, 235, .12), transparent 28rem), var(--bg);
  color: var(--text);
}
a { color: inherit; text-decoration: none; }
main { width: min(1180px, calc(100% - 32px)); margin: 0 auto; padding: 28px 0 60px; }
.topbar {
  position: sticky; top: 0; z-index: 5;
  display: flex; justify-content: space-between; align-items: center; gap: 18px;
  padding: 16px max(16px, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,.86); backdrop-filter: blur(16px); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; font-size: 20px; }
.brand img { width: 40px; height: 40px; object-fit: contain; flex: 0 0 40px; }
.nav { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; color: var(--muted); }
.lang-switch { display: inline-flex; gap: 6px; font-size: 12px; color: var(--text); }
.btn, button {
  border: 0; border-radius: 8px; padding: 12px 18px; cursor: pointer; font-weight: 700;
  color: #fff; background: linear-gradient(135deg, var(--blue), var(--violet)); box-shadow: 0 10px 24px rgba(37,99,235,.22);
}
.btn.small, button.small { padding: 8px 12px; font-size: 14px; }
.btn.ghost, button.ghost { background: #eef4ff; color: var(--blue); box-shadow: none; }
button:disabled { opacity: .55; cursor: wait; }
.link { background: none; box-shadow: none; padding: 0; color: var(--blue); }
.danger { color: var(--red); }
.hero {
  min-height: 72vh; display: grid; grid-template-columns: 1.1fr .9fr; gap: 28px; align-items: center;
}
.hero h1 { margin: 0; font-size: clamp(42px, 6vw, 78px); line-height: 1.03; letter-spacing: 0; }
.hero p { color: var(--muted); font-size: 18px; max-width: 680px; }
.eyebrow { text-transform: uppercase; font-size: 13px; font-weight: 800; color: var(--cyan); letter-spacing: .08em; }
.actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 22px; }
.hero-panel {
  min-height: 380px; border-radius: 8px; padding: 24px; display: flex; align-items: end;
  background: linear-gradient(150deg, #dbeafe, #f5d0fe 52%, #ccfbf1);
  box-shadow: var(--shadow);
}
.doc-preview { background: rgba(255,255,255,.88); border: 1px solid rgba(255,255,255,.9); border-radius: 8px; padding: 22px; box-shadow: var(--shadow); }
.pill, .chips span, .chips a { display: inline-flex; border: 1px solid var(--line); border-radius: 999px; padding: 7px 10px; color: var(--muted); background: #fff; }
.chips a { color: var(--blue); font-weight: 800; }
.section { margin: 42px 0; }
.section-lead { max-width: 820px; color: var(--muted); line-height: 1.7; }
.text-link { color: var(--blue); font-weight: 800; }
.grid { display: grid; gap: 18px; }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.card, .auth-card, .metric, .step {
  background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 22px; box-shadow: 0 8px 28px rgba(35,48,84,.07);
}
.auth-card { max-width: 460px; margin: 42px auto; }
.price { font-size: 30px; font-weight: 800; }
.chips { display: flex; flex-wrap: wrap; gap: 10px; }
.step b, .metric strong { display: block; font-size: 32px; color: var(--blue); }
.metric span { color: var(--muted); text-transform: uppercase; font-size: 12px; font-weight: 800; }
form label { display: grid; gap: 7px; font-weight: 700; color: #344054; }
[hidden] { display: none !important; }
.custom-subject-field { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; align-items: end; }
.custom-subject-field .btn { grid-column: auto; white-space: nowrap; }
.annual-plan-fields {
  padding: 18px; border: 1px solid #b9ead0; border-radius: 8px; background: #f5fcf8;
}
.annual-plan-fields .alert { margin-top: 0; }
.favorite-control { display: grid; grid-template-columns: minmax(0, 1fr) 42px; gap: 6px; align-items: stretch; }
.favorite-button {
  grid-column: auto;
  width: 42px;
  min-height: 42px;
  padding: 0;
  border: 1px solid var(--line);
  background: #fff;
  color: #98a2b3;
  box-shadow: none;
  font-size: 25px;
  line-height: 1;
}
.favorite-button.active { color: #d49a00; background: #fff9db; border-color: #f5cc59; }
input, select, textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 8px; padding: 12px 13px; font: inherit; background: #fff; color: var(--text);
}
textarea { resize: vertical; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form-grid .wide, form button { grid-column: 1 / -1; }
.inline { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.generator-layout { display: grid; grid-template-columns: minmax(0, 1fr) 420px; gap: 20px; align-items: start; }
.result-panel { position: sticky; top: 88px; max-height: calc(100vh - 120px); overflow: auto; }
.generated-content, .document-content { line-height: 1.75; white-space: normal; }
.document-table-wrap { width: 100%; overflow-x: auto; margin: 18px 0; }
.document-export-table { width: 100%; min-width: 920px; border-collapse: collapse; font-size: 14px; }
.document-export-table th, .document-export-table td { padding: 10px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.document-export-table th { background: #eef4ff; color: var(--text); }
.shared-document-badge {
  display: inline-flex; margin-bottom: 12px; padding: 7px 10px; border: 1px solid #7ad7a4;
  border-radius: 999px; background: #ecfdf3; color: #116437; font-size: 13px; font-weight: 800;
}
.muted { color: var(--muted); }
.alert { border-radius: 8px; padding: 12px 14px; margin: 14px 0; }
.alert.error { background: #fff1f0; color: var(--red); border: 1px solid #fecdca; }
.alert.success { background: #ecfdf3; color: var(--green); border: 1px solid #abefc6; }
.loader { width: 36px; height: 36px; border: 4px solid #dbeafe; border-top-color: var(--blue); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dashboard-head { display: flex; justify-content: space-between; align-items: center; gap: 18px; margin-bottom: 20px; }
.table-toolbar { display: flex; justify-content: space-between; gap: 16px; align-items: center; margin-bottom: 14px; }
.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; min-width: 760px; }
.data-table th, .data-table td { padding: 13px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.document-view { max-width: 900px; margin: 0 auto; }
.document-actions { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.admin-shell { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 20px; align-items: start; }
.admin-menu { position: sticky; top: 88px; display: grid; gap: 8px; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.admin-menu a { padding: 10px; border-radius: 7px; color: var(--muted); }
.admin-menu a:hover { background: #eef4ff; color: var(--blue); }
.footer { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding: 28px max(16px, calc((100vw - 1180px) / 2)); color: var(--muted); border-top: 1px solid var(--line); }
.footer > div { display: grid; gap: 5px; }
.footer strong { color: var(--text); }
.footer-links { display: flex; justify-content: flex-end; align-items: center; gap: 14px; flex-wrap: wrap; }
.android-footer-link { display: inline-flex; align-items: center; gap: 9px; color: var(--blue); font-weight: 800; }
.android-mark {
  display: inline-grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px;
  border-radius: 7px; background: #3ddc84; color: #10261a; font-size: 14px; font-weight: 900;
}
.android-app-cta {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 22px;
  margin: 38px 0; padding: 24px; border: 1px solid #b9ead0; border-radius: 8px;
  background: linear-gradient(110deg, #effdf5, #ffffff 58%, #eef4ff);
  box-shadow: 0 10px 32px rgba(25, 100, 63, .09);
}
.android-app-cta img { width: 84px; height: 84px; object-fit: contain; }
.android-app-cta h2 { margin: 2px 0 7px; font-size: 25px; }
.android-app-cta p { margin: 0; color: var(--muted); }
.android-app-cta .eyebrow { margin-bottom: 2px; color: var(--green); }
.android-download-button { display: inline-flex; align-items: center; justify-content: center; gap: 9px; white-space: nowrap; }
.android-download-button .android-mark { box-shadow: none; }
.android-app-hero {
  display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(280px, .8fr); gap: 56px;
  align-items: center; min-height: 620px; padding: 34px 0 50px;
}
.android-app-hero h1 { margin: 8px 0 18px; max-width: 760px; font-size: clamp(42px, 6vw, 72px); line-height: 1.04; letter-spacing: 0; }
.android-app-hero__copy > p:not(.eyebrow) { max-width: 680px; color: var(--muted); font-size: 19px; line-height: 1.65; }
.android-requirements { font-size: 14px !important; }
.android-phone-preview {
  width: min(330px, 100%); aspect-ratio: 10 / 18; justify-self: center; padding: 14px;
  border: 8px solid #182033; border-radius: 42px; background: #182033; box-shadow: 0 28px 60px rgba(23, 32, 51, .24);
}
.android-phone-preview__screen {
  height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  border-radius: 29px; background: linear-gradient(155deg, #f8fbff, #e8fff2); text-align: center;
}
.android-phone-preview__screen img { object-fit: contain; }
.android-phone-preview__screen strong { font-size: 25px; }
.android-phone-preview__screen span { padding: 11px 18px; border-radius: 8px; background: var(--blue); color: #fff; font-weight: 800; }
.android-feature-grid .card { display: grid; grid-template-columns: auto 1fr; align-items: start; gap: 15px; }
.android-feature-grid .card span { color: var(--green); font-size: 15px; font-weight: 900; }
.android-feature-grid .card p { margin: 0; line-height: 1.6; }
.android-install-section {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 42px; margin: 52px 0 28px; padding: 34px;
  border-radius: 8px; background: #172033; color: #fff;
}
.android-install-section h2 { margin: 4px 0 10px; font-size: 30px; }
.android-install-section p { color: #c5cede; line-height: 1.6; }
.android-install-steps { display: grid; gap: 18px; margin: 0; padding-left: 28px; }
.android-install-steps li { padding-left: 8px; line-height: 1.6; }
.android-security-warning { margin: 28px 0; padding: 22px; border: 1px solid #f4c44e; border-radius: 8px; background: #fff9df; }
.android-security-warning p { margin: 7px 0 0; line-height: 1.55; }
.seo-summary {
  display: grid; grid-template-columns: .8fr 1.2fr; gap: 48px; margin: 56px 0; padding: 38px 0;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.seo-summary h2 { margin: 6px 0; font-size: 38px; line-height: 1.15; }
.seo-summary p, .seo-page p, .prose p { color: var(--muted); line-height: 1.75; }
.pricing-feature { display: flex; justify-content: space-between; align-items: center; gap: 22px; margin-top: 18px; padding: 18px 22px; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pricing-feature p { margin: 5px 0 0; color: var(--muted); }
.seo-page { padding: 12px 0 36px; }
.seo-page.narrow { max-width: 880px; margin: 0 auto; }
.seo-hero { max-width: 920px; padding: 54px 0 46px; }
.seo-hero h1, .page-heading h1 { margin: 8px 0 18px; font-size: clamp(40px, 6vw, 68px); line-height: 1.05; }
.seo-hero > p:not(.eyebrow), .page-heading > p { max-width: 820px; font-size: 19px; }
.page-heading { padding: 38px 0 28px; }
.breadcrumbs { display: flex; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 14px; }
.breadcrumbs a { color: var(--blue); }
.content-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; padding: 0; list-style-position: inside; }
.content-steps li { padding: 18px; border: 1px solid var(--line); border-radius: 8px; background: #fff; line-height: 1.55; }
.document-outline { margin: 42px 0; }
.sample-table { overflow-x: auto; margin-top: 18px; padding: 16px; background: #eef4ff; font-family: ui-monospace, monospace; white-space: nowrap; }
.faq-list { display: grid; gap: 12px; }
.faq-list details { border: 1px solid var(--line); border-radius: 8px; padding: 17px 19px; background: #fff; }
.faq-list summary { cursor: pointer; font-weight: 800; }
.faq-list details p { margin-bottom: 0; }
.related-links { display: flex; gap: 16px; flex-wrap: wrap; margin: 32px 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--blue); font-weight: 800; }
.example-grid h2 { font-size: 21px; }
.example-document { margin: 24px 0; }
.example-row { display: grid; grid-template-columns: 32px 1fr; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.example-row:last-child { border-bottom: 0; }
.prose h2 { margin-top: 36px; }

@media (max-width: 900px) {
  .hero, .grid.two, .grid.three, .grid.five, .generator-layout, .admin-shell, .android-app-hero, .android-install-section, .seo-summary, .content-steps { grid-template-columns: 1fr; }
  .hero { min-height: auto; padding: 24px 0; }
  .hero-panel, .result-panel, .admin-menu { position: static; }
  .form-grid { grid-template-columns: 1fr; }
  .dashboard-head, .table-toolbar, .footer, .topbar { align-items: flex-start; flex-direction: column; }
  .android-app-cta { grid-template-columns: auto minmax(0, 1fr); }
  .android-app-cta .android-download-button { grid-column: 1 / -1; width: 100%; white-space: normal; text-align: center; }
  .android-app-hero { min-height: auto; gap: 32px; }
  .android-phone-preview { width: min(280px, 82vw); }
  .pricing-feature { align-items: flex-start; flex-direction: column; }
}

@media (max-width: 560px) {
  .android-app-cta { grid-template-columns: 1fr; text-align: left; }
  .android-app-cta img { width: 64px; height: 64px; }
  .android-app-cta .android-download-button { grid-column: auto; }
  .android-app-hero h1 { font-size: 40px; }
  .android-install-section { padding: 24px; }
}
