/*
 * G Labs legal site — shared styling.
 *
 * Mirrors the Kasira POS palette (tailwind.config.js in the app repo): the "Pandan"
 * green family for accents and "Kertas", a warm receipt-paper off-white, as the page
 * ground. Reused by every app's policy page, so keep it app-neutral.
 */

:root {
  --brand: #047857;        /* Pandan — primary */
  --brand-600: #059669;
  --brand-soft: #ecfdf5;
  --ground: #fafaf9;       /* Kertas */
  --card: #ffffff;
  --text: #171717;
  --text-muted: #525252;
  --text-faint: #737373;
  --rule: #e5e5e5;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --brand: #34d399;
    --brand-600: #6ee7b7;
    --brand-soft: #052e21;
    --ground: #0a0a0a;
    --card: #18181b;
    --text: #f5f5f5;
    --text-muted: #a3a3a3;
    --text-faint: #8a8a8a;
    --rule: #2e2e32;
  }
}

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

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue",
    Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  /* Legal text is read start-to-finish; don't let it hyphenate into soup. */
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 44rem;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

/* ---------- header ---------- */

.masthead {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding-bottom: 1.5rem;
  margin-bottom: 2rem;
  border-bottom: 1px solid var(--rule);
}

.mark {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 10px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: -0.02em;
  flex: none;
}

@media (prefers-color-scheme: dark) {
  .mark {
    color: #052e21;
  }
}

.masthead-name {
  font-weight: 650;
  letter-spacing: -0.01em;
}

.masthead-sub {
  color: var(--text-faint);
  font-size: 0.875rem;
}

/* ---------- type ---------- */

h1 {
  font-size: clamp(1.75rem, 5vw, 2.25rem);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin: 0 0 0.5rem;
}

h2 {
  font-size: 1.2rem;
  line-height: 1.35;
  letter-spacing: -0.01em;
  margin: 2.75rem 0 0.75rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
}

h2:first-of-type {
  border-top: 0;
  padding-top: 0;
}

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

p {
  margin: 0 0 1rem;
}

a {
  color: var(--brand);
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--brand-600);
}

strong {
  font-weight: 650;
}

.updated {
  color: var(--text-faint);
  font-size: 0.875rem;
  margin-bottom: 2rem;
}

/* The one-sentence summary that matters most to a reader (and a reviewer). */
.lede {
  background: var(--brand-soft);
  border-left: 3px solid var(--brand);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.125rem;
  margin: 0 0 2rem;
}

.lede p:last-child {
  margin-bottom: 0;
}

ul {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

li {
  margin-bottom: 0.5rem;
}

li::marker {
  color: var(--brand);
}

blockquote {
  margin: 1.25rem 0;
  padding: 0.75rem 1rem;
  border-left: 3px solid var(--rule);
  color: var(--text-muted);
  font-size: 0.9375rem;
}

/* ---------- tables ---------- */

/* Wide permission tables must scroll inside their own box, never the page body. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  background: var(--card);
}

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

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

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

thead th {
  font-weight: 650;
  font-size: 0.8125rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-faint);
  white-space: nowrap;
}

tbody th {
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- hub page app list ---------- */

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

.apps li {
  margin: 0;
}

.app-card {
  display: block;
  padding: 1.125rem 1.25rem;
  background: var(--card);
  border: 1px solid var(--rule);
  border-radius: var(--radius);
  text-decoration: none;
  color: inherit;
}

.app-card:hover {
  border-color: var(--brand);
  color: inherit;
}

.app-card-name {
  font-weight: 650;
  letter-spacing: -0.01em;
  margin-bottom: 0.125rem;
}

.app-card-desc {
  color: var(--text-muted);
  font-size: 0.9375rem;
}

.app-card-links {
  color: var(--brand);
  font-size: 0.875rem;
  margin-top: 0.5rem;
}

/* ---------- footer ---------- */

.foot {
  margin-top: 3.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  color: var(--text-faint);
  font-size: 0.875rem;
}

.foot a {
  color: var(--text-muted);
}
