/* Sadhana — public site.
 *
 * The palette is lifted from `lib/core/theme/tokens/app_palette.dart` so the
 * pages a store reviewer opens look like the app they were opened from. Warm
 * neutrals, an earthy saffron accent, and nothing that needs a network request:
 * no webfont, no CDN, no analytics. A privacy policy that phones a third party
 * to render itself is not a privacy policy.
 */

:root {
  --background: #faf7f2;
  --surface: #fffdfa;
  --surface-variant: #f2ede5;
  --primary: #b85a0e;
  --accent: #d4600a;
  --heading: #4e2412;
  --text-primary: #241f1b;
  --text-secondary: #6b615a;
  --text-tertiary: #8e837a;
  --divider: #e5dcd1;
  --outline: #cfc3b5;

  --measure: 42rem;
  --radius: 14px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --background: #14110f;
    --surface: #1d1917;
    --surface-variant: #272220;
    --primary: #e2a75c;
    --accent: #e2a75c;
    --heading: #f7dfc2;
    --text-primary: #f2eae0;
    --text-secondary: #b3a79b;
    --text-tertiary: #8c8178;
    --divider: #332c28;
    --outline: #4a423c;
  }
}

* {
  box-sizing: border-box;
}

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

body {
  margin: 0;
  padding: 0;
  background: var(--background);
  color: var(--text-primary);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* --- Layout ------------------------------------------------------------- */

.wrap {
  max-width: var(--measure);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.masthead {
  border-bottom: 1px solid var(--divider);
  background: var(--surface);
}

.masthead .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding-top: 1rem;
  padding-bottom: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--heading);
  text-decoration: none;
  letter-spacing: 0.01em;
}

.brand .mark {
  width: 1.6rem;
  height: 1.6rem;
  flex: none;
}

nav.top {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  font-size: 0.92rem;
}

nav.top a {
  color: var(--text-secondary);
  text-decoration: none;
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
}

nav.top a:hover {
  color: var(--text-primary);
}

nav.top a[aria-current="page"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

main {
  padding: 2.5rem 0 3.5rem;
}

/* --- Type --------------------------------------------------------------- */

h1 {
  font-size: 2rem;
  line-height: 1.2;
  margin: 0 0 0.35rem;
  color: var(--heading);
  letter-spacing: -0.01em;
}

h2 {
  font-size: 1.2rem;
  margin: 2.4rem 0 0.6rem;
  color: var(--heading);
  scroll-margin-top: 1rem;
}

h3 {
  font-size: 1rem;
  margin: 1.6rem 0 0.4rem;
  color: var(--text-primary);
}

p {
  margin: 0 0 1rem;
}

.lede {
  font-size: 1.12rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}

.updated {
  font-size: 0.85rem;
  color: var(--text-tertiary);
  margin: 0 0 2rem;
}

ul,
ol {
  margin: 0 0 1rem;
  padding-left: 1.3rem;
}

li {
  margin-bottom: 0.45rem;
}

strong {
  color: var(--text-primary);
  font-weight: 600;
}

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

a:hover {
  color: var(--primary);
}

hr {
  border: 0;
  border-top: 1px solid var(--divider);
  margin: 2.5rem 0;
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.9em;
  background: var(--surface-variant);
  padding: 0.1em 0.35em;
  border-radius: 5px;
}

/* --- Blocks ------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--divider);
  border-radius: var(--radius);
  padding: 1.25rem 1.4rem;
  margin: 0 0 1.25rem;
}

.card h3 {
  margin-top: 0;
}

.card p:last-child,
.card ul:last-child {
  margin-bottom: 0;
}

.callout {
  background: var(--surface-variant);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 1rem 1.2rem;
  margin: 0 0 1.75rem;
  color: var(--text-secondary);
}

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

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr));
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.grid .card {
  margin: 0;
}

.contact {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  padding: 0.7rem 1.3rem;
  border-radius: 999px;
}

@media (prefers-color-scheme: dark) {
  .contact {
    color: #2a1b0c;
  }
}

.contact:hover {
  opacity: 0.92;
  color: #fff;
}

@media (prefers-color-scheme: dark) {
  .contact:hover {
    color: #2a1b0c;
  }
}

/* A table wide enough to need it scrolls inside its own box rather than
   pushing the page sideways on a phone. */
.table-scroll {
  overflow-x: auto;
  margin: 0 0 1.25rem;
  border: 1px solid var(--divider);
  border-radius: var(--radius);
}

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

th,
td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--divider);
  vertical-align: top;
}

th {
  background: var(--surface-variant);
  color: var(--text-secondary);
  font-weight: 600;
  white-space: nowrap;
}

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

/* --- Foot --------------------------------------------------------------- */

footer {
  border-top: 1px solid var(--divider);
  background: var(--surface);
  padding: 1.75rem 0;
  font-size: 0.88rem;
  color: var(--text-tertiary);
}

footer nav {
  display: flex;
  gap: 1.1rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

footer a {
  color: var(--text-secondary);
  text-decoration: none;
}

footer a:hover {
  color: var(--accent);
}

/* --- Access ------------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
}

.skip:focus {
  position: static;
  display: inline-block;
  margin: 0.5rem 1.25rem;
  color: var(--accent);
}

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}
