/* Certmap styling - matches TransportPlan marketing website concept */
:root {
  --deep: #101f67;
  --royal: #034190;
  --sky: #00b1e6;
  --ice: #c4e6ff;
  --pearl: #f2f2f2;
  --white: #fff;
  --ink: #0e1733;
  --muted: #5b6478;
  --line: #e7ebf3;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow: 0 24px 60px rgba(16, 31, 103, .12);
  --shadow-sm: 0 10px 30px rgba(16, 31, 103, .08);
  --maxw: 1180px;
  --valid: #15803d;
  --suspended: #b45309;
  --withdrawn: #b91c1c;
  --historical: #64748b;
  --unknown: #94a3b8;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Raleway', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 {
  line-height: 1.15;
  font-weight: 800;
  letter-spacing: -.015em;
  color: var(--deep);
}
h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 900; letter-spacing: -.03em; }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: 1.15rem; }
p { color: var(--muted); }
a { text-decoration: none; color: inherit; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

/* HEADER */
header.nav {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(255, 255, 255, .9);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 76px;
  gap: 22px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--deep);
  font-weight: 900;
  letter-spacing: -.02em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: block;
  object-fit: contain;
}
.brand-name { font-size: 1.1rem; }
.brand-name .dot { color: var(--sky); }
.site-nav {
  display: flex;
  gap: 28px;
  align-items: center;
}
.site-nav a {
  font-weight: 600;
  font-size: .96rem;
  color: var(--ink);
}
.site-nav a:hover { color: var(--royal); }
.site-nav a.lang-switch {
  padding: 4px 10px;
  border: 1.5px solid var(--line);
  border-radius: 6px;
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .05em;
  color: var(--muted);
}
.site-nav a.lang-switch:hover {
  border-color: var(--royal);
  color: var(--royal);
  background: var(--pearl);
}

/* HERO */
.hero {
  background: linear-gradient(135deg, #0c1850, #061036);
  color: #fff;
  padding: 80px 24px 100px;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(600px 300px at 20% 20%, rgba(0, 177, 230, .25), transparent 70%),
              radial-gradient(500px 260px at 80% 80%, rgba(3, 65, 144, .5), transparent 70%);
  z-index: 0;
}
.hero .wrap { position: relative; z-index: 1; text-align: center; }
.hero h1 {
  color: #fff;
  max-width: 20ch;
  margin: 0 auto 20px;
}
.hero h1 .g {
  background: linear-gradient(90deg, var(--sky), #bfe9ff);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero .lead {
  font-size: 1.15rem;
  color: #cdd6f5;
  max-width: 620px;
  margin: 0 auto 40px;
}
.badge {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .24);
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .85rem;
  font-weight: 600;
  color: #fff;
  margin-bottom: 26px;
  backdrop-filter: blur(4px);
}
.badge .dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--sky);
  box-shadow: 0 0 0 4px rgba(0, 177, 230, .25);
}

/* SEARCH PANEL - sits on top of hero, overlapping */
.search-wrap {
  max-width: 900px;
  margin: -60px auto 0;
  padding: 0 24px;
  position: relative;
  z-index: 2;
}
.search-panel {
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 28px;
  border: 1px solid var(--line);
}
.search-panel form {
  display: grid;
  grid-template-columns: 1fr 180px auto;
  gap: 14px;
  align-items: end;
}
.field label {
  display: block;
  font-size: .72rem;
  font-weight: 800;
  color: var(--royal);
  text-transform: uppercase;
  letter-spacing: .1em;
  margin-bottom: 6px;
}
.field input,
.field select {
  width: 100%;
  padding: 12px 16px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--ink);
  font-size: 1rem;
  font-family: inherit;
  font-weight: 500;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--royal);
  box-shadow: 0 0 0 4px rgba(0, 177, 230, .18);
}
button[type="submit"] {
  padding: 12px 26px;
  background: var(--sky);
  color: var(--deep);
  border: none;
  border-radius: var(--radius-sm);
  font-size: 1rem;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: background .15s, transform .05s, box-shadow .15s;
  white-space: nowrap;
}
button[type="submit"]:hover:not(:disabled) {
  background: #13c6ff;
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(0, 177, 230, .35);
}
button[type="submit"]:active:not(:disabled) { transform: translateY(0); }
button[type="submit"]:disabled { opacity: .5; cursor: wait; }

@media (max-width: 720px) {
  .search-panel form { grid-template-columns: 1fr; }
}

