/* My Local POS website. Plain CSS, no build step. */

/* ---------- Tokens ---------- */
:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-2: #eef2f9;
  --text: #111827;
  --muted: #566074;
  --border: #dbe2ee;
  --accent: #1d5ad6;
  --accent-hover: #1747b8;
  --accent-soft: #e4ecfd;
  --accent-text: #1747b8;
  --on-accent: #ffffff;
  --warn-bg: #fff7e3;
  --warn-border: #f0d38c;
  --warn-text: #6b4a00;
  --ok-bg: #e6f6ec;
  --ok-text: #1b6b3a;
  --danger-text: #b42318;
  --shadow: 0 1px 2px rgba(17, 24, 39, 0.05), 0 8px 24px rgba(17, 24, 39, 0.06);
  --radius: 14px;
  --radius-sm: 10px;
  --max: 1120px;
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", Consolas, "SFMono-Regular", Menlo, monospace;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #111318;
    --surface: #191c23;
    --surface-2: #20242d;
    --text: #e8ecf4;
    --muted: #9ba4b6;
    --border: #2b303b;
    --accent: #3b7ef5;
    --accent-hover: #2f6fe3;
    --accent-soft: #1b2944;
    --accent-text: #7eaaff;
    --on-accent: #ffffff;
    --warn-bg: #2b2414;
    --warn-border: #5b4719;
    --warn-text: #f1cd73;
    --ok-bg: #16301f;
    --ok-text: #7fd9a0;
    --danger-text: #ff8a80;
    --shadow: 0 1px 2px rgba(0, 0, 0, 0.3), 0 8px 24px rgba(0, 0, 0, 0.25);
    color-scheme: dark;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
}

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

a {
  color: var(--accent-text);
  text-underline-offset: 3px;
}

a:hover {
  text-decoration-thickness: 2px;
}

h1,
h2,
h3,
h4 {
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.01em;
}

h1 {
  font-size: clamp(2rem, 4.5vw, 3.1rem);
  letter-spacing: -0.025em;
}

h2 {
  font-size: clamp(1.5rem, 3vw, 2.1rem);
}

h3 {
  font-size: 1.2rem;
}

p {
  margin: 0 0 1em;
}

code,
kbd {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0.1em 0.4em;
  overflow-wrap: anywhere;
}

pre {
  font-family: var(--mono);
  font-size: 0.88rem;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  overflow-x: auto;
  margin: 0 0 1em;
}

pre code {
  background: none;
  border: 0;
  padding: 0;
}

:focus-visible {
  outline: 3px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 8px;
  z-index: 100;
  background: var(--accent);
  color: var(--on-accent);
  padding: 8px 14px;
  border-radius: 8px;
}

.skip-link:focus {
  left: 16px;
}

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 16px;
}

@media (min-width: 720px) {
  .container {
    padding: 0 24px;
  }
}

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

.small {
  font-size: 0.9rem;
}

.center {
  text-align: center;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(160%) blur(10px);
  -webkit-backdrop-filter: saturate(160%) blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.08rem;
  color: var(--text);
  text-decoration: none;
  white-space: nowrap;
}

.brand img {
  width: 34px;
  height: 34px;
}

.nav-toggle {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
  color: var(--text);
  cursor: pointer;
}

.nav-toggle svg {
  width: 22px;
  height: 22px;
}

.site-nav {
  display: none;
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow);
  padding: 8px 16px 16px;
}

.site-nav.open {
  display: block;
}

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.site-nav a {
  display: block;
  padding: 10px 12px;
  border-radius: 8px;
  color: var(--text);
  text-decoration: none;
  font-weight: 500;
}

.site-nav a:hover {
  background: var(--surface-2);
}

.site-nav a[aria-current="page"] {
  color: var(--accent-text);
  background: var(--accent-soft);
}

.site-nav .nav-cta {
  margin-top: 6px;
  text-align: center;
  background: var(--accent);
  color: var(--on-accent);
}

.site-nav .nav-cta:hover,
.site-nav .nav-cta[aria-current="page"] {
  background: var(--accent-hover);
  color: var(--on-accent);
}

