/* LeadRat Certification, design system ("royal teal": deep night teal, ivory paper, gold detailing) */
:root {
  --teal: #00806b; --teal-600: #006d5b; --teal-700: #00594b; --teal-50: #eaf7f3; --teal-100: #cdebe3; --teal-bright: #00c9a7;
  --night: #031c19; --night-2: #062925; --night-3: #0b3832; --night-line: rgba(232, 207, 142, .22);
  --gold: #c9a45c; --gold-2: #e8cf8e; --gold-deep: #94702f; --gold-text: #7a5a1f;
  --gold-grad: linear-gradient(135deg, #f6e7b9 0%, #d9b46c 34%, #b08640 62%, #ecd294 100%);
  --ink: #13211e; --ink-2: #34463f; --muted: #5c6b65; --line: #ebe4d3; --line-2: #d9cfb7;
  --bg: #f5f2ea; --surface: #fffdf8; --surface-2: #faf7ef;
  --good: #137a4b; --good-bg: #e6f5ed; --warn: #8a5a00; --warn-bg: #fff4dc; --bad: #b42318; --bad-bg: #fdecea; --info-bg: #eaf7f3;
  --radius: 18px; --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(3, 28, 25, .08), 0 18px 40px -12px rgba(3, 28, 25, .35);
  --font: Inter, system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --display: 'Playfair Display', Georgia, 'Times New Roman', serif; --serif: var(--display);
  --focus: 0 0 0 3px #fff, 0 0 0 5px var(--teal);
  color-scheme: light;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--night); }
