/* ============================================================================
   app.css — Proofile's stylesheet, loaded after Baustein.css, so it wins.
   ----------------------------------------------------------------------------
   Two things belong here:

     1. RETHEMING — redefine the tokens. Changing --brand alone restyles every
        button, badge, link, focus ring and active state.

     2. PROOFILE'S OWN CLASSES — anything the utility vocabulary cannot say.

   The look is design direction 3, "Ink & seal, sealed on approval"
   (design/3/README.md): a signed document. Near-black ink on warm paper,
   hairline rules, serif headings, labels and the signature in monospace, and
   one green kept for the seal of a verified record. --brand is the ink, so
   primary buttons and links are ink; --success is the seal.
============================================================================ */

:root {
  --brand:          #17150f;
  --brand-contrast: #f6f3ec;
  --brand-strong:   #000000;
  --brand-soft:     #ebe5d8;

  --page:           #f6f3ec;
  --panel:          #fffdf8;
  --soft:           #efe9dd;
  --overlay:        rgba(23, 21, 15, 0.45);

  --text:           #17150f;
  --text-muted:     #5f5a4f;
  --text-faint:     #6b6557;   /* still 4.5:1 on --soft and --brand-soft: hints are text */

  --border:         #d9d1c0;
  --border-strong:  #b7ad98;

  --success:        #1d6b47;
  --success-soft:   #e2ece3;
  --danger:         #a3321d;
  --danger-soft:    #f7e4dd;
  --warning:        #855400;
  --warning-soft:   #f6ebd3;
  --info:           #285a80;
  --info-soft:      #e3ecf3;

  --shadow-sm:      0 1px 0 rgba(23, 21, 15, 0.06);
  --shadow:         0 1px 0 var(--border), 0 14px 32px -24px rgba(23, 21, 15, 0.35);
  --shadow-lg:      0 24px 48px -24px rgba(23, 21, 15, 0.45);
  --ring:           0 0 0 2px var(--panel), 0 0 0 4px var(--seal);

  --radius-sm:      2px;
  --radius:         2px;
  --radius-lg:      3px;

  /* Proofile's own. The serif and the monospace are system faces until an
     open-licence serif is bundled in public/fonts/. */
  --serif:          "Iowan Old Style", "Charter", "Sitka Text", Georgia, "Times New Roman", serif;
  --mono:           ui-monospace, "Cascadia Mono", "SF Mono", Consolas, monospace;
  --seal:           var(--success);
  --seal-ink:       #ffffff;
  --rule-ink:       var(--text);
}

[data-theme="dark"] {
  --brand:          #eee9dd;
  --brand-contrast: #12110e;
  --brand-strong:   #ffffff;
  --brand-soft:     #2a2822;

  --page:           #12110e;
  --panel:          #1b1a16;
  --soft:           #24221d;
  --overlay:        rgba(0, 0, 0, 0.6);

  --text:           #eee9dd;
  --text-muted:     #b3ac9d;
  --text-faint:     #959080;

  --border:         #37342c;
  --border-strong:  #4a463c;

  --success:        #5dbb8b;
  --success-soft:   #17281f;
  --danger:         #e8826b;
  --danger-soft:    #2e1a15;
  --warning:        #dcab4f;
  --warning-soft:   #2c2414;
  --info:           #86b6dc;
  --info-soft:      #17222c;

  --seal-ink:       #0d1912;
}

/* The kit's danger button is white on --danger, which the dark --danger is too light for. */
[data-theme="dark"] .btn-danger { color: var(--brand-contrast); }

/* --- type: serif headings, monospace labels -------------------------------------- */

.page-title, .panel-title, .modal-title, .bare-title, .review-title, .review-card-title,
.review-h2, .empty-title, .signed-name, .brand-name {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.01em;
}

.page-title { font-size: clamp(1.75rem, 3vw, 2.25rem); line-height: 1.1; }
.panel-title { font-size: var(--text-xl); }
.modal-title { font-size: var(--text-xl); margin: 0; }

.subhead, .meter-label, .label-mono {
  font-family: var(--mono);
  font-size: var(--text-xs);
  font-weight: 400;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

/* --- buttons the kit does not have ----------------------------------------------- */

.btn-seal { background: var(--seal); border-color: var(--seal); color: var(--seal-ink); }
.btn-seal:hover { background: var(--seal); filter: brightness(1.08); }
.btn-line { background: transparent; border-color: var(--rule-ink); color: var(--text); }
.btn-line:hover { background: var(--soft); }

/* --- the seal -------------------------------------------------------------------- */

.seal-mark { flex: none; color: var(--seal); }
.seal-mark .tick { stroke: var(--panel); }
.seal { display: block; color: var(--seal); }
.seal .tick { stroke: var(--seal-ink); }
.seal-empty { color: var(--text-faint); }
.icon .tick { stroke: var(--panel); }

/* --- status: one vocabulary (StatusBadge) ----------------------------------------- */

.status {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space) * 1.5);
  padding: 3px 7px;
  border: 1px solid currentColor;
  border-radius: var(--radius-sm);
  font-size: 0.7rem;
  font-weight: 600;
  line-height: 1.2;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  white-space: nowrap;
}
.status + .status { margin-inline-start: calc(var(--space) * 1.5); }
.status-draft    { color: var(--text-muted); }
.status-waiting  { color: var(--warning); }
.status-verified { color: var(--seal); background: var(--success-soft); }
.status-declined { color: var(--danger); }
.status-expired  { color: var(--text-muted); border-style: dashed; }
.status-hidden   { color: var(--text-muted); border-color: transparent; padding-inline: 0; }

/* The sidebar's menu button (NavToggle) exists for the narrow layout only,
   where Baustein.css turns the sidebar into an overlay at 768px and below. */
.nav-toggle {
  display: none;
}

@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
  }

  /* The avatar alone in the header: the name does not fit beside the mark. */
  .user-menu-name {
    display: none;
  }
}

/* --- brand ----------------------------------------------------------------- */

.brand,
.bare-brand {
  display: inline-flex;
  align-items: center;
  gap: calc(var(--space) * 2.5);
  color: var(--text);
  text-decoration: none;
}

.brand:hover,
.bare-brand:hover {
  text-decoration: none;
}

