/* ============================================================
   Buttons, cards, badges, tables, modals, toasts, tabs …
   ============================================================ */

/* ---------------------------------------------------------- buttons */

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 42px;
    padding: 0 16px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: var(--surface);
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 650;
    cursor: pointer;
    white-space: nowrap;
    transition: background var(--t-fast), color var(--t-fast), border-color var(--t-fast), transform var(--t-fast), box-shadow var(--t-fast);
    user-select: none;
}
.btn:hover { background: var(--surface-3); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn:disabled, .btn.is-disabled { opacity: .55; pointer-events: none; }

.btn--primary {
    background: var(--primary);
    color: var(--on-primary);
    box-shadow: 0 2px 10px var(--primary-ring);
}
.btn--primary:hover { background: var(--primary-dark); color: #fff; }

.btn--ghost { background: transparent; border-color: var(--border); }
.btn--ghost:hover { background: var(--surface); }

.btn--soft { background: var(--primary-soft); color: var(--primary-dark); }
.btn--soft:hover { background: color-mix(in srgb, var(--primary-soft) 70%, var(--primary) 12%); }

.btn--danger { background: var(--danger-soft); color: var(--danger); }
.btn--danger:hover { background: var(--danger); color: #fff; }

.btn--success { background: var(--success); color: #fff; }
.btn--success:hover { background: color-mix(in srgb, var(--success) 85%, #000); color: #fff; }

.btn--sm { height: 34px; padding: 0 12px; font-size: var(--fs-xs); border-radius: 9px; }
.btn--lg { height: 50px; padding: 0 24px; font-size: var(--fs-base); border-radius: var(--radius); }
.btn--block { width: 100%; }
.btn--icon { width: 40px; padding: 0; flex: none; }
.btn--icon.btn--sm { width: 34px; }

.iconbtn {
    display: inline-grid;
    place-items: center;
    width: 40px; height: 40px;
    border: 1px solid transparent;
    border-radius: var(--radius-sm);
    background: transparent;
    color: var(--muted);
    cursor: pointer;
    position: relative;
    transition: background var(--t-fast), color var(--t-fast);
}
.iconbtn:hover { background: var(--surface); color: var(--text); }
.iconbtn.is-on { color: var(--primary); background: var(--primary-soft); }

.btn-dot {
    position: absolute;
    top: 7px; right: 7px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--primary);
    border: 2px solid var(--bg);
}

.btn-group {
    display: inline-flex;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-pill);
    padding: 3px;
    gap: 2px;
}
.btn-group button {
    border: 0;
    background: transparent;
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 650;
    padding: 7px 13px;
    border-radius: var(--radius-pill);
    cursor: pointer;
    transition: background var(--t-fast), color var(--t-fast);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.btn-group button:hover { color: var(--text); }
.btn-group button.is-active { background: var(--surface-2); color: var(--text-strong); box-shadow: var(--shadow-xs); }

/* ---------------------------------------------------------- cards */

.card {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-xs);
}
.card--pad { padding: var(--sp-5); }
.card--hover { transition: transform var(--t), box-shadow var(--t), border-color var(--t); }
.card--hover:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--border-strong); }
.card--flush { overflow: hidden; }

.card-head {
    padding: var(--sp-4) var(--sp-5);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}
.card-head h3 { margin: 0; font-size: var(--fs-md); }
.card-body { padding: var(--sp-5); }
.card-foot {
    padding: var(--sp-3) var(--sp-5);
    border-top: 1px solid var(--border);
    background: var(--bg-soft);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
}

/* topic tile */
.tile {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: var(--sp-5);
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: inherit;
    transition: transform var(--t), box-shadow var(--t), border-color var(--t);
    position: relative;
    overflow: hidden;
}
.tile::after {
    content: "";
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: var(--primary);
    opacity: 0;
    transition: opacity var(--t);
}
.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); color: inherit; border-color: var(--border-strong); }
.tile:hover::after { opacity: 1; }
.tile-title { font-weight: 700; font-size: var(--fs-md); color: var(--text-strong); line-height: 1.35; }
.tile-desc { color: var(--muted); font-size: var(--fs-sm); }
.tile-meta { display: flex; align-items: center; gap: var(--sp-3); flex-wrap: wrap; color: var(--muted); font-size: var(--fs-xs); margin-top: auto; padding-top: 6px; }
.tile-meta span { display: inline-flex; align-items: center; gap: 5px; }
/* the progress bar belongs to the footer, not to the title: titles wrap to one,
   two or three lines, and the bar used to float wherever the title ended */
