/* /css/terms.css */
/* Palette (same as your base) */
:root{
  --primary:#2E8B57;
  --primary-dark:#1E6140;
  --secondary:#F4EBD0;
  --highlight:#FFD700;
  --text-dark:#2F2F2F;
  --text-light:#7A7A7A;
  --bg:#F9F9F2;
  --white:#ffffff;
  --border:#E0E0D1;
  --shadow:rgba(0,0,0,0.06);
  --radius:14px;

  --maxw: 980px;
  --pad: 20px;
  --lead: 1.65;
}

/* Reset-ish */
*{ box-sizing:border-box; }
html, body{ height:100%; }
html{ scroll-behavior:smooth; }
body{
  margin:0;
  background:var(--bg);
  color:var(--text-dark);
  font:16px/var(--lead) system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,"Helvetica Neue",Arial,"Noto Sans","Apple Color Emoji","Segoe UI Emoji";
}

/* Page wrap */
.wrap{
  max-width:var(--maxw);
  margin:0 auto;
  margin-bottom: 20px;
  padding:0 var(--pad);
}

/* Hero */
.hero{
  margin:16px 0 18px;
  background:linear-gradient(180deg, rgba(46,139,87,0.07), rgba(46,139,87,0.02));
  border:1.5px solid var(--border);
  border-radius:calc(var(--radius) + 4px);
  padding: clamp(16px, 3vw, 24px);
  display:grid;
  grid-template-columns:1fr auto;
  gap:16px;
  align-items:end;
  box-shadow:0 10px 24px var(--shadow);
}
.hero h1{
  margin:0 0 6px 0;
  font-size:clamp(1.4rem, 3.4vw, 2rem);
}
.hero p{
  margin:0; color:var(--text-light); font-size:.98rem;
}
.hero .actions{
  display:flex; gap:10px; flex-wrap:wrap; justify-content:flex-end; align-items:center;
}

.lastacttitle {
  font-weight: bold;
}

