/* Corliss & Wain — probate and estate counsel, Newburyport
   White, one deep navy, one brick accent used rarely. Caslon for headings, Franklin for text. */

:root {
  --white: #fff;
  --mist: #f1f3f5;
  --navy: #0f2238;
  --ink: #1a2530;
  --grey: #56626e;
  --hair: #d8dde2;
  --brick: #9a3b2a;
  --display: "Libre Caslon Display", "Libre Caslon Text", Georgia, serif;
  --serif: "Libre Caslon Text", Georgia, serif;
  --sans: "Libre Franklin", "Helvetica Neue", Arial, sans-serif;
  --max: 1200px;
  --gut: clamp(20px, 4vw, 48px);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body { margin: 0; background: var(--white); color: var(--ink); font: 400 1.0625rem/1.65 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration-color: var(--hair); text-decoration-thickness: 1px; text-underline-offset: .22em; }
a:hover { text-decoration-color: currentColor; }
:focus-visible { outline: 2px solid var(--brick); outline-offset: 3px; }
h1, h2 { font-family: var(--display); font-weight: 400; line-height: 1.1; margin: 0; color: var(--navy); }
h3, h4 { font: 600 1.02rem/1.35 var(--sans); margin: 0; color: var(--navy); }
p { margin: 0 0 1.1em; }
ul, ol { margin: 0 0 1.1em; padding-left: 1.15em; }
li { margin-bottom: .45em; }
figure { margin: 0; }
figcaption { font-size: .84rem; color: var(--grey); margin-top: .7rem; }
.wrap { max-width: var(--max); margin: 0 auto; padding: 0 var(--gut); }
.label { font: 600 .72rem/1.4 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--brick); margin: 0 0 1.1rem; }
.small { font-size: .9rem; color: var(--grey); }
.skip { position: absolute; left: -999px; top: 0; background: var(--navy); color: #fff; padding: .6rem 1rem; z-index: 50; }
.skip:focus { left: 0; }

/* ---------- Header ---------- */
.mast { border-bottom: 1px solid var(--hair); }
.mast-in { max-width: var(--max); margin: 0 auto; padding: 1.15rem var(--gut); display: flex; align-items: center; gap: clamp(1rem, 3vw, 2.5rem); }
.wordmark { text-decoration: none; flex-shrink: 0; margin-right: auto; }
.wm-name { font-family: var(--display); font-size: 1.7rem; line-height: 1; display: block; color: var(--navy); }
.wm-sub { font: 500 .66rem/1 var(--sans); letter-spacing: .16em; text-transform: uppercase; display: block; margin-top: .45rem; color: var(--grey); }
.mast-nav { display: flex; gap: clamp(.9rem, 1.8vw, 1.7rem); }
.mast-nav a { font-size: .94rem; text-decoration: none; padding: .35rem 0; border-bottom: 1px solid transparent; white-space: nowrap; }
.mast-nav a:hover, .mast-nav a[aria-current] { border-bottom-color: var(--navy); }
.mast-tel { font-weight: 600; font-size: .94rem; text-decoration: none; border: 1px solid var(--navy); padding: .6rem 1rem; white-space: nowrap; }
.mast-tel:hover { background: var(--navy); color: #fff; }
.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.btn { display: inline-block; font: 600 .95rem/1 var(--sans); text-decoration: none; padding: 1rem 1.5rem; border: 1px solid var(--navy); background: var(--navy); color: #fff; cursor: pointer; transition: background .15s, color .15s; }
.btn:hover { background: #1c3552; }
.btn.light { background: #fff; color: var(--navy); border-color: #fff; }
.btn.light:hover { background: var(--mist); }
.more { font-weight: 600; font-size: .95rem; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: .1rem; white-space: nowrap; }
.more::after { content: "  →"; }
button.more { background: none; border: 0; border-bottom: 1px solid currentColor; font-family: var(--sans); color: inherit; cursor: pointer; padding: 0 0 .1rem; }

/* ---------- Home: opening ---------- */
.open { display: grid; grid-template-columns: minmax(0, 11fr) minmax(0, 13fr); min-height: min(680px, 78vh); }
.open-text { background: var(--navy); color: #dfe5ea; padding: clamp(2.5rem, 6vw, 5.5rem) clamp(1.4rem, 5vw, 5rem); display: flex; flex-direction: column; justify-content: center; }
.open .label { color: #9fb0bf; }
.open h1 { color: #fff; font-size: clamp(2.4rem, 4.4vw, 4rem); margin-bottom: 1.5rem; }
.open .standfirst { font-size: 1.14rem; line-height: 1.6; max-width: 30em; margin: 0; }
.open-act { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin-top: 2.2rem; }
.open-act .tel { color: #fff; font-weight: 600; text-decoration: none; border-bottom: 1px solid rgba(255, 255, 255, .5); padding-bottom: .1rem; }
.open-img img { width: 100%; height: 100%; object-fit: cover; object-position: 72% 50%; }
.standfirst { font-size: 1.16rem; line-height: 1.6; max-width: 36em; }

/* ---------- Bands ---------- */
.band { padding: clamp(3.5rem, 7vw, 6.5rem) 0; }
.band.mist { background: var(--mist); }
.band-head { max-width: 46rem; margin-bottom: clamp(2rem, 4vw, 3rem); }
.band-head h2, .h2, .two h2 { font-size: clamp(2rem, 3.4vw, 2.9rem); margin-bottom: .9rem; }
.band-head p { margin: 0; color: var(--grey); }

/* Situation list */
.ledger { list-style: none; padding: 0; margin: 0; border-top: 1px solid var(--navy); }
.ledger li { margin: 0; border-bottom: 1px solid var(--hair); }
.ledger a { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 5fr) 2rem; gap: 2rem; align-items: baseline; padding: 1.6rem 0; text-decoration: none; }
.ledger .say { font-family: var(--display); font-size: clamp(1.4rem, 2.1vw, 1.8rem); line-height: 1.2; color: var(--navy); }
.ledger .do { color: var(--grey); }
.ledger .go { font-size: 0; text-align: right; }
.ledger .go::after { content: "→"; font-size: 1.25rem; color: var(--navy); transition: margin .15s; }
.ledger a:hover .say { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .18em; }
.ledger a:hover .go::after { margin-right: -.4rem; }

/* The executor's year */
.line { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border-top: 1px solid var(--navy); }
.line li { margin: 0; padding: 1.5rem 1.4rem 0 0; position: relative; }
.line li::before { content: ""; position: absolute; top: -4px; left: 0; width: 7px; height: 7px; background: var(--navy); border-radius: 50%; }
.line li.key::before { background: var(--brick); }
.line .when { font: 600 .72rem/1.3 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); display: block; margin-bottom: .55rem; }
.line li.key .when { color: var(--brick); }
.line strong { font: 400 1.25rem/1.2 var(--display); color: var(--navy); display: block; margin-bottom: .4rem; }
.line .d { font-size: .9rem; line-height: 1.5; color: var(--grey); display: block; }
.year-foot { margin: 2.2rem 0 0; font-size: .88rem; color: var(--grey); display: flex; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; }

/* Navy band */
.ink { background: var(--navy); color: #d5dde4; }
.ink h2 { color: #fff; }
.ink .label { color: #9fb0bf; }
.ink .sched { border-top-color: rgba(255, 255, 255, .5); }
.ink .sched li { border-bottom-color: rgba(255, 255, 255, .16); }
.ink .sched .fee { color: #fff; }
.ink .sched small { color: #9fb0bf; }
.ink .more { color: #fff; }

/* Fee schedules */
.two { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(2rem, 6vw, 6rem); align-items: start; }
.two.flip { grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); align-items: center; }
.sched { list-style: none; padding: 0; margin: 0 0 1.6rem; border-top: 1px solid var(--navy); }
.sched li { display: flex; align-items: baseline; justify-content: space-between; gap: 1.5rem; padding: .95rem 0; border-bottom: 1px solid var(--hair); margin: 0; }
.sched .dots { display: none; }
.sched .what small { display: block; font-size: .86rem; color: var(--grey); line-height: 1.45; }
.sched .fee { font-family: var(--display); font-size: 1.3rem; white-space: nowrap; color: var(--navy); }
.sched-title { font: 600 .74rem/1.4 var(--sans); letter-spacing: .12em; text-transform: uppercase; margin: 2.4rem 0 .8rem; color: var(--grey); }

/* People row */
.people { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.2rem, 3vw, 2.6rem); }
.people a { text-decoration: none; }
.people img { aspect-ratio: 4 / 5; object-fit: cover; width: 100%; }
.people strong { font: 400 1.5rem/1.2 var(--display); color: var(--navy); display: block; margin-top: 1rem; }
.people .role { font-size: .9rem; color: var(--grey); display: block; margin-top: .25rem; }

/* Three columns */
.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(1.5rem, 4vw, 3.5rem); }
.cols3 > div { border-top: 1px solid var(--navy); padding-top: 1.3rem; }
.cols3 .n { font: 600 .72rem/1 var(--sans); letter-spacing: .12em; color: var(--grey); display: block; margin-bottom: 1rem; }
.cols3 h3 { font: 400 1.4rem/1.2 var(--display); margin-bottom: .6rem; }
.cols3 p { color: var(--grey); margin: 0; }
.towns { columns: 2; column-gap: 2rem; list-style: none; padding: 1rem 0 0; margin: 1.5rem 0; border-top: 1px solid var(--navy); }
.towns li { break-inside: avoid; padding: .2rem 0; margin: 0; }
.tall-img img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }

/* Closing + footer */
.closing { background: var(--mist); }
.closing-in { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); padding-top: clamp(3.5rem, 6vw, 5.5rem); padding-bottom: clamp(3.5rem, 6vw, 5.5rem); align-items: center; }
.closing h2 { font-size: clamp(2rem, 3.6vw, 3.1rem); }
.tel-big { font-family: var(--display); font-size: clamp(2rem, 3.2vw, 2.7rem); text-decoration: none; line-height: 1.2; display: inline-block; margin-bottom: .6rem; color: var(--navy); }
.closing-act p { font-size: .95rem; color: var(--grey); }
.colophon { background: var(--navy); color: #b9c5cf; padding: clamp(3rem, 5vw, 4.5rem) 0 2rem; font-size: .93rem; line-height: 1.7; }
.colophon .wm-name { color: #fff; margin-bottom: 1rem; }
.colophon .label { color: #8497a8; }
.colophon a { color: #e6ebef; text-decoration-color: rgba(255, 255, 255, .25); }
.colophon ul { list-style: none; padding: 0; }
.col-grid { display: grid; grid-template-columns: 1.1fr 1.2fr 1.2fr 1.3fr; gap: clamp(1.5rem, 4vw, 3.5rem); padding-bottom: 2.5rem; }
.fine { border-top: 1px solid rgba(255, 255, 255, .16); padding-top: 1.5rem; font-size: .78rem; line-height: 1.65; color: #8fa0af; }
.fine strong { color: #cfd8df; }
.fine p { max-width: 78em; }

/* ---------- Inner pages ---------- */
.title { padding: clamp(2.5rem, 6vw, 4.8rem) 0 clamp(2.2rem, 4vw, 3.5rem); display: grid; grid-template-columns: minmax(0, 8fr) minmax(0, 4fr); gap: clamp(2rem, 5vw, 5rem); align-items: end; }
.title h1 { font-size: clamp(2.3rem, 4.6vw, 3.9rem); margin-bottom: 1.2rem; }
.title h1:last-child { margin-bottom: 0; }
.title .standfirst { margin: 0; color: var(--grey); }
.title aside { background: var(--mist); padding: 1.3rem 1.5rem; font-size: .93rem; }
.title aside p { margin-bottom: .5em; }
.title aside p:last-child { margin: 0; }
.title aside strong { color: var(--navy); }
.doc { display: grid; grid-template-columns: 13.5rem minmax(0, 1fr); gap: clamp(2rem, 6vw, 6rem); border-top: 1px solid var(--navy); padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); }
.toc { position: sticky; top: 1.5rem; align-self: start; font-size: .9rem; }
.toc ol { list-style: none; padding: 0; margin: 0; }
.toc li { margin: 0; }
.toc a { display: block; padding: .5rem 0; text-decoration: none; color: var(--grey); border-bottom: 1px solid var(--hair); }
.toc a:hover { color: var(--navy); }
.body { max-width: 44rem; }
.body > section { padding-bottom: clamp(2.2rem, 4vw, 3.4rem); margin-bottom: clamp(2.2rem, 4vw, 3.4rem); border-bottom: 1px solid var(--hair); scroll-margin-top: 1.5rem; }
.body > section:last-child { border-bottom: 0; margin-bottom: 0; }
.body h2 { font-size: clamp(1.75rem, 2.8vw, 2.3rem); margin-bottom: 1.2rem; }
.body h3 { margin: 1.8rem 0 .5rem; }
.plain { background: var(--mist); border-left: 2px solid var(--navy); padding: 1.1rem 1.3rem; margin: 1.6rem 0; font-size: .96rem; }
.plain b { font: 600 .7rem/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--navy); display: block; margin-bottom: .5rem; }
.plain p:last-child { margin: 0; }
.body figure { margin: 2rem 0; }
table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: .95rem; }
caption { text-align: left; font-weight: 600; color: var(--navy); padding-bottom: .7rem; }
th, td { text-align: left; vertical-align: top; padding: .85rem 1rem .85rem 0; border-bottom: 1px solid var(--hair); }
thead th { font: 600 .72rem/1.4 var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--grey); border-bottom: 1px solid var(--navy); }
tbody th { font-weight: 600; color: var(--navy); width: 26%; }
.steps { list-style: none; padding: 0; counter-reset: st; border-top: 1px solid var(--navy); }
.steps li { counter-increment: st; display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); gap: 1rem; padding: 1.05rem 0; border-bottom: 1px solid var(--hair); margin: 0; }
.steps li::before { content: counter(st); font: 400 1.6rem/1.1 var(--display); color: var(--navy); }
.steps strong { color: var(--navy); }
.steps .when { font: 600 .72rem/1.4 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--grey); display: block; margin-top: .35rem; }
.checklist { list-style: none; padding: 0; border-top: 1px solid var(--navy); }
.checklist li { border-bottom: 1px solid var(--hair); margin: 0; }
.checklist label { display: grid; grid-template-columns: 1.6rem minmax(0, 1fr); gap: .8rem; padding: .8rem 0; cursor: pointer; align-items: start; }
.checklist input { width: 1.1rem; height: 1.1rem; margin: .25rem 0 0; accent-color: var(--navy); }
.checklist small { display: block; color: var(--grey); font-size: .88rem; line-height: 1.5; }
.checklist input:checked + span { color: var(--grey); }
.printrow { margin-top: 1.6rem; }

/* People page */
.bio { display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 7fr); gap: clamp(1.5rem, 6vw, 6rem); padding: clamp(2.5rem, 5vw, 4rem) 0; border-top: 1px solid var(--hair); align-items: start; }
.bio:first-of-type { border-top-color: var(--navy); }
.bio img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; }
.bio h2 { font-size: clamp(2rem, 3.4vw, 2.8rem); margin-bottom: .3rem; }
.bio .role { color: var(--grey); margin-bottom: 1.4rem; }
.facts { list-style: none; padding: 0; margin: 1.6rem 0 0; border-top: 1px solid var(--hair); font-size: .94rem; }
.facts li { display: grid; grid-template-columns: 8rem minmax(0, 1fr); gap: 1rem; padding: .6rem 0; margin: 0; border-bottom: 1px solid var(--hair); }
.facts b { font-weight: 600; color: var(--navy); }

/* Questions */
details { border-bottom: 1px solid var(--hair); }
details:first-of-type { border-top: 1px solid var(--navy); }
summary { cursor: pointer; padding: 1.05rem 2.2rem 1.05rem 0; font-weight: 600; color: var(--navy); list-style: none; position: relative; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: .2rem; top: .85rem; font-size: 1.3rem; font-weight: 400; }
details[open] summary::after { content: "–"; }
details > div { padding: 0 2.2rem 1.1rem 0; color: var(--grey); }
dl.gloss { margin: 0; border-top: 1px solid var(--navy); }
dl.gloss div { display: grid; grid-template-columns: 12rem minmax(0, 1fr); gap: 1.5rem; padding: .9rem 0; border-bottom: 1px solid var(--hair); }
dl.gloss dt { font-weight: 600; color: var(--navy); }
dl.gloss dd { margin: 0; color: var(--grey); }
.links { list-style: none; padding: 0; border-top: 1px solid var(--navy); }
.links li { border-bottom: 1px solid var(--hair); padding: .85rem 0; margin: 0; }
.links small { display: block; color: var(--grey); font-size: .88rem; }

/* Contact */
.contact { display: grid; grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); gap: clamp(2rem, 6vw, 6rem); border-top: 1px solid var(--navy); padding: clamp(2rem, 4vw, 3.5rem) 0 clamp(3rem, 6vw, 5rem); align-items: start; }
.field { margin-bottom: 1.4rem; }
.field label, .field legend { font-weight: 600; font-size: .92rem; color: var(--navy); display: block; margin-bottom: .45rem; padding: 0; }
.field input[type=text], .field input[type=tel], .field input[type=email], .field select, .field textarea { width: 100%; font: 400 1.02rem/1.5 var(--sans); color: var(--ink); background: #fff; border: 1px solid #9aa5b0; border-radius: 0; padding: .8rem .9rem; }
.field textarea { min-height: 8rem; resize: vertical; }
.field .hint { font-size: .86rem; color: var(--grey); margin: .4rem 0 0; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: var(--brick); box-shadow: inset 3px 0 0 var(--brick); }
.field.check label { display: grid; grid-template-columns: 1.5rem minmax(0, 1fr); gap: .7rem; font-weight: 400; font-size: .9rem; color: var(--ink); cursor: pointer; }
.field.check input { width: 1.1rem; height: 1.1rem; margin-top: .2rem; accent-color: var(--navy); }
.field.check.bad label { color: var(--brick); }
.hp { position: absolute; left: -9999px; }
.form-msg { color: var(--brick); font-size: .92rem; min-height: 1.5em; }
#form-done { background: var(--mist); padding: 2rem; }
#form-done h2 { font-size: 2rem; margin-bottom: 1rem; }
.where dl { margin: 0 0 2rem; }
.where dl div { display: grid; grid-template-columns: 6.5rem minmax(0, 1fr); gap: 1rem; padding: .9rem 0; border-bottom: 1px solid var(--hair); }
.where dl div:first-child { padding-top: 0; }
.where dt { font-weight: 600; color: var(--navy); font-size: .92rem; }
.where dd { margin: 0; }

/* ---------- Responsive ---------- */
@media (max-width: 1080px) {
  .mast-in { flex-wrap: wrap; }
  .menu-btn { display: block; font: 600 .9rem/1 var(--sans); background: none; border: 1px solid var(--navy); color: var(--navy); padding: .7rem .95rem; cursor: pointer; }
  .mast-tel { display: none; }
  .mast-nav { display: none; flex-basis: 100%; flex-direction: column; gap: 0; }
  .mast-nav.open { display: flex; }
  .mast-nav a { padding: .9rem 0; border-bottom: 1px solid var(--hair); font-size: 1rem; }
  .line { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 2.5rem; }
  .col-grid { grid-template-columns: 1fr 1fr; }
  .doc { grid-template-columns: minmax(0, 1fr); }
  .toc { display: none; }
}
@media (max-width: 760px) {
  body { font-size: 1rem; }
  .wm-name { font-size: 1.45rem; }
  .open, .two, .two.flip, .closing-in, .title, .contact, .bio { grid-template-columns: minmax(0, 1fr); }
  .open { min-height: 0; }
  .open-img img { aspect-ratio: 3 / 2; height: auto; }
  .ledger a { grid-template-columns: minmax(0, 1fr) 1.5rem; gap: .4rem 1rem; padding: 1.3rem 0; }
  .ledger .do { grid-column: 1; grid-row: 2; font-size: .95rem; }
  .ledger .go { grid-column: 2; grid-row: 1; }
  .line { grid-template-columns: minmax(0, 1fr); border-top: 0; border-left: 1px solid var(--navy); row-gap: 0; }
  .line li { padding: 0 0 1.6rem 1.3rem; }
  .line li::before { top: .35rem; left: -4px; }
  .people { grid-template-columns: 1fr 1fr; }
  .cols3 { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .col-grid { grid-template-columns: minmax(0, 1fr); }
  .bio figure { max-width: 16rem; }
  dl.gloss div, .facts li { grid-template-columns: minmax(0, 1fr); gap: .15rem; }
  tbody th { width: auto; }
  .tablewrap table { font-size: .88rem; }
  th, td { padding: .7rem .6rem .7rem 0; }
  thead th { font-size: .62rem; letter-spacing: .06em; }
  .sched li { gap: 1rem; }
  .sched .fee { font-size: 1.15rem; }
}
@media print {
  .mast-nav, .closing, .colophon, .toc, .menu-btn, .title aside, [data-print] { display: none !important; }
  body { font-size: 11pt; }
  .doc { display: block; border: 0; padding: 0; }
}
