/* DJ Accounting site styles, in the manner of the flyer: a plain printed notice.
   Serif headlines, ruled lists, flat panels, square corners, sentence case.
   Quality floor: responsive, visible focus, reduced motion, WCAG AA. */

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--paper); color: var(--ink);
  font-family: var(--font-sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green-dark); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--green-deeper); text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--green-dark); outline-offset: 3px; }
.tnum { font-variant-numeric: tabular-nums; }
.mono { font-family: var(--font-mono); }
.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

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

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--paper); color: var(--green-dark); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* header: logo left, plain links right */
.site-head { border-bottom: 1px solid var(--line); }
.head-in {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px 28px; padding-top: 22px; padding-bottom: 20px;
}
.logo img { height: 46px; width: auto; }
.site-nav { display: flex; flex-wrap: wrap; gap: 4px 24px; }
.site-nav a {
  font-size: 16px; font-weight: 500; color: var(--ink); text-decoration: none;
  padding: 4px 0; border-bottom: 2px solid transparent;
}
.site-nav a:hover { border-bottom-color: var(--line); }
.site-nav a[aria-current="page"] { border-bottom-color: var(--green); }

/* mastheads: a big serif line on white */
.masthead { padding: 72px 0 24px; }
.masthead.compact { padding: 56px 0 8px; }
.eyebrow { font-size: 16px; font-weight: 500; color: var(--panel-label); margin: 0 0 16px; }
.masthead h1 {
  font-family: var(--font-serif); font-weight: 500; color: var(--ink);
  font-size: clamp(38px, 6.4vw, 68px); line-height: 1.05; letter-spacing: -.015em;
  margin: 0; max-width: 22ch;
}
.masthead.compact h1 { font-size: clamp(34px, 5vw, 52px); }
.lede { font-size: clamp(19px, 2.2vw, 22px); line-height: 1.45; color: var(--ink-soft); margin: 18px 0 0; max-width: 40ch; }
.body-copy { margin-top: 26px; max-width: 64ch; }
.body-copy p { font-size: 18px; color: var(--ink-soft); margin: 0 0 14px; }
.cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 28px; }
.fees-note { font-size: 16px; color: var(--ink-soft); margin: 16px 0 0; }