.brand-name {
  font-size: 1.35rem;
  line-height: 1;
}

/* --- pages before sign-in (Views/bare.php) ---------------------------------- */

.bare-page {
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: calc(var(--space) * 12) calc(var(--space) * 4);
  background: var(--page);
}

.bare-card {
  width: 100%;
  max-width: 26rem;
  padding: calc(var(--space) * 8);
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rule-ink);
  border-radius: 0;
  box-shadow: var(--shadow);
}

.bare-brand {
  margin-bottom: calc(var(--space) * 6);
}

.bare-title {
  margin: 0 0 calc(var(--space) * 2);
  font-size: 2rem;
  line-height: 1.1;
}

.bare-card a:not(.btn):not(.brand):not(.bare-brand) {
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.bare-lead {
  margin: 0 0 calc(var(--space) * 6);
  color: var(--text-muted);
}

.bare-card .form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 4);
}

.bare-card .alert {
  margin-bottom: calc(var(--space) * 4);
}

.bare-switch {
  margin: calc(var(--space) * 4) 0 0;
  font-size: var(--text-sm);
  text-align: center;
}

.bare-foot {
  margin: calc(var(--space) * 6) 0 0;
  font-size: var(--text-xs);
  color: var(--text-faint);
  text-align: center;
}

/* The sign-up field people never see; form-filling robots do. */
.hp-field {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* --- the signed-in shell ---------------------------------------------------- */

.side-nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space);
}

.side-nav-link {
  text-decoration: none;
  color: inherit;
}

/* The current screen: a rule of ink beside it, like a marked margin. */
.side-nav-link.is-active {
  box-shadow: inset 2px 0 0 var(--rule-ink);
  border-radius: 0;
}

.app-header {
  background: var(--page);
}

.app-sidebar {
  background: var(--page);
}

.app-content {
  background: var(--page);
}

.panel {
  border-radius: 0;
}

/* A card's own panels on the detail and the editor: a rule of ink on top. */
.editor-main > .panel:first-child {
  border-top: 3px solid var(--rule-ink);
}

.user-menu {
  position: relative;
}

.user-menu-button {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 2);
  padding: var(--space) calc(var(--space) * 2);
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
}

.user-menu-button::-webkit-details-marker {
  display: none;
}

.user-menu-button:hover {
  background: var(--soft);
}

.menu-panel {
  position: absolute;
  inset-inline-end: 0;
  top: calc(100% + var(--space));
  z-index: 20;
  min-width: 12rem;
  padding: var(--space);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.menu-panel form {
  margin: 0;
}

.menu-item {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 2);
  width: 100%;
  padding: calc(var(--space) * 2);
  border: 0;
  border-radius: var(--radius-sm);
  background: none;
  color: var(--text);
  font: inherit;
  text-align: start;
  text-decoration: none;
  cursor: pointer;
}

.menu-item:hover {
  background: var(--soft);
}

/* --- screens ---------------------------------------------------------------- */

.screen {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 5);
  max-width: 56rem;
}

.app-content > .alert {
  max-width: 56rem;
  margin-bottom: calc(var(--space) * 5);
}

.page-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: calc(var(--space) * 4);
  flex-wrap: wrap;
}

.page-title {
  margin: 0;
}

.page-lead {
  margin: var(--space) 0 0;
  color: var(--text-muted);
}

.panel {
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.panel-head {
  padding: calc(var(--space) * 4) calc(var(--space) * 5) 0;
}

.panel-title {
  margin: 0;
}

.panel-body {
  padding: calc(var(--space) * 5);
}

.panel-body .form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 4);
  max-width: 28rem;
}

.panel-body > .field {
  max-width: 28rem;
}

.form-actions {
  display: flex;
  gap: calc(var(--space) * 2);
}

.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(var(--space) * 2);
  padding: calc(var(--space) * 8) calc(var(--space) * 4);
  text-align: center;
  color: var(--text-muted);
}

.empty-title {
  margin: 0;
  color: var(--text);
  font-size: var(--text-lg);
}

.empty-text {
  margin: 0;
  max-width: 32rem;
}

.confirm-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--space) * 3);
  flex-wrap: wrap;
}

/* The text takes the line and the button wraps below it on a phone; a long
   address breaks rather than running out of the box. */
.confirm-banner .alert-body {
  flex: 1 1 16rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.account-status {
  margin: calc(var(--space) * 2) 0 calc(var(--space) * 3);
}

/* --- Impact Cards ----------------------------------------------------------- */

.field-error:empty {
  display: none;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr));
  gap: calc(var(--space) * 4);
}

.panel-body > .field + .field {
  margin-top: calc(var(--space) * 4);
}

.panel-body .textarea {
  width: 100%;
}

.subhead {
  margin: calc(var(--space) * 4) 0 calc(var(--space) * 2);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.panel-body > .subhead:first-child {
  margin-top: 0;
}

/* The editor and the detail: the card on the left, the meter beside it. */
.editor-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 17rem;
  gap: calc(var(--space) * 5);
  align-items: start;
}

.editor-main {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 5);
  min-width: 0;
}

.editor-side {
  position: sticky;
  top: calc(var(--space) * 4);
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 3);
}

@media (max-width: 1024px) {
  .editor-grid {
    grid-template-columns: minmax(0, 1fr);
  }

  /* On a narrow screen the editor's meter comes first, and does not follow
     the scroll. The detail keeps the card and its verifier first: its side
     (the meter and the history) follows them. */
  .editor-side {
    position: static;
    order: -1;
  }

  .editor-grid.is-detail .editor-side {
    order: 0;
  }
}

.screen:has(.editor-grid) {
  max-width: 72rem;
}

.meter {
  padding: calc(var(--space) * 4);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.meter-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: calc(var(--space) * 2);
}

.meter-label {
  font-weight: 600;
}

