/* A register, not a dashboard. Paper ground, ink text, one oxblood accent
   reserved for certificate numbers and status. Monospace appears only where
   strings are meant to be compared character by character. */

:root {
  --paper:      #edebe6;
  --paper-deep: #e4e1da;
  --card:       #f6f5f1;
  --ink:        #1c1b19;
  --ink-soft:   #55524c;
  --ink-faint:  #8a867e;
  --rule:       #cfcbc2;
  --rule-firm:  #b3aea3;
  --seal:       #6b1f2a;
  --seal-soft:  #f0e4e4;
  --green:      #2f5d45;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua",
           "Source Serif 4", Georgia, serif;
  --mono:  ui-monospace, "SF Mono", SFMono-Regular, Menlo, Consolas,
           "Liberation Mono", monospace;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration-color: var(--rule-firm); text-underline-offset: 2px; }
a:hover { text-decoration-color: var(--seal); }

.mono { font-family: var(--mono); font-size: 0.92em; letter-spacing: -0.01em; }

/* ---- chrome ---- */

.masthead {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  padding: 1.1rem clamp(1rem, 4vw, 2.5rem) 0.9rem;
  border-bottom: 1px solid var(--rule-firm);
}

/* The logo's own face, served from here rather than a font host. IBM Plex
   Mono, SIL Open Font License (public/fonts/IBM-Plex-OFL.txt). */
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-600.woff2") format("woff2");
}
@font-face {
  font-family: "IBM Plex Mono";
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-700.woff2") format("woff2");
}

/* The lockup from the logo canvas, at header size: the mark, then the name
   with its hyphen in the accent. Its navy and green are the logo's, not the
   page's palette. */
.wordmark {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  align-self: center;
  text-decoration: none;
  color: #0B1E33;
}
.wordmark .mark { width: 1.9rem; height: 1.9rem; flex: none; }
.wordmark .name {
  font-family: "IBM Plex Mono", var(--mono);
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.02em;
}
.wordmark .hyphen { color: #0F6B4F; }

.masthead nav { display: flex; align-items: baseline; gap: 1.25rem; flex-wrap: wrap; }
.masthead nav a, .linklike { font-size: 0.95rem; }

.linklike {
  background: none;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 0.95rem;
  color: var(--ink);
  cursor: pointer;
  text-decoration: underline;
  text-decoration-color: var(--rule-firm);
  text-underline-offset: 2px;
}
.linklike:hover { text-decoration-color: var(--seal); }
form.inline { display: inline; }

.orgbar {
  display: flex;
  align-items: baseline;
  gap: 0.7rem;
  flex-wrap: wrap;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem);
  background: var(--paper-deep);
  border-bottom: 1px solid var(--rule);
  font-size: 0.87rem;
  color: var(--ink-soft);
}
.orgbar .orgname { color: var(--ink); font-weight: 600; }
.orgbar .sep { width: 1px; height: 0.85em; background: var(--rule-firm); }
.orgbar .spacer { flex: 1; }
.orgbar .who { color: var(--ink-faint); }
.orgbar .over { color: var(--seal); font-style: italic; }

main { padding: clamp(1.5rem, 5vw, 3rem) clamp(1rem, 4vw, 2.5rem) 4rem; }

footer {
  border-top: 1px solid var(--rule);
  padding: 1.2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  color: var(--ink-faint);
  font-size: 0.85rem;
  max-width: 60ch;
}
footer p { margin: 0; }

/* ---- typography ---- */

h1 { font-size: 1.75rem; font-weight: 600; margin: 0 0 0.35rem; letter-spacing: -0.005em; }
h2 { font-size: 1.15rem; font-weight: 600; margin: 2rem 0 0.6rem; }
.lede { color: var(--ink-soft); margin: 0 0 2rem; max-width: 58ch; }

/* ---- the logging column: a small precise task, not an overview ---- */

.column { max-width: 34rem; margin: 0 auto; }

/* ---- sign-in: the form, and beside it what the register keeps ---- */

.auth-split {
  display: grid;
  grid-template-columns: minmax(0, 22rem) minmax(0, 28rem);
  justify-content: center;
  gap: clamp(2rem, 6vw, 4.5rem);
  align-items: start;
}
@media (max-width: 52rem) {
  .auth-split { grid-template-columns: minmax(0, 34rem); }
}