@media (min-width: 920px) {
  .nav-toggle {
    display: none;
  }

  .site-nav {
    display: block;
    position: static;
    margin-left: auto;
    background: none;
    border: 0;
    box-shadow: none;
    padding: 0;
  }

  .site-nav ul {
    flex-direction: row;
    align-items: center;
    gap: 4px;
  }

  .site-nav a {
    padding: 8px 12px;
    font-size: 0.97rem;
  }

  .site-nav .nav-cta {
    margin: 0 0 0 8px;
    padding: 8px 16px;
  }
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 48px;
  padding: 12px 22px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, transform 0.05s;
}

.btn:hover {
  border-color: var(--accent);
}

.btn:active {
  transform: translateY(1px);
}

.btn-primary {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.btn-primary:hover {
  background: var(--accent-hover);
  border-color: var(--accent-hover);
}

.btn-small {
  min-height: 36px;
  padding: 6px 12px;
  font-size: 0.9rem;
  border-radius: 9px;
}

.btn svg {
  width: 22px;
  height: 22px;
  flex: none;
}

.btn-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.btn .btn-sub {
  display: block;
  font-weight: 400;
  font-size: 0.82rem;
  opacity: 0.85;
}

.btn-label {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  line-height: 1.25;
  text-align: left;
}

/* ---------- Sections ---------- */
.section {
  padding: 56px 0;
}

@media (min-width: 720px) {
  .section {
    padding: 80px 0;
  }
}

.section-alt {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}

.section-head {
  max-width: 720px;
  margin-bottom: 32px;
}

.section-head.center {
  margin-left: auto;
  margin-right: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 10px;
}

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

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 48px 0 24px;
}

@media (min-width: 720px) {
  .page-hero {
    padding: 72px 0 32px;
  }
}

.page-hero .lead {
  max-width: 720px;
}

/* ---------- Home hero ---------- */
.hero {
  padding: 48px 0 56px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero {
    padding: 80px 0 88px;
  }

  .hero-grid {
    grid-template-columns: 1fr 1.15fr;
  }
}

.hero h1 .accent {
  color: var(--accent-text);
}

.hero .lead {
  margin-bottom: 28px;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 0.85rem;
  font-weight: 600;
}

.pill-ok {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.hero-note {
  margin-top: 16px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* App window frame around screenshots */
.window {
  border-radius: 14px;
  overflow: hidden;
  border: 1px solid var(--border);
  background: #16171d;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.06), 0 24px 60px rgba(17, 37, 89, 0.18);
}

.window-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  height: 30px;
  padding: 0 12px;
  background: #22242c;
  border-bottom: 1px solid #2c2f38;
}

.window-bar span {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: #3a3d48;
}

.window-bar em {
  margin-left: 8px;
  font-style: normal;
  font-size: 0.75rem;
  color: #9aa0ad;
}

/* ---------- Cards / grids ---------- */
.grid {
  display: grid;
  gap: 16px;
}

/* Let grid children shrink so long code or checksums never widen the page. */
.grid > *,
.latest > *,
.version-body > *,
.hero-grid > *,
.creator > *,
.docs > * {
  min-width: 0;
}

@media (min-width: 640px) {
  .grid-2,
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }

  .grid {
    gap: 20px;
  }
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  box-shadow: var(--shadow);
}

.section-alt .card {
  background: var(--bg);
  box-shadow: none;
}

.card h3 {
  margin-bottom: 6px;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent-text);
  margin-bottom: 14px;
}

.icon svg {
  width: 24px;
  height: 24px;
}

.check-list {
  list-style: none;
  padding: 0;
  margin: 0 0 1em;
}

.check-list li {
  position: relative;
  padding-left: 30px;
  margin-bottom: 8px;
}

.check-list li::before {
  content: "";
  position: absolute;
  left: 2px;
  top: 0.35em;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--ok-bg)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b8a4a' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E")
    center / 12px no-repeat;
}

.x-list li::before {
  background: var(--surface-2)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23888f9c' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M7 7l10 10M17 7L7 17'/%3E%3C/svg%3E")
    center / 11px no-repeat;
}

/* ---------- Callouts ---------- */
.callout {
  border-radius: var(--radius-sm);
  padding: 16px 18px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  margin: 0 0 1.2em;
}

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

