:root {
  --bg: #f6f7f9;
  --card: #ffffff;
  --ink: #1c2430;
  --muted: #6b7785;
  --line: #e3e7ec;
  --brand: #2563eb;
  --brand-dark: #1d4ed8;
  --success: #16a34a;
  --danger: #dc2626;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.55;
}

a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ---- Layout ---- */
.topbar {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 28px; background: var(--card); border-bottom: 1px solid var(--line);
}
.brand { display: inline-flex; align-items: center; gap: 9px; font-size: 20px; font-weight: 800; color: var(--ink); }
.brand span { color: var(--brand); }
.brand-logo { height: 28px; width: auto; display: block; }
.topbar nav a { margin-left: 18px; font-weight: 600; }
.topbar nav a.muted { color: var(--muted); font-weight: 500; }
.ui-lang-select { margin-left: 18px; padding: 5px 8px; border: 1px solid var(--line); border-radius: 7px; font-size: 13px; background: #fff; width: auto; cursor: pointer; }

.container { max-width: 1040px; margin: 0 auto; padding: 32px 28px 60px; }

.footer {
  text-align: center; color: var(--muted); font-size: 13px;
  padding: 24px; border-top: 1px solid var(--line);
}

/* ---- Hero ---- */
.hero { padding: 24px 0 8px; }
.hero-center { text-align: center; max-width: 640px; margin: 0 auto; }
.hero h1 { font-size: 32px; margin: 0 0 12px; }
.lead { color: var(--muted); font-size: 17px; margin: 0 0 20px; }
.fineprint { color: var(--muted); font-size: 13px; }
.cta-row { display: flex; gap: 12px; flex-wrap: wrap; }

/* ---- Cards ---- */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 32px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 6px; font-size: 15px; }
.card p { margin: 0; color: var(--muted); font-size: 14px; }

/* ---- Buttons ---- */
.btn {
  display: inline-block; padding: 10px 18px; border-radius: 8px;
  font-weight: 600; font-size: 14px; border: 1px solid transparent;
  cursor: pointer; text-align: center; transition: all .12s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--brand); color: #fff; }
