:root {
  color-scheme:light;
  --pine:#202a25;
  --ink:#302a23;
  --muted:#655a4a;
  --cream:#f7f0df;
  --gold:#c4a267;
  --rule:#c8b99d;
  --wine:#733727;
  --serif:Georgia,"Times New Roman",serif
}

* {
  box-sizing:border-box
}

body {
  margin:0;
  line-height:1.55;
  font-family:var(--serif);
  color:var(--ink);
  background:#e6ddc9;
  background-image:repeating-linear-gradient(92deg,transparent 0 44px,#ab907212 45px 46px)
}

.symbols {
  position:absolute;
  width:0;
  height:0;
  overflow:hidden
}

.skip {
  position:absolute;
  top:-6rem;
  left:1rem;
  background:white;
  padding:.5rem;
  z-index:9
}

.skip:focus {
  top:.5rem
}

.masthead {
  min-height:80px;
  background:var(--pine);
  color:#f7ebcf;
  border-bottom:3px double #93805e;
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:12px clamp(18px,4vw,70px);
  gap:1rem
}

.brand,.identity,.letterhead {
  display:flex;
  align-items:center;
  gap:.85rem
}

.brand svg {
  width:45px;
  height:45px;
  color:var(--gold)
}

.brand span {
  font-size:clamp(.79rem,1.6vw,1.12rem);
  letter-spacing:.08em;
  font-weight:bold
}

.brand small,.letterhead small,.identity small {
  display:block;
  font:normal .67rem/1.6 system-ui,sans-serif;
  letter-spacing:.17em
}

.brand small {
  color:#d2c1a1
}

.identity {
  text-align:right
}

.identity small {
  letter-spacing:.03em;
  color:#dfceaf
}

.shell {
  display:grid;
  grid-template-columns:minmax(210px,255px) minmax(0,1fr);
  min-height:calc(100vh - 80px)
}

aside {
  background:#2b332d;
  color:#eee4ce;
  padding:2rem 1rem;
  border-right:4px double #837253
}

summary,.imprint,.search label,.letterhead small,dt,.field>label,.filter-form label {
  font:650 .72rem/1.5 system-ui,sans-serif;
  letter-spacing:.09em;
  text-transform:uppercase
}

summary {
  cursor:pointer;
  color:#dec49a;
  padding:.5rem
}

nav {
  display:grid;
  gap:3px;
  margin-top:.7rem
}

nav a {
  padding:.58rem .75rem;
  border-left:2px solid transparent;
  color:inherit;
  text-decoration:none;
  font-size:.94rem
}

nav a:hover,nav a[aria-current] {
  background:#44483a;
  border-color:#c5a574
}

main {
  min-width:0;
  padding:clamp(18px,3.6vw,62px);
  max-width:1280px;
  width:100%;
  margin:auto auto 0;
  align-self:start;
  margin-top:0
}

.paper {
  position:relative;
  padding:clamp(22px,4vw,64px);
  background-color:var(--cream);
  background-image:radial-gradient(ellipse at 0 0,#d9bd8730,transparent 60%),repeating-linear-gradient(0deg,transparent 0 3px,#705d3a04 4px);
  border:1px solid var(--rule);
  box-shadow:0 4px 14px #43311c18,2px 3px 0 #e8dfca;
  overflow-wrap:anywhere;
  animation:unfold .24s ease-out
}

.letterhead {
  padding-bottom:1rem;
  border-bottom:3px double var(--rule);
  color:#76644e;
  font-variant:small-caps;
  letter-spacing:.07em
}

.letterhead svg {
  width:32px;
  height:32px
}

.letterhead small {
  font-size:.6rem
}

.paper h1 {
  font-size:clamp(1.8rem,4vw,3.6rem);
  line-height:1.08;
  letter-spacing:-.045em;
  margin:1.3rem 0
}

.paper h2 {
  line-height:1.2
}

.entry .shell:has(.frontispiece) {
  grid-template-columns:minmax(0,1fr) minmax(320px,.85fr);
  min-height:min(76vh,760px);
  max-width:1120px;
  margin:clamp(20px,6vw,90px) auto;
  border:1px solid #a9997b;
  box-shadow:0 18px 50px #422d1726
}

.entry .shell:not(:has(.frontispiece)) {
  display:block;
  max-width:850px;
  margin:4vh auto
}

.entry .frontispiece+main {
  display:grid;
  align-self:stretch;
  padding:0;
  margin:0
}

.entry .frontispiece+main .paper {
  display:flex;
  flex-direction:column;
  justify-content:center;
  box-shadow:none;
  border:0;
  padding:clamp(24px,4.4vw,76px)
}

.frontispiece {
  background-color:#29332c;
  background-image:radial-gradient(ellipse at 45% 35%,#7f805144,transparent 65%),repeating-linear-gradient(93deg,#13251a22 0 1px,transparent 2px 8px);
  color:#f3e7ca;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  position:relative;
  padding:4rem 1.5rem;
  text-align:center
}

.frontispiece:before {
  content:"";
  position:absolute;
  inset:15px;
  border:3px double #ad966b88;
  pointer-events:none
}

.seal {
  color:#d8b477;
  width:clamp(72px,11vw,156px);
  filter:drop-shadow(0 4px 2px #1119)
}

.seal svg {
  display:block;
  width:100%;
  height:auto
}

.frontispiece h1 {
  font-size:clamp(2.5rem,5vw,5rem);
  font-weight:normal;
  line-height:.94;
  letter-spacing:-.06em;
  margin:1.2rem 0 1.5rem
}

.frontispiece h1 i {
  font-size:.82em
}

.imprint {
  color:#ddc398;
  letter-spacing:.2em
}

.imprint span {
  margin:0 .35rem
}

a {
  color:var(--wine);
  text-underline-offset:.2em
}

.links {
  display:flex;
  flex-wrap:wrap;
  gap:.55rem 1.25rem;
  border-top:1px solid var(--rule);
  margin-top:1.5rem;
  padding-top:1rem
}

.ledger {
  list-style:none;
  margin:1.2rem 0;
  padding:0
}

.ledger li,.fields>div {
  padding:.75rem 0;
  border-bottom:1px solid var(--rule)
}

.ledger a {
  font-weight:bold
}

.ledger small {
  display:block;
  color:var(--muted)
}

dd {
  margin:.25rem 0 0
}

dt {
  color:var(--muted)
}

.notice {
  border-left:3px solid var(--wine);
  background:#eadfc9;
  padding:.7rem 1rem
}

.search {
  max-width:44rem;
  margin-bottom:1.4rem
}

.search>div {
  display:flex
}

.search input {
  min-width:0;
  border-right:0
}

.search label,.field>label {
  display:block;
  margin-bottom:.35rem
}

.field {
  margin:0 0 1rem
}

.help {
  font-size:.82rem;
  color:var(--muted);
  margin-top:.35rem
}

.help ul,.errorlist {
  padding-left:1.3rem
}

.errorlist {
  color:#822b1e;
  font-weight:bold
}

input,textarea,select {
  width:100%;
  max-width:100%;
  font:inherit;
  background:#fffaf0;
  color:var(--ink);
  border:1px solid #a6997e;
  border-radius:2px;
  padding:.55rem .7rem
}

input[type=checkbox],input[type=radio] {
  width:auto;
  accent-color:var(--wine)
}

textarea {
  min-height:7rem
}

button {
  cursor:pointer;
  background:var(--wine);
  color:#fff4e2;
  border:1px solid #613122;
  padding:.62rem 1.15rem;
  font:600 .93rem var(--serif);
  border-radius:2px
}

button:hover {
  background:#592a1e
}

.quiet {
  border-color:#7b806c;
  background:transparent
}

.record-form button {
  margin-top:.3rem
}

.entry .record-form button {
  width:100%
}

:focus-visible {
  outline:3px solid #a96b24;
  outline-offset:3px
}

.signature {
  margin:3.8rem 0 1.5rem auto;
  border-top:1px solid var(--ink);
  width:13rem;
  text-align:center;
  font-size:.85rem
}

.filter-form {
  display:flex;
  align-items:end;
  flex-wrap:wrap;
  gap:.65rem
}

.filter-form p {
  margin:0
}

.filter-form label {
  display:block
}

.paper table {
  border-collapse:collapse;
  font-size:.9rem
}

.paper th,.paper td {
  border-bottom:1px solid var(--rule);
  padding:.5rem
}

.paper:has(table) {
  overflow-x:auto
}

@keyframes unfold {
  from {
    opacity:.5;
    transform:translateY(4px)
  }
  to {
    opacity:1;
    transform:none
  }
}

@media(prefers-reduced-motion:reduce) {
  .paper {
    animation:none
  }
}

@media(max-width:760px) {
  .shell {
    display:block
  }
  .masthead {
    flex-wrap:wrap;
    min-height:66px
  }
  .identity {
    font-size:.85rem
  }
  .brand svg {
    width:35px;
    height:35px
  }
  aside {
    padding:.4rem .8rem;
    border:0
  }
  nav {
    display:flex;
    overflow-x:auto;
    white-space:nowrap;
    padding-bottom:.35rem;
    margin:0
  }
  nav a {
    font-size:.85rem
  }
  .entry .shell:has(.frontispiece) {
    display:block;
    margin:1rem;
    min-height:0
  }
  .frontispiece {
    padding:1.55rem 1rem;
    display:grid;
    grid-template-columns:auto auto;
    justify-content:center;
    column-gap:1rem
  }
  .frontispiece:before {
    inset:7px
  }
  .frontispiece h1 {
    font-size:2.4rem;
    margin:0
  }
  .imprint {
    grid-column:1/-1;
    font-size:.62rem;
    margin-top:.5rem
  }
  .seal {
    width:60px
  }
  .entry .frontispiece+main .paper {
    padding:1.3rem 1.5rem 1.8rem
  }
}

@page {
  size:A4;
  margin:18mm
}

@media print {
  body,.shell,main,.paper {
    background:white!important;
    color:black;
    box-shadow:none!important
  }
  .masthead,aside,.skip,.search,button,.links,.frontispiece,.filter-form,.notice {
    display:none!important
  }
  .shell,main,.paper {
    display:block!important;
    margin:0!important;
    padding:0!important;
    width:100%;
    max-width:none;
    border:0!important;
    overflow:visible!important
  }
  .letterhead {
    display:flex;
    border-color:black
  }
  .paper h1 {
    font-size:28pt
  }
  .signature,.fields>div {
    break-inside:avoid
  }
  a {
    color:black;
    text-decoration:none
  }
  .paper {
    animation:none
  }
}

.wanted-title {
  text-align:center;
  font-weight:900;
  font-size:clamp(2.3rem,10vw,7rem);
  letter-spacing:.09em;
  line-height:1.1;
  margin:1rem 0 .25rem;
  color:#5b3022
}

.warrant h1 {
  text-align:center;
  border-bottom:3px double var(--rule);
  padding-bottom:.65em
}

.warrant .letterhead {
  justify-content:center
}

.nav-group {
  display:grid
}

.nav-group h2 {
  font:600 .63rem/1.5 system-ui,sans-serif;
  text-transform:uppercase;
  letter-spacing:.09em;
  color:#ccb994;
  border-top:1px solid #97917c55;
  padding:.9rem .6rem 0;
  margin:1rem 0 .3rem
}


.document-number { display:block; width:fit-content; margin-left:auto; font-size:.75rem; }
.attachment { margin:1rem 0; break-inside:avoid; }
.attachment img { display:block; max-width:100%; width:auto; height:auto; max-height:24rem; margin-bottom:.35rem; }
.signature { border:0; max-width:100%; break-inside:avoid; }
.signature strong { display:block; font:italic 1.45rem Georgia,serif; overflow-wrap:anywhere; padding-bottom:.2rem; }
.signature span { display:block; border-top:1px solid currentColor; }

.supply-tabs {display:flex;flex-wrap:wrap;gap:.3rem;border-bottom:2px solid var(--wine);margin:.8rem 0;}
.supply-tabs a {display:inline-block;padding:.55rem .85rem;border:1px solid var(--rule);border-bottom:0;border-radius:.45rem .45rem 0 0;background:#ede2c9;color:var(--ink);text-decoration:none;font-weight:bold;}
.supply-tabs a:hover,.supply-tabs a:focus-visible {background:#dcc8a1;}
.supply-tabs a[aria-current="page"],.supply-add {background:var(--wine);color:#fff6df;}
.supply-add {display:inline-block;padding:.45rem .85rem;margin:.35rem 0 .85rem;text-decoration:none;border-radius:.2rem;font-weight:bold;}
