:root {
  --brand: #4B828D;
  --brand-light: #97C1C9;
  --brand-pale: #C2DCE1;
  --grey-dark: #716F70;
  --grey-mid: #8E8E8E;
  --ink: #333;
  --ink-soft: #555;
  --paper: #fff;
  --bg: #e9e9e9;
  --max: 1100px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

[hidden] { display: none !important; }

html { scroll-behavior: smooth; }

body {
  font-family: Arial, Geneva, sans-serif;
  font-size: 16px;
  line-height: 1.7;
  color: var(--ink);
  background: var(--bg);
}

img { max-width: 100%; height: auto; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-light); }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 20px; }

.skip {
  position: absolute; left: -9999px; top: 0;
  background: var(--brand); color: #fff; padding: 8px 16px; z-index: 100;
}
.skip:focus { left: 0; color: #fff; }

/* header */
.site-header { background: var(--paper); }
.header-row {
  display: flex; align-items: center; justify-content: space-between;
  flex-wrap: wrap; gap: 12px; padding-top: 18px; padding-bottom: 14px;
}
.logo { max-height: 74px; width: auto; display: block; }
.header-contact { text-align: right; font-size: 14px; display: grid; gap: 2px; }
.header-contact .phone { font-size: 20px; font-weight: bold; color: var(--brand); }

.brand-line { display: flex; height: 4px; max-width: var(--max); margin: 0 auto; }
.brand-line span:nth-child(1) { width: 24px; background: #000; }
.brand-line span:nth-child(2) { width: 24px; background: var(--grey-dark); }
.brand-line span:nth-child(3) { width: 24px; background: var(--grey-mid); }
.brand-line span:nth-child(4) { width: 24px; background: var(--brand-pale); }
.brand-line span:nth-child(5) { width: 24px; background: var(--brand-light); }
.brand-line span:nth-child(6) { flex: 1; background: var(--brand); }

/* top nav */
.topnav { background: #cfcfcf; position: sticky; top: 0; z-index: 50; }
.topnav .wrap { position: relative; }
.topnav ul { list-style: none; display: flex; flex-wrap: wrap; }
.topnav li { position: relative; }
.topnav a, .topnav button {
  display: block; padding: 0 18px; line-height: 48px;
  color: #fff; font-size: 13px; font-weight: bold; text-transform: uppercase;
  letter-spacing: 0.5px; background: none; border: none; cursor: pointer;
  font-family: inherit;
}
.topnav > .wrap > ul > li > a, .topnav > .wrap > ul > li > button { color: #4a4a4a; }
.topnav li:hover > a, .topnav li:hover > button,
.topnav li > a:focus, .topnav li > button:focus,
.topnav li.open > button { background: var(--brand); color: #fff; }
.topnav .sub {
  display: none; position: absolute; left: 0; top: 100%;
  background: var(--brand); min-width: 240px; flex-direction: column;
  box-shadow: 0 6px 14px rgba(0,0,0,.18);
}
.topnav li:hover .sub, .topnav li.open .sub, .topnav li:focus-within .sub { display: flex; }
.topnav .sub a { line-height: 1.4; padding: 11px 16px; text-transform: none; font-weight: normal; font-size: 14px; }
.topnav .sub a:hover { background: var(--brand-light); color: #fff; }
.topnav .nav-toggle { display: none; }

/* layout */
.layout {
  display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 32px;
  background: var(--paper); padding-top: 28px; padding-bottom: 48px;
}

.content section > h2:first-child, .content section h2 {
  color: #000; font-size: 26px; font-weight: normal; margin-bottom: 14px;
}
.content h3 { color: var(--brand); font-size: 20px; font-weight: normal; margin: 18px 0 10px; }
.content h4 { color: var(--brand); font-size: 16px; margin: 12px 0 6px; }
.content p { margin-bottom: 14px; }
.content ul, .content ol { margin: 0 0 16px 24px; }
.content li { margin-bottom: 5px; }
.content img { border-radius: 4px; }
.content table { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 16px; }
.content th { background: var(--brand); color: #fff; text-align: left; padding: 8px 10px; }
.content td { padding: 7px 10px; border-bottom: 1px solid #e4e4e4; vertical-align: top; }
.content table.plain td { border-bottom: none; padding: 3px 6px; }

.cols-2 { columns: 2; column-gap: 32px; }

.section-banner { display: block; margin-bottom: 18px; }

/* section transition */
@media (prefers-reduced-motion: no-preference) {
  main.content > section:not([hidden]) { animation: fadein .35s ease; }
  @keyframes fadein { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
}

/* heading accent */
.content section > h2:first-of-type::after,
.home-heading::after {
  content: ""; display: block; width: 56px; height: 3px;
  background: linear-gradient(90deg, var(--brand), var(--brand-pale));
  margin-top: 8px; border-radius: 2px;
}

/* practice area cards (home) */
.home-heading { font-size: 24px; font-weight: normal; color: #000; margin: 34px 0 18px; }
.pa-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.pa-card {
  display: block; border: 1px solid var(--brand-pale); border-radius: 8px;
  padding: 18px 18px 14px; background: #fff; color: inherit;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.pa-card:hover {
  transform: translateY(-3px); box-shadow: 0 10px 22px rgba(75, 130, 141, .18);
  border-color: var(--brand); color: inherit;
}
.pa-card h3 { margin: 0 0 8px; font-size: 17px; }
.pa-card p { font-size: 13.5px; color: var(--ink-soft); margin: 0; line-height: 1.55; }
.pa-card-cta { background: var(--brand); border-color: var(--brand); }
.pa-card-cta h3, .pa-card-cta p { color: #fff; }

/* plain-english intro strip */
.intro-strip {
  background: linear-gradient(90deg, rgba(194, 220, 225, .35), rgba(194, 220, 225, .08));
  border-left: 4px solid var(--brand); border-radius: 0 6px 6px 0;
  padding: 12px 16px; font-size: 16.5px; color: var(--ink); margin: 4px 0 20px;
}

/* highlights strip (home) */
.highlights {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px;
  margin: 34px 0 6px; padding: 22px; border-radius: 8px;
  background: linear-gradient(120deg, var(--brand), #35606B); color: #fff;
}
.highlight strong { display: block; font-size: 17px; margin-bottom: 4px; }
.highlight span { font-size: 13px; opacity: .92; line-height: 1.5; }
.highlight a { color: var(--brand-pale); text-decoration: underline; }

/* news */
.news-teasers { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.news-teaser {
  display: block; border: 1px solid var(--brand-pale); border-radius: 8px; padding: 16px;
  background: #fff; color: inherit; transition: box-shadow .15s ease, border-color .15s ease;
}
.news-teaser:hover { border-color: var(--brand); box-shadow: 0 8px 18px rgba(75,130,141,.15); color: inherit; }
.news-teaser h3 { font-size: 15.5px; margin: 0; line-height: 1.45; }
.news-date {
  font-size: 12px; text-transform: uppercase; letter-spacing: 1px;
  color: var(--grey-mid); margin: 0 0 6px;
}
.news-article { border-bottom: 1px solid #eee; padding: 18px 0; }
.news-article:last-of-type { border-bottom: none; }
.news-article h3 { margin-top: 0; }

/* will form extras */
.help {
  display: inline-flex; align-items: center; justify-content: center;
  width: 17px; height: 17px; border-radius: 50%; cursor: help; position: relative;
  background: var(--brand-light); color: #fff; font-size: 11px; font-weight: bold;
  margin-left: 5px; vertical-align: middle; text-transform: none;
}
.help::after {
  content: attr(data-tip); position: absolute; bottom: calc(100% + 8px); left: 50%;
  transform: translateX(-50%); width: 260px; background: #333; color: #fff;
  font-size: 12.5px; font-weight: normal; line-height: 1.5; letter-spacing: 0;
  padding: 10px 12px; border-radius: 6px; z-index: 60;
  opacity: 0; pointer-events: none; transition: opacity .15s ease;
}
.help:hover::after, .help:focus::after { opacity: 1; }
.repeat-row { display: flex; gap: 8px; margin-bottom: 8px; align-items: center; }
.repeat-row input { flex: 1; }
.repeat-row input.share { flex: 0 0 88px; }
.repeat-row .remove-row {
  flex: none; border: none; background: #eee; color: #666; border-radius: 4px;
  width: 30px; height: 30px; cursor: pointer; font-size: 15px;
}
.repeat-row .remove-row:hover { background: #fdd; color: #a00; }
.btn-sm { padding: 7px 14px; font-size: 13px; }
.willform-cta {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  background: rgba(194, 220, 225, .25); border: 1px dashed var(--brand-light);
  border-radius: 8px; padding: 14px 16px; margin-top: 18px;
}
.willform-cta span { font-size: 13.5px; color: var(--ink-soft); }

/* back to top */
.to-top {
  position: fixed; right: 22px; bottom: 22px; z-index: 80;
  width: 44px; height: 44px; border-radius: 50%; border: none; cursor: pointer;
  background: var(--brand); color: #fff; font-size: 20px; line-height: 1;
  box-shadow: 0 4px 12px rgba(0,0,0,.25); opacity: 0; pointer-events: none;
  transition: opacity .2s ease;
}
.to-top.show { opacity: 1; pointer-events: auto; }
.to-top:hover { background: var(--brand-light); }

/* hero */
.hero { display: grid; gap: 22px; }
.slider { position: relative; aspect-ratio: 535 / 300; overflow: hidden; border-radius: 6px; background: var(--brand-pale); }
.slider img {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  opacity: 0; transition: opacity 1s ease;
}
.slider img.active { opacity: 1; }
.hero-text h1 { font-size: 30px; font-weight: normal; color: #000; margin-bottom: 10px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }

.btn {
  display: inline-block; background: var(--brand); color: #fff !important;
  padding: 10px 22px; border-radius: 4px; border: 2px solid var(--brand);
  font-weight: bold; font-size: 14px; cursor: pointer; font-family: inherit;
}
.btn:hover { background: var(--brand-light); border-color: var(--brand-light); }
.btn-outline { background: transparent; color: var(--brand) !important; }
.btn-outline:hover { background: var(--brand-pale); color: var(--brand) !important; }

/* sidebar accordion */
.sidebar-inner { position: sticky; top: 64px; }
.sidebar-title { font-size: 18px; font-weight: normal; color: #000; margin-bottom: 10px; }
.sidebar details { border: 1px solid var(--brand-pale); border-bottom: none; }
.sidebar details:last-of-type { border-bottom: 1px solid var(--brand-pale); }
.sidebar summary {
  list-style: none; cursor: pointer; background: var(--brand); color: #fff;
  padding: 10px 14px; font-size: 14px; font-weight: bold;
}
.sidebar summary::-webkit-details-marker { display: none; }
.sidebar summary::after { content: "+"; float: right; }
.sidebar details[open] summary::after { content: "\2212"; }
.sidebar ul { list-style: none; background: #fff; }
.sidebar ul a { display: block; padding: 8px 14px; font-size: 13.5px; color: var(--ink); border-bottom: 1px solid #f0f0f0; }
.sidebar ul a:hover { background: var(--brand-pale); color: var(--ink); }
.sidebar li.indent a { padding-left: 30px; font-style: italic; }

/* people table fallback */
.divTable { display: table; width: 100%; }
.divTableRow { display: table-row; }
.divTableCell { display: table-cell; padding: 3px 10px; vertical-align: top; }

/* enquiry form (modern) */
.lead { font-size: 17px; color: var(--ink-soft); max-width: 60ch; }
.form-card {
  background: #fff; border: 1px solid var(--brand-pale); border-radius: 10px;
  box-shadow: 0 8px 24px rgba(75, 130, 141, .10);
  padding: 26px 28px 22px; margin-top: 18px;
}
.form-step {
  display: flex; align-items: center; gap: 10px;
  margin: 26px 0 16px !important; padding-bottom: 8px;
  border-bottom: 1px solid var(--brand-pale);
}
.form-step:first-child { margin-top: 0 !important; }
.form-step span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--brand); color: #fff; font-size: 14px; font-weight: bold;
}
.enquiry-form .field { margin-bottom: 16px; }
.enquiry-form label, .enquiry-form .label {
  display: block; font-size: 13px; font-weight: bold; letter-spacing: .3px;
  text-transform: uppercase; color: var(--ink-soft); margin-bottom: 5px;
}
.enquiry-form .hint { font-weight: normal; text-transform: none; color: var(--grey-mid); }
.field-note { font-size: 13.5px; color: var(--ink-soft); margin: -1px 0 8px; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 20px; }
.enquiry-form input[type="text"], .enquiry-form input[type="email"],
.enquiry-form select, .enquiry-form textarea {
  width: 100%; padding: 11px 12px; border: 1px solid #ccc;
  border-radius: 6px; font-family: inherit; font-size: 15px; background: #fff;
  transition: border-color .15s, box-shadow .15s;
}
.enquiry-form input:focus, .enquiry-form select:focus, .enquiry-form textarea:focus {
  outline: none; border-color: var(--brand);
  box-shadow: 0 0 0 3px rgba(151, 193, 201, .45);
}
.enquiry-form textarea { resize: vertical; min-height: 130px; }
.segmented { display: inline-flex; border: 1px solid var(--brand); border-radius: 6px; overflow: hidden; }
.segmented label { margin: 0; }
.segmented input { position: absolute; opacity: 0; pointer-events: none; }
.segmented span {
  display: block; padding: 9px 18px; font-size: 14px; cursor: pointer;
  color: var(--brand); border-right: 1px solid var(--brand-pale);
  transition: background .15s, color .15s;
}
.segmented label:last-child span { border-right: none; }
.segmented input:checked + span { background: var(--brand); color: #fff; }
.segmented input:focus-visible + span { box-shadow: inset 0 0 0 3px rgba(151, 193, 201, .8); }
.segmented span:hover { background: var(--brand-pale); }
.segmented input:checked + span:hover { background: var(--brand); }
.enquiry-form .tel-group { display: flex; gap: 8px; }
.enquiry-form .tel-group input:first-child { width: 72px; flex: none; }
.required { color: #c00; }
.form-actions { display: flex; gap: 12px; margin-top: 18px; }
.btn-lg { padding: 13px 34px; font-size: 15px; }
.form-err {
  color: #a00; background: #fdf0f0; border: 1px solid #eebbbb; border-radius: 6px;
  padding: 12px 14px; font-size: 14px; margin-top: 14px;
}
.form-ok { background: #e8f4ea; border: 1px solid #9fd0a9; border-radius: 6px; padding: 14px 16px; margin-bottom: 18px; }
.g-recaptcha { margin: 6px 0 4px; }
.captcha-note { font-size: 13.5px; color: var(--ink-soft); background: #fff8e6; border: 1px solid #eedc9a; border-radius: 6px; padding: 10px 12px; }
.privacy-note { font-size: 12.5px; color: var(--grey-mid); margin-top: 14px; }

/* contact */
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; margin-bottom: 26px; }
.contact-card { border: 1px solid var(--brand-pale); border-radius: 6px; padding: 14px 16px; }
.contact-card h3 { margin-top: 0; }
.map-embed { position: relative; padding-bottom: 56%; border-radius: 6px; overflow: hidden; margin-bottom: 26px; }
.map-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* footer */
.site-footer { border-top: 10px solid var(--brand); background: #f0f0f0; }
.footer-cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 24px; padding-top: 28px; padding-bottom: 28px; }
.site-footer h4 { font-weight: normal; font-size: 17px; color: #777; margin-bottom: 8px; }
.site-footer ul { list-style: none; }
.site-footer li { border-bottom: 1px dashed #ddd; padding: 4px 2px; font-size: 14px; color: #555; }
.site-footer li a { color: #555; }
.site-footer li a:hover { color: #000; }
.footer-bottom { background: #222; text-align: center; padding: 10px; }
.footer-bottom p { color: #eee; font-size: 12.5px; }

/* cookie banner */
.cookie-banner {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 90;
  background: rgba(34, 34, 34, .97); color: #eee;
  display: flex; gap: 18px; align-items: center; justify-content: center;
  flex-wrap: wrap; padding: 14px 20px; font-size: 14px;
}
.cookie-banner a { color: var(--brand-light); }
.cookie-banner .btn { padding: 6px 20px; }

/* responsive */
@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar-inner { position: static; }
  .cols-2 { columns: 1; }
}

@media (max-width: 720px) {
  .topnav .nav-toggle {
    display: block; width: 100%; text-align: left; color: #4a4a4a;
  }
  .topnav #nav-list { display: none; flex-direction: column; }
  .topnav.open #nav-list { display: flex; }
  .topnav > .wrap > ul > li > a, .topnav > .wrap > ul > li > button { width: 100%; text-align: left; }
  .topnav .sub { position: static; box-shadow: none; display: none; }
  .topnav li.open .sub { display: flex; }
  .topnav li:hover .sub { display: none; }
  .topnav li.open:hover .sub { display: flex; }
  .header-row { justify-content: center; text-align: center; }
  .header-contact { text-align: center; }
  .grid-2 { grid-template-columns: 1fr; }
  .form-card { padding: 18px 16px; }
  .segmented { display: flex; flex-wrap: wrap; }
  .segmented span { flex: 1; text-align: center; }
}

@media print {
  .topnav, .sidebar, .cookie-banner, .site-footer .footer-cols { display: none; }
  .layout { display: block; }
}
