/* App aliases onto Kolam tokens (kolam/tokens.css loads first and handles light, dark and contrast).
   --bg, --surface, --ink, --ink-2, --line and --danger come straight from Kolam. */
:root {
  --surface-2: var(--surface-sunken);
  --muted: var(--ink-2);
  --green: var(--primary);            /* brand fills */
  --green-ink: var(--on-primary);     /* text on --green */
  --green-soft: var(--primary-soft);
  --green-text: var(--primary-text);  /* azure text and icons on grounds and soft tints */
  /* Category hues: soil = accent, sun = warning, water = secondary (teal) */
  --soil: var(--accent-text);
  --soil-soft: var(--accent-soft);
  --sun: var(--warning);
  --sun-soft: var(--warning-soft);
  --water: var(--secondary-text);
  --water-soft: var(--secondary-soft);
  /* Seasons: kharif (monsoon) = teal, rabi (winter) = amber, zaid (summer) = rose */
  --kharif: var(--secondary-text);
  --rabi: var(--warning);
  --zaid: var(--accent-text);
  --kharif-hue: var(--secondary);
  --rabi-hue: var(--warning);
  --zaid-hue: var(--accent);
  --shadow: var(--shadow-2);
  --radius: var(--radius-lg);
  --font: var(--font-sans);
  --serif: var(--font-display);
  --tamil: var(--font-sans);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 16px/1.55 var(--font); -webkit-font-smoothing: antialiased;
  padding-bottom: calc(76px + env(safe-area-inset-bottom));
}
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; }
img { display: block; max-width: 100%; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; flex: none; }
h1, h2, h3 { font-family: var(--serif); font-weight: 700; letter-spacing: -.01em; line-height: 1.15; margin: 0; }
p { margin: 0; }
.muted { color: var(--muted); }
.ta { font-family: var(--tamil); }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }

/* Top bar & tabs */
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px;
  padding: calc(10px + env(safe-area-inset-top)) var(--gutter) 10px; background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--green); color: var(--green-ink); display: grid; place-items: center; }
.brand-mark svg { width: 20px; height: 20px; stroke-width: 2; }
.brand-name { font-family: var(--serif); font-weight: 700; font-size: 20px; letter-spacing: -.01em; }
.tabs { display: flex; gap: 4px; margin-left: auto; }
.tabs a { display: flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: var(--radius-pill); color: var(--ink-2); font-weight: 700; font-size: 15px; }
.tabs a:hover { background: var(--surface-2); }
.tabs a.on { background: var(--primary-soft); color: var(--primary-text); }
.place-btn { display: flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; max-width: 180px; }
.place-btn span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.place-btn svg { width: 16px; height: 16px; color: var(--green-text); }

@media (max-width: 860px) {
  /* backdrop-filter would make the header the containing block of the fixed tab bar */
  .topbar { padding-left: 16px; padding-right: 16px; backdrop-filter: none; -webkit-backdrop-filter: none; background: var(--bg); }
  .tabs {
    position: fixed; left: 0; right: 0; bottom: 0; margin: 0; z-index: 30; justify-content: space-around; gap: 0;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: var(--surface); border-top: 1px solid var(--line);
  }
  .tabs a { flex-direction: column; gap: 2px; padding: 6px 4px; font-size: 12px; flex: 1; border-radius: var(--radius-md); }
  .tabs a svg { width: 24px; height: 24px; }
  .tabs a.on { background: none; color: var(--green-text); }
  .tabs a.on svg { stroke-width: 2.1; }
  .place-btn { margin-left: auto; }
}
@media (min-width: 861px) { body { padding-bottom: 0; } }

/* Layout */
/* Full-width layout: content fills the screen with a fluid side gutter; long text keeps its own measure */
:root { --gutter: clamp(20px, 3vw, 48px); }
main { width: 100%; margin: 0; padding: 24px var(--gutter) 64px; outline: none; }
@media (max-width: 600px) { main { padding: 16px 16px 40px; } }
.section { margin-top: 40px; scroll-margin-top: 80px; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.section-head h2 { font-size: 24px; }
.section-head p { color: var(--muted); font-size: 14px; margin-top: 4px; }
.link { color: var(--green-text); font-weight: 700; font-size: 14px; display: inline-flex; align-items: center; gap: 2px; white-space: nowrap; }
.link svg { width: 16px; height: 16px; }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.page-title { font-size: clamp(30px, 5vw, 44px); font-weight: 900; margin: 4px 0 8px; }
.page-lede { color: var(--ink-2); max-width: 640px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-1); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: var(--size-control-md); border-radius: var(--radius-md); padding: 10px 20px; font-weight: 700; font-size: 15px; border: 1px solid transparent; }
.btn-primary { background: var(--green); color: var(--green-ink); }
.btn-primary:hover { background: var(--primary-hover); }
.btn-outline { background: var(--surface); color: var(--ink); border-color: var(--line-strong); }
.btn-outline:hover { background: var(--surface-sunken); }
.btn.wide { width: 100%; }
.icon-btn { width: var(--size-target-min); height: var(--size-target-min); display: grid; place-items: center; border-radius: var(--radius-pill); border: 1px solid var(--line); background: var(--surface); }

/* Chips */
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chips.scroll { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 2px 20px; }
.chips.scroll::-webkit-scrollbar { display: none; }
@media (max-width: 600px) { .chips.scroll { margin: 0 -16px; padding: 2px 16px; } }
.chip { flex: none; border: 1px solid var(--line); background: var(--surface); padding: 7px 14px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; color: var(--ink-2); white-space: nowrap; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); background: var(--surface-2); color: var(--ink-2); white-space: nowrap; }
.tag.kharif { background: var(--water-soft); color: var(--kharif); }
.tag.rabi { background: var(--sun-soft); color: var(--rabi); }
.tag.zaid { background: var(--soil-soft); color: var(--zaid); }
.tag svg { width: 13px; height: 13px; stroke-width: 2; }

