/* BiteIt — shared site styles.
   The visual idea comes from the app icon: an apple filled to a level. Every
   meter on the site fills the same way, with the same wave at the crest. */

:root {
  --ground:   #FBF7F0;   /* brand cream, same value as the adaptive icon bg */
  --paper:    #FFFDF9;
  --sunk:     #F4EEE4;
  --ink:      #101A15;   /* near-black, biased green so it sits with the brand */
  --sub:      #4A5A52;
  --faint:    #7E8C85;
  --line:     rgba(16, 26, 21, .13);
  --hair:     rgba(16, 26, 21, .07);
  --brand:    #0E7C5A;
  --brand-in: #FBF7F0;   /* text on brand */
  --brand-sk: rgba(14, 124, 90, .10);
  --over:     #C2452D;   /* logged above target — same role as the app's red */
  --shadow:   0 1px 2px rgba(16,26,21,.04), 0 8px 24px -12px rgba(16,26,21,.16);
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground:   #0B120F;
    --paper:    #131C17;
    --sunk:     #0F1713;
    --ink:      #ECEAE2;
    --sub:      #A3B0A8;
    --faint:    #7A877F;
    --line:     rgba(236, 234, 226, .14);
    --hair:     rgba(236, 234, 226, .07);
    --brand:    #4FBE91;
    --brand-in: #06110C;
    --brand-sk: rgba(79, 190, 145, .13);
    --over:     #F0876E;
    --shadow:   0 1px 2px rgba(0,0,0,.3), 0 8px 24px -12px rgba(0,0,0,.6);
  }
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font-family: "Hind Siliguri", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--brand); color: var(--brand-in); }

a { color: var(--brand); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:focus-visible, button:focus-visible {
  outline: 2px solid var(--brand); outline-offset: 3px; border-radius: 4px;
}

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

/* ---------- shell ---------- */

.wrap { width: 100%; max-width: 1080px; margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 680px; }

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

.display {
  font-family: "Tiro Bangla", Georgia, "Times New Roman", serif;
  font-weight: 400;
  letter-spacing: -.015em;
  line-height: 1.18;
  text-wrap: balance;
}

.eyebrow {
  font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 12px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--faint);
  margin: 0;
}

.mono { font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace; font-variant-numeric: tabular-nums; }

.bn { font-family: "Hind Siliguri", sans-serif; }

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

.site-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding: 22px 0; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); }
.brand img { width: 34px; height: 34px; border-radius: 9px; }
.brand b {
  font-family: "Tiro Bangla", Georgia, serif; font-weight: 400;
  font-size: 22px; letter-spacing: -.01em;
}
.site-nav { display: flex; gap: 22px; align-items: center; font-size: 15px; }
.site-nav a { color: var(--sub); text-decoration: none; }
.site-nav a:hover { color: var(--ink); }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 22px; border-radius: 999px; font-size: 16px; font-weight: 600;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .12s ease, background .12s ease, border-color .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: var(--brand-in); }
.btn-primary:hover { filter: brightness(1.06); }
.btn-ghost { border-color: var(--line); color: var(--ink); background: transparent; }
.btn-ghost:hover { border-color: var(--brand); color: var(--brand); }
.btn-soft { background: var(--brand-sk); color: var(--brand); border-color: transparent; cursor: default; }
.btn-soft:active { transform: none; }

/* ---------- the fill meter (the icon's idea, reused) ---------- */

.meter { position: relative; background: var(--sunk); border-radius: 6px; overflow: hidden; }
.meter-fill { position: absolute; left: 0; bottom: 0; width: 100%; background: var(--brand); }
.meter-fill::before {
  content: ""; position: absolute; left: 0; bottom: 100%; width: 100%; height: 6px;
  background: var(--brand);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6' viewBox='0 0 24 6'%3E%3Cpath d='M0 3.2 Q6 -.4 12 3.2 T24 3.2 V6 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x left top / 24px 6px;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='24' height='6' viewBox='0 0 24 6'%3E%3Cpath d='M0 3.2 Q6 -.4 12 3.2 T24 3.2 V6 H0 Z' fill='%23000'/%3E%3C/svg%3E") repeat-x left top / 24px 6px;
}

/* ---------- document pages ---------- */

.doc { padding: 8px 0 96px; }
.doc h1 { font-family: "Tiro Bangla", Georgia, serif; font-weight: 400; font-size: clamp(34px, 6vw, 46px); letter-spacing: -.02em; margin: 26px 0 8px; line-height: 1.15; }
.doc h2 { font-size: 21px; font-weight: 600; letter-spacing: -.01em; margin: 44px 0 10px; }
.doc h3 { font-size: 17px; font-weight: 600; margin: 26px 0 6px; }
.doc p, .doc li { color: var(--sub); }
.doc strong { color: var(--ink); font-weight: 600; }
.doc ul, .doc ol { padding-left: 22px; }
.doc li { margin: 7px 0; }
.doc .meta { color: var(--faint); font-size: 14px; margin: 0 0 34px; }
.doc hr { border: 0; border-top: 1px solid var(--hair); margin: 44px 0; }

.callout {
  background: var(--paper); border: 1px solid var(--line); border-left: 3px solid var(--brand);
  border-radius: 4px 14px 14px 4px; padding: 18px 22px; margin: 22px 0;
}
.callout p:first-child { margin-top: 0; }
.callout p:last-child { margin-bottom: 0; }

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 15.5px; }
th, td { text-align: left; padding: 11px 10px; border-bottom: 1px solid var(--hair); vertical-align: top; }
th { color: var(--ink); font-weight: 600; font-size: 13px; letter-spacing: .04em; text-transform: uppercase; }
td { color: var(--sub); }
.table-scroll { overflow-x: auto; }

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

.site-foot { border-top: 1px solid var(--hair); padding: 40px 0 56px; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 28px 56px; justify-content: space-between; }
.foot-col h4 { font-family: "IBM Plex Mono", monospace; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--faint); font-weight: 500; margin: 0 0 12px; }
.foot-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.foot-col a { color: var(--sub); text-decoration: none; font-size: 15px; }
.foot-col a:hover { color: var(--brand); }
.foot-note { margin-top: 34px; padding-top: 22px; border-top: 1px solid var(--hair); color: var(--faint); font-size: 14px; display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
