:root {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    color: #18202a;
    background: #f4f6f8;
    line-height: 1.45;
}
* { box-sizing: border-box; }
body { margin: 0; }
header { height: 58px; padding: 0 28px; background: #101820; color: white; display: flex; align-items: center; justify-content: space-between; }
header nav { display: flex; align-items: center; gap: 18px; }
header a, header .link-btn { color: white; text-decoration: none; }
main { max-width: 1180px; margin: 0 auto; padding: 28px 20px 70px; }
h1 { font-size: 28px; margin: 4px 0 6px; }
h2 { font-size: 19px; margin: 0 0 15px; }
p { margin: 7px 0 14px; }
a { color: #1257a6; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; }
button, .button { border: 0; border-radius: 7px; background: #155fba; color: white; padding: 10px 15px; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-block; }
button:hover, .button:hover { filter: brightness(.95); }
button:disabled { opacity: .45; cursor: not-allowed; }
button.secondary, .button.secondary { background: #e7edf5; color: #17324f; }
button.small { padding: 5px 8px; font-size: 12px; }
.link-btn { padding: 0; background: transparent; font: inherit; }
.card, .font-card { background: white; border: 1px solid #dfe4ea; border-radius: 10px; margin: 0 0 18px; box-shadow: 0 1px 2px rgba(0,0,0,.035); }
.card { padding: 20px; }
.page-head, .section-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; margin-bottom: 18px; }
.page-head p, .section-head p { color: #617080; }
.back { text-decoration: none; font-size: 13px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.grid-form { display: grid; grid-template-columns: 1fr 1fr auto; align-items: end; gap: 15px; }
.row-form { display: flex; gap: 10px; }
.row-form input { flex: 1; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 650; margin-bottom: 14px; }
label small { font-weight: 400; color: #687786; }
input, textarea, select { width: 100%; border: 1px solid #cbd3dc; border-radius: 7px; padding: 9px 10px; background: white; color: #18202a; font: inherit; }
textarea { resize: vertical; }
.check { flex-direction: row; align-items: center; gap: 8px; font-weight: 500; }
.check input, .preset input { width: auto; }
.inline { display: inline; margin: 0; }
.url-list { margin: 14px 0 0; padding: 0; list-style: none; }
.url-list li { display: flex; align-items: center; justify-content: space-between; gap: 8px; border-top: 1px solid #edf0f3; padding: 9px 0; }
.url-list code { overflow-wrap: anywhere; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 8px; border-bottom: 1px solid #edf0f3; }
th { color: #607080; font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.flash { padding: 11px 13px; border-radius: 7px; margin: 0 0 15px; background: #edf6ff; border: 1px solid #cfe4fa; }
.flash.ok { background: #edf9f1; border-color: #c9e9d4; }
.flash.error { background: #fff0f0; border-color: #f3caca; }
.flash.warn { background: #fff8e6; border-color: #f0ddb0; }
.muted, .meta { color: #6f7d8a; }
.meta { font-size: 13px; }
.login-card { max-width: 420px; margin: 12vh auto 0; background: white; border: 1px solid #dfe4ea; border-radius: 12px; padding: 25px; }
.font-card { overflow: hidden; }
.font-card > summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 17px 20px; background: #fbfcfd; }
.font-card > summary::-webkit-details-marker { display: none; }
.font-card > summary > div:last-child { display: flex; gap: 16px; color: #687786; font-size: 12px; }
.font-meta { color: #687786; font-size: 12px; margin-left: 8px; }
.font-body { border-top: 1px solid #e5e9ee; padding: 20px; }
.badge { display: inline-block; margin-left: 8px; border-radius: 20px; padding: 3px 7px; font-size: 10px; background: #e8f0fa; color: #345776; vertical-align: 1px; }
.badge.icon { background: #f0eafb; color: #6949a0; }
.label-title { display: block; font-size: 13px; font-weight: 650; margin-bottom: 8px; }
.preset-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin-bottom: 16px; }
.preset { flex-direction: row; align-items: flex-start; gap: 8px; border: 1px solid #e1e6eb; border-radius: 8px; padding: 10px; margin: 0; font-weight: 400; }
.preset span { display: flex; flex-direction: column; gap: 2px; }
.preset small { color: #71808e; }
.range-preview { background: #f7f9fb; border: 1px solid #e3e8ed; border-radius: 8px; padding: 12px; display: flex; flex-direction: column; gap: 7px; margin: 5px 0 15px; }
.range-preview code { font-size: 11px; overflow-wrap: anywhere; }
.range-preview small { color: #6d7b88; overflow-wrap: anywhere; }
.actions { display: inline-block; }
.generate-form { display: inline-block; margin-left: 8px; }
.generated, .bundle { background: #eff8f2; border: 1px solid #cee8d6; padding: 10px 12px; border-radius: 8px; margin-bottom: 15px; }
.generated span { color: #657467; margin-left: 8px; }
@media (max-width: 800px) {
    .two-col, .grid-form, .preset-grid { grid-template-columns: 1fr; }
    .page-head, .section-head, .font-card > summary { flex-direction: column; }
    header { padding: 0 16px; }
    main { padding: 20px 13px 50px; }
}