.meter-value {
  font-size: var(--text-xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.meter-track {
  height: 8px;
  border-radius: var(--radius-full);
  background: var(--soft);
  overflow: hidden;
}

.meter-bar {
  height: 100%;
  border-radius: var(--radius-full);
  transition: width var(--trans);
}

.meter-bar.is-weak { background: var(--danger); }
.meter-bar.is-fair { background: var(--warning); }
.meter-bar.is-good { background: var(--success); }

.meter-tips {
  list-style: none;
  margin: calc(var(--space) * 3) 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 2);
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.meter-tips li {
  display: flex;
  gap: calc(var(--space) * 2);
}

.meter-points {
  flex: none;
  min-width: 2.25rem;
  font-weight: 600;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.meter-done {
  margin: calc(var(--space) * 3) 0 0;
  font-size: var(--text-sm);
  color: var(--success);
}

/* Evidence */
.evidence-links,
.evidence-files {
  list-style: none;
  margin: 0 0 calc(var(--space) * 3);
  padding: 0;
}

.evidence-links li {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 2);
  padding: var(--space) 0;
  min-width: 0;
}

.evidence-links a {
  min-width: 0;
  overflow-wrap: anywhere;
}

.evidence-files {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
  gap: calc(var(--space) * 3);
}

.evidence-files li {
  position: relative;
}

.evidence-file {
  display: flex;
  flex-direction: column;
  gap: var(--space);
  padding: calc(var(--space) * 2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: inherit;
  text-decoration: none;
}

.evidence-file img,
.evidence-file .file-chip {
  width: 100%;
  height: 6rem;
  object-fit: cover;
  border-radius: var(--radius-sm);
  background: var(--soft);
}

.file-chip {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space);
  font-weight: 600;
  color: var(--text-muted);
}

.evidence-file-name {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.evidence-remove {
  position: absolute;
  top: calc(var(--space) * 1);
  inset-inline-end: calc(var(--space) * 1);
  background: var(--panel);
}

.link-form,
.upload-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--space) * 2);
}

.link-form .input {
  flex: 1 1 12rem;
  min-width: 0;
}

/* The cards list */
.filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space);
}

.filter-tab {
  padding: calc(var(--space) * 1.5) calc(var(--space) * 3);
  border-radius: var(--radius-full);
  color: var(--text-muted);
  text-decoration: none;
  font-size: var(--text-sm);
}

.filter-tab:hover {
  background: var(--soft);
}

.filter-tab.is-active {
  background: var(--brand-soft);
  color: var(--brand-strong);
  font-weight: 600;
}

.filter-count {
  font-variant-numeric: tabular-nums;
  opacity: 0.7;
}

.card-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.card-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--space) * 3);
  padding: calc(var(--space) * 3) 0;
  border-bottom: 1px solid var(--border);
  flex-wrap: wrap;
}

.card-row:last-child {
  border-bottom: 0;
}

.card-row-main {
  display: flex;
  flex-direction: column;
  min-width: 0;
  flex: 1 1 16rem;
}

.card-row-title {
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  overflow-wrap: anywhere;
}

.card-row-title:hover {
  text-decoration: underline;
}

.card-row-meta {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

.card-row-side {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 3);
}

.card-row-score {
  min-width: 2.75rem;
  text-align: end;
  font-variant-numeric: tabular-nums;
  color: var(--text-muted);
  font-size: var(--text-sm);
}

/* The dashboard's counts */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: calc(var(--space) * 3);
}

.stat {
  display: flex;
  flex-direction: column;
  padding: calc(var(--space) * 4);
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  color: inherit;
  text-decoration: none;
}

.stat:hover {
  border-color: var(--border-strong);
}

.stat-value {
  font-size: var(--text-2xl);
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.stat-label {
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* One card */
.card-head {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 3);
  flex-wrap: wrap;
  color: var(--text-muted);
}

.card-text {
  margin: 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space) * 2);
}

.facts {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: calc(var(--space) * 1) calc(var(--space) * 4);
  margin: 0;
}

.facts dt {
  color: var(--text-muted);
}

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

.is-hidden-card {
  color: var(--text-muted);
}

/* --- verification (VerifierPanel, CardTimeline) ------------------------------ */

.panel-actions {
  display: flex;
  flex-wrap: wrap;
  gap: calc(var(--space) * 2);
  margin-top: calc(var(--space) * 4);
}

.request-state {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: calc(var(--space) * 2);
  margin-bottom: calc(var(--space) * 4);
}

.request-state + .alert,
#verifier-panel .alert {
  margin-bottom: calc(var(--space) * 4);
}

.decline-reason {
  margin: calc(var(--space) * 2) 0 0;
  white-space: normal;
  overflow-wrap: anywhere;
}

.problem-list {
  margin: calc(var(--space) * 2) 0 0;
  padding-left: calc(var(--space) * 5);
}

.problem-list li + li {
  margin-top: calc(var(--space) * 1);
}

.signed-by {
  display: flex;
  align-items: flex-start;
  gap: calc(var(--space) * 3);
  margin-bottom: calc(var(--space) * 4);
  color: var(--success);
}

.signed-by p {
  margin: 0;
  color: var(--text);
}

.signed-by .text-muted {
  color: var(--text-muted);
}

.signed-name {
  font-size: var(--text-lg);
}

.signed-by .seal-sm {
  flex: none;
  width: 3.5rem;
  height: 3.5rem;
  margin-top: -0.25rem;
}

/* The signature's scheme, key and hash, like a document's footer line. */
.signature-line {
  margin: calc(var(--space) * 2) 0 0;
  padding-top: calc(var(--space) * 2);
  border-top: 1px dashed var(--border);
  font-family: var(--mono);
  font-size: var(--text-xs);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.timeline {
  list-style: none;
  margin: 0;
  padding: 0;
}

.timeline-item {
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0 calc(var(--space) * 3);
  padding-bottom: calc(var(--space) * 4);
}

/* The line joining one event to the next. */
.timeline-item:not(:last-child)::before {
  content: "";
  position: absolute;
  left: 13px;
  top: 28px;
  bottom: 0;
  width: 1px;
  background: var(--border);
}

.timeline-dot {
  grid-row: span 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-full);
  background: var(--soft);
  color: var(--text-muted);
}

.timeline-item.is-success .timeline-dot { background: var(--success-soft); color: var(--success); }
.timeline-item.is-danger .timeline-dot { background: var(--danger-soft); color: var(--danger); }
.timeline-item.is-warning .timeline-dot { background: var(--warning-soft); color: var(--warning); }

.timeline-text {
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}

.timeline-time {
  font-size: var(--text-xs);
  color: var(--text-muted);
}

