/* Maule Group Advisory. Letterhead: one text column, a margin for section names and notes. */

@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/ebgaramond-roman.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "EB Garamond";
  src: url("/assets/fonts/ebgaramond-italic.woff2") format("woff2");
  font-weight: 400 600;
  font-style: italic;
  font-display: swap;
}
@font-face {
  font-family: "Libre Franklin";
  src: url("/assets/fonts/librefranklin.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
}

:root {
  --paper: #FBF9F4;
  --ink: #1D1D1B;
  --green: #1E4636;
  --grey: #6B655C;
  --hair: #DCD6CA;
  --serif: "EB Garamond", Garamond, "Times New Roman", serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --mg: 12.5rem;
  --gap: 3.5rem;
  --measure: 33em;
  --pad: clamp(1rem, 5.5vw, 5rem);
}

*, *::before, *::after { box-sizing: border-box; }

html {
  background: var(--paper);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 1.25rem;
  line-height: 1.55;
  font-weight: 400;
  font-variant-numeric: oldstyle-nums proportional-nums;
  font-kerning: normal;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

::selection { background: #E2DDCF; }

/* links */
a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.17em;
  text-decoration-color: rgba(30, 70, 54, 0.45);
}
a:hover { text-decoration-color: currentColor; text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
main:focus { outline: none; }

.skip {
  position: absolute;
  left: 1rem;
  top: -5rem;
  z-index: 10;
  background: var(--ink);
  color: var(--paper);
  font: 500 0.875rem/1 var(--sans);
  padding: 0.95rem 1.1rem;
  text-decoration: none;
}
.skip:focus { top: 1rem; }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

/* the two-column row */
.r {
  display: grid;
  grid-template-columns: var(--mg) minmax(0, var(--measure));
  column-gap: var(--gap);
  padding: 0 var(--pad);
}
.r > .mg { grid-column: 1; grid-row: 1; min-width: 0; }
.r > .tx { grid-column: 2; grid-row: 1; min-width: 0; }
.r.wide > .tx { grid-column: 1 / -1; max-width: calc(var(--mg) + var(--gap) + var(--measure)); }

p { margin: 0 0 1em; }
.tx > :last-child, .mg > :last-child { margin-bottom: 0; }

/* masthead */
.masthead { padding: 2.25rem 0 0.75rem; border-bottom: 1px solid var(--hair); }
.masthead .r { grid-template-columns: var(--mg) minmax(0, 1fr); align-items: end; }
.wm {
  display: inline-block;
  color: var(--green);
  text-decoration: none;
  font-family: var(--serif);
  font-weight: 500;
  line-height: 1.05;
}
.wm span { display: block; }
.wm span:first-child {
  font-size: 1.5rem;
  font-variant-caps: small-caps;
  letter-spacing: 0.045em;
}
.wm span + span {
  font-size: 0.9rem;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.34em;
  margin-top: 0.2rem;
}
a.wm:hover { text-decoration: none; }
.masthead .wm { margin-bottom: 0.6rem; }

.mainnav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.5rem;
}
.mainnav a {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  font: 400 0.84rem/1 var(--sans);
  letter-spacing: 0.01em;
  color: var(--ink);
  text-decoration: none;
}
.mainnav a:hover { text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 1px; }
.mainnav a[aria-current] { text-decoration: underline; text-underline-offset: 0.35em; text-decoration-thickness: 1px; text-decoration-color: var(--ink); }

/* page opening */
.intro { padding-top: 4.5rem; padding-bottom: 0.5rem; }
h1 {
  font-family: var(--serif);
  font-weight: 400;
  font-size: clamp(2.2rem, 1.35rem + 2.4vw, 3.15rem);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 1.6rem;
  max-width: 15em;
  text-wrap: balance;
}
.home h1 { max-width: 13em; font-size: clamp(2.35rem, 1.3rem + 3vw, 3.5rem); }
.article h1 { max-width: 17em; font-size: clamp(2rem, 1.3rem + 2vw, 2.75rem); }
.lede { font-size: 1.42rem; line-height: 1.42; }

.meta, .crumb, .when {
  font-family: var(--sans);
  font-size: 0.78rem;
  line-height: 1.5;
  color: var(--grey);
  margin: 0.55rem 0 0;
  font-variant-numeric: lining-nums;
}
.crumb a { color: var(--grey); text-decoration-color: rgba(107, 101, 92, 0.5); display: inline-flex; min-height: 44px; align-items: flex-start; }
.crumb + .meta { margin-top: 0; }

/* sections */
.sec { margin-top: 4.25rem; }
.sec h2 {
  font-family: var(--serif);
  font-weight: 500;
  font-size: 1.2rem;
  line-height: 1.25;
  font-variant-caps: all-small-caps;
  letter-spacing: 0.075em;
  margin: 0.32rem 0 0;
}
.mn {
  font-style: italic;
  font-size: 1.04rem;
  line-height: 1.42;
  color: var(--grey);
  margin: 0.85rem 0 0;
}
.r + .r .mg > .mn:first-child { margin-top: 0.3rem; }
.sec > .r + .r { margin-top: 1.1rem; }
.sec.closing { margin-top: 5rem; }

.big {
  font-size: clamp(1.4rem, 0.9rem + 2vw, 2.3rem);
  line-height: 1.2;
  margin-bottom: 1rem;
  overflow-wrap: anywhere;
}

/* numbered paragraphs, quiet numerals hanging in the gutter */
ol.cl { margin: 0 0 1em; padding: 0; list-style: decimal outside; }
ol.cl > li { margin: 0 0 0.95em; padding-left: 0.15em; }
ol.cl > li:last-child { margin-bottom: 0; }
ol.cl > li::marker {
  font-family: var(--sans);
  font-size: 0.72rem;
  font-weight: 400;
  color: var(--grey);
  font-variant-numeric: lining-nums;
}
ol.cl em { font-style: italic; }
.legal > li { margin-bottom: 1.15em; }

/* process: one stage per row */
.steps { margin-top: 3.25rem; }
.steps > .r + .r { margin-top: 1.4rem; }
.steps .when { margin-top: 0.45rem; }
.steps ol.cl { margin: 0; }

/* places */
.places {
  list-style: none;
  margin: 0.8rem 0 0;
  padding: 0;
  font: 400 0.8rem/1.85 var(--sans);
  color: var(--grey);
}

/* lists of notes */
.notes { list-style: none; margin: 0; padding: 0; }
.notes li { padding: 0.85rem 0 0.95rem; border-top: 1px solid var(--hair); }
.notes li:last-child { border-bottom: 1px solid var(--hair); }
.notes .t { font-size: 1.3rem; line-height: 1.3; }
.notes .d { display: block; margin-top: 0.3rem; font: 400 0.78rem/1.4 var(--sans); color: var(--grey); }

.entries { margin-top: 3rem; }
.entry { padding-top: 1.6rem; padding-bottom: 1.5rem; }
.entry + .entry > .tx { border-top: 1px solid var(--hair); padding-top: 1.6rem; }
.entry + .entry > .mg { padding-top: 1.6rem; }
.ntitle { font-family: var(--serif); font-weight: 400; font-size: 1.6rem; line-height: 1.2; margin: 0 0 0.6rem; font-variant-caps: normal; letter-spacing: 0; }
.entries .ntitle { font-size: 1.6rem; }
.entries .meta { margin-top: 0.55rem; }

/* definition lists */
dl.terms { margin: 0; }
dl.terms > div { padding: 0.95rem 0 1rem; border-top: 1px solid var(--hair); }
dl.terms > div:first-child { border-top: 0; padding-top: 0; }
dl.terms dt { font-style: italic; font-size: 1.28rem; line-height: 1.3; margin: 0 0 0.25rem; }
dl.terms dd { margin: 0; }

/* tables */
.tblwrap { margin: 1.25rem 0 0; }
.tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 1.06rem;
  line-height: 1.42;
}
.tbl caption {
  caption-side: bottom;
  text-align: left;
  font: 400 0.78rem/1.5 var(--sans);
  color: var(--grey);
  padding-top: 0.7rem;
}
.tbl thead th {
  font: 500 0.74rem/1.35 var(--sans);
  color: var(--grey);
  text-align: left;
  vertical-align: bottom;
  padding: 0 1.4rem 0.55rem 0;
  border-bottom: 1px solid var(--ink);
}
.tbl tbody th, .tbl td {
  text-align: left;
  vertical-align: top;
  padding: 0.8rem 1.4rem 0.85rem 0;
  border-bottom: 1px solid var(--hair);
}
.tbl tbody th { font-weight: 400; font-style: italic; font-size: 1.12rem; width: 26%; }
.tbl tbody th a { font-style: italic; }
.tbl.two tbody th { width: 34%; }
.tbl.trans tbody th { font-style: normal; width: 30%; }
.tbl tr > :last-child { padding-right: 0; }

/* articles */
.article .intro .mg { align-self: start; }
.prose { margin-top: 0; }
.prose h2 {
  font-family: var(--serif);
  font-weight: 400;
  font-style: italic;
  font-size: 1.5rem;
  line-height: 1.25;
  margin: 2.1rem 0 0.7rem;
}
.prose .mg { padding-top: 2.4rem; }
.prose .mn { margin-top: 0.75rem; }
ul.loose { margin: 0 0 1em; padding-left: 1.3em; }
ul.loose li { margin-bottom: 0.45em; padding-left: 0.2em; }
ul.loose li::marker { color: var(--grey); }
.after { font-size: 1.05rem; color: var(--grey); margin-top: 2.5rem; padding-top: 1rem; border-top: 1px solid var(--hair); }
.end .mg { padding-top: 0; }

address { font-style: normal; }
.post { margin-bottom: 1em; font-variant-numeric: lining-nums; }

hr.rule { border: 0; height: 1px; background: var(--hair); margin: 4rem var(--pad) 0; }

/* footer, set like letterhead */
.foot {
  margin-top: 7rem;
  padding: 2.4rem 0 3.5rem;
  border-top: 3px double var(--ink);
}
.wm-foot { margin: 0.2rem 0 0; }
.wm-foot span:first-child { font-size: 1.2rem; }
.wm-foot span + span { font-size: 0.78rem; }
.lh { font-size: 1.06rem; line-height: 1.5; font-variant-numeric: lining-nums; margin: 0 0 1.6rem; }
.lh-line { display: block; }
.findex {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 1.5rem;
  font-family: var(--sans);
  font-size: 0.8rem;
  line-height: 1.3;
}
.fhead { color: var(--grey); margin: 0 0 0.2rem; font-size: 0.74rem; }
.findex ul { list-style: none; margin: 0; padding: 0; }
.findex a, .fine a {
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.findex a:hover, .fine a:hover { text-decoration: underline; text-underline-offset: 0.3em; }
.fine {
  margin: 1.4rem 0 0;
  font: 400 0.76rem/1.4 var(--sans);
  color: var(--grey);
  display: flex;
  flex-wrap: wrap;
  column-gap: 1.25rem;
  align-items: center;
}
.fine a { color: var(--grey); }

/* narrower screens: margin falls inline */
@media (max-width: 960px) {
  :root { --pad: 1.25rem; }
  .r { display: block; }
  .r.wide > .tx { max-width: none; }
  .masthead { padding-top: 1.4rem; }
  .masthead .wm { margin-bottom: 0.2rem; }
  .wm span { display: inline; }
  .wm span + span { margin-left: 0.15em; letter-spacing: 0.2em; font-size: 1rem; }
  .mainnav ul { column-gap: 1.1rem; }
  .intro { padding-top: 2.5rem; }
  .intro .mg { margin-bottom: 0.9rem; }
  .crumb a { min-height: 44px; align-items: center; }
  .sec { margin-top: 3.25rem; }
  .sec .mg { margin-bottom: 0.9rem; }
  .sec h2 { margin-top: 0; }
  .mn { margin-top: 0.4rem; }
  .places { display: flex; flex-wrap: wrap; column-gap: 0.9rem; line-height: 1.6; }
  ol.cl { padding-left: 1.6rem; }
  .steps .when { margin: 0 0 0.3rem; }
  .entry + .entry > .mg { padding-top: 1.6rem; border-top: 1px solid var(--hair); }
  .entry + .entry > .tx { border-top: 0; padding-top: 0.3rem; }
  .entry .mg { margin-bottom: 0.2rem; }
  .prose .mg { padding-top: 1.6rem; }
  .prose .mg:empty { display: none; }
  .prose .mn { margin-top: 0; padding: 0; }
  .prose .mg:not(:empty) + .tx h2 { margin-top: 0.8rem; }
  .foot { margin-top: 5rem; }
  .wm-foot { margin-bottom: 1rem; }
  .wm-foot span + span { font-size: 0.85rem; }
}

@media (max-width: 640px) {
  body { font-size: 1.15rem; line-height: 1.55; }
  .lede { font-size: 1.27rem; }
  .findex { grid-template-columns: 1fr 1fr; row-gap: 1.2rem; }
  .tbl.stack thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); }
  .tbl.stack, .tbl.stack tbody, .tbl.stack tr, .tbl.stack th, .tbl.stack td { display: block; width: auto; }
  .tbl.stack tr { padding: 0.9rem 0 1rem; border-bottom: 1px solid var(--hair); }
  .tbl.stack tbody tr:first-child { border-top: 1px solid var(--ink); }
  .tbl.stack tbody th, .tbl.stack td { border: 0; padding: 0; }
  .tbl.stack tbody th { font-size: 1.2rem; margin-bottom: 0.3rem; width: auto; }
  .tbl.stack td + td { margin-top: 0.45rem; }
  .tbl.stack td[data-label]::before {
    content: attr(data-label);
    display: block;
    font: 500 0.7rem/1.5 var(--sans);
    color: var(--grey);
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}

@media print {
  .masthead nav, .skip, .findex { display: none; }
  body { font-size: 11pt; }
}

/* interior section labels: sentence case */
body:not(.home) .sec h2 { font-variant-caps: normal; letter-spacing: 0; font-size: 1.3rem; font-style: italic; font-weight: 400; }
@media (max-width: 640px) {
  .roles .tbl.stack td[data-label]::before { content: none; }
  .roles .tbl.stack td { display: inline; }
  .roles .tbl.stack td + td { margin: 0; }
  .roles .tbl.stack td + td::before { content: ". "; }
}
