/**
 * Indenture Roll — Appily-Ninetyfour company-info
 * Indenture-head mission · deed-clause history · notarial-ribbon values
 * Avoids: stats-card steppers, topo about shells, Foundry Codex blueprint/dial/sector/ledger,
 * Graftline rootstock/stem/scion, Almanac epigraph/year/season.
 */

.page-indenture {
  --id-vellum: #F5EAD6;
  --id-ink: #1a1814;
  --id-seal: #9B2D45;
  --id-ribbon: #1A6B62;
  --id-gold: #E8A317;
  --id-coral: #D4522A;
  --id-mute: #4A433A;
  --id-plate: #fffbf4;
  --id-display: "Cormorant Garamond", Georgia, serif;
  --id-body: "Red Hat Text", system-ui, sans-serif;
  background:
    radial-gradient(ellipse 55% 40% at 90% 0%, rgba(155, 45, 69, 0.12), transparent 55%),
    radial-gradient(ellipse 45% 35% at 5% 15%, rgba(26, 107, 98, 0.1), transparent 50%),
    radial-gradient(ellipse 40% 30% at 50% 100%, rgba(232, 163, 23, 0.1), transparent 50%),
    linear-gradient(180deg, #F4EBD9 0%, var(--id-vellum) 45%, #E6D9C2 100%);
  color: var(--id-ink);
  font-family: var(--id-body);
  min-height: 100vh;
}

.page-indenture .id-main {
  width: min(820px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 5.5rem 0 4rem;
}

.id-mast {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: 0.75rem;
  margin-bottom: 1.25rem;
}
.id-kicker {
  margin: 0;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--id-mute);
}
.id-crumb {
  font-size: 0.85rem;
  color: var(--id-mute);
}
.id-crumb a {
  color: var(--id-ribbon);
  text-decoration: none;
}
.id-crumb a:hover {
  text-decoration: underline;
}

.id-section-title {
  margin: 0 0 0.85rem;
  font-family: var(--id-display);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--id-seal);
}

/* —— Indenture head (mission) —— */
.id-head {
  position: relative;
  margin-bottom: 2rem;
  padding: 1.5rem 1.35rem 1.35rem;
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.14);
  box-shadow: 0 12px 32px rgba(26, 24, 20, 0.06);
  opacity: 0;
  transform: translateY(12px);
}
.id-head.is-settled {
  animation: id-settle 0.7s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
@keyframes id-settle {
  to {
    opacity: 1;
    transform: none;
  }
}
.id-cut {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 14px;
  background:
    radial-gradient(circle at 10px 0, transparent 7px, var(--id-vellum) 7.5px) repeat-x;
  background-size: 20px 14px;
  transform: rotate(180deg);
  pointer-events: none;
}
.id-emboss {
  text-align: center;
  padding: 0.5rem 0 1.1rem;
  border-bottom: 1px solid rgba(26, 24, 20, 0.1);
  margin-bottom: 1.1rem;
}
.id-party {
  margin: 0 0 0.35rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--id-mute);
}
.id-emboss h1 {
  margin: 0;
  font-family: var(--id-display);
  font-size: clamp(1.65rem, 4vw, 2.35rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--id-ink);
}
.id-head.is-settled .id-emboss h1 {
  animation: id-emboss 0.8s ease 0.15s both;
}
@keyframes id-emboss {
  from {
    opacity: 0.35;
    letter-spacing: 0.06em;
  }
  to {
    opacity: 1;
    letter-spacing: -0.02em;
  }
}
.id-also {
  margin: 0.4rem 0 0;
  font-size: 0.95rem;
  color: var(--id-mute);
}
.id-also em {
  font-family: var(--id-display);
  font-style: italic;
  font-weight: 600;
  color: var(--id-seal);
}
.id-tagline {
  margin: 0.65rem auto 0;
  max-width: 36rem;
  font-size: 0.95rem;
  line-height: 1.5;
  color: var(--id-mute);
}
.id-clause--mission .id-clause-no {
  display: block;
  margin-bottom: 0.4rem;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--id-ribbon);
}
.id-clause--mission p {
  margin: 0;
  font-family: var(--id-display);
  font-size: 1.2rem;
  line-height: 1.45;
  font-weight: 500;
}
.id-counts {
  margin-top: 0.75rem !important;
  font-family: var(--id-body) !important;
  font-size: 0.85rem !important;
  font-weight: 600 !important;
  color: var(--id-mute) !important;
}
.id-head.is-settled .id-clause--mission {
  position: relative;
}
.id-head.is-settled .id-clause--mission::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -0.35rem;
  width: 0;
  height: 2px;
  background: var(--id-seal);
  animation: id-rule 0.55s ease 0.45s forwards;
}
@keyframes id-rule {
  to {
    width: 4.5rem;
  }
}

