/* ==========================================================================
   字集 Type Atlas — administration interface
   A calm, high-contrast workspace built on the same paper-and-ink system.
   ========================================================================== */

@font-face {
    font-family: "Type Atlas Sans";
    src: url("../fonts/inter-ui.woff2") format("woff2");
    font-style: normal;
    font-weight: 100 900;
    font-display: swap;
}

@font-face {
    font-family: "Type Atlas Serif";
    src: url("../fonts/zcool-display-ui.woff2") format("woff2");
    font-style: normal;
    font-weight: 400;
    font-display: swap;
}

:root {
    --ink: #171713;
    --ink-soft: #25261f;
    --paper: #f0ece4;
    --paper-light: #fbf9f4;
    --paper-deep: #e6dfd3;
    --muted: #716c62;
    --muted-light: #9b9488;
    --line: rgba(23, 23, 19, 0.13);
    --line-strong: rgba(23, 23, 19, 0.23);
    --clay: #db573a;
    --clay-deep: #bc4028;
    --sage: #c8cfbb;
    --admin-clay: #db573a;
    --danger: #b63b24;
    --success: #4c6738;
    --font-sans: "Type Atlas Sans", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    --font-display: "Type Atlas Serif", "Iowan Old Style", "Palatino Linotype", "Songti SC", "Noto Serif CJK SC", serif;
    --font-mono: "SFMono-Regular", "JetBrains Mono", "Cascadia Mono", Consolas, "Liberation Mono", monospace;
    --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

html {
    -webkit-text-size-adjust: 100%;
}

body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--font-sans);
    font-size: 14px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
    margin: 0;
}

ul,
ol {
    margin: 0;
    padding: 0;
    list-style: none;
}

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

button,
input,
textarea,
select {
    font: inherit;
    color: inherit;
}

button {
    border: 0;
    padding: 0;
    background: none;
    cursor: pointer;
}

img,
svg {
    display: block;
}

svg {
    flex: none;
}

:focus-visible {
    outline: 2px solid var(--clay);
    outline-offset: 3px;
}

[hidden] {
    display: none !important;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.skip-link {
    position: fixed;
    top: -80px;
    left: 20px;
    z-index: 5000;
    padding: 12px 18px;
    background: var(--clay);
    color: #fff;
    font-size: 12px;
    transition: top 0.2s ease;
}

.skip-link:focus {
    top: 18px;
}

.icon {
    width: 1.1em;
    height: 1.1em;
    display: inline-block;
    flex: none;
    vertical-align: -0.12em;
}

.icon--xs {
    width: 0.95em;
    height: 0.95em;
}

/* Shared small components ------------------------------------------------ */
.eyebrow {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 9px;
    font-weight: 500;
    line-height: 1.5;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.eyebrow--light {
    color: rgba(251, 249, 244, 0.45);
}

.admin-eyebrow {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 8.5px;
    line-height: 1.5;
    letter-spacing: 0.11em;
    text-transform: uppercase;
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 45px;
    padding: 0 19px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    white-space: nowrap;
    transition: color 0.22s var(--ease), background-color 0.22s var(--ease), border-color 0.22s var(--ease), transform 0.22s var(--ease);
}

.button:hover {
    transform: translateY(-1px);
}

.button:disabled {
    cursor: not-allowed;
    opacity: 0.55;
    transform: none;
}

.button--dark {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper-light);
}

.button--dark:hover {
    background: var(--clay);
    border-color: var(--clay);
    color: #fff;
}

.button--outline {
    border-color: var(--line-strong);
    color: var(--ink);
}

.button--outline:hover {
    background: var(--ink);
    border-color: var(--ink);
    color: var(--paper-light);
}

.button--ghost {
    color: var(--muted);
}

.button--ghost:hover {
    color: var(--ink);
    background: var(--paper);
}

.button--danger {
    background: var(--danger);
    border-color: var(--danger);
    color: #fff;
}

.button--danger:hover {
    background: #952e1b;
    border-color: #952e1b;
}

.button--small {
    min-height: 37px;
    padding: 0 14px;
    font-size: 11px;
}

.button--large {
    min-height: 52px;
    padding: 0 24px;
    font-size: 13px;
}

.button--wide {
    width: 100%;
}

.button .icon {
    width: 14px;
    height: 14px;
}

.tag {
    display: inline-flex;
    align-items: center;
    width: max-content;
    padding: 3px 8px;
    border: 1px solid var(--line);
    border-radius: 100px;
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 8px;
    line-height: 1.6;
    letter-spacing: 0.04em;
    white-space: nowrap;
}

.tag--subtle {
    border-color: transparent;
    background: rgba(23, 23, 19, 0.055);
    color: var(--muted);
    font-family: var(--font-sans);
    font-size: 9px;
    letter-spacing: 0.01em;
}

.icon-button {
    display: inline-grid;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.icon-button:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-light);
}

.icon-button .icon {
    width: 14px;
    height: 14px;
}

.icon-button--danger:hover {
    border-color: var(--danger);
    background: var(--danger);
    color: #fff;
}

.icon-button--dark {
    border-color: rgba(251, 249, 244, 0.15);
    color: rgba(251, 249, 244, 0.65);
}

.icon-button--dark:hover {
    border-color: var(--clay);
    background: var(--clay);
    color: #fff;
}

/* Flashes --------------------------------------------------------------- */
.flash-stack {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.flash-stack--admin {
    margin-bottom: 18px;
}

.flash {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
    font-size: 11.5px;
}

.flash p {
    flex: 1;
}

.flash__icon {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    border-radius: 50%;
}

.flash__icon .icon {
    width: 12px;
    height: 12px;
}

.flash__close {
    display: grid;
    place-items: center;
    width: 26px;
    height: 26px;
    color: currentColor;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}

.flash__close:hover {
    opacity: 1;
}

.flash__close .icon {
    width: 13px;
    height: 13px;
}

.flash--success {
    border-color: #cbd7c0;
    background: #e9eee2;
    color: #34452a;
}

.flash--success .flash__icon {
    background: #d6e1cc;
}

.flash--error {
    border-color: #e3c4b8;
    background: #f7e2da;
    color: #71331e;
}

.flash--error .flash__icon {
    background: #efcec3;
}

.flash--info {
    border-color: var(--line);
    background: var(--paper-light);
}

/* Brand ----------------------------------------------------------------- */
.brand__mark {
    position: relative;
    display: grid;
    place-items: center;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--ink);
    color: var(--paper-light);
    font-family: var(--font-display);
    font-size: 18px;
    line-height: 1;
}

.brand__mark::after {
    content: "";
    position: absolute;
    top: 3px;
    right: 3px;
    width: 6px;
    height: 6px;
    border: 1.5px solid var(--ink);
    border-radius: 50%;
    background: var(--clay);
}

.admin-brand {
    display: inline-flex;
    align-items: center;
    gap: 11px;
    color: var(--ink);
}

.admin-brand__type {
    display: flex;
    flex-direction: column;
    gap: 1px;
}

.admin-brand__type strong {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 400;
    line-height: 1.05;
    letter-spacing: 0.03em;
}

.admin-brand__type small {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 7px;
    font-weight: 500;
    line-height: 1.25;
    letter-spacing: 0.15em;
}

.admin-brand--light {
    color: var(--paper-light);
}

.admin-brand--light .brand__mark {
    background: var(--paper-light);
    color: var(--ink);
}

.admin-brand--light .brand__mark::after {
    border-color: var(--ink);
}

