/* The lookup page on certping-pki-app's DESIGN.md, light: flat in the Material sense. Surfaces sit
   on one plane and carry hierarchy with tonal fills, not shadows. A soft blue band holds the
   search; outlined 16px cards hold the record as label and value rows; blue marks the one action,
   section icons and links. Plus Jakarta Sans, Geist Mono for identifiers, pill actions, 12px
   fields, Phosphor icons. */

@font-face {
  font-family: "Plus Jakarta Sans";
  src: url("plus-jakarta-sans.ttf?v=8033ee46b1d4") format("truetype");
  font-weight: 200 800;
  font-display: swap;
}

@font-face {
  font-family: "Geist Mono";
  src: url("geist-mono.woff?v=8033ee46b1d4") format("woff");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  color-scheme: light;
  --background: #f7f9fc;
  --card: #ffffff;
  --foreground: #101b32;
  --muted: #52627a;
  --primary: #2b6aea;
  --primary-hover: #255fd6;
  --primary-soft: #eaf2ff;
  --primary-soft-ink: #2154c4;
  --brand: #4683ff;
  --brand-accent: #93b7ff;
  --band: #eef4ff;
  --band-border: #d6e3fb;
  --border: #c9d4e3;
  --divider: #e1e7ef;
  --control-bg: #ffffff;
  --control-border: #c6cfdc;
  --control-border-hover: #94a3b8;
  --success-soft: #e6f7f2;
  --success-ink: #087d59;
  --warning-soft: #fff4e5;
  --warning-border: #f3cf9a;
  --warning-ink: #9a4d05;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* {
  box-sizing: border-box;
}

html {
  background: var(--background);
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--background);
  color: var(--foreground);
  font-family: "Plus Jakarta Sans", ui-sans-serif, system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

main {
  flex: 1;
  padding-top: 28px;
  padding-bottom: 64px;
}

h1,
h2,
h3,
p {
  margin: 0;
}

a {
  color: var(--primary);
  text-underline-offset: 3px;
}

a:hover {
  color: var(--primary-hover);
}

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 2px;
}

.wrap {
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

.mono {
  font-family: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px;
  overflow-wrap: anywhere;
}

.quiet {
  color: var(--muted);
}

.small {
  font-size: 13px;
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

.icon {
  width: 18px;
  height: 18px;
  flex: none;
}

/* App bar: white, part of the page plane, a divider below. */

.appbar {
  background: var(--card);
  border-bottom: 1px solid var(--divider);
}

.appbar-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}

.brand img {
  display: block;
  height: 28px;
  width: auto;
}

/* The search band: a flat tonal blue field. */

.band {
  background: var(--band);
  border-bottom: 1px solid var(--band-border);
  padding: 40px 0 36px;
}

h1 {
  font-size: 30px;
  font-weight: 650;
  letter-spacing: -0.01em;
  line-height: 1.2;
}

.sub {
  max-width: 64ch;
  margin-top: 8px;
  color: var(--muted);
}

.search {
  display: flex;
  gap: 10px;
  max-width: 720px;
  margin-top: 22px;
}

.field {
  position: relative;
  flex: 1;
  min-width: 0;
}

.field .icon {
  position: absolute;
  left: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--muted);
  pointer-events: none;
}

.field input {
  width: 100%;
  height: 50px;
  padding: 0 16px 0 44px;
  border: 1px solid var(--control-border);
  border-radius: 12px;
  background: var(--control-bg);
  color: var(--foreground);
  font: inherit;
  font-size: 16px;
  transition: border-color 160ms var(--ease);
}

.field input::placeholder {
  color: var(--muted);
}

.field input:hover {
  border-color: var(--control-border-hover);
}

.field input:focus {
  outline: none;
  border-color: var(--brand);
  box-shadow: 0 0 0 1px var(--brand);
}

/* Buttons: pills. Filled for the one action, outline for the alternative, tonal for a soft
   action inside a card, text for quiet links. Flat: no shadow; press compresses. */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid transparent;
  border-radius: 999px;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 160ms var(--ease), border-color 160ms var(--ease), transform 120ms var(--ease);
}

.btn:active {
  transform: scale(0.98);
}

.btn .icon {
  width: 16px;
  height: 16px;
}

.btn.primary {
  min-height: 50px;
  min-width: 140px;
  padding: 0 26px;
  background: var(--primary);
  color: #ffffff;
  font-size: 15px;
}

.btn.primary:hover {
  background: var(--primary-hover);
  color: #ffffff;
}

.btn.outline {
  background: var(--card);
  border-color: var(--border);
  color: var(--foreground);
}

