/* Gherkit site styles. One file, no external resources. */

:root {
  color-scheme: light dark;
  --bg: #ffffff;
  --bg-soft: #f3f6f1;
  --surface: #ffffff;
  --text: #1b201c;
  --muted: #4b544d;
  --border: #d6ded3;
  --accent: #2e6a1e;
  --accent-hover: #1f4d13;
  --accent-soft: #e6f0e0;
  --accent-soft-text: #24551a;
  --code-bg: #eef2ec;
  --code-text: #1b201c;
  --mark-bg: #fff0b8;
  --mark-text: #3a2c00;
  --shadow: 0 1px 2px rgba(20, 30, 20, 0.06), 0 4px 16px rgba(20, 30, 20, 0.06);
  --radius: 10px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111511;
    --bg-soft: #182018;
    --surface: #151b15;
    --text: #e3e9e1;
    --muted: #a8b3a7;
    --border: #2d382d;
    --accent: #8fd16a;
    --accent-hover: #b4e597;
    --accent-soft: #1d2b18;
    --accent-soft-text: #a8dd88;
    --code-bg: #1c241c;
    --code-text: #e3e9e1;
    --mark-bg: #4a3a06;
    --mark-text: #ffe9a8;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.4), 0 4px 16px rgba(0, 0, 0, 0.3);
  }
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 1.0625rem;
  line-height: 1.65;
  overflow-wrap: break-word;
}

.wrap {
  width: 100%;
  max-width: 62rem;
  margin: 0 auto;
  padding: 0 1rem;
}

@media (min-width: 40rem) {
  .wrap {
    padding: 0 1.5rem;
  }
}

a {
  color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.18em;
}

a:hover {
  color: var(--accent-hover);
  text-decoration-thickness: 2px;
}

a:focus-visible,
pre:focus-visible,
.table-wrap:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}

/* skip link: visible only when focused */
.skip {
  position: absolute;
  left: 0.5rem;
  top: -3rem;
  padding: 0.4rem 0.8rem;
  background: var(--bg);
  color: var(--accent);
  border: 2px solid var(--accent);
  border-radius: 6px;
  z-index: 10;
}

.skip:focus {
  top: 0.5rem;
}

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

.header-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.25rem 1.5rem;
  padding-top: 0.85rem;
  padding-bottom: 0.85rem;
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  text-decoration: none;
}

.logo::before {
  content: "";
  width: 0.7rem;
  height: 1.15rem;
  border-radius: 999px;
  background: var(--accent);
  transform: rotate(28deg);
}

.logo:hover {
  color: var(--text);
}

.site-header nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.1rem;
}

.site-header nav a {
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
}

.site-header nav a:hover {
  color: var(--text);
  border-bottom-color: var(--border);
}

.site-header nav a[aria-current="page"] {
  color: var(--text);
  font-weight: 600;
  border-bottom-color: var(--accent);
}

main {
  display: block;
  flex: 1 0 auto;
  min-width: 0;
  padding-bottom: 3rem;
}

/* headings and text */
h1,
h2,
h3 {
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(1.85rem, 4.5vw, 2.5rem);
  margin: 0 0 0.75rem;
}

h2 {
  font-size: 1.45rem;
  margin: 2.5rem 0 0.75rem;
}

h3 {
  font-size: 1.15rem;
  margin: 1.75rem 0 0.5rem;
}

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

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

li > ul,
li > ol {
  margin: 0.35rem 0 0.5rem;
}

li + li {
  margin-top: 0.3rem;
}

li > p {
  margin: 0 0 0.5rem;
}

strong {
  font-weight: 650;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2rem 0;
}

/* code */
code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--code-bg);
  color: var(--code-text);
  padding: 0.1em 0.35em;
  border-radius: 4px;
  overflow-wrap: break-word;
}

pre {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1.25rem;
  padding: 0.9rem 1rem;
  background: var(--code-bg);
  color: var(--code-text);
  border: 1px solid var(--border);
  border-radius: 8px;
  line-height: 1.5;
}

pre code {
  display: block;
  width: max-content;
  min-width: 100%;
  padding: 0;
  background: none;
  font-size: 0.85rem;
  white-space: pre;
  overflow-wrap: normal;
}

/* tables scroll inside their own box */
.table-wrap {
  max-width: 100%;
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--border);
  border-radius: 8px;
}

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

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

th {
  background: var(--bg-soft);
  font-weight: 650;
}

tr:last-child td {
  border-bottom: 0;
}

/* placeholders still to be filled in, e.g. [provider] */
mark.placeholder {
  background: var(--mark-bg);
  color: var(--mark-text);
  padding: 0 0.2em;
  border-radius: 3px;
}

/* doc pages */
.doc {
  max-width: 46rem;
  padding-top: 2.25rem;
}

.doc h2 {
  padding-top: 0.5rem;
  border-top: 1px solid var(--border);
}

.doc h1 + h2,
.doc h1 + p + h2 {
  border-top: 0;
}

.doc .lead {
  color: var(--muted);
  font-size: 1.1rem;
  margin-top: -0.25rem;
}

/* home page */
.hero {
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
  padding: 3rem 0 2.75rem;
}

.hero h1 {
  max-width: 22ch;
  font-size: clamp(2rem, 5.5vw, 3rem);
  margin-bottom: 1rem;
}

.soon {
  display: inline-block;
  margin: 0 0 1.25rem;
  padding: 0.3rem 0.85rem;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--accent-soft-text);
  background: var(--accent-soft);
  border: 1px solid var(--accent);
  border-radius: 999px;
}

.tagline {
  font-size: clamp(1.15rem, 2.6vw, 1.4rem);
  line-height: 1.45;
  font-weight: 500;
  max-width: 40ch;
  margin-bottom: 1rem;
}

.summary {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 0;
}

.section h2 {
  margin-top: 3rem;
}

.cards {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 17rem), 1fr));
  gap: 1rem;
}

.cards li + li {
  margin-top: 0;
}

.card {
  min-width: 0;
  padding: 1.25rem 1.25rem 0.5rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--accent);
  border-radius: var(--radius);
}

.card h3 {
  margin-top: 0;
}

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

.shot {
  margin: 0 0 2rem;
}

.shot img {
  display: block;
  max-width: 100%;
  height: auto;
  background: var(--bg-soft);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.shot figcaption {
  margin-top: 0.6rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.details {
  max-width: 46rem;
  padding-left: 1.25rem;
}

.details li + li {
  margin-top: 0.75rem;
}

/* footer */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.92rem;
  padding: 1.5rem 0 2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  margin-bottom: 0.75rem;
}

.trademark {
  margin: 0;
}