.admin-brand--light .admin-brand__type small {
    color: rgba(251, 249, 244, 0.34);
}

/* Authentication -------------------------------------------------------- */
.auth-page {
    min-height: 100vh;
    background: var(--paper-light);
}

.auth-shell {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(460px, 0.86fr);
    min-height: 100vh;
}

.auth-art {
    position: relative;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    padding: clamp(30px, 4vw, 54px) clamp(30px, 4.6vw, 66px);
    background: #151611;
    color: var(--paper-light);
    overflow: hidden;
}

.auth-art::before {
    content: "";
    position: absolute;
    top: -24%;
    left: -20%;
    width: 680px;
    height: 680px;
    border: 1px solid rgba(251, 249, 244, 0.09);
    border-radius: 50%;
    box-shadow: 0 0 0 90px rgba(251, 249, 244, 0.018), 0 0 0 180px rgba(251, 249, 244, 0.012);
}

.auth-art::after {
    content: "";
    position: absolute;
    right: 8%;
    top: 18%;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--clay);
    box-shadow: 0 0 0 12px rgba(219, 87, 58, 0.09);
}

.auth-art__top,
.auth-art__bottom {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.auth-art__issue,
.auth-art__bottom {
    color: rgba(251, 249, 244, 0.34);
    font-family: var(--font-mono);
    font-size: 7.5px;
    line-height: 1.6;
    letter-spacing: 0.11em;
}

.auth-art__center {
    position: relative;
    z-index: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    padding: 50px 0;
}

.auth-art__quote {
    max-width: 640px;
    margin-top: 24px;
    font-family: var(--font-display);
    font-size: clamp(36px, 4.2vw, 65px);
    font-weight: 400;
    line-height: 1.2;
    letter-spacing: -0.025em;
}

.auth-art__quote em {
    color: var(--clay);
    font-style: normal;
}

.auth-art__glyph {
    position: absolute;
    right: -0.07em;
    bottom: -0.25em;
    z-index: -1;
    color: transparent;
    font-family: var(--font-display);
    font-size: clamp(300px, 38vw, 630px);
    line-height: 0.8;
    pointer-events: none;
    user-select: none;
    -webkit-text-stroke: 1px rgba(251, 249, 244, 0.13);
}

.auth-panel {
    display: flex;
    justify-content: center;
    padding: clamp(32px, 4.5vw, 64px);
    background: var(--paper-light);
}

.auth-panel__inner {
    display: flex;
    flex-direction: column;
    width: min(100%, 410px);
    min-height: 100%;
    margin-inline: auto;
}

.auth-back {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    width: max-content;
    color: var(--muted);
    font-size: 10px;
    transition: color 0.2s ease;
}

.auth-back:hover {
    color: var(--ink);
}

.auth-heading {
    margin-top: clamp(48px, 9vh, 105px);
}

.auth-heading h1 {
    margin-top: 14px;
    font-family: var(--font-display);
    font-size: clamp(38px, 3.5vw, 49px);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.025em;
}

.auth-heading > p:last-child {
    margin-top: 13px;
    color: var(--muted);
    font-size: 11.5px;
    line-height: 1.8;
}

.auth-flashes {
    margin-top: 22px;
}

.auth-form {
    margin-top: 30px;
}

.auth-security {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 28px;
    padding-top: 17px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
}

.auth-security .icon {
    width: 14px;
    height: 14px;
    margin-top: 2px;
}

.auth-security p {
    font-size: 9.5px;
    line-height: 1.7;
}

.auth-copyright {
    margin-top: auto;
    padding-top: 48px;
    color: #a79f93;
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.06em;
}

/* Fields ---------------------------------------------------------------- */
.field {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.field + .field {
    margin-top: 17px;
}

.field > label,
.field-label-row label {
    display: flex;
    align-items: center;
    gap: 7px;
    margin-bottom: 8px;
    color: var(--ink);
    font-size: 10.5px;
    font-weight: 550;
    line-height: 1.5;
}

.field > label em,
.field-label-row label em {
    color: var(--clay);
    font-family: var(--font-mono);
    font-size: 7px;
    font-style: normal;
    font-weight: 400;
    letter-spacing: 0.03em;
}

.field__control {
    position: relative;
    display: flex;
    align-items: center;
    min-height: 50px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: #fffefb;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field__control:focus-within {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(23, 23, 19, 0.06);
}

.field__control > .icon {
    width: 15px;
    height: 15px;
    margin-left: 14px;
    color: var(--muted-light);
}

.field__control input {
    width: 100%;
    height: 48px;
    padding: 0 14px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 12.5px;
}

.field__control input::placeholder {
    color: #a9a196;
}

.field__reveal {
    display: grid;
    place-items: center;
    width: 40px;
    height: 40px;
    margin-right: 3px;
    color: var(--muted-light);
    transition: color 0.2s ease;
}

.field__reveal:hover,
.field__reveal.is-visible {
    color: var(--ink);
}

.field__reveal .icon {
    width: 15px;
    height: 15px;
}

.auth-form .button--wide {
    margin-top: 24px;
}

/* Admin shell ----------------------------------------------------------- */
.admin-page {
    background: var(--paper);
}

.admin-layout {
    min-height: 100vh;
}

.admin-overlay {
    position: fixed;
    inset: 0;
    z-index: 105;
    background: rgba(23, 23, 19, 0.42);
    backdrop-filter: blur(2px);
}

.admin-sidebar {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 110;
    display: flex;
    flex-direction: column;
    width: 258px;
    padding: 24px 15px 14px;
    background: #151611;
    color: var(--paper-light);
    overflow-y: auto;
    transition: transform 0.35s var(--ease);
}

.admin-sidebar__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 0 8px 27px;
}

.admin-sidebar__close {
    display: none;
    place-items: center;
    width: 32px;
    height: 32px;
    border: 1px solid rgba(251, 249, 244, 0.15);
    border-radius: 50%;
    color: var(--paper-light);
}

.admin-sidebar__close .icon {
    width: 15px;
    height: 15px;
}

.admin-nav-label {
    margin: 0 10px 9px;
    color: rgba(251, 249, 244, 0.27);
    font-family: var(--font-mono);
    font-size: 7.5px;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.admin-nav a {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-height: 43px;
    padding: 0 12px;
    border-radius: 2px;
    color: rgba(251, 249, 244, 0.55);
    font-size: 11.5px;
    transition: color 0.2s ease, background 0.2s ease;
}

.admin-nav a > .icon {
    width: 16px;
    height: 16px;
    opacity: 0.8;
}

.admin-nav a:hover {
    background: rgba(251, 249, 244, 0.055);
    color: var(--paper-light);
}

.admin-nav a.is-active {
    background: rgba(251, 249, 244, 0.09);
    color: var(--paper-light);
}

.admin-nav a.is-active > .icon {
    color: var(--clay);
    opacity: 1;
}

.admin-nav__indicator {
    position: absolute;
    top: 50%;
    right: 0;
    width: 2px;
    height: 18px;
    background: var(--clay);
    transform: translateY(-50%);
}

.admin-sidebar__quick {
    margin-top: 32px;
}

.sidebar-create {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 0 8px;
    padding: 11px 12px;
    border: 1px dashed rgba(251, 249, 244, 0.2);
    color: rgba(251, 249, 244, 0.7);
    font-size: 10.5px;
    transition: border-color 0.2s ease, color 0.2s ease, background 0.2s ease;
}

.sidebar-create:hover {
    border-color: var(--clay);
    background: rgba(219, 87, 58, 0.08);
    color: var(--paper-light);
}

.sidebar-create .icon {
    width: 14px;
    height: 14px;
}

.admin-sidebar__foot {
    margin-top: auto;
    padding-top: 28px;
}

.sidebar-view-site {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 9px 13px;
    color: rgba(251, 249, 244, 0.37);
    font-size: 9.5px;
    transition: color 0.2s ease;
}

.sidebar-view-site:hover {
    color: var(--paper-light);
}

.sidebar-view-site .icon {
    width: 13px;
    height: 13px;
}

.admin-user {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px;
    border-top: 1px solid rgba(251, 249, 244, 0.11);
}

.admin-user__avatar {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: var(--paper-light);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 16px;
}

.admin-user > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.admin-user strong {
    overflow: hidden;
    color: var(--paper-light);
    font-size: 10.5px;
    font-weight: 500;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-user > div span {
    color: rgba(251, 249, 244, 0.31);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.04em;
}

.admin-user form {
    flex: none;
}

.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    margin-left: 258px;
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 50;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    min-height: 72px;
    padding: 0 clamp(22px, 2.7vw, 38px);
    border-bottom: 1px solid var(--line);
    background: rgba(240, 236, 228, 0.9);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.admin-topbar__left,
.admin-topbar__right {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-topbar__menu {
    display: none;
    place-items: center;
    width: 37px;
    height: 37px;
    border: 1px solid var(--line-strong);
    border-radius: 50%;
}

.admin-topbar__menu .icon {
    width: 17px;
    height: 17px;
}

.admin-breadcrumb {
    display: flex;
    align-items: center;
    gap: 9px;
    color: var(--muted);
    font-size: 10px;
}

.admin-breadcrumb i {
    color: var(--line-strong);
    font-style: normal;
}

.admin-breadcrumb strong {
    color: var(--ink);
    font-weight: 500;
}

.admin-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.03em;
}

.admin-topbar__visit {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9.5px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.admin-topbar__visit:hover {
    color: var(--clay);
    border-color: var(--clay);
}

.admin-status i {
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #6c8a50;
    box-shadow: 0 0 0 3px rgba(108, 138, 80, 0.12);
}

.admin-main {
    flex: 1;
    width: 100%;
    max-width: 1580px;
    padding: clamp(26px, 3.2vw, 44px) clamp(22px, 2.7vw, 38px) 52px;
    margin-inline: auto;
}

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 17px clamp(22px, 2.7vw, 38px);
    border-top: 1px solid var(--line);
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7.5px;
    letter-spacing: 0.03em;
}

body.admin-nav-open {
    overflow: hidden;
}

/* Page headings --------------------------------------------------------- */
.admin-page-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 40px;
}

.admin-page-head__main {
    min-width: 0;
}

.admin-page-head h1 {
    margin-top: 10px;
    font-family: var(--font-display);
    font-size: clamp(35px, 3.6vw, 48px);
    font-weight: 400;
    line-height: 1.14;
    letter-spacing: -0.025em;
}

.admin-page-head__main > p:last-child {
    max-width: 610px;
    margin-top: 10px;
    color: var(--muted);
    font-size: 11px;
    line-height: 1.8;
}

.admin-page-head__aside {
    display: flex;
    align-items: center;
    flex: none;
    gap: 8px;
    padding-bottom: 4px;
}

.back-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 20px;
    color: var(--muted);
    font-size: 9.5px;
    transition: color 0.2s ease;
}

.back-link:hover {
    color: var(--clay);
}

/* Metrics --------------------------------------------------------------- */
.metric-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.metric-card {
    display: flex;
    flex-direction: column;
    min-height: 173px;
    padding: 20px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
}

.metric-card--dark {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-light);
}

