/* West Elgin Accounting Inc. — site styles (dark theme)
   Colours taken from the logo: burgundy frame and sage background. */
:root {
  --burgundy: #8e1a1f;       /* buttons */
  --burgundy-dark: #a3232a;  /* button hover */
  --line: #a3232a;           /* decorative burgundy rules */
  --accent: #eba9ac;         /* links and highlights: light rose, readable on dark */
  --sage: #a5bba6;           /* footer band, matches the logo */
  --on-sage: #1b221f;        /* text on the sage footer */
  --surface: #27302c;        /* form and result panels */
  --field-bg: #1b221f;
  --field-border: #6f7c75;
  --ink: #e8ece9;
  --muted: #aab4ae;
  --rule: #3f4a45;
  --page: #000000;
  --body-font: "Open Sans", "Segoe UI", Verdana, Arial, sans-serif;
  color-scheme: dark;
}

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

html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--page);
  color: var(--ink);
  font-family: var(--body-font);
  font-size: 0.95rem;
  line-height: 1.6;
}

a { color: var(--accent); }
a:hover { color: #ffffff; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }

.skip-link {
  position: absolute; left: -999px; top: 0;
  background: var(--burgundy); color: #fff; padding: .5rem 1rem; z-index: 10;
}
.skip-link:focus { left: 0; }

/* Header */
.site-header { text-align: center; padding: 1.5rem 1rem 0; }
.site-header .logo { display: inline-block; max-width: 660px; width: 100%; }
.site-header .logo img { display: block; width: 100%; height: auto; box-shadow: 0 0 0 1px rgba(255,255,255,.08); }

.site-nav { margin: 1.25rem auto 0; max-width: 820px; border-top: 3px solid var(--line); border-bottom: 1px solid var(--line); }
.site-nav ul {
  list-style: none; margin: 0; padding: .35rem .5rem;
  display: flex; flex-wrap: wrap; justify-content: center; gap: .15rem 1.4rem;
}
.site-nav a {
  display: inline-block; padding: .35rem 0;
  font-size: .8rem; font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  color: var(--ink); text-decoration: none; border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--accent); }
.site-nav a[aria-current="page"] { color: var(--accent); border-bottom-color: var(--line); }

/* Main column */
/* White content panel on the black page.
   Light-theme colours are set here so everything inside the panel switches to dark text. */
