/* Certificates of achievement (#/certificates, the one-time notice, and the
   Team accounts panel). Shell tokens only, so tenant accents and the dark theme
   carry over. The preview borrows the printed certificate's double rule. */
.certificates{display:flex;flex-direction:column;gap:clamp(16px,3vw,24px);padding-bottom:40px}
.cert-head h1{font-size:clamp(28px,5vw,40px);font-weight:800;letter-spacing:-.015em;margin:0}
.cert-kicker{font:600 12px/1 "IBM Plex Mono",monospace;letter-spacing:.1em;text-transform:uppercase;color:color-mix(in srgb,var(--accent-deep) 82%,var(--ink));margin:0 0 10px}
.cert-lede{font-size:17px;color:var(--ink-2);max-width:62ch;margin:8px 0 0}
.cert-list{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,340px),1fr));gap:clamp(14px,2.4vw,22px)}
.cert-list[aria-busy=true]{min-height:120px}

.cert-card{display:flex;flex-direction:column;background:var(--surface);border:1px solid var(--edge);border-radius:14px;overflow:hidden;min-width:0}
.cert-card.is-revoked .cert-preview{filter:grayscale(1);opacity:.6}
.cert-preview{--paper:color-mix(in srgb,var(--accent-wash) 40%,var(--surface));position:relative;display:flex;flex-direction:column;align-items:center;
  gap:6px;margin:14px 14px 0;padding:22px 18px 16px;text-align:center;background:var(--paper);border:2px solid color-mix(in srgb,var(--ink) 70%,var(--accent-deep));
  outline:1px solid color-mix(in srgb,var(--ink) 70%,var(--accent-deep));outline-offset:-6px;border-radius:4px;min-width:0}
.cert-preview::after{content:"";position:absolute;inset:9px;border:1px solid color-mix(in srgb,var(--accent) 70%,transparent);pointer-events:none}
.cert-preview-eyebrow{font:600 10px/1.2 "IBM Plex Mono",monospace;letter-spacing:.18em;text-transform:uppercase;color:var(--ink-2)}
.cert-preview-name{font-weight:800;font-size:clamp(17px,4vw,21px);line-height:1.15;color:var(--ink);max-width:100%;overflow-wrap:anywhere}
.cert-preview-title{font-weight:700;font-size:14px;color:color-mix(in srgb,var(--accent-deep) 55%,var(--ink));max-width:100%;overflow-wrap:anywhere}
.cert-preview-foot{display:flex;flex-wrap:wrap;justify-content:center;gap:4px 14px;margin-top:6px;font-size:12px;color:var(--mute)}

.cert-card-body{display:flex;flex-direction:column;gap:12px;padding:16px 18px 18px}
.cert-card-head{display:flex;align-items:flex-start;justify-content:space-between;gap:10px}
.cert-card-title{font-size:18px;font-weight:800;margin:0;overflow-wrap:anywhere;min-width:0}
.cert-pill{flex:none;white-space:nowrap}
.cert-valid{background:var(--good-wash);border-color:var(--good);color:var(--good)}
.cert-revoked{background:var(--bad-wash);border-color:var(--bad);color:var(--bad)}
.cert-facts{display:grid;grid-template-columns:auto 1fr;gap:4px 14px;margin:0;font-size:14px}
.cert-facts div{display:contents}
.cert-facts dt{color:var(--mute)}
.cert-facts dd{margin:0;color:var(--ink);overflow-wrap:anywhere}
.cert-actions{display:flex;flex-wrap:wrap;gap:8px}
.cert-actions .btn{text-decoration:none}
.cert-status{margin:0;font-size:14px;color:var(--ink-2);min-height:0}
.cert-status:empty{display:none}
.cert-danger{color:var(--bad);border-color:var(--bad)}
.cert-confirm{display:flex;flex-direction:column;gap:8px;padding:12px;border:1px solid var(--edge);border-radius:10px;background:var(--raise)}
.cert-confirm[hidden]{display:none}
.cert-confirm p{margin:0;color:var(--ink-2);font-size:14px}
.cert-confirm label{font-size:14px;font-weight:600}
.cert-confirm textarea{font:inherit;font-size:15px;color:var(--ink);background:var(--surface);border:1.5px solid var(--edge);border-radius:8px;padding:8px 10px;width:100%;box-sizing:border-box;resize:vertical}
.cert-confirm .btn{align-self:flex-start}

.cert-empty{display:flex;flex-direction:column;align-items:center;text-align:center;gap:8px;padding:clamp(24px,5vw,44px) 20px;border:1.5px dashed var(--edge);border-radius:14px;color:var(--ink-2)}
.cert-empty h2{margin:0;font-size:22px;font-weight:800;color:var(--ink)}
.cert-empty p{margin:0;max-width:52ch}
.cert-empty .cert-mark{width:44px;height:55px;color:var(--accent-deep)}
.cert-empty-links{display:flex;flex-wrap:wrap;justify-content:center;gap:8px;margin-top:8px!important}

.cert-manage{display:grid;grid-template-columns:repeat(auto-fill,minmax(min(100%,300px),1fr));gap:14px;margin:12px 0}
.cert-manage .cert-card-title{font-size:16px}

.cert-toast{position:fixed;z-index:60;left:50%;transform:translateX(-50%);bottom:calc(16px + env(safe-area-inset-bottom,0px));
  width:min(560px,calc(100vw - 24px));box-sizing:border-box;display:grid;grid-template-columns:auto 1fr;gap:6px 14px;align-items:center;
  padding:14px 16px;background:var(--surface);color:var(--ink);border:1px solid var(--edge);border-left:4px solid var(--accent-deep);
  border-radius:12px;box-shadow:0 18px 40px -18px rgba(0,0,0,.45)}
.cert-toast .cert-mark{width:30px;height:38px;color:var(--accent-deep);grid-row:span 2}
.cert-toast-text{display:flex;flex-direction:column;gap:2px;min-width:0}
.cert-toast-text strong{font-size:16px}
.cert-toast-text span{font-size:14px;color:var(--ink-2);overflow-wrap:anywhere}
.cert-toast .btn{justify-self:start}
.cert-toast .cert-toast-close{grid-column:2;justify-self:start}
@media (min-width:560px){.cert-toast{grid-template-columns:auto 1fr auto auto}.cert-toast .cert-mark{grid-row:auto}.cert-toast .cert-toast-close{grid-column:auto}}
@media (max-width:699px){.cert-toast{bottom:calc(84px + env(safe-area-inset-bottom,0px))}}
@media (prefers-reduced-motion:no-preference){.cert-toast{animation:cert-rise .35s ease-out}}
@keyframes cert-rise{from{opacity:0;transform:translate(-50%,12px)}to{opacity:1;transform:translate(-50%,0)}}

/* the avatar menu's link reads like its neighbouring buttons, not like a visited link */
.topnav .cert-nav{color:var(--ink);text-decoration:none;display:flex;align-items:center;justify-content:center}