.metric-card--sand {
    background: #e7ddcd;
}

.metric-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    color: var(--muted);
    font-size: 10px;
}

.metric-card--dark .metric-card__top {
    color: rgba(251, 249, 244, 0.55);
}

.metric-card__icon {
    display: grid;
    place-items: center;
    width: 27px;
    height: 27px;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.metric-card--dark .metric-card__icon {
    border-color: rgba(251, 249, 244, 0.18);
}

.metric-card__icon .icon {
    width: 13px;
    height: 13px;
}

.metric-card__number {
    margin-top: 22px;
    font-size: clamp(34px, 3.7vw, 48px);
    font-weight: 550;
    line-height: 1;
    letter-spacing: -0.045em;
    font-variant-numeric: tabular-nums;
    overflow-wrap: anywhere;
}

.metric-card__number--small {
    font-size: clamp(27px, 2.8vw, 38px);
}

.metric-card__foot {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 15px;
    margin-top: auto;
    padding-top: 22px;
}

.metric-card__badge,
.metric-card__trend {
    padding: 3px 7px;
    border-radius: 100px;
    background: rgba(23, 23, 19, 0.06);
    color: var(--muted);
    font-size: 8px;
    line-height: 1.5;
    white-space: nowrap;
}

.metric-card__trend {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    background: transparent;
    padding: 0;
}

.metric-card--dark .metric-card__badge {
    background: rgba(251, 249, 244, 0.1);
    color: rgba(251, 249, 244, 0.7);
}

.metric-card--dark .metric-card__trend {
    color: var(--clay);
}

.metric-card__caption {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
    letter-spacing: 0.08em;
    text-align: right;
    white-space: nowrap;
}

.metric-card--dark .metric-card__caption {
    color: rgba(251, 249, 244, 0.3);
}

/* Panels ---------------------------------------------------------------- */
.admin-panel {
    min-width: 0;
    padding: 23px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
}

.admin-panel--flush {
    padding: 0;
    overflow: hidden;
}

.admin-panel--wide {
    min-width: 0;
}

.panel-head {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 22px;
    margin-bottom: 18px;
}

.panel-kicker {
    margin-bottom: 6px;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.1em;
}

.panel-head h2 {
    font-family: var(--font-display);
    font-size: 24px;
    font-weight: 400;
    line-height: 1.2;
}

.panel-head__meta {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7.5px;
    line-height: 1.5;
    text-align: right;
}

.panel-link {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding-bottom: 2px;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: 9px;
    transition: color 0.2s ease, border-color 0.2s ease;
}

.panel-link:hover {
    color: var(--clay);
    border-color: var(--clay);
}

.panel-link .icon {
    width: 12px;
    height: 12px;
}

.panel-empty {
    padding: 40px 20px;
    color: var(--muted-light);
    font-size: 11px;
    text-align: center;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.53fr) minmax(300px, 0.72fr);
    align-items: start;
    gap: 12px;
    margin-top: 12px;
}

.dashboard-grid--lower {
    grid-template-columns: minmax(0, 1.53fr) minmax(300px, 0.72fr);
}

/* Ranking / progress ---------------------------------------------------- */
.ranking-list {
    display: flex;
    flex-direction: column;
}

.ranking-item {
    display: grid;
    grid-template-columns: 29px minmax(0, 1fr) 68px 26px;
    align-items: center;
    gap: 12px;
    padding: 13px 0;
    border-top: 1px solid var(--line);
}

.ranking-item:first-child {
    border-top: 0;
    padding-top: 5px;
}

.ranking-item__rank {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 8px;
}

.ranking-item__main {
    min-width: 0;
}

