/*
 * One stylesheet for every page on vichaksh.com.
 *
 * The look follows the app rather than the other way round: the same warm ground, the
 * same gold accent, the same restraint. Someone arriving from the Play listing should
 * recognise the app when they open it.
 *
 * Bilingual by construction. Every piece of text exists twice in the markup and the
 * language switch shows one and hides the other, so there is no flash of the wrong
 * language and no translation file to fall out of date with the page.
 */

:root {
  color-scheme: light dark;
  --ground: #fbfaf7;
  --surface: #ffffff;
  --ink: #16150f;
  --dim: #45443d;
  --muted: #7d7c73;
  --rule: #e4e2da;
  --accent: #b8901a;
  --accent-ink: #fffdf6;
  --danger: #b83227;
  --max: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #121210;
    --surface: #1a1917;
    --ink: #f4f3ec;
    --dim: #c9c8c0;
    --muted: #8e8d84;
    --rule: #2b2a26;
    --accent: #d8ae2a;
    --accent-ink: #17150e;
  }
}

* { box-sizing: border-box; }

html, body { min-height: 100%; }

/* Header, content, footer — the footer sits at the bottom when the page is short
 * rather than floating in the middle of the screen. */
body {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}
main { flex: 1 0 auto; }
footer.site { flex-shrink: 0; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.65 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Noto Sans Devanagari", sans-serif;
  -webkit-font-smoothing: antialiased;
}

/*
 * The language switch. One of the two is always hidden.
 *
 * Driven by a class on the span, NOT by its lang attribute. The first version of this
 * file used [lang="hi"], and the switch also sets lang on the <html> element for screen
 * readers — so choosing Hindi matched the whole document and hid the entire page,
 * including the buttons that would have switched it back. The only way out was clearing
 * site data. Visibility and language are two different jobs and no longer share a
 * selector.
 */
.hi { display: none; }
body.lang-hi .en { display: none; }
body.lang-hi .hi { display: revert; }

.wrap { max-width: var(--max); margin: 0 auto; padding: 0 22px; }

header.site {
  border-bottom: 1px solid var(--rule);
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--ground) 92%, transparent);
  backdrop-filter: blur(8px);
}
header.site .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px; padding-top: 13px; padding-bottom: 13px;
}

.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.brand .mark {
  display: inline-grid; place-items: center; width: 30px; height: 30px;
  border-radius: 8px; background: var(--accent); color: var(--accent-ink);
  font-weight: 700; font-size: 17px;
}
.brand b { font-weight: 700; letter-spacing: 2.4px; font-size: 15px; }

.langs { display: flex; gap: 2px; border: 1px solid var(--rule); border-radius: 6px; overflow: hidden; }
.langs button {
  font: inherit; font-size: 12.5px; padding: 6px 11px; cursor: pointer;
  background: transparent; color: var(--muted); border: 0;
}
.langs button[aria-pressed="true"] { background: var(--accent); color: var(--accent-ink); font-weight: 600; }

.top-actions { display: flex; align-items: center; gap: 10px; }
.signin {
  text-decoration: none; font-size: 13px; font-weight: 600; white-space: nowrap;
  color: var(--ink); border: 1px solid var(--rule); border-radius: 6px; padding: 7px 13px;
}
.signin:hover { border-color: var(--accent); color: var(--accent); }

@media (max-width: 420px) {
  .brand b { font-size: 13px; letter-spacing: 1.6px; }
  .langs button { padding: 6px 9px; font-size: 12px; }
  .signin { padding: 7px 10px; }
}

h1 { font-size: 32px; line-height: 1.2; margin: 0 0 14px; letter-spacing: -0.3px; }
h2 { font-size: 20px; margin: 30px 0 10px; }
h3 { font-size: 16px; margin: 24px 0 6px; }
p { margin: 0 0 14px; color: var(--dim); }
.lede { font-size: 18px; color: var(--dim); }
small, .fine { font-size: 13.5px; color: var(--muted); }
a { color: var(--accent); }

main { padding: 32px 0 8px; }

.hero { padding: 4px 0 0; }
.hero h1 { max-width: 18ch; }

.cards { display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 20px 0; }
.card {
  background: var(--surface); border: 1px solid var(--rule);
  border-radius: 10px; padding: 18px;
}
.card h3 { margin: 0 0 6px; font-size: 15.5px; }
.card p { margin: 0; font-size: 14px; color: var(--muted); }

.pill {
  display: inline-block; font-size: 11.5px; letter-spacing: .7px; text-transform: uppercase;
  padding: 4px 9px; border-radius: 4px; font-weight: 600;
  background: color-mix(in srgb, var(--accent) 18%, transparent); color: var(--accent);
}

.note {
  border-left: 3px solid var(--accent); background: var(--surface);
  padding: 13px 15px; border-radius: 0 8px 8px 0; margin: 18px 0;
}
.note p:last-child { margin: 0; }

.button {
  display: inline-block; text-decoration: none; font-weight: 600;
  background: var(--accent); color: var(--accent-ink);
  padding: 13px 22px; border-radius: 7px;
}
.button.quiet { background: transparent; color: var(--ink); border: 1px solid var(--rule); }

table { width: 100%; border-collapse: collapse; margin: 18px 0; font-size: 14.5px; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--rule); vertical-align: top; }
th { color: var(--muted); font-weight: 600; font-size: 13px; }

ul { padding-left: 20px; color: var(--dim); }
li { margin-bottom: 7px; }

footer.site { border-top: 1px solid var(--rule); margin-top: 30px; padding: 18px 0 24px; }
footer.site .wrap { display: flex; flex-wrap: wrap; gap: 10px 20px; align-items: center; }
footer.site a { color: var(--dim); text-decoration: none; font-size: 14px; }
footer.site a:hover { color: var(--accent); }

@media (max-width: 520px) {
  h1 { font-size: 27px; }
  main { padding-top: 30px; }
}
