/* Fonts served from this site (SIL Open Font License): Inter for text, Source Serif 4 for page titles. */
@font-face { font-family: "Inter"; font-style: normal; font-weight: 100 900; font-display: swap; src: url("/assets/fonts/inter-latin-wght-normal.woff2") format("woff2"); }
@font-face { font-family: "Source Serif 4"; font-style: normal; font-weight: 200 900; font-display: swap; src: url("/assets/fonts/source-serif-4-latin-wght-normal.woff2") format("woff2"); }
:root {
  --ibl: #38A1E5;
  --ibl-indigo: #7284FF;
  --accent: #0078FF;
  --page-bg: #f5f7fa;
  --title-color: #4E5460;
  --text-muted: #6b7280;
  --text-faint: #9ca3af;
  --card-bg: #F5F8FF;
  --card-border: rgba(115, 185, 255, 0.3);
  --card-radius: 0.8rem;
  --card-shadow: 0 0.125rem 1.25rem 0.3125rem rgba(115, 185, 255, 0.23);
  --btn-radius: 0.4375rem;
  --btn-primary-from: #BACEFF;
  --btn-primary-to: #0078FF;
  --btn-primary-hover-from: #A9BDFF;
  --btn-primary-hover-to: #0069E0;
  --input-border: #e5e7eb;
  --control-h: 3.25rem;
  --control-font: 1.0625rem;
  --card-pad: 1.625rem;
  --stack-gap: 1.125rem;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --ok: #15803d;
  --bad: #b91c1c;
  --warn: #b45309;
  --white: #ffffff;
  --border: #e5e7eb;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: var(--page-bg); color: var(--title-color); font: 16px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
a { color: var(--accent); }
h1 { margin: 0; font-size: 1.4rem; font-weight: 600; }
h2 { font-size: 1.1rem; font-weight: 600; }

/* ---------- top-level layout ---------- */
.page { min-height: 100dvh; display: flex; flex-direction: column; align-items: center; padding: 1.5rem 1rem 3rem; }
/* Hero block: values copied from the memorare support/LMS sign-in pages so all apps look identical. */
.brand-row { display: flex; flex-direction: row; align-items: center; justify-content: center; gap: 15px; margin: 1.5rem 0 2rem; }
.brand-mark { display: block; object-fit: contain; flex-shrink: 0; height: 64px; width: auto; }
.brand-wordmark { display: inline-flex; flex-direction: column; align-items: flex-start; line-height: 1; min-width: 0; }
.brand-top, .brand-bottom { white-space: nowrap; text-transform: lowercase; letter-spacing: -0.025em; line-height: 1; background-repeat: no-repeat; background-clip: text; -webkit-background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.brand-top { font-size: 2.539rem; font-weight: 400; background-image: linear-gradient(90deg, #00a4ec 0%, #159bf4 30%, #4e91fe 62%, #6d87ff 100%); }
.brand-bottom { font-size: 2.998rem; font-weight: 600; margin-top: -0.19em; padding-bottom: 0.06em; background-image: linear-gradient(90deg, #00a4ec 0%, #159bf4 22%, #4e91fe 58%, #6d87ff 90%, #6d87ff 100%); }
@media (max-width: 767px) { .brand-mark { height: 47px; } .brand-row { gap: 11px; } .brand-top { font-size: 1.874rem; } .brand-bottom { font-size: 2.212rem; } }
@media (max-width: 639px) { .brand-row { margin-bottom: 1.75rem; } }
@media (max-width: 400px) { .brand-mark { height: 40px; } .brand-row { gap: 9px; } .brand-top { font-size: 1.6rem; } .brand-bottom { font-size: 1.88rem; } }
.brand-name { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.brand-name b { background: linear-gradient(to right, var(--ibl), var(--ibl-indigo)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.hero-text { display: flex; flex-direction: column; align-items: center; text-align: center; margin: 0 0 2.75rem; }
.hero-title { font-size: clamp(1.5rem, 1.1rem + 2.5vw, 2.375rem); font-weight: 400; line-height: 1.25; margin: 0 auto 0.375rem; color: #4e5460; }
.hero-sub { font-size: clamp(0.875rem, 0.65rem + 0.9vw, 1.25rem); line-height: 1.35; max-width: 42rem; margin: 0 auto; padding: 0 0.25rem; text-wrap: balance; color: #6b7280; }
.tagline { color: var(--text-muted); text-align: center; max-width: 30rem; margin: 0 0 1.75rem; font-size: 0.95rem; }

/* ---------- card ---------- */
.card { width: 100%; max-width: 34rem; padding: var(--card-pad); border-radius: var(--card-radius); border: 1px solid var(--card-border); background: var(--card-bg); box-shadow: var(--card-shadow); }
.card.wide { max-width: 44rem; }
.card-stack { display: flex; flex-direction: column; gap: var(--stack-gap); }

/* ---------- form controls ---------- */
label.field { display: block; font-weight: 500; font-size: 0.875rem; line-height: 1.5rem; color: var(--title-color); }
label.field span { display: block; margin-bottom: 0.25rem; }
.input, select.input {
  width: 100%; height: var(--control-h); min-height: var(--control-h); padding: 0 0.875rem;
  font-size: var(--control-font); line-height: 1.5rem; font-family: inherit; color: var(--title-color); box-shadow: 0 1px 2px rgba(0,0,0,.05);
  background: #fff; border: 1px solid var(--input-border); border-radius: var(--btn-radius); outline: none;
}
.input::placeholder { color: #9ca3af; opacity: 1; }
.input:focus, select.input:focus { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(0, 120, 255, 0.15); }
.btn {
  display: flex; align-items: center; justify-content: center; gap: 0.4rem; width: 100%;
  height: var(--control-h); min-height: var(--control-h); font-size: var(--control-font); line-height: 1.5; font-weight: 600;
  font-family: inherit; border-radius: var(--btn-radius); cursor: pointer; border: 0; transition: background .15s, border-color .15s;
  text-decoration: none; box-sizing: border-box;
}
a.btn--outline { color: #374151; }
.btn--primary { color: #fff; background: linear-gradient(to right, var(--btn-primary-from), var(--btn-primary-to)); }
.btn--primary:hover { background: linear-gradient(to right, var(--btn-primary-hover-from), var(--btn-primary-hover-to)); }
.btn--outline { font-weight: 500; color: #374151; background: #fff; border: 1px solid #e5e7eb; }
.btn--outline:hover { background: #fafafa; border-color: #d1d5db; }
.btn--danger { color: #fff; background: var(--bad); }
.btn--danger:hover { background: #9f1414; }
.btn--sm { height: 2.25rem; min-height: 2.25rem; width: auto; padding: 0 0.9rem; font-size: 0.85rem; }
.btn-row { display: flex; gap: 0.6rem; }
.btn-row .btn { flex: 1; }
.error-msg { color: var(--bad); font-weight: 600; font-size: 0.9rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: 0.5rem; padding: 0.6rem 0.8rem; }
.ok-msg { color: var(--ok); font-weight: 600; font-size: 0.9rem; background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: 0.5rem; padding: 0.6rem 0.8rem; }
.legal { text-align: center; font-size: clamp(0.625rem, 0.5rem + 0.35vw, 0.8125rem); color: var(--text-muted); }
.legal a { color: inherit; text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.card .legal { margin: 1.375rem 0 0; }
.legal .sep { margin: 0 0.5rem; }

/* ---------- admin shell ---------- */
.shell-header {
  width: 100%; max-width: 90rem; display: flex; justify-content: space-between; align-items: center;
  gap: 12px; flex-wrap: wrap; padding: 0.75rem 0 1.25rem;
}
.shell-header .brand-row { margin: 0; gap: 9px; }
.shell-header .brand-mark { height: 36px; }
.shell-header .brand-top { font-size: 1.3rem; }
.shell-header .brand-bottom { font-size: 1.55rem; }
.shell-header .brand-name { font-size: 1.15rem; }
.shell-main { width: 100%; max-width: 90rem; }
.who-row { display: flex; align-items: center; gap: 0.75rem; font-size: 0.88rem; color: var(--text-muted); }

/* ---------- filters / table ---------- */
.filters { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.filters input, .filters select { width: auto; min-width: 220px; height: 2.5rem; min-height: 2.5rem; }
.filters input[name=q] { min-width: 22rem; }
.filters button { width: auto; height: 2.5rem; min-height: 2.5rem; padding: 0 1.1rem; }
.count { color: var(--text-muted); font-size: 0.88rem; margin: 0 0 0.6rem; }
.table-card { overflow-x: auto; background: #fff; border: 1px solid var(--border); border-radius: 0.8rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
table { border-collapse: collapse; width: 100%; font-size: 0.88rem; }
th, td { padding: 0.75rem 0.7rem; text-align: left; border-bottom: 1px solid var(--border); white-space: nowrap; }
th { color: var(--text-muted); font-weight: 600; font-size: 0.8rem; text-transform: uppercase; letter-spacing: .03em; background: #fafbfc; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafcff; }
td.wrap { white-space: normal; min-width: 12rem; }
/* The revoke form stays in view even when the table has to scroll sideways on a narrow screen. */
th.actions, td.actions { position: sticky; right: 0; background: #fff; box-shadow: -1px 0 0 var(--border); }
th.actions { background: #fafbfc; }
tbody tr:hover td.actions { background: #fafcff; }
form.row-form { display: flex; gap: 0.5rem; align-items: center; }
form.row-form input { width: 9.5rem; min-width: 0; height: 2.1rem; min-height: 2.1rem; font-size: 0.82rem; }
.pager { display: flex; gap: 1rem; margin-top: 1rem; font-size: 0.88rem; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 0.3rem; padding: 0.2rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 700; background: #e5e7eb; }
.badge.valid { background: #dcfce7; color: var(--ok); }
.badge.revoked, .badge.invalid { background: #fee2e2; color: var(--bad); }
.badge.expired, .badge.not_yet_valid { background: #fef3c7; color: var(--warn); }
.badge.big { font-size: 1.05rem; padding: 0.45rem 1.25rem; }

/* ---------- verify page ---------- */
.verify-head { display: flex; flex-direction: column; align-items: center; gap: 0.75rem; text-align: center; margin-bottom: 1.4rem; }
.verify-head .icon { width: 3.25rem; height: 3.25rem; border-radius: 999px; display: flex; align-items: center; justify-content: center; font-size: 1.6rem; }
.verify-head .icon.valid { background: #dcfce7; color: var(--ok); }
.verify-head .icon.revoked, .verify-head .icon.invalid { background: #fee2e2; color: var(--bad); }
.verify-head .icon.expired, .verify-head .icon.not_yet_valid { background: #fef3c7; color: var(--warn); }
dl.kv { display: grid; grid-template-columns: max-content 1fr; gap: 0.5rem 1.1rem; font-size: 0.92rem; margin: 0; }
dl.kv dt { color: var(--text-muted); }
dl.kv dd { margin: 0; font-weight: 500; }
.checks { list-style: none; padding: 0; margin: 0.6rem 0 0; font-size: 0.88rem; }
.checks li { padding: 0.28rem 0; display: flex; align-items: center; gap: 0.5rem; }
.checks li.ok::before { content: "\2713"; color: var(--ok); font-weight: 700; width: 1.1rem; text-align: center; }
.checks li.bad::before { content: "\2717"; color: var(--bad); font-weight: 700; width: 1.1rem; text-align: center; }

/* ---------- consent screen ---------- */
.consent-app { display: flex; align-items: center; gap: 0.75rem; margin-bottom: 0.4rem; }
.consent-app img { width: 2.75rem; height: 2.75rem; border-radius: 0.6rem; object-fit: cover; border: 1px solid var(--border); }
.consent-app .host { color: var(--text-muted); font-size: 0.85rem; }
.scope-list { list-style: none; padding: 0; margin: 0.8rem 0; display: flex; flex-direction: column; gap: 0.5rem; }
.scope-list li { display: flex; align-items: flex-start; gap: 0.6rem; font-size: 0.92rem; }
.scope-list li::before { content: "\2713"; color: var(--accent); font-weight: 700; flex-shrink: 0; margin-top: 0.1rem; }

/* ---------- misc ---------- */
/* Inline style attributes are blocked by our CSP, so spacing lives in classes. */
.page-title { margin-bottom: 1rem; }
.flash { margin-bottom: 1rem; }
p.lead { margin: 0 0 0.6rem; }
.section-title.gap-top { margin-top: 1.2rem; }
.muted { color: var(--text-muted); }
.center { text-align: center; }
.section-title { font-size: 0.8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--text-muted); margin: 0 0 0.5rem; }

/* ---------- small screens ---------- */
@media (max-width: 900px) {
  .filters input, .filters select, .filters input[name=q] { min-width: 0; flex: 1 1 12rem; }
}
@media (max-width: 900px) {
  /* Each credential becomes its own card instead of a wide table that scrolls sideways. */
  .table-card { overflow: visible; background: none; border: 0; box-shadow: none; }
  table, tbody { display: block; }
  thead { display: none; }
  tbody tr { display: block; background: #fff; border: 1px solid var(--border); border-radius: 0.8rem; padding: 0.4rem 0.9rem 0.9rem; margin-bottom: 0.75rem; box-shadow: 0 1px 2px rgba(16,24,40,.04); }
  tbody tr:hover { background: #fff; }
  td { display: flex; justify-content: space-between; align-items: center; gap: 1rem; white-space: normal; text-align: right; padding: 0.55rem 0; border-bottom: 1px solid var(--border); }
  td::before { content: attr(data-label); color: var(--text-muted); font-size: 0.75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; text-align: left; flex-shrink: 0; }
  td.wrap { min-width: 0; }
  tbody tr:last-child td { border-bottom: 1px solid var(--border); }
  tbody tr td:last-child { border-bottom: 0; padding-bottom: 0; }
  td.actions { position: static; box-shadow: none; background: none; display: block; text-align: left; padding-top: 0.75rem; }
  td.actions::before { display: block; margin-bottom: 0.4rem; }
  tbody tr:hover td.actions { background: none; }
  form.row-form { width: 100%; }
  form.row-form input { flex: 1; width: auto; min-width: 0; }
  td.empty { display: block; text-align: center; }
}
@media (max-width: 640px) {
  .page { padding: 1rem 0.85rem 2.5rem; }
  .card { padding: 1.25rem; }
  .shell-header { padding: 0.5rem 0 1rem; }
  .who-row { width: 100%; justify-content: space-between; font-size: 0.82rem; min-width: 0; }
  .who-row span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .btn-row { flex-direction: column; }
  dl.kv { grid-template-columns: 1fr; gap: 0.1rem 0; }
  dl.kv dt { margin-top: 0.6rem; }
}

/* ---------- app shell: memorare sidebar ---------- */
.app { display: flex; min-height: 100dvh; }
.nav-toggle { position: absolute; opacity: 0; pointer-events: none; }
.sidebar { width: 15rem; flex-shrink: 0; position: sticky; top: 0; height: 100dvh; display: flex; flex-direction: column; background: var(--card-bg); border-right: 1px solid var(--card-border); padding: 0.9rem 0.75rem; }
.sidebar-top { display: flex; align-items: center; justify-content: space-between; padding: 0.25rem 0.4rem 1rem; }
.side-brand { display: flex; align-items: center; gap: 8px; text-decoration: none; min-width: 0; }
.side-mark { width: 34px; height: 34px; object-fit: contain; flex-shrink: 0; }
.side-word { display: flex; flex-direction: column; line-height: 1; letter-spacing: -0.025em; }
.side-word span, .side-word b { background-image: linear-gradient(90deg, #00a4ec, #4e91fe 62%, #6d87ff); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; }
.side-word span { font-size: 1.05rem; font-weight: 400; }
.side-word b { font-size: 1.25rem; font-weight: 600; margin-top: -2px; }
.nav-burger { display: none; cursor: pointer; color: var(--title-color); padding: 0.35rem; border-radius: 0.5rem; }
.side-nav { display: flex; flex-direction: column; gap: 2px; }
.nav-item { display: flex; align-items: center; gap: 0.65rem; padding: 0.55rem 0.7rem; border-radius: 0.55rem; color: var(--text-muted); text-decoration: none; font-size: 0.92rem; font-weight: 500; }
.nav-item:hover { background: rgba(0, 120, 255, 0.07); color: var(--title-color); }
.nav-item.is-active { background: rgba(0, 120, 255, 0.12); color: var(--accent); }
.nav-item .ico { flex-shrink: 0; }
.sidebar-foot { margin-top: auto; border-top: 1px solid var(--card-border); padding-top: 0.75rem; }
.profile { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; color: var(--title-color); min-width: 0; flex-wrap: wrap; }
a.profile { padding: 0.4rem; border-radius: 0.55rem; flex-wrap: nowrap; }
a.profile:hover { background: rgba(0, 120, 255, 0.07); }
.avatar { width: 2rem; height: 2rem; border-radius: 0.55rem; background: #dbe7ff; color: var(--accent); display: inline-flex; align-items: center; justify-content: center; font-size: 0.75rem; font-weight: 700; flex-shrink: 0; }
.profile-text { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.2; }
.profile-text b { font-size: 0.85rem; font-weight: 600; }
.profile-text small { font-size: 0.75rem; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.profile-menu { position: relative; }
.profile-menu > summary { list-style: none; cursor: pointer; padding: 0.4rem; border-radius: 0.55rem; flex-wrap: nowrap; }
.profile-menu > summary::-webkit-details-marker { display: none; }
.profile-menu > summary:hover, .profile-menu[open] > summary { background: rgba(0, 120, 255, 0.07); }
.profile-pop { position: absolute; left: 0; right: 0; bottom: calc(100% + 0.5rem); background: #fff; border: 1px solid var(--card-border); border-radius: 0.7rem; box-shadow: var(--card-shadow); padding: 0.35rem; z-index: 10; }
.pop-item { display: flex; align-items: center; gap: 0.65rem; width: 100%; padding: 0.6rem 0.7rem; border: 0; background: none; border-radius: 0.5rem; font: inherit; font-size: 0.92rem; font-weight: 500; color: var(--title-color); cursor: pointer; text-align: left; }
.pop-item:hover { background: rgba(0, 120, 255, 0.07); }
.app-main { flex: 1; min-width: 0; padding: 2rem 1.75rem 3rem; display: flex; justify-content: center; }
.app-content { width: 100%; max-width: 44rem; }
.app-content--wide { max-width: 90rem; }
.app-content > .card { max-width: none; }

/* collapse button + collapsed (icons only) sidebar, desktop only.
   Icons keep exactly the same position in both states (padding is fixed, only the width changes),
   so the sidebar slides and the labels fade instead of everything jumping. */
.sidebar { transition: width 0.26s cubic-bezier(0.4, 0, 0.2, 1); }
.sidebar-top { padding-left: 7px; }
.side-brand { overflow: hidden; }
.nav-item { padding-left: 15px; overflow: hidden; white-space: nowrap; }
.profile-menu > summary { padding: 0.4rem 0.5rem; overflow: hidden; }
.side-word, .nav-item span, .profile-text { white-space: nowrap; transition: opacity 0.18s ease 0.1s; }
.side-collapse { position: absolute; top: 1.2rem; right: -1rem; z-index: 6; display: inline-flex; align-items: center; justify-content: center; width: 2rem; height: 2rem; border-radius: 0.5rem; border: 1px solid #e5e7eb; background: #fff; color: #4b5563; box-shadow: 0 1px 2px rgba(16, 24, 40, 0.05); transition: color 0.15s, border-color 0.15s; }
.side-collapse:hover { color: var(--accent); border-color: var(--accent); }
.side-collapse .ico { width: 16px; height: 16px; transition: transform 0.26s cubic-bezier(0.4, 0, 0.2, 1); }
.app--collapsed .sidebar { width: 4.5rem; }
.app--collapsed .side-word, .app--collapsed .nav-item span, .app--collapsed .profile-text { opacity: 0; pointer-events: none; transition: opacity 0.1s ease; }
.app--collapsed .side-collapse .ico { transform: rotate(180deg); }
.app--collapsed .profile-pop { right: auto; width: 13rem; }
@media (prefers-reduced-motion: reduce) {
  .sidebar, .side-collapse .ico, .side-word, .nav-item span, .profile-text { transition: none; }
}

@media (max-width: 900px) {
  .side-collapse { display: none; }
  .app--collapsed .sidebar { width: 100%; }
  .app--collapsed .side-word, .app--collapsed .nav-item span, .app--collapsed .profile-text { opacity: 1; pointer-events: auto; }
  .sidebar { transition: none; }
  .sidebar-top { padding-left: 0; }
  .app { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: sticky; z-index: 5; flex-direction: column; padding: 0.5rem 0.85rem; border-right: 0; border-bottom: 1px solid var(--card-border); }
  .sidebar-top { padding: 0.15rem 0; }
  .nav-burger { display: inline-flex; }
  .side-nav, .sidebar-foot { display: none; }
  .nav-toggle:checked ~ .sidebar .side-nav, .nav-toggle:checked ~ .sidebar .sidebar-foot { display: flex; }
  .sidebar-foot { flex-direction: column; margin-top: 0.5rem; }
  .profile-pop { position: static; margin-top: 0.4rem; box-shadow: none; }
  .sidebar { max-height: 100dvh; overflow-y: auto; }
  .side-nav { padding-top: 0.25rem; }
  .app-main { padding: 1.25rem 0.85rem 2.5rem; }
}

/* ---------- public pages (no sidebar) ---------- */
.public-content { width: 100%; max-width: 34rem; display: flex; flex-direction: column; align-items: center; }
.public-content--wide { max-width: 44rem; }
.public-content > .card { max-width: none; }
.back-link { align-self: flex-start; display: inline-flex; align-items: center; gap: 0.35rem; margin: 0 0 0.75rem; color: var(--text-muted); text-decoration: none; font-size: 0.9rem; font-weight: 500; }
.back-link:hover { color: var(--accent); }

/* consent screen spacing: no stray paragraph margins inside the stacked card */
.consent-app p { margin: 0.2rem 0 0; font-size: 0.9rem; }
.card-stack > p { margin: 0; }

/* revoke confirmation + notices */
.app-content > .card.narrow { max-width: 34rem; margin: 1rem auto 0; }
.card.narrow h1 { margin-bottom: 0.9rem; }
.card.narrow .btn-row { margin-top: 1.1rem; }
.confirm-kv dd { word-break: break-word; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 0.85rem; }
.warn-msg { color: var(--bad); font-weight: 600; font-size: 0.92rem; background: #fef2f2; border: 1px solid #fecaca; border-radius: 0.5rem; padding: 0.65rem 0.85rem; margin: 1.1rem 0 0; }

.or-divider { text-align: center; color: var(--text-muted); font-size: 0.9rem; }

/* organisations + API keys pages */
.section-h { font-size: 1.05rem; font-weight: 600; margin: 1.75rem 0 0.35rem; }
.lead { margin: 0 0 0.9rem; font-size: 0.92rem; }
.crumbs { margin: 0 0 0.5rem; font-size: 0.9rem; }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.card.section { max-width: none; margin-top: 0.9rem; }
.form-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 0.9rem 1rem; align-items: end; }
.form-grid .btn { width: auto; justify-self: start; padding: 0 1.4rem; }
.secret { word-break: break-all; background: #fff; border: 1px solid var(--border); border-radius: 0.5rem; padding: 0.75rem 0.9rem; font-size: 0.95rem; user-select: all; }
td.actions form { margin: 0; }
@media (max-width: 900px) { .form-grid .btn { width: 100%; } }

/* learner pages: My credentials */
.count-line { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--text-muted); }
.cred-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); gap: 1rem; }
.cred-card { display: flex; flex-direction: column; gap: 0.35rem; padding: 1.1rem 1.15rem; background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; text-decoration: none; color: inherit; transition: border-color 0.15s, box-shadow 0.15s, transform 0.15s; }
.cred-card:hover { border-color: var(--accent); box-shadow: 0 6px 18px rgba(0, 120, 255, 0.12); transform: translateY(-1px); }
.cred-card-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.cred-date { font-size: 0.8rem; color: var(--text-muted); }
.cred-name { font-size: 1.05rem; line-height: 1.3; margin-top: 0.4rem; }
.cred-issuer { font-size: 0.9rem; color: var(--text-muted); }
.empty-state { padding: 2rem 1.25rem; text-align: center; border: 1px dashed var(--border); border-radius: 0.75rem; background: #fff; }
.empty-state p { margin: 0.35rem 0 0; }
.detail-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.detail-head .page-title { margin-bottom: 0.2rem; }
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(19rem, 1fr)); gap: 1rem; align-items: start; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.15rem 1.25rem; }
.panel .section-title { margin-top: 0; }
.panel .gap-top { margin-top: 1.5rem; }
.share-link { width: 100%; margin: 0.4rem 0 0.8rem; cursor: text; }
.share-row { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 0.25rem 0 0; }
.share-row .btn { width: auto; }
.panel .btn { width: auto; }

/* badge templates */
.badge-row { display: flex; align-items: center; gap: 0.8rem; }
.badge-row > span:last-child, .badge-row > div { display: flex; flex-direction: column; min-width: 0; }
.badge-thumb { width: 3rem; height: 3rem; border-radius: 0.65rem; object-fit: cover; flex: none; background: #eaf2ff; }
.badge-thumb--large { width: 5.5rem; height: 5.5rem; border-radius: 0.9rem; }
.badge-thumb--empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 1.3rem; color: var(--accent); }
.badge-form-grid { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: 1.5rem; align-items: start; }
.badge-form textarea.input { height: auto; min-height: 6rem; padding: 0.6rem 0.75rem; resize: vertical; line-height: 1.45; }
.badge-form select.input[disabled] { opacity: 0.7; }
.badge-form small { font-weight: 400; }
.picture-box { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.picture-box > div { display: flex; flex-direction: column; gap: 0.35rem; min-width: 0; flex: 1 1 10rem; }
.static-value { padding: 0.55rem 0; font-weight: 600; }
.form-actions { justify-content: flex-end; margin-top: 1.25rem; }
.form-actions .btn { flex: none; }
.ok-msg.flash { margin: 0 0 1rem; }
@media (max-width: 900px) { .badge-form-grid { grid-template-columns: 1fr; } .form-actions { flex-wrap: wrap; } .form-actions .btn { flex: 1 1 auto; } }
input[type="file"].input { height: auto; padding: 0.5rem 0.6rem; font-size: 0.85rem; }
input[type="file"].input::file-selector-button { margin-right: 0.7rem; padding: 0.4rem 0.8rem; font: inherit; font-weight: 500; color: #374151; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; cursor: pointer; }
input[type="file"].input::file-selector-button:hover { background: #fafafa; border-color: #d1d5db; }
.badge-form [readonly] { background: #f9fafb; color: #6b7280; }
.head-actions { display: inline-flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; }
.head-actions .btn { width: auto; }
.ok-msg a { color: inherit; text-decoration: underline; }

/* accept step */
.badge.waiting { background: #fef3c7; color: var(--warn); }
.cred-card--waiting { border-color: #fcd34d; background: #fffdf5; }
.notice-msg { color: #92400e; font-size: 0.92rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 0.5rem; padding: 0.65rem 0.85rem; margin: 0 0 1rem; }
.accept-panel { border-color: #fcd34d; background: #fffdf5; margin-bottom: 1rem; }
.accept-panel p { margin: 0 0 1rem; }
.accept-panel .btn { width: auto; padding: 0 1.6rem; }

/* badge picture on the public check page and the earner's pages */
.verify-badge { display: block; width: 7.5rem; height: 7.5rem; margin: 0 auto 1rem; border-radius: 1.1rem; object-fit: cover; box-shadow: 0 6px 18px rgba(0, 0, 0, 0.12); }
.cred-pic { width: 3.25rem; height: 3.25rem; border-radius: 0.7rem; object-fit: cover; margin-top: 0.4rem; }

/* ---------- Credentials section, laid out like the reference admin mock ---------- */
.serif, .page-title.serif { font-family: "Source Serif 4", "Source Serif Pro", Georgia, "Times New Roman", serif; font-weight: 400; font-size: 1.875rem; color: #374151; letter-spacing: 0; margin: 0 0 1rem; }
.tabs { display: flex; gap: 1.75rem; box-shadow: inset 0 -1px 0 #e5e7eb; margin: 0 0 1.5rem; overflow-x: auto; overflow-y: hidden; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { padding: 0.65rem 0.15rem; font-size: 0.875rem; font-weight: 500; color: #374151; text-decoration: none; border-bottom: 1.6px solid transparent; white-space: nowrap; }
.tab:hover { color: #2b97cf; }
.tab--on { color: #2b97cf; border-bottom-color: #2b97cf; }
.toolbar { display: flex; align-items: center; gap: 0.75rem; margin: 0 0 1rem; flex-wrap: wrap; }
.toolbar--between { justify-content: space-between; margin-top: 1rem; }
.toolbar .search { flex: 1 1 18rem; display: flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; background: #f3f4f6; border-radius: 0.5rem; color: #6b7280; }
.toolbar .search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; font-size: 0.875rem; color: #374151; }
.input--filter { width: auto; min-width: 9rem; height: 2.25rem; min-height: 2.25rem; font-size: 0.875rem; }
.btn--accent { color: #fff; background: #2b97cf; font-weight: 500; }
.btn--accent:hover { background: #2487bb; }
.count { font-size: 0.875rem; color: #6b7280; margin: 0; }
.pill { display: inline-flex; align-items: center; padding: 0.1rem 0.6rem; border-radius: 999px; font-size: 0.75rem; font-weight: 500; border: 1px solid transparent; }
.pill--ok { color: #2b97cf; background: rgba(43, 151, 207, 0.1); border-color: rgba(43, 151, 207, 0.2); }
.pill--draft { color: #92400e; background: #fef3c7; border-color: #fde68a; }
.pill--count { color: #374151; background: #f3f4f6; min-width: 1.9rem; justify-content: center; border-radius: 0.4rem; }
.pill--up { color: var(--ok); background: #dcfce7; }
.pill--down { color: var(--bad); background: #fee2e2; }
.tpl-name { display: flex; align-items: center; gap: 0.85rem; color: #374151; text-decoration: none; font-weight: 400; }
.tpl-name:hover span { color: #2b97cf; }
.tpl-thumb { width: 2.25rem; height: 2.25rem; border-radius: 0.5rem; object-fit: cover; flex: none; background: #eaf2ff; }
.tpl-thumb--empty { display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #2b97cf; }
.tpl-table th { font-weight: 400; color: #374151; font-size: 0.875rem; }
.file-btn { cursor: pointer; }
.btn-row--left { justify-content: flex-start; }
.btn-row--left .btn { flex: none; width: auto; }
.issue-import { max-width: 52rem; }
.issue-import > p { margin: 0 0 1.25rem; }
.problem-list { margin: 0.4rem 0 0.4rem 1.1rem; padding: 0; font-weight: 400; }
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); gap: 1rem; margin: 0 0 1.25rem; }
.stat-card { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.1rem 1.25rem; }
.stat-top { display: flex; justify-content: space-between; align-items: center; gap: 0.5rem; }
.stat-title { font-size: 0.875rem; color: #6b7280; }
.stat-value { font-size: 1.9rem; font-weight: 700; color: #111827; margin: 0.35rem 0 0.2rem; }
.stat-note { font-size: 0.78rem; color: #9ca3af; }
.chart-panel { margin-bottom: 1.25rem; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.75rem; }
.chart-head .section-title { margin: 0; }
.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; justify-content: flex-end; margin: 0 0 0.9rem; }
.chip { padding: 0.3rem 0.75rem; font-size: 0.8rem; color: #374151; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; text-decoration: none; }
.chip--on { color: #fff; background: #2b97cf; border-color: #2b97cf; }
.chart { display: block; width: 100%; height: 14rem; background: linear-gradient(#f3f4f6 1px, transparent 1px) 0 0 / 100% 25%; border-bottom: 1px solid #e5e7eb; }
.bar--issued { fill: #bfe2f4; }
.bar--earned { fill: #2b97cf; }
.chart-axis { display: flex; justify-content: space-between; gap: 1rem; font-size: 0.75rem; color: #9ca3af; margin-top: 0.4rem; }
.legend { display: inline-flex; align-items: center; gap: 0.35rem; }
.dot { display: inline-block; width: 0.6rem; height: 0.6rem; border-radius: 50%; margin-left: 0.5rem; }
.dot--issued { background: #bfe2f4; }
.dot--earned { background: #2b97cf; }
.rate-row { display: grid; grid-template-columns: 12rem 1fr 3rem 8rem; align-items: center; gap: 0.75rem; padding: 0.4rem 0; font-size: 0.9rem; }
.rate-progress { width: 100%; height: 0.6rem; border-radius: 999px; overflow: hidden; background: #e5e7eb; appearance: none; border: 0; }
.rate-progress::-webkit-progress-bar { background: #e5e7eb; }
.rate-progress::-webkit-progress-value { background: #2b97cf; border-radius: 999px; }
.rate-progress::-moz-progress-bar { background: #2b97cf; }
.rate-pct { font-weight: 600; text-align: right; }
.guide-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; }
.guide-grid .panel p { margin: 0 0 1rem; }
.guide-grid .btn { width: auto; }
.support-panel { max-width: 40rem; }
@media (max-width: 700px) { .rate-row { grid-template-columns: 1fr 3rem; } .rate-row .rate-progress, .rate-row .muted { grid-column: 1 / -1; } }
select.input.input--filter { width: auto; min-width: 9.5rem; }
.tpl-table th { text-transform: none; letter-spacing: 0; font-size: 0.875rem; color: #374151; }
form.toolbar { flex-wrap: nowrap; }
@media (max-width: 700px) { form.toolbar { flex-wrap: wrap; } }

/* the signed-in app uses Inter, like the reference mock */
.app, .app input, .app select, .app textarea, .app button { font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif; }

/* ---------- Create Template form (like the reference mock) ---------- */
.crumbs { font-size: 0.875rem; margin: 0 0 0.6rem; color: #6b7280; }
.crumbs a { color: #2b97cf; text-decoration: none; }
.tpl-form { max-width: 52rem; display: flex; flex-direction: column; gap: 1.1rem; }
.form-card { background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; padding: 1.4rem 1.5rem; display: flex; flex-direction: column; gap: 1rem; }
.form-card-title { font-size: 1.05rem; font-weight: 600; color: #374151; margin: 0; }
.form-card p { margin: 0; }
.basics-grid { display: grid; grid-template-columns: 11rem 1fr; gap: 1.25rem; align-items: start; }
.picture-drop { width: 11rem; height: 11rem; border: 2px dashed #d1d5db; border-radius: 0.75rem; background: #fafafa; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.picture-drop .picture-img { width: 100%; height: 100%; object-fit: cover; }
.picture-empty { display: inline-flex; width: 2.75rem; height: 2.75rem; align-items: center; justify-content: center; background: #e5e7eb; border-radius: 0.6rem; font-size: 1.3rem; color: #6b7280; }
.field-label { font-weight: 600; font-size: 0.875rem; color: #374151; }
.link-btn { color: #2b97cf; font-size: 0.875rem; font-weight: 500; cursor: pointer; display: inline-block; margin-top: 0.4rem; }
.field-count { float: right; font-weight: 400; color: #9ca3af; font-size: 0.78rem; }
.sig-block, .crit-block { border: 1px solid #eef0f3; border-radius: 0.6rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.8rem; background: #fcfcfd; }
.sig-title { font-weight: 600; font-size: 0.9rem; color: #374151; }
.sig-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 1.25rem; align-items: start; }
.sig-preview { display: flex; align-items: center; justify-content: center; height: 4.5rem; border: 1px dashed #d1d5db; border-radius: 0.5rem; background: #fff; margin-bottom: 0.6rem; }
.sig-preview img { max-height: 100%; max-width: 100%; }
.sig-tools { display: flex; align-items: center; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.sig-pad { display: block; width: 100%; max-width: 400px; height: auto; aspect-ratio: 8 / 3; border: 1px solid #d1d5db; border-radius: 0.5rem; background: #fff; touch-action: none; cursor: crosshair; margin-bottom: 0.5rem; }
.radio-row { display: flex; gap: 1.5rem; }
.radio-row label, .check-row { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.9rem; }
.attr-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr)); gap: 0.9rem 1rem; }
.suggest-box { background: #f7fbfe; border: 1px solid #d6ebf7; border-radius: 0.6rem; padding: 0.9rem 1rem; display: flex; flex-direction: column; gap: 0.5rem; align-items: flex-start; }
.lock-note { color: #92400e; font-size: 0.88rem; background: #fffbeb; border: 1px solid #fde68a; border-radius: 0.5rem; padding: 0.65rem 0.85rem; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.tpl-form .btn { width: auto; }
@media (max-width: 700px) { .basics-grid, .sig-grid { grid-template-columns: 1fr; } .picture-drop { width: 100%; max-width: 14rem; } }
.verify-actions { display: flex; gap: 0.6rem; flex-wrap: wrap; justify-content: center; margin: 1.2rem 0 0; }
.verify-actions .btn { width: auto; }
.tpl-form textarea.input { height: auto; min-height: 6.5rem; padding: 0.6rem 0.75rem; resize: vertical; line-height: 1.5; }
.tpl-form [readonly] { background: #f9fafb; color: #6b7280; }
.form-card > .btn { align-self: flex-start; }
.form-card .field { margin: 0; }

/* ---------- template detail tabs ---------- */
.detail-layout { display: grid; grid-template-columns: minmax(12rem, 20rem) minmax(0, 1fr); gap: 2rem; align-items: start; }
.detail-image { display: block; width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 0.9rem; border: 1px solid var(--border); background: #eaf2ff; }
.detail-image--empty { display: flex; align-items: center; justify-content: center; font-size: 4rem; font-weight: 700; color: #2b97cf; }
.detail-info { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.detail-info .section-title { margin: 0.6rem 0 0; }
.id-row { display: flex; align-items: center; gap: 0.75rem; flex-wrap: wrap; font-weight: 600; font-size: 0.9rem; color: #374151; }
.id-row .share-link { flex: 1 1 18rem; width: auto; margin: 0; }
.meta-row { display: flex; gap: 1.5rem; flex-wrap: wrap; font-size: 0.9rem; color: #6b7280; margin: 0; }
.meta-row b { color: #111827; font-weight: 600; }
.meta-row a { color: #2b97cf; text-decoration: none; }
.detail-text { margin: 0; line-height: 1.6; color: #374151; }
.chip-list { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.chip-tag { padding: 0.25rem 0.75rem; font-size: 0.82rem; border: 1px solid #e5e7eb; border-radius: 999px; background: #fff; color: #374151; }
.chip-tag--skill { background: #f1f8fd; border-color: #d6ebf7; color: #1f6f9c; }
.criteria-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.5rem; color: #374151; }
.criteria-list a { color: #2b97cf; }
.sig-list { display: flex; gap: 1rem; flex-wrap: wrap; }
.sig-card { display: flex; flex-direction: column; gap: 0.15rem; min-width: 9rem; }
.sig-card img { max-height: 3.5rem; max-width: 10rem; object-fit: contain; align-self: flex-start; }
.settings-panel { max-width: 40rem; margin-bottom: 1rem; }
.settings-panel p { margin: 0 0 0.9rem; }
.inline-form { display: flex; gap: 0.75rem; align-items: flex-end; flex-wrap: wrap; }
.inline-form .field { margin: 0; width: 12rem; }
.inline-form .btn { width: auto; }
@media (max-width: 800px) { .detail-layout { grid-template-columns: 1fr; } .detail-image { max-width: 16rem; } }

/* ---------- top bar and notifications ---------- */
.topbar { display: flex; justify-content: flex-end; align-items: center; padding: 0.15rem 0 0.4rem; }
.bell { position: relative; display: inline-flex; width: 2.4rem; height: 2.4rem; align-items: center; justify-content: center; color: #4b5563; border-radius: 0.6rem; text-decoration: none; }
.bell:hover { background: #eef3f8; }
.bell-count { position: absolute; top: 0.05rem; right: 0.05rem; min-width: 1.05rem; height: 1.05rem; padding: 0 0.25rem; border-radius: 999px; background: #dc2626; color: #fff; font-size: 0.68rem; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.note-list { list-style: none; margin: 0; padding: 0; background: #fff; border: 1px solid var(--border); border-radius: 0.75rem; overflow: hidden; }
.note-row { display: grid; grid-template-columns: auto 1fr auto; gap: 0.8rem; align-items: center; padding: 0.85rem 1.1rem; border-bottom: 1px solid #f0f2f5; font-size: 0.92rem; }
.note-row:last-child { border-bottom: 0; }
.note-row--new { background: #f6fbff; }
.note-dot { width: 0.6rem; height: 0.6rem; border-radius: 50%; background: #2b97cf; }
.note-dot--alarm { background: #dc2626; }
.note-when { color: #9ca3af; font-size: 0.8rem; white-space: nowrap; }
@media (max-width: 900px) { .topbar { padding-right: 3rem; } }
.check-list { display: flex; flex-direction: column; gap: 0.55rem; }
.check-list .check-row { align-items: flex-start; }

/* public collection page */
.pub-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); gap: 1rem; margin-top: 1.2rem; }
.pub-badge { border: 1px solid var(--border); border-radius: 0.75rem; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.5rem; background: #fff; }
.pub-badge h2 { font-size: 1.02rem; margin: 0; }
.pub-badge p { margin: 0; font-size: 0.9rem; }
.pub-badge .btn { width: auto; align-self: flex-start; }
.pub-badge-img { width: 5rem; height: 5rem; border-radius: 0.8rem; object-fit: cover; }
.next-panel { grid-column: 1 / -1; }
.next-item { display: flex; flex-direction: column; gap: 0.3rem; align-items: flex-start; padding: 0.6rem 0; border-bottom: 1px solid #f0f2f5; }
.next-item:last-child { border-bottom: 0; }
.next-item p { margin: 0; }
.next-item .btn { width: auto; }

/* developers */
.docs { max-width: 52rem; display: flex; flex-direction: column; gap: 1rem; }
.docs .panel p { margin: 0 0 0.8rem; line-height: 1.55; }
.docs ul { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.4rem; }
pre.code { margin: 0 0 0.9rem; padding: 0.9rem 1rem; background: #0f172a; color: #e2e8f0; border-radius: 0.6rem; overflow-x: auto; font-size: 0.82rem; line-height: 1.5; white-space: pre; }
.webhook-form { max-width: 40rem; margin-top: 1.2rem; }
.deliveries { margin-top: 0.4rem; font-size: 0.82rem; }
.deliveries ul { margin: 0.3rem 0 0; padding-left: 1.1rem; }
.ok-text { color: var(--ok); font-weight: 600; }
.bad-text { color: var(--bad); font-weight: 600; }
td.actions .row-form { display: inline-block; margin: 0 0.25rem 0.25rem 0; }

/* account */
.org-picker { display: flex; gap: 0.6rem; align-items: center; margin: 0 0 1rem; flex-wrap: wrap; }
.req { color: #dc2626; }
.plan-panel { max-width: 40rem; margin-bottom: 1rem; }
.plan-panel p { margin: 0 0 0.8rem; }
.plan-name { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 1.6rem; margin: 0 0 0.5rem; color: #374151; }
.limit-list { margin: 0; padding-left: 1.2rem; display: flex; flex-direction: column; gap: 0.35rem; }
.email-preview { background: #f9fafb; border: 1px solid #eef0f3; border-radius: 0.6rem; padding: 0.8rem 1rem; font-size: 0.88rem; }
.email-preview pre { margin: 0.5rem 0 0; white-space: pre-wrap; font-family: inherit; color: #4b5563; }
.cert-preview { text-align: center; border: 6px double #2b97cf; padding: 2rem 1.5rem; background: #fff; border-radius: 0.3rem; }
.cert-preview[data-color="navy"] { border-color: #1f3a5f; } .cert-preview[data-color="green"] { border-color: #1f7a4d; }
.cert-preview[data-color="purple"] { border-color: #5b3cc4; } .cert-preview[data-color="gold"] { border-color: #b58105; }
.cert-preview h3 { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 1.8rem; margin: 0.3rem 0 1rem; }
.cert-preview p { margin: 0.2rem 0; color: #4b5563; }
.cert-small { text-transform: uppercase; letter-spacing: 0.12em; font-size: 0.75rem; }
.cert-name { font-family: "Source Serif 4", Georgia, serif; font-size: 1.6rem; color: #111827 !important; margin: 0.5rem 0 !important; }
.cert-cred { font-weight: 600; color: #111827 !important; }
.cert-footer { font-size: 0.78rem; margin-top: 1.2rem !important; }

/* printable certificate */
.cert-body { background: #eef1f5; margin: 0; padding: 1.2rem; }
.cert-toolbar { display: flex; gap: 0.6rem; justify-content: center; margin-bottom: 1rem; }
.cert-toolbar .btn { width: auto; }
.cert-sheet { max-width: 62rem; margin: 0 auto; background: #fff; text-align: center; padding: 3rem 3.5rem; border: 10px double #2b97cf; box-shadow: 0 8px 30px rgba(0,0,0,0.08); }
.cert-sheet[data-color="navy"] { border-color: #1f3a5f; } .cert-sheet[data-color="green"] { border-color: #1f7a4d; }
.cert-sheet[data-color="purple"] { border-color: #5b3cc4; } .cert-sheet[data-color="gold"] { border-color: #b58105; }
.cert-sheet h1 { font-family: "Source Serif 4", Georgia, serif; font-weight: 400; font-size: 2.6rem; margin: 0.4rem 0 1.4rem; color: #1f2937; }
.cert-sheet p { margin: 0.35rem 0; color: #4b5563; }
.cert-logo { width: 5.5rem; height: 5.5rem; object-fit: cover; border-radius: 0.8rem; margin-bottom: 0.6rem; }
.cert-sheet .cert-name { font-family: "Source Serif 4", Georgia, serif; font-size: 2.2rem; color: #111827; margin: 0.6rem 0; }
.cert-sheet .cert-cred { font-size: 1.5rem; font-weight: 600; color: #111827; }
.cert-about { max-width: 40rem; margin: 0.6rem auto !important; font-size: 0.95rem; }
.cert-date { margin-top: 1rem !important; }
.cert-sigs { display: flex; justify-content: center; gap: 3rem; flex-wrap: wrap; margin-top: 2rem; }
.cert-sig { display: flex; flex-direction: column; align-items: center; gap: 0.15rem; min-width: 10rem; border-top: 1px solid #9ca3af; padding-top: 0.5rem; }
.cert-sig img { max-height: 3.6rem; max-width: 12rem; margin-bottom: -2.2rem; position: relative; top: -2.4rem; }
.cert-sig-gap { height: 1rem; }
.cert-verify { margin-top: 2rem !important; font-size: 0.72rem; color: #9ca3af !important; word-break: break-all; }
@page { size: A4 landscape; margin: 10mm; }
@media print { .cert-body { background: #fff; padding: 0; } .cert-toolbar { display: none; } .cert-sheet { box-shadow: none; max-width: none; } }
@media (max-width: 700px) { .cert-sheet { padding: 1.5rem 1rem; } .cert-sheet h1 { font-size: 1.8rem; } }

/* ---------- learner app (like the reference learner mock) ---------- */
.welcome { font-size: 1.9rem; font-weight: 700; color: #0b7bb8; margin: 0 0 0.2rem; }
.blue-title { font-size: 1.25rem; font-weight: 600; color: #0b7bb8; margin: 2rem 0 0.8rem; display: flex; align-items: baseline; gap: 0.7rem; flex-wrap: wrap; }
.blue-title .hint { font-size: 0.8rem; font-weight: 400; color: #2b97cf; }
.cred-row { display: flex; gap: 1rem; overflow-x: auto; padding: 0.2rem 0.2rem 0.8rem; scroll-snap-type: x proximity; }
.cred-row > * { flex: 0 0 16rem; scroll-snap-align: start; }
.cred-row .cred-card { min-height: 15rem; }
.cred-pic--empty { display: inline-flex; width: 3.25rem; height: 3.25rem; border-radius: 0.7rem; align-items: center; justify-content: center; background: #eaf2ff; color: #2b97cf; font-weight: 700; margin-top: 0.4rem; }
.cred-meta { font-size: 0.82rem; color: #6b7280; margin-top: auto; }
.cred-card .btn { width: auto; align-self: flex-start; margin-top: 0.4rem; }
.chips--left { justify-content: flex-start; }
.snapshot { grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); }
.snapshot .stat-card { text-align: center; }
.top-skills { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-direction: column; gap: 0.5rem; max-width: 38rem; }
.top-skills li { display: flex; align-items: center; gap: 0.6rem; padding: 0.55rem 0.8rem; background: #fff; border: 1px solid var(--border); border-radius: 0.6rem; }
.top-n { width: 1.6rem; height: 1.6rem; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; background: #eaf2ff; color: #2b97cf; font-weight: 700; font-size: 0.8rem; }
.top-name { flex: 1; }
.skill-add { margin-top: 1rem; }
.path-card { margin-bottom: 1rem; max-width: 44rem; }
.path-head { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.path-steps { list-style: none; margin: 0.9rem 0; padding: 0; display: flex; flex-direction: column; gap: 0.4rem; }
.path-steps li { display: flex; justify-content: space-between; gap: 1rem; padding: 0.5rem 0.7rem; border-radius: 0.5rem; background: #f9fafb; font-size: 0.92rem; }
.path-steps .step--done { background: #f0fdf4; }
.slug-row { display: flex; align-items: center; gap: 0.4rem; }
.slug-row .input { flex: 1; }
a.pub-badge { text-decoration: none; color: inherit; }
a.pub-badge:hover { border-color: var(--accent); }
.btn-row--right { justify-content: flex-end; }
.btn-row--right .btn { flex: none; width: auto; }
.btn--link { background: transparent; color: #2b97cf; border: 0; font-weight: 500; }
.btn--link:hover { background: #f1f8fd; }
.issue-text { color: #4b5563; font-size: 0.9rem; line-height: 1.6; margin: 0 0 1rem; max-width: none; }
.issue-text b { color: #111827; }
.issue-text a { color: #2b97cf; }
.paste-box { margin-top: 0.5rem; }
.paste-box summary { cursor: pointer; color: #6b7280; font-size: 0.88rem; margin-bottom: 0.5rem; }
.issue-import { max-width: none; }

/* top bar sits above the content, not beside it */
.app-main { flex-direction: column; align-items: center; justify-content: flex-start; }
.topbar { width: 100%; max-width: 90rem; }
/* list toolbar like the reference: search on the left, Filter on the right */
.toolbar--search { justify-content: space-between; position: relative; }
.toolbar--search .search { flex: 0 1 22rem; }
.filter-pop { position: relative; }
.filter-pop > summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; gap: 0.4rem; }
.filter-pop > summary::-webkit-details-marker { display: none; }
.filter-body { position: absolute; right: 0; top: calc(100% + 0.4rem); z-index: 5; background: #fff; border: 1px solid var(--border); border-radius: 0.6rem; box-shadow: 0 10px 28px rgba(0,0,0,0.12); padding: 0.9rem; display: flex; flex-direction: column; gap: 0.7rem; min-width: 13rem; }
.filter-body .btn { width: auto; align-self: flex-end; }
.btn-row--right { justify-content: flex-end; }
.btn-row--right .btn { flex: none; width: auto; }
.btn--link { background: transparent; color: #2b97cf; border: 0; font-weight: 500; }
.btn--link:hover { background: #f1f8fd; }
.issue-text { color: #4b5563; font-size: 0.9rem; line-height: 1.6; margin: 0 0 1rem; max-width: none; }
.issue-text b { color: #111827; }
.issue-text a { color: #2b97cf; }
.paste-box { margin-top: 0.5rem; }
.paste-box summary { cursor: pointer; color: #6b7280; font-size: 0.88rem; margin-bottom: 0.5rem; }
.issue-import { max-width: none; }

/* template details like the reference */
.serif--bold, .page-title.serif--bold { font-weight: 700; font-size: 2.1rem; color: #111827; }
.id-line { font-size: 0.9rem; font-weight: 500; color: #111827; margin: 0 0 1.2rem; display: flex; align-items: center; gap: 0.4rem; flex-wrap: wrap; }
.id-inline { border: 0; background: transparent; font-size: 0.9rem; color: #111827; padding: 0; max-width: 100%; cursor: text; }
.detail-layout2 { display: grid; grid-template-columns: 11rem minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.detail-left { display: flex; flex-direction: column; gap: 0.7rem; }
.detail-left .detail-image { width: 11rem; }
.info-box { background: #f3f4f6; border-radius: 0.5rem; padding: 0.8rem 0.9rem; font-size: 0.82rem; color: #374151; }
.info-box a { color: #2b97cf; text-decoration: none; }
.issued-by { font-weight: 700; font-size: 1.05rem; color: #111827; margin: 0 0 0.6rem; }
.detail-right { display: flex; flex-direction: column; gap: 0.9rem; min-width: 0; }
.detail-h { font-size: 1.15rem; font-weight: 700; color: #111827; margin: 0.4rem 0 0; }
.chip-tag--icon { display: inline-flex; align-items: center; gap: 0.35rem; }
.chip-tag--grey { background: #f3f4f6; border-color: #f3f4f6; border-radius: 0.4rem; color: #374151; }
@media (max-width: 800px) { .detail-layout2 { grid-template-columns: 1fr; } }

/* analytics like the reference */
.stat-card { display: flex; gap: 0.9rem; align-items: flex-start; }
.stat-ico { flex: none; width: 2.4rem; height: 2.4rem; border-radius: 0.6rem; background: #eaf5fb; color: #2b97cf; display: inline-flex; align-items: center; justify-content: center; }
.stat-main { flex: 1; min-width: 0; }
.chart-pair { display: grid; grid-template-columns: repeat(auto-fit, minmax(22rem, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.chart-pair .chart-panel { margin-bottom: 0; }
.chart .area { fill: rgba(43, 151, 207, 0.18); stroke: none; }
.chart .line { fill: none; stroke-width: 2.2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.chart .line--issued { stroke: #bfe2f4; }
.chart .line--earned { stroke: #2b97cf; }
.chart-custom, .chip-custom { position: relative; display: inline-block; }
.chip-custom > summary { list-style: none; cursor: pointer; }
.chip-custom > summary::-webkit-details-marker { display: none; }
.chip-custom .filter-body { right: 0; }

/* developers org bar and plain account form, like the reference */
.org-bar { display: flex; align-items: center; gap: 0.7rem; background: #f3f4f6; border-radius: 0.6rem; padding: 0.85rem 1rem; margin: 0 0 1rem; font-size: 0.88rem; color: #374151; }
.org-ids { flex: 1; display: flex; gap: 1.4rem; flex-wrap: wrap; }
.org-doc { color: #2b97cf; text-decoration: none; font-size: 0.85rem; }
.tpl-form--plain { max-width: 34rem; gap: 0.6rem; }
.tpl-form--plain .form-card { border: 0; background: transparent; padding: 0; box-shadow: none; }
.tpl-form--plain .form-card-title { font-size: 1.05rem; font-weight: 700; }
.tpl-form--plain .form-actions { justify-content: flex-start; }

/* learner dashboard cards and skills page, like the reference */
.blue-title--split { justify-content: space-between; }
.view-all { font-size: 0.85rem; font-weight: 400; color: #2b97cf; text-decoration: none; }
.chip-tag--plain { background: #fff; color: #4b5563; border-color: #e5e7eb; border-radius: 0.5rem; }
.row-wrap { position: relative; }
.row-arrow { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 2rem; height: 2rem; border-radius: 50%; border: 1px solid #e5e7eb; background: #fff; box-shadow: 0 2px 8px rgba(0,0,0,0.08); cursor: pointer; font-size: 1.2rem; line-height: 1; color: #4b5563; }
.row-arrow--prev { left: -0.6rem; } .row-arrow--next { right: -0.6rem; }
.mock-card { flex: 0 0 15.5rem; display: flex; flex-direction: column; gap: 0.35rem; padding: 1.4rem 1.2rem 1.1rem; background: #fff; border: 1px solid var(--border); border-radius: 0.9rem; text-decoration: none; color: inherit; transition: box-shadow 0.15s, border-color 0.15s; }
.mock-card:hover { border-color: #2b97cf; box-shadow: 0 6px 18px rgba(0,120,255,0.1); }
.mock-card--waiting { border-color: #fcd34d; background: #fffdf5; }
.mock-pic { align-self: center; width: 3.4rem; height: 3.4rem; border-radius: 0.8rem; background: #f3f4f6; display: inline-flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 0.7rem; }
.mock-pic img { width: 100%; height: 100%; object-fit: cover; }
.mock-pic--empty { font-weight: 700; color: #2b97cf; }
.mock-title { font-size: 0.92rem; font-weight: 500; color: #111827; line-height: 1.35; }
.mock-issuer { font-size: 0.85rem; color: #6b7280; margin-bottom: 0.7rem; }
.mock-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 0.55rem 0.5rem; margin-top: auto; font-size: 0.8rem; color: #374151; }
.mock-meta > span, .mock-meta > a { display: inline-flex; align-items: center; gap: 0.35rem; }
.mock-valid { justify-self: end; color: #374151; text-decoration: none; }
.mock-valid--revoked, .mock-valid--expired { color: var(--bad); }
.mock-card .badge.waiting { align-self: flex-start; }
.about-link { margin: -0.6rem 0 1rem; font-size: 0.85rem; } .about-link a { color: #2b97cf; text-decoration: none; }
.skills-toolbar { display: flex; gap: 0.75rem; align-items: center; margin: 0 0 1.2rem; flex-wrap: wrap; }
.skills-toolbar .search-form { flex: 0 1 24rem; }
.skills-toolbar .search { display: flex; align-items: center; gap: 0.5rem; height: 2.25rem; padding: 0 0.75rem; background: #f3f4f6; border-radius: 0.5rem; color: #6b7280; }
.skills-toolbar .search input { flex: 1; border: 0; background: transparent; outline: none; font: inherit; font-size: 0.875rem; }
.skills-layout { display: grid; grid-template-columns: 17rem minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.side-card { background: #fff; border: 1px solid var(--border); border-radius: 0.8rem; padding: 1.1rem 1.1rem 1.2rem; margin-bottom: 1rem; }
.side-title { font-size: 0.75rem; letter-spacing: 0.08em; text-transform: uppercase; color: #374151; margin: 0 0 0.6rem; }
.side-sub { font-size: 0.8rem; color: #6b7280; margin: 0 0 0.6rem; }
.big-number { font-size: 2.6rem; font-weight: 700; color: #0b7bb8; text-align: center; }
.side-card .side-sub { text-align: center; }
.circles { display: flex; justify-content: space-between; gap: 0.4rem; margin-top: 0.8rem; }
.circles > div { display: flex; flex-direction: column; align-items: center; gap: 0.3rem; flex: 1; text-align: center; }
.circles small { font-size: 0.68rem; color: #6b7280; line-height: 1.2; }
.circle { width: 2.6rem; height: 2.6rem; border-radius: 50%; border: 2px solid #d1d5db; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: #4b5563; font-size: 0.85rem; }
.circle--blue { border-color: #2b97cf; color: #0b7bb8; } .circle--green { border-color: #16a34a; color: #15803d; }
.top-skills--side { margin: 0; max-width: none; gap: 0.35rem; }
.top-skills--side li { padding: 0.35rem 0.5rem; font-size: 0.85rem; }
.top-actions { display: inline-flex; gap: 0.2rem; }
.top-actions .btn { padding: 0 0.45rem; min-width: 1.6rem; height: 1.6rem; min-height: 1.6rem; }
.skills-tabs { display: flex; align-items: center; gap: 1.4rem; border-bottom: 1px solid #e5e7eb; margin-bottom: 1rem; }
.skills-count { margin-left: auto; font-size: 0.8rem; color: #9ca3af; }
.skill-card { background: #fff; border: 1px solid var(--border); border-radius: 0.7rem; margin-bottom: 0.7rem; }
.skill-card > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 0.8rem; padding: 1rem 1.1rem; }
.skill-card > summary::-webkit-details-marker { display: none; }
.skill-name { font-weight: 500; color: #111827; }
.skill-tag { font-size: 0.72rem; background: #e0efff; color: #1d4ed8; border-radius: 0.3rem; padding: 0.15rem 0.5rem; }
.skill-body { padding: 0 1.1rem 1rem; }
.skill-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.pager--pages { display: flex; gap: 0.35rem; justify-content: flex-end; margin: 0.5rem 0 1rem; }
.pg { display: inline-flex; width: 1.9rem; height: 1.9rem; align-items: center; justify-content: center; border-radius: 0.4rem; border: 1px solid #e5e7eb; text-decoration: none; color: #374151; font-size: 0.82rem; }
.pg--on { background: #0b7bb8; color: #fff; border-color: #0b7bb8; }
.skills-help { margin-top: 2rem; }
@media (max-width: 900px) { .skills-layout { grid-template-columns: 1fr; } }
.docs-public { margin: 0 0 1rem; font-size: 0.9rem; }
.card.wide .docs { margin-top: 0.5rem; }
.card.wide .docs .panel { margin-bottom: 1rem; text-align: left; }

/* ---------- phones: the bell shares the title row, tabs show they scroll, swipe replaces the card arrows ---------- */
@media (max-width: 900px) {
  .app-main { position: relative; }
  .topbar { position: absolute; top: 0.9rem; right: 1rem; width: auto; max-width: none; padding: 0; z-index: 3; }
  .app-content > h1:first-child, .app-content > .page-title:first-child { padding-right: 2.75rem; }
  .tabs { gap: 1.1rem; -webkit-mask-image: linear-gradient(to right, #000 88%, transparent); mask-image: linear-gradient(to right, #000 88%, transparent); padding-right: 1.5rem; }
}
@media (max-width: 640px) { .row-arrow { display: none; } }

.btn--google { display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem; }
.btn--google .g-icon { flex: none; }

/* Earners: a quiet revoke link; the reason and the confirmation are on their own page */
.link-danger { color: #b42318; font-size: 0.85rem; font-weight: 500; text-decoration: none; }
.link-danger:hover { text-decoration: underline; }
.confirm-kv + form { margin-top: 1.1rem; }
@media (max-width: 900px) { .app-content > .card:first-child { margin-top: 2.6rem; } }
@media (max-width: 900px) { td.actions { display: flex; justify-content: space-between; align-items: center; text-align: right; padding-top: 0.55rem; } td.actions::before { display: inline; margin-bottom: 0; } }

/* ---------- scrollbars: thin and soft on every page, no arrow buttons ---------- */
/* Chromium styles its bars with the ::-webkit-scrollbar rules below (no arrow buttons); other browsers use the standard thin bar. */
@supports not selector(::-webkit-scrollbar) { html, body, .table-card, pre.code, textarea, .app-content { scrollbar-width: thin; scrollbar-color: #cfd6e0 transparent; } }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #cfd6e0; border-radius: 8px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: #aab4c2; background-clip: content-box; }
::-webkit-scrollbar-button { display: none; width: 0; height: 0; }
::-webkit-scrollbar-corner { background: transparent; }
.tabs { scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }

/* ---------- floating page scrollbar (admin and learner pages): takes no room, faint when idle, stronger when used ---------- */
html.fsb { scrollbar-width: none; }
html.fsb::-webkit-scrollbar { display: none; }
.fsb-track { position: fixed; top: 0; right: 2px; bottom: 0; width: 12px; z-index: 50; pointer-events: none; }
.fsb-thumb { position: absolute; top: 0; right: 2px; width: 6px; border-radius: 6px; background: #94a3b8; opacity: 0.28; pointer-events: auto; cursor: default; transition: opacity 0.25s ease, width 0.15s ease, background 0.15s ease; }
.fsb-track.fsb-on .fsb-thumb { opacity: 0.75; }
.fsb-thumb:hover, .fsb-track.fsb-drag .fsb-thumb { opacity: 0.95; width: 8px; background: #64748b; }
@media (prefers-reduced-motion: reduce) { .fsb-thumb { transition: none; } }