.ranking-item__title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.ranking-item__title strong {
    overflow: hidden;
    font-size: 11px;
    font-weight: 550;
    line-height: 1.4;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.ranking-item__count {
    color: var(--ink);
    font-size: 11px;
    font-weight: 550;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.ranking-item__link {
    display: grid;
    place-items: center;
    width: 25px;
    height: 25px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
    transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
}

.ranking-item__link:hover {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-light);
}

.ranking-item__link .icon {
    width: 11px;
    height: 11px;
}

.progress-track {
    position: relative;
    width: 100%;
    height: 3px;
    border-radius: 4px;
    background: #e9e2d7;
    overflow: hidden;
}

.progress-track i {
    display: block;
    width: 0;
    height: 100%;
    border-radius: inherit;
    background: var(--ink);
    transition: width 0.8s var(--ease);
}

.progress-track--clay i {
    background: var(--clay);
}

.progress-track--ink i {
    background: var(--ink);
}

/* Completion ------------------------------------------------------------ */
.completion {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 10px 0 21px;
}

.completion__ring {
    display: grid;
    flex: none;
    place-items: center;
    width: 102px;
    height: 102px;
    border-radius: 50%;
    position: relative;
}

.completion__ring::before {
    content: "";
    position: absolute;
    inset: 7px;
    border-radius: 50%;
    background: var(--paper-light);
}

.completion__ring > span {
    position: relative;
    z-index: 1;
    font-size: 26px;
    font-weight: 550;
    letter-spacing: -0.04em;
}

.completion__ring small {
    font-size: 10px;
    font-weight: 400;
    color: var(--muted);
}

.completion__copy p {
    font-size: 10.5px;
    line-height: 1.7;
}

.completion__copy p strong {
    font-weight: 600;
}

.completion__copy > span {
    display: block;
    margin-top: 5px;
    color: var(--muted-light);
    font-size: 8.5px;
    line-height: 1.7;
}

.format-bar {
    display: flex;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
}

.format-bar__item {
    flex: 1;
    padding: 11px 8px;
    border-left: 1px solid var(--line);
    text-align: center;
}

.format-bar__item:first-child {
    border-left: 0;
}

.format-bar__item span {
    display: block;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.05em;
}

.format-bar__item strong {
    display: block;
    margin-top: 2px;
    font-size: 15px;
    font-weight: 550;
}

.style-mini {
    padding-top: 18px;
}

.style-mini > p {
    margin-bottom: 11px;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.06em;
}

.style-mini__row {
    display: grid;
    grid-template-columns: 55px minmax(0, 1fr) 18px;
    align-items: center;
    gap: 8px;
    min-height: 22px;
}

.style-mini__row > span {
    color: var(--muted);
    font-size: 8.5px;
}

.style-mini__row > div {
    height: 2px;
    background: #ece6db;
}

.style-mini__row > div i {
    display: block;
    height: 100%;
    background: var(--clay);
}

.style-mini__row strong {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 7.5px;
    font-weight: 500;
    text-align: right;
}

/* Recent & quick -------------------------------------------------------- */
.recent-list {
    display: flex;
    flex-direction: column;
}

.recent-item {
    display: grid;
    grid-template-columns: 34px minmax(0, 1fr) auto 38px auto;
    align-items: center;
    gap: 11px;
    padding: 11px 0;
    border-top: 1px solid var(--line);
}

.recent-item:first-child {
    border-top: 0;
    padding-top: 2px;
}

.recent-item__glyph {
    display: grid;
    place-items: center;
    width: 34px;
    height: 34px;
    border-radius: 2px;
    background: var(--paper-deep);
    font-family: var(--font-display);
    font-size: 17px;
    line-height: 1;
}

.recent-item__main {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.recent-item__main strong {
    overflow: hidden;
    font-size: 10.5px;
    font-weight: 550;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item__main span {
    overflow: hidden;
    color: var(--muted-light);
    font-size: 8px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.recent-item__date {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 8px;
}

.recent-item__action {
    display: inline-flex;
    align-items: center;
    gap: 3px;
    color: var(--muted);
    font-size: 8.5px;
    white-space: nowrap;
    transition: color 0.2s ease;
}

.recent-item__action:hover {
    color: var(--clay);
}

.quick-links {
    display: flex;
    flex-direction: column;
}

.quick-links a {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 12px 0;
    border-top: 1px solid var(--line);
    transition: color 0.2s ease;
}

.quick-links a:first-child {
    padding-top: 0;
    border-top: 0;
}

.quick-links__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 31px;
    height: 31px;
    border: 1px solid var(--line);
    border-radius: 50%;
}

.quick-links__icon .icon {
    width: 14px;
    height: 14px;
}

.quick-links a > span:nth-child(2) {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.quick-links strong {
    font-size: 10.5px;
    font-weight: 550;
}

.quick-links small {
    margin-top: 2px;
    color: var(--muted-light);
    font-size: 8px;
}

.quick-links a > .icon:last-child {
    width: 12px;
    height: 12px;
    color: var(--muted-light);
    transition: transform 0.25s var(--ease);
}

.quick-links a:hover {
    color: var(--clay);
}

.quick-links a:hover > .icon:last-child {
    transform: translateX(3px);
}

.quick-note {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
}

.quick-note .icon {
    width: 13px;
    height: 13px;
    margin-top: 2px;
}

.quick-note p {
    font-size: 8.5px;
    line-height: 1.75;
}

/* Tables / font management ---------------------------------------------- */
.panel-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 15px 18px;
    border-bottom: 1px solid var(--line);
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 8px;
    width: min(100%, 370px);
    min-height: 39px;
    padding: 0 5px 0 11px;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: #fffefb;
}

.admin-search > .icon {
    width: 14px;
    height: 14px;
    color: var(--muted-light);
}

.admin-search input {
    flex: 1;
    min-width: 0;
    height: 37px;
    border: 0;
    outline: 0;
    background: transparent;
    font-size: 10.5px;
}

.admin-search input::placeholder {
    color: #a9a196;
}

.admin-search .button {
    min-height: 29px;
    padding-inline: 12px;
}

.admin-search__clear {
    display: grid;
    place-items: center;
    width: 22px;
    height: 22px;
    color: var(--muted-light);
}

.admin-search__clear:hover {
    color: var(--ink);
}

.toolbar-meta {
    display: flex;
    align-items: center;
    gap: 11px;
    color: var(--muted-light);
    font-size: 8.5px;
}

.toolbar-meta strong {
    color: var(--ink);
    font-weight: 550;
}

.toolbar-meta__dot {
    width: 3px;
    height: 3px;
    border-radius: 50%;
    background: var(--line-strong);
}

.table-wrap {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.admin-table th {
    padding: 11px 16px;
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7px;
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.admin-table th.align-right {
    text-align: right;
}

.admin-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    font-size: 9.5px;
}

.admin-table tbody tr:last-child td {
    border-bottom: 0;
}

.admin-table tbody tr {
    transition: background-color 0.18s ease;
}

.admin-table tbody tr:hover {
    background: #f7f3eb;
}

.admin-font-cell {
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 210px;
}

.admin-font-thumb {
    display: grid;
    place-items: center;
    flex: none;
    width: 47px;
    height: 47px;
    border-radius: 2px;
    background: var(--paper-deep);
    color: var(--ink);
    font-family: var(--font-display);
    font-size: 22px;
    line-height: 1;
}

.admin-font-thumb--1 {
    background: var(--ink);
    color: var(--paper-light);
}

.admin-font-thumb--2 {
    background: var(--clay);
    color: #fff;
}

.admin-font-thumb--3 {
    background: var(--sage);
}

.admin-font-cell > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-font-name {
    font-size: 11px;
    font-weight: 550;
    line-height: 1.5;
    transition: color 0.2s ease;
}

.admin-font-name:hover {
    color: var(--clay);
}

.admin-font-family,
.admin-font-author {
    overflow: hidden;
    max-width: 230px;
    color: var(--muted);
    font-size: 8px;
    line-height: 1.6;
    text-overflow: ellipsis;
}

.admin-font-author {
    color: var(--muted-light);
}

.format-pips {
    display: flex;
    gap: 3px;
    margin-bottom: 4px;
}

.format-pips span {
    padding: 1px 4px;
    border: 1px solid var(--line);
    color: #b4ada2;
    font-family: var(--font-mono);
    font-size: 6px;
    line-height: 1.6;
    letter-spacing: 0.03em;
}

.format-pips span.is-present {
    border-color: rgba(76, 103, 56, 0.24);
    background: rgba(76, 103, 56, 0.07);
    color: var(--success);
}

.format-pips span.is-missing {
    border-color: rgba(182, 59, 36, 0.22);
    background: rgba(182, 59, 36, 0.06);
    color: var(--danger);
}

.admin-file-size {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
}

.admin-download-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--ink);
    font-size: 9.5px;
    font-variant-numeric: tabular-nums;
}

.admin-download-count .icon {
    color: var(--muted-light);
}

.admin-date {
    display: block;
    color: var(--ink);
    font-family: var(--font-mono);
    font-size: 8px;
    line-height: 1.6;
}

.admin-date__sub {
    display: block;
    color: var(--muted-light);
    font-size: 7.5px;
    line-height: 1.6;
}

.row-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 5px;
}

.row-actions form {
    display: inline-flex;
}

.admin-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 300px;
    padding: 50px 24px;
    text-align: center;
}