/* —— History deeds —— */
.id-history {
  margin-bottom: 2rem;
}
.id-deeds {
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
}
.id-deed {
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.12);
  overflow: hidden;
}
.id-deed summary {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 0.85rem;
  padding: 0.85rem 1rem 0.85rem 1.35rem;
  cursor: pointer;
  list-style: none;
  font-family: var(--id-display);
}
.id-deed summary::-webkit-details-marker {
  display: none;
}
.id-deed-edge {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 10px;
  background:
    radial-gradient(circle at 0 8px, transparent 5px, var(--id-vellum) 5.5px) 0 0 / 10px 16px;
}
.id-deed-no {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--id-seal);
  font-family: var(--id-body);
}
.id-deed summary strong {
  font-size: 1.15rem;
  font-weight: 600;
}
.id-deed-body {
  padding: 0 1rem 1rem 1.35rem;
  border-top: 1px dashed rgba(26, 24, 20, 0.12);
}
.id-deed-body p {
  margin: 0.75rem 0 0;
  font-size: 0.98rem;
  line-height: 1.55;
  color: var(--id-mute);
}
.id-deed.is-torn {
  animation: id-tear 0.4s ease;
}
@keyframes id-tear {
  0% {
    box-shadow: none;
  }
  40% {
    box-shadow: inset 3px 0 0 var(--id-seal);
  }
  100% {
    box-shadow: none;
  }
}
.id-deed[open] {
  border-color: rgba(107, 45, 60, 0.35);
}

/* —— Values ribbons —— */
.id-values {
  margin-bottom: 2rem;
}
.id-ribbons {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.id-ribbon {
  display: flex;
  align-items: stretch;
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.1);
  overflow: hidden;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.id-ribbon:hover {
  transform: translateX(8px);
  border-color: var(--id-ribbon);
}
.id-ribbon-tab {
  flex: 0 0 3.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--id-ribbon);
  color: #fffbf4;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  transition: flex-basis 0.3s ease;
}
.id-ribbon:hover .id-ribbon-tab {
  flex-basis: 3.75rem;
}
.id-ribbon-text {
  position: relative;
  flex: 1;
  padding: 0.85rem 1rem;
  font-size: 0.98rem;
  font-weight: 500;
  line-height: 1.4;
}
.id-ribbon:hover .id-ribbon-text::after {
  content: "";
  position: absolute;
  left: 1rem;
  right: 1rem;
  bottom: 0.45rem;
  height: 1px;
  background: var(--id-seal);
  transform: scaleX(0);
  transform-origin: left;
  animation: id-ink 0.35s ease forwards;
}
@keyframes id-ink {
  to {
    transform: scaleX(1);
  }
}

/* —— Aisles —— */
.id-aisles {
  margin-bottom: 2rem;
}
.id-aisle-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.id-aisle-list a {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.12);
  color: var(--id-ink);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  transition: border-color 0.2s ease, color 0.2s ease;
}
.id-aisle-list a span {
  font-family: var(--id-display);
  font-size: 0.8rem;
  color: var(--id-seal);
}
.id-aisle-list a:hover {
  border-color: var(--id-ribbon);
  color: var(--id-ribbon);
}

/* —— Legal duplex —— */
.id-schedule {
  margin-bottom: 1.75rem;
}
.id-duplex {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  margin: 0;
  padding: 0.25rem 0;
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.12);
}
.id-duplex > div {
  display: grid;
  grid-template-columns: minmax(7rem, 38%) 1fr;
  gap: 0.65rem;
  margin: 0;
  padding: 0.7rem 1rem;
  border-bottom: 1px solid rgba(26, 24, 20, 0.08);
}
.id-duplex > div:nth-last-child(-n + 2):nth-child(odd) {
  border-bottom: 0;
}
.id-duplex-wide {
  grid-column: 1 / -1 !important;
}
.id-duplex dt {
  margin: 0;
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--id-mute);
}
.id-duplex dd {
  margin: 0;
  font-size: 0.92rem;
  font-weight: 500;
  word-break: break-word;
}

/* —— Contact + actions —— */
.id-contact {
  margin-bottom: 1.5rem;
}
.id-notes {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--id-plate);
  border: 1px solid rgba(26, 24, 20, 0.12);
}
.id-notes li {
  display: grid;
  grid-template-columns: 5rem 1fr;
  gap: 0.75rem;
  padding: 0.7rem 1rem;
  border-bottom: 1px dashed rgba(26, 24, 20, 0.1);
}
.id-notes li:last-child {
  border-bottom: 0;
}
.id-notes span {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--id-mute);
}
.id-notes a {
  color: var(--id-ribbon);
  font-weight: 600;
  text-decoration: none;
}
.id-notes a:hover {
  text-decoration: underline;
}

.id-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}
.id-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2.55rem;
  padding: 0.5rem 1.1rem;
  border: 1px solid transparent;
  font-family: var(--id-body);
  font-size: 0.88rem;
  font-weight: 700;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.id-btn--primary {
  background: var(--id-seal);
  color: #fffbf4;
}
.id-btn--primary:hover {
  background: #562433;
}
.id-btn--ghost {
  background: transparent;
  border-color: rgba(26, 24, 20, 0.2);
  color: var(--id-ink);
}
.id-btn--ghost:hover {
  border-color: var(--id-ribbon);
  color: var(--id-ribbon);
}

@media (max-width: 720px) {
  .page-indenture .id-main {
    width: min(100% - 1.25rem, 820px);
    padding-top: 1.25rem;
  }
  .id-duplex {
    grid-template-columns: 1fr;
  }
  .id-duplex > div {
    grid-template-columns: 1fr;
    gap: 0.25rem;
  }
  .id-actions {
    flex-direction: column;
  }
  .id-btn {
    width: 100%;
  }
  .id-notes li {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .id-head,
  .id-emboss h1,
  .id-clause--mission::after,
  .id-deed.is-torn,
  .id-ribbon:hover .id-ribbon-text::after {
    animation: none !important;
  }
  .id-head {
    opacity: 1;
    transform: none;
  }
  .id-ribbon:hover {
    transform: none;
  }
}
