/* GL Credentials. Global Learning light system; the issuer's theme sets the colors below at runtime
   (theme.js → CSS custom properties). Values are the GL / GPL tokens (agents/lina-ai/knowledge/{gl,gpl}/tokens.json). */

@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-400.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 400; font-display: swap; src: url(/assets/fonts/inter-latin-ext-400.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-600.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Inter; font-style: normal; font-weight: 600; font-display: swap; src: url(/assets/fonts/inter-latin-ext-600.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: Radley; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/radley-latin-400-italic.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: Radley; font-style: italic; font-weight: 400; font-display: swap; src: url(/assets/fonts/radley-latin-ext-400-italic.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }

:root {
  --ink: #062f49; --ink-muted: #174e71; --action: #049bee; --action-deep: #038ad3; --action-text: #0b6b9f;
  --accent: #75bdf0; --accent-soft: #e8f4fc; --field: #FFFFFF; --paper: #F4F7FA; --line: #E2E8F0;
  --error: #b42318; --error-soft: #fdecea;
  --r-sm: .5rem; --r-xl: 1rem; --r-2xl: 1.5rem;
  --shadow: 0 1px 2px rgba(6,47,73,.06), 0 12px 32px rgba(6,47,73,.08);
  --shadow-cert: 0 2px 6px rgba(6,47,73,.06), 0 28px 64px rgba(6,47,73,.14);
  --gutter: clamp(16px, 4vw, 40px);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  font: 400 16px/1.55 Inter, system-ui, -apple-system, 'Segoe UI', sans-serif; color: var(--ink-muted);
  /* White dominates; color arrives as soft clouds at the edges. */
  background:
    radial-gradient(60vw 40vw at -10% -10%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 70%),
    radial-gradient(50vw 40vw at 110% 0%, color-mix(in srgb, var(--action) 9%, transparent), transparent 70%),
    linear-gradient(180deg, var(--field) 0%, var(--paper) 100%);
  background-attachment: fixed;
}
img { max-width: 100%; }
h1, h2 { color: var(--ink); font-weight: 600; letter-spacing: -.01em; margin: 0; }
a { color: var(--action-text); }
:focus-visible { outline: 3px solid var(--action); outline-offset: 2px; }

/* Header */
.top {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px var(--gutter); max-width: 1200px; width: 100%; margin: 0 auto;
}
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 17px; }
.brand img { width: 30px; height: 30px; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: 8px var(--gutter) 48px; }

/* Buttons: GL azure pill; ghost = white with a hairline. */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 46px; padding: 0 22px;
  border-radius: 9999px; border: 1px solid transparent; font: 600 16px/1 Inter, sans-serif; text-decoration: none;
  cursor: pointer; transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease; white-space: nowrap;
}
.btn.primary { color: #fff; background: linear-gradient(180deg, var(--action) 0%, var(--action-deep) 100%); box-shadow: 0 6px 16px color-mix(in srgb, var(--action) 30%, transparent); }
.btn.primary:hover { transform: translateY(-1px); box-shadow: 0 10px 22px color-mix(in srgb, var(--action) 34%, transparent); }
.btn.ghost { color: var(--ink); background: var(--field); border-color: var(--line); }
.btn.ghost:hover { border-color: var(--accent); }
.btn.small { min-height: 38px; padding: 0 16px; font-size: 14px; }
.btn[disabled] { opacity: .65; cursor: progress; transform: none; }
.btn.block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; font: inherit; color: var(--action-text); cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }

/* Certificate */
.cert-stage { display: flex; justify-content: center; padding: clamp(8px, 2vw, 24px) 0 clamp(20px, 3vw, 36px); }
.cert-frame { position: relative; width: 100%; max-width: 1040px; border-radius: 6px; overflow: hidden; box-shadow: var(--shadow-cert); background: #fff; line-height: 0; }
.cert-svg { width: 100%; height: auto; display: block; }
.cert-frame.is-revoked .cert-svg { filter: grayscale(1); opacity: .35; }
.void {
  position: absolute; inset: 0; display: grid; place-items: center; line-height: 1;
  font: 600 clamp(15px, 3.4vw, 40px) Inter, sans-serif; color: var(--error); letter-spacing: .14em; text-transform: uppercase;
}
.void span { background: #fff; border: 3px solid var(--error); border-radius: 10px; padding: .45em .8em; transform: rotate(-6deg); box-shadow: var(--shadow); }

/* Verification */
.verify {
  max-width: 1040px; margin: 0 auto; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 28px 40px;
  background: color-mix(in srgb, var(--field) 88%, transparent); border: 1px solid var(--line); border-radius: var(--r-2xl);
  padding: clamp(20px, 3vw, 32px); box-shadow: var(--shadow); backdrop-filter: blur(8px);
}
.verify-head { display: flex; gap: 18px; align-items: flex-start; }
.badge { width: 88px; height: 88px; object-fit: contain; flex: none; }
.chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px 6px 10px; border-radius: 9999px;
  font-size: 13px; font-weight: 600; line-height: 1; background: var(--accent-soft); color: var(--ink);
}
.chip-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--action); }
.chip-valid .chip-dot { box-shadow: 0 0 0 3px color-mix(in srgb, var(--action) 22%, transparent); }
.chip-expired, .chip-revoked { background: var(--error-soft); color: var(--error); }
.chip-expired .chip-dot, .chip-revoked .chip-dot { background: var(--error); }
.verify-name { font: italic 400 clamp(28px, 4vw, 40px)/1.1 Radley, Georgia, serif; margin: 14px 0 6px; letter-spacing: 0; overflow-wrap: anywhere; }
.verify-name.is-long { font-size: clamp(22px, 2.6vw, 30px); }
.verify-title { margin: 0; color: var(--ink); font-weight: 600; font-size: 17px; line-height: 1.4; }
.note { margin: 18px 0 0; padding: 12px 14px; border-radius: var(--r-sm); font-size: 15px; }
.note-revoked, .note-expired { background: var(--error-soft); color: var(--error); }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

