/* DEFAULT collection — the same card, pressed properly.
   Dark neutral ground, photo-forward hero, Fraunces name over Instrument Sans,
   one brand-orange accent on the save bar. Scoped under .dft-root. */

@font-face {
  font-family: "Fraunces Display";
  src: url("fraunces-560.woff2") format("woff2");
  font-weight: 560;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026, U+2116;
}
@font-face {
  font-family: "Fraunces Display Fallback";
  src: local("Georgia"), local("Times New Roman");
  size-adjust: 96%;
  ascent-override: 97%;
  descent-override: 25%;
  line-gap-override: 0%;
}
@font-face {
  font-family: "Instrument Sans";
  src: url("instrument-sans-var-400-600.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+2013-2014, U+2018-201A, U+201C-201E, U+2026;
}

.dft-root {
  --dft-ground: #17191D;
  --dft-ground-deep: #101215;
  --dft-surface: #1E2126;
  --dft-surface-hi: #242830;
  --dft-ink: #F2F3F5;
  --dft-ink-mute: rgba(242, 243, 245, .72);
  --dft-ink-dim: rgba(242, 243, 245, .48);
  --dft-hair: rgba(242, 243, 245, .14);
  --dft-hair-soft: rgba(242, 243, 245, .07);
  --dft-accent: #DA7249;
  --dft-accent-press: #C05F38;
  --dft-serif: "Fraunces Display", "Fraunces Display Fallback", Georgia, serif;
  --dft-sans: "Instrument Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --dft-mono: ui-monospace, "SF Mono", "Cascadia Code", "Roboto Mono", Menlo, monospace;

  min-height: 100dvh;
  background:
    radial-gradient(120% 90% at 50% 0%, var(--dft-ground) 0%, var(--dft-ground-deep) 78%) fixed,
    var(--dft-ground-deep);
  color: var(--dft-ink);
  font-family: var(--dft-sans);
  color-scheme: dark;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
.dft-root :where(a) { color: inherit; text-decoration: none; }

/* grain — banding defense on cheap panels */
.dft-root::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 40;
  pointer-events: none;
  opacity: .04;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='64' height='64'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='64' height='64' filter='url(%23n)'/%3E%3C/svg%3E");
}

.dft-shell {
  max-width: 430px;
  margin: 0 auto;
  padding: 0 20px calc(env(safe-area-inset-bottom, 0px) + 108px);
}

/* ============ HERO ============ */
.dft-hero {
  position: relative;
  margin: 0 -20px;
}
.dft-hero-photo {
  display: block;
  width: 100%;
  aspect-ratio: 1 / 1.04;
  object-fit: cover;
  object-position: top;
}
.dft-hero-scrim {
  position: absolute;
  inset: auto 0 0 0;
  height: 38%;
  background: linear-gradient(180deg, rgba(16, 18, 21, 0) 0%, rgba(16, 18, 21, .55) 62%, var(--dft-ground-deep) 100%);
  pointer-events: none;
}
.dft-plate {
  position: relative;
  aspect-ratio: 1 / 0.72;
  display: grid;
  place-items: center;
  background: radial-gradient(90% 120% at 50% 10%, var(--dft-surface) 0%, var(--dft-ground-deep) 92%);
}
.dft-plate-ring {
  width: min(168px, 44vw);
  aspect-ratio: 1;
  border-radius: 50%;
  border: 1px solid var(--dft-hair);
  box-shadow: inset 0 0 0 7px var(--dft-ground-deep), inset 0 0 0 8px var(--dft-hair-soft);
  display: grid;
  place-items: center;
}
.dft-plate-initials {
  font-family: var(--dft-serif);
  font-weight: 560;
  font-size: clamp(52px, 14vw, 64px);
  line-height: 1;
  color: var(--dft-ink-mute);
  letter-spacing: .02em;
  transform: translateY(2px);
}
.dft-top-actions {
  position: absolute;
  top: 14px;
  right: 14px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  z-index: 5;
}
.dft-pill {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--dft-ink);
  background: rgba(16, 18, 21, .62);
  box-shadow: 0 0 0 1px var(--dft-hair-soft);
}
.dft-pill:active { transform: translateY(1px); }
/* The shared bookmark chip ships light-surface styling; re-dress it for the dark hero. */
.dft-top-actions [class*="bg-white"] {
  background: rgba(16, 18, 21, .62);
  color: var(--dft-ink);
  border-radius: 12px;
  box-shadow: 0 0 0 1px var(--dft-hair-soft);
}
.dft-orglogo {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 5;
  display: block;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 0 0 1px var(--dft-hair), 0 4px 14px rgba(0, 0, 0, .35);
}
.dft-orglogo img { display: block; width: 44px; height: 44px; object-fit: cover; }

