/* ZARInvoice website: one shared stylesheet. No external fonts or resources. */
:root {
  --bg: #ffffff;
  --surface: #f4f6f8;
  --text: #1b1f24;
  --muted: #5a6470;
  --border: #d9dee4;
  --accent: #0b6e4f;
  --accent-text: #ffffff;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #121417;
    --surface: #1c2025;
    --text: #e8ebee;
    --muted: #a3acb6;
    --border: #2f353c;
    --accent: #4cc79a;
    --accent-text: #0b1a14;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.6;
  overflow-wrap: break-word;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 0 1rem;
}

header.site {
  border-bottom: 1px solid var(--border);
}

header.site .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding-top: 0.875rem;
  padding-bottom: 0.875rem;
}

.brand {
  font-weight: 700;
  font-size: 1.25rem;
  color: var(--text);
  text-decoration: none;
}

.brand span {
  color: var(--accent);
}

nav a {
  margin-left: 1rem;
}

nav a:first-child {
  margin-left: 0;
}

main {
  padding-top: 1.5rem;
  padding-bottom: 2.5rem;
}

h1 {
  font-size: 1.875rem;
  line-height: 1.25;
  margin: 0.5rem 0 0.75rem;
}

h2 {
  font-size: 1.3rem;
  line-height: 1.3;
  margin: 2rem 0 0.5rem;
}

h3 {
  font-size: 1.075rem;
  margin: 1.25rem 0 0.25rem;
}

p,
ul,
ol {
  margin: 0 0 1rem;
}

ul,
ol {
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.35rem;
}

a {
  color: var(--accent);
}

a:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.lead {
  font-size: 1.15rem;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 1rem 1.25rem;
  margin: 1.25rem 0;
}

.card > h2:first-child {
  margin-top: 0;
}

.card > :last-child {
  margin-bottom: 0;
}

.button {
  display: inline-block;
  background: var(--accent);
  color: var(--accent-text);
  font-weight: 600;
  text-decoration: none;
  padding: 0.6rem 1.1rem;
  border-radius: 0.5rem;
}

.features {
  list-style: none;
  padding: 0;
  display: grid;
  gap: 0.75rem;
}

@media (min-width: 40rem) {
  .features {
    grid-template-columns: 1fr 1fr;
  }
}

.features li {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  padding: 0.875rem 1rem;
  margin: 0;
}

.features strong {
  display: block;
}

.table-scroll {
  overflow-x: auto;
  margin: 0 0 1rem;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.975rem;
}

th,
td {
  text-align: left;
  vertical-align: top;
  padding: 0.5rem 0.625rem;
  border: 1px solid var(--border);
}

th {
  background: var(--surface);
}

/* Stack the table into cards on narrow phones so nothing scrolls sideways. */
@media (max-width: 34rem) {
  table.stack thead {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    margin: -1px;
  }
  table.stack,
  table.stack tbody,
  table.stack tr,
  table.stack td {
    display: block;
    width: 100%;
  }
  table.stack tr {
    border: 1px solid var(--border);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
  }
  table.stack td {
    border: 0;
    border-top: 1px solid var(--border);
  }
  table.stack td:first-child {
    border-top: 0;
    background: var(--surface);
    font-weight: 600;
  }
  table.stack td[data-label]:not(:first-child)::before {
    content: attr(data-label) ": ";
    font-weight: 600;
  }
}

footer.site {
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.925rem;
}

footer.site .wrap {
  padding-top: 1rem;
  padding-bottom: 1.5rem;
}

footer.site p {
  margin: 0 0 0.25rem;
}
