/* Herdline company site — "Ink & Saffron Ledger".
   Shared by every page except privacy-policy.html, which is self-contained
   because it also renders inside the app's WebView.
   No build step, no framework, no external requests. */

:root {
  --ink: #1a1712;
  --ink-soft: #564f42;
  --paper: #fcfaf3;
  --paper-2: #f8f4e9;
  --paper-3: #f2ecde;
  --line: #d7cfbb;
  --line-strong: #a99f88;
  --saffron: #d9820a;
  --saffron-ink: #8a5406;
  --sage: #3e5a47;
  --radius: 7px;
  --radius-sm: 5px;
  --maxw: 1080px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #ede7da;
    --ink-soft: #b8af9c;
    --paper: #14120e;
    --paper-2: #1b1813;
    --paper-3: #211e18;
    --line: #3d3729;
    --line-strong: #6e6555;
    --saffron: #f0b05c;
    --saffron-ink: #f0b05c;
    --sage: #9dc0a5;
  }
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
}

h1, h2, h3, h4 {
  font-family: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(1.9rem, 5vw, 2.9rem); }
h2 { font-size: clamp(1.35rem, 3.2vw, 1.85rem); }
h3 { font-size: 1.08rem; }

p { margin: 0 0 1em; }

a { color: var(--saffron-ink); }
a:focus-visible,
button:focus-visible { outline: 3px solid var(--saffron); outline-offset: 2px; }

code, .mono {
  font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace;
  font-size: 0.92em;
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.1em 0.4em;
}

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

.skip {
  position: absolute;
  left: -9999px;
  background: var(--ink);
  color: var(--paper);
  padding: 10px 16px;
  z-index: 100;
}
.skip:focus { left: 12px; top: 12px; }

/* ---- Utility bar: identity above the fold on every page ---- */
.utility {
  background: var(--paper-3);
  border-bottom: 1px solid var(--line);
  font-size: 0.82rem;
  color: var(--ink-soft);
}
.utility .wrap {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 18px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.utility strong { color: var(--ink); font-weight: 600; }
.utility a { color: var(--ink-soft); text-decoration: none; }
.utility a:hover { text-decoration: underline; }

/* ---- Header ---- */
header.site {
  border-bottom: 1px solid var(--line);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 20;
}
header.site .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 14px;
  padding-bottom: 14px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: "Space Grotesk", system-ui, sans-serif;
  font-weight: 700;
  font-size: 1.12rem;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.02em;
}
.brand .mark {
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: var(--saffron);
  display: grid;
  place-items: center;
  flex: none;
}
nav.site ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  margin: 0;
  padding: 0;
}
nav.site a {
  display: block;
  padding: 8px 12px;
  border-radius: var(--radius-sm);
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 600;
}
nav.site a:hover { background: var(--paper-3); color: var(--ink); }
nav.site a[aria-current="page"] { color: var(--ink); background: var(--paper-3); }

/* ---- Sections ---- */
main { display: block; }
section { padding: 52px 0; border-bottom: 1px solid var(--line); }
section:last-of-type { border-bottom: 0; }
.eyebrow {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--ink-soft);
  margin: 0 0 10px;
}
.lede { font-size: 1.08rem; color: var(--ink-soft); max-width: 62ch; }

.hero { padding: 60px 0 52px; }
.hero h1 { max-width: 20ch; }

.cta-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.btn {
  display: inline-block;
  padding: 12px 20px;
  border-radius: var(--radius-sm);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
}
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn:hover { opacity: 0.9; }

/* ---- Cards ---- */
.grid { display: grid; gap: 14px; }
.grid.two { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.grid.three { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

.card {
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
}
.card h3 { margin-bottom: 6px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 0.94rem; }
.card .icon {
  width: 34px;
  height: 34px;
  border-radius: var(--radius-sm);
  background: var(--paper-3);
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  margin-bottom: 12px;
}
.card .icon svg { width: 18px; height: 18px; stroke: var(--ink); fill: none;
  stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }

/* ---- Facts strip ---- */
.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.facts div { background: var(--paper-2); padding: 16px 18px; }
.facts dt {
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 700;
}
.facts dd { margin: 4px 0 0; font-weight: 600; font-size: 0.96rem; }

/* ---- Detail table ---- */
.table-wrap { overflow-x: auto; }
table.details {
  width: 100%;
  border-collapse: collapse;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  font-size: 0.94rem;
}
table.details th,
table.details td {
  text-align: left;
  padding: 11px 16px;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
}
table.details tr:last-child th,
table.details tr:last-child td { border-bottom: 0; }
table.details th {
  width: 240px;
  background: var(--paper-3);
  font-weight: 600;
  color: var(--ink-soft);
  white-space: nowrap;
}
table.details td { background: var(--paper-2); }

/* ---- Product ---- */
.product-head {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}
.product-head .app-mark {
  width: 56px;
  height: 56px;
  border-radius: var(--radius);
  background: var(--saffron);
  display: grid;
  place-items: center;
  flex: none;
}
.trustline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 18px 0 0;
  padding: 0;
  list-style: none;
}
.trustline li {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 6px 10px;
  border: 1px solid var(--line-strong);
  border-radius: 3px;
  color: var(--ink-soft);
}
.badge-play {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border: 1px solid var(--ink);
  border-radius: var(--radius-sm);
  background: var(--ink);
  color: var(--paper);
  text-decoration: none;
  font-weight: 600;
}

.note {
  background: var(--paper-3);
  border: 1px solid var(--line);
  border-left: 3px solid var(--saffron);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

ul.plain { list-style: none; margin: 0; padding: 0; }
ul.plain li {
  padding: 9px 0 9px 26px;
  position: relative;
  border-bottom: 1px solid var(--line);
  font-size: 0.94rem;
}
ul.plain li:last-child { border-bottom: 0; }
ul.plain li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 17px;
  width: 8px;
  height: 8px;
  border-radius: 2px;
  background: var(--saffron);
}

details.faq {
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--paper-2);
  padding: 0;
  margin-bottom: 10px;
}
details.faq summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  font-size: 0.96rem;
}
details.faq .body { padding: 0 18px 16px; color: var(--ink-soft); font-size: 0.94rem; }

/* ---- Footer ---- */
footer.site {
  background: var(--paper-3);
  border-top: 1px solid var(--line);
  padding: 36px 0 28px;
  font-size: 0.88rem;
  color: var(--ink-soft);
}
footer.site .cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
  margin-bottom: 24px;
}
footer.site h4 {
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 8px;
}
footer.site a { color: var(--ink-soft); text-decoration: none; }
footer.site a:hover { text-decoration: underline; }
footer.site ul { list-style: none; margin: 0; padding: 0; }
footer.site li { margin-bottom: 5px; }
.copyright {
  border-top: 1px solid var(--line);
  padding-top: 16px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
}

@media (max-width: 640px) {
  section { padding: 40px 0; }
  table.details th { width: auto; white-space: normal; }
  table.details, table.details tbody, table.details tr,
  table.details th, table.details td { display: block; width: 100%; }
  table.details th { border-bottom: 0; padding-bottom: 2px; }
}