/* buttons: flat, square */
.btn {
  display: inline-block; font-family: var(--font-sans); font-weight: 600; font-size: 16px;
  padding: 13px 24px; text-decoration: none; text-align: center; cursor: pointer;
  background: var(--green-dark); color: #fff; border: 2px solid var(--green-dark);
}
.btn:hover { background: var(--green-deeper); border-color: var(--green-deeper); color: #fff; text-decoration: none; }
.btn-ghost { background: transparent; color: var(--green-dark); }
.btn-ghost:hover { background: var(--panel); color: var(--green-deeper); }

/* sections */
.section { padding: 64px 0 0; }
.section-h {
  font-family: var(--font-serif); font-weight: 500; color: var(--ink);
  font-size: clamp(27px, 3.4vw, 36px); line-height: 1.15; letter-spacing: -.01em; margin: 0;
}
.section-sub { color: var(--ink-soft); margin: 12px 0 26px; max-width: 64ch; }
.prose p { max-width: 68ch; }

/* ruled lists: a heavy rule on top, hairlines between rows, two columns */
.grid, .grid-2 {
  display: grid; grid-template-columns: 1fr 1fr; column-gap: 56px;
  border-top: 3px solid var(--ink);
}
.card { padding: 18px 0 17px; border-bottom: 1px solid var(--line); }
.card h3 { font-family: var(--font-sans); font-weight: 500; font-size: 20px; line-height: 1.3; margin: 0; color: var(--ink); }
.card p { margin: 4px 0 0; font-size: 16px; color: var(--ink-soft); }
a.card { display: block; text-decoration: none; }
a.card:hover h3 { text-decoration: underline; text-decoration-color: var(--green); text-underline-offset: 4px; }
a.card .more { display: none; }
.card .chip-row { margin: 0 0 6px; }
.chip { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; font-weight: 600; color: var(--panel-label); }
.chip .dot { width: 8px; height: 8px; background: var(--green); }

/* panels: flat pale green with the bright green top edge */
.panel {
  background: var(--panel); color: var(--panel-ink);
  border-top: 5px solid var(--green); padding: 30px 32px;
}
.panel h2, .panel h3 {
  font-family: var(--font-serif); font-weight: 500; color: var(--panel-ink);
  font-size: 26px; line-height: 1.2; margin: 0 0 10px;
}
.panel p { max-width: 68ch; }
.panel p:last-child { margin-bottom: 0; }
.panel a { color: var(--panel-ink); }

/* key dates: a ruled table */
.dates { border-top: 3px solid var(--ink); }
.dates .kd {
  display: grid; grid-template-columns: 250px 1fr; gap: 4px 24px; align-items: baseline;
  padding: 15px 0 14px; border-bottom: 1px solid var(--line);
}
.dates .kd .d { font-weight: 600; font-size: 17px; color: var(--ink); }
.dates .kd .w { font-size: 16.5px; color: var(--ink-soft); }

/* closing call to action: a ruled block, not a coloured slab */
.cta-band {
  border-top: 3px solid var(--ink); padding: 26px 0 0; margin-top: 8px;
  display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 18px 32px;
}
.cta-band h2 { font-family: var(--font-serif); font-weight: 500; font-size: 30px; line-height: 1.15; margin: 0 0 6px; }
.cta-band p { margin: 0; color: var(--ink-soft); }

/* agents page: code and the three addresses */
pre {
  background: #F4F7F3; color: var(--ink); border: 1px solid var(--line);
  padding: 16px 18px; overflow-x: auto; font-family: var(--font-mono); font-size: 13.5px; line-height: 1.55;
}
code { white-space: nowrap; font-family: var(--font-mono); font-size: .9em; background: var(--panel); color: var(--panel-ink); padding: 1px 5px; }
pre code { background: none; color: inherit; padding: 0; }
.card h3 code { font-size: .95em; }
.endpoints { border-top: 3px solid var(--ink); }
.endpoints .panel { background: none; color: var(--ink); border-top: 0; border-bottom: 1px solid var(--line); padding: 15px 0; }
.endpoint-h { font-family: var(--font-mono); font-size: 14.5px; margin: 0 0 4px; overflow-wrap: anywhere; }
.endpoint-h .method { color: var(--green-dark); font-weight: 600; }

/* contact details: label left, value right, like the flyer's band */
.details { margin: 6px 0 0; }
.details > div {
  display: grid; grid-template-columns: 200px 1fr; gap: 2px 0; align-items: baseline;
  padding: 14px 0 13px; border-bottom: 1px solid var(--panel-line);
}
.details > div:last-child { border-bottom: 0; }
.details dt, .details dd { margin: 0; }
.details dt { font-size: 16px; color: var(--panel-label); }
.details dd { font-size: clamp(19px, 2.4vw, 24px); font-weight: 500; color: var(--panel-ink); overflow-wrap: anywhere; }
.details dd a { text-decoration: none; }
.details dd a:hover { text-decoration: underline; }
.small-print { font-size: 14.5px; color: var(--ink-faint); }
.panel .small-print { color: var(--panel-label); }

/* footer: the flyer's pale green band */
.site-foot {
  background: var(--panel); color: var(--panel-ink); border-top: 6px solid var(--green);
  margin-top: 80px; padding: 44px 0 30px; font-size: 15.5px;
}
.foot-cols { display: grid; grid-template-columns: 1.6fr 1fr 1fr 1.2fr; gap: 28px; margin-bottom: 28px; }
.foot-name { font-family: var(--font-serif); font-weight: 500; font-size: 22px; margin: 0 0 4px; }
.foot-tag { margin: 0; color: var(--panel-label); max-width: 30ch; }
.foot-icaew { height: 50px; width: auto; margin-top: 22px; }
.site-foot h3 { font-size: 15px; font-weight: 600; color: var(--panel-label); margin: 0 0 8px; }
.site-foot ul { list-style: none; margin: 0; padding: 0; }
.site-foot li { margin-bottom: 6px; }
.site-foot a { color: var(--panel-ink); }
.foot-legal {
  border-top: 1px solid var(--panel-line); padding-top: 18px; margin: 0;
  font-size: 13.5px; line-height: 1.65; color: var(--panel-label);
}

/* about page: photo beside the profile */
.about:has(.about-photo) { display: grid; grid-template-columns: 260px 1fr; gap: 40px; align-items: start; }
.about:has(.about-photo) .prose { grid-column: 2; }
.about-photo { grid-column: 1; width: 260px; height: auto; border-top: 5px solid var(--green); }

/* narrower screens */
@media (max-width: 880px) {
  .foot-cols { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  body { font-size: 16.5px; }
  .wrap { padding: 0 18px; }
  .logo img { height: 36px; }
  .head-in { padding-top: 16px; padding-bottom: 14px; }
  .site-nav { gap: 2px 18px; }
  .site-nav a { font-size: 15px; }
  .masthead { padding: 44px 0 8px; }
  .masthead.compact { padding: 36px 0 0; }
  .section { padding-top: 48px; }
  .grid, .grid-2 { grid-template-columns: 1fr; }
  .about:has(.about-photo) { grid-template-columns: 1fr; gap: 24px; }
  .about .prose, .about-photo { grid-column: 1; }
  .about-photo { width: 200px; }
  .dates .kd { grid-template-columns: 1fr; }
  .panel { padding: 24px 20px; }
  .details > div { grid-template-columns: 1fr; }
  .foot-cols { grid-template-columns: 1fr; }
}
