/* Phase 1-only additions. Shared styles stay in ../styles.css. */

/* Guest nav: Log in is a text link; Sign up (and My account when signed in) is the pill. */
.site-nav a[href="login.html"] {
  color: var(--muted);
  background: transparent;
}
.site-nav a[href="login.html"]:hover {
  color: var(--ink);
  background: color-mix(in srgb, var(--bg) 70%, white);
  filter: none;
}
.site-nav a[href="login.html"][aria-current="page"] {
  color: var(--accent);
  background: var(--accent-soft);
}
.site-nav a[href="signup.html"],
.site-nav a[href="account.html"] {
  color: var(--accent-ink);
  background: var(--accent);
}
.site-nav a[href="signup.html"]:hover,
.site-nav a[href="account.html"]:hover {
  color: var(--accent-ink);
  filter: brightness(1.05);
}
.site-nav a[href="signup.html"][aria-current="page"],
.site-nav a[href="account.html"][aria-current="page"] {
  color: var(--accent-ink);
  background: var(--accent);
}

@media (max-width: 720px) {
  .site-nav { gap: 0.15rem; }
  .site-nav a { font-size: 0.75rem; padding: 0.32rem 0.55rem; }
}

/* Guest receipt email on the paywall */
.panel .guest-email { margin: 1rem 0 1.05rem; }
.panel .guest-email label {
  display: block;
  font-size: 0.78rem;
  font-weight: 680;
  margin: 0 0 0.35rem;
  color: var(--ink-soft);
}
.panel .guest-email input {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
}
.panel .guest-email .field-hint { margin: 0.4rem 0 0; }

/* Terms checkbox */
.agree {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  margin: 0.35rem 0 1.05rem;
  font-size: 0.9rem;
  color: var(--ink-soft);
  line-height: 1.45;
  cursor: default;
}
.agree .chk { margin-top: 0.12rem; }

/* Auth extras */
.auth-wide { width: min(100%, 32rem); }
.auth .fine { margin: 0 0 0.85rem; }
.field textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: var(--bg);
  color: var(--ink);
  font: inherit;
  padding: 0.7rem 0.85rem;
  border-radius: var(--radius-sm);
  min-height: 5.5rem;
  resize: vertical;
}
.field .field-hint { margin: 0.4rem 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.4; }

.pw-meter {
  display: flex;
  gap: 0.3rem;
  margin: 0.45rem 0 0;
}
.pw-meter span {
  flex: 1;
  height: 0.28rem;
  border-radius: 999px;
  background: #e4e7ef;
}
.pw-meter[data-strength="strong"] span { background: #2f9e6b; }

.auth-error {
  background: #fdecea;
  border: 1px solid #f3c4c0;
  color: #8a2218;
  border-radius: var(--radius-sm);
  padding: 0.75rem 0.85rem;
  margin: 0 0 1rem;
  font-size: 0.9rem;
  line-height: 1.45;
}
.auth-error a { color: inherit; font-weight: 650; }

/* Account details + coming soon */
.account-panel {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.25rem 1.25rem 1.2rem;
  margin: 0 0 1.25rem;
}
.account-panel h2 {
  margin: 0 0 0.85rem;
  font-size: 1.15rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}
.account-email-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
  margin: 0 0 1.1rem;
}
.account-email-row .email-value { font-weight: 650; margin: 0; }
.badge-verified {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: #e8f7ef;
  color: #1d7a4d;
  font-size: 0.72rem;
  font-weight: 750;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.coming-panel {
  background: var(--accent-soft);
  border: 1px solid color-mix(in srgb, var(--accent) 22%, var(--line));
  border-radius: var(--radius);
  padding: 1.05rem 1.2rem;
  margin: 0 0 1.75rem;
}
.coming-panel h2 {
  margin: 0 0 0.3rem;
  font-size: 1.05rem;
  font-weight: 720;
  letter-spacing: -0.03em;
}
.coming-panel p { margin: 0; color: var(--ink-soft); max-width: 40rem; }

.gear-card .gear-actions { margin: 0.95rem 0 0; }

/* Email preview */
.email-preview-page {
  background: #e8eaf2;
  min-height: 100vh;
}
.email-chrome {
  width: min(100% - 2rem, 40rem);
  margin: 1.5rem auto 3rem;
}
.email-meta {
  background: #fff;
  border: 1px solid var(--line);
  border-bottom: 0;
  border-radius: var(--radius) var(--radius) 0 0;
  padding: 0.85rem 1.15rem 0.7rem;
  margin: 0;
}
.email-meta div { display: grid; grid-template-columns: 5.2rem 1fr; gap: 0.4rem; margin: 0 0 0.35rem; }
.email-meta dt {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.15rem;
}
.email-meta dd { margin: 0; font-size: 0.92rem; font-weight: 550; color: var(--ink); overflow-wrap: anywhere; }
.email-message {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.6rem 1.4rem 1.35rem;
}
.email-brand {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 750;
  letter-spacing: -0.03em;
  margin: 0 0 1.2rem;
}
.email-brand::before {
  content: "";
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  background:
    radial-gradient(circle at 50% 50%, transparent 28%, var(--accent) 29% 46%, transparent 47%),
    conic-gradient(from 20deg, var(--accent), var(--accent-2), var(--accent));
  flex-shrink: 0;
}
.email-message h1 {
  margin: 0 0 0.8rem;
  font-size: 1.55rem;
  font-weight: 760;
  letter-spacing: -0.04em;
}
.email-message p { margin: 0 0 0.85rem; color: var(--ink-soft); line-height: 1.55; }
.email-message .btn { display: inline-flex; margin: 0.4rem 0 1.1rem; }
.email-message .powered { margin: 1rem 0 0; color: var(--muted); font-size: 0.82rem; }
.email-message .email-fine { font-size: 0.82rem; color: var(--muted); }

@media (max-width: 620px) {
  .email-chrome { width: min(100% - 1.2rem, 40rem); margin-top: 1rem; }
  .email-meta div { grid-template-columns: 1fr; gap: 0.1rem; }
  .account-panel .btn { width: 100%; }
}

/* Admin location column and countries chart */
.admin-main .log th.loc,
.admin-main .log td.loc { white-space: nowrap; }
.dash-card.countries .bar-row {
  grid-template-columns: 7.6rem 1fr 2.6rem;
}

/* Five KPI tiles including Possible VPN */
.admin-main .kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 980px) {
  .admin-main .kpi-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 620px) {
  .admin-main .kpi-grid { grid-template-columns: 1fr; }
}

.status.vpn {
  background: #f8ead0;
  color: #8a5a12;
  cursor: default;
}
.vpn-flag {
  display: inline-flex;
  align-items: center;
  position: relative;
  margin-left: 0.35rem;
  vertical-align: middle;
}
.vpn-flag .info-pop { width: min(20rem, 70vw); }