.assurance {
  border-left: 1px solid var(--rule-firm);
  padding-left: clamp(1.5rem, 4vw, 2.5rem);
}
@media (max-width: 52rem) {
  .assurance { border-left: 0; border-top: 1px solid var(--rule-firm); padding: 2rem 0 0; }
}
.assurance .eyebrow {
  font-family: "IBM Plex Mono", var(--mono);
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #0F6B4F;
  margin: 0.4rem 0 0.6rem;
}
.assurance h2 { font-size: 1.45rem; line-height: 1.25; margin: 0 0 0.6rem; }
.assurance-lede { color: var(--ink-soft); margin: 0 0 1.6rem; }

.assurances { list-style: none; margin: 0; padding: 0; counter-reset: assurance; }
.assurances li {
  counter-increment: assurance;
  position: relative;
  padding: 0.95rem 0 0.95rem 2.4rem;
  border-top: 1px solid var(--rule);
}
.assurances li::before {
  content: counter(assurance, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 1.05rem;
  font-family: "IBM Plex Mono", var(--mono);
  font-size: 0.78rem;
  font-weight: 600;
  color: #0F6B4F;
}
.assurances h3 { font-size: 1rem; font-weight: 600; margin: 0 0 0.2rem; }
.assurances p { margin: 0; font-size: 0.93rem; color: var(--ink-soft); }
.assurances .sample {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.2rem 0.5rem;
  background: var(--card);
  border: 1px solid var(--rule);
  font-size: 0.8rem;
  color: var(--ink);
}
.assurances .sample span { color: var(--ink-faint); margin-right: 0.3rem; }

.assurance .stored {
  margin: 0.4rem 0 0;
  padding-top: 0.95rem;
  border-top: 1px solid var(--rule);
  font-size: 0.85rem;
  color: var(--ink-faint);
}
.assurance .stored strong { color: var(--ink-soft); font-weight: 600; }
.column.wide { max-width: 52rem; }

fieldset { border: 0; margin: 0; padding: 0; }

.field { margin-bottom: 1.4rem; }
.field > label, .field > .label {
  display: block;
  font-weight: 600;
  font-size: 0.95rem;
  margin-bottom: 0.3rem;
}
.field .hint { display: block; color: var(--ink-faint); font-size: 0.85rem; margin-bottom: 0.4rem; }

input[type=text], input[type=email], input[type=password], input[type=date], select, textarea {
  width: 100%;
  padding: 0.5rem 0.6rem;
  font: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--rule-firm);
  border-radius: 2px;
}
input:focus, select:focus, textarea:focus {
  outline: 2px solid var(--seal);
  outline-offset: -1px;
  border-color: var(--seal);
}
input[type=file] { font: inherit; font-size: 0.9rem; }

.checklist { border: 1px solid var(--rule); border-radius: 2px; background: var(--card); }
.checklist label {
  display: flex;
  gap: 0.55rem;
  align-items: baseline;
  padding: 0.5rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  font-size: 0.95rem;
}
.checklist label:last-child { border-bottom: 0; }
.checklist input { margin: 0; }
.checklist .desc { display: block; color: var(--ink-faint); font-size: 0.85rem; }

button.primary {
  font: inherit;
  font-weight: 600;
  font-size: 1rem;
  color: var(--paper);
  background: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 0.55rem 1.4rem;
  cursor: pointer;
}
button.primary:hover { background: var(--seal); border-color: var(--seal); }
button.secondary {
  font: inherit;
  font-size: 0.9rem;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--rule-firm);
  border-radius: 2px;
  padding: 0.35rem 0.8rem;
  cursor: pointer;
}
button.secondary:hover { border-color: var(--seal); color: var(--seal); }

.formfoot { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; }
.altlinks { margin-top: 1.6rem; font-size: 0.9rem; color: var(--ink-soft); }
.altlinks p { margin: 0.3rem 0; }

/* ---- notices ---- */

.notice {
  max-width: 52rem;
  margin: 0 auto 1.6rem;
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--rule-firm);
  background: var(--card);
  font-size: 0.94rem;
}
.notice.error { border-left-color: var(--seal); background: var(--seal-soft); }
.notice.success { border-left-color: var(--green); }

/* ---- the certificate: the one place type is allowed to be loud ---- */

