/* ACHALAM website (achalam.app). The same Bloom colours as the app; one type family (Anek) whose width
   axis does the work: wide and heavy for the panchang and headings, normal for reading. */
:root {
  --paper: #F5F2EE;
  --ink: #1D1B26;
  --ink-2: #3A3650;
  --muted: #5F5A68;
  --line: #E3DED7;
  --card: #FFFFFF;
  --lavender: #D9D4F5;
  --mint: #C7E6D4;
  --butter: #F6E3A1;
  --peach: #F6CDB8;
  --parva: #B8402E;
  --green: #2F7A55;
  --gutter: 16px;
  --max: 1160px;
  --font: "Anek Latin", "Anek Gujarati", "Anek Devanagari", system-ui, sans-serif;
}
html[lang="gu"] { --font: "Anek Gujarati", "Anek Latin", system-ui, sans-serif; }
html[lang="hi"] { --font: "Anek Devanagari", "Anek Latin", system-ui, sans-serif; }
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 84px; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.55; font-variation-settings: "wdth" 100; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
.wrap { width: 100%; max-width: var(--max); margin: 0 auto; padding: 0 var(--gutter); }
@media (min-width: 720px) { :root { --gutter: 32px; } }
.skip { position: absolute; left: -999px; top: 8px; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; z-index: 50; }
.skip:focus { left: 8px; }

/* ---------- header */
.top { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border-bottom: 1px solid transparent; }
.top.scrolled { border-bottom-color: var(--line); }
.top .wrap { display: flex; align-items: center; gap: 12px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 800; font-variation-settings: "wdth" 118; font-size: 20px; letter-spacing: .02em; margin-right: auto; white-space: nowrap; }
.brand img { width: 36px; height: 36px; border-radius: 10px; }
.nav { display: none; gap: 4px; }
.nav a { text-decoration: none; padding: 8px 12px; border-radius: 999px; font-weight: 600; font-size: 15px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--card); }
.langs { display: flex; gap: 2px; background: var(--card); border-radius: 999px; padding: 3px; }
.langs a { text-decoration: none; min-width: 40px; height: 40px; display: grid; place-items: center; border-radius: 999px; font-weight: 700; font-size: 14px; padding: 0 8px; }
.langs a[aria-current="true"] { background: var(--ink); color: #fff; }
.top .open { display: none; }
@media (min-width: 900px) { .nav { display: flex; } .top .open { display: inline-flex; } }

/* ---------- buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 52px; padding: 0 22px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 700; font-size: 16px; text-decoration: none; border: 0; font-family: inherit; cursor: pointer; }
.btn:hover { background: var(--ink-2); }
.btn.light { background: var(--card); color: var(--ink); }
.btn.light:hover { background: #fff; box-shadow: inset 0 0 0 2px var(--ink); }
.btn.small { min-height: 42px; padding: 0 16px; font-size: 15px; }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- type */
h1, h2, h3 { font-variation-settings: "wdth" 112; line-height: 1.08; margin: 0; letter-spacing: -.005em; }
h1 { font-size: clamp(2.1rem, 5.4vw, 3.9rem); font-weight: 750; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); font-weight: 750; }
h3 { font-size: 1.3rem; font-weight: 700; line-height: 1.2; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.22rem); color: var(--ink-2); max-width: 36em; margin: 18px 0 0; }
.muted { color: var(--muted); }
section { padding: 72px 0; }
@media (min-width: 900px) { section { padding: 104px 0; } }
.section-head { max-width: 40em; margin-bottom: 36px; }
.section-head p { color: var(--ink-2); margin: 14px 0 0; font-size: 1.08rem; }

/* ---------- hero */
.hero { padding: 36px 0 72px; }
.hero-grid { display: grid; gap: 40px; align-items: start; }
@media (min-width: 960px) { .hero { padding: 64px 0 104px; } .hero-grid { grid-template-columns: 1.05fr .95fr; gap: 64px; align-items: center; } }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }
.iphone-note { margin: 18px 0 0; font-size: 15px; color: var(--muted); max-width: 32em; }
.iphone-note b { color: var(--ink); }

