/* justiceapex.ai Ledger scheme. One sheet, linked LAST on a page, after every other sheet. It changes colour, type face
   and edge treatment only. It adds no words, no elements and no layout rules. Values match the theapexengine.net Ledger:
   cream paper f3eee3, panels ece5d3 and e3dac3, ink 1b2820, green 1f5a3c, ochre 7a5a1e, rules cdc3ab, flat edges. */

:root,
:root:not([data-theme="light"]),
:root[data-theme="light"],
:root[data-theme="dark"] {
  color-scheme: light;

  /* names used by the home and access pages */
  --color-paper: #f3eee3;
  --color-surface: #fbf8f0;
  --color-panel: #ece5d3;
  --color-notice: #e9efe3;
  --color-ink: #1b2820;
  --color-muted: #4f5d53;
  --color-on-accent: #ffffff;
  --color-rule: #cdc3ab;
  --color-field-border: #6c776e;
  --color-accent: #1f5a3c;
  --color-accent-strong: #143f2a;
  --color-focus: #1f5a3c;
  --color-error: #9b2c2c;
  --color-error-bg: #f6e6e1;
  --color-success: #1e6a43;
  --color-success-bg: #e4eee4;
  --font-serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --radius-1: 2px;
  --radius-2: 2px;
  --radius-3: 2px;
  --shadow-card: none;

  /* names used by the business and forge pages */
  --bg-0: #f3eee3;
  --bg-1: #f3eee3;
  --panel: #ece5d3;
  --panel-2: #e3dac3;
  --line: #cdc3ab;
  --line-strong: #1b2820;
  --text-1: #1b2820;
  --text-2: #364539;
  --text-3: #4f5d53;
  --teal: #1f5a3c;
  --cyan: #143f2a;
  --ink: #ffffff;
  --night: #364539;
  --dawn: #4f5d53;
  --noon: #1f5a3c;
  --dusk: #7a5a1e;
  --focus: #1f5a3c;
  --error: #9b2c2c;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --r-1: 2px;
  --r-2: 2px;
  --r-3: 2px;

  /* the shared family footer and booking button */
  --fam-ground: #f3eee3;
  --fam-raised: #ece5d3;
  --fam-text: #1b2820;
  --fam-text-quiet: #4f5d53;
  --fam-rule: #cdc3ab;
  --fam-link: #1f5a3c;
  --fam-link-hover: #143f2a;
  --fam-focus: #1f5a3c;
  --fam-action-bg: #1f5a3c;
  --fam-action-bg-hover: #143f2a;
  --fam-action-text: #ffffff;
  --fam-font-text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --fam-radius: 2px;
  --fam-btn-radius: 2px;
}