/* MAIN CONTENT */
.main {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 40px 24px 80px;
}
.status {
  min-height: 1.4em;
  margin-bottom: 20px;
  color: var(--muted);
  font-size: .95rem;
  font-weight: 600;
}
.status.error { color: var(--withdrawn); }

.results { display: grid; gap: 14px; }

.card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px 26px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s, transform .15s;
}
.card:hover {
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 14px;
}
.cert-id {
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .8rem;
  color: var(--muted);
  font-weight: 500;
  background: transparent;
  border: 0;
  padding: 2px 6px;
  margin-left: -6px;
  border-radius: 6px;
  cursor: pointer;
  text-align: left;
  transition: background .15s, color .15s;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.cert-id:hover { background: var(--pearl); color: var(--deep); }
.cert-id-hint {
  font-size: .65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--royal);
  opacity: 0;
  transition: opacity .15s;
}
.cert-id:hover .cert-id-hint { opacity: 1; }
.cert-id.copied { background: var(--valid); color: #fff; }
.cert-id.copied .cert-id-hint { opacity: 1; color: #fff; }
.cert-id.copied .cert-id-hint::before { content: '✓ '; }
.holder {
  font-size: 1.1rem;
  font-weight: 800;
  margin-top: 4px;
  color: var(--deep);
  letter-spacing: -.01em;
}
.badge-status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 5px 12px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: white;
  white-space: nowrap;
}
.badge-status.valid { background: var(--valid); }
.badge-status.suspended { background: var(--suspended); }
.badge-status.withdrawn { background: var(--withdrawn); }
.badge-status.historical { background: var(--historical); }
.badge-status.unknown { background: var(--unknown); }
.status-since {
  font-size: .78rem;
  color: var(--muted);
  margin-left: 8px;
  font-weight: 600;
}

.meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 8px 24px;
  font-size: .9rem;
  margin-bottom: 14px;
}
.meta div { display: flex; gap: 8px; align-items: baseline; }
.meta .k {
  color: var(--royal);
  min-width: 100px;
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
}

.tag-row { margin-bottom: 8px; font-size: .9rem; }
.tag-row .k {
  color: var(--royal);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-weight: 800;
  margin-right: 6px;
}
.pill {
  display: inline-block;
  padding: 3px 12px;
  background: var(--pearl);
  border: 1px solid #e6e9f1;
  border-radius: 8px;
  font-size: .82rem;
  margin: 3px 4px 3px 0;
  color: var(--deep);
  font-weight: 600;
}