/* --- the verifier's page (Views/review.php) --------------------------------- */
/* Phone first: verifiers open it from an email. design/3's review page. */

.review-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--page);
}

.review-top {
  display: flex;
  justify-content: center;
  padding: calc(var(--space) * 4);
  border-bottom: 1px solid var(--border);
}

.review-top .brand {
  width: 100%;
  max-width: 38rem;
  padding: 0 calc(var(--space) * 1);
}

.review-main {
  flex: 1;
  width: 100%;
  max-width: 38rem;
  margin: 0 auto;
  padding: calc(var(--space) * 8) calc(var(--space) * 5) calc(var(--space) * 12);
}

.review-foot {
  padding: calc(var(--space) * 6) calc(var(--space) * 5) calc(var(--space) * 10);
  border-top: 1px solid var(--border);
  font-size: var(--text-xs);
  color: var(--text-muted);
  text-align: center;
}

/* A short rule, then the label in monospace capitals. */
.review-eyebrow {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 3);
  margin: 0 0 calc(var(--space) * 4);
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.review-eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--rule-ink);
}

.review-title {
  margin: 0;
  font-size: clamp(1.75rem, 6.5vw, 2.4rem);
  line-height: 1.1;
  text-wrap: balance;
  overflow-wrap: anywhere;
}

.review-lead {
  margin: calc(var(--space) * 4) 0 0;
  color: var(--text-muted);
}

/* The card as it will be signed: a sheet ruled in ink, waiting for its seal. */
.review-card {
  position: relative;
  margin-top: calc(var(--space) * 8);
  padding: calc(var(--space) * 6) calc(var(--space) * 5);
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rule-ink);
}

.review-card .seal-waiting {
  position: absolute;
  top: -1.9rem;
  right: -0.5rem;
  width: 5.25rem;
  height: 5.25rem;
  transform: rotate(-12deg);
}

.review-card-title {
  margin: 0;
  padding-right: 3.75rem;
  font-size: 1.6rem;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.review-card-meta {
  margin: calc(var(--space) * 1.5) 0 0;
  font-family: var(--mono);
  font-size: var(--text-xs);
  letter-spacing: 0.03em;
  color: var(--text-muted);
}

.review-card .subhead {
  margin: calc(var(--space) * 6) 0 calc(var(--space) * 1.5);
}

/* A blank signature rule at the card's foot: approving fills it. */
.sign-blank {
  width: 60%;
  margin-top: calc(var(--space) * 10);
  border-top: 1px solid var(--rule-ink);
}

.sign-blank::after {
  content: "";
  display: block;
  width: 40%;
  margin-top: calc(var(--space) * 1.5);
  border-top: 1px dashed var(--border);
}

/* Evidence as ruled rows, the detail under each name. */
.review-card .evidence-links,
.review-card .evidence-files {
  display: block;
  border-top: 1px solid var(--border);
}

.review-card .evidence-links + .evidence-files {
  border-top: 0;
}

.review-h2 {
  margin: 0 0 calc(var(--space) * 3);
  font-size: 1.35rem;
}

.review-means {
  margin-top: calc(var(--space) * 9);
}

.review-means ol {
  margin: 0;
  padding: 0;
  list-style: none;
}

.review-means li {
  display: grid;
  grid-template-columns: 2.25rem minmax(0, 1fr);
  padding: calc(var(--space) * 3) 0;
  border-top: 1px solid var(--border);
  color: var(--text-muted);
}

.means-n {
  font: 0.78rem/1.9 var(--mono);
  color: var(--seal);
}

/* Two full-width buttons on a phone, side by side when there is room. */
.review-actions {
  display: grid;
  gap: calc(var(--space) * 3);
  margin-top: calc(var(--space) * 8);
}

@media (min-width: 520px) {
  .review-actions {
    grid-template-columns: 1fr 1fr;
  }
}

.review-actions .btn {
  justify-content: center;
  min-height: 3.25rem;
}

.review-fine {
  margin: calc(var(--space) * 5) 0 0;
  font-size: var(--text-sm);
  color: var(--text-muted);
}

/* After the decision: the seal, filled. */
.review-done {
  padding-top: calc(var(--space) * 6);
  text-align: center;
}

.review-done .seal-done {
  width: 7rem;
  height: 7rem;
  margin: 0 auto calc(var(--space) * 6);
  transform: rotate(-12deg);
}

.review-done > .icon {
  margin-bottom: calc(var(--space) * 4);
}

.review-done.is-declined > .icon { color: var(--text-muted); }

.review-done .review-lead {
  margin-bottom: calc(var(--space) * 4);
}

.review-message {
  padding-top: calc(var(--space) * 6);
}

/* --- dialogs: a sheet from the bottom on a phone, ruled in ink everywhere ---------- */

.modal {
  border-radius: 0;
  border-top: 3px solid var(--rule-ink);
  box-shadow: var(--shadow-lg);
}

.modal-header {
  border-bottom: 0;
  padding-bottom: 0;
}

.modal-footer {
  border-top: 0;
}

@media (max-width: 640px) {
  .modal-overlay {
    align-items: flex-end;
    padding: 0;
  }

  .modal {
    max-height: 92vh;
    animation: sheet-rise 0.28s ease-out;
  }
}

@keyframes sheet-rise {
  from { transform: translateY(100%); }
  to   { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .modal { animation: none; }
}

.review-form {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 4);
}

/* The signer's name and title on a ruled line, as on a signed form. */
.review-form .input {
  padding-inline: 2px;
  border: 0;
  border-bottom: 1.5px solid var(--rule-ink);
  border-radius: 0;
  background: transparent;
  font-size: var(--text-lg);
}

.review-form .input:focus {
  border-bottom-color: var(--seal);
  box-shadow: 0 1.5px 0 var(--seal);
}

.review-consent {
  display: flex;
  flex-direction: column;
  gap: calc(var(--space) * 2);
  margin: 0;
  padding: 0;
  border: 0;
}

/* The attestation and consent lines wrap; the box stays at the top. */
.review-form .check {
  align-items: flex-start;
}

.review-form .check input {
  margin-top: 2px;
  accent-color: var(--seal);
}

/* The attestation itself: a tinted band with the seal's rule. */
.review-form > .check:last-child {
  padding: calc(var(--space) * 3);
  background: var(--success-soft);
  border-left: 3px solid var(--seal);
}

/* --- the public pages (Views/public.php) -------------------------------------- */
/* The landing page, a profile, a certificate, the signing keys: design/3,
   Ink & seal. Everything here sits under body.pub or carries pub-/rec-. */

body.pub {
  height: auto;
  min-height: 100%;
  background: var(--page);
  line-height: 1.6;
}

.pub :where(a:not(.btn):not(.brand)) {
  color: inherit;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

.pub-wrap {
  width: 100%;
  max-width: 72rem;
  margin: 0 auto;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
}

.pub .btn { border-radius: var(--radius-sm); }

.pub-eyebrow,
.rec-label,
.rec-meta,
.rec-sig,
.pub-ev-meta,
.pub-person-meta,
.pub-company-period,
.pub-tally-since,
.pub-foot-copy {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
}

.pub-eyebrow,
.rec-label {
  text-transform: uppercase;
  color: var(--text-muted);
}

.pub-eyebrow {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}

.pub-eyebrow::before {
  content: "";
  width: 2rem;
  height: 1px;
  background: var(--rule-ink);
}

.pub-display {
  font: 400 clamp(2.5rem, 6vw, 4.4rem)/1.03 var(--serif);
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.pub-display-sm { font-size: clamp(2rem, 4.5vw, 3.1rem); }

.pub-display em {
  font-style: italic;
  color: var(--seal);
}


.pub-lede {
  max-width: 36rem;
  font-size: 1.125rem;
  color: var(--text-muted);
}

.pub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2rem;
}

/* header and footer */

.pub-head { border-bottom: 1px solid var(--border); }

.pub-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.5rem;
}

.pub-nav {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.pub-nav ul {
  display: flex;
  gap: 1.5rem;
  font-size: 0.925rem;
}

.pub .pub-nav ul a {
  color: var(--text-muted);
  text-decoration: none;
}

.pub .pub-nav ul a:hover {
  color: var(--text);
  text-decoration: underline;
}

/* On a narrow screen the anchors give way; signing in and the way in stay. */
@media (max-width: 860px) {
  .pub-nav-anchor { display: none; }
  .pub-nav { gap: 1rem; }
}

@media (max-width: 420px) {
  .pub-nav ul { display: none; }
}

.pub-foot {
  margin-top: 2rem;
  padding: 3rem 0;
  border-top: 1px solid var(--rule-ink);
}

.pub-foot-inner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem 2rem;
  align-items: start;
}

.pub-foot-line {
  margin-top: 0.75rem;
  font-size: 0.925rem;
  color: var(--text-muted);
}

.pub-foot-links {
  display: flex;
  gap: 1.5rem;
  font-size: 0.925rem;
}

.pub-foot-copy {
  grid-column: 1 / -1;
  color: var(--text-muted);
}

/* a verified record: a sheet of paper, ruled, sealed */

.rec {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 1.75rem 1.75rem 1.25rem;
  background: var(--panel);
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}

.rec-seal {
  position: absolute;
  top: -2.4rem;
  right: -1.4rem;
  width: 6.5rem;
  height: 6.5rem;
  transform: rotate(-12deg);
}

@media (max-width: 600px) {
  .rec-seal { top: -1.9rem; right: -0.4rem; width: 5rem; height: 5rem; }
}

.rec-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.rec-stamped .rec-top { padding-right: 4rem; }

.rec-status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--seal);
}