body { margin: 0; color: var(--ink); font: 16px/1.55 var(--font); -webkit-font-smoothing: antialiased; min-height: 100vh;
  background: radial-gradient(1200px 700px at 85% -10%, #0d4a41 0%, transparent 60%) no-repeat,
              radial-gradient(900px 600px at -10% 30%, #08332d 0%, transparent 60%) no-repeat, var(--night); }
body::before { /* faint gold lattice, like a palace jaali screen */
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 0; opacity: .05;
  background-image: radial-gradient(circle at 50% 50%, transparent 9px, var(--gold-2) 9.5px, var(--gold-2) 10.5px, transparent 11px),
                    radial-gradient(circle at 0 0, transparent 9px, var(--gold-2) 9.5px, var(--gold-2) 10.5px, transparent 11px);
  background-size: 28px 28px; }
body > * { position: relative; z-index: 1; }
h1, h2, h3 { line-height: 1.18; margin: 0 0 .5rem; }
h1 { font-family: var(--display); font-weight: 600; font-size: clamp(1.75rem, 5.6vw, 2.5rem); letter-spacing: -.005em; }
h2 { font-family: var(--display); font-weight: 600; font-size: 1.35rem; }
h3 { font-size: 1.05rem; }
p { margin: 0 0 1rem; }
a { color: var(--teal-600); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 8px 12px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 8px; }
.muted { color: var(--muted); } .small { font-size: .875rem; } .xs { font-size: .78rem; } .mono { font-variant-numeric: tabular-nums; letter-spacing: .02em; }
.center { text-align: center; } .nowrap { white-space: nowrap; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.end { justify-content: flex-end; } .row.between { justify-content: space-between; }
.stack > * + * { margin-top: 12px; } .stack-lg > * + * { margin-top: 20px; }
.grow { flex: 1 1 auto; }
.gold-text { background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* boot */
.boot { min-height: 60vh; display: grid; place-items: center; }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(201,164,92,.25); border-top-color: var(--gold); animation: spin .8s linear infinite; display: inline-block; }
.spinner.sm { width: 16px; height: 16px; border-width: 2px; vertical-align: -3px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* brand bar (on the dark page) */
.brandbar { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px 12px; max-width: 820px; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: 12px; text-decoration: none; color: #fff; }
.brand-mark { width: 34px; height: 34px; border-radius: 9px; background: var(--teal); color: #fff; display: grid; place-items: center; font-weight: 700; }
.brand-logo { width: 34px; height: 34px; border-radius: 9px; object-fit: cover; background: #000; }
.brand-name { font-weight: 700; font-size: 1.02rem; } .brand-name span { font-weight: 500; color: var(--gold-2); }
.brand-wordmark { height: 34px; width: auto; display: block; }
.brand-wordmark + .brand-name span { padding-left: 12px; border-left: 1px solid var(--night-line); font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.05rem; letter-spacing: .01em; }

/* layout */
.page { max-width: 820px; margin: 0 auto; padding: 8px 16px 56px; }
.page.narrow { max-width: 580px; }
.card { position: relative; background: var(--surface); border: 1px solid rgba(201,164,92,.45); border-radius: var(--radius); box-shadow: var(--shadow); padding: 24px 22px; }
.card::after { /* inner gold hairline */
  content: ""; position: absolute; inset: 6px; border: 1px solid rgba(201,164,92,.28); border-radius: calc(var(--radius) - 5px); pointer-events: none; }
.card + .card, .hero + .card { margin-top: 18px; }
@media (min-width: 640px) { .card { padding: 36px; } }
.eyebrow { text-transform: uppercase; letter-spacing: .2em; font-size: .72rem; font-weight: 600; color: var(--gold-text); margin: 0 0 10px; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 22px; height: 1px; background: var(--gold); }
.center .eyebrow, .result-head .eyebrow { justify-content: center; }
.center .eyebrow::after, .result-head .eyebrow::after { content: ""; width: 22px; height: 1px; background: var(--gold); }
.lead { color: var(--ink-2); font-size: 1.05rem; }

/* buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 1px solid transparent; font-weight: 600; text-decoration: none; cursor: pointer; transition: background .15s, border-color .15s, transform .05s, box-shadow .15s, filter .15s; line-height: 1.2; }
.btn:active { transform: translateY(1px); }
.btn[disabled], .btn[aria-disabled="true"] { opacity: .55; cursor: not-allowed; }
.btn-primary { background: linear-gradient(180deg, #009a80, var(--teal) 55%, var(--teal-700)); color: #fff; border-color: #00594b; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 16px -6px rgba(0,89,75,.6); }
.btn-primary:hover:not([disabled]) { filter: brightness(1.07); }
.btn-gold { background: var(--gold-grad); color: #241a06; border-color: #b08640; box-shadow: inset 0 1px 0 rgba(255,255,255,.55), 0 8px 22px -8px rgba(201,164,92,.75); letter-spacing: .01em; }
.btn-gold:hover:not([disabled]) { filter: brightness(1.05) saturate(1.05); }
.btn-secondary { background: var(--teal-50); color: var(--teal-700); border-color: var(--teal-100); } .btn-secondary:hover:not([disabled]) { background: var(--teal-100); }
.btn-ghost { background: transparent; color: var(--ink-2); border-color: var(--line-2); } .btn-ghost:hover:not([disabled]) { background: var(--surface-2); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-link { background: none; border: 0; color: var(--teal-600); padding: 4px; min-height: 0; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; }
.on-dark .btn-link, .btn-link.on-dark { color: var(--gold-2); }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.05rem; }
.btn-sm { min-height: 36px; padding: 6px 12px; font-size: .875rem; border-radius: 9px; }

/* forms */
.field { display: block; margin-bottom: 16px; }
.field > .label { display: block; font-weight: 600; margin-bottom: 6px; font-size: .95rem; }
.optional { font-weight: 400; color: var(--muted); font-size: .88em; }
.hint { display: block; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.error-text { display: block; color: var(--bad); font-size: .875rem; margin-top: 6px; font-weight: 500; }
.input, select.input, textarea.input { width: 100%; min-height: 48px; padding: 11px 14px; border: 1px solid var(--line-2); border-radius: 11px; background: #fff; }
/* dropdowns: one look everywhere (same height and padding as text fields, branded chevron) */
select.input { -webkit-appearance: none; appearance: none; cursor: pointer; line-height: 1.3; padding-right: 40px; text-overflow: ellipsis;
  background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='M3.5 6l4.5 4.5L12.5 6' fill='none' stroke='%2300806b' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 14px center / 14px 14px; }
select.input:hover { border-color: #9fcfc3; }
select.input::-ms-expand { display: none; }
.input-sm, select.input-sm { min-height: 36px; padding-top: 6px; padding-bottom: 6px; padding-left: 10px; font-size: .875rem; border-radius: 9px; }
select.input-sm { padding-right: 32px; background-position: right 10px center; background-size: 12px 12px; }
.map-row { display: grid; grid-template-columns: minmax(140px, 220px) 1fr; gap: 10px; align-items: center; margin-bottom: 8px; }
.map-row:last-child { margin-bottom: 0; }
@media (max-width: 560px) { .map-row { grid-template-columns: 1fr; gap: 4px; } }
textarea.input { min-height: 110px; resize: vertical; line-height: 1.5; }
.input:focus { border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-100); outline: none; }
.input[aria-invalid="true"] { border-color: var(--bad); }
.phone { display: grid; grid-template-columns: minmax(132px, 40%) 1fr; gap: 8px; }
.phone select.input { padding-left: 12px; padding-right: 30px; background-position: right 10px center; background-size: 12px 12px; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; }
.hp { position: absolute; left: -5000px; }

/* alerts & pills */
.alert { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: .95rem; }
.alert-info { background: var(--info-bg); } .alert-warn { background: var(--warn-bg); color: #5c3d00; } .alert-bad { background: var(--bad-bg); color: #7a1a12; } .alert-good { background: var(--good-bg); color: #0d5234; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--teal-50); color: var(--teal-700); white-space: nowrap; }
.pill-good { background: var(--good-bg); color: var(--good); } .pill-bad { background: var(--bad-bg); color: var(--bad); } .pill-warn { background: var(--warn-bg); color: var(--warn); } .pill-muted { background: #efece4; color: var(--muted); } .pill-info { background: var(--info-bg); color: var(--teal-700); }
.pill-gold { background: #f7eed8; color: var(--gold-text); border: 1px solid #e6d3a6; }

/* landing hero: a dark "invitation" panel with the mascot in a palace arch */
.hero { position: relative; overflow: hidden; color: #f3efe4; border-radius: 24px; padding: 28px 22px 26px;
  background: radial-gradient(600px 380px at 78% 18%, rgba(0,201,167,.18), transparent 70%),
              radial-gradient(500px 320px at 10% 100%, rgba(201,164,92,.16), transparent 70%),
              linear-gradient(160deg, #0a3c35 0%, #052723 55%, #031c19 100%);
  border: 1px solid rgba(201,164,92,.55); box-shadow: 0 30px 60px -24px rgba(0,0,0,.6), inset 0 1px 0 rgba(255,255,255,.06); }
.hero::after { content: ""; position: absolute; inset: 7px; border: 1px solid rgba(232,207,142,.25); border-radius: 18px; pointer-events: none; }
.hero-grid { display: grid; gap: 26px; align-items: center; position: relative; z-index: 1; }
@media (min-width: 700px) { .hero { padding: 44px 44px 40px; } .hero-grid { grid-template-columns: 1.3fr .9fr; gap: 36px; } }
.hero .eyebrow { color: var(--gold-2); }
.hero .eyebrow::before { background: var(--gold-2); }
.hero h1 { font-size: clamp(2.2rem, 8.4vw, 3.3rem); line-height: 1.04; margin-bottom: 16px; }
.hero h1 .gold-text { display: block; padding-bottom: .06em; }
.hero .kicker { font-family: var(--display); font-style: italic; font-weight: 500; font-size: 1.2rem; color: #ece4cf; margin: 0 0 2px; }
.hero .lead { color: #d6e4df; }
.hero .note { color: #a9c0b9; }
.hero .btn-link { color: var(--gold-2); }
.arch { position: relative; width: min(230px, 62vw); margin: 0 auto 14px; aspect-ratio: 440 / 560; border-radius: 999px 999px 18px 18px; padding: 5px; background: var(--gold-grad); box-shadow: 0 22px 44px -14px rgba(0,0,0,.75); }
.arch-bg { position: absolute; inset: 5px; border-radius: 999px 999px 14px 14px; overflow: hidden;
  background: radial-gradient(circle at 50% 30%, rgba(0,201,167,.4), transparent 60%), radial-gradient(ellipse 55% 9% at 50% 93%, rgba(0,0,0,.5), transparent 70%), linear-gradient(180deg, #0f5148, #052723 70%, #031c19);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.arch img { position: absolute; z-index: 1; left: 50%; bottom: 12px; transform: translateX(-50%); width: 96%; height: auto; max-width: none; filter: drop-shadow(0 12px 16px rgba(0,0,0,.45)); }
.arch-tag { position: absolute; left: 50%; bottom: -15px; transform: translateX(-50%); z-index: 2; white-space: nowrap; background: var(--night); color: var(--gold-2); border: 1px solid var(--gold); border-radius: 999px; padding: 6px 14px; font-size: .68rem; letter-spacing: .18em; text-transform: uppercase; font-weight: 600; }
@media (max-width: 699px) { .hero-art { order: -1; } .arch { width: min(196px, 56vw); } }
.facts-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 22px 0; }
.fact { border: 1px solid rgba(232,207,142,.35); border-radius: 14px; padding: 12px 6px; text-align: center; background: rgba(255,255,255,.03); }
.fact b { display: block; font-family: var(--display); font-size: 1.5rem; font-weight: 600; line-height: 1.15; background: var(--gold-grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fact span { font-size: .7rem; color: #b5cbc4; text-transform: uppercase; letter-spacing: .1em; }
.topic-list { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.topic-list li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-2); }
.topic-list li::before { content: ""; flex: 0 0 9px; height: 9px; margin-top: .5em; transform: rotate(45deg); background: var(--gold-grad); box-shadow: 0 0 0 3px #f6eedb; }
.cohort-banner { display: inline-flex; gap: 8px; align-items: center; background: rgba(232,207,142,.1); border: 1px solid rgba(232,207,142,.4); color: var(--gold-2); padding: 7px 14px; border-radius: 999px; font-weight: 600; margin-bottom: 18px; font-size: .86rem; }
.hero .alert-warn { margin-bottom: 16px; }
.preview-banner { background: var(--gold-grad); color: #241a06; text-align: center; padding: 8px 12px; font-size: .85rem; font-weight: 700; letter-spacing: .02em; }

/* assessment */
.quiz-top { position: sticky; top: 0; z-index: 5; padding: 12px 0 14px; color: #e9f2ef;
  background: linear-gradient(180deg, rgba(3,28,25,.97) 72%, rgba(3,28,25,0)); }
.quiz-top .muted { color: #9fb8b1; }
.progress { height: 8px; border-radius: 99px; background: rgba(255,255,255,.1); overflow: hidden; box-shadow: inset 0 0 0 1px rgba(232,207,142,.2); }
.progress > span { display: block; height: 100%; background: linear-gradient(90deg, var(--teal), var(--teal-bright) 60%, var(--gold-2)); border-radius: 99px; transition: width .3s; }
.q-stem { font-family: var(--font); font-size: 1.15rem; font-weight: 600; line-height: 1.45; margin: 12px 0 18px; }
@media (min-width: 640px) { .q-stem { font-size: 1.25rem; } }
.options { display: grid; gap: 10px; border: 0; padding: 0; margin: 0; }
.option { position: relative; display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px; min-height: 56px; border: 1.5px solid var(--line-2); border-radius: 13px; background: #fff; cursor: pointer; transition: border-color .12s, background .12s, box-shadow .12s; }
.option:hover { border-color: #9fcfc3; }
.option input { position: absolute; opacity: 0; pointer-events: none; }
.option .dot { flex: 0 0 22px; height: 22px; border-radius: 50%; border: 2px solid var(--line-2); margin-top: 1px; display: grid; place-items: center; background: #fff; }
.option.selected { border-color: var(--teal); background: var(--teal-50); box-shadow: 0 0 0 1px var(--teal), 0 8px 18px -12px rgba(0,128,107,.6); }
.option.selected .dot { border-color: var(--teal); background: var(--teal); box-shadow: inset 0 0 0 4px #fff; }
.option:has(input:focus-visible) { box-shadow: var(--focus); }
.option .key { font-weight: 700; color: var(--muted); min-width: 1.2em; }
.quiz-nav { display: grid; grid-template-columns: 1fr 1.4fr; gap: 10px; margin-top: 22px; }
.save-state { font-size: .85rem; min-height: 1.4em; display: flex; gap: 8px; align-items: center; }
.save-state.bad { color: var(--bad); font-weight: 600; }
.under-card { margin-top: 14px; }
.under-card .btn-link { color: var(--gold-2); }
.under-card .muted { color: #9fb8b1; }
.grid-nums { display: grid; grid-template-columns: repeat(auto-fill, minmax(48px, 1fr)); gap: 8px; }
.num { min-height: 48px; border-radius: 11px; border: 1.5px solid var(--line-2); background: #fff; font-weight: 600; cursor: pointer; }
.num.answered { background: var(--teal); border-color: var(--teal-700); color: #fff; }
.num.current { box-shadow: 0 0 0 2px var(--gold); }

/* results */
.score-ring { --p: 0; width: 148px; height: 148px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; position: relative;
  background: radial-gradient(closest-side, var(--surface) 79%, transparent 80% 100%), conic-gradient(var(--ring, var(--teal)) calc(var(--p) * 1%), #ece6d6 0); }
.score-ring::before { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 1px solid rgba(201,164,92,.6); }
.score-ring b { font-family: var(--display); font-size: 2.2rem; font-weight: 600; display: block; line-height: 1; } .score-ring span { font-size: .8rem; color: var(--muted); }
.result-head { text-align: center; }
/* mascot cheering from the corner of the start form */
.has-peek { margin-top: 64px; }
.peek { position: absolute; z-index: 2; left: 14px; top: -78px; width: 92px; height: auto; filter: drop-shadow(0 10px 12px rgba(0,0,0,.35)); pointer-events: none; }
.has-peek .eyebrow, .has-peek h1 { padding-left: 84px; }
@media (min-width: 640px) { .peek { width: 112px; top: -96px; left: 28px; } .has-peek .eyebrow, .has-peek h1 { padding-left: 104px; } }
/* gold medallion with the mascot breaking out of the top */
.pop { --s: 140px; position: relative; width: var(--s); height: var(--s); margin: 52px auto 16px; flex: 0 0 auto; }
.pop::before { content: ""; position: absolute; inset: 0; border-radius: 50%; background: var(--gold-grad); box-shadow: 0 14px 30px -12px rgba(3,28,25,.6); }
.pop::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: radial-gradient(circle at 50% 30%, #0f5a4f, #031c19 75%); }
.pop-clip { position: absolute; z-index: 1; left: -40px; right: -40px; bottom: 0; height: calc(var(--s) * 1.42);
  -webkit-mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--s) / 2) no-repeat, radial-gradient(circle calc(var(--s) / 2 - 5px) at 50% calc(100% - var(--s) / 2), #000 98%, transparent 100%);
          mask: linear-gradient(#000 0 0) top / 100% calc(100% - var(--s) / 2) no-repeat, radial-gradient(circle calc(var(--s) / 2 - 5px) at 50% calc(100% - var(--s) / 2), #000 98%, transparent 100%); }
.pop-clip img { position: absolute; left: 50%; bottom: 0; transform: translateX(-50%); height: 100%; width: auto; max-width: none; }
.result-split { display: grid; gap: 8px; justify-items: center; }
@media (min-width: 560px) { .result-split { grid-template-columns: auto auto; gap: 32px; justify-content: center; align-items: center; } .result-split .score-ring { margin: 0 0 14px; } .result-split .pop { margin: 52px 0 14px; } }
.topic-row { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-top: 1px solid var(--line); align-items: flex-start; }
.topic-row:first-child { border-top: 0; }
.bar { height: 6px; border-radius: 9px; background: var(--line); overflow: hidden; margin-top: 6px; } .bar > span { display: block; height: 100%; background: var(--teal); }
.celebrate { position: relative; }
.confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; border-radius: var(--radius); }
.confetti i { position: absolute; top: -10px; width: 7px; height: 12px; border-radius: 2px; opacity: 0; animation: fall 2.4s ease-out forwards; }
@keyframes fall { 0% { opacity: 1; transform: translateY(0) rotate(0); } 100% { opacity: 0; transform: translateY(340px) rotate(540deg); } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .progress > span { transition: none; } }
.cert-preview { border-radius: 14px; overflow: hidden; border: 1px solid var(--gold); background: var(--night); margin-top: 18px; box-shadow: 0 18px 36px -18px rgba(3,28,25,.7); }
.cert-preview img { display: block; width: 100%; height: auto; }
.share-tiles { display: grid; gap: 10px; margin-top: 14px; }
@media (min-width: 640px) { .share-tiles { grid-template-columns: repeat(3, 1fr); } }
.share-tile { display: flex; gap: 12px; align-items: flex-start; text-align: left; padding: 16px; border-radius: 14px; border: 1.5px solid var(--line-2); background: #fff; color: var(--ink); text-decoration: none; cursor: pointer; font: inherit; transition: border-color .15s, box-shadow .15s, transform .05s; }
.share-tile:hover:not([disabled]) { border-color: var(--teal); box-shadow: 0 10px 22px -14px rgba(0,89,75,.55); }
.share-tile:active { transform: translateY(1px); }
.share-tile[disabled] { opacity: .6; cursor: progress; }
.share-tile b { display: block; font-size: 1rem; margin-bottom: 3px; }
.share-tile span span { display: block; font-size: .82rem; color: var(--muted); line-height: 1.45; }
.tile-ico { flex: 0 0 42px; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; }
.tile-ico .ico { width: 24px; height: 24px; }
.tile-ico.li { background: #e8f1fb; }
.tile-ico.ig { color: #fff; background: radial-gradient(circle at 30% 110%, #fdf497 0%, #fd5949 45%, #d6249f 60%, #285AEB 90%); }
.share-more { margin-top: 12px; gap: 8px; }
.share-grid { display: grid; gap: 10px; }
@media (min-width: 560px) { .share-grid { grid-template-columns: 1fr 1fr; } }
.share-grid .btn { justify-content: flex-start; }
.ico { width: 20px; height: 20px; flex: 0 0 20px; }

/* message pages & verify */
.message { text-align: center; }
.message-icon { width: 56px; height: 56px; border-radius: 50%; margin: 0 auto 16px; display: grid; place-items: center; font-weight: 700; font-size: 1.4rem; background: var(--teal-50); color: var(--teal-700); box-shadow: 0 0 0 1px rgba(201,164,92,.6), 0 0 0 5px #fbf6ea; }
.message.error .message-icon { background: var(--bad-bg); color: var(--bad); } .message.success .message-icon { background: var(--good-bg); color: var(--good); }
.message form { margin-top: 12px; }
.verify .verify-status { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 18px; font-weight: 500; }
.verify-name { font-family: var(--display); font-weight: 600; font-size: clamp(2rem, 7.4vw, 2.9rem); overflow-wrap: anywhere; }
.facts { display: grid; gap: 10px; margin: 18px 0; } .facts div { display: flex; justify-content: space-between; gap: 12px; border-bottom: 1px solid var(--line); padding-bottom: 8px; }
.facts dt { color: var(--muted); } .facts dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }
.verify-art { border-radius: 12px; width: 100%; height: auto; margin: 6px 0 16px; border: 1px solid var(--gold); }
.verify.is-revoked .verify-name { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 2px; }
.page-foot { text-align: center; color: #8fa9a2; font-size: .8rem; margin-top: 26px; letter-spacing: .04em; }
.page-foot b { color: var(--gold-2); font-weight: 600; }
.page-foot a { color: #8fa9a2; text-underline-offset: 3px; }
.page-foot a:hover { color: var(--gold-2); }
.back-link { text-align: center; margin-top: 14px; }
.back-link .btn-link { color: var(--gold-2); }

/* toast */
.toast-wrap { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 80; display: grid; gap: 8px; width: min(92vw, 420px); }
.toast { background: var(--night-2); color: #fff; padding: 12px 16px; border-radius: 12px; box-shadow: var(--shadow); font-size: .92rem; border: 1px solid rgba(201,164,92,.5); }
.toast.bad { background: var(--bad); border-color: transparent; }

/* ================= ADMIN ================= */
html:has(body.admin) { background: #f4f2ec; }
body.admin { background: #f4f2ec; font-size: 15px; }
body.admin::before { display: none; }
body.admin h1, body.admin h2 { font-family: var(--font); font-weight: 700; letter-spacing: -.01em; }
body.admin .topbar h1, body.admin .login-wrap h1 { font-family: var(--display); font-weight: 600; letter-spacing: 0; }
body.admin .card::after { display: none; }
body.admin .card { border-color: var(--line); box-shadow: 0 1px 2px rgba(3,28,25,.06), 0 8px 24px rgba(3,28,25,.06); }
.shell { display: grid; grid-template-columns: 1fr; min-height: 100vh; }
@media (min-width: 960px) { .shell { grid-template-columns: 240px 1fr; } }
.side { background: linear-gradient(180deg, #062925, var(--night)); color: #cfe0db; padding: 18px 12px; display: flex; flex-direction: column; gap: 4px; border-right: 1px solid rgba(201,164,92,.35); }
@media (max-width: 959px) { .side { flex-direction: row; overflow-x: auto; align-items: center; padding: 10px; position: sticky; top: 0; z-index: 20; border-right: 0; border-bottom: 1px solid rgba(201,164,92,.35); } .side .brand-name, .side .side-foot, .side .side-label { display: none; } }
.side .brand { color: #fff; padding: 4px 8px 16px; }
.side a.nav { display: flex; align-items: center; gap: 10px; color: #cfe0db; text-decoration: none; padding: 9px 12px; border-radius: 9px; font-weight: 500; white-space: nowrap; border: 1px solid transparent; }
.side a.nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.side a.nav[aria-current="page"] { background: rgba(0,201,167,.12); color: #fff; border-color: rgba(232,207,142,.45); box-shadow: inset 3px 0 0 var(--gold); }
.side-label { font-size: .68rem; text-transform: uppercase; letter-spacing: .16em; color: var(--gold); padding: 16px 12px 4px; }
.side-foot { margin-top: auto; padding: 12px; font-size: .8rem; color: #9fb8b1; }
.side-foot button { color: var(--gold-2); }
.side .brand-wordmark { height: 30px; }
.side .brand { flex-direction: column; align-items: flex-start; gap: 6px; }
.side .brand-wordmark + .brand-name span { border: 0; padding-left: 2px; font-size: .95rem; }
.main { padding: 20px 16px 60px; min-width: 0; }
@media (min-width: 960px) { .main { padding: 28px 34px 60px; } }
.topbar { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; padding-bottom: 14px; border-bottom: 1px solid #e4dcc7; }
.topbar h1 { font-size: 1.7rem; margin: 0; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px; }
.panel + .panel, .panel-gap { margin-top: 16px; }
.panel h2 { font-size: 1.05rem; margin-bottom: 12px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; text-decoration: none; color: inherit; display: block; position: relative; overflow: hidden; }
.kpi::before { content: ""; position: absolute; left: 0; top: 0; right: 0; height: 3px; background: var(--gold-grad); opacity: .8; }
a.kpi:hover { border-color: #9fcfc3; }
.kpi .v { font-family: var(--display); font-size: 1.75rem; font-weight: 600; line-height: 1.15; font-variant-numeric: lining-nums tabular-nums; }
.kpi .k { font-size: .8rem; color: var(--muted); font-weight: 500; }
.kpi.accent { background: linear-gradient(160deg, #0a3c35, #052723); border-color: var(--gold); color: #fff; }
.kpi.accent .k { color: #b5cbc4; } .kpi.accent .v { color: var(--gold-2); }
.two-col { display: grid; gap: 16px; } @media (min-width: 1100px) { .two-col { grid-template-columns: 1fr 1fr; } }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
table.t { width: 100%; border-collapse: collapse; font-size: .9rem; }
.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: .76rem; text-transform: uppercase; letter-spacing: .07em; padding: 10px 12px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; position: sticky; top: 0; }
.t td { padding: 11px 12px; border-bottom: 1px solid #f1ede2; vertical-align: top; }
.t tr:last-child td { border-bottom: 0; }
.t tr.clickable { cursor: pointer; } .t tr.clickable:hover td { background: #f3faf8; }
.t .num-cell { text-align: right; font-variant-numeric: tabular-nums; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; margin-bottom: 12px; }
.filters .input { min-height: 40px; padding: 7px 10px; width: auto; }
.filters select.input { padding-right: 34px; background-position: right 11px center; }
.filters label { font-size: .78rem; color: var(--muted); font-weight: 600; display: grid; gap: 4px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 12px; }
.chip { border: 1px solid var(--line-2); background: #fff; padding: 6px 12px; border-radius: 999px; font-size: .85rem; cursor: pointer; font-weight: 500; }
.chip[aria-pressed="true"] { background: var(--night-2); color: var(--gold-2); border-color: var(--night-2); }
.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px; text-decoration: none; color: var(--muted); font-weight: 600; border-bottom: 2px solid transparent; white-space: nowrap; }
.tabs a[aria-current="page"] { color: var(--teal-700); border-color: var(--gold); }
.empty { text-align: center; padding: 36px 16px; color: var(--muted); }
.empty b { display: block; color: var(--ink); font-size: 1.05rem; margin-bottom: 4px; }
.hbar { display: grid; grid-template-columns: minmax(120px, 1fr) 2fr auto; gap: 10px; align-items: center; padding: 6px 0; font-size: .9rem; }
.hbar .track { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; } .hbar .track span { display: block; height: 100%; background: var(--bad); opacity: .75; }
.qcard { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; background: #fff; }
.qcard + .qcard { margin-top: 10px; }
.qcard ol { margin: 8px 0; padding-left: 0; list-style: none; display: grid; gap: 4px; }
.qcard ol li { padding: 6px 10px; border-radius: 8px; background: var(--surface-2); font-size: .9rem; }
.qcard ol li.correct { background: var(--good-bg); color: #0d5234; font-weight: 600; }
.correct-opt { color: var(--good); font-weight: 600; }
.excerpt { border-left: 3px solid var(--gold); padding: 4px 10px; color: var(--ink-2); font-size: .85rem; margin: 8px 0; background: var(--surface-2); border-radius: 0 8px 8px 0; }
.modal-back { position: fixed; inset: 0; background: rgba(3,28,25,.55); z-index: 60; display: grid; place-items: center; padding: 16px; }
.modal { background: #fff; border-radius: 16px; width: min(640px, 100%); max-height: 90vh; overflow: auto; padding: 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); border-top: 3px solid var(--gold); }
.modal.wide { width: min(920px, 100%); }
.modal h2 { margin-bottom: 14px; }
.drawer-back { position: fixed; inset: 0; background: rgba(3,28,25,.4); z-index: 60; }
.drawer { position: fixed; right: 0; top: 0; bottom: 0; width: min(560px, 100%); background: #fff; z-index: 61; overflow: auto; padding: 22px; box-shadow: -10px 0 40px rgba(0,0,0,.15); border-left: 3px solid var(--gold); }
.linkbox { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 6px 6px 6px 12px; }
.linkbox code { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: .85rem; }
.preview-img { width: 100%; border-radius: 10px; border: 1px solid var(--line); }
.textpreview { white-space: pre-wrap; font-size: .85rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 12px; max-height: 50vh; overflow: auto; }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 70px 16px 16px; background: radial-gradient(900px 600px at 80% 0%, #0d4a41, transparent 60%), var(--night); }
.login-wrap .card { width: min(420px, 100%); border-color: rgba(201,164,92,.55); padding-top: 0; }
body.admin .login-wrap .card::after { display: block; }
.login-wrap .card { padding-top: 0; } .login-wrap .pop { margin-top: -30px; margin-bottom: 14px; }
.login-wrap .login-brand { display: block; height: 28px; margin: 0 auto 6px; }
.dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 16px; font-size: .9rem; } .dl dt { color: var(--muted); } .dl dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; padding: 0; margin: 0; } .timeline li { padding: 8px 0; border-top: 1px solid var(--line); font-size: .88rem; } .timeline li:first-child { border-top: 0; }

/* logo swatches (settings) */
.logo-swatches { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.swatch { border-radius: 12px; padding: 18px 14px 10px; display: grid; gap: 10px; justify-items: center; border: 1px solid var(--line); }
.swatch.dark { background: var(--night-2); color: #b5cbc4; } .swatch.light { background: #fcfbf8; color: var(--muted); }
.swatch span { font-size: .75rem; }
.swatch img.wm { height: 30px; width: auto; max-width: 100%; } .swatch img.sq { width: 56px; height: 56px; border-radius: 12px; object-fit: cover; }
/* Certificate heading (certification Settings) */
.cert-heading { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px 16px; margin: 6px 0 14px; }
.cert-heading legend { font-weight: 700; padding: 0 6px; }
.color-row { display: grid; grid-template-columns: 1fr auto; gap: 12px; align-items: end; }
.color-pick { display: grid; gap: 4px; justify-items: center; margin-bottom: 14px; cursor: pointer; }
.color-pick input[type=color] { width: 52px; height: 42px; padding: 3px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface, #fff); cursor: pointer; }
.swatches { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.swatch { width: 22px; height: 22px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatches span { margin-right: 10px; }