.tile > .bar { margin-top: auto; }
.tile > .bar + .tile-meta { margin-top: 0; }

/* Course and subject overviews list a chapter's topics as full-width rows.
   As a grid, a chapter holding one topic left three empty columns beside it. */
.tile-rows { display: flex; flex-direction: column; gap: var(--sp-2); }
.tile-rows .tile {
    flex-flow: row wrap;
    align-items: center;
    gap: 7px var(--sp-4);
    padding: 12px var(--sp-4);
}
.tile-rows .tile-title { order: 1; flex: 1 1 220px; font-size: var(--fs-sm); }
.tile-rows .tile > .row-gap { order: 2; flex: none; }
.tile-rows .tile > .bar { order: 3; flex: 0 0 84px; margin-top: 0; }
.tile-rows .tile-meta { order: 4; flex: none; margin-top: 0; padding-top: 0; }
.tile-rows .tile-desc { order: 5; flex: 1 1 100%; }
.tile-rows .tile:hover { transform: none; }

@media (max-width: 560px) {
    .tile-rows .tile-title { flex-basis: 100%; }
    .tile-rows .bar { flex-basis: 100%; }
}

/* ---------------------------------------------------------- unit block */

.unit {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    margin-bottom: var(--sp-4);
    overflow: hidden;
}
.unit__head {
    display: flex;
    align-items: center;
    gap: var(--sp-4);
    padding: var(--sp-4) var(--sp-5);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}
.unit__n {
    width: 34px;
    height: 34px;
    flex: none;
    border-radius: 11px;
    display: grid;
    place-items: center;
    font-family: var(--font-mono);
    font-size: 14px;
    font-weight: 800;
    color: var(--primary);
    background: var(--primary-soft);
    box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--primary) 22%, transparent);
}
.unit__id { flex: 1 1 auto; min-width: 0; }
.unit__title {
    font-size: var(--fs-md);
    font-weight: 750;
    line-height: 1.3;
    color: var(--text-strong);
}
.unit__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px var(--sp-3);
    margin: 3px 0 0;
    font-size: var(--fs-xs);
    color: var(--muted);
}
.unit__meta span { display: inline-flex; align-items: center; gap: 5px; }
.unit__prog {
    flex: none;
    display: flex;
    align-items: center;
    gap: 9px;
    font-size: var(--fs-xs);
    color: var(--muted);
}
.unit__prog .bar { width: 74px; }
.unit__none { margin: 0; padding: var(--sp-4) var(--sp-5); font-size: var(--fs-sm); color: var(--muted); }

.unit__list {
    list-style: none;
    margin: 0;
    padding: var(--sp-3) var(--sp-4);
}
.chap + .chap { margin-top: var(--sp-2); }

/* a chapter holding more than one topic keeps its name as a group label, and
   the rail makes the topics under it read as its children */
.chap__head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: 4px 2px 7px;
}
.chap__name {
    font-size: var(--fs-sm);
    font-weight: 700;
    color: var(--text-strong);
}
.chap__name:hover { color: var(--primary); }
.chap__head + .tile-rows {
    margin-left: 11px;
    padding-left: 13px;
    border-left: 2px solid var(--border);
}

.chap--empty {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--sp-3);
    padding: 11px var(--sp-4);
    border: 1px dashed var(--border);
    border-radius: var(--radius-sm);
}
.chap--empty .chap__name { color: var(--muted); font-weight: 600; }

@media (max-width: 560px) {
    .unit__head { flex-wrap: wrap; gap: var(--sp-3); padding: var(--sp-4); }
    .unit__prog { width: 100%; justify-content: space-between; }
    .unit__prog .bar { flex: 1 1 auto; width: auto; }
    .unit__list { padding: var(--sp-3); }
    .chap__head + .tile-rows { margin-left: 0; padding-left: 9px; }
}