.rec-example {
  padding: 1px 6px;
  border: 1px dashed var(--border-strong);
  font: 0.7rem/1.5 var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.rec-title {
  margin-top: 0.9rem;
  font: 400 1.6rem/1.15 var(--serif);
  letter-spacing: -0.01em;
  overflow-wrap: anywhere;
}

.rec-meta { margin-top: 0.4rem; color: var(--text-muted); }
.rec-label { margin: 1.5rem 0 0.35rem; }

.rec-results {
  margin: 0.9rem 0 1.25rem;
  font-variant-numeric: tabular-nums;
  overflow-wrap: anywhere;
}

.rec-label + .rec-results { margin-top: 0; font-size: 1.05rem; }

.rec-signed {
  margin-top: auto;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-ink);
}

.rec-by { font-weight: 500; }

.rec-via {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.rec-sig {
  margin-top: 1.25rem;
  padding-top: 0.75rem;
  border-top: 1px dashed var(--border);
  color: var(--text-muted);
  overflow-wrap: anywhere;
}

.pub .rec-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;   /* a thumb-sized target on a phone */
  margin-top: 0.4rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--seal);
  text-decoration: none;
}

.pub .rec-link:hover { text-decoration: underline; }

/* a profile */

.pub-notice { padding-top: 1.5rem; }

.pub-person {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1.75rem;
  align-items: start;
  padding-top: clamp(2.5rem, 6vw, 4.5rem);
  padding-bottom: 2.5rem;
}

.pub-avatar {
  display: grid;
  place-items: center;
  width: 5.5rem;
  height: 5.5rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--page);
  font: 400 2rem/1 var(--serif);
}

.pub-person .pub-lede { margin-top: 0.75rem; }

.pub-person-meta {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 1rem;
  color: var(--text-muted);
}

.pub-person-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  margin-top: 0.9rem;
  font-size: 0.95rem;
}

.pub-tally {
  display: grid;
  justify-items: end;
  padding-left: 1.75rem;
  border-left: 1px solid var(--border);
  text-align: right;
}

.pub-tally-n {
  font: 400 4rem/0.9 var(--serif);
  color: var(--seal);
}

.pub-tally-label {
  margin-top: 0.4rem;
  font-weight: 500;
}

.pub-tally-since { color: var(--text-muted); }

@media (max-width: 760px) {
  .pub-person { grid-template-columns: minmax(0, 1fr); gap: 1.25rem; }

  .pub-tally {
    grid-template-columns: auto 1fr;
    column-gap: 1rem;
    align-items: end;
    justify-items: start;
    padding-top: 1rem;
    padding-left: 0;
    border-left: 0;
    border-top: 1px solid var(--border);
    text-align: left;
  }

  .pub-tally-n { grid-row: span 2; }
}