/* ---------- today (the live panchang card) */
.today { background: var(--lavender); border-radius: 36px; padding: 24px 22px 18px; position: relative; }
@media (min-width: 720px) { .today { padding: 32px 32px 22px; } }
.today-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; }
.today-date { font-weight: 600; color: var(--ink-2); font-size: 15px; }
.city { display: inline-flex; align-items: center; gap: 6px; background: rgba(255,255,255,.7); border-radius: 999px; padding: 0 6px 0 14px; min-height: 40px; font-weight: 700; font-size: 14px; }
.city select { font: inherit; border: 0; background: transparent; color: var(--ink); padding: 8px 6px; min-height: 40px; cursor: pointer; }
.tithi { font-size: clamp(2.3rem, 9vw, 5.2rem); text-wrap: balance; font-weight: 800; font-variation-settings: "wdth" 125; line-height: .95; margin: 18px 0 6px; letter-spacing: -.015em; }
.tithi-sub { font-weight: 600; color: var(--ink-2); }
.parva { display: flex; flex-wrap: wrap; gap: 6px; margin: 12px 0 0; padding: 0; list-style: none; }
.parva li { background: #fff; border-radius: 999px; padding: 4px 12px; font-size: 14px; font-weight: 700; color: var(--parva); }
.parva li.green { color: var(--green); }
.times { margin: 18px 0 0; padding: 0; list-style: none; border-top: 1.5px solid rgba(29,27,38,.12); }
.times li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 9px 12px; margin: 0 -12px; border-bottom: 1.5px solid rgba(29,27,38,.08); border-radius: 14px; }
.times li:last-child { border-bottom: 0; }
.times .t-name { font-weight: 600; }
.times .t-time { font-weight: 800; font-variation-settings: "wdth" 110; font-size: 1.12rem; font-feature-settings: "tnum"; white-space: nowrap; }
.times li.next { background: var(--ink); color: #fff; border-bottom-color: transparent; }
.times li.next .t-name::after { content: attr(data-next); font-weight: 600; opacity: .75; margin-left: 8px; font-size: 14px; }
.times li.done { color: var(--muted); }
.today-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px; margin-top: 14px; font-size: 14px; color: var(--ink-2); }
.today-foot a { font-weight: 700; color: var(--ink); }

/* ---------- phones strip */
.phones { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(210px, 64vw); gap: 18px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 8px var(--gutter) 24px; margin: 0 calc(-1 * var(--gutter)); scrollbar-width: thin; }
.phones figure { margin: 0; scroll-snap-align: center; }
.phones img { border-radius: 28px; border: 6px solid var(--ink); background: var(--ink); aspect-ratio: 600 / 1298; width: 100%; object-fit: cover; object-position: top; }
.phones figcaption { margin-top: 14px; }
.phones figcaption b { display: block; font-size: 1.08rem; font-variation-settings: "wdth" 110; }
.phones figcaption span { color: var(--muted); font-size: 15px; }
@media (min-width: 1100px) {
  .phones { grid-auto-flow: row; grid-template-columns: repeat(6, 1fr); overflow: visible; padding: 8px 0 0; margin: 0; }
  .phones figure:nth-child(even) { margin-top: 56px; }
}

/* ---------- feature bands */
.band { border-radius: 40px; padding: 32px 22px; display: grid; gap: 28px; align-items: center; }
.band + .band { margin-top: 20px; }
@media (min-width: 900px) { .band { grid-template-columns: 1fr 300px; padding: 56px; gap: 56px; } .band.flip { grid-template-columns: 300px 1fr; } .band.flip .band-img { order: -1; } }
.band.lav { background: var(--lavender); } .band.peach { background: var(--peach); } .band.mint { background: var(--mint); } .band.butter { background: var(--butter); }
.band p { margin: 14px 0 0; color: var(--ink-2); max-width: 34em; }
.band ul { margin: 16px 0 0; padding-left: 1.1em; color: var(--ink-2); }
.band li { margin: 6px 0; }
.band .btn { margin-top: 24px; }
.band-img img { border-radius: 26px; border: 6px solid var(--ink); background: var(--ink); max-width: 300px; margin: 0 auto; aspect-ratio: 600 / 1298; object-fit: cover; object-position: top; max-height: 520px; width: 100%; }

