:root {
  color-scheme: light;
  --bg: #f7f8fa;
  --surface: #ffffff;
  --text: #111827;
  --text-muted: #6b7280;
  --text-soft: #9ca3af;
  --border: #e5e7eb;
  --border-strong: #d1d5db;
  --accent: #ff6b35;
  --accent-hover: #e85a28;
  --accent-soft: rgba(255, 107, 53, 0.1);
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 24px rgba(15, 23, 42, 0.06);
  --radius: 14px;
  --radius-lg: 18px;
  --max: 760px;
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  --font-indic: "Noto Sans Devanagari", "Noto Sans Gujarati", "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

html[lang="hi"] body,
html[lang="mr"] body,
html[lang="gu"] body {
  font-family: var(--font-indic);
}

@media (prefers-color-scheme: dark) {
  :root {
    color-scheme: dark;
    --bg: #0d0d0f;
    --surface: #1c1c1e;
    --text: #f5f5f7;
    --text-muted: #a1a1a6;
    --text-soft: #86868b;
    --border: rgba(255, 255, 255, 0.1);
    --border-strong: rgba(255, 255, 255, 0.16);
    --accent-soft: rgba(255, 107, 53, 0.16);
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 32px rgba(0, 0, 0, 0.35);
  }
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

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

a:hover {
  text-decoration: underline;
}

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

.shell {
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px 64px;
}

.site-header {
  padding: 28px 0 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--text);
}

.brand:hover {
  text-decoration: none;
}

.brand img {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
}

.brand-text {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.brand-name {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 12px;
  color: var(--text-muted);
  font-weight: 500;
}

.header-link {
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
  text-decoration: none;
}

.header-link:hover {
  color: var(--accent);
  text-decoration: none;
}

.hero {
  text-align: center;
  padding: 28px 0 32px;
}

.hero h1 {
  margin: 0 0 20px;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.search-wrap {
  position: relative;
  max-width: 560px;
  margin: 0 auto;
}

.search-input {
  width: 100%;
  padding: 16px 20px 16px 48px;
  font: inherit;
  font-size: 16px;
  color: var(--text);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
  box-shadow: var(--shadow-sm);
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.search-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}

.search-icon {
  position: absolute;
  left: 18px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-soft);
  pointer-events: none;
  font-size: 18px;
}

.search-results {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  overflow: hidden;
  z-index: 20;
  display: none;
}

.search-results.open {
  display: block;
}

.search-result {
  display: block;
  padding: 12px 16px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
}

.search-result:last-child {
  border-bottom: none;
}

.search-result:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.search-result-title {
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 2px;
}

.search-result-meta {
  font-size: 12px;
  color: var(--text-muted);
}

.search-empty {
  padding: 16px;
  font-size: 14px;
  color: var(--text-muted);
  text-align: center;
}

.section-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0 0 14px;
  letter-spacing: 0.02em;
}

.category-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
  margin-bottom: 40px;
}

.category-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 18px 16px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text);
  transition: border-color 0.15s, transform 0.15s, box-shadow 0.15s;
}

.category-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
  text-decoration: none;
}

.category-emoji {
  font-size: 22px;
  line-height: 1;
}

.category-title {
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.category-count {
  font-size: 13px;
  color: var(--text-muted);
}

.suggested-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 40px;
}

.suggested-item {
  display: block;
  padding: 16px 18px;
  color: var(--text);
  text-decoration: none;
  border-bottom: 1px solid var(--border);
  font-weight: 500;
  font-size: 15px;
}

.suggested-item:last-child {
  border-bottom: none;
}

.suggested-item:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.contact-card {
  text-align: center;
  padding: 28px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.contact-card h2 {
  margin: 0 0 8px;
  font-size: 1.125rem;
}

.contact-card p {
  margin: 0 0 18px;
  color: var(--text-muted);
  font-size: 15px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 22px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  color: #fff;
  background: var(--accent);
  border: none;
  border-radius: 999px;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.15s;
}

.btn:hover {
  background: var(--accent-hover);
  text-decoration: none;
  color: #fff;
}

.btn-secondary {
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border-strong);
}

.btn-secondary:hover {
  background: var(--accent-soft);
  color: var(--text);
}

.site-footer {
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  text-align: center;
  font-size: 13px;
  color: var(--text-muted);
}

.site-footer a {
  color: var(--text-muted);
  font-weight: 500;
}

/* Category & article pages */
.page-header {
  padding: 24px 0 20px;
}

.breadcrumb {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  font-size: 13px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.breadcrumb a {
  color: var(--text-muted);
  font-weight: 500;
}

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

.page-header h1 {
  margin: 0;
  font-size: clamp(1.5rem, 3.5vw, 2rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  gap: 10px;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  margin-bottom: 32px;
}

.article-list a {
  display: block;
  padding: 16px 18px;
  color: var(--text);
  font-weight: 500;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
}

.article-list a:last-child {
  border-bottom: none;
}

.article-list a:hover {
  background: var(--accent-soft);
  text-decoration: none;
}

.article-body {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(24px, 4vw, 36px);
  box-shadow: var(--shadow-sm);
}

.article-body h2 {
  margin: 2rem 0 0.75rem;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

.article-body h2:first-child {
  margin-top: 0;
}

.article-body h3 {
  margin: 1.5rem 0 0.5rem;
  font-size: 1.05rem;
}

.article-body p,
.article-body li {
  color: var(--text);
}

.article-body p {
  margin: 0 0 1rem;
}

.article-body ul,
.article-body ol {
  margin: 0 0 1rem;
  padding-left: 1.25rem;
}

.article-body li {
  margin: 0.35rem 0;
}

.article-body strong {
  font-weight: 600;
}

.tip {
  padding: 14px 16px;
  border-radius: 10px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  margin: 1.25rem 0;
  font-size: 15px;
}

.store-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 1rem 0;
}

@media (max-width: 560px) {
  .category-grid {
    grid-template-columns: 1fr;
  }

  .site-header {
    flex-direction: column;
    align-items: flex-start;
  }
}

.lang-switcher {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  margin: 8px 0 0;
}

.lang-btn {
  appearance: none;
  border: 1px solid var(--border-strong);
  background: var(--surface);
  color: var(--text-muted);
  font: inherit;
  font-size: 13px;
  font-weight: 500;
  padding: 6px 10px;
  border-radius: 999px;
  cursor: pointer;
}

.lang-btn:hover {
  color: var(--text);
  border-color: var(--accent);
}

.lang-btn.is-active {
  color: #fff;
  background: var(--accent);
  border-color: var(--accent);
}

.header-tools {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
}

.site-header .header-tools .header-link {
  align-self: flex-end;
}