/* stat card */
.stat {
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: var(--sp-4) var(--sp-5);
    display: flex;
    align-items: center;
    gap: var(--sp-4);
}
.stat-ico {
    width: 42px; height: 42px;
    border-radius: 12px;
    display: grid; place-items: center;
    background: var(--primary-soft);
    color: var(--primary);
    flex: none;
}
/* The figure and its label are a stack, not a sentence. Left as inline spans
   they butted together and read as "1Day streak" / "1h 38mTotal learning time". */
.stat > span:not(.stat-ico) {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex: 1 1 auto;
    min-width: 0;
}
.stat-num { display: block; font-size: var(--fs-xl); font-weight: 800; line-height: 1.15; letter-spacing: -.02em; }
.stat-label { display: block; font-size: var(--fs-xs); color: var(--muted); font-weight: 600; line-height: 1.35; }
/* the goal bar follows the column instead of a fixed width — 110px pushed the
   card past the viewport on a phone */
.stat .bar { display: block; width: 100%; max-width: 130px; }
.stat--info  .stat-ico { background: var(--info-soft);    color: var(--info); }
.stat--ok    .stat-ico { background: var(--success-soft); color: var(--success); }
.stat--warn  .stat-ico { background: var(--warning-soft); color: var(--warning); }
.stat--violet .stat-ico { background: var(--violet-soft); color: var(--violet); }
.stat--teal  .stat-ico { background: var(--teal-soft);    color: var(--teal); }

/* compact figure strip — wraps to 2-up on a phone instead of a tall column */
.stat-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
    gap: var(--sp-3);
}
.stat-strip > div {
    background: rgba(255, 255, 255, .1);
    border: 1px solid rgba(255, 255, 255, .15);
    border-radius: var(--radius);
    padding: 12px 14px;
    min-width: 0;
}
.stat-strip .k {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, .74);
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
}
.stat-strip .k span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stat-strip .v {
    font-size: var(--fs-xl);
    font-weight: 800;
    color: #fff;
    line-height: 1.15;
    margin-top: 3px;
    letter-spacing: -.02em;
}

/* ---------------------------------------------------------- badges & chips */

.badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 3px 9px;
    border-radius: var(--radius-pill);
    font-size: 11.5px;
    font-weight: 700;
    background: var(--surface-3);
    color: var(--muted);
    letter-spacing: .01em;
    white-space: nowrap;
}
.badge--primary { background: var(--primary-soft); color: var(--primary-dark); }
.badge--ok      { background: var(--success-soft); color: var(--success); }
.badge--warn    { background: var(--warning-soft); color: var(--warning); }
.badge--danger  { background: var(--danger-soft);  color: var(--danger); }
.badge--info    { background: var(--info-soft);    color: var(--info); }
.badge--violet  { background: var(--violet-soft);  color: var(--violet); }
.badge--outline { background: transparent; border: 1px solid var(--border-strong); color: var(--muted); }

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    height: 32px;
    padding: 0 13px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border);
    background: var(--surface-2);
    color: var(--muted);
    font-size: var(--fs-xs);
    font-weight: 650;
    cursor: pointer;
    transition: all var(--t-fast);
}
.chip:hover { border-color: var(--border-strong); color: var(--text); }
.chip.is-active { background: var(--primary); border-color: var(--primary); color: #fff; }

.avatar {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: grid; place-items: center;
    background: linear-gradient(140deg, var(--primary), var(--primary-dark));
    color: #fff;
    font-weight: 700;
    font-size: var(--fs-xs);
    flex: none;
    overflow: hidden;
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--lg { width: 64px; height: 64px; font-size: var(--fs-lg); }

/* ---------------------------------------------------------- progress */

.bar {
    height: 7px;
    border-radius: var(--radius-pill);
    background: var(--surface-3);
    overflow: hidden;
}
.bar > i {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, var(--primary), #ff5a5f);
    transition: width .5s var(--ease);
}
.bar--ok > i { background: linear-gradient(90deg, var(--success), #34d399); }

.ring { --p: 0; width: 56px; height: 56px; position: relative; flex: none; }
.ring::before {
    content: "";
    position: absolute; inset: 0;
    border-radius: 50%;
    background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--surface-3) 0);
    mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
    -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 7px), #000 calc(100% - 6px));
}
.ring span {
    position: absolute; inset: 0;
    display: grid; place-items: center;
    font-size: var(--fs-xs);
    font-weight: 800;
}

/* ---------------------------------------------------------- tables */

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface-2);
}
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--fs-sm);
    min-width: 560px;
}
.table th, .table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid var(--border);
    vertical-align: middle;
}
.table th {
    background: var(--bg-soft);
    font-size: var(--fs-xs);
    font-weight: 700;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .05em;
    white-space: nowrap;
    position: sticky;
    top: 0;
    z-index: 2;
}
.table tbody tr:last-child td { border-bottom: 0; }
.table tbody tr:hover { background: var(--bg-soft); }
.table .cell-actions { text-align: right; white-space: nowrap; }
.table .cell-num { font-variant-numeric: tabular-nums; }