/* Buttons */
.button, .button-secondary{
  --py:10px; --px:14px;
  appearance:none;
  border-radius:999px;
  padding:var(--py) var(--px);
  font-weight:700;
  cursor:pointer;
  transition: transform .05s ease, box-shadow .2s ease, background .2s ease, color .2s ease, border-color .2s ease;
  display:inline-flex; align-items:center; gap:8px;
  text-decoration:none;
  font-size:.95rem;
}
.button{
  background:var(--primary);
  color:#fff;
  border:2px solid var(--primary-dark);
  box-shadow:0 6px 16px rgba(46,139,87,.18);
}
.button:hover{ background:var(--primary-dark); transform:translateY(-1px); }
.button:active{ transform:translateY(0); }
.button-secondary{
  background:#f8fafc; color:var(--text-dark); border:2px solid #e2e8f0;
}
.button-secondary:hover{ background:#fff; border-color:var(--primary-dark); color:var(--primary-dark); }

/* Layout: optional two-column with sticky TOC */
.terms-layout{
  display:grid;
  grid-template-columns: 260px 1fr;
  gap:20px;
  align-items:start;
  margin-bottom:48px;
}
@media (max-width: 920px){
  .terms-layout{ grid-template-columns:1fr; }
}

/* TOC (optional). Put your list into <nav class="toc"> */
.toc{
  position:sticky;
  top:16px;
  background:var(--white);
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  padding:12px 12px;
  box-shadow:0 10px 20px var(--shadow);
}
.toc h3{
  margin:4px 8px 8px; font-size:1rem; color:var(--primary-dark);
}
.toc ul{
  list-style:none; margin:0; padding:0;
}
.toc li{
  margin:2px 0;
}
.toc a{
  display:block;
  padding:8px 10px;
  border-radius:10px;
  text-decoration:none;
  color:var(--text-dark);
  border:1px solid transparent;
  font-size:.95rem;
}
.toc a:hover{ background:#fffef5; border-color:var(--border); color:var(--primary-dark); }

/* Main doc */
.doc{
  background:var(--white);
  border:1.5px solid var(--border);
  border-radius:var(--radius);
  padding: clamp(18px, 3.2vw, 28px);
  box-shadow:0 12px 24px var(--shadow);
}

/* Section numbering for h2/h3 */
.doc{ counter-reset: sec; }
.doc h2{
  counter-increment: sec;
  position:relative;
  margin:26px 0 10px;
  font-size:clamp(1.1rem, 2.6vw, 1.4rem);
  line-height:1.3;
}
.doc h2:first-child{ margin-top:4px; }
.doc h2::before{
  content: counter(sec) ". ";
  color:var(--primary-dark);
  font-weight:800;
  margin-right:6px;
}
.doc h3{
  margin:18px 0 8px;
  font-size:1.05rem;
  color:#274b39;
}

.doc p{ margin:10px 0; }
.doc ul, .doc ol{ margin:10px 0 10px 22px; }
.doc li{ margin:6px 0; }

/* Legal list with custom bullets */
.legal-list{
  list-style:none; margin:10px 0 10px 0; padding:0;
}
.legal-list li{
  position:relative; padding-left:26px; margin:8px 0;
}
.legal-list li::before{
  content:"•";
  position:absolute; left:8px; top:0;
  color:var(--primary); font-weight:900;
}

/* Definition list (good for term → explanation blocks) */
dl.def-list{ margin:12px 0; }
.def-list dt{
  font-weight:700; color:var(--primary-dark); margin-top:10px;
}
.def-list dd{
  margin:6px 0 12px 0; color:var(--text-dark);
}

/* Callouts */
.notice{
  border:1px solid var(--border);
  border-radius:12px;
  padding:12px 14px;
  margin:14px 0;
  box-shadow:0 6px 12px var(--shadow);
  background:#fffefa;
}
.notice.info{ background:#f2fff4; border-color:#d7f3dc; color:#205e2b; }
.notice.warn{ background:#fffceb; border-color:#ffe39c; color:#5a4a00; }
.notice.danger{ background:#fff5f5; border-color:#ffd0d0; color:#822; }

/* Small badge (e.g., “Updated”) */
.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  font-size:12px;
  border:1px solid var(--border);
  background:#fffef5;
  color:#7b6a00;
}

/* Links */
a{ color:var(--primary-dark); }
a:hover{ color:var(--primary); }

/* Inline code / pre */
code, kbd{
  font-family: ui-monospace,SFMono-Regular,Menlo,Consolas,"Liberation Mono",monospace;
  background:#faf7e7;
  border:1px solid #efe7bf;
  border-radius:8px;
  padding:1px 6px;
  font-size:.92em;
}
pre{
  background:#faf7e7;
  border:1px solid #efe7bf;
  border-radius:12px;
  padding:14px;
  overflow:auto;
}

/* Details (FAQ-like clauses) */
details{
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  padding:10px 12px;
  margin:12px 0;
}
details[open]{ background:#fffeef; }
summary{
  cursor:pointer; font-weight:700; color:var(--primary-dark);
}

/* Footnotes / small print */
.smallprint{ color:var(--text-light); font-size:.9rem; }

/* Focus styles */
a:focus-visible,
.button:focus-visible,
.button-secondary:focus-visible{
  outline:2px solid var(--highlight);
  outline-offset:3px;
  border-radius:10px;
}

/* Print */
@media print{
  :root{ --bg:#fff; }
  body{ background:#fff; color:#000; }
  .hero{ box-shadow:none; border:0; background:#fff; }
  .button, .button-secondary, .toc{ display:none !important; }
  a{ color:#000; text-decoration:underline; }
}

/* Helpers */
.hr{
  height:1px; background:var(--border); border:0; margin:18px 0;
}
.updated-badge{
  background:#fff8d1; border:1px solid #ffe58b; color:#5a4a00;
  padding:4px 8px; border-radius:999px; font-size:12px;
}
