:root {
    --bg: #f6f7f9;
    --surface: #ffffff;
    --text: #1d2330;
    --muted: #5d6676;
    --line: #dfe3ea;
    --brand: #e8590c;
    --brand-dark: #c44a08;
    --ok: #1f7a3d;
    --bad: #b42318;
    --chrome: #20242c;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    overflow-x: hidden;
    background: var(--bg);
    color: var(--text);
    font: 16px/1.55 "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
}
a { color: var(--brand-dark); }
h1, h2, h3 { line-height: 1.25; }
h1 { font-size: 1.9rem; margin: 0 0 .5rem; }
h2 { font-size: 1.35rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.1rem; margin: 0 0 .5rem; }
code, .key { font-family: Consolas, "Cascadia Mono", monospace; }
.key { font-weight: 600; letter-spacing: .02em; word-break: break-all; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 560px; }
.section { padding: 2rem 16px 3rem; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }

.topbar { background: var(--chrome); color: #fff; }
.topbar-row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 60px; flex-wrap: wrap; }
.brand { color: #fff; font-weight: 700; font-size: 1.35rem; text-decoration: none; }
.brand span { color: var(--brand); }
.nav { display: flex; gap: 1rem; align-items: center; flex-wrap: wrap; padding: .5rem 0; }
.nav a, .nav .link { color: #e6e8ec; text-decoration: none; }
.nav a:hover, .nav .link:hover { color: #fff; }
.nav .btn { color: #fff; }

.hero { background: linear-gradient(135deg, #20242c 0%, #343a46 100%); color: #fff; padding: 4rem 0; }
.hero h1 { font-size: 2.6rem; }
.lead { font-size: 1.2rem; max-width: 720px; color: #d9dce2; }
.actions { display: flex; gap: .75rem; flex-wrap: wrap; margin-top: 1.5rem; }

.btn {
    display: inline-block; border: 0; border-radius: 6px; background: var(--brand); color: #fff;
    padding: .65rem 1.2rem; font: inherit; font-weight: 600; text-decoration: none; cursor: pointer;
}
.btn:hover { background: var(--brand-dark); }
.btn-small { padding: .35rem .8rem; font-size: .9rem; }
.btn-ghost { background: transparent; color: inherit; border: 1px solid currentColor; }
.btn-ghost:hover { background: rgba(127, 127, 127, .12); }
.link { background: none; border: 0; padding: 0; font: inherit; color: var(--brand-dark); cursor: pointer; text-decoration: underline; }
.inline { display: inline; }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: .75rem 0; }

.grid2, .grid3, .grid4 { display: grid; gap: 1rem; }
.grid2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid4 { grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 1.25rem; margin-bottom: 1rem; }
.plan .price, .price { font-size: 1.6rem; font-weight: 700; color: var(--brand-dark); margin: .5rem 0; }
.plan ul { padding-left: 1.2rem; }
.stat { text-align: center; color: var(--muted); }
.stat-n { font-size: 1.6rem; font-weight: 700; color: var(--text); }
.row-between { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; align-items: flex-start; }

.form { display: grid; gap: .8rem; grid-template-columns: minmax(0, 1fr); }
.grid-form { display: grid; gap: .6rem 1rem; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; }
label { display: grid; grid-template-columns: minmax(0, 1fr); gap: .25rem; font-size: .92rem; color: var(--muted); }
label.check { display: flex; align-items: center; gap: .5rem; }
input, select {
    font: inherit; color: var(--text); background: #fff; border: 1px solid var(--line); border-radius: 6px;
    padding: .5rem .65rem; min-width: 0; width: 100%;
}
.inline-form input, .inline-form select { width: auto; flex: 1 1 200px; }
input[type=checkbox] { width: auto; }
.errors { color: var(--bad); }
.errors ul { margin: 0; padding-left: 1.2rem; }

.table { width: 100%; border-collapse: collapse; background: var(--surface); font-size: .93rem; display: block; overflow-x: auto; }
.table th, .table td { text-align: left; padding: .5rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.table th { color: var(--muted); font-weight: 600; white-space: nowrap; }

.tag { display: inline-block; border-radius: 999px; padding: .15rem .7rem; font-size: .85rem; font-weight: 600; margin: 0; }
.tag-ok { background: #e3f4e8; color: var(--ok); }
.tag-bad { background: #fde7e5; color: var(--bad); }
.notice { margin: 1rem 0 0; padding: .75rem 1rem; border-radius: 8px; background: #e3f4e8; color: var(--ok); }
.notice-error { background: #fde7e5; color: var(--bad); }
.notes { white-space: pre-wrap; background: var(--bg); border-radius: 6px; padding: .75rem; font: .9rem/1.5 Consolas, monospace; overflow-x: auto; }
.qr { display: block; max-width: 100%; height: auto; margin: 1rem auto; border-radius: 8px; }
.subnav { display: flex; gap: .4rem 1rem; flex-wrap: wrap; margin: .5rem 0 1.5rem; padding-bottom: .75rem; border-bottom: 1px solid var(--line); }

.footer { border-top: 1px solid var(--line); padding: 1.5rem 0; color: var(--muted); font-size: .9rem; }

@media (max-width: 600px) {
    .hero { padding: 2.5rem 0; }
    .hero h1 { font-size: 2rem; }
}