.pub-company {
  padding-top: 2rem;
  padding-bottom: 1rem;
}

.pub-company-name {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 0.9rem;
  border-top: 1px solid var(--rule-ink);
  font: 400 1.6rem/1.2 var(--serif);
}

.pub-company-period { color: var(--text-muted); }

.pub-records {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
  margin-top: 1.5rem;
}

.pub-records .rec { box-shadow: none; }
.pub-records .rec-title { font-size: 1.4rem; }
.pub-records .rec-results { color: var(--text-muted); }

@media (max-width: 760px) {
  .pub-records { grid-template-columns: minmax(0, 1fr); }
}

.pub-empty {
  padding: 2rem 0;
  border-top: 1px solid var(--rule-ink);
  color: var(--text-muted);
}

.pub-join {
  margin-top: 3rem;
  border-top: 3px double var(--rule-ink);
}

.pub-join-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding-top: 2.5rem;
  padding-bottom: 3.5rem;
}

.pub-join-title { font: 400 clamp(1.5rem, 3vw, 2rem)/1.2 var(--serif); }

/* a certificate, and the keys */

.pub-cert {
  max-width: 46rem;
  padding-top: clamp(2rem, 5vw, 3.5rem);
  padding-bottom: 2rem;
}

.pub-sheet {
  padding: 1.75rem 1.5rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 3px solid var(--rule-ink);
}

.pub-sheet-title {
  font: 400 clamp(1.75rem, 5vw, 2.4rem)/1.1 var(--serif);
  letter-spacing: -0.015em;
  overflow-wrap: anywhere;
}

.pub-sheet .rec-meta { margin-top: 0.5rem; }
.pub-sheet-text { overflow-wrap: anywhere; }
.pub-sheet-results { font-size: 1.1rem; font-weight: 500; }

.pub-evidence { border-top: 1px solid var(--border); }

.pub .pub-evidence a {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 0.1rem 0.75rem;
  align-items: center;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.pub-evidence .icon { grid-row: span 2; }
.pub-evidence a:hover .pub-ev-name { text-decoration: underline; }
.pub-ev-name { overflow-wrap: anywhere; }
.pub-ev-meta { color: var(--text-muted); overflow-wrap: anywhere; }

.pub-signer {
  display: flex;
  gap: 1.25rem;
  align-items: center;
  margin-top: 2rem;
  padding: 1.25rem 0;
  border-top: 1px solid var(--rule-ink);
  border-bottom: 1px solid var(--border);
}

.pub-signer-seal {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  transform: rotate(-12deg);
}

.pub-signer-by { font: 400 1.3rem/1.25 var(--serif); }
.pub-signer-via { color: var(--text-muted); font-size: 0.95rem; }

.pub-signer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 0.4rem;
  font-size: 0.95rem;
}

.pub-check { margin-top: 2.5rem; }

.pub-h2 {
  margin-bottom: 1rem;
  font: 400 1.35rem/1.2 var(--serif);
}

.pub-check-rows li {
  display: flex;
  gap: 0.6rem;
  align-items: center;
  padding: 0.65rem 0;
  border-top: 1px solid var(--border);
  font-weight: 500;
}

.pub-check-rows li.is-ok .icon { color: var(--seal); }
.pub-check-rows li.is-bad { color: var(--danger); }

.pub-check-note {
  margin: 1rem 0;
  color: var(--text-muted);
  font-size: 0.95rem;
}

.pub-check-facts,
.pub-keys {
  display: grid;
  gap: 0.35rem 1rem;
  margin: 0;
}

.pub-check-facts { grid-template-columns: max-content minmax(0, 1fr); }

.pub-check-facts dt,
.pub-keys dt { color: var(--text-muted); font-size: 0.875rem; }

.pub-check-facts dd,
.pub-keys dd { margin: 0; }

.pub-check-facts code,
.pub-keys code {
  font-family: var(--mono);
  font-size: 0.8rem;
  overflow-wrap: anywhere;
}

@media (max-width: 560px) {
  .pub-check-facts { grid-template-columns: minmax(0, 1fr); }
  .pub-check-facts dd { margin-bottom: 0.6rem; }
}

.pub-key {
  padding: 0.9rem 0;
  border-top: 1px solid var(--border);
}

.pub-key dd {
  display: grid;
  gap: 0.25rem;
  margin-top: 0.35rem;
}

.pub-howto {
  display: grid;
  gap: 0.5rem;
  padding-left: 1.25rem;
  list-style: decimal;
  color: var(--text-muted);
}

.pub-cert-links { margin-top: 2.5rem; }

.pub-cert-links a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
}

/* --- the account screen (AccountScreen) ------------------------------------------ */

.avatar-row {
  display: flex;
  align-items: center;
  gap: calc(var(--space) * 4);
  margin-bottom: calc(var(--space) * 5);
}

.account-avatar {
  flex: none;
  width: 4.5rem;
  height: 4.5rem;
  border-radius: 50%;
  object-fit: cover;
  background: var(--soft);
}

.account-avatar-initials {
  display: grid;
  place-items: center;
  background: var(--text);
  color: var(--page);
  font: 400 1.6rem/1 var(--serif);
}

.avatar-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--space) * 2);
}

.avatar-controls .text-xs {
  flex-basis: 100%;
}

.public-state {
  margin-bottom: calc(var(--space) * 2);
}

.rule {
  margin: calc(var(--space) * 5) 0;
  border: 0;
  border-top: 1px solid var(--border);
}

/* The handle after the fixed part of the address. */
.handle-input {
  display: flex;
  align-items: stretch;
  max-width: 28rem;
}

.handle-prefix {
  display: flex;
  align-items: center;
  padding: 0 calc(var(--space) * 2);
  border: 1px solid var(--border-strong);
  border-right: 0;
  background: var(--soft);
  font: var(--text-xs) var(--mono);
  color: var(--text-muted);
  white-space: nowrap;
}

.handle-input .input {
  min-width: 0;
  flex: 1;
}

@media (max-width: 520px) {
  .handle-input { flex-direction: column; }
  .handle-prefix { border-right: 1px solid var(--border-strong); border-bottom: 0; padding-block: calc(var(--space) * 1.5); }
}