.admin-log-cards { display: none; }
@media (max-width: 800px) {
  .admin-main .table-wrap { display: none; }
  .admin-log-cards { display: block; }
  .admin-log-card {
    background: var(--bg-elev);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    padding: 0.95rem 1rem 0.85rem;
    margin: 0 0 0.7rem;
  }
  .admin-log-card-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.75rem;
    margin: 0 0 0.55rem;
  }
  .admin-log-card-head strong { font-size: 1.02rem; }
  .admin-log-card-head .num { font-variant-numeric: lining-nums tabular-nums; font-weight: 700; }
  .admin-log-card .gear-facts { margin: 0; }
  .admin-log-card .loc, .admin-log-card .vpn-flag { white-space: normal; }
}

.status.zero-reading {
  white-space: normal;
  text-align: center;
  line-height: 1.25;
  letter-spacing: 0.04em;
  max-width: 8.4rem;
  padding: 0.22rem 0.45rem;
}
.admin-main .log .status.zero-reading,
.admin-log-card .status.zero-reading {
  white-space: normal;
}

/* Free photo checks and Extra service for Canon */
.status.free {
  background: var(--accent-soft);
  color: var(--accent);
}
a.stripe-btn { color: var(--accent-ink); }

.extra-kicker {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.65rem;
  margin: 0 0 0.65rem;
}
.canon-explain {
  margin: 0 0 0.85rem;
  color: var(--ink-soft);
  line-height: 1.55;
}
.extra-service {
  margin: 1.15rem 0 1.2rem;
  padding: 1rem 1.05rem 1.05rem;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--bg);
}
.pricing .free-price {
  margin-bottom: 0.15rem;
}
.pricing .usb-price {
  font-size: 1.8rem;
  margin: 0.35rem 0 0.2rem;
}
.pricing .extra-service .example-flag { margin-top: 0.2rem; }

/* History teaser */
.teaser-banner {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 1.1rem 1.2rem 1.15rem;
  margin: 0 0 1.2rem;
}
.teaser-banner.compact { margin-bottom: 1.4rem; }
.teaser-summary {
  margin: 0 0 0.35rem;
  font-size: 1.12rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}