.admin-empty > span {
    display: grid;
    place-items: center;
    width: 55px;
    height: 55px;
    margin-bottom: 16px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
}

.admin-empty > span .icon {
    width: 21px;
    height: 21px;
}

.admin-empty h2 {
    font-family: var(--font-display);
    font-size: 26px;
    font-weight: 400;
}

.admin-empty p {
    margin: 7px 0 18px;
    color: var(--muted);
    font-size: 10px;
}

.page-footnote {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 12px;
    color: var(--muted-light);
    font-size: 8px;
}

.page-footnote .icon {
    color: var(--muted);
}

/* Forms ----------------------------------------------------------------- */
.font-form {
    margin-top: 28px;
}

.form-errors {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 14px;
    padding: 16px 18px;
    border: 1px solid #e2c1b5;
    border-radius: 3px;
    background: #f7e6df;
    color: #712f1d;
}

.form-errors__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 23px;
    height: 23px;
    margin-top: 1px;
    border-radius: 50%;
    background: #efcec3;
}

.form-errors__icon .icon {
    width: 12px;
    height: 12px;
}

.form-errors strong {
    font-size: 11px;
    font-weight: 600;
}

.form-errors ul {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 5px;
}

.form-errors li {
    font-size: 9.5px;
    line-height: 1.65;
}

.form-errors li span {
    font-weight: 600;
}

.form-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 315px;
    align-items: start;
    gap: 14px;
}

.form-main {
    min-width: 0;
}

.form-card {
    padding: 25px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
}

.form-card + .form-card {
    margin-top: 12px;
}

.form-card__head {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    margin-bottom: 23px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--line);
}

.form-card__number {
    display: inline-flex;
    flex: none;
    margin-top: 2px;
    color: var(--clay);
    font-family: var(--font-mono);
    font-size: 8px;
    letter-spacing: 0.04em;
}

.form-card__head h2 {
    font-family: var(--font-display);
    font-size: 23px;
    font-weight: 400;
    line-height: 1.25;
}

.form-card__head p {
    margin-top: 4px;
    color: var(--muted);
    font-size: 9px;
    line-height: 1.7;
}

.form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 17px 15px;
}

.form-grid .field {
    margin-top: 0;
}

.field--span-2 {
    grid-column: span 2;
}

.field > input,
.field > textarea,
.field > select {
    width: 100%;
    border: 1px solid var(--line-strong);
    border-radius: 2px;
    background: #fffefb;
    color: var(--ink);
    font-size: 11.5px;
    outline: 0;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.field > input,
.field > select {
    height: 44px;
    padding: 0 12px;
}

.field > textarea {
    min-height: 160px;
    padding: 11px 12px;
    line-height: 1.8;
    resize: vertical;
}

.field > input::placeholder,
.field > textarea::placeholder {
    color: #aca59a;
}

.field > input:focus,
.field > textarea:focus,
.field > select:focus {
    border-color: var(--ink);
    box-shadow: 0 0 0 3px rgba(23, 23, 19, 0.05);
}

.field.has-error > input,
.field.has-error > textarea,
.field.has-error > select {
    border-color: #c36b54;
}

.field-help {
    margin-top: 5px;
    color: var(--muted-light);
    font-size: 8px;
    line-height: 1.7;
}

.field-error {
    display: flex;
    align-items: flex-start;
    gap: 4px;
    margin-top: 5px;
    color: var(--danger);
    font-size: 8px;
    line-height: 1.7;
}

.field-error::before {
    content: "!";
    display: inline-grid;
    place-items: center;
    flex: none;
    width: 12px;
    height: 12px;
    margin-top: 1px;
    border: 1px solid currentColor;
    border-radius: 50%;
    font-size: 7px;
    line-height: 1;
}

.field-label-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.char-counter {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7.5px;
}

.select-wrap {
    position: relative;
    width: 100%;
}

.select-wrap select {
    width: 100%;
}

.select-wrap select {
    appearance: none;
    padding-right: 35px;
    cursor: pointer;
}

.select-wrap > .icon {
    position: absolute;
    top: 50%;
    right: 13px;
    width: 13px;
    height: 13px;
    color: var(--muted);
    pointer-events: none;
    transform: translateY(-50%);
}

.upload-note {
    display: flex;
    align-items: flex-start;
    gap: 9px;
    margin-bottom: 17px;
    padding: 11px 13px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #f5f1e8;
    color: var(--muted);
}

.upload-note .icon {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--clay);
}

.upload-note p {
    font-size: 8.5px;
    line-height: 1.75;
}

.upload-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 9px;
}

.upload-field {
    min-width: 0;
    padding: 12px;
    border: 1px solid var(--line);
    border-radius: 2px;
    background: #fffefb;
}

.upload-field.has-error {
    border-color: #d39784;
    background: #fdf7f4;
}

.upload-field__head {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    min-height: 45px;
}

.upload-format {
    display: grid;
    place-items: center;
    flex: none;
    width: 33px;
    height: 23px;
    border: 1px solid var(--line-strong);
    border-radius: 1px;
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.03em;
}

.upload-field__head > div {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.upload-field__head strong {
    font-size: 9.5px;
    font-weight: 550;
    line-height: 1.5;
}

.upload-field__head > div span {
    color: var(--muted-light);
    font-size: 7.5px;
    line-height: 1.5;
}

.upload-required {
    flex: none;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
    line-height: 1.8;
}

.upload-current {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 8px 0;
    padding: 8px;
    border: 1px solid rgba(76, 103, 56, 0.18);
    border-radius: 2px;
    background: rgba(76, 103, 56, 0.05);
}

.upload-current__icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(76, 103, 56, 0.1);
    color: var(--success);
}

.upload-current__icon .icon {
    width: 12px;
    height: 12px;
}