.profile-links {
  display: flex;
  flex-direction: column;
  margin-bottom: calc(var(--space) * 4);
  border-top: 1px solid var(--border);
}

.profile-links li {
  display: grid;
  grid-template-columns: 6rem minmax(0, 1fr) auto;
  gap: calc(var(--space) * 3);
  align-items: center;
  padding: calc(var(--space) * 2) 0;
  border-bottom: 1px solid var(--border);
}

.profile-links a {
  overflow-wrap: anywhere;
}

.profile-link-kind {
  font: var(--text-xs) var(--mono);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
}

#profile-link-form .select {
  width: auto;
}

.account-email {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: calc(var(--space) * 2);
  margin-bottom: calc(var(--space) * 4);
  overflow-wrap: anywhere;
}

#email-box .alert {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: calc(var(--space) * 2);
  margin-bottom: calc(var(--space) * 4);
}

#email-box .alert-body {
  flex: 1 1 16rem;
  overflow-wrap: anywhere;
}

.panel-danger {
  border-color: color-mix(in srgb, var(--danger) 40%, var(--border));
}

.panel-danger .panel-title {
  color: var(--danger);
}

/* --- the public profile: the photo and the bio -------------------------------------- */

.pub-avatar-img {
  display: block;
  object-fit: cover;
  background: var(--soft);
}

.pub-bio {
  max-width: 38rem;
  margin-top: 0.9rem;
  white-space: normal;
  overflow-wrap: anywhere;
}

/* --- the landing page (Landing) ------------------------------------------------ */
/* The legacy page's sections and feel: bold sans headings, pictures, soft
   cards and a dotted ground, in the application's ink, paper and seal green. */

.lp {
  --lp-radius: 16px;
  --lp-card: var(--panel);
}

.lp-head {
  position: sticky;
  top: 0;
  z-index: 20;
  background: color-mix(in srgb, var(--page) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.lp-head-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.25rem;
}

.lp-logo {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
}

.lp-logo img {
  display: block;
  width: auto;
  height: 24px;
}

.lp .btn {
  border-radius: 10px;
  font-weight: 600;
}

/* hero */

.lp-hero {
  position: relative;
  padding: clamp(3rem, 8vw, 6rem) 0 clamp(4rem, 9vw, 7rem);
  overflow-x: clip;
  background-image: radial-gradient(color-mix(in srgb, var(--text) 9%, transparent) 1px, transparent 1px);
  background-size: 24px 24px;
}

.lp-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

.lp-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--panel);
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-muted);
}

.lp-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--seal);
  box-shadow: 0 0 0 0 color-mix(in srgb, var(--seal) 50%, transparent);
  animation: lp-pulse 2.4s ease-out infinite;
}

@keyframes lp-pulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--seal) 45%, transparent); }
  70%  { box-shadow: 0 0 0 8px transparent; }
  100% { box-shadow: 0 0 0 0 transparent; }
}

.lp-display {
  margin-top: 1.5rem;
  font: 800 clamp(2.75rem, 5.4vw, 4.4rem)/1 var(--font);
  letter-spacing: -0.045em;
}

.lp-display span {
  display: block;
  color: var(--text-muted);
}

.lp-lede {
  max-width: 34rem;
  margin-top: 1.5rem;
  font-size: 1.2rem;
  color: var(--text-muted);
}

