:root {
    --bg: #f6f7f2;
    --surface: #ffffff;
    --surface-2: #eef3ef;
    --ink: #17201c;
    --muted: #64716b;
    --line: #d9e0db;
    --green: #13795b;
    --green-dark: #0d5d46;
    --blue: #276ef1;
    --amber: #f2b84b;
    --red: #c93c3c;
    --shadow: 0 18px 44px rgba(23, 32, 28, .10);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--bg);
    color: var(--ink);
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.5;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input {
    font: inherit;
}

.topbar {
    position: sticky;
    top: 0;
    z-index: 20;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 14px clamp(18px, 4vw, 56px);
    background: rgba(246, 247, 242, .92);
    border-bottom: 1px solid var(--line);
    backdrop-filter: blur(14px);
}

.brand,
.nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.brand {
    min-width: max-content;
    font-weight: 800;
}

.brand-mark {
    display: grid;
    width: 36px;
    height: 36px;
    place-items: center;
    border-radius: 8px;
    background: var(--ink);
    color: #fff;
    font-size: 13px;
    letter-spacing: 0;
}

.nav {
    flex-wrap: wrap;
    justify-content: flex-end;
}

.nav a,
.link-button {
    padding: 8px 10px;
    border: 0;
    background: transparent;
    color: var(--muted);
    cursor: pointer;
}

.nav a.active,
.nav a:hover,
.link-button:hover {
    color: var(--ink);
}

.count {
    display: inline-grid;
    min-width: 21px;
    height: 21px;
    place-items: center;
    margin-left: 4px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12px;
}

main {
    width: min(1180px, calc(100% - 36px));
    margin: 0 auto;
    padding: 28px 0 72px;
}

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 28px;
    min-height: calc(100vh - 112px);
    align-content: center;
    padding: clamp(28px, 7vh, 72px) 0 42px;
}

.hero-copy {
    max-width: 820px;
}

.eyebrow {
    display: block;
    margin-bottom: 10px;
    color: var(--green-dark);
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .08em;
    text-transform: uppercase;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    max-width: 920px;
    margin-bottom: 16px;
    font-size: clamp(42px, 8vw, 92px);
    line-height: .95;
    letter-spacing: 0;
}

h2 {
    margin-bottom: 10px;
    font-size: clamp(24px, 3vw, 34px);
    line-height: 1.1;
}

h3 {
    margin-bottom: 8px;
    font-size: 18px;
}

.hero p,
.page-head p {
    max-width: 680px;
    color: var(--muted);
    font-size: 19px;
}

.actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 28px;
}

.button {
    display: inline-flex;
    min-height: 44px;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 18px;
    border: 1px solid var(--green);
    border-radius: 8px;
    background: var(--green);
    color: #fff;
    font-weight: 800;
    cursor: pointer;
    transition: transform .15s ease, background .15s ease, border-color .15s ease;
}

.button:hover {
    transform: translateY(-1px);
    background: var(--green-dark);
    border-color: var(--green-dark);
}

.button.secondary {
    background: #fff;
    color: var(--ink);
    border-color: var(--line);
}

.button.small {
    min-height: 36px;
    padding: 8px 12px;
}

.button.full {
    width: 100%;
}

.hero-panel {
    border: 1px solid var(--line);
    border-radius: 8px;
    background:
        linear-gradient(135deg, rgba(19, 121, 91, .10), transparent 34%),
        linear-gradient(45deg, rgba(242, 184, 75, .14), transparent 42%),
        var(--surface);
    box-shadow: var(--shadow);
    overflow: hidden;
}

.panel-header,
.section-head,
.license-main,
.summary-line,
.price-top,
.license-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.panel-header {
    padding: 18px 20px;
    border-bottom: 1px solid var(--line);
    font-weight: 800;
}

.pill,
.domain-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 5px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 12px;
    font-weight: 800;
}

.pill.success {
    background: rgba(19, 121, 91, .12);
    color: var(--green-dark);
}

.pill.warning {
    background: rgba(242, 184, 75, .20);
    color: #83570c;
}

.pill.danger {
    background: rgba(201, 60, 60, .12);
    color: var(--red);
}

.flow-grid,
.metric-row,
.dashboard-grid,
.api-grid {
    display: grid;
    gap: 14px;
}

.flow-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    padding: 20px;
}

.flow-grid div,
.stat {
    min-height: 104px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: rgba(255, 255, 255, .76);
}

.flow-grid strong,
.stat strong {
    display: block;
    margin-bottom: 12px;
    font-size: 30px;
}

.flow-grid span,
.stat span,
.metric-row span,
.license-meta,
.small-text,
.muted {
    color: var(--muted);
}