.upload-current > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.upload-current strong {
    color: var(--success);
    font-size: 8px;
    font-weight: 550;
}

.upload-current > div span {
    overflow: hidden;
    color: var(--muted-light);
    font-size: 7px;
    line-height: 1.5;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.upload-current__check {
    color: var(--success);
}

.upload-current__check .icon {
    width: 13px;
    height: 13px;
}

.dropzone {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 125px;
    padding: 18px 10px;
    border: 1px dashed var(--line-strong);
    border-radius: 2px;
    background: #fbf8f2;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s ease, background 0.2s ease;
}

.dropzone:hover,
.dropzone.is-dragging {
    border-color: var(--clay);
    background: rgba(219, 87, 58, 0.035);
}

.dropzone:focus-within {
    outline: 2px solid var(--clay);
    outline-offset: 3px;
}

.dropzone__input {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.dropzone__icon {
    display: grid;
    place-items: center;
    width: 31px;
    height: 31px;
    margin-bottom: 8px;
    border: 1px solid var(--line);
    border-radius: 50%;
    color: var(--muted);
}

.dropzone__icon .icon {
    width: 14px;
    height: 14px;
}

.dropzone__title {
    color: var(--ink);
    font-size: 8.5px;
    line-height: 1.6;
}

.dropzone__meta {
    margin-top: 2px;
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
    line-height: 1.7;
}

.dropzone__selected {
    display: block;
    max-width: 100%;
    margin-top: 5px;
    overflow: hidden;
    color: var(--success);
    font-size: 7.5px;
    line-height: 1.6;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.dropzone.is-invalid .dropzone__selected {
    color: var(--danger);
    white-space: normal;
}

.dropzone.has-file {
    border-color: rgba(76, 103, 56, 0.4);
    background: rgba(76, 103, 56, 0.04);
}

.form-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 9px;
    margin-top: 13px;
    padding: 17px 0 3px;
}

.form-actions__note {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    margin-left: auto;
    color: var(--muted-light);
    font-size: 7.5px;
}

.form-aside {
    position: sticky;
    top: 92px;
}

.form-preview-card {
    border-radius: 3px;
    background: var(--ink);
    color: var(--paper-light);
    overflow: hidden;
}

.form-preview-card__head,
.form-preview-card__foot {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding: 12px 15px;
    color: rgba(251, 249, 244, 0.38);
    font-family: var(--font-mono);
    font-size: 6.5px;
    letter-spacing: 0.06em;
}

.form-preview-card__head {
    border-bottom: 1px solid rgba(251, 249, 244, 0.1);
}

.form-preview-card__foot {
    border-top: 1px solid rgba(251, 249, 244, 0.1);
}

.form-preview-card__canvas {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 225px;
    padding: 20px 17px;
    background-image: linear-gradient(rgba(251, 249, 244, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(251, 249, 244, 0.045) 1px, transparent 1px);
    background-size: 29px 29px;
}

.form-preview-card__glyph {
    font-size: 98px;
    line-height: 0.8;
    letter-spacing: -0.05em;
}

.form-preview-card__name {
    overflow: hidden;
    font-size: 25px;
    line-height: 1.2;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.form-summary {
    margin-top: 12px;
    padding: 18px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
}

.form-summary h3 {
    margin-bottom: 11px;
    font-size: 10.5px;
    font-weight: 600;
}

.form-summary ul {
    border-top: 1px solid var(--line);
}

.form-summary li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 29px;
    border-bottom: 1px solid var(--line);
    font-size: 8.5px;
}

.form-summary li span {
    color: var(--muted);
}

.form-summary li strong {
    font-size: 8px;
    font-weight: 500;
}

.form-summary li strong.is-ok {
    color: var(--success);
}

.form-summary li strong.is-pending {
    color: #9a7a24;
}

.form-summary li strong.is-error {
    color: var(--danger);
}

.form-summary > p {
    margin: 11px 0 14px;
    color: var(--muted-light);
    font-size: 8px;
    line-height: 1.7;
}

.form-summary .button + .button {
    margin-top: 5px;
}

.form-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    margin-top: 12px;
    padding: 13px;
    border: 1px solid var(--line);
    background: rgba(219, 87, 58, 0.04);
}

.form-tip .icon {
    width: 14px;
    height: 14px;
    margin-top: 2px;
    color: var(--clay);
}

.form-tip p {
    color: var(--muted);
    font-size: 7.5px;
    line-height: 1.75;
}

.form-tip strong {
    color: var(--ink);
    font-weight: 600;
}

/* Statistics ------------------------------------------------------------ */
.report-stamp {
    display: inline-flex;
    padding: 9px 12px;
    border: 1px solid var(--line);
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 7px;
    letter-spacing: 0.06em;
    white-space: nowrap;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
    margin-top: 30px;
}

.stats-summary__item {
    padding: 18px 19px;
    border: 1px solid var(--line);
    border-radius: 3px;
    background: var(--paper-light);
}

.stats-summary__item > span {
    color: var(--muted);
    font-size: 9px;
}

.stats-summary__item > strong {
    display: block;
    margin: 13px 0 10px;
    font-size: 32px;
    font-weight: 550;
    line-height: 1;
    letter-spacing: -0.035em;
    font-variant-numeric: tabular-nums;
}

.stats-summary__item > small {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
    line-height: 1.5;
    letter-spacing: 0.04em;
}

.stats-summary__item--accent {
    border-color: var(--ink);
    background: var(--ink);
    color: var(--paper-light);
}

.stats-summary__item--accent > span,
.stats-summary__item--accent > small {
    color: rgba(251, 249, 244, 0.4);
}

.stats-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.65fr) minmax(315px, 0.7fr);
    align-items: start;
    gap: 12px;
    margin-top: 12px;
}