/* ============ IDENTITY ============ */
.dft-identity { padding-top: 18px; }
.dft-hero + .dft-identity,
.dft-hero-wrap + .dft-identity { padding-top: 14px; }
.dft-name {
  font-family: var(--dft-serif);
  font-weight: 560;
  font-size: clamp(30px, 8.6vw, 40px);
  line-height: 1.06;
  letter-spacing: -.01em;
  overflow-wrap: break-word;
  text-wrap: balance;
}
.dft-name--long { font-size: clamp(24px, 6.9vw, 32px); }
.dft-tagline {
  margin-top: 8px;
  font-size: 15px;
  line-height: 1.6;
  color: var(--dft-ink-mute);
  max-width: 34ch;
}

/* ============ SECTION GRAMMAR ============ */
.dft-section { margin-top: 26px; }
.dft-eyebrow {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--dft-ink-dim);
  display: flex;
  align-items: center;
  gap: 12px;
}
.dft-eyebrow::after { content: ""; flex: 1; height: 1px; background: var(--dft-hair-soft); }

/* ============ SOCIAL ROW ============ */
.dft-social-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 14px;
}
.dft-social { display: grid; place-items: center; border-radius: 50%; }
.dft-social svg { width: 44px; height: 44px; fill: var(--dft-ink-mute); }
.dft-social:active { transform: translateY(1px); }
.dft-social:active svg { fill: var(--dft-ink); }

/* ============ PAY (copy-first UPI) ============ */
.dft-pay {
  margin-top: 14px;
  border: 1px solid var(--dft-hair-soft);
  border-radius: 16px;
  background: linear-gradient(180deg, var(--dft-surface), var(--dft-ground-deep));
  padding: 16px;
}
.dft-upi-chip {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  border: 1px dashed var(--dft-hair);
  border-radius: 12px;
  background: var(--dft-ground-deep);
  padding: 12px 14px;
  text-align: left;
}
.dft-upi-chip:active { transform: translateY(1px); }
.dft-upi-chip--long { flex-direction: column; align-items: flex-start; gap: 8px; }
.dft-upi-chip--long .dft-upi-id { font-size: clamp(13.5px, 3.9vw, 16px); }
.dft-upi-id {
  font-family: var(--dft-mono);
  font-size: clamp(15px, 4.4vw, 18px);
  font-weight: 500;
  color: var(--dft-ink);
  overflow-wrap: anywhere;
}
.dft-upi-hint {
  flex: none;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dft-ink-dim);
}
.dft-upi-chip.dft-copied { border-color: rgba(218, 114, 73, .55); }
.dft-upi-chip.dft-copied .dft-upi-hint { color: var(--dft-accent); }
.dft-pay-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}
.dft-amount {
  flex: 1;
  display: grid;
  place-items: center;
  padding: 9px 0;
  border-radius: 10px;
  box-shadow: inset 0 0 0 1px var(--dft-hair);
  font-family: var(--dft-mono);
  font-size: 14px;
  color: var(--dft-ink-mute);
}
.dft-amount:active { transform: translateY(1px); color: var(--dft-ink); }
.dft-pay-open {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
  width: 100%;
  padding: 12px 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px rgba(218, 114, 73, .5);
  color: var(--dft-accent);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.dft-pay-open:active { transform: translateY(1px); box-shadow: inset 0 0 0 1px var(--dft-accent); }

/* ============ LINKS LEDGER ============ */
.dft-links { margin-top: 6px; }
.dft-link-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 15px 2px;
  border-bottom: 1px solid var(--dft-hair-soft);
  font-size: 15.5px;
  font-weight: 500;
  color: var(--dft-ink);
}
.dft-link-row:last-child { border-bottom: 0; }
.dft-link-row svg { flex: none; width: 16px; height: 16px; stroke: var(--dft-ink-dim); }
.dft-link-row:active { color: var(--dft-ink-mute); }
.dft-link-row:active svg { stroke: var(--dft-accent); }