html { background: #f3eee3; }
body { background: #f3eee3; color: #364539; }
::selection { background: #1f5a3c; color: #ffffff; }

/* Headings carry the serif voice. */
h1, h2, h3, h4 {
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-weight: 600;
  color: #1b2820;
}
h1 { letter-spacing: -0.02em; line-height: 1.08; }
h2 { letter-spacing: -0.012em; }
h3 { font-weight: 600; letter-spacing: 0; }
.label, .eyebrow, .mono, .kind, .lab {
  color: #4f5d53;
}
a { color: #1f5a3c; }
a:hover { color: #143f2a; }

/* Header: a printed masthead with a heavy rule under it. Both the home pages and the business pages. */
.site-header, .nav {
  background: #f3eee3;
  border-bottom: 2px solid #1b2820;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}
.brand { color: #1b2820; font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif; font-weight: 700; }
.brand svg path { fill: #1f5a3c; }
.nav-links a, .nav-links summary { color: #1b2820; border-radius: 0; }
.nav-links a:hover, .nav-links summary:hover { color: #143f2a; text-decoration: underline; }
.nav-links a[aria-current="page"], .nav-drop.has-current > summary { box-shadow: inset 0 -3px 0 #1b2820; }
.drop-menu, .menu-list {
  background: #f3eee3;
  border: 2px solid #1b2820;
  border-radius: 2px;
  box-shadow: none;
}
.drop-menu a:hover, .menu-list a:hover { background: #ece5d3; }
.drop-menu a[aria-current="page"] { box-shadow: inset 3px 0 0 #1f5a3c; }
.menu summary { border: 2px solid #1b2820; border-radius: 2px; color: #1b2820; background: #f3eee3; }
.menu-list a, .menu-list .grp { color: #1b2820; }
.menu-list .grp { color: #4f5d53; }
.nav-cta, .menu-list .book {
  background: #1f5a3c; color: #ffffff; border-color: #1f5a3c; border-radius: 2px;
}
.nav-cta:hover, .menu-list .book:hover { background: #143f2a; border-color: #143f2a; color: #ffffff; }
.skip { background: #1f5a3c; color: #ffffff; }

/* Buttons: flat, square, no glow. */
.button, .btn-primary {
  background: #1f5a3c; color: #ffffff; border-color: #1f5a3c; border-radius: 2px;
}
.button:hover, .btn-primary:hover { background: #143f2a; border-color: #143f2a; color: #ffffff; }
.button[disabled], .button[aria-disabled="true"] { background: #e3dac3; color: #4f5d53; border-color: #cdc3ab; }
.button-quiet, .btn-ghost {
  background: transparent; color: #1f5a3c; border-color: #1f5a3c; border-radius: 2px;
}
.button-quiet:hover, .btn-ghost:hover { background: #ece5d3; color: #143f2a; border-color: #143f2a; }
.btn { border-radius: 2px; }

/* Cards and frames: ruled boxes on paper. */
.door, .figure-frame, .panel, .see, .feed, .wp, .doc, .hc-output, .hc-group {
  background: #fbf8f0;
  border: 1px solid #cdc3ab;
  border-radius: 2px;
  box-shadow: none;
  background-image: none;
}
.door:hover { border-color: #1f5a3c; }
.door .door-title { color: #1f5a3c; }
.panel { border-top: 3px solid #1b2820; }
.notice, .note-box { background: #e9efe3; border-radius: 0; }
.note-box { border-left: 4px solid #1f5a3c; }
.sample { background: #f0e8d3; border-left: 4px solid #7a5a1e; border-radius: 0; }
.tag { border-color: #4f5d53; color: #364539; }
.tv-plate { border-radius: 2px; box-shadow: none; border-color: #cdc3ab; }
.final { background: #ece5d3; border-top: 2px solid #1b2820; }

/* Forms. */
.field input, .field textarea, .field select {
  background: #fbf8f0; color: #1b2820; border-color: #6c776e; border-radius: 2px;
}
.error-summary { border-radius: 2px; }
.field.bad input, .field.bad select, .field.bad textarea { border-color: #9b2c2c; box-shadow: 0 0 0 1px #9b2c2c; }

/* Tabs on /business and /forge. */
.pick-tabs button[aria-selected="true"] { background: #e3dac3; border-color: #1f5a3c; box-shadow: inset 4px 0 0 #1f5a3c; }

/* The hours calculator on /business. */
.hc, :root {
  --hc-bg: #f3eee3;
  --hc-surface: #ece5d3;
  --hc-field-bg: #fbf8f0;
  --hc-text: #1b2820;
  --hc-muted: #4f5d53;
  --hc-accent: #1f5a3c;
  --hc-accent-text: #ffffff;
  --hc-border: #6c776e;
  --hc-focus: #1f5a3c;
  --hc-error: #9b2c2c;
  --hc-track: #6c776e;
  --hc-thumb: #1b2820;
}
.hc { --hc-border: #6c776e; --hc-track: #6c776e; }
.hc-box { border-color: #6c776e; }
.hc-kicker { color: #1f5a3c; }
.hc-statement { border-left-color: #7a5a1e; }
.hc-output { border-color: #1f5a3c; background: #fbf8f0; }
.hc-footnote { border-top-color: #7a5a1e; }

/* The forge screenshot showcase on /business keeps its pictures and takes the paper around them. */
#forge-showcase {
  --bg-deep: #ece5d3;
  --bg: #f3eee3;
  --card: #fbf8f0;
  --text: #1b2820;
  --text-2: #364539;
  --teal: #1f5a3c;
  --cyan: #143f2a;
  --on-teal: #ffffff;
  --rule: #cdc3ab;
  --edge: #6c776e;
  --focus: #1f5a3c;
  --font-text: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
#forge-showcase.showcase { background: #ece5d3; border-block: 2px solid #1b2820; }
#forge-showcase a { color: #1f5a3c; }
#forge-showcase .frame { border-radius: 2px; box-shadow: none; border: 1px solid #1b2820; }
#forge-showcase .legend-corner { background: #ece5d3; color: #1b2820; border-bottom: 1px solid #1f5a3c; }
#forge-showcase .legend-full { background: #e9efe3; border-radius: 0; border-left-color: #1f5a3c; }
#forge-showcase .tablist button { border-radius: 2px; }
#forge-showcase .tablist button[aria-selected="true"] { background: #e3dac3; border-color: #1f5a3c; box-shadow: inset 4px 0 0 #1f5a3c; }
#forge-showcase .tablist button:hover { border-color: #143f2a; color: #143f2a; }
#forge-showcase .btn { border-radius: 2px; }
#forge-showcase .btn:hover { border-color: #143f2a; color: #143f2a; }
#forge-showcase .btn[disabled] { color: #4f5d53; }
#forge-showcase .callouts li::before { border-color: #1f5a3c; color: #1f5a3c; }
#forge-showcase.showcase h2 { color: #1b2820; }

/* The demo bar. */
:root { --demo-bar-bg: #ece5d3; --demo-bar-text: #1b2820; --demo-bar-link: #1f5a3c; --demo-bar-focus: #1f5a3c; }

/* The architecture paper (/business/architecture) and FORGE onboarding (/forge/onboarding/) name their colours differently. */
:root, :root:not([data-theme="light"]), :root[data-theme="light"], :root[data-theme="dark"] {
  --bg-deep: #f3eee3;
  --bg: #f3eee3;
  --bg-card: #fbf8f0;
  --text: #1b2820;
  --text-2: #364539;
  --on-teal: #ffffff;
  --rule: #cdc3ab;
  --edge: #6c776e;
  --tint: rgba(31, 90, 60, 0.08);
  --text-primary: #1b2820;
  --text-secondary: #364539;
  --text-dim: #4f5d53;
  --forge: #7a5a1e;
  --forge-light: #7a5a1e;
  --forge-border: rgba(122, 90, 30, 0.35);
  --border-glass: #cdc3ab;
  --glass-bg: rgba(243, 238, 227, 0.94);
  --radius: 2px;
  --r: 2px;
}

/* Taps: 44 px for links in running text, the footer, and form fields. Inline padding grows the tap area without moving the lines. */
p a, li a, dd a, footer a { padding-block: 13px; }
/* FORGE onboarding's request button: dark text on the old orange becomes white on green. */
#b-submit { background: #1f5a3c; color: #ffffff; border-color: #1f5a3c; border-radius: 2px; }
#b-submit:hover { background: #143f2a; border-color: #143f2a; }
input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]), select, textarea { min-height: 44px; }

/* Focus rings read green on paper. */
a:focus-visible, button:focus-visible, summary:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible {
  outline: 3px solid #1f5a3c;
  outline-offset: 3px;
}

/* On wider screens, links in running text go back to sitting inside the line, so the phone-size tap padding doesn't push lines apart.
   On phones they keep the full-size tap box. Buttons keep their own box at every width. */
@media (min-width: 761px) {
  p a:not(.button):not(.btn):not(.btn-primary), li a:not(.button):not(.btn):not(.btn-primary), dd a:not(.button):not(.btn):not(.btn-primary) { display: inline; padding-block: 0; }
}

/* Wide screens use the width. The About page's list of our other work becomes a row of three ruled cards. */
@media (min-width: 1024px) {
  .about-work { max-width: none; }
  .about-work .about-list { max-width: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 24px; }
  .about-work .about-list li { background: #fbf8f0; border: 1px solid #cdc3ab; border-top: 3px solid #1f5a3c; padding: 24px; }
  .about-work .about-list li p { font-size: 1.05rem; line-height: 1.6; }
}

/* Footer rows. The family footer's own style names one grid area for "company" and one for "contact", but each holds two lines
   (copyright and mailing address; phone and email), so both lines landed in one cell on top of each other. Here every footer line
   takes its own row in the left column and the links sit beside them in the right column. The more specific selector wins over the
   page's own style, which comes later in the page. */
@media (min-width: 48rem) {
  .fam-footer .fam-footer-inner > .fam-footer-name,
  .fam-footer .fam-footer-inner > .fam-footer-company,
  .fam-footer .fam-footer-inner > .fam-footer-contact { grid-area: auto; grid-column: 1; }
  .fam-footer .fam-footer-inner > .fam-footer-nav { grid-area: auto; grid-column: 2; grid-row: 1 / span 6; }
}
/* The phone and email links each get a 44 px tap area of their own, instead of padding that reached into the next line. */
.fam-footer .fam-footer-inner > .fam-footer-contact a { display: inline-flex; align-items: center; min-height: 44px; padding-block: 0; }