.callout strong:first-child {
  display: block;
  margin-bottom: 4px;
}

.callout-warn {
  background: var(--warn-bg);
  border-color: var(--warn-border);
  color: var(--warn-text);
}

.callout-warn a {
  color: inherit;
}

.callout-info {
  background: var(--accent-soft);
  border-color: color-mix(in srgb, var(--accent) 30%, transparent);
}

/* ---------- Screenshot gallery ---------- */
.shots {
  display: grid;
  gap: 24px;
}

@media (min-width: 820px) {
  .shots {
    grid-template-columns: repeat(2, 1fr);
  }
}

figure {
  margin: 0;
}

figcaption {
  margin-top: 10px;
  font-size: 0.93rem;
  color: var(--muted);
}

figcaption strong {
  color: var(--text);
}

/* ---------- Tables ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  margin: 0 0 1.4em;
}

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

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

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

th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  background: var(--surface-2);
}

td.yes,
td.no {
  text-align: center;
  font-weight: 700;
  white-space: nowrap;
}

td.yes {
  color: var(--ok-text);
}

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

/* ---------- Docs layout (guide) ---------- */
.docs {
  display: grid;
  gap: 32px;
  padding-bottom: 72px;
}

@media (min-width: 960px) {
  .docs {
    grid-template-columns: 240px 1fr;
    gap: 48px;
  }

  .toc {
    position: sticky;
    top: 88px;
    align-self: start;
    max-height: calc(100vh - 110px);
    overflow-y: auto;
  }
}

.toc {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px 18px;
  font-size: 0.93rem;
}

.toc p {
  font-weight: 700;
  margin-bottom: 6px;
}

.toc ol {
  margin: 0;
  padding-left: 1.3em;
}

.toc li {
  margin: 4px 0;
}

.toc a {
  color: var(--text);
  text-decoration: none;
}

.toc a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.prose {
  min-width: 0;
  max-width: 780px;
}

.prose section {
  padding-top: 8px;
  margin-bottom: 44px;
}

.prose h2 {
  font-size: 1.6rem;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 18px;
}

.prose h3 {
  margin-top: 1.4em;
}

.prose ol,
.prose ul {
  padding-left: 1.4em;
  margin: 0 0 1em;
}

.prose li {
  margin-bottom: 6px;
}

.prose figure {
  margin: 18px 0 24px;
}

/* ---------- FAQ ---------- */
.faq {
  max-width: 820px;
  padding-bottom: 72px;
}

.faq details {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 12px;
}

.faq summary {
  cursor: pointer;
  padding: 16px 48px 16px 18px;
  font-weight: 600;
  list-style: none;
  position: relative;
}

.faq summary::-webkit-details-marker {
  display: none;
}

.faq summary::after {
  content: "+";
  position: absolute;
  right: 18px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--muted);
}

.faq details[open] summary::after {
  content: "\2212";
}

.faq details > div {
  padding: 0 18px 16px;
  color: var(--muted);
}

.faq details > div > :last-child {
  margin-bottom: 0;
}

.faq h2 {
  font-size: 1.3rem;
  margin: 36px 0 14px;
}

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

/* ---------- Downloads ---------- */
.latest {
  display: grid;
  gap: 24px;
}

@media (min-width: 900px) {
  .latest {
    grid-template-columns: 1.2fr 1fr;
    align-items: start;
  }
}

.latest-card {
  border: 2px solid var(--accent);
}

.version-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 6px;
}

.version-head h3 {
  margin: 0;
  font-size: 1.35rem;
}

.badge {
  display: inline-block;
  padding: 2px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  background: var(--surface-2);
  color: var(--muted);
}

.badge-latest {
  background: var(--ok-bg);
  color: var(--ok-text);
}

.dl-buttons {
  display: grid;
  gap: 12px;
  margin: 18px 0 8px;
}

@media (min-width: 560px) {
  .dl-buttons {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  }
}

.dl-buttons .btn {
  justify-content: flex-start;
  min-height: 64px;
}

.recommended {
  outline: 3px solid color-mix(in srgb, var(--accent) 35%, transparent);
  outline-offset: 2px;
}