main {
  --ink: #222222;
  --muted: #5c5c5c;
  --rule: #c8c8c8;
  --accent: #7b1216;
  --line: #7b1216;
  --surface: #e6ede5;
  --field-bg: #ffffff;
  --field-border: #8a8a8a;
  color-scheme: light;
  color: var(--ink);
  background: #ffffff;
  border-top: 4px solid #7b1216;
  max-width: 700px;
  margin: 2rem auto 2.5rem;
  padding: 2rem 2.5rem 2.5rem;
}
main a:hover { color: #5a0c0f; }

h1 {
  font-size: 1.75rem; font-weight: 800; font-style: italic; text-transform: uppercase;
  margin: .5rem 0 2rem; letter-spacing: .01em;
}
h2 {
  font-size: 1.6rem; font-weight: 700; font-style: italic; font-stretch: 75%;
  margin: 2.75rem 0 0; padding-bottom: .9rem; border-bottom: 1px solid var(--rule);
}
h3 { font-size: 1.45rem; font-weight: 300; font-stretch: 75%; margin: 1.25rem 0 .5rem; }

.tagline { text-align: center; font-weight: 700; font-style: italic; font-size: 1.05rem; margin: 1rem 0 2rem; }
.intro p { text-align: justify; }

ul.plain { padding-left: 1.25rem; }
ul.plain li { margin: .2rem 0; }

.jump-links {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .5rem 2rem;
  max-width: 400px; margin: 2.5rem auto; padding: 0; list-style: none;
}
.jump-links a { color: var(--ink); text-decoration: none; }
.jump-links a:hover { color: var(--accent); text-decoration: underline; }

.to-top { text-align: right; font-size: .85rem; margin-top: 1.5rem; }
.to-top a { color: var(--ink); text-decoration: none; }
.to-top a:hover { color: var(--accent); }

.resource { margin: 0 0 1.75rem; }
.resource h2 { border-bottom: 0; padding-bottom: 0; margin: 0 0 .4rem; font-size: 1.45rem; }
.resource h2 a { color: var(--ink); text-decoration: none; }
.resource h2 a:hover { color: var(--accent); text-decoration: underline; }

.link-list { margin: 1rem 0 0; padding: 0; list-style: none; }
.link-list li { margin-bottom: 1rem; }
.link-list a { font-weight: 600; }

/* Financial tools table */
.tools-wrap { overflow-x: auto; }
.tools { width: 100%; border-collapse: collapse; margin-top: 1rem; }
.tools th, .tools td { text-align: left; vertical-align: top; padding: .7rem .5rem; border-bottom: 1px solid var(--rule); }
.tools th { font-weight: 600; width: 42%; }
.tools th a { color: var(--accent); }
.tools caption { text-align: left; font-size: .85rem; color: var(--muted); caption-side: bottom; padding-top: .75rem; }

/* Contact */
.hours { text-align: center; font-weight: 700; font-size: 1.1rem; border-bottom: 1px solid var(--rule); padding-bottom: 1.5rem; }
.hours p { margin: .6rem 0; }
.hours .hours-title { font-size: 1.2rem; }

.locate { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; margin-top: 2rem; align-items: start; }
.map { width: 100%; aspect-ratio: 4 / 3; border: 0; background: var(--surface); }
.address h2 { border: 0; padding: 0; margin: 0 0 1rem; font-size: 1.6rem; line-height: 1.15; }
.address p { margin: .3rem 0; }
.directions { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; margin-top: 1rem; }
.directions label { font-size: .9rem; }
.directions input { flex: 1 1 180px; }

.staff { list-style: none; padding: 0; margin: 2rem 0 0; }
.staff li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.staff strong { display: block; }
.staff .role { color: var(--muted); font-size: .9rem; }

/* Forms */
form.appointment { margin-top: 2.5rem; padding: 1.5rem; background: var(--surface); border-top: 3px solid var(--line); }
form.appointment h2 { border: 0; padding: 0; margin: 0 0 1rem; }
.field { margin-bottom: 1rem; }
.field label, fieldset legend { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .25rem; }
.req { color: var(--accent); }
input[type=text], input[type=email], input[type=tel], input[type=date], select, textarea {
  width: 100%; padding: .5rem .6rem; font: inherit; color: var(--ink);
  border: 1px solid var(--field-border); border-radius: 2px; background: var(--field-bg);
}
textarea { min-height: 7rem; resize: vertical; }
.row-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1rem; }
fieldset label { display: inline-flex; gap: .35rem; margin-right: 1.25rem; font-weight: 400; }
.hp { position: absolute; left: -9999px; }
button, .button {
  font: inherit; font-weight: 600; background: var(--burgundy); color: #fff;
  border: 0; padding: .6rem 1.4rem; cursor: pointer; border-radius: 2px; text-decoration: none; display: inline-block;
}
button:hover, .button:hover { background: var(--burgundy-dark); color: #fff; }
button.secondary { background: transparent; color: var(--ink); border: 1px solid var(--field-border); padding: .45rem .9rem; }
button.secondary:hover { color: var(--accent); border-color: var(--line); background: transparent; }

.notice { padding: 1rem 1.25rem; background: var(--surface); border-left: 4px solid var(--line); }

/* Newsletters: CRA news feed */
.feed-status { color: var(--muted); font-style: italic; }
.news-list { list-style: none; margin: 1rem 0 0; padding: 0; }
.news-list li { padding: 1rem 0; border-top: 1px solid var(--rule); }
.news-list li:first-child { border-top: 0; padding-top: .25rem; }
.news-list time { display: block; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.news-list h3 { margin: .25rem 0 .35rem; font-size: 1.2rem; font-weight: 600; font-stretch: 100%; }
.news-list p { margin: 0; font-size: .95rem; }
.feed-more { margin-top: 1.5rem; font-weight: 600; }

/* Footer */
.site-footer { background: var(--sage); color: var(--on-sage); border-top: 4px solid var(--burgundy); padding: 1.5rem 1rem; text-align: center; }
.site-footer ul { list-style: none; margin: 0 0 1rem; padding: 0; display: flex; flex-wrap: wrap; justify-content: center; gap: .25rem 1.25rem; }
.site-footer ul a { color: var(--on-sage); text-decoration: none; font-size: .8rem; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; }
.site-footer ul a:hover { color: var(--burgundy); text-decoration: underline; }
.site-footer .addr { font-weight: 700; font-size: .85rem; margin: 0; letter-spacing: .03em; }
.site-footer .small { font-size: .8rem; margin: .5rem 0 0; }

@media (max-width: 640px) {
  main { margin: 1.25rem .75rem 1.5rem; padding: 1.25rem 1.1rem 1.75rem; }
  h1 { font-size: 1.45rem; }
  .locate, .row-2 { grid-template-columns: 1fr; }
  .intro p { text-align: left; }
}

@media print {
  :root { --page: #fff; --ink: #000; --muted: #444; --accent: #7b1216; --surface: #fff; --rule: #bbb; }
  .site-nav, .skip-link, form.appointment, .to-top { display: none; }
  .site-footer { background: none; }
}
.site-footer, .site-footer .small a { color: var(--on-sage); }

/* ---------- Calculators ---------- */
input[type=number] {
  width: 100%; padding: .5rem .6rem; font: inherit; color: var(--ink);
  border: 1px solid var(--field-border); border-radius: 2px; background: var(--field-bg);
}
.calc-form { margin-top: 1.5rem; padding: 1.5rem; background: var(--surface); border-top: 3px solid var(--line); }
.calc-form > .field:last-child, .calc-form > .row-2:last-child > .field { margin-bottom: 0; }
.hint { display: block; font-size: .8rem; color: var(--muted); margin-top: .2rem; font-weight: 400; }
.calc-results { margin-top: 1.5rem; padding: 1.25rem 1.5rem; border: 1px solid var(--rule); border-left: 4px solid var(--line); }
.calc-results h2 { border: 0; padding: 0; margin: 0 0 .25rem; font-size: 1.3rem; }
.result-main { font-size: 2rem; font-weight: 800; color: var(--accent); margin: 0 0 .5rem; line-height: 1.2; }
.result-list { margin: .75rem 0 0; display: grid; grid-template-columns: 1fr auto; gap: .35rem 1rem; }
.result-list dt { color: var(--muted); }
.result-list dd { margin: 0; font-weight: 600; text-align: right; font-variant-numeric: tabular-nums; }
.calc-error { color: var(--accent); font-weight: 600; margin: 0; }
.schedule { margin-top: 1.25rem; }
.schedule summary { cursor: pointer; font-weight: 600; color: var(--accent); }
.schedule table { width: 100%; border-collapse: collapse; margin-top: .75rem; font-size: .85rem; font-variant-numeric: tabular-nums; }
.schedule th, .schedule td { padding: .35rem .4rem; border-bottom: 1px solid var(--rule); text-align: right; }
.schedule th:first-child, .schedule td:first-child { text-align: left; }
.disclaimer { font-size: .8rem; color: var(--muted); margin-top: 2rem; border-top: 1px solid var(--rule); padding-top: 1rem; }
.compare { width: 100%; border-collapse: collapse; margin-top: .75rem; font-variant-numeric: tabular-nums; }
.compare th, .compare td { padding: .45rem .4rem; border-bottom: 1px solid var(--rule); text-align: right; }
.compare th:first-child, .compare td:first-child { text-align: left; }
.compare tr.best td { font-weight: 700; color: var(--accent); }
.back { font-size: .9rem; margin: 0 0 1rem; }
.calc-form h3 { margin: 0 0 .75rem; font-weight: 700; font-style: italic; font-size: 1.25rem; }
.calc-form h3 ~ h3 { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--rule); }
.calc-form .field > label > input[type=checkbox] { margin-right: .4rem; }