.card-actions {
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}
.links { font-size: .9rem; }
.links a {
  color: var(--royal);
  text-decoration: none;
  margin-right: 18px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.links a:hover { color: var(--sky); }
.sub-btn {
  padding: 8px 16px;
  background: transparent;
  color: var(--royal);
  border: 1.5px solid var(--royal);
  border-radius: 8px;
  font-family: inherit;
  font-size: .85rem;
  font-weight: 700;
  cursor: pointer;
  transition: background .15s, color .15s;
  white-space: nowrap;
}
.sub-btn:hover:not(:disabled) { background: var(--royal); color: #fff; }
.sub-btn.is-on {
  background: var(--valid);
  color: #fff;
  border-color: var(--valid);
}
.sub-btn.is-on:hover:not(:disabled) { background: #0d5f2b; border-color: #0d5f2b; }
.sub-btn:disabled { opacity: .5; cursor: wait; }

.claim-btn {
  padding: 8px 14px;
  background: transparent;
  color: var(--deep);
  border: 1.5px dashed var(--line);
  border-radius: 8px;
  font-family: inherit;
  font-size: .82rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color .15s, color .15s;
  white-space: nowrap;
}
.claim-btn:hover { border-color: var(--royal); color: var(--royal); border-style: solid; }
.claim-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 8px;
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  white-space: nowrap;
}
.claim-badge.claim-pending  { background: var(--pearl);  color: var(--suspended); border: 1px solid var(--suspended); }
.claim-badge.claim-approved { background: var(--valid);  color: #fff; }
.claim-badge.claim-rejected { background: transparent;   color: var(--muted); border: 1px solid var(--line); }

/* Modal */
.modal-wrap {
  position: fixed;
  inset: 0;
  background: rgba(16, 31, 103, .55);
  backdrop-filter: blur(4px);
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadein .15s ease-out;
}
@keyframes fadein { from { opacity: 0; } }
.modal {
  background: #fff;
  border-radius: var(--radius);
  padding: 32px;
  max-width: 480px;
  width: 100%;
  box-shadow: var(--shadow);
  position: relative;
}
.modal h2 { margin-bottom: 6px; font-size: 1.25rem; }
.modal-close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 32px;
  height: 32px;
  background: transparent;
  border: none;
  font-size: 1.6rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  border-radius: 8px;
}
.modal-close:hover { background: var(--pearl); color: var(--deep); }

.empty {
  text-align: center;
  padding: 60px 24px;
  color: var(--muted);
  background: #fff;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  font-weight: 600;
}

/* FOOTER */
footer.site-footer {
  background: var(--deep);
  color: #cdd6f5;
  padding: 40px 0 32px;
  margin-top: 60px;
  font-size: .9rem;
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}
footer.site-footer a { color: var(--sky); text-decoration: none; font-weight: 600; }
footer.site-footer a:hover { text-decoration: underline; }

/* Health strip (dashboard) - one-glance overview of subscribed certs */
.health-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 24px;
}
.health-strip[hidden] { display: none; }
.health-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  padding: 18px 20px;
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.health-num {
  font-size: 2rem;
  font-weight: 900;
  letter-spacing: -.02em;
  line-height: 1.1;
}
.health-label {
  font-size: .75rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  margin-top: 4px;
}
@media (max-width: 640px) {
  .health-strip { grid-template-columns: repeat(2, 1fr); }
}

/* Developer section on dashboard - collapsed by default */
.developer-section summary { list-style: none; }
.developer-section summary::-webkit-details-marker { display: none; }
.developer-section summary::after {
  content: '▸';
  margin-left: auto;
  color: var(--muted);
  transition: transform .15s;
}
.developer-section[open] summary::after { transform: rotate(90deg); }

/* How-it-works strip (homepage) */
.how {
  max-width: var(--maxw);
  margin: 60px auto 0;
  padding: 0 24px;
}
.how-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}
.how-step {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform .15s, box-shadow .15s;
}
.how-step:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.how-num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  background: linear-gradient(135deg, var(--royal), var(--deep));
  color: #fff;
  border-radius: 12px;
  font-weight: 900;
  font-size: 1.1rem;
  margin-bottom: 16px;
}
.how-step h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
}
.how-step p {
  font-size: .9rem;
  color: var(--muted);
  line-height: 1.5;
}

@media (max-width: 780px) { .how-grid { grid-template-columns: 1fr; } }

/* Cookie notice */
.cookie-notice {
  position: fixed;
  bottom: 20px;
  left: 20px;
  right: 20px;
  max-width: 560px;
  margin: 0 auto;
  background: var(--deep);
  color: #fff;
  padding: 18px 22px;
  border-radius: 14px;
  font-size: .9rem;
  z-index: 90;
  box-shadow: 0 24px 60px rgba(16,31,103,.45);
  display: flex;
  gap: 14px;
  align-items: center;
  flex-wrap: wrap;
}
/* The `hidden` attribute must beat the flex layout above. */
.cookie-notice[hidden] { display: none !important; }
.cookie-notice p { color: #cdd6f5; margin: 0; flex: 1; min-width: 240px; }
.cookie-notice a { color: var(--sky); }
.cookie-notice button {
  background: var(--sky); color: var(--deep); border: 0;
  padding: 8px 18px; border-radius: 8px; font-weight: 700;
  font-family: inherit; cursor: pointer; font-size: .9rem;
}
.cookie-notice button:hover { background: #13c6ff; }

/* Content pages (about, api-docs) */
.content-hero {
  background: linear-gradient(180deg, var(--pearl), #fff);
  padding: 60px 24px 40px;
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.content-hero p { max-width: 640px; margin: 12px auto 0; }
.content-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.content-section h2 {
  margin-bottom: 14px;
  font-size: 1.35rem;
}
.content-section p {
  font-size: 1rem;
  margin-bottom: 12px;
}
.content-section pre {
  background: #f7f9fd;
  border: 1px solid #eaeff8;
  border-radius: var(--radius-sm);
  padding: 16px;
  overflow-x: auto;
  font-family: ui-monospace, 'SF Mono', Menlo, monospace;
  font-size: .85rem;
  color: var(--deep);
  line-height: 1.5;
}
code { font-family: ui-monospace, 'SF Mono', Menlo, monospace; font-size: .9em; background: var(--pearl); padding: 2px 6px; border-radius: 4px; color: var(--deep); }

@media (max-width: 560px) {
  .footer-inner { flex-direction: column; text-align: center; }
  .card-head { flex-direction: column; }
  .brand-name { display: none; }
  .site-nav { gap: 16px; }
}
