/* Mergers & Acquisitions: "Tombstone".
   Ivory stock, oxblood and gilt, a didone display face over a book serif, double rules like a deal announcement.
   The home hero is a lucite-style tombstone; boxes are gilt-framed. Loaded after study.css. */

:root {
  --paper: #f6f1e7; --ink: #1b1a17; --ink-2: #3c3830; --muted: #6d6455;
  --rule: #1b1a17; --hair: #dccfb5; --tint: #eee6d6; --accent: #7a1f2b;
  --ok: #2f5a2a; --warn: #9a2a12; --link: #1b1a17;
  --gilt: #b08d57; --stone: #fffdf8; --stone-2: #efe8da;
  --display: "Didot", "Bodoni 72", "Bodoni MT", "Libre Bodoni", "Iowan Old Style", Georgia, serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: var(--serif);
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --paper: #17140f; --ink: #efe6d3; --ink-2: #d6cab2; --muted: #a39477;
    --rule: #efe6d3; --hair: #3a3226; --tint: #241e16; --accent: #e08a92;
    --ok: #9fcf8a; --warn: #ffab8f; --link: #efe6d3;
    --gilt: #c9a66b; --stone: #1f1a13; --stone-2: #2a2319;
  }
}
:root[data-theme="dark"] {
  --paper: #17140f; --ink: #efe6d3; --ink-2: #d6cab2; --muted: #a39477;
  --rule: #efe6d3; --hair: #3a3226; --tint: #241e16; --accent: #e08a92;
  --ok: #9fcf8a; --warn: #ffab8f; --link: #efe6d3;
  --gilt: #c9a66b; --stone: #1f1a13; --stone-2: #2a2319;
}

body { font: 18px/1.58 var(--serif); font-feature-settings: "kern", "liga", "onum"; }

/* frame: the double rule of an announcement */
.top { border-bottom: 1px solid var(--rule); box-shadow: 0 3px 0 -2px var(--paper), 0 4px 0 -2px var(--rule); }
.brand { font-family: var(--display); font-weight: 400; font-variant: small-caps; letter-spacing: .14em; font-size: 1.2rem; }
.brand .mark { width: .55rem; height: .55rem; background: var(--accent); transform: rotate(45deg); }
.top nav a, .top .aside a { font-variant: small-caps; letter-spacing: .08em; }
.top nav a[aria-current="page"] { border-bottom-color: var(--accent); }
.top .aside .cta { color: var(--paper); background: var(--accent); padding: 2px 12px; border: 0; font-weight: 400; }
.top .aside .cta:hover { color: var(--paper); background: var(--ink); }
.foot { border-top: 1px solid var(--rule); box-shadow: 0 -3px 0 -2px var(--paper), 0 -4px 0 -2px var(--rule); font-style: italic; }
.lockbar { background: var(--accent); color: var(--paper); }

/* type */
h1 { font-family: var(--display); font-weight: 400; letter-spacing: -.01em; line-height: 1.06; }
h1 em { color: var(--accent); }
h2 { font-family: var(--display); font-weight: 400; font-variant: small-caps; letter-spacing: .12em; font-size: 1.35rem;
     border-top: 1px solid var(--gilt); }
main > section > h2:first-child::before, main > h2::before { content: counter(sec, upper-roman) "."; min-width: 2.8rem; color: var(--accent); }
h3 { font-variant: small-caps; text-transform: none; letter-spacing: .1em; font-size: 1rem; font-weight: 600; color: var(--accent); }
.kicker { font-variant: small-caps; text-transform: none; letter-spacing: .14em; font-size: .92rem; font-weight: 400; color: var(--muted); }
.kicker b { color: var(--accent); }
.lede { color: var(--ink-2); font-size: 1.2rem; }
blockquote { border-left: 1px solid var(--gilt); box-shadow: inset 4px 0 0 -2px var(--paper), inset 5px 0 0 -2px var(--gilt); font-style: italic; }
mark { box-shadow: inset 0 -2px 0 var(--gilt); }
a:hover { text-decoration-color: var(--accent); }

/* buttons and forms */
.button, button { background: var(--accent); border-color: var(--accent); color: var(--paper); font-weight: 400;
                  font-variant: small-caps; letter-spacing: .12em; }