.metric-row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    padding: 0 20px 20px;
}

.metric-row div {
    padding: 15px;
    border-left: 4px solid var(--amber);
    border-radius: 8px;
    background: var(--surface);
}

.metric-row strong {
    display: block;
    margin-top: 4px;
}

.section,
.page-head,
.pricing-grid,
.cart-layout,
.auth-layout {
    margin-top: 34px;
}

.section {
    padding: 30px 0;
    border-top: 1px solid var(--line);
}

.two-col,
.cart-layout,
.auth-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(320px, 420px);
    gap: 28px;
    align-items: start;
}

.check-list {
    display: grid;
    gap: 10px;
}

.check-list span {
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 700;
}

.page-head {
    padding: 30px 0 6px;
}

.page-head.compact h1 {
    margin-bottom: 6px;
    font-size: clamp(34px, 6vw, 58px);
}

.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}

.price-card,
.summary,
.auth-card,
.license-card,
.table-card,
.empty-state,
.api-box {
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    box-shadow: 0 10px 26px rgba(23, 32, 28, .05);
}

.price-card {
    display: grid;
    gap: 22px;
    padding: 22px;
}

.price-card p {
    color: var(--muted);
}

.price {
    font-size: 36px;
    font-weight: 900;
}

.price span {
    color: var(--muted);
    font-size: 15px;
    font-weight: 700;
}

.price-card ul {
    display: grid;
    gap: 10px;
    padding: 0;
    margin: 0;
    list-style: none;
}

.price-card li {
    padding-left: 18px;
    position: relative;
}

.price-card li::before {
    content: "";
    position: absolute;
    top: .7em;
    left: 0;
    width: 7px;
    height: 7px;
    border-radius: 999px;
    background: var(--green);
}

.table-card {
    overflow: auto;
}

table {
    width: 100%;
    min-width: 620px;
    border-collapse: collapse;
}

th,
td {
    padding: 16px;
    border-bottom: 1px solid var(--line);
    text-align: left;
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 13px;
    font-weight: 900;
    text-transform: uppercase;
}

td span {
    display: block;
    color: var(--muted);
    font-size: 14px;
}

tr:last-child td {
    border-bottom: 0;
}

.summary {
    position: sticky;
    top: 88px;
    display: grid;
    gap: 16px;
    padding: 20px;
}

.summary-line {
    padding: 12px 0;
    border-bottom: 1px solid var(--line);
}

.empty-state {
    padding: 34px;
    text-align: center;
}

.empty-state.slim {
    padding: 20px;
    text-align: left;
}

.auth-card {
    display: grid;
    gap: 16px;
    padding: 22px;
}

label {
    display: grid;
    gap: 7px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 800;
}

input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #fff;
    color: var(--ink);
}

input:focus {
    border-color: var(--blue);
    outline: 3px solid rgba(39, 110, 241, .12);
}

.dashboard-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 22px 0 8px;
}

.license-list {
    display: grid;
    gap: 14px;
}

.license-card {
    display: grid;
    gap: 14px;
    padding: 18px;
}

.license-card code,
.api-grid code {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: #f9faf7;
    color: var(--ink);
    white-space: normal;
    word-break: break-word;
}

.copy-button {
    min-height: 36px;
    padding: 8px 12px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    cursor: pointer;
}

.copy-button:hover {
    border-color: var(--green);
}

.domain-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.domain-list span {
    padding: 7px 10px;
    border-radius: 999px;
    background: var(--surface-2);
    color: var(--ink);
    font-size: 13px;
    font-weight: 800;
}

.api-box {
    display: grid;
    grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
    gap: 22px;
    padding: 22px;
}

.api-grid {
    grid-template-columns: 1fr;
}

.flash {
    margin: 12px 0;
    padding: 13px 16px;
    border: 1px solid var(--line);
    border-radius: 8px;
    background: var(--surface);
    font-weight: 700;
}

.flash.success {
    border-color: rgba(19, 121, 91, .25);
    color: var(--green-dark);
}

.flash.warning {
    border-color: rgba(242, 184, 75, .55);
    color: #83570c;
}

.flash.danger,
.link-button.danger {
    color: var(--red);
}

@media (max-width: 820px) {
    .topbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .nav {
        justify-content: flex-start;
    }

    h1 {
        font-size: clamp(40px, 14vw, 64px);
    }

    .flow-grid,
    .metric-row,
    .two-col,
    .cart-layout,
    .auth-layout,
    .dashboard-grid,
    .api-box {
        grid-template-columns: 1fr;
    }

    .summary {
        position: static;
    }
}