.agree {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 6px 0 0;
}

.versions {
  display: grid;
  gap: 20px;
}

.version-body {
  display: grid;
  gap: 20px;
}

@media (min-width: 860px) {
  .version-body {
    grid-template-columns: 1fr 1fr;
  }
}

.version-body h4 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 0 0 10px;
}

.file-list {
  display: grid;
  gap: 12px;
}

.file {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 14px;
  background: var(--bg);
}

.file-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.file-name {
  font-weight: 600;
}

.file-meta {
  font-size: 0.86rem;
  color: var(--muted);
  margin: 4px 0 0;
}

.hash {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 8px;
  align-items: center;
  margin-top: 10px;
}

.hash-label {
  flex-basis: 100%;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.hash code {
  flex: 1;
  min-width: 0;
  font-size: 0.74rem;
  padding: 6px 8px;
  word-break: break-all;
}

.status {
  padding: 18px;
  border-radius: var(--radius-sm);
  border: 1px dashed var(--border);
  color: var(--muted);
}

.status.error {
  border-style: solid;
  border-color: var(--warn-border);
  background: var(--warn-bg);
  color: var(--warn-text);
}

/* ---------- Tech stack ---------- */
.stack-grid .card {
  display: flex;
  flex-direction: column;
}

.tag {
  display: inline-block;
  margin-top: auto;
  padding-top: 12px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--accent-text);
}

.flow {
  display: grid;
  gap: 12px;
  margin-bottom: 24px;
  align-items: center;
  text-align: center;
}

@media (min-width: 820px) {
  .flow {
    grid-template-columns: 1fr auto 1fr auto 1fr;
  }
}

.flow-box {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
}

.flow-box strong {
  display: block;
  font-size: 1.05rem;
}

.flow-box span {
  font-size: 0.9rem;
  color: var(--muted);
}

.flow-arrow {
  color: var(--muted);
  font-size: 1.5rem;
  line-height: 1;
}

@media (max-width: 819px) {
  .flow-arrow {
    transform: rotate(90deg);
  }
}

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #2f7cf6, #1747b8);
  color: #ffffff;
  border-radius: 20px;
  padding: 40px 24px;
  text-align: center;
}

.cta-band h2 {
  color: #ffffff;
}

.cta-band p {
  color: rgba(255, 255, 255, 0.88);
  max-width: 600px;
  margin: 0 auto 24px;
}

.cta-band .btn {
  background: #ffffff;
  color: #1747b8;
  border-color: #ffffff;
}

.cta-band .btn:hover {
  background: #eef3ff;
}

.cta-band .btn-ghost {
  background: transparent;
  color: #ffffff;
  border-color: rgba(255, 255, 255, 0.55);
}

.cta-band .btn-ghost:hover {
  background: rgba(255, 255, 255, 0.12);
}

.cta-band .btn-stack {
  justify-content: center;
}

/* ---------- Creator ---------- */
.creator {
  display: grid;
  gap: 24px;
  align-items: center;
}

@media (min-width: 820px) {
  .creator {
    grid-template-columns: 1.3fr 1fr;
  }
}

/* ---------- Footer ---------- */
.site-footer {
  border-top: 1px solid var(--border);
  background: var(--surface);
  padding: 40px 0 28px;
  font-size: 0.93rem;
}

.footer-grid {
  display: grid;
  gap: 28px;
}

@media (min-width: 820px) {
  .footer-grid {
    grid-template-columns: 1.6fr 1fr 1fr;
  }
}

.site-footer h2 {
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin-bottom: 10px;
}

.site-footer ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-footer li {
  margin-bottom: 6px;
}

.site-footer a {
  color: var(--text);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--accent-text);
  text-decoration: underline;
}

.disclaimer {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.86rem;
}

.disclaimer p {
  margin-bottom: 6px;
}

/* ---------- 404 ---------- */
.not-found {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 64px 16px;
}

.not-found .big {
  font-size: 5rem;
  font-weight: 800;
  color: var(--accent-text);
  line-height: 1;
  margin-bottom: 12px;
}

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

  * {
    transition: none !important;
  }
}