.table-scroll { overflow-x: auto; }
.card-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .95em;
    min-width: 360px;
}
.card-table th, .card-table td {
    padding: 9px 12px;
    border: 1px solid var(--border);
    text-align: left;
}
.card-table th { background: var(--surface); font-weight: 700; font-size: .9em; }
.card-table tbody tr:nth-child(even) { background: var(--bg-soft); }

/* ---------------------------------------------------------- empty / loading */

.empty {
    text-align: center;
    padding: var(--sp-9) var(--sp-5);
    color: var(--muted);
}
.empty-ico {
    width: 58px; height: 58px;
    margin: 0 auto var(--sp-4);
    border-radius: 18px;
    display: grid; place-items: center;
    background: var(--surface);
    color: var(--muted-2);
}
.empty h3 { font-size: var(--fs-md); margin-bottom: 6px; color: var(--text); }
.empty p { max-width: 44ch; margin: 0 auto; font-size: var(--fs-sm); }

.skeleton {
    background: linear-gradient(90deg, var(--surface) 25%, var(--surface-3) 37%, var(--surface) 63%);
    background-size: 400% 100%;
    animation: shimmer 1.3s infinite linear;
    border-radius: var(--radius-sm);
}
@keyframes shimmer { 0% { background-position: 100% 0; } 100% { background-position: -100% 0; } }

.spinner {
    width: 17px; height: 17px;
    border: 2px solid currentColor;
    border-right-color: transparent;
    border-radius: 50%;
    animation: spin .7s linear infinite;
    display: inline-block;
    flex: none;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------- modal */

.modal {
    position: fixed;
    inset: 0;
    z-index: 200;
    display: none;
    align-items: center;
    justify-content: center;
    padding: var(--sp-5);
}
.modal.is-open { display: flex; }
.modal-backdrop {
    position: absolute;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: blur(3px);
    animation: fadeIn .16s var(--ease);
}
.modal-panel {
    position: relative;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    width: min(620px, 100%);
    max-height: min(88vh, 900px);
    display: flex;
    flex-direction: column;
    animation: popIn .18s var(--ease);
}
.modal-panel--wide { width: min(980px, 100%); }
.modal-head {
    padding: var(--sp-5) var(--sp-5) var(--sp-4);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: var(--sp-3);
}
.modal-head h3 { margin: 0; font-size: var(--fs-lg); }
.modal-body { padding: var(--sp-5); overflow-y: auto; }
.modal-foot {
    padding: var(--sp-4) var(--sp-5);
    border-top: 1px solid var(--border);
    display: flex;
    justify-content: flex-end;
    gap: var(--sp-3);
    background: var(--bg-soft);
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes popIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }

/* ---------------------------------------------------------- toast */

.toasts {
    position: fixed;
    right: var(--sp-5);
    bottom: var(--sp-5);
    z-index: 300;
    display: flex;
    flex-direction: column;
    gap: 10px;
    pointer-events: none;
}
.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 250px;
    max-width: 380px;
    padding: 12px 15px;
    border-radius: var(--radius-sm);
    background: var(--surface-2);
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    font-size: var(--fs-sm);
    font-weight: 600;
    pointer-events: auto;
    animation: toastIn .22s var(--ease);
}
.toast--ok    { border-left: 3px solid var(--success); }
.toast--error { border-left: 3px solid var(--danger); }
.toast--info  { border-left: 3px solid var(--info); }
.toast--warn  { border-left: 3px solid var(--warning); }
.toast svg { flex: none; }
.toast--ok svg { color: var(--success); }
.toast--error svg { color: var(--danger); }
.toast--info svg { color: var(--info); }
.toast--warn svg { color: var(--warning); }
.toast.is-out { animation: toastOut .2s var(--ease) forwards; }
@keyframes toastIn  { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateX(20px); } }