.btn-primary:hover { background: var(--brand-dark); color: #fff; }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--ink); }
.btn-ghost:hover { background: #eef1f5; }
.btn-success { background: var(--success); color: #fff; }
.btn-danger { background: var(--danger); color: #fff; }
.btn-danger:hover { background: #b91c1c; color: #fff; }
.danger-zone { border-color: #f3c2c2 !important; }
.danger-zone > summary { color: var(--danger); }
.btn-success:hover { background: #15803d; color: #fff; }
.btn-lg { padding: 14px 26px; font-size: 16px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-block { display: block; width: 100%; margin-top: 14px; }

/* ---- Banners / toasts ---- */
.banner { padding: 14px 18px; border-radius: var(--radius); margin-bottom: 22px; }
.banner-warn { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; }
.banner ul { margin: 6px 0 0; padding-left: 18px; }

.toast { display: inline-block; padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; }
.toast-ok { background: #ecfdf5; color: #047857; }
.toast-err { background: #fef2f2; color: var(--danger); }

/* ---- Forms ---- */
.form { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; max-width: 680px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 600; font-size: 14px; margin-bottom: 6px; }
.req { color: var(--danger); }
.hint { display: block; margin-top: 5px; color: var(--muted); font-size: 12px; }
input[type=text], input[type=number], select, textarea, input[type=file] {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line);
  border-radius: 8px; font-size: 14px; font-family: inherit; background: #fff;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); border-color: var(--brand); }
.readonly { background: #f3f4f6; color: var(--muted); }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 6px; }
.logo-preview { margin-top: 10px; display: flex; align-items: center; gap: 10px; }
.logo-preview img { max-height: 48px; border: 1px solid var(--line); border-radius: 6px; padding: 4px; }
.form-section { margin: 28px 0 14px; padding-top: 16px; border-top: 1px solid var(--line); font-size: 16px; }
.form-section:first-of-type { margin-top: 0; padding-top: 0; border-top: none; }
.set-card { border: 1px solid var(--line); border-radius: 10px; margin-bottom: 14px; background: var(--card); }
.set-card > summary { cursor: pointer; padding: 16px 18px; font-weight: 700; font-size: 15px; user-select: none; }
.set-card[open] > summary { border-bottom: 1px solid var(--line); }
.set-body { padding: 18px; }
.grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.color-row { display: flex; align-items: center; gap: 12px; }
.color-row input[type=color] { width: 52px; height: 38px; padding: 2px; cursor: pointer; }
.radio-row { display: flex; gap: 18px; padding-top: 6px; }
.radio { display: inline-flex; align-items: center; gap: 6px; font-weight: 500; }
.radio input { width: auto; }
.bank-row { border: 1px solid var(--line); border-radius: 8px; padding: 14px; margin-bottom: 12px; background: #fbfcfd; display: flex; flex-direction: column; gap: 10px; }
.bank-row-head { display: flex; gap: 10px; align-items: center; }
.bank-label-input { font-weight: 600; }

/* ---- Tables ---- */
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.table { width: 100%; border-collapse: collapse; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.table th, .table td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); font-size: 14px; }
.table thead th { background: #f9fafb; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .5px; }
.table tbody tr:last-child td { border-bottom: none; }
.table .num { text-align: right; }
.mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 13px; }
.badge { padding: 3px 9px; border-radius: 99px; font-size: 12px; font-weight: 600; background: #eef1f5; color: var(--muted); }
.badge-issue, .badge-submitted { background: #dbeafe; color: #1e40af; }
.badge-settled, .badge-paid { background: #dcfce7; color: #166534; }

.empty { background: var(--card); border: 1px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; color: var(--muted); }

/* ---- Spinner ---- */
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: spin .7s linear infinite; vertical-align: -2px; }
.spinner-row { color: var(--muted); padding: 14px 0; }
@keyframes spin { to { transform: rotate(360deg); } }
.htmx-indicator { display: none; }
.htmx-indicator.htmx-request, .htmx-request .htmx-indicator { display: inline-block; }

/* ---- Preview layout ---- */
.preview-layout { display: grid; grid-template-columns: 360px 1fr; gap: 24px; align-items: start; }
.editor { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; position: sticky; top: 16px; max-height: calc(100vh - 32px); overflow-y: auto; }
.ed-lang { background: #eef4ff; border: 1px solid #c9ddff; border-radius: 8px; padding: 12px; margin-bottom: 14px; }
.ed-lang label { display: block; margin-bottom: 6px; font-size: 14px; }
.ed-sec { border: 1px solid var(--line); border-radius: 8px; margin-bottom: 10px; }
.ed-sec > summary { cursor: pointer; padding: 10px 12px; font-weight: 600; font-size: 14px; user-select: none; }
.ed-sec[open] > summary { border-bottom: 1px solid var(--line); }
.ed-body { padding: 12px; }
.ed-body .field { margin-bottom: 12px; }
.ed-toggles { display: flex; flex-direction: column; gap: 6px; }
.ck { display: flex; align-items: center; gap: 7px; font-size: 13px; font-weight: 500; }
.ck input { width: auto; }
.ed-actions { position: sticky; bottom: 0; background: var(--card); padding-top: 10px; }
.ed-topbar { position: sticky; top: -18px; z-index: 6; display: flex; align-items: center; gap: 10px; background: var(--card); padding: 12px 0; margin: -4px 0 10px; border-bottom: 1px solid var(--line); }
.ed-topbar #save-result { margin-left: auto; }
.item-row-hl { outline: 2px solid var(--brand); outline-offset: 1px; }

/* Click-to-edit affordance on the live preview */
.invoice-sheet:not(.pdf) [data-edit] { cursor: pointer; }
.invoice-sheet:not(.pdf) [data-edit]:hover { outline: 2px solid rgba(37,99,235,.30); outline-offset: 2px; border-radius: 4px; }
.item-row { border: 1px solid var(--line); border-radius: 8px; padding: 10px; margin-bottom: 10px; background: #fbfcfd; display: flex; flex-direction: column; gap: 6px; }
.item-row-head { display: flex; gap: 8px; }
.ir-jp { font-weight: 600; }
.ir-nums { display: grid; grid-template-columns: 1fr 1fr 1fr 1fr; gap: 6px; }
.ir-nums label { display: flex; flex-direction: column; font-size: 10px; color: var(--muted); gap: 2px; }
.ir-nums input { font-size: 13px; padding: 6px 7px; }
.ir-amt { text-align: right; font-size: 12px; color: var(--muted); }
.ir-amt-val { font-weight: 600; color: var(--ink); }
.editor h3 { margin: 0 0 16px; }
.rate-row { display: flex; gap: 8px; }
.rate-row input { flex: 1; }
.item-edit-list { display: flex; flex-direction: column; gap: 14px; }
.item-edit { display: flex; flex-direction: column; gap: 5px; padding: 10px; border: 1px solid var(--line); border-radius: 8px; background: #fbfcfd; }
.item-edit-jp { font-size: 12px; color: var(--muted); display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.item-edit-amt { color: var(--ink); font-weight: 600; white-space: nowrap; }
.item-edit-note { font-size: 13px; }
.item-edit-note::placeholder { font-style: italic; }
.item-unit-row { display: flex; align-items: center; gap: 8px; }
.item-unit-label { font-size: 11px; color: var(--muted); white-space: nowrap; }
.item-unit-select { flex: 0 0 auto; width: auto; font-size: 13px; padding: 5px 8px; }
.item-unit-custom { flex: 1; font-size: 13px; }
.preview-pane { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 36px; }
.preview-livebar { display: flex; align-items: center; gap: 8px; font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .5px; margin: -12px 0 18px; }
.preview-livebar::before { content: "●"; color: var(--success); }

.modal { border: none; border-radius: 12px; padding: 0; max-width: 640px; width: 92%; box-shadow: 0 24px 70px rgba(20,30,50,.3); }
.modal::backdrop { background: rgba(15,23,42,.45); }
.modal-form { padding: 24px; }
.modal-form h3 { margin: 0 0 16px; }
.modal-actions { display: flex; align-items: center; gap: 10px; justify-content: flex-end; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.modal-actions #company-msg { margin-right: auto; }

/* ---- Invoice sheet (screen preview; PDF has its own CSS) ---- */
.invoice-sheet { color: #1c1c1c; font-size: 13px; line-height: 1.5; }
.invoice-sheet .en { color: #9aa3ad; font-size: 0.82em; font-weight: 400; }
.invoice-sheet .num { text-align: right; white-space: nowrap; }
.invoice-sheet .fx { color: #6b7785; font-size: 0.82em; }
.invoice-sheet .muted { color: #9aa3ad; }

.inv-logo-bar { margin-bottom: 10px; }
.inv-doc-title { text-align: center; font-size: 26px; font-weight: 800; letter-spacing: 6px; padding-bottom: 12px; margin-bottom: 18px; border-bottom: 2px solid var(--accent, #333); }
.inv-doc-title .en { display: block; font-size: 14px; letter-spacing: 3px; margin-top: 2px; }

.inv-parties { display: flex; justify-content: space-between; gap: 28px; margin-bottom: 16px; }
.inv-billto { width: 52%; }
.inv-issuer { width: 44%; }
.inv-logo { max-height: 52px; display: inline-block; }
.inv-issuer-name-row { display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; }
.inv-seal { max-height: 60px; max-width: 80px; }
.inv-party-name { font-size: 17px; font-weight: 700; }
.inv-billto .inv-party-name { border-bottom: 1px solid #ccc; padding-bottom: 4px; }
.inv-title-suffix { font-size: 13px; font-weight: 400; margin-left: 6px; }
.inv-party-sub { color: #888; font-size: 12px; }
.inv-party-lines { font-size: 12px; color: #444; line-height: 1.6; margin-top: 5px; }
.inv-meta-table { margin-top: 10px; border-collapse: collapse; width: 100%; }
.inv-meta-table td { padding: 2px 0; font-size: 12px; vertical-align: top; }
.inv-meta-table td:first-child { color: #777; }
.inv-meta-table td:last-child { text-align: right; font-weight: 600; }

.inv-subject { font-size: 14px; margin: 4px 0 12px; }

.inv-amount-due { display: flex; align-items: center; justify-content: space-between; border: 1.5px solid var(--accent, #333); border-radius: 6px; padding: 12px 20px; margin-bottom: 18px; }
.inv-amount-label { font-size: 15px; font-weight: 700; line-height: 1.25; }
.inv-amount-value { font-size: 26px; font-weight: 800; text-align: right; }
.inv-amount-fx { display: block; font-size: 14px; color: #6b7785; font-weight: 400; }

.inv-items { width: 100%; border-collapse: collapse; margin-bottom: 16px; }
.inv-items thead th { text-align: left; font-size: 12px; color: #fff; background: var(--accent, #555); padding: 8px 10px; font-weight: 600; }
.inv-items thead th .en { color: #d8d8d8; }
.inv-items thead th.num { text-align: right; }
.inv-items tbody td { padding: 10px; border-bottom: 1px solid #ececec; vertical-align: top; }
.item-en { font-weight: 600; }
.item-jp { color: #999; font-size: 12px; }
.item-note { color: #aaa; font-size: 12px; font-style: italic; }

.inv-summary { display: flex; justify-content: space-between; gap: 24px; align-items: flex-start; }
.inv-tax-breakdown { width: 56%; }
.inv-section-label { font-size: 12px; color: #777; margin-bottom: 5px; font-weight: 600; }
.inv-tax-table { width: 100%; border-collapse: collapse; }
.inv-tax-table th, .inv-tax-table td { border: 1px solid #e0e0e0; padding: 5px 8px; font-size: 12px; }
.inv-tax-table th { background: #f6f7f9; color: #666; font-weight: 600; text-align: right; }
.inv-tax-table th:first-child { text-align: left; }
.inv-totals-wrap { width: 42%; }
.inv-totals { width: 100%; border-collapse: collapse; }
.inv-totals td { padding: 6px 4px; font-size: 14px; }
.inv-totals td.label { color: #555; }
.inv-totals td.num { font-weight: 600; }
.inv-totals tr.grand td { border-top: 1.5px solid var(--accent, #333); padding-top: 9px; font-size: 18px; font-weight: 800; }

.inv-fx-note { text-align: right; color: #6b7785; font-size: 12px; font-style: italic; margin-top: 6px; }
.inv-taxnote { text-align: right; color: #6b7785; font-size: 12px; margin-top: 4px; }
.reduced-mark { color: #c2410c; font-size: 0.85em; vertical-align: super; }
.ir-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.ir-reduced { font-size: 11px; }

.inv-bank { margin-top: 16px; }
.inv-bank-body { border: 1px solid #e0e0e0; border-radius: 6px; padding: 12px 14px; font-size: 13px; line-height: 1.6; }
.inv-fee-note { margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e0e0e0; font-size: 12px; color: #555; }

/* ---- Legal pages ---- */
.legal { max-width: 760px; margin: 0 auto; }
.legal-note { background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; border-radius: 8px; padding: 12px 16px; font-size: 13px; margin-bottom: 18px; }
.legal-tabs { display: flex; gap: 8px; margin-bottom: 20px; }
.legal-tab { padding: 8px 18px; border: 1px solid var(--line); background: #fff; border-radius: 8px; cursor: pointer; font-weight: 600; font-size: 14px; }
.legal-tab.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.legal-doc { font-size: 15px; line-height: 1.75; color: #24292f; }
.legal-doc h1 { font-size: 28px; margin-bottom: 16px; }
.legal-doc h2 { font-size: 19px; margin: 28px 0 8px; padding-top: 8px; }
.legal-doc h3 { font-size: 15px; margin: 16px 0 6px; color: #555; }
.legal-doc ul, .legal-doc ol { padding-left: 24px; margin: 6px 0 12px; }
.legal-doc li { margin-bottom: 5px; }
.legal-toc { background: var(--card); border: 1px solid var(--line); border-radius: 8px; padding: 14px 18px; margin-bottom: 18px; font-size: 14px; }
.legal-toc ol { margin: 8px 0 0; }
.legal-toc a { color: var(--brand); }
.legal-updated { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); color: var(--muted); font-size: 13px; }

/* ---- Signup / Account ---- */
.auth-card { max-width: 620px; margin: 0 auto; }
.plan-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.plan-card { border: 2px solid var(--line); border-radius: 10px; padding: 14px; cursor: pointer; text-align: center; transition: border-color .12s; }
.plan-card:has(input:checked) { border-color: var(--brand); box-shadow: 0 4px 16px rgba(37,99,235,.12); }
.plan-card input { position: absolute; opacity: 0; }
.plan-name { font-weight: 700; }
.plan-price { font-size: 22px; font-weight: 800; margin: 4px 0; }
.plan-price span { font-size: 12px; font-weight: 500; color: var(--muted); }
.plan-desc { font-size: 11px; color: var(--muted); line-height: 1.4; }
.acc-summary { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.acc-stat { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.acc-stat-n { font-size: 22px; font-weight: 800; }
.acc-stat-l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.pricing-table td, .pricing-table th { text-align: center; padding: 10px 12px; font-size: 14px; vertical-align: middle; }
.pricing-table .pricing-feat { text-align: left; font-weight: 500; }
.pricing-table .yes { color: var(--success); font-weight: 800; }
.pricing-table .no { color: var(--muted); }
.save-gate a { color: var(--brand); font-weight: 700; text-decoration: underline; }

/* ---- Blog ---- */
.blog-list { max-width: 760px; margin: 0 auto; }
.blog-list > h1 { font-size: 30px; margin-bottom: 6px; }
.blog-card { padding: 22px 0; border-bottom: 1px solid var(--line); }
.blog-card-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 13px; margin-bottom: 6px; }
.blog-lang { background: #eef4ff; color: var(--brand); font-weight: 700; }
.blog-card h2 { margin: 0 0 6px; font-size: 21px; line-height: 1.35; }
.blog-card h2 a { color: var(--ink); }
.blog-card p { margin: 0 0 8px; color: #555; }
.blog-readmore { font-weight: 600; font-size: 14px; }

.article { max-width: 700px; margin: 0 auto; font-size: 18px; line-height: 1.7; color: #24292f; }
.article-back { font-size: 14px; font-weight: 600; }
.article-title { font-size: 30px; line-height: 1.3; margin: 14px 0 8px; }
.article-meta { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 14px; margin-bottom: 24px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.article-body h2 { font-size: 24px; margin: 34px 0 12px; line-height: 1.35; }
.article-body h3 { font-size: 19px; margin: 26px 0 10px; }
.article-body p { margin: 0 0 18px; }
.article-body ul, .article-body ol { margin: 0 0 18px; padding-left: 26px; }
.article-body li { margin-bottom: 8px; }
.article-body a { color: var(--brand); text-decoration: underline; }
.article-body strong { font-weight: 700; }
.article-body code { background: #f3f4f6; padding: 2px 6px; border-radius: 5px; font-size: 0.88em; }
.article-body blockquote { margin: 0 0 18px; padding: 10px 18px; border-left: 4px solid var(--line); color: #555; background: #fafbfc; }
.article-body table { width: 100%; border-collapse: collapse; margin: 0 0 22px; font-size: 15px; }
.article-body th, .article-body td { border: 1px solid var(--line); padding: 9px 12px; text-align: left; }
.article-body th { background: #f6f7f9; font-weight: 700; }
.article-body hr { border: none; border-top: 1px solid var(--line); margin: 28px 0; }
.article-cta { margin-top: 36px; padding: 24px; border: 1px solid var(--line); border-radius: 12px; background: var(--card); display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

/* ---- Analytics dashboard ---- */
.an-kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 14px; margin-bottom: 22px; }
.an-kpi { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px; }
.an-kpi-n { font-size: 26px; font-weight: 800; }
.an-kpi-n .an-unit { font-size: 13px; font-weight: 500; color: var(--muted); margin-left: 2px; }
.an-kpi-l { color: var(--muted); font-size: 12px; margin-top: 2px; }
.an-kpi-warn .an-kpi-n { color: var(--danger); }
.an-card { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 18px; margin-bottom: 18px; }
.an-card h3 { margin: 0 0 12px; font-size: 15px; }
.an-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.an-table td, .an-table th { padding: 7px 10px; font-size: 13px; }
.an-bars { display: flex; align-items: flex-end; gap: 6px; height: 140px; }
.an-bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; height: 100%; justify-content: flex-end; }
.an-bar { width: 70%; min-height: 2px; background: var(--brand); border-radius: 3px 3px 0 0; }
.an-bar-x { font-size: 10px; color: var(--muted); margin-top: 4px; white-space: nowrap; }
.badge-err { background: #fef2f2; color: var(--danger); }

/* ---- Landing page ---- */
.topbar nav { display: flex; align-items: center; gap: 18px; }
.lp-hero { max-width: 1100px; margin: 0 auto; padding: 56px 28px; display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; }
.lp-hero-text h1 { font-size: 40px; line-height: 1.2; margin: 0 0 18px; letter-spacing: -0.5px; }
.lp-hero-text .lead { font-size: 18px; margin-bottom: 26px; }
.lp-hero-img img { width: 100%; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(20,30,50,.16); }

.lp-features { max-width: 1040px; margin: 0 auto; padding: 24px 28px 40px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.lp-feature { background: var(--card); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.lp-ico { font-size: 30px; margin-bottom: 10px; }
.lp-feature h3 { margin: 0 0 8px; font-size: 17px; }
.lp-feature p { margin: 0; color: var(--muted); font-size: 14px; }

.lp-how { background: var(--card); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 48px 28px; text-align: center; }
.lp-how h2 { font-size: 26px; margin: 0 0 30px; }
.lp-steps { display: flex; align-items: center; justify-content: center; gap: 20px; flex-wrap: wrap; }
.lp-step { background: var(--bg); border: 1px solid var(--line); border-radius: 12px; padding: 22px 28px; min-width: 180px; }
.lp-step-n { width: 36px; height: 36px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; display: flex; align-items: center; justify-content: center; margin: 0 auto 10px; }
.lp-step h3 { margin: 0 0 4px; font-size: 16px; }
.lp-step p { margin: 0; color: var(--muted); font-size: 14px; }
.lp-step-arrow { font-size: 24px; color: var(--muted); }

.lp-pricing { max-width: 1040px; margin: 0 auto; padding: 56px 28px; text-align: center; }
.lp-pricing h2 { font-size: 26px; margin: 0 0 8px; }
.lp-sub { color: var(--muted); margin: 0 0 32px; }
.lp-plans { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; align-items: start; }
.lp-plan { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 28px 24px; text-align: left; }
.lp-plan-featured { border: 2px solid var(--brand); box-shadow: 0 12px 40px rgba(37,99,235,.12); }
.lp-plan-badge { position: absolute; top: -12px; left: 24px; background: var(--brand); color: #fff; font-size: 12px; font-weight: 700; padding: 4px 12px; border-radius: 99px; }
.lp-plan h3 { margin: 0 0 6px; font-size: 18px; }
.lp-price { font-size: 32px; font-weight: 800; margin-bottom: 16px; }
.lp-price span { font-size: 15px; font-weight: 500; color: var(--muted); }
.lp-plan ul { list-style: none; padding: 0; margin: 0 0 20px; }
.lp-plan li { padding: 7px 0 7px 24px; position: relative; font-size: 14px; border-bottom: 1px solid var(--line); }
.lp-plan li::before { content: "✓"; position: absolute; left: 0; color: var(--success); font-weight: 700; }

.lp-cta { text-align: center; padding: 64px 28px; }
.lp-cta h2 { font-size: 28px; margin: 0 0 22px; }

.lp-footer { border-top: 1px solid var(--line); padding: 36px 28px; text-align: center; color: var(--muted); }
.lp-footer-brand { font-size: 18px; font-weight: 800; margin-bottom: 12px; }
.lp-footer-brand span { color: var(--brand); }
.lp-footer nav { display: flex; gap: 22px; justify-content: center; margin-bottom: 14px; flex-wrap: wrap; }

@media (max-width: 820px) {
  .cards, .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .preview-layout { grid-template-columns: 1fr; }
  .editor { position: static; }
  .lp-hero { grid-template-columns: 1fr; padding: 32px 24px; }
  .lp-hero-text h1 { font-size: 30px; }
  .lp-features, .lp-plans { grid-template-columns: 1fr; }
  .lp-step-arrow { transform: rotate(90deg); }
}
