/* Buttons, fields, cards, lists, the admin dashboard. All hairlines, no shadows. */

.btn {
  display: block;
  width: 100%;
  border: 0;
  background: var(--filament);
  color: #08090A;
  font-family: var(--sans);
  font-weight: 600;
  font-size: 14.5px;
  padding: 14px;
  cursor: pointer;
  letter-spacing: 0.005em;
  transition: opacity 0.2s;
  text-align: center;
  text-decoration: none;
}
.btn:hover { opacity: 0.86; }
.btn:disabled { opacity: 0.45; cursor: default; }

.btn.ghost {
  background: transparent;
  color: var(--mid);
  border: 1px solid var(--edge);
  font-weight: 400;
}
.btn.ghost:hover { border-color: #454C55; opacity: 1; }

.btn.inline { display: inline-block; width: auto; padding: 14px 34px; }

/* the quieter option under the primary one */
.linkline {
  display: block;
  text-align: center;
  margin-top: 12px;
  font-size: 12.5px;
  color: #6A727C;
  text-decoration: none;
  border-bottom: 1px solid #2C3138;
  padding-bottom: 2px;
  width: fit-content;
  margin-left: auto;
  margin-right: auto;
}
.linkline:hover { color: var(--mid); border-bottom-color: #454C55; }

/* The contingency line. Small, but it must never be missable. */
.contingency {
  border-left: 1px solid rgba(var(--warm), 0.35);
  padding: 2px 0 2px 16px;
  margin: 22px auto 0;
  max-width: 520px;
  font-size: 12.5px;
  line-height: 1.6;
  color: #7B838D;
}
.contingency b { color: var(--mid); font-weight: 500; }

.field {
  width: 100%;
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--edge);
  color: var(--filament);
  font-family: var(--serif);
  font-style: italic;
  font-size: 16px;
  padding: 9px 0;
  outline: none;
  margin-bottom: 6px;
}
.field::placeholder { color: #4E555E; font-style: italic; }
.field:focus { border-bottom-color: var(--filament); }

.field--plain {
  font-family: var(--sans);
  font-style: normal;
  font-size: 15px;
}

.hint { font-size: 11.5px; color: #5C636C; margin: 0 0 14px; }

/* Card details on the payment page — boxed fields with a label above each, so the
   Stripe-rendered fields read as obviously fillable rather than floating text. */
.cardblock { margin: 22px 0 4px; }
.cardblock .flabel {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6A727C;
  margin-bottom: 7px;
  display: block;
}
.cardblock .fbox {
  border: 1px solid var(--edge);
  background: var(--panel);
  padding: 12px 14px;
  transition: border-color 0.15s;
}
.cardblock .fbox:focus-within { border-color: var(--f4); }
.cardblock .fbox.invalid { border-color: #5A3226; }
.cardblock .fbox.invalid:focus-within { border-color: #5A3226; }
.cardblock .fullrow { margin-bottom: 18px; }
.cardblock .splitrow { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }

.errors {
  border: 1px solid #5A3226;
  background: rgba(140, 60, 40, 0.10);
  padding: 12px 14px;
  margin-bottom: 18px;
  font-size: 13px;
  color: #D9A08C;
}
.errors ul { margin: 0; padding-left: 18px; }

/* progress toward the target */
.bar {
  height: 1px;
  background: var(--ash);
  position: relative;
  margin: 0 0 8px;
}
.bar i {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  background: linear-gradient(90deg, var(--f2), var(--f4) 55%, var(--f6));
  transition: width 1s ease;
}
.barlbl {
  display: flex;
  justify-content: space-between;
  font-family: var(--mono);
  font-size: 9.5px;
  color: #6A727C;
  letter-spacing: 0.08em;
  margin-bottom: 18px;
}
.barlbl b { color: var(--filament); font-weight: 500; }

/* the share card, as shown on the page */
.bigcard {
  border: 1px solid var(--edge);
  background: #0B0D0F;
  padding: 22px;
  position: relative;
  overflow: hidden;
}
.bigcard .bc-halo {
  position: absolute;
  left: 50%;
  top: 44%;
  transform: translate(-50%, -50%);
  width: 130%;
  height: 120%;
  background: radial-gradient(ellipse at center,
    rgba(var(--warm), 0.09) 0%, rgba(var(--warm), 0) 66%);
}
.bigcard .bc-in { position: relative; z-index: 2; }
.bc-eyebrow {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #5C636C;
  display: block;
  margin-bottom: 16px;
}
.bc-line {
  font-family: var(--serif);
  font-size: 21px;
  font-style: italic;
  color: var(--filament);
  line-height: 1.25;
  margin: 18px 0 8px;
}
.bc-stat {
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--edge);
  padding-top: 12px;
  margin-top: 14px;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  color: #6A727C;
}
.bc-stat b { color: var(--filament); font-weight: 500; }

/* the pre-written message, ready to send */
.msgbox {
  border: 1px solid var(--edge);
  padding: 12px;
  font-size: 13px;
  color: var(--mid);
  line-height: 1.5;
  margin-bottom: 14px;
  background: rgba(var(--warm), 0.02);
}
.msgbox u { color: #8C949E; text-decoration: none; border-bottom: 1px solid #333940; }

/* what your sharing did */
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 14px; }
.chip {
  flex: 1;
  border: 1px solid var(--edge);
  padding: 9px 8px;
  text-align: center;
}
.chip b {
  display: block;
  font-family: var(--mono);
  font-size: 16px;
  color: var(--filament);
  font-weight: 500;
}
.chip span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C636C;
}

/* "Other" lives in the same row as the preset chips, then drops to its own
   full-width row and opens like the presets look selected. */
.chip--other { padding: 0; cursor: pointer; }
.chip--other summary {
  list-style: none;
  padding: 9px 8px;
  display: flex;
  align-items: baseline;
  justify-content: center;
  gap: 5px;
}
.chip--other summary::-webkit-details-marker { display: none; }
.chip--other summary b {
  font-family: var(--mono);
  font-size: 16px;
  color: var(--filament);
  font-weight: 500;
}
.chip--other summary span {
  font-family: var(--mono);
  font-size: 8.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #5C636C;
}
.chip--other[open] {
  flex-basis: 100%;
  border-color: var(--f5);
  background: rgba(var(--warm), 0.06);
}
.chip--other[open] summary { border-bottom: 1px solid var(--edge); }
.chip--other-body { padding: 14px 8px; text-align: left; }
.chip--other-body .field { margin-top: 6px; }

/* numbered list of steps, as on the story page */
.steps { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--edge); }
.steps li {
  border-bottom: 1px solid var(--edge);
  padding: 20px 0 20px 52px;
  position: relative;
}
.steps li .k {
  position: absolute;
  left: 0;
  top: 21px;
  font-family: var(--mono);
  font-size: 10.5px;
  color: #4E555E;
  letter-spacing: 0.1em;
}
.steps li h3 { margin: 0 0 5px; }
.steps li p { margin: 0; font-size: 14px; color: #6A727C; line-height: 1.55; }

.notelist { list-style: none; margin: 0; padding: 0; }
.notelist li {
  padding: 16px 0;
  border-bottom: 1px solid var(--edge);
  font-size: 14.5px;
  color: #7B838D;
  line-height: 1.55;
}
.notelist li b {
  color: var(--filament);
  font-weight: 500;
  display: block;
  margin-bottom: 3px;
  font-size: 14.5px;
}
.notelist li:first-child { border-top: 1px solid var(--edge); }

/* The dedications feed — one row per light, mono index + candle tick instead of an inline label. */
.dfeed { display: flex; flex-direction: column; }
.dfeed-row {
  display: flex;
  gap: 22px;
  padding: 20px 0;
  border-bottom: 1px solid var(--edge);
}
.dfeed-row:first-child { border-top: 1px solid var(--edge); }
.dfeed-num {
  font-family: var(--mono);
  font-size: 11px;
  color: #5C636C;
  padding-top: 3px;
  min-width: 52px;
  flex: none;
}
.dfeed-tick {
  width: 2px;
  align-self: stretch;
  background: linear-gradient(var(--f4), transparent);
  flex: none;
}
.dfeed-body b {
  display: block;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--f5);
  margin-bottom: 6px;
}
.dfeed-body p { font-family: var(--serif); font-size: 16.5px; color: var(--filament); margin: 0; line-height: 1.4; }

/* questions people actually ask */
.faq { border-top: 1px solid var(--edge); }
.faq details { border-bottom: 1px solid var(--edge); }
.faq summary {
  padding: 20px 0;
  cursor: pointer;
  list-style: none;
  font-size: 15.5px;
  color: var(--filament);
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: baseline;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+";
  font-family: var(--mono);
  color: #5C636C;
  font-size: 15px;
}
.faq details[open] summary::after { content: "\2013"; }
.faq .a {
  padding: 0 0 22px;
  max-width: 640px;
  font-size: 14.5px;
  color: #7B838D;
  line-height: 1.65;
}
.faq .a p { margin: 0 0 12px; }
.faq .a p:last-child { margin-bottom: 0; }

/* the centre's view */
.dash { border: 1px solid var(--edge); background: var(--carbon); }
.dashhead {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px;
  border-bottom: 1px solid var(--edge);
}
.dashhead span {
  font-family: var(--mono);
  font-size: 9.5px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5C636C;
}
.dashgrid { display: grid; grid-template-columns: repeat(4, 1fr); }
.stat {
  padding: 22px 20px;
  border-right: 1px solid var(--edge);
  border-bottom: 1px solid var(--edge);
}
.stat:nth-child(4) { border-right: 0; }
.stat b {
  display: block;
  font-family: var(--mono);
  font-size: 26px;
  color: var(--filament);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1;
}
.stat span {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5C636C;
  display: block;
  margin-top: 9px;
}
.dashcols { display: grid; grid-template-columns: 1fr 1fr; }
.dashcol { padding: 20px; }
.dashcol:first-child { border-right: 1px solid var(--edge); }
.dashcol h4 {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #5C636C;
  margin: 0 0 14px;
  font-weight: 400;
}
.row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 0;
  border-bottom: 1px solid #1D2126;
  font-size: 13.5px;
}
.row:last-child { border-bottom: 0; }
.row .l { color: var(--mid); }
.row .rr { font-family: var(--mono); color: var(--filament); font-size: 12.5px; }
.row .sm { color: #5C636C; font-size: 11.5px; font-family: var(--mono); }

@media (max-width: 900px) {
  .dashgrid { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .dashcols { grid-template-columns: 1fr; }
  .dashcol:first-child { border-right: 0; border-bottom: 1px solid var(--edge); }
}

/* The donations ledger. */
.dtable-wrap { overflow-x: auto; }
.dtable { width: 100%; border-collapse: collapse; font-size: 13px; }
.dtable th {
  text-align: left;
  padding: 10px 20px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #5C636C;
  border-bottom: 1px solid var(--edge);
}
.dtable td { padding: 10px 20px; border-bottom: 1px solid #1D2126; color: var(--mid); vertical-align: middle; }
.dtable tbody tr:last-child td { border-bottom: 0; }
.dtable .rr { font-family: var(--mono); color: var(--filament); font-size: 12.5px; }
.dtable .sm { display: block; color: #5C636C; font-size: 11.5px; font-family: var(--mono); margin-top: 2px; }
.dtable a.pi {
  color: var(--mid);
  border-bottom: 1px dotted var(--edge);
  text-decoration: none;
  font-family: var(--mono);
  font-size: 12.5px;
}
.dtable a.pi:hover { color: var(--filament); }

.dmore-row td { text-align: center; padding: 14px; }
.loadmore {
  font-family: var(--mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--mid);
  cursor: pointer;
  background: none;
  border: 1px solid var(--edge);
  padding: 8px 16px;
  border-radius: 4px;
  text-decoration: none;
  display: inline-block;
}
.loadmore:hover { color: var(--filament); border-color: var(--dim); }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 9px;
  border-radius: 999px;
  font-family: var(--mono);
  font-size: 10.5px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid var(--edge);
  color: var(--dim);
  white-space: nowrap;
}
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.pill.succeeded { color: var(--ok); background: var(--ok-dim); border-color: var(--ok-line); }
.pill.refunded { color: #D9A08C; background: rgba(217, 160, 140, 0.10); border-color: rgba(217, 160, 140, 0.35); }
.pill.pending { color: var(--dim); background: transparent; border-color: var(--edge); }
.pill.failed { color: var(--mid); background: transparent; border-color: var(--edge); }

@media (max-width: 900px) {
  .dtable th, .dtable td { padding: 8px 12px; }
}

/* The dedications wall — each message its own pinned-up card, not a table row. */
.dwall {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 1px;
  background: var(--edge);
  border: 1px solid var(--edge);
}
.dwall-card {
  background: var(--carbon);
  padding: 20px 20px 16px;
  position: relative;
  transition: background 0.15s;
}
.dwall-card:hover { background: #15181C; }
.dwall-card::before {
  content: "";
  position: absolute;
  top: 22px;
  left: 20px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--f5);
  box-shadow: 0 0 8px 1px rgba(239, 187, 102, 0.55);
}
.dwall-card .msg {
  font-family: var(--serif);
  font-size: 15.5px;
  color: var(--filament);
  line-height: 1.45;
  margin: 0 0 14px;
  padding-left: 18px;
}
.dwall-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: var(--mono);
  font-size: 10px;
  color: #5C636C;
}
.dwall-card.hidden .msg { opacity: 0.35; text-decoration: line-through; text-decoration-color: #D9A08C; }
.dwall-card.hidden::before { background: #D9A08C; box-shadow: 0 0 8px 1px rgba(217, 160, 140, 0.4); }

.hide-link {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  font-family: var(--mono);
  font-size: 10px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dim);
  border-bottom: 1px dotted var(--edge);
}
.hide-link:hover { color: var(--filament); }

/* Dev-only payment bypass. See PaymentBypass — this only ever renders in development. */
.devbanner {
  background: var(--dev-dim);
  border-bottom: 1px solid var(--dev-line);
  padding: 9px var(--gutter);
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--mono);
  font-size: 12px;
  color: var(--dev);
}
.devbanner .badge {
  background: var(--dev);
  color: var(--void);
  font-weight: 500;
  font-size: 10px;
  letter-spacing: 0.06em;
  padding: 2px 7px;
  flex-shrink: 0;
}
.devbanner .msg { flex: 1; }
.devbanner a {
  color: inherit;
  text-decoration: underline;
  text-decoration-color: var(--dev-line);
  text-underline-offset: 2px;
  flex-shrink: 0;
}

.devpanel {
  border: 1px solid var(--dev-line);
  background: var(--dev-dim);
  padding: 16px 18px;
  margin-bottom: 18px;
}
.devpanel .eyebrow { color: var(--dev); }
.devpanel p { font-size: 12.5px; color: var(--mid); margin: 6px 0 0; max-width: 460px; }

/* An image, click to fill the screen. Native <dialog> gives us Esc-to-close,
   focus handling and top-layer stacking for free. */
.lightbox-trigger {
  all: unset;
  display: block;
  cursor: zoom-in;
}
.lightbox-trigger:focus-visible {
  outline: 2px solid var(--f5);
  outline-offset: 2px;
}

dialog.lightbox {
  border: 0;
  background: transparent;
  padding: 0;
  max-width: 92vw;
  max-height: 92vh;
}
dialog.lightbox::backdrop {
  background: rgba(8, 9, 10, 0.92);
}
dialog.lightbox img {
  display: block;
  max-width: 92vw;
  max-height: 92vh;
  border: 1px solid var(--edge);
}
.lightbox-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 40px;
  height: 40px;
  border: 1px solid var(--edge);
  background: var(--carbon);
  color: var(--filament);
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  transition: opacity 0.2s;
}
.lightbox-close:hover { opacity: 0.75; }

/* Admin toggles — two per row, collapsed to name + switch; click a row (not the
   button) to expand its full description in place. Same disclosure mechanic as .faq. */
.toggles {
  border: 1px solid var(--edge);
  background: var(--carbon);
  margin-bottom: 18px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  align-items: start;
}
.toggle {
  border-bottom: 1px solid #1D2126;
  border-right: 1px solid #1D2126;
}
.toggle:nth-child(2n) { border-right: 0; }
.toggle > summary {
  list-style: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 18px;
}
.toggle > summary::-webkit-details-marker { display: none; }
.toggle b { color: var(--filament); font-size: 13.5px; font-weight: 600; }
.toggle .devtag { color: var(--dev); font-size: 11px; font-weight: 400; margin-left: 2px; }
.toggle .caret { font-family: var(--mono); font-size: 11px; color: #4E555E; }
.toggle[open] .caret { color: var(--dim); }
.toggle .spacer { flex: 1; }
.toggle-desc { margin: 0; padding: 0 18px 16px 18px; font-size: 12.5px; color: #7B838D; line-height: 1.6; }

@media (max-width: 640px) {
  .toggles { grid-template-columns: 1fr; }
  .toggle { border-right: 0; }
}

.toggle-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-family: var(--mono);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 10px 16px;
  border: 1px solid var(--edge);
  background: transparent;
  color: var(--dim);
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s, color 0.15s;
}
.toggle-btn:hover { border-color: #454C55; }
.toggle-btn .dot { width: 7px; height: 7px; border-radius: 50%; background: currentColor; flex-shrink: 0; }
.toggle-btn.is-on {
  background: rgba(var(--warm), 0.12);
  border-color: var(--f4);
  color: var(--f5);
}
.toggle-btn.is-on.dev { background: var(--dev-dim); border-color: var(--dev-line); color: var(--dev); }