.stats-aside {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.stats-table-wrap {
    overflow-x: auto;
}

.stats-table {
    width: 100%;
    border-collapse: collapse;
    white-space: nowrap;
}

.stats-table th {
    padding: 10px 11px;
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 6.5px;
    font-weight: 500;
    text-align: left;
    letter-spacing: 0.05em;
}

.stats-table td {
    padding: 12px 11px;
    border-bottom: 1px solid var(--line);
    font-size: 9px;
}

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

.stats-table tbody tr:hover {
    background: #f7f3eb;
}

.stats-rank {
    color: var(--muted-light);
    font-family: var(--font-mono);
    font-size: 7px !important;
}

.stats-font-link {
    display: flex;
    flex-direction: column;
    min-width: 130px;
}

.stats-font-link strong {
    font-size: 9.5px;
    font-weight: 550;
    line-height: 1.5;
}

.stats-font-link span {
    color: var(--muted-light);
    font-size: 7.5px;
    line-height: 1.5;
}

.stats-bar-cell {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 190px;
}

.stats-bar-cell .progress-track {
    flex: 1;
    height: 3px;
}

.stats-bar-cell strong {
    min-width: 42px;
    font-family: var(--font-mono);
    font-size: 7.5px;
    font-weight: 500;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.stats-share {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 7px !important;
}

.table-note {
    display: flex;
    align-items: center;
    gap: 5px;
    margin-top: 14px;
    color: var(--muted-light);
    font-size: 7.5px;
}

.style-distribution {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.style-distribution__row {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.style-distribution__label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    font-size: 8.5px;
}

.style-distribution__label strong {
    color: var(--muted);
    font-family: var(--font-mono);
    font-size: 7.5px;
    font-weight: 500;
}

.style-distribution__row > span {
    color: var(--muted-light);
    font-size: 7px;
}

.format-inventory {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.format-inventory__item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 9px;
    border-bottom: 1px solid var(--line);
    overflow: hidden;
}

.format-inventory__item:last-child {
    border-bottom: 0;
}

.format-inventory__tag {
    display: grid;
    place-items: center;
    flex: none;
    width: 40px;
    height: 29px;
    border: 1px solid var(--line);
    font-family: var(--font-mono);
    font-size: 6.5px;
}

.format-inventory__item > div {
    display: flex;
    flex-direction: column;
    min-width: 0;
    flex: 1;
}

.format-inventory__item strong {
    font-size: 9px;
    font-weight: 550;
}

.format-inventory__item strong small {
    color: var(--muted-light);
    font-size: 7px;
    font-weight: 400;
}

.format-inventory__item > div span {
    color: var(--muted-light);
    font-size: 7.5px;
}

.format-inventory__item > i {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 1px;
    background: var(--clay);
}

.stats-note {
    display: flex;
    align-items: flex-start;
    gap: 6px;
    margin-top: 13px;
    padding-top: 12px;
    border-top: 1px solid var(--line);
    color: var(--muted-light);
}

.stats-note .icon {
    margin-top: 2px;
}

.stats-note p {
    font-size: 7.5px;
    line-height: 1.7;
}

/* Dialog ---------------------------------------------------------------- */
.confirm-dialog {
    width: min(420px, calc(100vw - 32px));
    padding: 0;
    border: 0;
    border-radius: 4px;
    background: transparent;
    color: var(--ink);
}

.confirm-dialog::backdrop {
    background: rgba(23, 23, 19, 0.55);
    backdrop-filter: blur(3px);
}

.confirm-dialog__body {
    padding: 27px;
    border: 1px solid var(--line);
    border-radius: 4px;
    background: var(--paper-light);
    box-shadow: 0 30px 90px rgba(23, 23, 19, 0.22);
}

.confirm-dialog__icon {
    display: grid;
    place-items: center;
    width: 39px;
    height: 39px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #f4ddd6;
    color: var(--danger);
}

.confirm-dialog__icon .icon {
    width: 17px;
    height: 17px;
}

.confirm-dialog h2 {
    margin-top: 9px;
    font-family: var(--font-display);
    font-size: 25px;
    font-weight: 400;
    line-height: 1.2;
}

.confirm-dialog__body > p:not(.admin-eyebrow) {
    margin-top: 9px;
    color: var(--muted);
    font-size: 9.5px;
    line-height: 1.8;
}

.confirm-dialog__body > p strong {
    color: var(--ink);
    font-weight: 550;
}

.confirm-dialog__actions {
    display: flex;
    justify-content: flex-end;
    gap: 7px;
    margin-top: 23px;
}

/* Legibility refinement --------------------------------------------------
   Admin data is dense by design, but operational copy must remain readable
   at a glance. These values are intentionally larger than the public site’s
   decorative micro-labels. */
.admin-breadcrumb { font-size: 11px; }
.admin-status { font-size: 8.5px; }
.admin-topbar__visit { font-size: 10px; }
.admin-eyebrow { font-size: 9px; letter-spacing: 0.09em; }
.admin-page-head__main > p:last-child { font-size: 11.5px; }
.admin-nav a { font-size: 12px; }
.admin-nav-label { font-size: 8px; }
.sidebar-create { font-size: 11px; }
.sidebar-view-site { font-size: 10px; }
.admin-user strong { font-size: 11px; }
.admin-user > div span { font-size: 7.5px; }

.metric-card__top { font-size: 11px; }
.metric-card__badge { font-size: 9px; }
.metric-card__foot .metric-card__trend { font-size: 8.5px; }
.metric-card__caption { font-size: 7.5px; }
.panel-kicker { font-size: 7.5px; }
.panel-head__meta { font-size: 8px; }
.panel-link { font-size: 9.5px; }

.ranking-item__rank { font-size: 8.5px; }
.ranking-item__title strong { font-size: 12px; }
.ranking-item__count { font-size: 12px; }
.completion__ring > span { font-size: 28px; }
.completion__copy p { font-size: 11.5px; }
.completion__copy > span { font-size: 9px; }
.format-bar__item span { font-size: 7.5px; }
.format-bar__item strong { font-size: 16px; }
.style-mini > p { font-size: 8px; }
.style-mini__row > span { font-size: 9.5px; }
.style-mini__row strong { font-size: 8px; }

.recent-item__main strong { font-size: 11.5px; }
.recent-item__main span { font-size: 8.5px; }
.recent-item__date { font-size: 8.5px; }
.recent-item__action { font-size: 9px; }
.quick-links strong { font-size: 11.5px; }
.quick-links small { font-size: 8.5px; }
.quick-note p { font-size: 9px; }
.panel-empty { font-size: 11.5px; }

.toolbar-meta { font-size: 9.5px; }
.admin-search input { font-size: 11.5px; }
.admin-table th { font-size: 8px; }
.admin-table td { font-size: 10.5px; }
.admin-font-name { font-size: 12px; }
.admin-font-family,
.admin-font-author { font-size: 9px; }
.format-pips span { font-size: 7px; }
.admin-file-size { font-size: 7.5px; }
.admin-download-count { font-size: 10.5px; }
.admin-date { font-size: 9px; }
.admin-date__sub { font-size: 8px; }
.admin-empty p { font-size: 11px; }
.page-footnote { font-size: 8.5px; }

.field > label,
.field-label-row label { font-size: 11.5px; }
.field > input,
.field > textarea,
.field > select { font-size: 12px; }
.field__control input { font-size: 13px; }
.field-help { font-size: 9px; }
.field-error { font-size: 9px; }
.char-counter { font-size: 8px; }
.form-card__head p { font-size: 10px; }
.form-card__head h2 { font-size: 24px; }
.upload-note p { font-size: 9px; }
.upload-field__head strong { font-size: 10.5px; }
.upload-field__head > div span { font-size: 8px; }
.upload-required { font-size: 7px; }
.upload-current strong { font-size: 8.5px; }
.upload-current > div span { font-size: 7.5px; }
.dropzone__title { font-size: 9.5px; }
.dropzone__meta { font-size: 7.5px; }
.dropzone__selected { font-size: 8.5px; }
.form-summary h3 { font-size: 11.5px; }
.form-summary li { font-size: 9px; }
.form-summary li strong { font-size: 8.5px; }
.form-summary > p { font-size: 8.5px; }
.form-tip p { font-size: 8.5px; }
.form-actions__note { font-size: 8.5px; }
.form-errors li { font-size: 10px; }
.form-errors strong { font-size: 11.5px; }
.back-link { font-size: 10.5px; }

.stats-summary__item > span { font-size: 10px; }
.stats-summary__item > small { font-size: 7.5px; }
.stats-table th { font-size: 7.5px; }
.stats-table td { font-size: 10px; }
.stats-font-link strong { font-size: 11px; }
.stats-font-link span { font-size: 8.5px; }
.stats-bar-cell strong { font-size: 8.5px; }
.stats-share { font-size: 8px !important; }
.table-note { font-size: 8.5px; }
.style-distribution__label { font-size: 9.5px; }
.style-distribution__label strong { font-size: 8.5px; }
.style-distribution__row > span { font-size: 8px; }
.format-inventory__item strong { font-size: 10px; }
.format-inventory__item > div span { font-size: 8.5px; }
.stats-note p { font-size: 8.5px; }
.report-stamp { font-size: 8px; }

.auth-back { font-size: 10.5px; }
.auth-heading > p:last-child { font-size: 12.5px; }
.auth-security p { font-size: 10px; }
.auth-copyright { font-size: 8px; }
.auth-heading h1 { letter-spacing: -0.02em; }

/* Responsive ------------------------------------------------------------ */
@media (max-width: 1280px) {
    .metric-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .metric-card {
        min-height: 160px;
    }

    .dashboard-grid,
    .dashboard-grid--lower {
        grid-template-columns: minmax(0, 1.35fr) minmax(285px, 0.75fr);
    }

    .form-layout {
        grid-template-columns: minmax(0, 1fr) 290px;
    }

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

    .upload-field__head {
        min-height: auto;
    }

    .dropzone {
        min-height: 105px;
    }

    .stats-summary {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 1120px) {
    .admin-sidebar {
        width: 235px;
    }

    .admin-shell {
        margin-left: 235px;
    }

    .dashboard-grid,
    .dashboard-grid--lower,
    .stats-layout {
        grid-template-columns: 1fr;
    }

    .form-layout {
        grid-template-columns: 1fr;
    }

    .form-aside {
        position: static;
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        align-items: start;
    }

    .form-preview-card {
        grid-column: span 2;
    }

    .form-summary,
    .form-tip {
        margin-top: 0;
    }

    .form-tip {
        grid-column: span 2;
    }

    .recent-item {
        grid-template-columns: 34px minmax(0, 1fr) auto 32px auto;
    }
}

@media (max-width: 1024px) {
    .admin-sidebar {
        width: 258px;
        transform: translateX(-100%);
        box-shadow: 20px 0 60px rgba(23, 23, 19, 0.22);
    }

    .admin-sidebar.is-open {
        transform: translateX(0);
    }

    .admin-sidebar__close {
        display: grid;
    }

    .admin-shell {
        margin-left: 0;
    }

    .admin-topbar__menu {
        display: grid;
    }

    .auth-shell {
        grid-template-columns: minmax(0, 0.9fr) minmax(400px, 1fr);
    }

    .auth-art {
        padding: 30px;
    }

    .auth-art__quote {
        font-size: clamp(31px, 4vw, 46px);
    }

    .auth-art__glyph {
        font-size: 56vw;
    }
}

@media (max-width: 880px) {
    .admin-page-head {
        display: block;
    }

    .admin-page-head__aside {
        margin-top: 18px;
        padding-bottom: 0;
    }

    .admin-topbar__right .admin-status {
        display: none;
    }

    .auth-shell {
        display: flex;
        flex-direction: column;
    }

    .auth-art {
        min-height: 220px;
        padding: 23px 25px;
    }

    .auth-art__center {
        flex: none;
        padding: 30px 0 2px;
    }

    .auth-art__quote {
        margin-top: 13px;
        font-size: clamp(26px, 5.8vw, 36px);
    }

    .auth-art__glyph {
        display: none;
    }

    .auth-art__bottom {
        display: none;
    }

    .auth-panel {
        flex: 1;
        padding: 28px 24px 40px;
    }

    .auth-panel__inner {
        min-height: 0;
    }

    .auth-heading {
        margin-top: 36px;
    }

    .auth-heading h1 {
        font-size: clamp(35px, 7vw, 44px);
    }

    .auth-copyright {
        margin-top: 38px;
        padding-top: 0;
    }
}

@media (max-width: 760px) {
    .admin-topbar {
        min-height: 64px;
        padding: 0 17px;
    }

    .admin-main {
        padding: 22px 17px 38px;
    }

    .admin-footer {
        padding: 14px 17px;
    }

    .admin-page-head h1 {
        font-size: 35px;
    }

    .admin-page-head__aside {
        flex-wrap: wrap;
    }

    .metric-grid,
    .stats-summary {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .metric-card {
        min-height: 142px;
    }

    .metric-card__number {
        margin-top: 17px;
        font-size: 38px;
    }

    .metric-card__foot {
        padding-top: 16px;
    }

    .panel-toolbar {
        display: block;
        padding: 13px;
    }

    .admin-search {
        width: 100%;
    }

    .toolbar-meta {
        margin-top: 10px;
        padding-top: 9px;
        border-top: 1px solid var(--line);
    }

    .admin-panel {
        padding: 17px;
    }

    .admin-panel--flush {
        padding: 0;
    }

    .admin-table th,
    .admin-table td {
        padding: 11px 13px;
    }

    .admin-table th:nth-child(3),
    .admin-table td:nth-child(3),
    .admin-table th:nth-child(4),
    .admin-table td:nth-child(4) {
        display: none;
    }

    .recent-item {
        grid-template-columns: 31px minmax(0, 1fr) auto;
        gap: 9px;
    }

    .recent-item > .tag,
    .recent-item__date {
        display: none;
    }

    .recent-item__action {
        font-size: 0;
    }

    .recent-item__action .icon {
        width: 14px;
        height: 14px;
    }

    .form-card {
        padding: 18px;
    }

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

    .field--span-2 {
        grid-column: auto;
    }

    .form-aside {
        display: block;
    }

    .form-summary,
    .form-tip {
        margin-top: 10px;
    }

    .form-tip {
        margin-top: 12px;
    }

    .form-actions {
        align-items: stretch;
    }

    .form-actions .button {
        flex: 1;
    }

    .form-actions__note {
        width: 100%;
        margin-left: 0;
    }

    .stats-table th:nth-child(3),
    .stats-table td:nth-child(3),
    .stats-table th:nth-child(5),
    .stats-table td:nth-child(5) {
        display: none;
    }

    .stats-bar-cell {
        min-width: 135px;
    }

    .panel-head {
        align-items: flex-start;
    }

    .panel-link {
        margin-top: 2px;
        font-size: 8px;
    }

    .ranking-item {
        grid-template-columns: 24px minmax(0, 1fr) 60px 24px;
        gap: 9px;
    }

    .completion {
        align-items: flex-start;
    }

    .completion__ring {
        width: 88px;
        height: 88px;
    }

    .completion__ring > span {
        font-size: 22px;
    }

    .quick-links a {
        padding: 11px 0;
    }

    .admin-footer {
        display: none;
    }
}

@media (max-width: 520px) {
    .admin-page-head__aside .button {
        flex: 1;
    }

    .admin-breadcrumb > span,
    .admin-breadcrumb > i {
        display: none;
    }

    .admin-topbar__right .button {
        padding-inline: 11px;
        font-size: 0;
        gap: 0;
    }

    .admin-topbar__right .button .icon {
        width: 15px;
        height: 15px;
    }

    .admin-table th:nth-child(5),
    .admin-table td:nth-child(5) {
        display: none;
    }

    .admin-table th:last-child,
    .admin-table td:last-child {
        padding-right: 8px;
    }

    .row-actions .icon-button {
        width: 29px;
        height: 29px;
    }

    .form-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
    }

    .form-actions .button:first-child {
        grid-column: span 2;
    }

    .confirm-dialog__body {
        padding: 22px;
    }

    .auth-art {
        min-height: 184px;
        padding: 19px 20px;
    }

    .auth-art__center {
        padding: 19px 0 0;
    }

    .auth-art__center .eyebrow {
        display: none;
    }

    .auth-art__quote {
        font-size: 24px;
    }

    .auth-panel {
        padding: 24px 20px 35px;
    }

    .auth-heading {
        margin-top: 30px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}