/* ---------- get it */
.get { display: grid; gap: 20px; }
@media (min-width: 860px) { .get { grid-template-columns: 1fr 1fr; } }
.get-card { background: var(--card); border-radius: 32px; padding: 28px 24px; }
@media (min-width: 720px) { .get-card { padding: 36px; } }
.get-card p { color: var(--ink-2); margin: 12px 0 0; }
.get-card .btn { margin-top: 22px; }
.steps { counter-reset: s; list-style: none; padding: 0; margin: 18px 0 0; }
.steps li { counter-increment: s; display: grid; grid-template-columns: 36px 1fr; gap: 12px; align-items: start; padding: 8px 0; }
.steps li::before { content: counter(s); width: 32px; height: 32px; border-radius: 50%; background: var(--ink); color: #fff; display: grid; place-items: center; font-weight: 800; font-size: 15px; }
html[lang="gu"] .steps li::before { content: counter(s, gujarati); }

/* ---------- trust */
.trust { display: grid; gap: 14px; margin: 0; padding: 0; list-style: none; }
@media (min-width: 760px) { .trust { grid-template-columns: repeat(2, 1fr); } }
.trust li { border-top: 2px solid var(--ink); padding: 16px 0 0; }
.trust b { display: block; font-size: 1.1rem; font-variation-settings: "wdth" 108; }
.trust span { color: var(--ink-2); }

/* ---------- faq */
.faq { max-width: 52em; }
.faq details { border-bottom: 1.5px solid var(--line); }
.faq summary { cursor: pointer; list-style: none; padding: 20px 40px 20px 0; font-weight: 700; font-size: 1.12rem; position: relative; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 6px; top: 14px; font-size: 1.6rem; font-weight: 500; }
.faq details[open] summary::after { content: "−"; }
.faq details p { margin: 0 0 20px; color: var(--ink-2); max-width: 44em; }

/* ---------- inner pages */
.crumbs { font-size: 14px; color: var(--muted); padding: 22px 0 0; }
.crumbs a { color: var(--muted); }
.page-head { padding: 22px 0 36px; max-width: 46em; }
.page-head .lead { margin-top: 14px; }
.twocol { display: grid; gap: 28px; align-items: start; }
@media (min-width: 960px) { .twocol { grid-template-columns: minmax(0, 1fr) 420px; gap: 48px; } .twocol .today { position: sticky; top: 92px; } }
.table-wrap { background: var(--card); border-radius: 28px; padding: 6px 4px; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15.5px; }
th, td { text-align: left; padding: 12px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: 13px; font-weight: 700; color: var(--muted); }
tr:last-child td { border-bottom: 0; }
td.when { white-space: nowrap; font-weight: 700; }
td.num, th.num { text-align: right; white-space: nowrap; font-feature-settings: "tnum"; }
tr.is-today td { background: var(--lavender); }
tr.is-today td:first-child { border-radius: 14px 0 0 14px; } tr.is-today td:last-child { border-radius: 0 14px 14px 0; }
.tag { display: inline-block; font-size: 13px; font-weight: 700; color: var(--parva); margin-right: 6px; }
.tag.green { color: var(--green); }
.defs { display: grid; gap: 14px; margin: 0; }
@media (min-width: 760px) { .defs { grid-template-columns: repeat(2, 1fr); } }
.defs div { background: var(--card); border-radius: 22px; padding: 18px 20px; }
.defs dt { font-weight: 800; font-variation-settings: "wdth" 110; font-size: 1.1rem; }
.defs dd { margin: 4px 0 0; color: var(--ink-2); }
.search { width: 100%; max-width: 480px; min-height: 52px; border-radius: 999px; border: 2px solid var(--line); background: var(--card); padding: 0 20px; font: inherit; font-size: 16px; }
.search:focus { border-color: var(--ink); outline: none; }
.levels { counter-reset: l; list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
@media (min-width: 760px) { .levels { grid-template-columns: repeat(2, 1fr); } }
.levels li { counter-increment: l; background: var(--card); border-radius: 22px; padding: 18px 20px 18px 74px; position: relative; min-height: 76px; }
.levels li::before { content: counter(l); position: absolute; left: 18px; top: 16px; width: 42px; height: 42px; border-radius: 14px; background: var(--mint); display: grid; place-items: center; font-weight: 800; font-size: 20px; }
html[lang="gu"] .levels li::before { content: counter(l, gujarati); }
.levels b { display: block; font-size: 1.1rem; }
.levels span { color: var(--ink-2); }
.doc { max-width: 46em; padding-bottom: 72px; }
.doc h1 { margin-top: 22px; }
.doc h2 { font-size: 1.45rem; margin: 36px 0 10px; }
.doc .card { background: var(--card); border-radius: 22px; padding: 18px 22px; margin: 18px 0; }
.doc li { margin: 6px 0; }
.notfound { padding: 96px 0; }

/* ---------- footer */
.foot { background: var(--ink); color: #D6D2DE; padding: 56px 0 40px; margin-top: 40px; }
.foot a { color: #fff; text-decoration: none; }
.foot a:hover { text-decoration: underline; }
.foot-grid { display: grid; gap: 28px; }
@media (min-width: 860px) { .foot-grid { grid-template-columns: 1.4fr 1fr 1fr 1fr; } }
.foot h2 { font-size: 15px; color: #fff; margin: 0 0 10px; font-variation-settings: "wdth" 100; }
.foot ul { list-style: none; padding: 0; margin: 0; }
.foot li { margin: 7px 0; }
.foot .brand { color: #fff; margin: 0 0 10px; }
.foot small { display: block; margin-top: 36px; color: #A39EAD; }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

/* tables on phones: fewer columns, details under the name */
td .sub { display: block; color: var(--muted); font-size: 14px; margin-top: 2px; }
td .tags { margin-top: 4px; line-height: 1.35; }
@media (max-width: 600px) {
  th, td { padding: 10px 10px; font-size: 14.5px; }
  .twocol .today { order: -1; }
  td.when { white-space: normal; }
}
.twocol > * { min-width: 0; }
@media (max-width: 600px) { td.num, th.num { padding-left: 4px; } .table-wrap { padding: 4px 0; } }
@media (max-width: 600px) { th.num { white-space: normal; } th, td { padding-left: 8px; padding-right: 8px; } }
@media (max-width: 400px) { th, td { font-size: 13.5px; padding-left: 6px; padding-right: 6px; } }
