:root {
    color-scheme: light;
    --ink: #172033;
    --muted: #657084;
    --line: #d9e0ea;
    --paper: #ffffff;
    --wash: #f5f7fb;
    --brand: #0f766e;
    --brand-strong: #115e59;
    --accent: #b45309;
    --danger: #b91c1c;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; color: var(--ink); background: var(--wash); }
a { color: var(--brand-strong); text-decoration: none; }
main { width: min(1120px, calc(100% - 32px)); margin: 0 auto; padding: 36px 0 56px; }

.site-header, .site-footer {
    width: min(1120px, calc(100% - 32px));
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}
.site-header { padding: 22px 0; }
.site-footer { padding: 30px 0; color: var(--muted); border-top: 1px solid var(--line); }
.brand { color: var(--ink); font-size: 1.35rem; font-weight: 800; letter-spacing: 0; }
.nav { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.nav form { margin: 0; }

.hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 420px;
    gap: 36px;
    align-items: center;
    min-height: 540px;
}
.eyebrow { color: var(--accent); text-transform: uppercase; font-size: .76rem; font-weight: 800; letter-spacing: .08em; }
h1 { font-size: clamp(2.2rem, 5vw, 4.8rem); line-height: .98; letter-spacing: 0; margin: 10px 0 18px; }
h2 { margin: 0 0 18px; font-size: 1.2rem; }
.lede { color: var(--muted); font-size: 1.15rem; max-width: 620px; line-height: 1.7; }

.shorten-panel, .panel, .auth-card {
    background: var(--paper);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: 0 18px 45px rgba(23, 32, 51, .08);
}
.shorten-panel, .panel { padding: 22px; }
.auth-card { width: min(460px, 100%); margin: 40px auto; padding: 28px; }
.auth-card h1 { font-size: 2rem; }
form { display: grid; gap: 14px; }
label { display: grid; gap: 7px; color: var(--muted); font-size: .92rem; font-weight: 700; }
input, select {
    width: 100%;
    border: 1px solid var(--line);
    border-radius: 7px;
    padding: 12px 13px;
    color: var(--ink);
    background: #fff;
    font: inherit;
}
input:focus, select:focus { outline: 3px solid rgba(15, 118, 110, .18); border-color: var(--brand); }
button, .button {
    border: 0;
    border-radius: 7px;
    padding: 12px 16px;
    color: #fff;
    background: var(--brand);
    font: inherit;
    font-weight: 800;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
button:hover, .button:hover { background: var(--brand-strong); }
.button.small { padding: 9px 13px; }
.ghost { background: #eef6f5; color: var(--brand-strong); border: 1px solid #c5e4df; }
.ghost:hover { background: #dff1ee; }
.danger { background: var(--danger); }
.link-button { color: var(--brand-strong); background: transparent; padding: 0; }

.result { display: grid; gap: 8px; padding: 14px; background: #edf7f5; border-radius: 8px; overflow-wrap: anywhere; }
.result span, .muted { color: var(--muted); }
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; margin-top: 28px; }
.feature-grid div { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 20px; }
.feature-grid p { color: var(--muted); line-height: 1.6; }
.flash { padding: 13px 16px; border-radius: 8px; margin-bottom: 16px; font-weight: 700; }
.flash.error { background: #fee2e2; color: #991b1b; }
.flash.success { background: #dcfce7; color: #166534; }

.page-head { display: flex; align-items: end; justify-content: space-between; gap: 18px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { font-size: 2.4rem; margin: 4px 0; }
.metric { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 16px 22px; min-width: 150px; }
.metric strong { display: block; font-size: 2rem; }
.metric span { color: var(--muted); }
.tool-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-bottom: 20px; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: 8px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 14px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .06em; }
td form { display: flex; gap: 8px; align-items: center; }
.qr-panel img { width: 220px; height: 220px; image-rendering: pixelated; background: #fff; border: 1px solid var(--line); }
.token-box { padding: 12px; background: #101827; color: #e5f4f2; border-radius: 7px; overflow-wrap: anywhere; }
.bars { height: 150px; display: flex; align-items: end; gap: 8px; border-bottom: 1px solid var(--line); }
.bar { width: 18px; background: var(--brand); border-radius: 5px 5px 0 0; min-height: 8px; }

@media (max-width: 820px) {
    main { width: min(100% - 22px, 1120px); padding-top: 20px; }
    .site-header, .site-footer { width: min(100% - 22px, 1120px); align-items: flex-start; }
    .hero, .tool-layout, .feature-grid { grid-template-columns: 1fr; }
    .hero { min-height: auto; padding: 30px 0; }
    h1 { font-size: 2.45rem; }
    .nav { justify-content: flex-end; }
}
