/* ============================================================================
   GRIINWARE — Terms and Conditions
   Static, readable legal document styling.
   Intentionally NO hover states, transitions, or animation of any kind.
============================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap");

:root {
  --navy-900: #0b1e3a;
  --navy-800: #0f2a4d;
  --teal-700: #0d7d72;
  --teal-600: #0d9488;
  --teal-100: #eaf7f5;
  --ink: #1c2530;
  --ink-mid: #3d4a5c;
  --ink-muted: #64748b;
  --border: #e2e8f0;
  --border-strong: #cbd5e1;
  --bg: #ffffff;
  --bg-alt: #f7f9fb;
  --amber-bg: #fff8e8;
  --amber-border: #f0d9a6;
  --amber-text: #7a5b06;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

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

body {
  font-family: "Inter", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg-alt);
  line-height: 1.7;
  font-size: 16px;
}

a { color: var(--teal-700); text-decoration: underline; text-underline-offset: 2px; }

/* ── Page shell ─────────────────────────────────────────────────────────── */
.page {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 24px 60px;
}

/* ── Top banner ─────────────────────────────────────────────────────────── */
.doc-banner {
  background: var(--navy-900);
  color: #fff;
  padding: 34px 24px;
  margin-bottom: 0;
}
.doc-banner-inner { max-width: 1180px; margin: 0 auto; padding: 0; }
.doc-banner .brand { display: flex; align-items: center; gap: 10px; margin-bottom: 18px; font-weight: 800; font-size: 0.95rem; letter-spacing: 0.01em; }
.doc-banner .brand .mark {
  width: 30px; height: 30px; border-radius: 8px;
  background: var(--teal-600);
  display: flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 800;
}
.doc-banner h1 { font-size: 1.9rem; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 8px; }
.doc-banner .meta { font-size: 0.88rem; color: rgba(255,255,255,0.75); }
.doc-banner .meta strong { color: #fff; }

/* ── Layout: static side ToC + content ────────────────────────────────────── */
.doc-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 44px;
  margin-top: 40px;
  align-items: start;
}

.toc {
  position: sticky;
  top: 24px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 20px 22px;
}
.toc h2 {
  font-size: 0.72rem; font-weight: 800; text-transform: uppercase; letter-spacing: 0.06em;
  color: var(--ink-muted); margin-bottom: 12px;
}
.toc ol { list-style: none; counter-reset: toc; display: flex; flex-direction: column; gap: 2px; }
.toc li { counter-increment: toc; }
.toc a {
  display: block;
  font-size: 0.85rem; font-weight: 500; color: var(--ink-mid);
  text-decoration: none;
  padding: 6px 8px;
  border-radius: 6px;
}
.toc a::before {
  content: counter(toc) ". ";
  color: var(--ink-muted);
  font-weight: 700;
}

/* ── Main document content ─────────────────────────────────────────────── */
.doc-content {
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 44px 48px 52px;
}

/* Plain-language summary box */
.summary-box {
  background: var(--teal-100);
  border: 1px solid #bfe6e1;
  border-radius: 12px;
  padding: 22px 26px;
  margin-bottom: 36px;
}
.summary-box h2 {
  font-size: 1rem; font-weight: 800; color: var(--teal-700);
  text-transform: uppercase; letter-spacing: 0.04em;
  margin-bottom: 6px;
}
.summary-box .subhead { font-size: 0.82rem; color: var(--ink-mid); margin-bottom: 16px; }
.summary-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 28px; }
.summary-item { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; }
.summary-item .ico { flex-shrink: 0; width: 20px; text-align: center; font-weight: 800; color: var(--teal-700); }
.summary-item p { color: var(--ink-mid); }
.summary-item strong { color: var(--ink); }
.summary-note {
  margin-top: 16px; padding-top: 14px; border-top: 1px solid #bfe6e1;
  font-size: 0.8rem; color: var(--ink-mid); font-style: italic;
}

/* Section structure */
section.doc-section { margin-bottom: 40px; scroll-margin-top: 20px; }
section.doc-section:last-of-type { margin-bottom: 0; }

.doc-section h2 {
  font-size: 1.2rem;
  font-weight: 800;
  color: var(--navy-900);
  border-bottom: 2px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.doc-section h2 .num { color: var(--teal-700); margin-right: 8px; }

.doc-section h3 {
  font-size: 1rem;
  font-weight: 700;
  color: var(--ink);
  margin: 22px 0 8px;
}

.doc-section p { margin-bottom: 12px; color: var(--ink-mid); }
.doc-section p strong, .doc-section li strong { color: var(--ink); }

.doc-section ul, .doc-section ol.plain {
  margin: 0 0 12px 0;
  padding-left: 22px;
  color: var(--ink-mid);
}
.doc-section li { margin-bottom: 8px; }

.doc-section dl { margin-bottom: 12px; }
.doc-section dt { font-weight: 700; color: var(--ink); margin-top: 10px; }
.doc-section dd { margin: 2px 0 0 0; color: var(--ink-mid); }

/* Callout boxes used inline within sections */
.callout {
  border-left: 3px solid var(--teal-600);
  background: var(--bg-alt);
  padding: 14px 18px;
  border-radius: 0 8px 8px 0;
  margin: 14px 0;
  font-size: 0.92rem;
  color: var(--ink-mid);
}
.callout strong { color: var(--ink); }

.callout.warning {
  border-left-color: #c98a06;
  background: var(--amber-bg);
}
.callout.warning strong { color: var(--amber-text); }

.callout-title {
  display: block;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--teal-700);
  margin-bottom: 6px;
}
.callout.warning .callout-title { color: var(--amber-text); }

/* Responsibility split table (You vs GRIINWARE) */
.resp-table {
  width: 100%;
  border-collapse: collapse;
  margin: 16px 0 18px;
  font-size: 0.88rem;
}
.resp-table th, .resp-table td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
  vertical-align: top;
}
.resp-table th {
  background: var(--bg-alt);
  font-weight: 700;
  color: var(--navy-900);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.resp-table td { color: var(--ink-mid); }

/* Reference list for laws / sources */
.ref-list { list-style: none; padding: 0; }
.ref-list li {
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.ref-list li:last-child { border-bottom: none; }
.ref-list .law-name { font-weight: 700; color: var(--ink); display: block; margin-bottom: 3px; }
.ref-list .law-note { font-size: 0.85rem; color: var(--ink-muted); }

address { font-style: normal; color: var(--ink-mid); }

/* Footer */
.doc-footer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--ink-muted);
  text-align: center;
}

/* Back-to-top plain link block (static, no motion) */
.back-top { text-align: right; margin-top: 10px; }
.back-top a { font-size: 0.8rem; }

/* ── Responsive ───────────────────────────────────────────────────────── */
@media (max-width: 900px) {
  .doc-layout { grid-template-columns: 1fr; }
  .toc { position: static; }
  .doc-content { padding: 30px 22px 36px; }
  .summary-grid { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .doc-banner h1 { font-size: 1.5rem; }
  .doc-content { padding: 24px 16px 30px; }
  .resp-table { font-size: 0.8rem; }
}

/* ── Print ────────────────────────────────────────────────────────────── */
@media print {
  body { background: #fff; }
  .toc, .doc-banner .brand, .back-top { display: none; }
  .doc-layout { grid-template-columns: 1fr; }
  .doc-content { border: none; padding: 0; }
  .doc-banner { background: #fff; color: #000; padding: 0 0 20px; }
  .doc-banner .meta { color: #333; }
}