.button:hover, button:hover { background: var(--ink); border-color: var(--ink); color: var(--paper); }
button.quiet { background: transparent; color: var(--accent); border-color: var(--accent); }
textarea, select, input { background: var(--stone); border-color: var(--gilt); }
.badge { font-variant: small-caps; text-transform: none; letter-spacing: .06em; font-size: .8rem; border-color: var(--gilt); }

/* gilt-framed boxes: gates, facts, notes, worked problems */
.gate, .facts, .hidden, .problem { background: linear-gradient(160deg, var(--stone), var(--stone-2)); border: 1px solid var(--gilt);
       outline: 1px solid var(--gilt); outline-offset: 4px; }
.gate { margin: calc(5*var(--u)) 4px; padding: calc(3*var(--u)) calc(3.5*var(--u)); }
.hidden { border-left-width: 1px; }
.problem { border-left-width: 1px; margin: 4px 4px calc(4*var(--u)); }
.problem .no { color: var(--accent); font-variant: small-caps; text-transform: none; letter-spacing: .12em; }
.problem .grant { font-style: italic; }
.problem details summary { color: var(--accent); font-variant: small-caps; letter-spacing: .08em; }
.problem .steps li::marker { color: var(--accent); }
.facts-grid { border-top: 1px solid var(--gilt); }
.facts-grid div { border-bottom-color: var(--hair); }
.facts-grid dt { font-variant: small-caps; text-transform: none; letter-spacing: .1em; font-size: .88rem; }
.facts-grid dd { font-family: var(--display); font-size: 1.7rem; font-weight: 400; color: var(--accent); }
.price { font-family: var(--display); font-weight: 400; color: var(--accent); }
.ticks li::before { background: var(--accent); transform: rotate(45deg) scale(.8); }
.cases li { border-bottom: 1px dotted var(--gilt); }
.cases li a { font-weight: 600; }
.opara:target { box-shadow: -8px 0 0 var(--tint), inset 3px 0 0 var(--accent); }
.progress th, .cases-table th { font-variant: small-caps; text-transform: none; letter-spacing: .08em; font-size: .85rem; border-bottom-color: var(--gilt); }
details { border-top-color: var(--hair); }

/* ---------- home: the tombstone ---------- */
.stone-hero { display: grid; gap: calc(5*var(--u)); align-items: center; margin: calc(2*var(--u)) 0 calc(3*var(--u)); }
@media (min-width: 900px) { main > .stone-hero { grid-column: 1 / -1; grid-template-columns: .9fr 1.1fr; } }
.tombstone { text-align: center; padding: calc(4*var(--u)) calc(3.5*var(--u)) calc(3.5*var(--u)); margin: 6px;
             background: linear-gradient(160deg, var(--stone), var(--stone-2)); border: 1px solid var(--gilt);
             outline: 1px solid var(--gilt); outline-offset: 6px; box-shadow: 0 18px 30px -18px rgba(60, 40, 10, .35); }
.tombstone p { margin: 0; }
.tombstone .record { font-size: .78rem; font-style: italic; color: var(--muted); }
.tombstone .stone-title { font-family: var(--display); font-size: clamp(2rem, 1.4rem + 2vw, 2.7rem); line-height: 1.05; margin: calc(2.5*var(--u)) 0 var(--u); }
.tombstone .stone-amount { font-family: var(--display); font-size: 1.5rem; color: var(--accent); letter-spacing: .04em; }
.tombstone .stone-rule { display: block; width: 64px; height: 1px; background: var(--gilt); margin: calc(2*var(--u)) auto; }
.tombstone .stone-sub { font-variant: small-caps; letter-spacing: .14em; font-size: .95rem; }
.tombstone .stone-date { margin-top: calc(1.5*var(--u)); font-size: .82rem; color: var(--muted); font-variant: small-caps; letter-spacing: .1em; }
.stone-copy h1 { margin-top: 0; }
.parts { list-style: none; padding: 0; counter-reset: part; }
.parts li { counter-increment: part; display: flex; flex-wrap: wrap; gap: 0 .6rem; align-items: baseline;
            padding: var(--u) 0 var(--u) 3rem; position: relative; border-bottom: 1px dotted var(--gilt); }
.parts li::before { content: counter(part, upper-roman) "."; position: absolute; left: 0; color: var(--accent); font-family: var(--display); }
.parts li a { text-decoration: none; }
.parts li a:hover { text-decoration: underline; text-decoration-color: var(--accent); }

@media print { .tombstone, .gate, .problem { outline: none; box-shadow: none; background: none; } }
