:root {
  /* An old house charter: parchment, burgundy plaques, gold leaf, sepia ink.
     The sheet is the page. Colour means something: wine for the house, gold for what is precious, ink for everything else. */
  --paper: #F0DEB4;
  --paper-hi: #FAF0D2;
  --paper-lo: #E3CA93;
  --ink: #2E1A0E;
  --ink-2: #5A4025;
  --ink-3: #87693F;
  --rule: rgba(122, 86, 30, .4);
  --wine: #6B1420;
  --wine-hi: #8C2531;
  --wine-lo: #4A0D16;
  --cream: #FBF1D6;
  --gold: #C39A3F;
  --gold-hi: #EBD08C;
  --gold-lo: #8F6B1E;
  --moss: #2F5233;
  --navy: #1F3A66;
  --plum: #56306B;
  --slate: #4B5563;
  --display: "Cinzel", "Trajan Pro", "Times New Roman", serif;
  --title: "Cinzel Decorative", "Cinzel", "Times New Roman", serif;
  --text: "IM Fell English", "Iowan Old Style", "Palatino Linotype", Georgia, serif;
  --caps: "IM Fell English SC", "IM Fell English", Georgia, serif;
  --ease: cubic-bezier(.22, .8, .2, 1);
  --pad: clamp(18px, 4vw, 56px);
  --edge: 16px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { background: #2A0B10; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--ink);
  font: 400 19px/1.5 var(--text);
  font-synthesis: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* The sheet of parchment, and its grain. */
body::before, body::after { content: ""; position: fixed; inset: 6px; border-radius: 12px; pointer-events: none; }
body::before {
  z-index: -2;
  background:
    radial-gradient(110% 80% at 50% 38%, rgba(255, 247, 219, .95) 0%, rgba(255, 247, 219, 0) 62%),
    radial-gradient(46% 34% at 8% 92%, rgba(140, 92, 34, .2), transparent 72%),
    radial-gradient(40% 30% at 95% 6%, rgba(140, 92, 34, .17), transparent 72%),
    radial-gradient(30% 22% at 78% 80%, rgba(140, 92, 34, .09), transparent 70%),
    linear-gradient(180deg, #EFDCAE, #E6CD97);
  box-shadow: inset 0 0 140px rgba(120, 76, 22, .42), inset 0 0 18px rgba(84, 46, 8, .55);
}
body::after {
  z-index: -1;
  opacity: .55;
  mix-blend-mode: multiply;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .45 0 0 0 0 .3 0 0 0 0 .12 0 0 0 .5 -.12'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E"),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='700' height='700'%3E%3Cfilter id='f'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.012 .03' numOctaves='4' seed='7' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .33 0 0 0 0 .12 0 0 0 .9 -.3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23f)'/%3E%3C/svg%3E");
}

/* The gilt frame around the sheet, as on the first family chart. Content fades before it reaches the frame. */
.frame {
  position: fixed;
  inset: var(--edge);
  z-index: 70;
  pointer-events: none;
  border: 2px solid var(--gold);
  border-radius: 9px;
  box-shadow: 0 0 0 1px var(--gold-lo), inset 0 0 0 1px var(--gold-lo);
}
.frame::before { content: ""; position: absolute; inset: 6px; border: 1.5px dotted rgba(143, 107, 30, .75); border-radius: 5px; }
.frame i {
  position: absolute;
  width: 32px;
  height: 32px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 46 46'%3E%3Cg fill='%23C39A3F' stroke='%238F6B1E' stroke-width='.8'%3E%3Cpath d='M23 4c3 6 5 10 5 15 0 4-2 6-5 8-3-2-5-4-5-8 0-5 2-9 5-15z'/%3E%3Cpath d='M17 22c-4-4-9-4-12 0-2 3 0 7 4 7 2 0 3-1 3-3 2 2 4 3 7 3zM29 22c4-4 9-4 12 0 2 3 0 7-4 7-2 0-3-1-3-3-2 2-4 3-7 3z'/%3E%3Cpath d='M16 29h14v4H16zM23 33l4 9h-8z'/%3E%3C/g%3E%3C/svg%3E") center / contain no-repeat;
}
.frame .tl { left: 9px; top: 9px; }
.frame .tr { right: 9px; top: 9px; }
.frame .bl { left: 9px; bottom: 9px; transform: scaleY(-1); }
.frame .br { right: 9px; bottom: 9px; transform: scaleY(-1); }

h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-family: var(--display); font-weight: 600; color: var(--wine); text-wrap: balance; }
a { color: var(--wine); text-decoration-thickness: 1px; text-underline-offset: 3px; }
b, strong { font: 400 1em var(--caps); letter-spacing: .02em; }
button, input, select, textarea { font: inherit; color: inherit; }
::selection { background: var(--wine); color: var(--cream); }
:focus-visible { outline: 2px solid var(--wine); outline-offset: 3px; border-radius: 6px; }
[hidden] { display: none !important; }
.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* A plaque, like the name plates on the chart: burgundy, gilt edge. */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 26px;
  border: 1px solid var(--gold-lo);
  border-radius: 10px;
  background: linear-gradient(180deg, var(--wine-hi) 0%, var(--wine) 52%, #58101A 100%);
  box-shadow: inset 0 0 0 1.5px rgba(235, 208, 140, .7), inset 0 0 0 3px rgba(74, 13, 22, .35), 0 3px 0 var(--wine-lo), 0 12px 22px -12px rgba(46, 26, 14, .8);
  color: var(--cream);
  font: 600 15px/1 var(--display);
  letter-spacing: .08em;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0, 0, 0, .35);
  cursor: pointer;
  transition: transform .2s var(--ease), box-shadow .2s var(--ease), filter .2s;
}
.btn:hover { transform: translateY(-1px); filter: brightness(1.1); }
.btn:active { transform: translateY(2px); box-shadow: inset 0 0 0 1.5px rgba(235, 208, 140, .7), inset 0 0 0 3px rgba(74, 13, 22, .35), 0 1px 0 var(--wine-lo); }
.btn[disabled] { filter: saturate(.3) brightness(.95); opacity: .6; cursor: default; transform: none; }
.btn.gilt {
  background: linear-gradient(180deg, #F3DC9A 0%, #D4AE55 55%, #B88E33 100%);
  box-shadow: inset 0 0 0 1.5px rgba(255, 246, 214, .8), inset 0 0 0 3px rgba(143, 107, 30, .4), 0 3px 0 #7A5A17, 0 12px 22px -12px rgba(46, 26, 14, .8);
  color: var(--wine-lo);
  text-shadow: 0 1px 0 rgba(255, 246, 214, .6);
}
.quiet {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 18px;
  border: 1px solid var(--gold-lo);
  border-radius: 9px;
  background: rgba(255, 248, 224, .55);
  box-shadow: inset 0 0 0 1px rgba(255, 250, 232, .7);
  color: var(--ink);
  font: 400 18px/1 var(--text);
  text-decoration: none;
  cursor: pointer;
  transition: background .2s, border-color .2s;
}
.quiet:hover { background: var(--paper-hi); border-color: var(--wine); }
.quiet[disabled] { opacity: .45; cursor: default; }
.quiet.danger { border-color: var(--wine); color: var(--wine); }
.linkish { padding: 4px 0; border: 0; background: none; color: var(--ink-2); font: italic 400 17px var(--text); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; cursor: pointer; }
.linkish:hover { color: var(--wine); }

/* A rule with a lozenge in the middle, the chart's own underline. */
.orn { position: relative; height: 13px; margin: 18px 0; background: linear-gradient(var(--gold-lo), var(--gold-lo)) center / 100% 1.5px no-repeat; }
.orn::before {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 11px;
  height: 11px;
  background: var(--gold);
  border: 1px solid var(--gold-lo);
  box-shadow: -17px 17px 0 -3.5px var(--gold-lo), 17px -17px 0 -3.5px var(--gold-lo);
  transform: translate(-50%, -50%) rotate(45deg);
}

@media (max-width: 720px) {
  :root { --edge: 9px; }
  body { font-size: 18px; }
  .frame i { width: 24px; height: 24px; }
  .frame .tl, .frame .tr { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-delay: 0s !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
}

/* The coat of arms. A page can point at its pieces (data-part) and can let them arrive one after another (arms-in). */
.blazon { display: block; overflow: visible; }
.blazon [data-part] { transition: opacity .28s ease; }
.blazon .dim { opacity: .2; }
.arms-in [class^="a-"] { transform-box: fill-box; transform-origin: 50% 50%; animation: arms-shield .8s var(--ease) both; }
.arms-in .a-spoon { animation-name: arms-spoon; animation-delay: .3s; }
.arms-in .a-quill { animation-name: arms-quill; animation-delay: .42s; }
.arms-in .a-crown { animation-name: arms-crown; animation-delay: .68s; }
.arms-in .a-motto { animation-name: arms-motto; animation-delay: .92s; }
@keyframes arms-shield { from { opacity: 0; transform: scale(.9); } }
@keyframes arms-spoon { from { opacity: 0; transform: translate(52px, 74px); } }
@keyframes arms-quill { from { opacity: 0; transform: translate(-52px, 74px); } }
@keyframes arms-crown { from { opacity: 0; transform: translateY(-46px); } 70% { transform: translateY(3px); } }
@keyframes arms-motto { from { opacity: 0; transform: translateY(-16px) scaleX(.72); } }

/* ---------- reading settings, chosen on the profile page (aspect.js puts them on <html>) ---------- */
/* Bigger letters: everything grows together, as when the browser is zoomed, so nothing is left small. */
html[data-size="l"] body { zoom: 1.15; }
html[data-size="xl"] body { zoom: 1.3; }
/* Plain letters: the old-style faces are pretty but hard to read for tired eyes; headings keep their capitals. */
html[data-plain] { --text: Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif; --caps: Georgia, "Times New Roman", serif; }
html[data-plain] body { letter-spacing: .005em; }
/* Stronger contrast: the paler inks are darkened and the parchment behind the text is lighter and plainer. */
html[data-contrast] { --ink: #120904; --ink-2: #2E1A0E; --ink-3: #4A3420; --paper: #FAF1DA; --paper-lo: #EFDDB3; }
html[data-contrast] a { text-decoration-thickness: 2px; }
/* No movement: nothing slides, grows or fades. */
html[data-still] *, html[data-still] *::before, html[data-still] *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