/* Home hero */
.hero { display: grid; grid-template-columns: 1.25fr 1fr; gap: 16px; }
@media (max-width: 860px) { .hero { grid-template-columns: 1fr; } }
.season-card { position: relative; overflow: hidden; padding: 28px; border-radius: var(--radius-xl); color: var(--on-sidebar); background: linear-gradient(160deg, color-mix(in srgb, var(--primary) 40%, var(--sidebar)), var(--sidebar)); min-height: 300px; display: flex; flex-direction: column; }
.season-card.kharif { --hue: var(--kharif-hue); }
.season-card.rabi { --hue: var(--rabi-hue); }
.season-card.zaid { --hue: var(--zaid-hue); }
/* Season cards stay dark in every theme: the season hue mixed into --sidebar keeps --on-sidebar text above 4.5:1 */
.season-card.kharif, .season-card.rabi, .season-card.zaid { background: linear-gradient(160deg, color-mix(in srgb, var(--hue) 42%, var(--sidebar)), color-mix(in srgb, var(--hue) 18%, var(--sidebar))); }
.season-card .eyebrow { color: color-mix(in srgb, var(--on-sidebar) 85%, transparent); }
.season-card h1 { font-weight: 900; font-size: clamp(32px, 5vw, 46px); margin: 10px 0 10px; max-width: 14ch; }
.season-card p { color: color-mix(in srgb, var(--on-sidebar) 92%, transparent); max-width: 46ch; }
.season-card .ta { opacity: .8; font-size: 15px; }
.season-card .actions { margin-top: auto; padding-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; }
.season-card .btn-light { background: var(--on-sidebar); color: var(--sidebar); }
.season-card .btn-ghost { background: color-mix(in srgb, var(--on-sidebar) 12%, transparent); color: var(--on-sidebar); border-color: color-mix(in srgb, var(--on-sidebar) 45%, transparent); }
.season-art { position: absolute; right: -30px; bottom: -40px; width: 260px; height: 260px; opacity: .14; color: var(--on-sidebar); }
.season-art svg { width: 100%; height: 100%; stroke-width: .9; }
.month-strip { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; margin-top: 18px; max-width: 420px; }
.month-strip span { height: 6px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--on-sidebar) 22%, transparent); }
.month-strip span.in { background: color-mix(in srgb, var(--on-sidebar) 75%, transparent); }
.month-strip span.now { background: var(--on-sidebar); box-shadow: 0 0 0 2px color-mix(in srgb, var(--on-sidebar) 35%, transparent); }
.month-labels { display: grid; grid-template-columns: repeat(12, 1fr); gap: 3px; max-width: 420px; font-size: 10px; color: color-mix(in srgb, var(--on-sidebar) 80%, transparent); margin-top: 4px; text-align: center; }