/* ---------------------------------------------------------- alerts */

.alert {
    display: flex;
    gap: 11px;
    padding: 13px 15px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    border: 1px solid transparent;
    margin-bottom: var(--sp-4);
}
.alert svg { flex: none; margin-top: 1px; }
.alert--ok    { background: var(--success-soft); color: var(--success); border-color: color-mix(in srgb, var(--success) 22%, transparent); }
.alert--error { background: var(--danger-soft);  color: var(--danger);  border-color: color-mix(in srgb, var(--danger) 22%, transparent); }
.alert--warn  { background: var(--warning-soft); color: var(--warning); border-color: color-mix(in srgb, var(--warning) 22%, transparent); }
.alert--info  { background: var(--info-soft);    color: var(--info);    border-color: color-mix(in srgb, var(--info) 22%, transparent); }

/* ---------------------------------------------------------- tabs */

.tabs {
    display: flex;
    gap: 2px;
    border-bottom: 1px solid var(--border);
    overflow-x: auto;
}
.tabs button {
    border: 0;
    background: transparent;
    padding: 11px 15px;
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -1px;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: color var(--t-fast), border-color var(--t-fast);
}
.tabs button:hover { color: var(--text); }
.tabs button.is-active { color: var(--primary); border-bottom-color: var(--primary); }

.tabpanel { display: none; }
.tabpanel.is-active { display: block; }

/* ---------------------------------------------------------- dropdown */

.dropdown { position: relative; }
.dropdown-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 8px);
    min-width: 210px;
    background: var(--surface-2);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 90;
    display: none;
    animation: popIn .14s var(--ease);
}
.dropdown.is-open .dropdown-menu { display: block; }
.dropdown-menu a, .dropdown-menu button {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 9px 11px;
    border: 0;
    background: transparent;
    border-radius: 9px;
    color: var(--text);
    font-size: var(--fs-sm);
    font-weight: 600;
    cursor: pointer;
    text-align: left;
}
.dropdown-menu a:hover, .dropdown-menu button:hover { background: var(--surface); color: var(--text); }
.dropdown-menu hr { margin: 6px 4px; }
.dropdown-head { padding: 10px 11px 8px; border-bottom: 1px solid var(--border); margin-bottom: 5px; }

/* ---------------------------------------------------------- misc */

.divider-text {
    display: flex;
    align-items: center;
    gap: var(--sp-3);
    color: var(--muted-2);
    font-size: var(--fs-xs);
    margin: var(--sp-4) 0;
}
.divider-text::before, .divider-text::after {
    content: "";
    flex: 1;
    height: 1px;
    background: var(--border);
}

.kbd {
    display: inline-block;
    padding: 2px 6px;
    border: 1px solid var(--border-strong);
    border-bottom-width: 2px;
    border-radius: 6px;
    background: var(--surface);
    font-family: var(--font-mono);
    font-size: 11px;
    color: var(--muted);
}

.lock-note {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: var(--radius-sm);
    background: linear-gradient(100deg, var(--primary-soft), var(--surface));
    border: 1px dashed color-mix(in srgb, var(--primary) 35%, transparent);
    font-size: var(--fs-sm);
    color: var(--primary-dark);
    font-weight: 600;
}

.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin-top: var(--sp-6);
    flex-wrap: wrap;
}
.pager a, .pager span {
    min-width: 38px;
    height: 38px;
    padding: 0 10px;
    display: inline-grid;
    place-items: center;
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    font-weight: 650;
    color: var(--muted);
    background: var(--surface-2);
}
.pager a:hover { border-color: var(--primary); color: var(--primary); }
.pager .is-current { background: var(--primary); border-color: var(--primary); color: #fff; }