/* ============ DOCUMENTS ============ */
.dft-docs {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.dft-doc {
  display: block;
  border-radius: 14px;
  overflow: hidden;
  background: linear-gradient(180deg, var(--dft-surface-hi), var(--dft-surface));
  box-shadow: 0 0 0 1px var(--dft-hair-soft);
}
.dft-doc:active { transform: translateY(1px); }
.dft-doc-plate {
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--dft-ground-deep);
}
.dft-doc-plate img { width: 100%; height: 100%; object-fit: cover; object-position: top; display: block; }
.dft-doc-cover {
  height: 100%;
  display: grid;
  place-items: center;
  color: var(--dft-ink-dim);
}
.dft-doc-cover svg { width: 28px; height: 28px; stroke: currentColor; }
.dft-doc-title {
  padding: 10px 12px 12px;
  font-size: 13px;
  font-weight: 600;
  color: var(--dft-ink-mute);
  overflow-wrap: anywhere;
}

/* ============ ABOUT ============ */
.dft-about {
  margin-top: 14px;
  font-size: 15px;
  line-height: 1.7;
  color: var(--dft-ink-mute);
}
.dft-about .trix-content { color: var(--dft-ink-mute); }
.dft-about .trix-content strong, .dft-about strong { color: var(--dft-ink); }
.dft-about a { text-decoration: underline; text-underline-offset: 3px; }
.dft-readmore {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--dft-ink-dim);
}
.dft-readmore svg { width: 14px; height: 14px; stroke: currentColor; }

/* ============ COLOPHON ============ */
.dft-colophon {
  margin-top: 34px;
  padding-top: 18px;
  border-top: 1px solid var(--dft-hair-soft);
  text-align: center;
}
.dft-serial {
  font-family: var(--dft-mono);
  font-size: 11px;
  letter-spacing: .12em;
  color: var(--dft-ink-dim);
  overflow-wrap: anywhere;
}
.dft-made {
  display: inline-block;
  margin-top: 10px;
  font-size: 13px;
  color: var(--dft-ink-mute);
}
.dft-made strong { color: var(--dft-accent); font-weight: 600; }

/* ============ SAVE BAR ============ */
.dft-savebar {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  background: linear-gradient(180deg, rgba(16, 18, 21, 0) 0%, var(--dft-ground-deep) 34%);
  padding: 22px 20px calc(env(safe-area-inset-bottom, 0px) + 14px);
}
.dft-savebar-inner {
  max-width: 430px;
  margin: 0 auto;
  display: flex;
  gap: 10px;
}
.dft-save {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 0;
  border-radius: 14px;
  background: linear-gradient(180deg, var(--dft-accent), var(--dft-accent-press));
  color: #17110D;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  box-shadow: 0 6px 18px rgba(218, 114, 73, .22), inset 0 1px 0 rgba(255, 255, 255, .28);
}
.dft-save svg { width: 19px; height: 19px; stroke: currentColor; }
.dft-save:active { transform: translateY(1px); box-shadow: 0 3px 10px rgba(218, 114, 73, .18), inset 0 2px 5px rgba(0, 0, 0, .18); }
.dft-exchange {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 14px 16px;
  border-radius: 14px;
  box-shadow: inset 0 0 0 1px var(--dft-hair);
  color: var(--dft-ink-mute);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.dft-exchange svg { width: 18px; height: 18px; stroke: currentColor; }
.dft-exchange:active { transform: translateY(1px); color: var(--dft-ink); }

/* ============ ENTRANCE ============ */
@media (prefers-reduced-motion: no-preference) {
  .dft-rise {
    opacity: 0;
    transform: translateY(10px);
    animation: dft-rise .5s cubic-bezier(.22, 1, .36, 1) forwards;
    animation-delay: var(--d, 0ms);
  }
  @keyframes dft-rise {
    to { opacity: 1; transform: none; }
  }
}

/* The exchange sheet wears the card's own dark finish on default pages;
   elsewhere it keeps its porcelain fallbacks. */
.dft-root {
  --xch-paper: #1E2126;
  --xch-ink: #F2F3F5;
  --xch-ink-mute: rgba(242, 243, 245, .78);
  --xch-ink-dim: rgba(242, 243, 245, .52);
  --xch-placeholder: rgba(242, 243, 245, .38);
  --xch-hair: rgba(242, 243, 245, .18);
  --xch-wash: rgba(242, 243, 245, .08);
  --xch-accent: #DA7249;
  --xch-accent-ink: #17110D;
  --xch-accent-glow: rgba(218, 114, 73, .25);
  --xch-error: #E4705A;
}