.certificate {
  border: 1px solid var(--ink);
  background: var(--card);
  padding: clamp(1.2rem, 4vw, 2rem);
  margin-top: 2rem;
}
.certificate .seal {
  float: right;
  width: clamp(5.5rem, 18vw, 7.5rem);
  height: auto;
  margin: -0.4rem -0.4rem 0.6rem 1rem;
}
.certificate .issued { color: var(--ink-faint); font-size: 0.85rem; margin: 0 0 0.2rem; }
.certificate .number {
  font-family: var(--mono);
  font-size: clamp(1.4rem, 5vw, 1.9rem);
  font-weight: 600;
  color: var(--seal);
  letter-spacing: -0.02em;
  margin: 0 0 1.3rem;
  word-break: break-all;
}
.certificate h3 {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-faint);
  margin: 1.3rem 0 0.3rem;
}
.certificate .disclosure {
  font-size: 1.1rem;
  line-height: 1.45;
  margin: 0;
  padding: 0.7rem 0.85rem;
  background: var(--paper-deep);
  border-left: 3px solid var(--seal);
  white-space: pre-wrap;
}
.certificate .placement { margin: 0; color: var(--ink-soft); white-space: pre-wrap; }
.certificate .meta { margin: 0; font-size: 0.9rem; color: var(--ink-soft); }
.certificate .actions { display: flex; gap: 0.7rem; flex-wrap: wrap; margin-top: 1.6rem; }
.certificate .hash { word-break: break-all; }

.uncovered { border-color: var(--rule-firm); }
.uncovered h2 { margin-top: 0; }

/* ---- registry tables ---- */

table.registry {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.93rem;
  background: var(--card);
  border: 1px solid var(--rule-firm);
}
table.registry th {
  text-align: left;
  font-weight: 600;
  font-size: 0.82rem;
  color: var(--ink-soft);
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--rule-firm);
  background: var(--paper-deep);
  white-space: nowrap;
}
table.registry td {
  padding: 0.45rem 0.7rem;
  border-bottom: 1px solid var(--rule);
  vertical-align: baseline;
}
table.registry tr:last-child td { border-bottom: 0; }
table.registry tr.inactive td { color: var(--ink-faint); }
.tablewrap { overflow-x: auto; }

.status { font-size: 0.82rem; font-weight: 600; }
.status.on { color: var(--green); }
.status.off { color: var(--ink-faint); }
.status.pending { color: var(--seal); }

.empty { color: var(--ink-faint); font-style: italic; }

.rowform { display: flex; gap: 0.6rem; align-items: flex-end; flex-wrap: wrap; }
.rowform .field { margin-bottom: 0; flex: 1 1 12rem; }

canvas.preview { display: none; }

canvas.editor {
  display: block;
  width: 100%;
  height: auto;
  margin: 0.5rem 0 0.75rem;
  border-radius: 3px;
  cursor: grab;
  touch-action: none;
}
canvas.editor:active { cursor: grabbing; }

.controls {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  align-items: center;
  margin-bottom: 1rem;
}
.controls .sep {
  width: 1px;
  align-self: stretch;
  background: rgba(0, 0, 0, 0.12);
  margin: 0 0.4rem;
}
.controls label {
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  opacity: 0.75;
}
.controls select { padding: 0.25rem 0.4rem; }
.controls .swatch {
  width: 2.2rem;
  height: 1.9rem;
  min-width: 0;
  padding: 0;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 3px;
  cursor: pointer;
}

.picker {
  position: fixed;
  z-index: 40;
  width: 210px;
  background: #faf9f6;
  border: 1px solid rgba(0, 0, 0, 0.25);
  border-radius: 5px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
  user-select: none;
  touch-action: none;
}
.picker .bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.3rem 0.5rem;
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  background: #1c1b19;
  color: #f6f5f1;
  border-radius: 4px 4px 0 0;
  cursor: grab;
}
.picker .bar:active { cursor: grabbing; }
.picker .bar .close {
  background: none;
  border: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1;
  padding: 0 0.2rem;
  min-width: 0;
  cursor: pointer;
}
.picker canvas { display: block; margin: 1px auto 0; touch-action: none; cursor: crosshair; }
.picker .foot { display: flex; align-items: center; gap: 0.4rem; padding: 0.4rem; }
.picker .chip {
  width: 1.2rem;
  height: 1.2rem;
  border: 1px solid rgba(0, 0, 0, 0.3);
  border-radius: 3px;
}
.picker .foot input {
  flex: 1;
  min-width: 0;
  font-family: ui-monospace, Menlo, Consolas, monospace;
  font-size: 0.8rem;
  padding: 0.2rem 0.35rem;
}