.teaser-note {
  margin: 0 0 0.9rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.blur-text {
  filter: blur(8px);
  user-select: none;
  pointer-events: none;
  display: inline-block;
}
.locked-count-cell {
  white-space: nowrap;
}
.teaser-lock {
  display: inline-flex;
  vertical-align: middle;
  margin-left: 0.25rem;
  color: var(--muted);
}

/* Owner history + My gear */
.history-included {
  display: inline-block;
  margin: 0 0 0.7rem;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #0b7a55;
  background: var(--ok-soft);
  border-radius: var(--radius-pill);
  padding: 0.22rem 0.6rem;
}
.history-hint {
  margin: 0 0 0.7rem;
  font-size: 0.88rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.gear-actions .text-link { margin-left: 0.7rem; }
.owner-banner {
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  padding: 0.95rem 1.1rem 1rem;
  margin: 0 0 1.1rem;
}
.owner-banner .history-included { margin-bottom: 0.4rem; }
.owner-banner p:last-child {
  margin: 0;
  color: var(--ink-soft);
  line-height: 1.5;
}

/* Revenue split on dashboard KPI */
.rev-split {
  list-style: none;
  margin: 0.45rem 0 0;
  padding: 0;
  font-size: 0.75rem;
  color: var(--muted);
}
.rev-split li {
  display: flex;
  justify-content: space-between;
  gap: 0.5rem;
  line-height: 1.45;
}
.rev-split li span:last-child {
  font-weight: 650;
  color: var(--ink-soft);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

/* Shutter life remaining */
.life-meter {
  margin: 1.05rem 0 1.35rem;
  max-width: 28rem;
}
.life-label {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 0.35rem 0.45rem;
  margin: 0 0 0.45rem;
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -0.02em;
}
.life-est {
  font-weight: 550;
  color: var(--muted);
  font-size: 0.88rem;
}
.life-tip { margin-left: 0.1rem; }
.life-track {
  height: 0.55rem;
  border-radius: 999px;
  background: #e6e8f0;
  overflow: hidden;
}
.life-fill {
  height: 100%;
  border-radius: 999px;
}
.life-green .life-fill { background: #12b886; }
.life-amber .life-fill { background: #e3a008; }
.life-red .life-fill { background: #d14343; }
.life-count {
  margin: 0.4rem 0 0;
  color: var(--ink-soft);
  font-size: 0.9rem;
}
.life-unknown .life-label { color: var(--ink-soft); font-weight: 650; }

.life-cell {
  font-variant-numeric: lining-nums tabular-nums;
  font-weight: 680;
  white-space: nowrap;
}
.life-cell.life-green { color: #0b7a55; }
.life-cell.life-amber { color: #9a6700; }
.life-cell.life-red { color: #b42318; }

.life-pill {
  display: inline-block;
  margin-left: 0.45rem;
  padding: 0.12rem 0.45rem;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 720;
  letter-spacing: 0.02em;
  vertical-align: middle;
  white-space: nowrap;
}
.life-pill.life-green { background: var(--ok-soft); color: #0b7a55; }
.life-pill.life-amber { background: #f8ead0; color: #8a5a12; }
.life-pill.life-red { background: #f3e8e8; color: #8a3b3b; }
.life-pill.life-unknown { background: #f3f4f8; color: var(--muted); }

.recent-list .life-meta {
  color: inherit;
}

.life-tip.flagged {
  align-items: flex-start;
  vertical-align: middle;
  translate: 0 0.12rem;
}
.life-card-row { margin: 0.65rem 0 0; }

/* Keep Rated shutter life + Notes visible on the models table */
.admin-main table.log th:last-child,
.admin-main table.log td:last-child {
  text-align: left;
  white-space: normal;
  min-width: 11rem;
  max-width: 22rem;
}
.admin-main table.log th:nth-child(3) {
  white-space: nowrap;
}
.admin-main table.log td:nth-child(3) {
  white-space: normal;
  max-width: 9rem;
  line-height: 1.25;
}

@media (max-width: 800px) {
  .recent-list li {
    grid-template-areas: "cam count" "meta life";
  }
  .recent-list .life-cell {
    grid-area: life;
    justify-self: end;
    align-self: start;
    font-size: 0.82rem;
  }
  .recent-list li.has-flag {
    grid-template-areas: "cam count" "meta life" "pop pop";
  }
}

.life-cell.life-shutterless {
  color: var(--muted);
  font-weight: 550;
  white-space: normal;
  max-width: 8.2rem;
  line-height: 1.25;
}
@media (max-width: 800px) {
  .recent-list .life-cell.life-shutterless {
    max-width: 6.4rem;
    text-align: right;
  }
}

/* ShutterVerified wordmark: accent disc with a small tick */
.wordmark::before,
.email-brand::before {
  border-radius: 50%;
  background-color: var(--accent);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.4 8.3 6.5 11.3 12.6 4.7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 52%;
  background-size: 0.68rem 0.68rem;
}


/* Public certificate + A4 printable record */
.cert-page {
  --cert-paper: #f7f5ef;
  --cert-ink: #1c1f24;
  --cert-muted: #5c6158;
  --cert-line: #d9d4c8;
}

.cert-page .site-footer {
  margin-top: 0;
}

.cert-main {
  padding: 2rem 0 3.25rem;
}

.cert-url-example {
  margin: 0 0 1.15rem;
  font-size: 0.84rem;
  color: var(--muted);
  letter-spacing: -0.01em;
}
.cert-url-example code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.86rem;
  font-weight: 550;
  color: var(--ink-soft);
  background: transparent;
}

.cert-sheet {
  background: var(--cert-paper, #f7f5ef);
  color: var(--cert-ink, #1c1f24);
  border: 1px solid var(--cert-line, #d9d4c8);
  border-radius: 1rem;
  box-shadow: 0 18px 50px rgba(28, 31, 36, 0.07);
  padding: 2.15rem 2.25rem 1.85rem;
  position: relative;
  overflow: hidden;
}
.cert-sheet::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: var(--accent);
}

.cert-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.75rem;
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--cert-line, #d9d4c8);
}
.cert-sheet .wordmark {
  color: var(--cert-ink, #1c1f24);
  font-size: 1.12rem;
}

.cert-verified {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  margin: 0 0 1.35rem;
}
.cert-verified-mark {
  width: 2.85rem;
  height: 2.85rem;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #0f9d6e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.4 8.3 6.5 11.3 12.6 4.7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 52%;
  background-size: 1.55rem 1.55rem;
}
.cert-verified-word {
  font-size: 2.15rem;
  font-weight: 760;
  letter-spacing: -0.045em;
  line-height: 1;
}

.cert-camera {
  margin: 0 0 0.35rem;
  font-size: 1.35rem;
  font-weight: 680;
  letter-spacing: -0.03em;
}
.cert-sheet .count,
.cert-a4 .count,
.cert-seal-core .count,
.cert-listing-sheet .count {
  white-space: nowrap;
  overflow-wrap: normal;
  max-width: 100%;
  box-sizing: border-box;
}
.cert-sheet .count {
  background: none;
  color: var(--cert-ink, #1c1f24);
  -webkit-text-fill-color: var(--cert-ink, #1c1f24);
  font-size: clamp(3.4rem, 10vw, 5.4rem);
  margin-bottom: 0.2rem;
}
.cert-sheet .count-label {
  margin-bottom: 1.15rem;
}

.cert-sheet .life-meter {
  margin: 0 0 1.6rem;
  max-width: none;
}
.cert-sheet .life-track {
  background: #e4e0d6;
}
.cert-sheet .life-label {
  font-size: 1.02rem;
}
.cert-sheet .life-count {
  color: var(--cert-muted, #5c6158);
}

.cert-facts {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.85rem 1.5rem;
  margin: 0 0 1.35rem;
  padding: 1.1rem 0;
  border-top: 1px solid var(--cert-line, #d9d4c8);
  border-bottom: 1px solid var(--cert-line, #d9d4c8);
}
.cert-facts div { min-width: 0; }
.cert-facts dt {
  margin: 0 0 0.15rem;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cert-muted, #5c6158);
}
.cert-facts dd {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 650;
  letter-spacing: -0.02em;
}
.cert-id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 620;
  letter-spacing: 0.04em;
  font-size: 1.02rem;
}

.cert-issued {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0 0 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.cert-issued::before {
  content: "";
  width: 1.05rem;
  height: 1.05rem;
  flex-shrink: 0;
  border-radius: 50%;
  background-color: #0f9d6e;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'%3E%3Cpath d='M3.4 8.3 6.5 11.3 12.6 4.7' stroke='%23fff' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 50% 52%;
  background-size: 0.68rem 0.68rem;
}

.cert-bottom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1.15rem 1.25rem;
  align-items: start;
}
.cert-qr {
  width: 7.1rem;
  height: 7.1rem;
  display: block;
  border: 1px solid var(--cert-line, #d9d4c8);
  padding: 0.4rem;
  background: var(--cert-paper, #f7f5ef);
  border-radius: 0.35rem;
}
.cert-notes {
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  font-size: 0.9rem;
  color: var(--cert-muted, #5c6158);
  line-height: 1.45;
}
.cert-notes .cert-link {
  color: var(--ink);
  font-weight: 620;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
}
.cert-notes .cert-url {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 0.78rem;
  color: var(--cert-ink, #1c1f24);
  letter-spacing: -0.02em;
  word-break: normal;
  overflow-wrap: anywhere;
}
.cert-a4-seal .cert-url {
  white-space: nowrap;
  overflow-wrap: normal;
  font-size: 0.72rem;
  letter-spacing: -0.03em;
}
.cert-a4-seal .cert-bottom-row {
  grid-template-columns: 1.35fr 0.9fr;
}
.cert-tamper {
  font-weight: 600;
  color: var(--cert-ink, #1c1f24);
}

@media (max-width: 700px) {
  .cert-sheet { padding: 1.4rem 1.2rem 1.3rem; }
  .cert-facts { grid-template-columns: 1fr; }
  .cert-verified-word { font-size: 1.7rem; }
  .cert-bottom { grid-template-columns: 1fr; }
}

/* A4 printable certificate */
body.cert-print {
  margin: 0;
  min-height: 0;
  background: #eceae4;
  color: #1c1f24;
}
.cert-a4 {
  --cert-paper: #f7f5ef;
  --cert-ink: #1c1f24;
  --cert-muted: #5c6158;
  --cert-line: #d9d4c8;
  width: 794px;
  height: 1123px;
  margin: 0;
  background: var(--cert-paper);
  color: var(--cert-ink);
  box-sizing: border-box;
  padding: 54px 62px 48px;
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.cert-a4::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 5px;
  background: var(--accent);
}
.cert-example-label {
  margin: 0 0 1.35rem;
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--cert-muted);
}
.cert-a4 .cert-sheet-head {
  margin-bottom: 2.1rem;
  padding-bottom: 1.25rem;
}
.cert-a4 .wordmark { font-size: 1.2rem; }
.cert-a4 .cert-verified { margin-bottom: 1.7rem; }
.cert-a4 .cert-verified-mark {
  width: 3.15rem;
  height: 3.15rem;
  background-size: 1.7rem 1.7rem;
}
.cert-a4 .cert-verified-word { font-size: 2.45rem; }
.cert-a4 .cert-camera { font-size: 1.5rem; margin-bottom: 0.45rem; }
.cert-a4 .count {
  background: none;
  color: var(--cert-ink);
  -webkit-text-fill-color: var(--cert-ink);
  font-size: 5.2rem;
  margin-bottom: 0.25rem;
}
.cert-a4 .count-label { margin-bottom: 1.4rem; }
.cert-a4 .life-meter { margin: 0 0 1.85rem; max-width: none; }
.cert-a4 .life-track { background: #e4e0d6; }
.cert-a4 .cert-facts {
  gap: 1.05rem 2rem;
  margin: 0 0 1.5rem;
  padding: 1.3rem 0;
}
.cert-a4 .cert-issued { margin-bottom: 1.7rem; }
.cert-a4 .cert-bottom { margin-top: auto; padding-top: 0.4rem; gap: 1.3rem 1.5rem; }
.cert-a4 .cert-qr { width: 7.6rem; height: 7.6rem; }
.cert-signed {
  margin: 1.35rem 0 0;
  padding-top: 0.9rem;
  border-top: 1px solid var(--cert-line);
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  font-size: 0.84rem;
  color: var(--cert-muted);
}
.cert-signed strong {
  font-weight: 680;
  color: var(--cert-ink);
  letter-spacing: -0.02em;
}
.cert-signed .powered { margin: 0; font-size: 0.78rem; }


/* Verify a certificate + invalid/paywall helpers */
.verify-cert {
  margin: 0 0 2.1rem;
  padding: 1.15rem 1.2rem 1.05rem;
  max-width: 36rem;
  background: var(--bg-elev);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-sm);
}
.verify-cert h2,
.verify-cert h1 {
  margin: 0 0 0.3rem;
  font-size: 1.2rem;
  letter-spacing: -0.03em;
}
.log-verify {
  margin: 0 0 1.5rem;
}
.verify-cert-form {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.65rem;
  align-items: flex-end;
  margin: 0.8rem 0 0.45rem;
}
.verify-cert-form .lookup-field {
  flex: 1 1 16rem;
  margin: 0;
}
.verify-cert-form .btn {
  box-shadow: none;
}
.verify-hint {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}
.verify-cert .fine.tight { margin-bottom: 0; }
/* #how-we-verify and other anchors: offset comes from html { scroll-padding-top } in styles.css */

.cert-invalid-main { padding-top: 1.6rem; padding-bottom: 2.4rem; }
.cert-invalid-main h1 {
  margin: 0 0 0.7rem;
  font-size: clamp(1.7rem, 4vw, 2.2rem);
  letter-spacing: -0.04em;
}
.cert-invalid-id {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-weight: 620;
  letter-spacing: 0.04em;
}
.cert-invalid-main .verify-cert { margin-top: 1.6rem; }

.admin-main .kpi-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 640px) { .admin-main .kpi-grid { grid-template-columns: 1fr 1fr; } .admin-main .cert-admin-table { display: block; max-width: 100%; overflow-x: auto; } }


/* Certificate seal, holographic panel, listing image */
.cert-seal {
  position: relative;
  margin: 0 auto;
  aspect-ratio: 1;
  flex-shrink: 0;
}
.cert-seal-art {
  display: block;
  width: 100%;
  height: auto;
}
.cert-seal-core {
  position: absolute;
  inset: 24%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  pointer-events: none;
  gap: 0.12rem;
}
.cert-seal-core .cert-verified {
  margin: 0 0 0.15rem;
  gap: 0.4rem;
}
.cert-seal-core .cert-verified-mark {
  width: 1.55rem;
  height: 1.55rem;
  background-size: 0.85rem 0.85rem;
}
.cert-seal-core .cert-verified-word {
  font-size: 1.05rem;
  letter-spacing: -0.03em;
}
.cert-seal-core .count {
  background: none;
  color: #1c1f24;
  -webkit-text-fill-color: #1c1f24;
  font-size: 3.15rem;
  line-height: 0.92;
  margin: 0.1rem 0 0.12rem;
  padding: 0;
  letter-spacing: -0.055em;
  text-shadow:
    0 0 10px #f7f5ef,
    0 0 18px #f7f5ef,
    0 0 6px #f7f5ef,
    1px 0 0 #f7f5ef,
    -1px 0 0 #f7f5ef;
}
.cert-seal-core .cert-camera {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 680;
  letter-spacing: -0.03em;
  text-shadow: 0 0 8px #f7f5ef, 0 0 12px #f7f5ef;
}
.cert-seal-core .cert-id {
  margin: 0.15rem 0 0;
  font-size: 0.82rem;
  font-weight: 620;
  letter-spacing: 0.08em;
  text-shadow: 0 0 8px #f7f5ef, 0 0 12px #f7f5ef;
}
.cert-quiet {
  margin: 0.85rem 0 0;
  text-align: center;
  color: var(--cert-muted, #5c6158);
  font-size: 0.88rem;
  line-height: 1.5;
}
.cert-holo {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.4rem;
}
.cert-downloads {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 0.7rem;
  margin: 1.25rem 0 0;
}
.cert-downloads .btn { box-shadow: none; }
.cert-scan {
  margin: 0 0 0.3rem;
  font-weight: 640;
  letter-spacing: -0.02em;
  color: var(--cert-ink, #1c1f24);
  font-size: 0.92rem;
}

/* A4 with central seal */
.cert-a4.cert-a4-seal {
  background-color: #f7f5ef;
  background-image: url("seal-bg.svg");
  background-size: cover;
  background-position: center;
  padding: 42px 52px 36px;
}
.cert-a4-seal .cert-sheet-head {
  margin-bottom: 0.35rem;
  padding-bottom: 0.7rem;
}
.cert-a4-seal .cert-seal-lg { width: 32.6rem; }
.cert-a4-seal .cert-seal-core .count { font-size: 3.35rem; }
.cert-a4-seal .cert-bottom-row {
  display: grid;
  grid-template-columns: 1.4fr 0.85fr;
  gap: 1rem 1.15rem;
  align-items: center;
  margin-top: auto;
  padding-top: 0.85rem;
}
.cert-a4-seal .cert-qr-block {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0.75rem 0.9rem;
  align-items: center;
}
.cert-a4-seal .cert-qr {
  width: 7.4rem;
  height: 7.4rem;
  background: #fff;
  padding: 0.35rem;
}
.cert-a4-seal .cert-signed { margin-top: 0.85rem; }

/* Web certificate: smaller seal */
.cert-sheet .cert-seal-sm { width: min(20.5rem, 86%); margin: 0.2rem auto 0.9rem; }
.cert-sheet .cert-seal-core .count { font-size: 2.55rem; }
.cert-sheet .cert-seal-core .cert-verified-word { font-size: 0.95rem; }
.cert-web-bottom {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem 1.15rem;
  align-items: start;
  margin-top: 0.4rem;
}
.cert-sheet .cert-holo { max-width: 22rem; margin-top: 1rem; }

/* Square listing image 1600×1600 */
body.cert-listing {
  margin: 0;
  min-height: 0;
  background: #eceae4;
}
.cert-listing-sheet {
  --cert-ink: #1c1f24;
  --cert-muted: #5c6158;
  width: 1600px;
  height: 1600px;
  margin: 0;
  box-sizing: border-box;
  /* 8% safe margin = 128px */
  padding: 128px;
  background-color: #f7f5ef;
  background-image: url("seal-bg.svg");
  background-size: cover;
  background-position: center;
  color: #1c1f24;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  overflow: hidden;
}
.cert-listing-sheet .cert-example-label {
  position: absolute;
  top: 48px;
  left: 128px;
  right: 128px;
  margin: 0;
  text-align: center;
}
.cert-listing-sheet .wordmark {
  margin: 0 0 12px;
  font-size: 1.85rem;
}
.cert-listing-sheet .cert-seal-listing {
  width: 860px;
  margin: 0 auto;
}
.cert-listing-sheet .cert-seal-core { inset: 23%; }
.cert-listing-sheet .cert-seal-core .cert-verified-mark {
  width: 2.4rem;
  height: 2.4rem;
  background-size: 1.3rem 1.3rem;
}
.cert-listing-sheet .cert-seal-core .cert-verified-word { font-size: 1.55rem; }
.cert-listing-sheet .cert-seal-core .count {
  font-size: 6.2rem;
  text-shadow:
    0 0 16px #f7f5ef,
    0 0 28px #f7f5ef,
    0 0 10px #f7f5ef,
    1px 0 0 #f7f5ef,
    -1px 0 0 #f7f5ef;
}
.cert-listing-sheet .cert-seal-core .cert-camera { font-size: 1.7rem; }
.cert-listing-sheet .cert-seal-core .cert-id { font-size: 1.2rem; letter-spacing: 0.1em; }
.cert-listing-foot {
  width: 100%;
  margin-top: auto;
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 28px 32px;
  align-items: center;
}
.cert-listing-sheet .cert-qr {
  width: 260px;
  height: 260px;
  background: #fff;
  padding: 12px;
  border: 1px solid #d9d4c8;
  border-radius: 8px;
}
.cert-listing-sheet .cert-holo { width: 100%; max-width: none; }
.cert-listing-copy .cert-scan {
  font-size: 1.28rem;
  margin: 0 0 0.45rem;
  line-height: 1.3;
}
.cert-listing-copy .cert-tamper {
  font-size: 1.05rem;
  margin: 0 0 0.55rem;
  font-weight: 650;
}
.cert-listing-copy .cert-held {
  margin: 0;
  font-size: 1.02rem;
  font-weight: 620;
  letter-spacing: -0.02em;
  word-break: break-word;
}

/* Certificate receipt email */
.email-receipt-facts {
  margin: 0 0 1.15rem;
  padding: 0.7rem 0 0.15rem;
  border-top: 1px solid var(--line);
}
.email-receipt-facts div {
  display: grid;
  grid-template-columns: 9.2rem 1fr;
  gap: 0.35rem 0.8rem;
  margin: 0 0 0.45rem;
}
.email-receipt-facts dt {
  margin: 0;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 0.2rem;
}
.email-receipt-facts dd { margin: 0; font-weight: 650; color: var(--ink); }
.email-share {
  margin: 0 0 1rem;
  padding: 0.65rem 0.8rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--font-mono);
  font-size: 0.88rem;
  color: var(--ink);
  word-break: break-all;
}
.email-keep { margin-top: 0.4rem; }
@media (max-width: 620px) {
  .email-receipt-facts div { grid-template-columns: 1fr; gap: 0.1rem; }
}

/* Shutter life remaining: column header, mobile legend, caption and footnote */
.life-th { white-space: normal; }
.recent-legend { display: none; }
.life-cap { font-weight: 400; font-size: 0.82em; color: var(--muted); }
.life-footnote { margin: 0.6rem 0 0; font-size: 0.78rem; line-height: 1.45; color: var(--muted); max-width: 46rem; }
@media (max-width: 800px) {
  .recent-legend { display: flex; justify-content: space-between; margin: 0 0 0.35rem; padding: 0 0.1rem; font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
}

/* Public log search: real button, clear disabled state */
.lookup-actions .btn:disabled,
.lookup-actions .btn.is-disabled { background: #d9dce6; color: #8a90a0; box-shadow: none; cursor: not-allowed; }
/* Mobile: camera lookup first, certificate lookup below it */
@media (max-width: 720px) {
  main:has(> form.lookup):has(> .log-verify) { display: flex; flex-direction: column; }
  main:has(> form.lookup):has(> .log-verify) > * { order: 3; }
  main:has(> form.lookup):has(> .log-verify) > .admin-hero { order: 0; }
  main:has(> form.lookup):has(> .log-verify) > form.lookup { order: 1; }
  main:has(> form.lookup):has(> .log-verify) > .log-verify { order: 4; margin-top: 1.5rem; }
}

/* ---------- Unlocked history: summary, chart, compact table */
.hx { margin: 0.6rem 0 0; }
.hx-summary { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev, #fffdf8); }
.hx-kpi { padding: 0.75rem 0.95rem; border-left: 1px solid var(--line); min-width: 0; }
.hx-kpi:first-child { border-left: 0; }
.hx-k { margin: 0; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.hx-v { margin: 0.15rem 0 0; font-family: var(--font-mono); font-size: 1.35rem; font-weight: 600; color: var(--accent); line-height: 1.15; }
.hx-main .hx-v { font-size: 1.7rem; }
.hx-s { margin: 0.15rem 0 0; font-size: 0.76rem; color: var(--muted); line-height: 1.35; }
.hx-green { color: #0b7a55; }
.hx-red, .hx-flag-t { color: #96183E; }
.hx-chart { margin: 1rem 0 0; padding: 0.7rem 0.8rem 0.5rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--bg-elev); }
.hx-chart figcaption { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); margin: 0 0 0.3rem; }
.hx-chart svg { display: block; width: 100%; height: auto; }
.hx-grid { stroke: #e6e2d8; stroke-width: 1; }
.hx-ax { font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 10px; fill: #5c6158; }
.hx-line { fill: none; stroke: #0E2A62; stroke-width: 1.4; stroke-linejoin: round; }
.hx-pt { fill: #b8912f; stroke: #fff; stroke-width: 0.8; }
.hx-pt-flag { fill: #96183E; stroke: #fff; stroke-width: 1; }
.hx-legend { margin: 0.2rem 0 0; font-size: 0.72rem; color: var(--muted); display: flex; align-items: center; gap: 0.35rem; }
.hx-dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: #b8912f; margin-left: 0.4rem; }
.hx-dot:first-child { margin-left: 0; }
.hx-dot-flag { background: #96183E; }
.hx-tools { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 0.8rem 1.2rem; margin: 1rem 0 0; }
.hx-mail { flex: 1 1 22rem; max-width: 34rem; }
.hx-mail label { display: block; font-size: 0.8rem; font-weight: 600; margin: 0 0 0.25rem; }
.hx-mail-row { display: flex; gap: 0.5rem; }
.hx-mail-row input { flex: 1 1 auto; min-width: 0; font: inherit; font-size: 16px; padding: 0.55rem 0.7rem; border: 1px solid var(--line); border-radius: var(--radius); background: #fff; height: 44px; box-sizing: border-box; }
.hx-mail-note { margin: 0.3rem 0 0; font-size: 0.76rem; color: var(--muted); }
.hx-mail-note.is-ok { color: #0b6b4a; }
.hx-mail-note.is-error { color: #a3312f; }
.hx-list { margin: 1.1rem 0 0; }
.hx-list-head { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; }
.hx-list-head h2 { font-size: 1rem; margin: 0; }
.hx-list-meta { margin: 0; font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.hx-table { width: 100%; border-collapse: collapse; margin: 0.4rem 0 0; font-size: 0.84rem; }
.hx-table th { text-align: left; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); font-weight: 400; padding: 0 0.5rem 0.3rem; border-bottom: 1px solid var(--ink, #1f2328); }
.hx-table td { height: 36px; padding: 0 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; vertical-align: middle; }
.hx-table .hx-num { text-align: right; font-family: var(--font-mono); font-weight: 600; color: var(--accent); }
.hx-table .hx-date { font-family: var(--font-mono); font-size: 0.78rem; color: var(--ink); }
.hx-table .hx-meth { font-family: var(--font-mono); font-size: 0.72rem; color: var(--muted); }
.hx-table .hx-life { text-align: right; font-family: var(--font-mono); font-size: 0.76rem; color: #0b7a55; }
.hx-table .hx-f { width: 1.6rem; text-align: center; padding: 0 0.2rem; }
.hx-flagged td { background: color-mix(in srgb, var(--accent-2) 10%, var(--bg-elev)); }
.hx-flagged .hx-num { color: #96183E; }
.hx-ficon { width: 15px; height: 15px; fill: none; stroke: #96183E; stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
.hx-fwrap { display: inline-flex; cursor: help; }
.hx-sep td { height: 28px; font-family: var(--font-mono); font-size: 0.64rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); background: transparent; }
.hx-more { margin: 0.7rem 0 0; }
@media (max-width: 720px) {
  .hx-summary { grid-template-columns: 1fr 1fr; }
  .hx-kpi { border-left: 0; border-top: 1px solid var(--line); padding: 0.6rem 0.75rem; }
  .hx-kpi:nth-child(-n+2) { border-top: 0; }
  .hx-kpi:nth-child(even) { border-left: 1px solid var(--line); }
  .hx-main .hx-v { font-size: 1.4rem; }
  .hx-v { font-size: 1.15rem; }
  .hx-table { font-size: 0.8rem; }
  .hx-table td, .hx-table th { padding-left: 0.3rem; padding-right: 0.3rem; }
  .hx-table .hx-date { font-size: 0.7rem; white-space: normal; line-height: 1.2; }
  .hx-tools { flex-direction: column; align-items: stretch; }
  .hx-tools > .btn { width: 100%; }
}

.hx-ds { display: none; }
@media (max-width: 720px) { .hx-dl { display: none; } .hx-ds { display: inline; } .hx-table .hx-date { white-space: nowrap; } }
.hx-line-2 { fill: none; stroke: #6f7fa6; stroke-width: 1.3; stroke-dasharray: 4 3; }
.hx-ser { font-size: 10px; fill: #0E2A62; }
.hx-key { display: inline-block; width: 16px; height: 0; border-top: 1.6px solid var(--accent); vertical-align: middle; }
.hx-key-2 { border-top: 1.6px dashed #6f7fa6; margin-left: 0.4rem; }
.hx-legend .hx-dot { margin-left: 0.5rem; }
/* Public log search with Type first */
.filters-grid.has-type { grid-template-columns: minmax(9rem, 0.8fr) 1fr 1.3fr 1.3fr; }
.lookup-help { margin: 0.3rem 0 0; font-size: 0.74rem; color: var(--muted); line-height: 1.35; }
@media (max-width: 900px) { .filters-grid.has-type { grid-template-columns: 1fr 1fr; } }
@media (max-width: 720px) { .filters-grid.has-type { grid-template-columns: 1fr; } }
/* Model combobox */
.mc-wrap { position: relative; }
.mc-input { width: 100%; padding-right: 2.4rem !important; font-size: 16px; }
.mc-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; width: 2.3rem; border: 0; background: transparent; color: var(--muted); cursor: pointer; display: flex; align-items: center; justify-content: center; }
.mc-toggle svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: transform .15s; }
.mc-wrap.is-open .mc-toggle svg { transform: rotate(180deg); }
.mc-list { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 4px); margin: 0; padding: 0.25rem 0; list-style: none; background: var(--bg-elev); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 10px 28px rgba(14, 42, 98, 0.14); max-height: min(19rem, 48vh); overflow-y: auto; -webkit-overflow-scrolling: touch; overscroll-behavior: contain; }
.mc-opt { padding: 0.55rem 0.8rem; min-height: 44px; box-sizing: border-box; display: flex; flex-direction: column; justify-content: center; cursor: pointer; font-size: 0.92rem; line-height: 1.25; color: var(--ink); }
.mc-opt.is-active, .mc-opt:hover { background: #eef1f8; }
.mc-opt mark { background: transparent; color: var(--accent); font-weight: 700; text-decoration: underline; text-decoration-color: var(--gold); text-underline-offset: 3px; }
.mc-alias { font-family: var(--font-mono); font-size: 0.7rem; color: var(--muted); }
.mc-empty { padding: 0.7rem 0.8rem; font-size: 0.85rem; color: var(--muted); }
.lookup-field .opt { font-weight: 400; color: var(--muted); font-size: 0.85em; }

.sc-group-h { font-size: 1.15rem; margin: 1.6rem 0 0.4rem; }
.sc-group-note { font-size: 0.86rem; color: var(--muted); margin: 0 0 0.6rem; max-width: 46rem; }
.nc-brand h3 { font-size: 1rem; margin: 0.9rem 0 0.3rem; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; margin: -1px; padding: 0; border: 0; }
@media (max-width: 720px) { .hx-tools .hx-mail { flex: none; max-width: none; } }
/* Stripe test mode */
.stripe-test-note { margin: 0.6rem 0 0; font-size: 0.8rem; color: var(--muted); line-height: 1.45; }
.stripe-test-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 3px; background: #fff1d6; color: #7a4d00; border: 1px solid #f0d49a; margin-right: 0.3rem; vertical-align: 1px; }
.stripe-err { margin: 0.6rem 0 0; font-size: 0.82rem; color: #a3312f; }
.stripe-btn.is-busy { opacity: 0.6; pointer-events: none; }
.stripe-status { margin: 1rem 0 0.4rem; padding: 0.7rem 0.9rem; border-radius: var(--radius); font-size: 0.88rem; line-height: 1.45; border: 1px solid var(--line); background: var(--bg-elev); }
.stripe-status.is-ok { border-color: #b9dcc9; background: #f1faf5; color: #0b5a3d; }
.stripe-status.is-bad { border-color: #e7b9b9; background: #fdf3f3; color: #8a2424; }
.stripe-status.is-pending { color: var(--muted); }
.stripe-sid { font-family: var(--font-mono); font-size: 0.75rem; }

/* Admin form controls: one height, border, radius, font and padding for every filter row
   (selects, text, search and date inputs, the All/Paid/Free switch and the toolbar buttons). */
.admin-main .search,
.admin-main .toolbar input[type="date"] {
  box-sizing: border-box;
  height: 2.6rem;
  padding: 0 0.85rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background-color: var(--bg-elev);
  color: var(--ink);
  font: inherit;
  font-size: 0.9rem;
  line-height: 1.2;
  min-width: 0;
}
.admin-main textarea.search { height: auto; padding: 0.6rem 0.85rem; }
.admin-main select.search {
  appearance: none;
  -webkit-appearance: none;
  padding-right: 2.3rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%235c6158' stroke-width='1.4' stroke-linecap='square' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.85rem center;
  background-size: 10px 6px;
  cursor: pointer;
}
.admin-main .search:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; border-color: var(--accent); }
.admin-main .admin-filters { gap: 0.55rem; align-items: stretch; }
.admin-main .admin-filters .search { flex: 1 1 11rem; }
.admin-main .admin-filters select.search { flex: 0 1 12rem; }
.admin-main .admin-filters .filters { height: 2.6rem; border-radius: var(--radius-sm); align-items: stretch; flex: none; }
.admin-main .admin-filters .filters button,
.admin-main .admin-filters .filters span { display: inline-flex; align-items: center; padding: 0 0.95rem; border: 0; background: transparent; font: inherit; font-size: 0.8rem; font-weight: 650; color: var(--ink-soft); cursor: pointer; }
.admin-main .admin-filters .filters button + button { border-left: 1px solid var(--line); }
.admin-main .admin-filters .filters .is-on { background: var(--accent); color: var(--accent-ink); }
.admin-main .admin-filters .btn { height: 2.6rem; padding: 0 1rem; display: inline-flex; align-items: center; justify-content: center; font-size: 0.85rem; }
.admin-main .admin-filters .date-range { display: flex; gap: 0.4rem; align-items: center; flex: 0 1 auto; }
.admin-main .admin-filters .date-range .search { flex: 0 1 10rem; }
@media (max-width: 640px) {
  .admin-main .admin-filters .search, .admin-main .admin-filters select.search { flex: 1 1 100%; }
  .admin-main .admin-filters .filters { flex: 1 1 auto; }
  .admin-main .admin-filters .filters button { flex: 1; justify-content: center; }
  .admin-main .admin-filters .date-range { flex: 1 1 100%; }
  .admin-main .admin-filters .date-range .search { flex: 1 1 0; }
}
/* records tables (checks, certificates, orders) */
.rec-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.rec-table th { text-align: left; font: 600 0.68rem/1.2 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); padding: 0.55rem 0.5rem; border-bottom: 1px solid var(--line); white-space: nowrap; }
.rec-table td { padding: 0.6rem 0.5rem; border-bottom: 1px solid var(--line); vertical-align: top; }
.rec-table tr.is-link { cursor: pointer; }
.rec-table tr.is-link:hover td { background: rgba(14, 42, 98, 0.04); }
.rec-table .mono { font-family: ui-monospace, "SF Mono", Menlo, monospace; font-size: 0.8rem; letter-spacing: 0.02em; }
.rec-table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.rec-table .nowrap { white-space: nowrap; }
.rec-table .row-actions { display: flex; gap: 0.35rem; flex-wrap: wrap; }
.rec-btn { height: 1.9rem; padding: 0 0.6rem; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--bg-elev); color: var(--ink); font-family: inherit; font-size: 0.76rem; font-weight: 600; line-height: 1; display: inline-flex; align-items: center; text-decoration: none; cursor: pointer; white-space: nowrap; }
.rec-btn:hover { border-color: var(--accent); }
.rec-btn.is-danger { color: #96183E; }
.rec-btn.is-danger.is-confirm { background: #96183E; color: #fff; border-color: #96183E; }
.copyable { display: inline-flex; gap: 0.35rem; align-items: center; max-width: 100%; }
.copyable span { overflow-wrap: anywhere; }
.copy-btn { flex: none; height: 1.6rem; padding: 0 0.45rem; border: 1px solid var(--line); border-radius: 3px; background: transparent; color: var(--muted); font: 600 0.68rem/1 ui-monospace, "SF Mono", Menlo, monospace; cursor: pointer; }
.copy-btn:hover, .copy-btn.is-done { color: var(--accent); border-color: var(--accent); }
.pill { display: inline-block; padding: 0.15rem 0.45rem; border-radius: 3px; font: 600 0.7rem/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.03em; background: #ecebe5; color: var(--ink-soft); white-space: nowrap; }
.pill.ok { background: #e4efe6; color: #2f6b3a; }
.pill.warn { background: #f5ecd9; color: #8a6408; }
.pill.bad { background: #f4e1e6; color: #96183E; }
.pill.admin { background: #e3e8f2; color: #0E2A62; }
.rec-meta { margin: 0 0 0.75rem; font-size: 0.85rem; color: var(--muted); }
.order-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(16rem, 1fr)); gap: 1rem; margin: 0 0 1.4rem; }
.order-card { border: 1px solid var(--line); border-radius: 6px; background: var(--bg-elev); padding: 0.9rem 1rem; }
.order-card h2 { font-size: 0.95rem; margin: 0 0 0.6rem; }
.order-card dl { margin: 0; display: grid; grid-template-columns: max-content 1fr; gap: 0.35rem 0.9rem; font-size: 0.85rem; }
.order-card dt { color: var(--muted); }
.order-card dd { margin: 0; overflow-wrap: anywhere; }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.timeline li { position: relative; margin: 0 0 0.9rem; padding-left: 1rem; font-size: 0.86rem; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 0.35rem; width: 10px; height: 10px; border-radius: 50%; background: var(--bg-elev); border: 2px solid var(--accent); }
.timeline .tl-when { display: block; font: 500 0.74rem/1.3 ui-monospace, "SF Mono", Menlo, monospace; color: var(--muted); }
.timeline .tl-note { color: var(--muted); font-size: 0.8rem; }
@media (max-width: 640px) {
  .rec-table thead { display: none; }
  .rec-table, .rec-table tbody, .rec-table tr, .rec-table td { display: block; width: 100%; box-sizing: border-box; }
  .rec-table tr { border: 1px solid var(--line); border-radius: 6px; margin: 0 0 0.7rem; padding: 0.45rem 0.6rem; background: var(--bg-elev); }
  .rec-table td { border: 0; padding: 0.22rem 0; display: grid; grid-template-columns: 7.5rem 1fr; gap: 0.5rem; }
  .rec-table td::before { content: attr(data-k); font: 600 0.66rem/1.5 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); }
  .rec-table td.num { text-align: left; }
  .rec-table td.empty { display: block; }
  .rec-table td.empty::before { content: none; }
}
/* the records tables stack into cards on phones themselves, so keep their wrapper visible */
.admin-main .rec-section .table-wrap, .admin-main .order-card .rec-table { display: block; }
@media (min-width: 641px) { .admin-main .order-card .rec-table { display: table; } }
.admin-main .rec-section .table-wrap { overflow-x: auto; border: 0; }
body.admin-app .admin-main select.search {
  background-color: var(--bg-elev);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath fill='none' stroke='%235c6158' stroke-width='1.4' stroke-linecap='square' d='M1 1l4 4 4-4'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 0.85rem center; background-size: 10px 6px;
  appearance: none; -webkit-appearance: none; padding-right: 2.3rem;
}
body.admin-app .admin-main .search { height: 2.6rem; border-radius: var(--radius-sm); font-size: 0.9rem; }
body.admin-app .admin-main textarea.search { height: auto; }
.rec-table .mono, .rec-table td[data-k="Payment"], .rec-table td[data-k="Certificate"] { white-space: nowrap; }
.rec-table td[data-k="ID"] a + br + a, .rec-table .text-link { font-size: 0.74rem; font-weight: 500; }
.admin-tz-note { margin: 0.2rem 0 0; font-size: 0.8rem; color: var(--muted); }
@media (max-width: 640px) { .admin-main > .admin-tabbar { display: none; } }

.rec-btn.copy-btn { font-family: inherit; font-size: 0.76rem; font-weight: 600; height: 1.9rem; color: var(--ink); padding: 0 0.6rem; }
.rec-table td .cv { display: block; min-width: 0; }
@media (max-width: 640px) { .rec-table td.nowrap { white-space: normal; } .rec-table td .cv { overflow-wrap: anywhere; } }
@media (min-width: 641px) { .rec-table .copyable span { white-space: nowrap; overflow-wrap: normal; } .rec-table td[data-k="Status"], .rec-table td[data-k="Mode"] { white-space: nowrap; } }
.mlink-box { margin-top: 0.4rem; }
.mlink { display: flex; gap: 0.4rem; align-items: center; flex-wrap: wrap; }
.mlink .mono { font-size: 0.76rem; overflow-wrap: anywhere; }
.mlink-note, .mlink-warn, .mlink-block { margin: 0.35rem 0 0.4rem; font-size: 0.78rem; }
.mlink-block { color: #8a6408; }
.mlink-warn { color: #96183E; }
.rec-table .cust-name { font-weight: 600; }
.rec-table .match-tag { display: inline-block; margin-top: 0.2rem; font: 600 0.66rem/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.04em; color: #2f6b3a; background: #e4efe6; padding: 0.1rem 0.35rem; border-radius: 3px; }
.rec-table .cert-ids { display: block; margin-top: 0.15rem; font-size: 0.7rem; color: var(--muted); }
.rec-table .cert-ids .mono { display: block; font-size: 0.72rem; line-height: 1.45; }
#o-q { flex: 2 1 18rem; }
@media (max-width: 640px) { .admin-main .admin-filters .date-range .search { width: 0; min-width: 0; } }

/* History report page (history.html) */
.hx-status { margin: 0 0 1rem; padding: 0.75rem 0.95rem; border: 1px solid var(--line); border-radius: var(--radius, 6px); background: var(--bg-elev, #fffdf8); font-size: 0.95rem; }
.hx-status.is-pending { border-color: color-mix(in srgb, var(--gold, #b08a3e) 45%, transparent); }
.hx-status.is-bad { border-color: color-mix(in srgb, var(--accent-2, #96183e) 45%, transparent); color: var(--accent-2, #96183e); }
.hx-link { margin: 0 0 1.25rem; padding: 0.85rem 1rem; }
.hx-link-k { margin: 0 0 0.35rem; font-family: var(--font-mono, monospace); font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.hx-link-row { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin: 0 0 0.4rem; min-width: 0; }
.hx-link-url { flex: 1 1 16rem; min-width: 0; overflow-wrap: anywhere; font-size: 0.78rem; padding: 0.45rem 0.6rem; border: 1px solid var(--line); border-radius: var(--radius, 6px); background: #fff; }
.hx-link-note { margin: 0; font-size: 0.85rem; color: var(--ink-soft); }
.log-found .hx-unlock { display: flex; flex-wrap: wrap; align-items: center; gap: 0.6rem 1rem; margin-top: 0.9rem; }
.log-found .hx-unlock .btn { min-height: 44px; }
.log-found .hx-unlock-note { margin: 0; font-size: 0.85rem; color: var(--muted); }
.log-found .hx-unlock-err { margin: 0.5rem 0 0; color: var(--accent-2, #96183e); font-size: 0.9rem; }

/* Slogans: quiet, in the mono used for labels */
.sv-slogan { margin: -0.35rem 0 1rem; font-family: var(--font-mono, "JetBrains Mono", monospace); font-weight: 300; font-size: clamp(0.92rem, 2.2vw, 1.08rem); letter-spacing: 0.01em; color: var(--accent-2, #96183e); }
.sv-slogan-strip { margin-top: 2.5rem; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--bg-elev, #fffdf8); }
.sv-slogan-strip .wrap-wide { display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.35rem 1.25rem; padding-top: 0.95rem; padding-bottom: 0.95rem; }
.sv-slogan-strip p { margin: 0; font-family: var(--font-mono, "JetBrains Mono", monospace); font-weight: 300; font-size: 0.98rem; color: var(--ink); }
.sv-slogan-strip a { font-size: 0.9rem; color: var(--accent-2, #96183e); text-underline-offset: 3px; }
/* History: both dates per check (effective date = photo captured; USB uses the check date) */
.hx-table .hx-checked { color: var(--muted); }
.hx-table .hx-nophoto { color: var(--muted); font-style: italic; }
.hx-order-note { margin: 0.5rem 0 0; font-family: var(--font-mono); font-weight: 300; font-size: 0.72rem; color: var(--muted); }
@media (max-width: 720px) { .hx-table th, .hx-table td { padding-left: 0.22rem; padding-right: 0.22rem; } .hx-table .hx-date { font-size: 0.68rem; } .hx-table th { font-size: 0.56rem; letter-spacing: 0.04em; } }
/* History: newer checks since this (frozen) report was unlocked */
.hx-newer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.6rem 1rem; margin: 0 0 1rem; padding: 0.8rem 1rem; border: 1px solid color-mix(in srgb, var(--accent-2) 35%, var(--line)); border-left: 3px solid var(--accent-2); border-radius: 4px; background: color-mix(in srgb, var(--accent-2) 10%, var(--bg-elev)); }
.hx-newer p { margin: 0; font-family: var(--font-mono); font-weight: 300; font-size: 0.84rem; color: var(--ink); }
.hx-newer p strong { font-weight: 600; color: var(--accent-2); }
.hx-newer .btn { white-space: nowrap; }
.hx-newer .hx-newer-err { flex-basis: 100%; color: var(--accent-2); font-size: 0.78rem; }
@media (max-width: 560px) { .hx-newer .btn { width: 100%; } }
.stripe-live-tag { display: inline-block; font-family: var(--font-mono); font-size: 0.62rem; letter-spacing: 0.08em; text-transform: uppercase; padding: 0.1rem 0.4rem; border-radius: 3px; background: var(--ok-soft); color: var(--ok); border: 1px solid color-mix(in srgb, var(--ok) 40%, var(--line)); margin-right: 0.3rem; vertical-align: 1px; }
.rd-pill.rd-live { background: #e5f4ee; color: #0b6b4b; }
.service-bar .svc-mode { font-weight: 600; }
.service-bar .svc-mode.is-test { color: #ffd98a; }
.service-bar .svc-mode.is-live { color: #9fe3c6; }
/* Admin pre-launch checklist */
.pl-checks { display: grid; gap: 0.5rem; }
.pl-item { display: flex; gap: 0.6rem; align-items: flex-start; }
.pl-item p { margin: 0; }
.pl-dot { flex: none; width: 0.7rem; height: 0.7rem; margin-top: 0.35rem; border-radius: 50%; background: #c9a227; }
.pl-item.is-ok .pl-dot { background: #0b7a55; }
.pl-table .pl-det { white-space: normal; font-size: 0.8rem; line-height: 1.4; min-width: 16rem; }
.pl-table .mono { font-family: var(--font-mono); font-size: 0.74rem; word-break: break-word; }
.pl-table .pl-det, .pl-table .mono { overflow-wrap: anywhere; }
@media (max-width: 560px) { .pl-table .pl-det { min-width: 0; } .pl-table td, .pl-table th { white-space: normal; } .pl-table { table-layout: fixed; width: 100%; } .pl-table th:nth-child(1) { width: 26%; } .pl-table th:nth-child(2), .pl-table th:nth-child(3) { width: 15%; } }
#pl-clean-h ~ p code { overflow-wrap: anywhere; word-break: break-all; }
