/* SIA — shared styles for the public legal pages.
   Tokens mirror lib/flutter_flow/sia/tokens/sia_colors.dart so the web pages
   and the app read as one product. */

:root {
  --green:        #1D7734;
  --green-dark:   #14582A;
  --green-deep:   #0F3F1E;
  --yellow:       #FFC300;
  --yellow-soft:  #FFF9E0;
  --bg:           #FAFAF9;
  --surface:      #FFFFFF;
  --text1:        #1C1917;
  --text2:        #57534E;  /* stone-600: 7.4:1 on --bg, unlike the app's
                               stone-500 which only clears 4.6:1 and is used
                               there at larger sizes */
  --border:       #E7E5E4;
  --danger:       #991B1B;

  --measure: 68ch;
  --radius: 10px;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text1);
  font-family: ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  text-rendering: optimizeLegibility;
}

/* ---------- masthead ---------- */

.masthead {
  background: var(--green);
  color: #fff;
  padding: 2.5rem 1.5rem 2.75rem;
}
.masthead__inner { max-width: var(--measure); margin: 0 auto; }

.brand {
  display: inline-flex; align-items: baseline; gap: .5rem;
  font-weight: 800; letter-spacing: -0.02em; font-size: 1.375rem;
  color: #fff; text-decoration: none;
}
.brand span { color: var(--yellow); }

.masthead h1 {
  margin: 1.75rem 0 .5rem;
  font-size: clamp(1.875rem, 5vw, 2.75rem);
  line-height: 1.1;
  letter-spacing: -0.03em;
  font-weight: 800;
  text-wrap: balance;
}
.masthead p {
  margin: 0;
  color: #D9F0DF;   /* tinted from the green, not gray */
  font-size: 1.0625rem;
}

.meta {
  margin-top: 1.5rem; padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.22);
  display: flex; flex-wrap: wrap; gap: .375rem 1.75rem;
  font-size: .9375rem; color: #D9F0DF;
}
.meta b { color: #fff; font-weight: 600; }

.langswitch {
  display: inline-block; margin-top: 1.25rem;
  color: #fff; text-decoration: none;
  border: 1px solid rgba(255,255,255,.45);
  border-radius: 999px; padding: .3rem .85rem;
  font-size: .875rem; font-weight: 600;
  transition: background .18s cubic-bezier(.2,.7,.3,1), border-color .18s;
}
.langswitch:hover, .langswitch:focus-visible { background: rgba(255,255,255,.14); border-color: #fff; }

/* ---------- body ---------- */

main { max-width: var(--measure); margin: 0 auto; padding: 2.5rem 1.5rem 4rem; }

h2 {
  margin: 3rem 0 .75rem;
  font-size: 1.375rem; line-height: 1.25; letter-spacing: -0.02em; font-weight: 700;
  scroll-margin-top: 1.5rem;
  text-wrap: balance;
}
h2:first-of-type { margin-top: 0; }
h3 { margin: 2rem 0 .5rem; font-size: 1.0625rem; font-weight: 700; }
p, li { max-width: var(--measure); }
p { margin: 0 0 1rem; }
ul, ol { margin: 0 0 1rem; padding-left: 1.25rem; }
li { margin-bottom: .4rem; }
a { color: var(--green-dark); text-underline-offset: 2px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 3px; }

/* ---------- table of contents ---------- */

.toc { margin: 0 0 2.5rem; padding: 0; list-style: none; counter-reset: toc; }
.toc li { margin: 0; border-bottom: 1px solid var(--border); }
.toc li:first-child { border-top: 1px solid var(--border); }
.toc a {
  display: flex; gap: .875rem; align-items: baseline;
  padding: .6rem .25rem; text-decoration: none; color: var(--text1);
}
.toc a::before {
  counter-increment: toc; content: counter(toc, decimal-leading-zero);
  color: var(--text2); font-variant-numeric: tabular-nums; font-size: .8125rem;
  font-weight: 600; min-width: 1.75ch;
}
.toc a:hover { color: var(--green-dark); }
.toc a:hover::before { color: var(--green); }

/* ---------- data inventory table ---------- */

.data { width: 100%; border-collapse: collapse; margin: 1rem 0 1.5rem; font-size: .9375rem; }
.data caption { text-align: left; color: var(--text2); font-size: .875rem; padding-bottom: .625rem; }
.data th, .data td { text-align: left; vertical-align: top; padding: .7rem .875rem; border-bottom: 1px solid var(--border); }
.data thead th { background: var(--green); color: #fff; font-weight: 600; font-size: .8125rem; letter-spacing: .02em; text-transform: uppercase; }
.data tbody tr:nth-child(even) { background: #fff; }
.data td:first-child { font-weight: 600; }

/* ---------- callout ---------- */

.note {
  background: var(--yellow-soft);
  border: 1px solid #F3E3A8;
  border-radius: var(--radius);
  padding: 1rem 1.125rem;
  margin: 1.5rem 0;
}
.note p:last-child { margin-bottom: 0; }
.note--danger { background: #FEF2F2; border-color: #FCA5A5; }

/* A value the operator must replace before publishing. Deliberately loud. */
.todo {
  background: #FEF2F2; color: var(--danger);
  border: 1px dashed var(--danger); border-radius: 4px;
  padding: 0 .35rem; font-weight: 700; font-size: .9em; white-space: nowrap;
}

/* ---------- steps ---------- */

.steps { counter-reset: step; list-style: none; padding: 0; margin: 1.25rem 0 1.5rem; }
.steps > li {
  counter-increment: step; position: relative;
  padding: 0 0 1.25rem 2.75rem; margin: 0;
  border-left: 1px solid var(--border); margin-left: .875rem;
}
.steps > li:last-child { border-left-color: transparent; padding-bottom: 0; }
.steps > li::before {
  content: counter(step); position: absolute; left: -.875rem; top: 0;
  width: 1.75rem; height: 1.75rem; border-radius: 50%;
  background: var(--green); color: #fff;
  display: grid; place-items: center;
  font-size: .875rem; font-weight: 700;
}

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

footer {
  border-top: 1px solid var(--border);
  padding: 2rem 1.5rem 3rem;
  color: var(--text2); font-size: .9375rem;
}
footer .inner { max-width: var(--measure); margin: 0 auto; }
footer a { color: var(--green-dark); }

@media (max-width: 34rem) {
  body { font-size: 16px; }
  .masthead { padding: 2rem 1.25rem 2.25rem; }
  main { padding: 2rem 1.25rem 3rem; }
  /* Let the inventory table scroll rather than crush the columns. */
  .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .data { min-width: 34rem; }
}