.btn.outline:hover {
  border-color: var(--control-border-hover);
  color: var(--foreground);
}

.btn.tonal {
  background: var(--primary-soft);
  color: var(--primary-soft-ink);
}

.btn.tonal:hover {
  border-color: var(--brand-accent);
  color: var(--primary-soft-ink);
}

.btn.text {
  padding: 0 12px;
  color: var(--primary);
}

.btn.text:hover {
  background: var(--primary-soft);
}

.btn.small {
  min-height: 36px;
  padding: 0 14px;
  font-size: 13px;
}

/* A lookup in progress: the label changes and a ring turns. */

.spinner,
.when-busy {
  display: none;
}

.btn.busy {
  cursor: progress;
}

.btn.busy .spinner {
  display: block;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(255 255 255 / 0.45);
  border-top-color: #ffffff;
  border-radius: 50%;
  animation: turn 700ms linear infinite;
}

.btn.busy .when-idle {
  display: none;
}

.btn.busy .when-busy {
  display: inline;
}

@keyframes turn {
  to {
    transform: rotate(360deg);
  }
}

/* Cards: outlined, 16px, no shadow. */

.card {
  border: 1px solid var(--border);
  border-radius: 16px;
  background: var(--card);
}

.tile {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  flex: none;
  border-radius: 10px;
  background: var(--primary-soft);
  color: var(--primary-soft-ink);
}

.callout {
  display: flex;
  gap: 14px;
  padding: 20px;
}

.callout h2 {
  font-size: 17px;
  font-weight: 650;
}

.callout p {
  margin-top: 4px;
  color: var(--muted);
}

.callout.warning {
  border-color: var(--warning-border);
  background: var(--warning-soft);
}

.callout.warning .tile {
  background: var(--card);
  color: var(--warning-ink);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}

/* The record's summary. */

.summary {
  display: grid;
  gap: 12px;
  padding: 22px 24px;
}

.summary-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.summary h2 {
  font-size: 26px;
  font-weight: 650;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 12px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--foreground);
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
}

a.chip:hover {
  border-color: var(--control-border-hover);
  color: var(--foreground);
}

.chip.good {
  border-color: transparent;
  background: var(--success-soft);
  color: var(--success-ink);
}

.chip.attention {
  border-color: transparent;
  background: var(--warning-soft);
  color: var(--warning-ink);
}

.meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}

.meta li {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.meta .icon {
  width: 16px;
  height: 16px;
  color: var(--brand);
}

/* Panels: label and value rows on hairlines. */

.grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 16px;
}

.panel {
  padding: 18px 20px 12px;
  min-width: 0;
}

.panel h3 {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 8px;
  font-size: 15px;
  font-weight: 650;
}

.panel h3 .icon {
  color: var(--brand);
}

dl {
  margin: 0;
}

dl > div {
  display: grid;
  grid-template-columns: 150px 1fr;
  gap: 12px;
  padding: 9px 0;
  border-top: 1px solid var(--divider);
  font-size: 14px;
}

dl > div:first-child {
  border-top: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.redacted-label {
  margin: 10px 0 8px;
  padding-top: 10px;
  border-top: 1px solid var(--divider);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}

.quiet-chips .chip {
  background: var(--background);
  border-color: var(--divider);
  color: var(--muted);
  font-weight: 500;
}

.panel .btn.tonal {
  margin-top: 14px;
}

.panel .small {
  margin-top: 10px;
}

.notices {
  margin-top: 16px;
}

.notices ul {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
  margin: 0 0 8px;
  padding: 0;
  list-style: none;
  font-size: 13.5px;
}

.notices li a,
.notices li strong {
  display: block;
  font-weight: 600;
}

.notices li span {
  display: block;
  margin-top: 2px;
  color: var(--muted);
}

.aside {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 18px;
  color: var(--muted);
  font-size: 14px;
}

.aside .icon {
  color: var(--brand);
}

.foot {
  border-top: 1px solid var(--divider);
  background: var(--card);
  padding: 20px 0 28px;
  font-size: 13px;
}

.foot .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 22px;
}

@media (max-width: 760px) {
  .grid,
  .notices ul {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 560px) {
  .wrap {
    padding: 0 16px;
  }
  .band {
    padding: 28px 0;
  }
  h1 {
    font-size: 26px;
  }
  .search {
    flex-direction: column;
  }
  .summary {
    padding: 18px;
  }
  .summary-top {
    flex-direction: column;
  }
  dl > div {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .actions .btn {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .btn,
  .field input {
    transition: none;
  }
  .btn:active {
    transform: none;
  }
  .btn.busy .spinner {
    animation: none;
  }
}
