:root {
  --g900: #0f3d24;
  --g800: #14532d;
  --g700: #1f7a3a;
  --g600: #2a8f49;
  --g100: #e3f4e8;
  --g50: #f2faf4;
  --text: #1a2a20;
  --muted: #5b6b61;
  --border: #d5e6da;
  --bg: #f4faf6;
  --card: #fff;
  --danger: #b3261e;
  --danger-bg: #fdecea;
  --warn: #8a5a00;
  --warn-bg: #fff4dc;
  --blue: #1565c0;
  --blue-bg: #e8f1fd;
  --radius: 16px;
  --shadow: 0 1px 2px rgb(0 0 0 / 6%), 0 6px 18px rgb(31 122 58 / 10%);
  --font: system-ui, -apple-system, "Segoe UI", "Noto Sans Gurmukhi", "Noto Sans Devanagari", "Nirmala UI", Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 17px; line-height: 1.5; color: var(--text); background: var(--bg); -webkit-text-size-adjust: 100%; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
button { font: inherit; }

/* top bar for inner screens */
.topbar { position: sticky; top: 0; z-index: 5; display: grid; grid-template-columns: 44px 1fr auto; align-items: center; gap: 8px;
  padding: calc(8px + env(safe-area-inset-top)) 12px 8px; background: #fff; border-bottom: 1px solid var(--border); }
.topbar h1 { margin: 0; font-size: 18px; text-align: center; color: var(--g900); }
.icon-btn { width: 44px; height: 44px; border: 0; border-radius: 50%; background: var(--g50); color: var(--g800); font-size: 30px; line-height: 1; cursor: pointer; }
.lang-chip select { font-size: 14px; color: var(--g900); background: var(--g50); border: 1px solid var(--border); border-radius: 999px; padding: 7px 10px; max-width: 34vw; }
.lang-chip.light select { background: rgb(255 255 255 / 90%); border: 0; }

main { max-width: 560px; margin: 0 auto; padding: 14px 16px calc(32px + env(safe-area-inset-bottom)); }
main:has(.home:not([hidden])) { padding-top: 0; }

/* home */
.hero { margin: 0 -16px; padding: calc(14px + env(safe-area-inset-top)) 18px 0; background: linear-gradient(165deg, #d9f3e0 0%, #bfe8cb 55%, #8fd3a5 100%); position: relative; overflow: hidden; border-radius: 0 0 28px 28px; }
.hero-top { display: flex; justify-content: space-between; align-items: center; }
.brand { display: flex; align-items: center; gap: 10px; }
.brand img { border-radius: 10px; background: #fff; padding: 2px; }
.brand div { display: flex; flex-direction: column; line-height: 1.15; color: var(--g800); }
.brand b { font-size: 18px; }
.brand small { font-size: 11px; color: var(--g700); }
.hero-title { font-size: 30px; line-height: 1.2; margin: 22px 0 6px; color: var(--g900); }
.hero-sub { margin: 0 0 8px; color: var(--g800); max-width: 75%; }
.hero-art { display: block; width: calc(100% + 36px); margin: 0 -18px; }
.tiles { display: grid; gap: 10px; margin: -18px 0 8px; position: relative; }
.tile { display: flex; align-items: center; gap: 12px; text-align: left; width: 100%; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 14px; box-shadow: var(--shadow); cursor: pointer; color: var(--text); }
.tile.main { background: linear-gradient(135deg, var(--g700), var(--g800)); color: #fff; border: 0; padding: 18px 14px; }
.tile-ic { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; font-size: 24px; background: rgb(255 255 255 / 20%); flex: none; }
.tile-ic.green { background: var(--g100); } .tile-ic.blue { background: var(--blue-bg); } .tile-ic.amber { background: var(--warn-bg); }
.tile-ic.whatsapp { background: #25D366; }
.tile-tx { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.tile-tx b { font-size: 18px; } .tile-tx small { font-size: 13px; opacity: .8; }
.chev { font-size: 26px; opacity: .6; }
.link-btn { display: block; margin: 8px auto 0; background: none; border: 0; color: var(--g700); font-weight: 600; padding: 10px; cursor: pointer; }
.link-btn.danger { color: var(--danger); }

/* stepper */
.stepper { display: flex; justify-content: center; gap: 0; list-style: none; padding: 0; margin: 4px 0 14px; counter-reset: s; }
.stepper li { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; background: #fff; border: 2px solid var(--border); color: var(--muted); font-weight: 700; position: relative; }
.stepper li + li { margin-left: 44px; }
.stepper li + li::before { content: ""; position: absolute; right: 100%; top: 50%; width: 44px; height: 2px; background: var(--border); }
.stepper li.on { background: var(--g700); border-color: var(--g700); color: #fff; }
.stepper li.done { background: var(--g100); border-color: var(--g600); color: var(--g700); }

.card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); padding: 16px; margin-bottom: 14px; }
.card.center { text-align: center; padding: 28px 16px; }
.label { display: block; font-weight: 700; margin: 14px 0 6px; }
.label:first-child { margin-top: 0; }
.tip { color: var(--muted); font-size: 14px; margin: 8px 0 0; }
.tips ul { margin: 8px 0 0; padding-left: 0; list-style: none; }
.tips li { padding-left: 26px; position: relative; margin-bottom: 4px; }
.tips li::before { content: "✓"; position: absolute; left: 0; color: var(--g700); font-weight: 800; }
.or { text-align: center; color: var(--muted); font-size: 13px; margin: 10px 0; }

.photo-box { border: 2px dashed var(--g600); border-radius: 14px; background: var(--g50); min-height: 200px; display: flex; align-items: center; justify-content: center; overflow: hidden; margin-bottom: 12px; cursor: pointer; }
.photo-box.dragover { background: var(--g100); }
.photo-box img { width: 100%; max-height: 340px; object-fit: contain; display: block; }
.photo-empty { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--g700); padding: 20px; text-align: center; }

.row { display: flex; gap: 10px; }
.row > .btn { flex: 1; }
.btn { border-radius: 12px; border: 0; cursor: pointer; padding: 12px 14px; min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-weight: 700; text-decoration: none; }
.btn.primary { background: linear-gradient(135deg, var(--g700), var(--g800)); color: #fff; }
.btn.secondary { background: var(--g100); color: var(--g900); }
.btn.whatsapp { background: #25D366; color: #fff; width: 100%; font-size: 17px; min-height: 54px; }
.btn.good { background: var(--g100); color: var(--g800); } .btn.bad { background: var(--danger-bg); color: var(--danger); }
.btn.call { background: #fff; color: var(--g800); border: 2px solid var(--g700); width: 100%; margin: 10px 0; }
.btn.wide { width: 100%; } .btn.small { min-height: 46px; flex: none; }
.btn.big { width: 100%; font-size: 18px; min-height: 56px; margin-top: 4px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn:focus-visible, .field:focus-visible, .icon-btn:focus-visible, select:focus-visible, textarea:focus-visible, .tile:focus-visible { outline: 3px solid #8cd39f; outline-offset: 2px; }
.field, textarea { width: 100%; font: inherit; color: var(--text); background: #fff; border: 1px solid var(--border); border-radius: 12px; padding: 12px; min-height: 48px; }
textarea { resize: vertical; }
.counter { text-align: right; font-size: 12px; color: var(--muted); margin: 2px 0 10px; }

.thumb-row { position: relative; margin-bottom: 14px; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); }
.thumb-row img { width: 100%; height: 170px; object-fit: cover; display: block; }
.x-btn { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border-radius: 50%; border: 0; background: #fff; font-size: 16px; cursor: pointer; box-shadow: var(--shadow); }

.seg { display: grid; grid-template-columns: repeat(auto-fit, minmax(76px, 1fr)); gap: 8px; }
.seg button { border: 2px solid var(--border); background: #fff; border-radius: 12px; padding: 10px 6px; font-weight: 700; color: var(--text); cursor: pointer; min-height: 48px; }
.seg button.on { border-color: var(--g700); background: var(--g100); color: var(--g800); }
.tabs { grid-template-columns: 1fr 1fr; margin-bottom: 12px; }

/* Ask a farming question: a real chat, input pinned near the bottom like a messaging app */
.ask-chat { display: flex; flex-direction: column; }
.ask-scroll { flex: 1 1 auto; }
.ask-input-bar { position: sticky; bottom: -32px; background: var(--bg); padding: 10px 0 calc(14px + env(safe-area-inset-bottom)); z-index: 4; }
.ask-input-bar .card { margin-bottom: 0; box-shadow: 0 -6px 16px rgb(0 0 0 / 7%), var(--shadow); }
.bot-icon { font-size: 44px; }

.chat-thread { display: flex; flex-direction: column; gap: 10px; margin-bottom: 14px; }
.chat-thread:empty { display: none; }
.chat-bubble { max-width: 86%; padding: 10px 14px; border-radius: 16px; font-size: 16px; line-height: 1.45; white-space: pre-wrap; box-shadow: var(--shadow); }
.chat-bubble.user { align-self: flex-end; background: var(--g700); color: #fff; border-bottom-right-radius: 4px; }
.chat-bubble.bot-msg { align-self: flex-start; background: var(--card); border: 1px solid var(--border); color: var(--text); border-bottom-left-radius: 4px; }
.chat-bubble.bot-msg.pending { color: var(--muted); font-style: italic; }

.alert { border-radius: 12px; padding: 12px 14px; margin-bottom: 14px; background: var(--danger-bg); color: var(--danger); border: 1px solid #f3c2bd; }
.alert.warn { background: var(--warn-bg); color: var(--warn); border-color: #f0d9a6; }
.disclaimer { font-size: 13px; color: var(--muted); text-align: center; margin: 12px 4px 0; }
.disclaimer.strong { background: var(--warn-bg); color: var(--warn); border-radius: 10px; padding: 10px 12px; font-size: 14px; }

/* loading */
.loader { text-align: center; padding: 10px 0; }
.ring { width: 120px; height: 120px; margin: 8px auto 14px; border-radius: 50%; display: grid; place-items: center; font-size: 46px; background: conic-gradient(var(--g700) 0 30%, var(--g100) 30% 100%); position: relative; animation: spin 1.8s linear infinite; }
.ring::before { content: ""; position: absolute; inset: 9px; background: var(--bg); border-radius: 50%; }
.ring span { position: relative; animation: spin 1.8s linear infinite reverse; }
@keyframes spin { to { transform: rotate(360deg); } }
.spinner { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 50%; border: 5px solid var(--g100); border-top-color: var(--g700); animation: spin 1s linear infinite; }
@media (prefers-reduced-motion: reduce) { .ring, .ring span, .spinner { animation-duration: 6s; } }
.loader h2 { font-size: 20px; margin: 0; }
.checklist { list-style: none; margin: 14px 0; padding: 14px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); }
.checklist li { display: flex; align-items: center; gap: 10px; padding: 8px 0; color: var(--muted); }
.checklist li i { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); display: grid; place-items: center; font-style: normal; font-size: 14px; flex: none; }
.checklist li.done { color: var(--text); } .checklist li.done i { background: var(--g700); border-color: var(--g700); color: #fff; }
.checklist li.now { color: var(--text); font-weight: 700; } .checklist li.now i { border-color: var(--g700); border-top-color: transparent; animation: spin 1s linear infinite; }
.note-box { background: var(--blue-bg); color: var(--blue); border-radius: 12px; padding: 12px 14px; text-align: center; font-size: 14px; }

/* result */
.result-head { display: flex; gap: 12px; align-items: center; margin-bottom: 14px; }
.result-photo { width: 112px; height: 112px; border-radius: 16px; overflow: hidden; flex: none; box-shadow: var(--shadow); background: #fff; }
.result-photo img { width: 100%; height: 100%; object-fit: cover; display: block; }
.result-title { min-width: 0; } .result-title h2 { margin: 2px 0; font-size: 22px; line-height: 1.2; color: var(--g900); } .result-title small { color: var(--muted); }
.conf-badge { display: inline-block; font-size: 13px; font-weight: 800; border-radius: 999px; padding: 3px 10px; margin-bottom: 4px; }
.conf-badge.high { background: #fde2e1; color: #9b1c15; } .conf-badge.medium { background: var(--warn-bg); color: var(--warn); } .conf-badge.low { background: var(--g100); color: var(--g800); } .conf-badge:empty { display: none; }
.weather { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; text-align: center; padding: 12px; }
.weather .w-title { grid-column: 1 / -1; text-align: left; font-weight: 800; color: var(--g900); }
.weather .w-item { background: var(--g50); border-radius: 12px; padding: 8px 2px; }
.weather .w-val { font-weight: 800; } .weather .w-lbl { font-size: 12px; color: var(--muted); }
.section h2 { display: flex; align-items: center; gap: 8px; font-size: 18px; margin: 0 0 8px; color: var(--g900); }
.section p { margin: 0 0 6px; }
.section ul { margin: 0; padding-left: 20px; } .section li { margin-bottom: 4px; }
.section.problems { border-left: 6px solid var(--g600); }
.section.todo ol { list-style: none; margin: 0; padding: 0; } .section.todo li { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 10px; }
.section.todo li b { flex: none; width: 28px; height: 28px; border-radius: 50%; background: var(--g700); color: #fff; display: grid; place-items: center; font-size: 14px; }
.section.wx { background: var(--blue-bg); border-color: #c4dcf8; }
.section.help { background: var(--warn-bg); border-color: #f0d9a6; }
.conf { display: inline-block; font-size: 12px; font-weight: 800; border-radius: 999px; padding: 1px 8px; vertical-align: 1px; }
.conf.high { background: #fde2e1; color: #9b1c15; } .conf.medium { background: var(--warn-bg); color: var(--warn); } .conf.low { background: var(--g100); color: var(--g900); }
.feedback .row { margin-top: 10px; }

/* ask */
.ask-intro { text-align: center; margin-bottom: 10px; } .ask-intro h2 { margin: 4px 0; font-size: 20px; } .ask-intro p { margin: 0; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 8px; }
.chips button { border: 1px solid var(--border); background: #fff; border-radius: 999px; padding: 8px 12px; font-size: 14px; color: var(--g800); cursor: pointer; }

/* weather */
.wx-main { background: linear-gradient(160deg, #e3f4ff, #fff); }
.wx-place { font-weight: 800; color: var(--g900); }
.wx-now { display: flex; align-items: center; gap: 12px; font-size: 46px; font-weight: 800; margin: 6px 0; } .wx-icon { font-size: 54px; }
.wx-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; text-align: center; }
.wx-stats div { background: #fff; border-radius: 12px; padding: 8px 2px; border: 1px solid var(--border); font-weight: 700; } .wx-stats small { display: block; color: var(--muted); font-weight: 400; font-size: 12px; }
.forecast { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 6px 0 14px; }
.forecast div { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 10px 4px; text-align: center; font-weight: 700; } .forecast small { display: block; color: var(--muted); font-weight: 400; }
.advisory { background: var(--warn-bg); border: 1px solid #f0d9a6; color: var(--warn); border-radius: 14px; padding: 12px 14px; }

/* history */
.hist-item { display: flex; gap: 12px; align-items: center; width: 100%; text-align: left; background: #fff; border: 1px solid var(--border); border-radius: var(--radius); padding: 10px; margin-bottom: 10px; box-shadow: var(--shadow); cursor: pointer; color: var(--text); }
.hist-item img, .hist-item .ph { width: 60px; height: 60px; border-radius: 12px; object-fit: cover; flex: none; background: var(--g100); display: grid; place-items: center; font-size: 28px; }
.hist-item b { display: block; } .hist-item small { color: var(--muted); }
.empty { text-align: center; color: var(--muted); padding: 30px 10px; }

.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom)); transform: translateX(-50%); background: var(--g900); color: #fff; padding: 10px 16px; border-radius: 999px; font-size: 14px; z-index: 20; max-width: 90vw; }
.section.todo li.subhead { display: block; margin: 12px 0 6px; }
.section.todo li.subhead:first-child { margin-top: 0; }
.section.todo .sub { color: var(--g800); font-size: 15px; text-transform: uppercase; letter-spacing: .03em; }
.section.prevent { border-left: 6px solid var(--g600); background: var(--g50); }
.section ul.detail { margin: 4px 0 8px; padding-left: 18px; color: var(--muted); font-size: 15px; list-style: circle; }
.section.problems > ul > li { margin-bottom: 10px; font-weight: 600; }
.section.problems ul.detail li { font-weight: 400; }

/* home animations (switched off when the phone asks for reduced motion) */
.sun { transform-origin: 40px 30px; animation: sunspin 24s linear infinite; }
.cloud { animation: drift 16s ease-in-out infinite alternate; }
.cloud.c2 { animation-duration: 22s; animation-direction: alternate-reverse; }
.sw { transform-box: fill-box; transform-origin: 50% 100%; animation: sway 3.2s ease-in-out infinite; }
.sw.s2 { animation-delay: -1s; } .sw.s3 { animation-delay: -2s; }
.sprout { transform-box: fill-box; transform-origin: 290px 112px; animation: grow 1.4s cubic-bezier(.2, .9, .3, 1.2) both, breathe 4s ease-in-out 1.4s infinite; }
.leaf { transform-box: fill-box; transform-origin: 0 100%; animation: flutter 3.6s ease-in-out infinite; }
.leaf.l2 { animation-delay: -1.8s; }
.hero-title, .hero-sub { animation: rise .7s ease-out both; }
.hero-sub { animation-delay: .12s; }
.tiles .tile { animation: rise .6s ease-out both; }
.tiles .tile:nth-child(1) { animation-delay: .2s; } .tiles .tile:nth-child(2) { animation-delay: .3s; }
.tiles .tile:nth-child(3) { animation-delay: .4s; } .tiles .tile:nth-child(4) { animation-delay: .5s; }
.tile.main { position: relative; overflow: hidden; }
.tile.main::after { content: ""; position: absolute; top: 0; left: -60%; width: 40%; height: 100%; background: linear-gradient(100deg, transparent, rgb(255 255 255 / 28%), transparent); animation: shine 4.5s ease-in-out 1.5s infinite; }
.tile.main .tile-ic { animation: pulse 2.4s ease-in-out infinite; }
.tile:active { transform: scale(.98); }
@keyframes sunspin { to { transform: rotate(360deg); } }
@keyframes drift { from { transform: translateX(-14px); } to { transform: translateX(16px); } }
@keyframes sway { 0%, 100% { transform: rotate(-7deg); } 50% { transform: rotate(7deg); } }
@keyframes grow { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
@keyframes breathe { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.04); } }
@keyframes flutter { 0%, 100% { transform: rotate(-3deg); } 50% { transform: rotate(5deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }
@keyframes shine { 0%, 60% { left: -60%; } 100% { left: 130%; } }
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.12); } }
@media (prefers-reduced-motion: reduce) {
  .sun, .cloud, .sw, .sprout, .leaf, .hero-title, .hero-sub, .tiles .tile, .tile.main::after, .tile.main .tile-ic { animation: none !important; }
}

/* weather animations */
.wx-main { position: relative; overflow: hidden; }
.wx-main > :not(.sky) { position: relative; z-index: 1; }
.sky { position: absolute; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.sky-clear { background: linear-gradient(160deg, #cdeaff, #fff 70%); }
.sky-cloudy, .sky-foggy { background: linear-gradient(160deg, #dfe8f0, #fff 75%); }
.sky-rainy, .sky-stormy { background: linear-gradient(160deg, #c3d1df, #eef3f8 80%); }
.sky-snowy { background: linear-gradient(160deg, #e6eefc, #fff 80%); }
.sky .glow { position: absolute; right: -30px; top: -30px; width: 150px; height: 150px; border-radius: 50%; background: radial-gradient(circle, rgb(255 214 92 / 75%), rgb(255 214 92 / 0%) 68%); animation: glow 3.6s ease-in-out infinite; }
.sky .wcloud { position: absolute; left: -60px; width: 90px; height: 28px; border-radius: 999px; background: rgb(255 255 255 / 85%); box-shadow: 22px -10px 0 4px rgb(255 255 255 / 85%), 46px 0 0 0 rgb(255 255 255 / 85%); animation: wdrift 16s linear infinite; }
.sky .drop { position: absolute; top: -14px; width: 2px; height: 14px; border-radius: 2px; background: rgb(60 110 170 / 55%); animation: fall .9s linear infinite; }
.sky .flake { position: absolute; top: -10px; width: 7px; height: 7px; border-radius: 50%; background: #fff; box-shadow: 0 0 4px rgb(120 150 200 / 60%); animation: snow 4.5s linear infinite; }
.sky .bolt { position: absolute; inset: 0; background: #fff; opacity: 0; animation: flash 6s ease-in-out infinite; }
.wx-icon { display: inline-block; animation: bob 3.6s ease-in-out infinite; }
.sky-clear .wx-icon { animation: bob 3.6s ease-in-out infinite, sunturn 18s linear infinite; }
.wx-stats div, .forecast div, .advisory { animation: rise .6s ease-out both; }
.wx-stats div:nth-child(2) { animation-delay: .1s; } .wx-stats div:nth-child(3) { animation-delay: .2s; }
.forecast div:nth-child(1) { animation-delay: .25s; } .forecast div:nth-child(2) { animation-delay: .35s; } .forecast div:nth-child(3) { animation-delay: .45s; }
.forecast div span { display: inline-block; animation: bob 3.2s ease-in-out infinite; }
.forecast div:nth-child(2) span { animation-delay: -1s; } .forecast div:nth-child(3) span { animation-delay: -2s; }
.advisory { animation-delay: .6s; }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .85; } 50% { transform: scale(1.18); opacity: 1; } }
@keyframes wdrift { from { transform: translateX(0); } to { transform: translateX(520px); } }
@keyframes fall { from { transform: translateY(0) rotate(12deg); opacity: .9; } to { transform: translateY(190px) rotate(12deg); opacity: 0; } }
@keyframes snow { from { transform: translate(0, 0); } 50% { transform: translate(14px, 95px); } to { transform: translate(-6px, 190px); } }
@keyframes flash { 0%, 92%, 100% { opacity: 0; } 94% { opacity: .75; } 96% { opacity: .1; } 97% { opacity: .6; } }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes sunturn { to { rotate: 360deg; } }
@media (prefers-reduced-motion: reduce) {
  .sky .glow, .sky .wcloud, .sky .drop, .sky .flake, .sky .bolt, .wx-icon, .wx-stats div, .forecast div, .forecast div span, .advisory { animation: none !important; }
}

/* logo: header emblem, loader */
.brand .emb { width: 46px; height: 46px; }
.emb-load { position: relative; z-index: 1; width: 64px; height: 64px; animation: logofloat 2.2s ease-in-out infinite; }
.ring { font-size: 0; }
.about-logo { display: block; margin: 10px auto; width: 170px; height: auto; cursor: pointer; }
@keyframes logofloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
.ring .emb-load { animation: spin 1.8s linear infinite reverse; }
@media (prefers-reduced-motion: reduce) { .ring .emb-load { animation-duration: 6s !important; animation: spin 6s linear infinite reverse !important; } }


/* logo intro: 5 seconds in total. 0-0.6 ivory in, 0.6-2 emblem builds, 2-2.8 circuit scan, 2.8-4 name rises, 4-5 highlight and settle */
.splash { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: #fbfbf4; pointer-events: none; opacity: 0; animation: ivory .625s ease-out forwards, splashout .375s ease-in 4.625s forwards; }
.splash.gone { display: none; }
.splash .stage { position: relative; width: min(72vw, 320px); aspect-ratio: 520 / 448; animation: settle 1s ease-out 4s both; }
.splash .ly { position: absolute; inset: 0; width: 100%; height: 100%; opacity: 0; }
.splash .ly-base { transform-origin: 50% 80%; animation: unfold 1.125s cubic-bezier(.25, .8, .3, 1) .625s forwards; }
.splash .ly-field { transform-origin: 50% 80%; animation: unfold 1.125s cubic-bezier(.25, .8, .3, 1) .625s forwards; }
.splash .ly-wheat { opacity: 1; clip-path: inset(100% 0 0 0); animation: rise-clip .875s ease-out 1s forwards; }
.splash .ly-sun { transform-origin: 64.4% 16.7%; animation: sunin .875s ease-out 1.125s forwards; }
.splash .ly-text { transform: translateY(12px); animation: textin 1.25s ease-out 2.75s forwards; }
.splash .pg { position: absolute; width: 5.5%; aspect-ratio: 1; margin: -2.75% 0 0 -2.75%; border-radius: 50%; border: 2px solid #2fae5a; opacity: 0; animation: ping 1.25s ease-out forwards; }
.splash .r1 { left: 61.7%; top: 28.1%; animation-delay: 1.875s; } .splash .r2 { left: 67.3%; top: 31.7%; animation-delay: 2.063s; }
.splash .r3 { left: 68.7%; top: 39.7%; animation-delay: 2.25s; } .splash .r4 { left: 67.7%; top: 47.3%; animation-delay: 2.438s; }
.splash .scan { position: absolute; inset: 0; clip-path: inset(25% 27% 48% 56%); -webkit-mask: url(layer-base.webp) center / 100% 100% no-repeat; mask: url(layer-base.webp) center / 100% 100% no-repeat; background: linear-gradient(100deg, transparent 38%, rgb(90 235 140 / 95%) 50%, transparent 62%) -160% 0 / 260% 100% no-repeat; animation: scanmove .875s ease-in-out 1.875s forwards; }
.splash .shine { position: absolute; inset: 0; -webkit-mask: url(logo-full.webp) center / 100% 100% no-repeat; mask: url(logo-full.webp) center / 100% 100% no-repeat; background: linear-gradient(105deg, transparent 40%, rgb(255 255 255 / 85%) 50%, transparent 60%) -160% 0 / 260% 100% no-repeat; animation: scanmove 1s ease-in-out 4s forwards; }
@keyframes ivory { to { opacity: 1; } }
@keyframes splashout { to { opacity: 0; visibility: hidden; } }
@keyframes unfold { from { opacity: 0; transform: scale(.88) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes draw { to { clip-path: inset(0 0 0 0); } }
@keyframes rise-clip { to { clip-path: inset(0 0 0 0); } }
@keyframes sunin { from { opacity: 0; transform: scale(.55); } to { opacity: 1; transform: none; } }
@keyframes textin { to { opacity: 1; transform: none; } }
@keyframes ping { 0% { opacity: .85; transform: scale(.5); } 100% { opacity: 0; transform: scale(2.4); } }
@keyframes scanmove { to { background-position: 160% 0; } }
@keyframes settle { from { transform: scale(1.03); } to { transform: scale(1); } }
@media (prefers-reduced-motion: reduce) {
  .splash { animation: ivory .25s ease-out forwards, splashout .375s ease-in 1.5s forwards; }
  .splash .stage, .splash .ly, .splash .pg, .splash .scan, .splash .shine { animation: none !important; }
  .splash .ly { opacity: 1; clip-path: none; transform: none; } .splash .pg, .splash .scan, .splash .shine { display: none; }
}

/* result header: crop first, then the problem */
.result-title .eyebrow { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: 12px; }
.result-title h2 { margin: 0 0 6px; font-size: 24px; }
.prob-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; }
.prob-row small { color: var(--muted); flex-basis: 100%; }
.prob-row b { font-size: 17px; color: var(--g800); }
.section.photos { background: var(--blue-bg); border-color: #c4dcf8; }
.section.photos h2 { color: var(--blue); }
