/* TechNetBuddy user portal (/account/). Uses the variables of style.css. */

.acct { max-width: 620px; display: grid; gap: 20px; }
.acct--wide { max-width: 940px; }

.acct-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 24px; box-shadow: var(--sh-xs);
}
.acct-card > :last-child { margin-bottom: 0; }
.acct-card p { margin-bottom: 12px; }
.acct-h2 { font-size: 1.12rem; margin: 0 0 12px; color: var(--ink); }
.acct-grid { display: grid; gap: 20px; grid-template-columns: repeat(2, 1fr); }
.acct-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

.acct-form { display: grid; gap: 16px; }
.acct-form .btn { justify-self: start; }
.acct-form p { margin: 0; }
.acct-alt { gap: 12px; }
.acct-form--wide textarea { min-height: 180px; }

.acct-note { border-radius: var(--r-md); padding: 14px 18px; border: 1px solid var(--line); }
.acct-note p { margin: 0; }
.acct-note--ok  { background: #eaf7f1; border-color: #bfe6d5; color: #0d5b40; }
.acct-note--bad { background: #fdeef0; border-color: #f5c6cd; color: #8f1d2f; }

/* Account menu */
.acct-nav {
  display: flex; flex-wrap: wrap; align-items: center; gap: 6px;
  padding-bottom: 14px; border-bottom: 1px solid var(--line);
}
.acct-nav a {
  padding: 7px 12px; border-radius: var(--r-sm); color: var(--slate);
  font-size: .92rem; font-weight: 600; text-decoration: none;
}
.acct-nav a:hover { color: var(--brand); background: var(--brand-soft); }
.acct-nav a.is-here { color: var(--brand); background: var(--brand-soft); }
.acct-nav__who { margin-left: auto; color: var(--muted); font-size: .88rem; padding-right: 6px; }
.acct-nav form { margin: 0; }

/* Dashboard */
.acct-big { font-size: 2.4rem; font-weight: 750; color: var(--ink); line-height: 1.1; margin-bottom: 12px; }
.acct-big span { font-size: 1rem; font-weight: 500; color: var(--muted); }
.acct-bar { width: 100%; height: 10px; border: 0; border-radius: var(--r-pill); background: var(--frost); overflow: hidden; appearance: none; -webkit-appearance: none; }
.acct-bar::-webkit-progress-bar { background: var(--frost); border-radius: var(--r-pill); }
.acct-bar::-webkit-progress-value { background: var(--brand); border-radius: var(--r-pill); }
.acct-bar::-moz-progress-bar { background: var(--brand); border-radius: var(--r-pill); }
.acct-tracks { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.acct-tracks li { display: grid; grid-template-columns: minmax(120px, 220px) 1fr 76px; gap: 14px; align-items: center; }
.acct-tracks__name { font-weight: 600; color: var(--ink); font-size: .94rem; }
.acct-tracks__n { font-size: .86rem; color: var(--muted); text-align: right; white-space: nowrap; }
.acct-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.acct-list li { line-height: 1.45; }

.acct-certs { list-style: none; margin: 16px 0 0; padding: 0; display: grid; gap: 12px; }
.acct-certs li {
  display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between;
  padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--r-sm); background: var(--pearl);
}

.acct-danger { border-color: #f5c6cd; }
.acct-danger__btn { color: #a8233a; border-color: #f0b6bf; }
.acct-danger__btn:hover { background: #fdeef0; color: #8f1d2f; }

/* Stories */
.story__body { white-space: normal; overflow-wrap: anywhere; color: var(--slate); line-height: 1.65; }

/* Certificate */
.cert {
  background: var(--white); border: 2px solid var(--brand); outline: 1px solid var(--line-strong); outline-offset: 6px;
  border-radius: var(--r-md); padding: 48px 32px; text-align: center; margin: 8px;
}
.cert p { margin: 0; }
.cert__brand { font-size: 1.3rem; font-weight: 750; color: var(--brand); letter-spacing: .01em; }
.cert__kind { margin-top: 6px; text-transform: uppercase; letter-spacing: .16em; font-size: .82rem; color: var(--muted); }
.cert__line { margin-top: 22px; color: var(--slate); }
.cert__name { margin-top: 10px; font-size: 2.1rem; font-weight: 750; color: var(--ink); line-height: 1.2; overflow-wrap: anywhere; }
.cert__track { margin-top: 10px; font-size: 1.5rem; font-weight: 700; color: var(--brand-deep); }
.cert__meta { margin-top: 30px; font-size: .92rem; color: var(--slate); }
.cert__verify { margin-top: 6px; font-size: .82rem; color: var(--muted); overflow-wrap: anywhere; }
.cert__small { margin-top: 18px; font-size: .78rem; color: var(--muted); }
.cert-actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; }

@media (max-width: 720px) {
  .acct-grid { grid-template-columns: 1fr; }
  .acct-tracks li { grid-template-columns: 1fr 70px; }
  .acct-tracks__name { grid-column: 1 / -1; }
  .acct-nav__who { margin-left: 0; width: 100%; }
  .cert { padding: 32px 18px; }
  .cert__name { font-size: 1.6rem; }
}

/* Printing a certificate: only the certificate, on one page. */
@media print {
  .header, .footer, .banner, .progress, .totop, .skip-link, .acct-nav, .cert-actions { display: none !important; }
  .section { padding: 0 !important; }
  .acct, .acct--wide { max-width: none; }
  .cert { margin: 24px; padding: 64px 40px; box-shadow: none; break-inside: avoid; }
}