.weather { padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.weather-top { display: flex; align-items: center; gap: 16px; }
.weather-icon { width: 56px; height: 56px; border-radius: var(--radius-lg); display: grid; place-items: center; background: var(--water-soft); color: var(--water); }
.weather-icon svg { width: 32px; height: 32px; }
.weather-temp { font-family: var(--serif); font-size: 40px; font-weight: 900; line-height: 1; }
.weather-meta { font-size: 14px; color: var(--muted); display: flex; gap: 14px; flex-wrap: wrap; }
.weather-meta span { display: inline-flex; align-items: center; gap: 4px; }
.weather-meta svg { width: 15px; height: 15px; }
.forecast { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.fday { text-align: center; padding: 8px 2px; border-radius: var(--radius-md); background: var(--bg); font-size: 13px; }
.fday b { display: block; font-weight: 700; font-size: 12px; color: var(--muted); }
.fday svg { display: block; width: 22px; height: 22px; margin: 4px auto; color: var(--ink-2); }
.fday .hi { font-weight: 700; }
.fday .lo { color: var(--muted); }
.fday .rain { color: var(--water); font-weight: 700; font-size: 12px; display: block; }
.advice { display: flex; flex-direction: column; gap: 8px; }
.advice li { list-style: none; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--ink-2); }
.advice ul { margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.advice .dot { width: 26px; height: 26px; border-radius: var(--radius-sm); display: grid; place-items: center; background: var(--green-soft); color: var(--green-text); flex: none; }
.advice .dot.warn { background: var(--sun-soft); color: var(--sun); }
.advice .dot svg { width: 15px; height: 15px; }
.skeleton { background: linear-gradient(90deg, var(--surface-2), var(--bg), var(--surface-2)); background-size: 200% 100%; animation: sk 1.4s infinite; border-radius: var(--radius-sm); }
@keyframes sk { to { background-position: -200% 0; } }

/* Crop cards */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
@media (max-width: 600px) { .grid { grid-template-columns: repeat(2, 1fr); gap: 10px; } }
.rail { display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 14px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 8px; scroll-padding-inline: var(--gutter); scrollbar-width: none; }
.rail::-webkit-scrollbar { display: none; }
.rail > * { scroll-snap-align: start; }
@media (max-width: 600px) { .rail { grid-auto-columns: 170px; gap: 10px; margin: 0 -16px; padding: 2px 16px 8px; } }
.crop-card { display: flex; flex-direction: column; overflow: hidden; transition: transform .15s, box-shadow .15s; }
.crop-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.crop-photo { position: relative; aspect-ratio: 4 / 3; background: var(--surface-2); overflow: hidden; }
.crop-photo img { width: 100%; height: 100%; object-fit: cover; }
.crop-photo .ph { position: absolute; inset: 0; display: grid; place-items: center; font-family: var(--serif); font-size: 40px; color: var(--muted); }
.crop-photo .water-badge { position: absolute; left: 8px; top: 8px; display: inline-flex; gap: 3px; align-items: center; padding: 3px 7px; border-radius: var(--radius-pill); background: var(--scrim); color: #fff; font-size: 11px; font-weight: 700; backdrop-filter: blur(6px); }
.crop-photo .water-badge svg { width: 12px; height: 12px; stroke-width: 2; }
.crop-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.crop-body h3 { font-family: var(--font); font-size: 16px; font-weight: 700; letter-spacing: 0; }
.crop-body .ta { font-size: 13px; color: var(--muted); margin-top: -4px; }
.crop-body .meta { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 4px; margin-top: auto; }
.crop-body .meta svg { width: 14px; height: 14px; }
.crop-body .tags { display: flex; gap: 4px; flex-wrap: wrap; }
@media (max-width: 600px) { .crop-body { padding: 10px 11px 12px; } .crop-body h3 { font-size: 15px; } }

/* Mini harvest list */
.mini-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; }
@media (min-width: 1600px) { .mini-list { grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); } }
.mini { display: flex; align-items: center; gap: 12px; padding: 10px; }
.mini img, .mini .ph { width: 52px; height: 52px; border-radius: var(--radius-md); object-fit: cover; background: var(--surface-2); flex: none; display: grid; place-items: center; font-family: var(--serif); color: var(--muted); }
.mini b { display: block; font-weight: 700; font-size: 15px; }
.mini small { color: var(--muted); font-size: 13px; }
.mini > svg { margin-left: auto; color: var(--muted); width: 18px; height: 18px; }

/* Organic cards */
.org-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.org-card { padding: 18px; display: flex; flex-direction: column; gap: 10px; transition: transform .15s, box-shadow .15s; }
.org-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.org-icon { width: 48px; height: 48px; border-radius: var(--radius-md); display: grid; place-items: center; }
.org-icon svg { width: 24px; height: 24px; }
.t-compost { background: var(--soil-soft); color: var(--soil); }
.t-liquid { background: var(--green-soft); color: var(--green-text); }
.t-seed { background: var(--sun-soft); color: var(--sun); }
.t-pest { background: var(--water-soft); color: var(--water); }
.t-soil { background: var(--green-soft); color: var(--green-text); }
.org-card h3 { font-size: 20px; }
.org-card .ta { font-size: 13px; color: var(--muted); margin-top: -6px; }
.org-card p { font-size: 14px; color: var(--ink-2); }
.org-facts { display: flex; gap: 12px; font-size: 13px; color: var(--muted); margin-top: auto; padding-top: 6px; flex-wrap: wrap; }
.org-facts span { display: inline-flex; gap: 4px; align-items: center; }
.org-facts svg { width: 14px; height: 14px; }

/* Season page */
.season-tabs { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 20px; }
.season-tab { text-align: left; padding: 16px; border-radius: var(--radius-lg); border: 1.5px solid var(--line); background: var(--surface); }
.season-tab b { font-family: var(--serif); font-size: 20px; font-weight: 700; display: block; }
.season-tab small { color: var(--muted); font-size: 13px; }
.season-tab .now-pill { float: right; font-size: 11px; font-weight: 700; color: var(--green-text); background: var(--green-soft); padding: 2px 8px; border-radius: var(--radius-pill); }
.season-tab.on.kharif { border-color: var(--kharif); box-shadow: inset 0 0 0 1px var(--kharif); }
.season-tab.on.rabi { border-color: var(--rabi); box-shadow: inset 0 0 0 1px var(--rabi); }
.season-tab.on.zaid { border-color: var(--zaid); box-shadow: inset 0 0 0 1px var(--zaid); }
@media (max-width: 600px) { .season-tab { padding: 12px; } .season-tab b { font-size: 17px; } .season-tab small { font-size: 12px; } .season-tab .now-pill { float: none; display: inline-block; margin-bottom: 4px; } }
.season-about { margin-top: 14px; padding: 16px 18px; color: var(--ink-2); font-size: 15px; }

.month-picker { display: grid; grid-template-columns: repeat(12, 1fr); gap: 6px; }
@media (max-width: 700px) { .month-picker { grid-template-columns: repeat(6, 1fr); } }
.month-btn { display: block; text-align: center; padding: 10px 0; border-radius: var(--radius-md); border: 1px solid var(--line); background: var(--surface); font-weight: 700; font-size: 14px; position: relative; }
.month-btn.on { background: var(--green); border-color: var(--green); color: var(--green-ink); }
.month-btn.today::after { content: ''; position: absolute; left: 50%; bottom: 4px; width: 4px; height: 4px; margin-left: -2px; border-radius: 50%; background: currentColor; opacity: .6; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.col-card { padding: 18px; }
.col-card h3 { font-family: var(--font); font-size: 15px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.col-card h3 .sw { width: 10px; height: 10px; border-radius: var(--radius-xs); }
.pill-list { display: flex; flex-wrap: wrap; gap: 8px; }
.pill { display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px 5px 5px; border-radius: var(--radius-pill); background: var(--bg); border: 1px solid var(--line); font-size: 14px; font-weight: 700; }
.pill img, .pill .ph { width: 26px; height: 26px; border-radius: 50%; object-fit: cover; background: var(--surface-2); }
.empty { color: var(--muted); font-size: 14px; }

/* Calendar (gantt) */
.cal { overflow-x: auto; }
.cal-table { min-width: 720px; }
.cal-row { display: grid; grid-template-columns: 170px repeat(12, 1fr); align-items: center; border-bottom: 1px solid var(--line); }
.cal-row:last-child { border-bottom: 0; }
.cal-row.head { font-size: 12px; font-weight: 700; color: var(--muted); text-align: center; position: sticky; top: 0; }
.cal-row.head > :first-child { text-align: left; }
.cal-name { padding: 9px 14px; font-size: 14px; font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-name:hover { color: var(--green-text); }
.cal-cell { height: 34px; position: relative; border-left: 1px dashed color-mix(in srgb, var(--line) 70%, transparent); }
.cal-cell.cur { background: color-mix(in srgb, var(--green-soft) 55%, transparent); }
.cal-cell i { position: absolute; left: 2px; right: 2px; height: 9px; border-radius: var(--radius-pill); }
.cal-cell i.s { top: 7px; background: var(--green); }
.cal-cell i.h { bottom: 7px; background: var(--sun); }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 18px; height: 8px; border-radius: var(--radius-pill); display: inline-block; }

/* Search */
.search { position: relative; margin: 18px 0 14px; }
.search svg { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.search input { width: 100%; min-height: var(--size-control-md); padding: 12px 16px 12px 48px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--ink); }
.search input:focus-visible { outline: 2px solid var(--focus); outline-offset: 1px; border-color: var(--focus); }
.result-count { font-size: 13px; color: var(--muted); margin: 12px 0; }

/* Detail pages */
.back { display: inline-flex; align-items: center; gap: 4px; color: var(--ink-2); font-weight: 700; font-size: 15px; margin-bottom: 14px; padding: 6px 12px 6px 6px; border-radius: var(--radius-pill); background: var(--surface); border: 1px solid var(--line); }
.back svg { width: 18px; height: 18px; }
.detail-hero { display: grid; grid-template-columns: 1.1fr 1fr; gap: 28px; align-items: center; }
@media (max-width: 860px) { .detail-hero { grid-template-columns: 1fr; gap: 18px; } }
@media (min-width: 1400px) { .detail-hero { grid-template-columns: minmax(0, 760px) minmax(0, 1fr); gap: 40px; } }
.detail-head .intro { max-width: 70ch; }
.detail-photo { border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 4 / 3; background: var(--surface-2); position: relative; }
.detail-photo img { width: 100%; height: 100%; object-fit: cover; }
.detail-photo figcaption { position: absolute; right: 10px; bottom: 10px; max-width: 80%; font-size: 10.5px; color: #fff; background: var(--scrim); padding: 3px 8px; border-radius: var(--radius-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.detail-head h1 { font-size: clamp(34px, 5vw, 50px); font-weight: 900; }
.detail-head .ta { font-size: 20px; color: var(--ink-2); margin-top: 6px; }
.detail-head .sci { font-style: italic; color: var(--muted); font-size: 15px; margin-top: 2px; }
.detail-head .intro { margin-top: 14px; color: var(--ink-2); font-size: 16px; }
.detail-head .tags { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 14px; }

.facts { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; margin-top: 28px; }
@media (max-width: 860px) { .facts { grid-template-columns: repeat(2, 1fr); } }
.fact { background: var(--surface); padding: 14px 16px; }
.fact small { display: block; font-size: 12px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--muted); margin-bottom: 4px; }
.fact b { font-weight: 700; font-size: 15px; }

.crop-cal { padding: 18px; }
.crop-cal .bars { display: grid; grid-template-columns: 70px repeat(12, 1fr); gap: 3px; align-items: center; font-size: 12px; }
.crop-cal .bars .lab { font-weight: 700; color: var(--muted); }
.crop-cal .bars .mn { text-align: center; color: var(--muted); font-weight: 700; }
.crop-cal .bars .mn.cur { color: var(--green-text); font-weight: 700; }
.crop-cal .bars i { height: 14px; border-radius: var(--radius-xs); background: var(--surface-2); }
.crop-cal .bars i.s { background: var(--green); }
.crop-cal .bars i.h { background: var(--sun); }
.crop-cal .note { margin-top: 10px; font-size: 13px; color: var(--muted); }

.steps { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }
@media (min-width: 1400px) { .steps { grid-template-columns: repeat(auto-fill, minmax(400px, 1fr)); } }
.step { padding: 18px; display: flex; gap: 14px; }
.step-num { width: 34px; height: 34px; border-radius: var(--radius-sm); background: var(--green-soft); color: var(--green-text); display: grid; place-items: center; font-weight: 700; flex: none; font-size: 15px; }
.step h3 { font-family: var(--font); font-size: 16px; font-weight: 700; margin-bottom: 4px; }
.step p { color: var(--ink-2); font-size: 15px; }

.pests { display: flex; flex-direction: column; }
.pest { display: grid; grid-template-columns: 220px 1fr; gap: 16px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.pest:last-child { border-bottom: 0; }
.pest b { display: flex; gap: 10px; align-items: center; font-weight: 700; }
.pest b svg { color: var(--danger); }
.pest p { color: var(--ink-2); font-size: 15px; }
@media (max-width: 600px) { .pest { grid-template-columns: 1fr; gap: 4px; } }

.note-card { padding: 18px; display: flex; gap: 14px; align-items: flex-start; }
.note-card .org-icon { width: 38px; height: 38px; }
.note-card .org-icon svg { width: 20px; height: 20px; }
.note-card ul { margin: 0; padding-left: 18px; color: var(--ink-2); }
.note-card li + li { margin-top: 4px; }
.note-card h3 { font-family: var(--font); font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.note-card p { color: var(--ink-2); }

/* Organic detail */
.org-hero { display: flex; gap: 20px; align-items: flex-start; }
.org-hero .org-icon { width: 72px; height: 72px; border-radius: var(--radius-xl); }
.org-hero .org-icon svg { width: 38px; height: 38px; }
@media (max-width: 600px) { .org-hero { flex-direction: column; gap: 14px; } }
.org-layout { display: grid; grid-template-columns: minmax(0, 1fr) 380px; gap: 24px; align-items: start; margin-top: 28px; }
@media (max-width: 960px) { .org-layout { grid-template-columns: minmax(0, 1fr); } .org-layout .calc { order: -1; } }
.calc { padding: 20px; position: sticky; top: 84px; }
@media (max-width: 960px) { .calc { position: static; } }
.calc h2 { font-size: 22px; display: flex; gap: 10px; align-items: center; }
.calc h2 svg { color: var(--green-text); }
.calc .row { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.calc .row input { flex: 1 1 100px; }
.calc input { flex: 1; min-width: 0; min-height: var(--size-control-md); padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); font: inherit; font-size: 18px; font-weight: 700; color: var(--ink); }
.seg { display: flex; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius-md); padding: 3px; }
.seg button { border: 0; background: none; padding: 8px 10px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 700; color: var(--ink-2); }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1), 0 0 0 1.5px var(--line-strong); font-weight: 700; }
.calc-out { background: var(--green-soft); border-radius: var(--radius-md); padding: 16px; }
.calc-out .big { font-family: var(--serif); font-size: 32px; font-weight: 900; color: var(--green-text); line-height: 1.1; }
.calc-out p { font-size: 14px; color: var(--ink-2); margin-top: 6px; }
.calc table { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.calc td { padding: 8px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.calc td:last-child { text-align: right; font-weight: 700; padding-left: 12px; }
.calc .muted { font-size: 13px; margin-top: 10px; }

.ing { width: 100%; border-collapse: collapse; }
.ing td { padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.ing tr:last-child td { border-bottom: 0; }
.ing td:last-child { text-align: right; font-weight: 700; white-space: nowrap; }
@media (max-width: 600px) { .ing td:last-child { white-space: normal; } }

.howto { counter-reset: s; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; }
.howto li { counter-increment: s; position: relative; padding: 0 0 22px 52px; color: var(--ink-2); }
.howto li::before { content: counter(s); position: absolute; left: 0; top: -2px; width: 34px; height: 34px; border-radius: 50%; background: var(--surface); border: 1.5px solid var(--green); color: var(--green-text); display: grid; place-items: center; font-weight: 700; font-size: 14px; }
.howto li::after { content: ''; position: absolute; left: 17px; top: 34px; bottom: 2px; width: 1.5px; background: var(--line); }
.howto li:last-child { padding-bottom: 0; }
.howto li:last-child::after { display: none; }

.use-table { width: 100%; border-collapse: collapse; }
.use-table td { padding: 12px 18px; border-bottom: 1px solid var(--line); font-size: 15px; vertical-align: top; }
.use-table tr:last-child td { border-bottom: 0; }
.use-table td:first-child { font-weight: 700; width: 40%; }
.use-table td:last-child { color: var(--ink-2); }
@media (max-width: 600px) { .use-table td { display: block; width: auto !important; padding: 4px 16px; border: 0; } .use-table tr { display: block; padding: 10px 0; border-bottom: 1px solid var(--line); } .use-table tr:last-child { border: 0; } }

.mini-stack { display: flex; flex-direction: column; gap: 14px; }
.ready { display: flex; gap: 12px; padding: 16px 18px; align-items: flex-start; background: var(--green-soft); border-radius: var(--radius); color: var(--ink); }
.ready svg { color: var(--green-text); margin-top: 2px; }

.disclaimer { margin-top: 56px; padding: 18px 20px; display: flex; gap: 12px; font-size: 13px; color: var(--muted); border-top: 1px solid var(--line); }
.disclaimer svg { width: 18px; height: 18px; margin-top: 1px; }

/* Location sheet */
.sheet { border: 0; padding: 0; border-radius: var(--radius-xl); background: var(--surface); color: var(--ink); width: min(440px, calc(100vw - 32px)); box-shadow: var(--shadow-3); }
.sheet::backdrop { background: var(--scrim); }
.sheet-inner { padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.sheet-head { display: flex; align-items: center; justify-content: space-between; }
.sheet-head h2 { font-size: 22px; }
.field { display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; color: var(--ink-2); }
.field input { min-height: var(--size-control-md); padding: 12px 14px; border-radius: var(--radius-md); border: 1.5px solid var(--line-strong); background: var(--surface); font: inherit; color: var(--ink); }
.place-results { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.place-results button { width: 100%; text-align: left; background: none; border: 0; padding: 10px 6px; border-bottom: 1px solid var(--line); }
.place-results button small { color: var(--muted); display: block; font-size: 13px; }
.place-results button:hover { background: var(--bg); }
@media (max-width: 600px) { .sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--radius-xl) var(--radius-xl) 0 0; padding-bottom: env(safe-area-inset-bottom); } }

.fade-in { animation: fi .25s ease both; }
@keyframes fi { from { opacity: 0; transform: translateY(4px); } }
@media (prefers-reduced-motion: reduce) { .fade-in, .crop-card, .org-card { animation: none; transition: none; } }

/* Sources */
.refs { list-style: none; margin: 0; padding: 0; }
.refs li + li { border-top: 1px solid var(--line); }
.refs a { display: flex; gap: 12px; align-items: center; padding: 12px 18px; }
.refs a:hover b { color: var(--green-text); }
.refs a > svg { color: var(--green-text); width: 16px; height: 16px; }
.refs b { display: block; font-weight: 700; font-size: 15px; }
.refs small { color: var(--muted); font-size: 12.5px; }
.acc-bar { display: flex; height: 12px; border-radius: var(--radius-pill); overflow: hidden; gap: 2px; margin: 18px 0 10px; }
.disclaimer .link { font-size: inherit; }

/* Language switch */
.lang-btn { margin-left: 8px; border: 1px solid var(--line); background: var(--surface); padding: 7px 12px; border-radius: var(--radius-pill); font-size: 14px; font-weight: 700; color: var(--green-text); font-family: var(--tamil); }
.lang-btn:lang(en) { font-family: var(--font); }
@media (max-width: 860px) { .lang-btn { margin-left: auto; } .place-btn { margin-left: 0; } }
@media (max-width: 480px) {
  .topbar { gap: 8px; }
  .brand { gap: 8px; min-width: 0; }
  .brand-mark { width: 30px; height: 30px; }
  .brand-name { font-size: 17px; }
  .lang-btn, .place-btn { padding: 6px 10px; font-size: 13px; }
  .place-btn { max-width: 96px; min-width: 0; }
}
/* Tamil is longer and taller: give it more line height and slightly smaller display sizes */
.lang-ta h1, .lang-ta h2, .lang-ta h3 { line-height: 1.35; letter-spacing: 0; }
.lang-ta .season-card h1 { font-size: clamp(26px, 4vw, 36px); max-width: 18ch; }
.lang-ta .page-title { font-size: clamp(26px, 4vw, 38px); }
.lang-ta .detail-head h1 { font-size: clamp(28px, 4.5vw, 42px); }
.lang-ta .section-head h2 { font-size: 21px; }
.lang-ta .eyebrow { letter-spacing: .02em; text-transform: none; font-size: 13px; }
.lang-ta .fact small { letter-spacing: 0; text-transform: none; }
.lang-ta .tabs a { font-size: 14px; }
@media (max-width: 860px) { .lang-ta .tabs a { font-size: 11px; } }
.lang-ta .month-labels { font-size: 8.5px; }
.lang-ta .crop-cal .bars { font-size: 10px; }
.lang-ta .month-btn { font-size: 13px; }
.lang-ta .cal-row.head { font-size: 11px; }
/* Long Tamil words: let card titles and headings wrap instead of pushing the page wider */
.crop-body h3, .crop-body .meta, .section-head h2, .mini b, .mini small { overflow-wrap: anywhere; }
.mini > div { min-width: 0; }
.section-head { flex-wrap: wrap; }
.crop-cal .bars { grid-template-columns: 56px repeat(12, minmax(0, 1fr)); }
.crop-cal .bars .mn { overflow: hidden; white-space: nowrap; }
.lang-ta .crop-cal .bars { font-size: 9px; gap: 2px; }
@media (max-width: 360px) { .brand-name { display: none; } .place-btn { max-width: 120px; } }

/* Photo gallery */
.gallery { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(200px, 1fr); gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding-bottom: 4px; }
.gallery::-webkit-scrollbar { display: none; }
@media (max-width: 600px) { .gallery { grid-auto-columns: 72%; margin: 0 -16px; padding: 0 16px 4px; } }
.shot { position: relative; border: 0; padding: 0; border-radius: var(--radius-md); overflow: hidden; background: var(--surface-2); aspect-ratio: 4 / 3; scroll-snap-align: start; cursor: zoom-in; }
.shot img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.shot:hover img { transform: scale(1.04); }
.shot span { position: absolute; left: 0; right: 0; bottom: 0; padding: 22px 12px 10px; font-size: 13px; font-weight: 700; color: #fff; text-align: left; background: linear-gradient(transparent, var(--scrim)); }

/* Videos */
.videos { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 14px; }
.video { overflow: hidden; }
.video-frame, .video iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; padding: 0; background: #000; position: relative; cursor: pointer; }
.video-frame img { width: 100%; height: 100%; object-fit: cover; opacity: .9; }
.video-frame .play { position: absolute; left: 50%; top: 50%; width: 64px; height: 64px; margin: -32px 0 0 -32px; border-radius: 50%; background: var(--scrim); color: #fff; display: grid; place-items: center; transition: transform .15s, background .15s; }
.video-frame:hover .play { transform: scale(1.08); background: var(--accent); color: var(--on-accent); }
.video-frame .play svg { width: 28px; height: 28px; margin-left: 4px; stroke: none; }
.video-frame .vlang { position: absolute; left: 10px; top: 10px; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: var(--radius-pill); background: color-mix(in srgb, var(--surface) 92%, transparent); color: var(--ink); font-family: var(--tamil); }
.video-body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 3px; }
.video-body b { font-size: 15px; font-weight: 700; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.video-body small { color: var(--muted); font-size: 13px; }

/* Pest photos */
.pest.has-photo { grid-template-columns: 84px 200px 1fr; align-items: center; }
.pest-photo { width: 84px; height: 64px; border: 0; padding: 0; border-radius: var(--radius-sm); overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.pest-photo img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 600px) { .pest.has-photo { grid-template-columns: 72px 1fr; column-gap: 12px; } .pest.has-photo .pest-photo { grid-row: span 2; width: 72px; height: 72px; align-self: start; } }

/* Organic photos */
.org-card.has-photo { padding-top: 0; }
.org-photo { position: relative; display: block; margin: 0 -18px 4px; aspect-ratio: 16 / 9; overflow: hidden; background: var(--surface-2); border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
.org-photo img { width: 100%; height: 100%; object-fit: cover; }
.org-photo .org-icon { position: absolute; left: 14px; bottom: -1px; transform: translateY(40%); border: 3px solid var(--surface); }
.org-card.has-photo .eyebrow { margin-top: 14px; display: inline-block; }
.org-banner { display: block; width: 100%; border: 0; padding: 0; margin: 0 0 22px; border-radius: var(--radius-xl); overflow: hidden; aspect-ratio: 21 / 8; background: var(--surface-2); position: relative; cursor: zoom-in; }
.org-banner img { width: 100%; height: 100%; object-fit: cover; }
.org-banner span { position: absolute; right: 10px; bottom: 10px; max-width: 80%; font-size: 10.5px; color: #fff; background: var(--scrim); padding: 3px 8px; border-radius: var(--radius-sm); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) { .org-banner { aspect-ratio: 16 / 10; border-radius: var(--radius-xl); } }

/* Lightbox */
.lightbox { border: 0; padding: 0; margin: 0; width: 100vw; height: 100vh; max-width: none; max-height: none; background: color-mix(in srgb, var(--sidebar) 96%, transparent); color: var(--on-sidebar); }
.lightbox::backdrop { background: var(--scrim); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox figure { margin: 0; max-width: min(1100px, 92vw); display: flex; flex-direction: column; gap: 10px; align-items: center; }
.lightbox img { max-width: 100%; max-height: calc(100vh - 150px); object-fit: contain; border-radius: var(--radius-md); }
.lightbox figcaption { text-align: center; display: flex; flex-direction: column; gap: 4px; }
.lightbox figcaption b { font-weight: 700; font-size: 15px; }
.lightbox figcaption small { color: color-mix(in srgb, var(--on-sidebar) 75%, transparent); font-size: 12px; }
.lightbox .icon-btn { position: absolute; background: color-mix(in srgb, var(--on-sidebar) 12%, transparent); border-color: color-mix(in srgb, var(--on-sidebar) 30%, transparent); color: var(--on-sidebar); width: 44px; height: 44px; }
.lb-close { top: calc(14px + env(safe-area-inset-top)); right: 14px; }
.lb-prev { left: 14px; top: 50%; margin-top: -22px; }
.lb-next { right: 14px; top: 50%; margin-top: -22px; }
.lb-count { position: absolute; top: calc(24px + env(safe-area-inset-top)); left: 18px; font-size: 13px; color: color-mix(in srgb, var(--on-sidebar) 80%, transparent); }
@media (max-width: 600px) { .lb-prev, .lb-next { top: auto; bottom: calc(18px + env(safe-area-inset-bottom)); margin: 0; } }
.fact-line { display: block; }
.fact-line + .fact-line { margin-top: 2px; }

.home-search { margin: 0 0 16px; }
.crop-body .sci { font-style: italic; }

/* Crop calendar v2 */
.cal-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.cal-search { margin: 0; flex: 1 1 260px; }
.cal-search input { padding-top: 11px; padding-bottom: 11px; }
.cal-legend { display: flex; gap: 18px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--ink-2); margin-bottom: 10px; }
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend i { display: inline-block; width: 26px; height: 9px; border-radius: var(--radius-pill); }
.lg-s { background: var(--green); } .lg-h { background: var(--sun); }
.lg-now { background: var(--green-soft); outline: 1.5px solid color-mix(in srgb, var(--green) 45%, transparent); }
#calCount { margin-left: auto; }
.cal2 { overflow: hidden; padding: 0; }
.cal2-scroll { overflow-x: auto; max-height: 78vh; overflow-y: auto; overscroll-behavior: contain; }
.cal2-table { min-width: 860px; position: relative; }
.cal2-row { display: grid; grid-template-columns: 220px repeat(12, minmax(44px, 1fr)); align-items: center; column-gap: 0; }
.cal2-name { grid-column: 1; grid-row: 1 / span 2; position: sticky; left: 0; z-index: 3; background: var(--surface); align-self: stretch;
  display: flex; align-items: center; gap: 10px; padding: 8px 12px 8px 14px; border-right: 1px solid var(--line); min-width: 0; }
.cal2-name img, .cal2-name .ph { width: 36px; height: 36px; border-radius: var(--radius-sm); object-fit: cover; flex: none; background: var(--surface-2); display: grid; place-items: center; font-size: 15px; }
.cal2-name > span:last-child { min-width: 0; display: flex; flex-direction: column; }
.cal2-name b { font-weight: 700; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-name small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal2-name small em { font-style: normal; color: var(--green-text); font-weight: 700; }
.cal2-band, .cal2-head { position: sticky; z-index: 4; background: var(--surface); }
.cal2-band { top: 0; padding-top: 10px; }
.cal2-band .cal2-name, .cal2-head .cal2-name { grid-row: 1; border-right: 1px solid var(--line); }
.cal2-head { top: 34px; border-bottom: 1px solid var(--line); }
.cal2-head .cal2-name { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding-top: 6px; padding-bottom: 6px; }
.band { grid-row: 1; margin: 0 2px; padding: 3px 8px; font-size: 11.5px; font-weight: 700; border-radius: var(--radius-xs); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.band.kharif { background: var(--water-soft); color: var(--kharif); }
.band.rabi { background: var(--sun-soft); color: var(--rabi); }
.band.zaid { background: var(--soil-soft); color: var(--zaid); }
.mh { grid-row: 1; text-align: center; font-size: 12px; font-weight: 700; color: var(--muted); padding: 8px 0; }
.mh.cur { color: var(--green-text); }
.mh.cur::after { content: ''; display: block; width: 5px; height: 5px; border-radius: 50%; background: var(--green); margin: 3px auto 0; }
.cal2-group { position: sticky; left: 0; padding: 14px 14px 6px; font-size: 12px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-2); background: var(--bg); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.lang-ta .cal2-group { text-transform: none; letter-spacing: 0; font-size: 13px; }
.cal2-group span { color: var(--muted); font-weight: 700; margin-left: 4px; }
.cal2-row.crop { grid-template-rows: 18px 18px; padding: 6px 0; border-bottom: 1px solid color-mix(in srgb, var(--line) 70%, transparent); position: relative;
  background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), color-mix(in srgb, var(--line) 55%, transparent) 0 calc(100% / 12));
  background-position: 220px 0; background-repeat: no-repeat; background-size: calc(100% - 220px) 100%; }
.cal2-row.crop:hover { background-color: color-mix(in srgb, var(--green-soft) 35%, transparent); }
.cal2-row.crop:hover .cal2-name { background: color-mix(in srgb, var(--green-soft) 35%, var(--surface)); }
.cal2-row.crop:hover b { color: var(--green-text); }
.now-col { grid-row: 1 / span 2; align-self: stretch; margin: -6px 0; background: color-mix(in srgb, var(--green-soft) 70%, transparent); border-left: 1.5px solid color-mix(in srgb, var(--green) 35%, transparent); border-right: 1.5px solid color-mix(in srgb, var(--green) 35%, transparent); }
.lane { display: contents; }
.bar { height: 12px; border-radius: var(--radius-pill); margin: 0 3px; position: relative; z-index: 1; }
.lane.s .bar { grid-row: 1; align-self: end; margin-bottom: 1px; }
.lane.h .bar { grid-row: 2; align-self: start; margin-top: 1px; }
.bar.s { background: var(--green); }
.bar.h { background: var(--sun); }
.bar.wl { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; }
.bar.wr { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.bar.long { height: auto; font-style: normal; font-size: 11px; font-weight: 700; color: var(--rabi); background: repeating-linear-gradient(135deg, var(--sun-soft) 0 6px, transparent 6px 12px); padding: 0 8px; line-height: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@media (max-width: 600px) {
  .cal2-table { min-width: 700px; }
  .cal2-row { grid-template-columns: 148px repeat(12, minmax(46px, 1fr)); }
  .cal2-row.crop { background-position: 148px 0; background-size: calc(100% - 148px) 100%;
    background-image: repeating-linear-gradient(90deg, transparent 0 calc(100% / 12 - 1px), color-mix(in srgb, var(--line) 55%, transparent) 0 calc(100% / 12)); }
  .cal2-name { padding: 6px 8px 6px 10px; gap: 8px; }
  .cal2-name img, .cal2-name .ph { width: 30px; height: 30px; }
  .cal2-name b { font-size: 13px; }
}

.cal2-name .thumb { position: relative; flex: none; display: block; }
.sow-dot { position: absolute; right: -3px; top: -3px; width: 11px; height: 11px; border-radius: 50%; background: var(--green); border: 2px solid var(--surface); }
.sow-dot.static { position: static; width: 10px !important; height: 10px !important; border-radius: 50% !important; border: 0; }
.cal2-name b { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; line-height: 1.25; }
.lang-ta .cal2-name b { font-size: 13px; }
.cal2-row.crop { grid-template-rows: minmax(18px, auto) minmax(18px, auto); }
.cal2-name b { overflow-wrap: anywhere; }
/* Organic cards: three per row on desktop, two on tablets, one on phones */
.org-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (max-width: 960px) { .org-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .org-grid { grid-template-columns: 1fr; } }
@media (min-width: 1280px) { .org-grid { grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); } }
.org-facts { gap: 8px 14px; }

/* Crop page calendar: continuous bars over the month track */
.crop-cal .bars i.seg { position: relative; z-index: 1; margin: 0 2px; border-radius: var(--radius-pill); }
.crop-cal .bars i.s.seg { background: var(--green); }
.crop-cal .bars i.h.seg { background: var(--sun); }
.lightbox img { min-width: min(320px, 80vw); background: color-mix(in srgb, var(--on-sidebar) 4%, transparent); }

/* ---------- Android app mode (Material Design 3) ----------
   kolam-m3.css (loaded after this file) builds the app bar, navigation bar and snackbar and maps the
   Kolam tokens onto the M3 colour roles. Here FarmerFriend's own components get M3 shapes. Only
   html.k-android (inside the Android app) is touched; the website keeps its Kolam look. */
html.k-android .back { display: none; } /* the app bar's back arrow and the phone's Back replace it */
html.k-android main { padding: 8px 16px 32px; }
html.k-android .page-title { font: var(--md-sys-typescale-headline-medium); margin: 8px 0; }
html.k-android .section-head h2 { font: var(--md-sys-typescale-title-large); }
html.k-android .card { border: 0; border-radius: var(--md-sys-shape-corner-medium); background: var(--md-sys-color-surface-container-low); box-shadow: var(--md-sys-elevation-level1); }
html.k-android .btn { min-height: 40px; padding: 0 24px; border-radius: var(--md-sys-shape-corner-full); font: var(--md-sys-typescale-label-large); }
html.k-android .btn-primary { background: var(--md-sys-color-primary); color: var(--md-sys-color-on-primary); }
html.k-android .btn-outline { background: transparent; color: var(--md-sys-color-primary); border-color: var(--md-sys-color-outline); }
html.k-android .icon-btn { border: 0; background: transparent; color: var(--md-sys-color-on-surface-variant); }
/* Filter chips: 32dp, 8dp corners, secondary container + check mark when selected */
html.k-android .chip { height: 32px; padding: 0 16px; display: inline-flex; align-items: center; border: 0; border-radius: var(--md-sys-shape-corner-small); background: transparent; box-shadow: inset 0 0 0 1px var(--md-sys-color-outline); color: var(--md-sys-color-on-surface-variant); font: var(--md-sys-typescale-label-large); }
html.k-android .chip.on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); box-shadow: none; padding-left: 8px; }
html.k-android .chip.on::before { content: ''; width: 18px; height: 18px; margin-right: 8px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.55 17.6 4.4 12.45l1.4-1.4 3.75 3.75 8.65-8.65 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M9.55 17.6 4.4 12.45l1.4-1.4 3.75 3.75 8.65-8.65 1.4 1.4z'/%3E%3C/svg%3E") center/contain no-repeat; }
/* Segmented buttons (calendar sort) */
html.k-android .seg { display: inline-flex; border-radius: var(--md-sys-shape-corner-full); box-shadow: inset 0 0 0 1px var(--md-sys-color-outline); background: transparent; padding: 0; gap: 0; overflow: hidden; }
html.k-android .seg button { height: 40px; padding: 0 12px; border: 0; border-radius: 0; background: transparent; color: var(--md-sys-color-on-surface); font: var(--md-sys-typescale-label-large); box-shadow: none; }
html.k-android .seg button + button { border-left: 1px solid var(--md-sys-color-outline); }
html.k-android .seg button.on { background: var(--md-sys-color-secondary-container); color: var(--md-sys-color-on-secondary-container); }
/* The location picker as an M3 dialog */
html.k-android dialog.sheet { border-radius: var(--md-sys-shape-corner-extra-large); background: var(--md-sys-color-surface-container-high); border: 0; }
html.k-android dialog.sheet h2 { font: var(--md-sys-typescale-headline-small); }
html.k-android .field input { height: 56px; border-radius: var(--md-sys-shape-corner-extra-small); border: 1px solid var(--md-sys-color-outline); background: transparent; }
html.k-android .tag { border-radius: var(--md-sys-shape-corner-small); }

/* ---------- iOS app mode (Apple HIG) ----------
   kolam-ios.css (loaded after this file) builds the navigation bar, tab bar and sheets and maps the Kolam
   tokens onto iOS system colours. Here FarmerFriend's own components get iOS shapes. Only html.k-ios
   (inside the iOS app) is touched; the website keeps its Kolam look. */
html.k-ios .topbar, html.k-ios .back { display: none; } /* nav bar + tab bar + edge swipe replace them */
html.k-ios main { padding: 0 16px 32px; }
html.k-ios .page-title { font: 700 28px/1.214 var(--ios-font-display); letter-spacing: .013em; margin: 4px 0 8px; }
html.k-ios body.lang-ta .page-title { font-family: "Noto Sans Tamil", var(--ios-font); font-size: 24px; line-height: 1.45; }
html.k-ios .eyebrow:not(.season-card .eyebrow) { font: 400 13px/1.385 var(--ios-font); letter-spacing: 0; text-transform: none; color: var(--ios-label2); }
html.k-ios .section-head h2 { font: 700 22px/1.273 var(--ios-font-display); letter-spacing: -.012em; }
html.k-ios .card { border: 0; box-shadow: none; border-radius: var(--ios-radius-card); background: var(--ios-grouped2); }
html.k-ios .btn { min-height: 44px; padding: 0 20px; border: 0; border-radius: 999px; font: 600 17px/22px var(--ios-font); letter-spacing: -.024em; }
html.k-ios .btn-primary { background: var(--ios-tint-fill); color: var(--ios-on-tint); }
html.k-ios .btn-outline { background: color-mix(in srgb, var(--ios-tint-fill) 15%, transparent); color: var(--ios-tint); }
html.k-ios .btn:active, html.k-ios .chip:active { opacity: .6; }
html.k-ios .icon-btn { border: 0; background: var(--ios-fill3); color: var(--ios-label); }
/* Filter chips become gray capsules; the selected one is tinted (HIG has no chips) */
html.k-ios .chip { min-height: 34px; padding: 0 14px; border: 0; background: var(--ios-fill3); color: var(--ios-label); font: 500 15px/34px var(--ios-font); letter-spacing: -.015em; }
html.k-ios .chip.on { background: var(--ios-tint-fill); color: var(--ios-on-tint); }
html.k-ios .tag { border-radius: 999px; font-family: var(--ios-font); font-weight: 600; }
/* Segmented control */
html.k-ios .seg { background: var(--ios-fill3); border: 0; border-radius: 999px; padding: 2px; gap: 0; }
html.k-ios .seg button { min-height: 32px; border-radius: 999px; font: 500 13px/1.2 var(--ios-font); color: var(--ios-label); }
html.k-ios .seg button.on { background: var(--ios-elevated, #fff); color: var(--ios-label); box-shadow: 0 3px 8px rgba(0,0,0,.12), 0 1px 1px rgba(0,0,0,.04); font-weight: 600; }
/* Search field: filled, rounded, no border */
html.k-ios .search { margin: 8px 0 14px; }
html.k-ios .search svg { left: 12px; width: 18px; height: 18px; color: var(--ios-label2); }
html.k-ios .search input { min-height: 44px; padding: 0 14px 0 38px; border: 0; border-radius: 999px; background: var(--ios-fill3); color: var(--ios-label); font: 400 17px/1.294 var(--ios-font); }
html.k-ios .search input::placeholder { color: var(--ios-placeholder); }
/* The location picker as an iOS sheet */
html.k-ios dialog.sheet { margin: auto 0 0; width: 100%; max-width: 100%; border-radius: var(--ios-radius-sheet) var(--ios-radius-sheet) 0 0; background: var(--ios-grouped); padding-bottom: env(safe-area-inset-bottom); }
html.k-ios dialog.sheet::backdrop { background: var(--ios-scrim); }
html.k-ios .sheet-head h2 { font: 600 17px/22px var(--ios-font); }
html.k-ios .field { font: 400 13px/1.385 var(--ios-font); color: var(--ios-label2); text-transform: uppercase; }
html.k-ios .field input { min-height: 44px; border: 0; border-radius: 12px; background: var(--ios-grouped2); text-transform: none; font: 400 17px/1.294 var(--ios-font); }