.facts { margin: 0; display: grid; gap: 0; align-content: start; }
.fact { display: grid; gap: 2px; padding: 12px 0; border-top: 1px solid var(--line); }
.fact:first-child { border-top: 0; padding-top: 0; }
.fact dt { font-size: 12px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--action-text); }
.fact dd { margin: 0; color: var(--ink); font-size: 16px; overflow-wrap: anywhere; }
.fact code { font: 600 15px/1.4 ui-monospace, 'SF Mono', Menlo, monospace; letter-spacing: .02em; }
.fact.is-bad dd { color: var(--error); }

/* Empty, 404 and error states */
.empty { max-width: 560px; margin: clamp(40px, 10vh, 96px) auto; text-align: center; display: grid; justify-items: center; gap: 14px; }
.empty h1 { font-size: clamp(26px, 4vw, 34px); line-height: 1.2; }
.empty .lede { margin: 0 0 10px; font-size: 17px; }
.kicker { margin: 0; font-size: 13px; font-weight: 600; letter-spacing: .16em; text-transform: uppercase; color: var(--action-text); }
.loading { text-align: center; margin: 18vh 0; color: var(--ink-muted); }

/* Footer, toast, flags */
.foot {
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 16px; max-width: 1200px; width: 100%; margin: 0 auto;
  padding: 20px var(--gutter) calc(20px + env(safe-area-inset-bottom)); font-size: 13px; color: var(--ink-muted);
}
.toast {
  position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translate(-50%, 20px); opacity: 0;
  background: var(--ink); color: #fff; padding: 12px 18px; border-radius: 9999px; font-size: 14px; font-weight: 600;
  transition: opacity .2s ease, transform .2s ease; pointer-events: none; z-index: 10;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.preview-flag { position: fixed; bottom: 12px; left: 12px; z-index: 20; background: #fff4d6; color: #6b4c00; border: 1px solid #e9cf86; border-radius: 9999px; padding: 4px 12px; font-size: 12px; font-weight: 600; }
.noscript { text-align: center; padding: 24px; }

/* Account (sign-in, sign-up, reset, My Credentials) */
.auth { max-width: 440px; margin: clamp(24px, 8vh, 80px) auto; }
.card { background: var(--field); border: 1px solid var(--line); border-radius: var(--r-2xl); padding: clamp(22px, 4vw, 34px); box-shadow: var(--shadow); }
.card h1 { font-size: 26px; line-height: 1.2; }
.card .lede { margin: 8px 0 22px; }
.form { display: grid; gap: 16px; }
.field { display: grid; gap: 6px; }
.field label { font-size: 14px; font-weight: 600; color: var(--ink); }
.field input {
  font: 400 16px Inter, sans-serif; color: var(--ink); min-height: 48px; padding: 0 14px; border-radius: var(--r-sm);
  border: 1px solid #c9d4e0; background: #fff; width: 100%;
}
.field input:focus { outline: 3px solid color-mix(in srgb, var(--action) 35%, transparent); border-color: var(--action); }
.hint { font-size: 13px; color: var(--ink-muted); margin: 0; }
.msg { margin: 0; padding: 12px 14px; border-radius: var(--r-sm); font-size: 15px; }
.msg.err { background: var(--error-soft); color: var(--error); }
.msg.ok { background: var(--accent-soft); color: var(--ink); }
.switch { margin: 18px 0 0; text-align: center; font-size: 15px; }
.switch + .switch { margin-top: 8px; }

.wallet-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 16px; margin: clamp(16px, 4vh, 40px) 0 24px; }
.wallet-head h1 { font-size: clamp(26px, 4vw, 34px); }
.wallet-head p { margin: 4px 0 0; }
.wallet-empty { text-align: center; padding: clamp(32px, 6vw, 56px) 20px; }
.wallet-empty h2 { font-size: 21px; margin-bottom: 8px; }
.wallet-empty p { margin: 0 auto; max-width: 46ch; }
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px; }
.cred-card { display: grid; gap: 6px; text-decoration: none; color: inherit; background: var(--field); border: 1px solid var(--line); border-radius: var(--r-xl); padding: 18px; box-shadow: var(--shadow); }
.cred-card:hover { border-color: var(--accent); }
.cred-card img { width: 72px; height: 72px; object-fit: contain; }
.cred-card b { color: var(--ink); font-weight: 600; line-height: 1.35; }
.cred-card small { font-size: 13px; }
.cred-card .bad { color: var(--error); }

@media (max-width: 760px) {
  .verify { grid-template-columns: 1fr; }
  .actions .btn { flex: 1 1 180px; }
  .cert-frame { border-radius: 4px; }
  .verify-head { flex-direction: column; gap: 12px; }
  .badge { width: 64px; height: 64px; }
}
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }
@media print {
  body { background: #fff; }
  .top, .verify, .foot, .toast { display: none; }
  .cert-frame { box-shadow: none; }
}