.lp-proof {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  margin-top: 2.25rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lp-proof li {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.lp-proof .icon { color: var(--seal); }

/* The hero's picture: a verified record, and the verifier's phone in front of it. */
.lp-hero-visual {
  position: relative;
  padding: 1.5rem 0 8.5rem;
}

.lp-glow {
  position: absolute;
  inset: 0 -10% 0 10%;
  background:
    radial-gradient(circle at 70% 35%, color-mix(in srgb, var(--seal) 28%, transparent), transparent 55%),
    radial-gradient(circle at 25% 80%, color-mix(in srgb, #7aa6d9 30%, transparent), transparent 50%);
  filter: blur(40px);
  opacity: 0.8;
}

.lp-hero-visual .rec {
  width: 82%;
  border-radius: 6px;
  transform: rotate(-1.5deg);
}

.lp-phone {
  position: absolute;
  right: 0;
  bottom: 0;
  width: 11.5rem;
  padding: 0.55rem;
  border-radius: 2rem;
  background: var(--text);
  box-shadow: var(--shadow-lg);
  transform: rotate(4deg);
}

.lp-phone-screen {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  min-height: 19rem;
  padding: 1.6rem 0.85rem 0.9rem;
  border-radius: 1.5rem;
  background: var(--page);
}

.lp-phone-eyebrow {
  font: 0.55rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.lp-phone-title {
  font: 400 1.05rem/1.15 var(--serif);
  color: var(--text);
}

.lp-phone-card {
  display: grid;
  gap: 0.4rem;
  margin: 0.2rem 0 auto;
  padding: 0.75rem 0.65rem;
  background: var(--panel);
  border: 1px solid var(--border);
  border-top: 2px solid var(--text);
}

.lp-phone-card span {
  height: 6px;
  border-radius: 3px;
  background: var(--border);
}

.lp-phone-card span.short { width: 60%; }

.lp-phone-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.3rem;
  padding: 0.5rem;
  border-radius: 8px;
  background: var(--seal);
  color: var(--seal-ink);
  font-size: 0.75rem;
  font-weight: 600;
}

.lp-phone-btn-line {
  background: transparent;
  border: 1px solid var(--text);
  color: var(--text);
}

@media (max-width: 960px) {
  .lp-hero-grid { grid-template-columns: minmax(0, 1fr); }
  .lp-hero-visual { max-width: 34rem; margin: 0 auto; width: 100%; }
}

@media (max-width: 520px) {
  .lp-phone { width: 9.5rem; }
  .lp-phone-screen { min-height: 15.5rem; }
  .lp-phone-title { font-size: 0.9rem; }
  .lp-hero-visual .rec { width: 90%; }
}

/* bands, headings, text */

.lp-band { padding: clamp(4rem, 9vw, 6.5rem) 0; }

.lp-band-tint {
  background: var(--panel);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.lp-center {
  max-width: 44rem;
  margin: 0 auto 3rem;
  text-align: center;
}

.lp-heading {
  font: 800 clamp(2rem, 4.2vw, 3rem)/1.08 var(--font);
  letter-spacing: -0.035em;
  text-wrap: balance;
}

.lp-sub {
  margin-top: 0.9rem;
  font-size: 1.15rem;
  color: var(--text-muted);
}

.lp-subheading {
  font: 800 1.6rem/1.15 var(--font);
  letter-spacing: -0.025em;
}

.lp-text {
  max-width: 36rem;
  margin-top: 1rem;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.lp-mark {
  padding: 0 0.3em;
  border-radius: 4px;
  background: var(--success-soft);
  color: var(--text);
  font-weight: 600;
}

.lp-quote {
  margin: 1.25rem 0 0;
  padding: 0.25rem 0 0.25rem 1rem;
  border-left: 3px solid var(--seal);
  font-size: 1.15rem;
  font-style: italic;
  font-weight: 600;
}

.lp-split {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}

@media (max-width: 900px) {
  .lp-split { grid-template-columns: minmax(0, 1fr); }
}

/* cards */

.lp-cards {
  display: grid;
  gap: 1rem;
}

.lp-cards-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.lp-cards-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (max-width: 1100px) {
  .lp-cards-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  .lp-cards-2,
  .lp-cards-4 { grid-template-columns: minmax(0, 1fr); }
}

.lp-card {
  padding: 1.5rem;
  background: var(--lp-card);
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
  box-shadow: 0 1px 2px rgba(23, 21, 15, 0.04);
}

.lp-band-tint .lp-card { background: var(--page); }

.lp-card p { color: var(--text-muted); }

.lp-card-title {
  margin-bottom: 0.4rem;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.lp-icon {
  display: inline-grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  margin-bottom: 1rem;
  border-radius: 12px;
  background: var(--success-soft);
  color: var(--seal);
}

/* The four trust-gap cards each take their own tint, as on the legacy page. */
#about .lp-card:nth-child(1) .lp-icon { background: var(--warning-soft); color: var(--warning); }
#about .lp-card:nth-child(2) .lp-icon { background: color-mix(in srgb, #7b5cc4 14%, var(--panel)); color: #6a4cb3; }
#about .lp-card:nth-child(3) .lp-icon { background: var(--info-soft); color: var(--info); }
#about .lp-card:nth-child(4) .lp-icon { background: var(--danger-soft); color: var(--danger); }

.lp-checks {
  display: grid;
  gap: 0.55rem;
  margin-top: 1rem;
}

.lp-checks li {
  display: flex;
  gap: 0.6rem;
}

.lp-checks .icon {
  margin-top: 0.2rem;
  color: var(--seal);
}

/* how it works */

.lp-steps {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.lp-step {
  position: relative;
  padding: 1.75rem 1.5rem;
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: var(--lp-radius);
}

.lp-step p { color: var(--text-muted); }

.lp-step-n {
  position: absolute;
  top: 0.75rem;
  right: 1.25rem;
  font: 800 3rem/1 var(--font);
  color: color-mix(in srgb, var(--text) 10%, transparent);
}

.lp-step-icon {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  margin-bottom: 1.1rem;
  border-radius: 50%;
  background: var(--text);
  color: var(--page);
}

@media (max-width: 860px) {
  .lp-steps { grid-template-columns: minmax(0, 1fr); }
}

/* what Proofile offers: picture and text, alternating */

.lp-feature {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(2rem, 6vw, 5rem);
  align-items: center;
  margin-top: 3.5rem;
}

.lp-feature.is-flipped .lp-feature-art { order: 2; }

.lp-feature-art img {
  display: block;
  /* The illustrations were drawn on white: multiply lets the paper show through it. */
  mix-blend-mode: multiply;
  width: 100%;
  max-width: 34rem;
  height: auto;
  margin: 0 auto;
}

.lp-num {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  background: var(--panel);
  font-weight: 800;
}

.lp-feature .lp-checks { font-size: 1rem; }

.lp-offer-cards { margin-top: 4.5rem; }

@media (max-width: 860px) {
  .lp-feature { grid-template-columns: minmax(0, 1fr); }
  .lp-feature.is-flipped .lp-feature-art { order: 0; }
  .lp-feature-art img { max-width: 24rem; }
}

/* why now */

.lp-whys {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 2rem;
}

.lp-why {
  padding-top: 1.25rem;
  border-top: 2px solid var(--text);
}

.lp-why p { color: var(--text-muted); }

.lp-why-n {
  display: block;
  margin-bottom: 0.75rem;
  font: 800 2.5rem/1 var(--font);
  color: var(--seal);
}

@media (max-width: 960px) {
  .lp-whys { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 560px) {
  .lp-whys { grid-template-columns: minmax(0, 1fr); }
}

/* who it is for */

.lp-who {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.9rem;
  font: 0.75rem var(--mono);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--seal);
}

.lp-quote-title {
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

/* questions */

.lp-faq-wrap { max-width: 50rem; }

.lp-faq {
  display: grid;
  gap: 0.75rem;
}

.lp-faq-item {
  background: var(--page);
  border: 1px solid var(--border);
  border-radius: 12px;
}

.lp-faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  cursor: pointer;
  list-style: none;
  font-weight: 600;
}

.lp-faq-item summary::-webkit-details-marker { display: none; }
.lp-faq-item summary .icon { transition: transform 0.2s; }
.lp-faq-item[open] summary .icon { transform: rotate(180deg); }

.lp-faq-item p {
  padding: 0 1.25rem 1.25rem;
  color: var(--text-muted);
}

/* the close */

.lp-close-card {
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vw, 4rem) clamp(1.5rem, 5vw, 3rem);
  text-align: center;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.lp-close-seal {
  width: 5rem;
  height: 5rem;
  margin: 0 auto 1.5rem;
  transform: rotate(-12deg);
}

.lp-chain {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  color: var(--text-muted);
}

.lp-chain-item {
  padding: 0.35rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--page);
  font-weight: 600;
  color: var(--text);
}

.lp-close-note {
  margin-top: 1rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.lp-foot .lp-logo img { height: 22px; }

@media (prefers-reduced-motion: reduce) {
  .lp-dot { animation: none; }
  .lp-faq-item summary .icon { transition: none; }
}
