@import url('https://fonts.googleapis.com/css2?family=Chakra+Petch:wght@500;600;700&family=Plus+Jakarta+Sans:wght@400;500;600;700&display=swap');

:root {
  --bg: #070a12;
  --surface: #111723;
  --surface-soft: #161f2e;
  --ink: #e5edf7;
  --ink-soft: #9eb0c6;
  --line: #273548;
  --line-strong: #32445e;
  --primary: #7cead3;
  --primary-strong: #f4f9ff;
  --accent: #1ec49c;
  --accent-soft: rgba(30, 196, 156, 0.12);
  --warn: #ffbc62;
  --danger: #ff6f8e;
  --success: #56e6a7;
  --shadow-sm: 0 10px 26px rgba(0, 0, 0, 0.34);
  --shadow-md: 0 20px 48px rgba(0, 0, 0, 0.45);
  --radius-xs: 10px;
  --radius-sm: 14px;
  --radius-md: 18px;
  --radius-lg: 22px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  min-height: 100vh;
  overflow-x: hidden;
  color: var(--ink);
  font-family: 'Plus Jakarta Sans', sans-serif;
  position: relative;
  background:
    radial-gradient(circle at 8% 0%, rgba(64, 122, 255, 0.16), transparent 34%),
    radial-gradient(circle at 92% 0%, rgba(30, 196, 156, 0.12), transparent 30%),
    radial-gradient(circle at 50% 100%, rgba(255, 182, 92, 0.08), transparent 38%),
    linear-gradient(180deg, #070c16 0%, #060a13 56%, #050910 100%);
}

body::before {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    repeating-linear-gradient(
      120deg,
      rgba(255, 255, 255, 0.015) 0,
      rgba(255, 255, 255, 0.015) 1px,
      transparent 1px,
      transparent 16px
    );
}

body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background:
    radial-gradient(circle at 20% 22%, rgba(124, 234, 211, 0.08), transparent 26%),
    radial-gradient(circle at 77% 28%, rgba(103, 168, 255, 0.08), transparent 24%),
    linear-gradient(180deg, rgba(4, 7, 12, 0) 0%, rgba(3, 6, 10, 0.42) 100%);
}

#nutri-ambient-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
  opacity: 0.95;
}

.topbar,
main.container,
footer.container {
  position: relative;
  z-index: 2;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  max-width: 100%;
}

p,
li {
  line-height: 1.45;
}

h1,
h2,
h3,
h4 {
  margin-top: 0;
  color: var(--primary-strong);
  font-family: 'Chakra Petch', sans-serif;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(1.32rem, 2.15vw, 1.8rem);
}

h3 {
  font-size: clamp(1.09rem, 1.55vw, 1.34rem);
}

main.container {
  padding-bottom: 2rem;
}

.container {
  width: min(1160px, calc(100% - 2.1rem));
  margin: 0 auto;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 70;
  background: linear-gradient(140deg, rgba(7, 11, 18, 0.96) 0%, rgba(12, 19, 31, 0.95) 100%);
  border-bottom: 1px solid rgba(124, 234, 211, 0.16);
  box-shadow: 0 14px 30px rgba(0, 0, 0, 0.45);
  backdrop-filter: blur(10px);
}

.nav {
  display: grid;
  grid-template-columns: auto minmax(350px, 1fr) auto auto;
  gap: 0.65rem;
  align-items: center;
  padding: 0.74rem 0;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.62rem;
  color: var(--primary-strong);
  font-family: 'Chakra Petch', sans-serif;
  font-weight: 700;
  letter-spacing: 0.01em;
}

.brand-mark {
  width: 37px;
  height: 37px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  font-weight: 800;
  background: linear-gradient(145deg, #0f151f 0%, #1ec49c 100%);
  border: 1px solid rgba(124, 234, 211, 0.34);
  box-shadow: inset 0 0 0 1px rgba(124, 234, 211, 0.18), 0 8px 18px rgba(0, 0, 0, 0.4);
}

.nav-links {
  min-width: 0;
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  overflow-x: auto;
  gap: 0.24rem;
  padding: 0.22rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: rgba(124, 234, 211, 0.05);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  white-space: nowrap;
  border-radius: 999px;
  padding: 0.47rem 0.74rem;
  font-size: 0.88rem;
  font-weight: 700;
  color: rgba(229, 237, 247, 0.88);
  transition: background-color 0.18s ease, color 0.18s ease;
}

.nav-link:hover,
.nav-link:focus-visible,
.nav-link.active {
  background: linear-gradient(135deg, rgba(124, 234, 211, 0.2), rgba(30, 196, 156, 0.24));
  color: #eafff8;
}

.lang-widget,
.auth-controls {
  display: inline-flex;
  align-items: center;
  gap: 0.38rem;
  flex-wrap: nowrap;
}

.lang-widget input {
  width: 170px;
  min-width: 130px;
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.32);
  background: rgba(8, 13, 22, 0.85);
  color: #eafff7;
  padding: 0.45rem 0.6rem;
  font-size: 0.82rem;
}

.lang-widget input::placeholder {
  color: rgba(198, 217, 235, 0.75);
}

.topbar .btn-secondary {
  border: 1px solid rgba(124, 234, 211, 0.3);
  background: rgba(124, 234, 211, 0.1);
  color: #defef5;
}

.topbar .btn-secondary:hover,
.topbar .btn-secondary:focus-visible {
  background: rgba(124, 234, 211, 0.18);
}

.topbar .btn-primary {
  background: linear-gradient(140deg, #1ec49c, #79ebd1);
  color: #07121c;
  box-shadow: none;
}

.auth-user {
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.3);
  background: rgba(124, 234, 211, 0.1);
  color: #e8fff8;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.34rem 0.68rem;
}

.hero {
  margin-top: 1.15rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--line);
  background:
    linear-gradient(145deg, rgba(16, 24, 38, 0.94) 0%, rgba(13, 20, 33, 0.96) 100%),
    radial-gradient(circle at 0% 0%, rgba(124, 234, 211, 0.15), transparent 42%);
  box-shadow: var(--shadow-md);
}

.hero-split {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(270px, 0.85fr);
  gap: 1rem;
  padding: 1.15rem;
}

.hero-split > :only-child {
  grid-column: 1 / -1;
}

.hero-main {
  display: grid;
  align-content: start;
  gap: 0.82rem;
}

.hero-title-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.8rem;
}

.hero-title-row h1 {
  margin: 0;
}

.hero-inline-widget {
  width: min(360px, 100%);
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: linear-gradient(150deg, rgba(12, 22, 35, 0.96) 0%, rgba(11, 18, 30, 0.98) 100%);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.32);
  padding: 0.75rem;
  display: grid;
  gap: 0.42rem;
}

.hero-inline-widget h3 {
  margin: 0;
  font-size: 0.95rem;
}

.hero-inline-widget p {
  margin: 0;
  color: #b9ccdd;
  font-size: 0.86rem;
}

.hero-inline-widget .btn {
  justify-self: start;
}

.hero h1 {
  margin: 0;
  line-height: 1.06;
  color: #f3fbff;
  max-width: 14ch;
  font-size: clamp(2rem, 4.7vw, 3.45rem);
}

.hero p {
  margin: 0;
  max-width: 62ch;
  color: #b3c6da;
  font-size: 1.03rem;
}

.badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.26);
  background: rgba(124, 234, 211, 0.1);
  color: #b7f8e7;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 0.23rem 0.62rem;
}

.hero-side {
  border-radius: var(--radius-md);
  border: 1px solid rgba(124, 234, 211, 0.18);
  background:
    linear-gradient(145deg, #0f1723 0%, #10253a 72%),
    radial-gradient(circle at 80% 0%, rgba(124, 234, 211, 0.24), transparent 38%);
  color: #d6ecff;
  padding: 0.95rem;
  box-shadow: 0 18px 34px rgba(8, 35, 58, 0.28);
}

.hero-side h3 {
  color: #ffffff;
  margin-bottom: 0.58rem;
}

.flow-list {
  margin: 0;
  padding-left: 1.05rem;
  display: grid;
  gap: 0.38rem;
  color: rgba(232, 247, 255, 0.95);
}

.flow-list strong {
  color: #ffffff;
}

.home-quick-actions {
  margin-top: 0.2rem;
}

.quick-action-card {
  display: grid;
  gap: 0.55rem;
  align-content: start;
  background: var(--surface-soft);
}

.quick-action-card .btn {
  justify-self: start;
}

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.54rem;
}

.btn {
  appearance: none;
  border: 0;
  cursor: pointer;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1;
  padding: 0.72rem 0.96rem;
  transition: transform 0.16s ease, box-shadow 0.16s ease, background-color 0.16s ease;
}

.btn:hover,
.btn:focus-visible {
  transform: translateY(-1px);
}

.btn:focus-visible {
  outline: 3px solid rgba(18, 122, 112, 0.22);
  outline-offset: 2px;
}

.btn-small {
  font-size: 0.8rem;
  padding: 0.52rem 0.74rem;
}

.btn-primary {
  color: #05141f;
  background: linear-gradient(140deg, #21c8a2 0%, #81efdc 100%);
  box-shadow: 0 10px 24px rgba(2, 9, 15, 0.45);
}

.btn-secondary {
  border: 1px solid rgba(124, 234, 211, 0.24);
  background: rgba(124, 234, 211, 0.08);
  color: #d2fdf1;
}

.btn-secondary:hover,
.btn-secondary:focus-visible {
  background: rgba(124, 234, 211, 0.16);
}

.btn-danger {
  background: var(--danger);
  color: #fff;
}

.section {
  padding-block: 1rem;
}

.page-header {
  padding: 1.55rem 0 0.78rem;
}

.page-title {
  margin: 0;
  color: var(--primary-strong);
  line-height: 1.06;
  font-size: clamp(1.85rem, 3.5vw, 2.7rem);
}

.page-desc,
.subtle,
.small-text,
.field-hint {
  color: var(--ink-soft);
}

.page-desc {
  margin-top: 0.4rem;
  max-width: 68ch;
}

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 1rem;
}

.card {
  min-width: 0;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
  padding: 1rem;
  backdrop-filter: blur(4px);
  animation: riseIn 360ms ease both;
}

.feature-card {
  position: relative;
  padding-top: 1.25rem;
}

.feature-card::before {
  content: '';
  position: absolute;
  top: 0.8rem;
  left: 1rem;
  width: 42px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0f3557, #127a70);
}

.kpi {
  display: grid;
  gap: 0.22rem;
  margin-top: 0.54rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 234, 211, 0.16);
  background: var(--surface-soft);
  padding: 0.72rem 0.8rem;
}

.kpi strong {
  color: var(--primary-strong);
  font-family: Manrope, sans-serif;
  font-size: 1.12rem;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.84rem;
}

.field {
  min-width: 0;
  display: grid;
  gap: 0.35rem;
}

.field label {
  color: var(--primary-strong);
  font-weight: 700;
}

.required-field-label::after {
  content: ' *';
  color: var(--danger);
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong);
  background: rgba(10, 16, 26, 0.92);
  color: var(--ink);
  padding: 0.62rem 0.72rem;
  font: inherit;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

input::placeholder,
textarea::placeholder {
  color: #7f93ab;
}

input:focus,
select:focus,
textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(18, 122, 112, 0.19);
}

input[list]::-webkit-calendar-picker-indicator {
  opacity: 0.78;
}

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.5rem;
}

.checkbox-item {
  display: flex;
  align-items: center;
  gap: 0.42rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: rgba(10, 16, 26, 0.82);
  padding: 0.5rem 0.56rem;
}

.checkbox-item input {
  width: auto;
  accent-color: var(--accent);
}

.scroll-grid {
  max-height: 330px;
  overflow: auto;
  padding-right: 0.25rem;
}

.search-row {
  margin: 0.55rem 0 0.64rem;
}

.progress {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 53, 87, 0.12);
  overflow: hidden;
}

.progress > span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #127a70 0%, #0f3557 100%);
  transition: width 0.2s ease;
}

.alert {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 234, 211, 0.24);
  background: rgba(124, 234, 211, 0.08);
  padding: 0.72rem 0.8rem;
}

.alert-danger {
  border-color: rgba(255, 111, 142, 0.45);
  background: rgba(255, 111, 142, 0.14);
}

.alert-warn {
  border-color: rgba(255, 188, 98, 0.45);
  background: rgba(255, 188, 98, 0.12);
}

.alert-success {
  border-color: rgba(86, 230, 167, 0.45);
  background: rgba(86, 230, 167, 0.12);
}

.risk-ring {
  width: 146px;
  aspect-ratio: 1;
  border-radius: 50%;
  margin: 0 auto;
  display: grid;
  place-items: center;
  background:
    radial-gradient(circle closest-side, #0f1520 77%, transparent 78% 100%),
    conic-gradient(var(--ring-color, var(--accent)) calc(var(--ring-progress, 0) * 1%), rgba(15, 53, 87, 0.14) 0);
}

.risk-ring strong {
  color: var(--primary-strong);
  font-family: Manrope, sans-serif;
  font-size: 1.48rem;
}

.table {
  width: 100%;
  border-collapse: collapse;
}

.table th,
.table td {
  border-bottom: 1px solid var(--line);
  padding: 0.58rem;
  text-align: left;
  vertical-align: top;
}

.table th {
  color: #c9ffe9;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.82rem;
}

.map-shell {
  display: grid;
  grid-template-columns: 350px minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.map-frame {
  position: relative;
}

#resource-map {
  height: 560px;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

#resource-map .leaflet-popup-content {
  margin: 0.52rem 0.62rem;
}

#resource-map .leaflet-control-attribution {
  font-size: 0.66rem;
  background: rgba(11, 17, 28, 0.78);
  color: #a2b5c8;
  padding: 0.08rem 0.36rem;
}

.map-loading {
  position: absolute;
  right: 0.72rem;
  top: 0.72rem;
  z-index: 1000;
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 999px;
  background: rgba(4, 10, 17, 0.94);
  color: #fff;
  padding: 0.4rem 0.66rem;
  font-size: 0.76rem;
  font-weight: 700;
  box-shadow: 0 12px 22px rgba(10, 39, 64, 0.28);
}

.map-loading-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: #99efe3;
  animation: mapPulse 1s ease-in-out infinite;
}

@keyframes mapPulse {
  0%,
  100% {
    opacity: 0.36;
    transform: scale(0.9);
  }
  50% {
    opacity: 1;
    transform: scale(1.1);
  }
}

.map-label {
  background: transparent;
  border: 0;
}

.map-label span {
  display: inline-block;
  white-space: nowrap;
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: rgba(8, 14, 23, 0.86);
  color: rgba(207, 248, 235, 0.95);
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1.2;
  padding: 0.08rem 0.34rem;
}

.map-suggestions {
  margin-top: 0.2rem;
  border-radius: var(--radius-xs);
  border: 1px solid var(--line-strong);
  background: #0e1522;
  max-height: 190px;
  overflow: auto;
  box-shadow: 0 10px 20px rgba(10, 39, 64, 0.1);
}

.map-suggestion {
  width: 100%;
  border: 0;
  text-align: left;
  background: transparent;
  padding: 0.46rem 0.62rem;
  cursor: pointer;
  color: var(--ink);
  font: inherit;
}

.map-suggestion + .map-suggestion {
  border-top: 1px solid var(--line);
}

.map-suggestion:hover,
.map-suggestion:focus-visible {
  background: rgba(18, 122, 112, 0.13);
}

.map-feedback {
  margin: 0.18rem 0 0;
}

.map-location-confirm {
  margin: 0.5rem 0 0;
  color: var(--success);
  font-weight: 700;
}

.map-status {
  min-height: 1.2rem;
}

.map-status-info {
  color: var(--ink-soft);
}

.map-status-ok {
  color: var(--success);
}

.map-status-warn {
  color: var(--warn);
}

.map-stats {
  display: grid;
  gap: 0.24rem;
  margin-top: 0.4rem;
}

.map-stat-line {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.map-empty-state {
  margin-top: 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(15, 53, 87, 0.14);
  background: linear-gradient(180deg, #121a28 0%, #0f1824 100%);
  padding: 0.74rem;
}

.map-empty-state h4 {
  margin: 0.34rem 0;
}

.map-empty-icon {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(18, 122, 112, 0.16);
  color: var(--primary);
  font-family: Manrope, sans-serif;
  font-weight: 700;
  font-size: 0.82rem;
}

.resource-list {
  display: grid;
  gap: 0.58rem;
  max-height: 540px;
  overflow: auto;
  transition: opacity 0.18s ease;
}

.resource-list.is-loading {
  opacity: 0.56;
}

.resource-item {
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: #0f1724;
  padding: 0.72rem;
  cursor: pointer;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.resource-item:hover,
.resource-item:focus-visible {
  border-color: rgba(18, 122, 112, 0.44);
  box-shadow: 0 12px 22px rgba(10, 39, 64, 0.11);
  transform: translateY(-1px);
}

.resource-item-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.45rem;
}

.resource-distance {
  flex-shrink: 0;
  border-radius: 999px;
  background: rgba(124, 234, 211, 0.12);
  color: var(--primary);
  font-size: 0.74rem;
  font-weight: 700;
  padding: 0.2rem 0.5rem;
}

.resource-meta {
  margin-top: 0.32rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.resource-hours,
.resource-services {
  color: var(--ink-soft);
  font-size: 0.82rem;
}

.resource-services {
  margin-top: 0.34rem;
}

.tag {
  display: inline-block;
  margin-right: 0.3rem;
  border-radius: 999px;
  background: rgba(18, 122, 112, 0.15);
  color: var(--primary);
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.2rem 0.52rem;
}

.tag.tag-clinic {
  background: rgba(177, 46, 64, 0.15);
  color: #8e1f31;
}

.tag.tag-food-support {
  background: rgba(169, 100, 22, 0.2);
  color: #7c4b0d;
}

.tag.tag-ngo {
  background: rgba(15, 53, 87, 0.14);
  color: #0f3557;
}

.map-resource-pin,
.map-resource-pin-muted {
  display: inline-block;
  border-radius: 50%;
}

.map-resource-pin {
  width: 14px;
  height: 14px;
  border: 2px solid #fff;
  box-shadow: 0 4px 9px rgba(10, 39, 64, 0.24);
}

.map-resource-pin-clinic {
  background: #b12e40;
}

.map-resource-pin-food-support {
  background: #a96416;
}

.map-resource-pin-ngo {
  background: #0f3557;
}

.map-resource-pin-muted {
  width: 9px;
  height: 9px;
  border: 1px solid rgba(15, 53, 87, 0.28);
  background: rgba(15, 53, 87, 0.16);
}

.map-cluster {
  background: rgba(15, 53, 87, 0.18);
  border-radius: 50%;
}

.map-cluster-badge {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 2px solid #09131f;
  color: #fff;
  display: grid;
  place-items: center;
  font-family: 'Chakra Petch', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  background: linear-gradient(145deg, #0f3557, #1a6189);
  box-shadow: 0 8px 18px rgba(10, 39, 64, 0.24);
}

.map-popup {
  max-width: 230px;
}

.map-popup-title {
  margin-bottom: 0.3rem;
  line-height: 1.2;
}

.map-popup-meta,
.map-popup-services,
.map-popup-hours {
  color: var(--ink-soft);
  font-size: 0.8rem;
}

.metric-grid,
.lesson-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.metric {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #101826;
  padding: 0.84rem;
}

.metric span {
  color: var(--ink-soft);
  font-size: 0.84rem;
}

.metric strong {
  display: block;
  margin-top: 0.2rem;
  color: var(--primary-strong);
  font-family: Manrope, sans-serif;
  font-size: 1.2rem;
}

.lesson-card {
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: #101826;
  padding: 0.95rem;
}

.action-hero {
  display: grid;
  gap: 0.74rem;
}

.tool-tabs-shell {
  display: grid;
  grid-template-columns: minmax(225px, 260px) minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tool-tabs-nav {
  position: sticky;
  top: 5.3rem;
  display: grid;
  gap: 0.45rem;
  border-radius: var(--radius-sm);
  border: 1px solid var(--line);
  background: rgba(10, 17, 28, 0.92);
  box-shadow: var(--shadow-sm);
  padding: 0.55rem;
}

.tool-tab-btn {
  appearance: none;
  display: block;
  width: 100%;
  text-align: left;
  border-radius: 10px;
  border: 1px solid transparent;
  background: transparent;
  color: var(--ink-soft);
  font-weight: 700;
  padding: 0.56rem 0.68rem;
  cursor: pointer;
  transition: border-color 0.18s ease, background-color 0.18s ease, color 0.18s ease;
}

.tool-tab-btn:hover,
.tool-tab-btn:focus-visible {
  border-color: rgba(124, 234, 211, 0.45);
  background: rgba(124, 234, 211, 0.14);
  color: #e5fff6;
}

.tool-tab-btn.active {
  border-color: rgba(124, 234, 211, 0.74);
  background: rgba(124, 234, 211, 0.2);
  color: #effff9;
}

.tool-tabs-panels {
  min-width: 0;
}

.tool-focus-actions {
  margin-bottom: 0.65rem;
}

.tool-panel {
  display: none !important;
}

.tool-panel.is-active {
  display: grid !important;
  animation: panelFade 0.22s ease;
}

.tool-tabs-shell.overview-mode .tool-panel {
  display: grid !important;
  animation: none;
}

.tool-tabs-shell.overview-mode .tool-tab-btn.active {
  border-color: transparent;
  background: transparent;
  color: var(--ink-soft);
}

.tool-tabs-shell.single-tool-view {
  grid-template-columns: 1fr;
}

.tool-tabs-shell.single-tool-view .tool-tabs-nav {
  display: none;
}

@keyframes panelFade {
  from {
    opacity: 0.2;
    transform: translateY(3px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes riseIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.action-tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.95rem;
}

.tool-card {
  display: grid;
  gap: 0.45rem;
  align-content: start;
}

.restriction-lock {
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: rgba(124, 234, 211, 0.06);
  padding: 0.72rem;
  margin-bottom: 0.75rem;
}

.tool-result {
  margin-top: 0.72rem;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: linear-gradient(180deg, #101927 0%, #0c1420 100%);
  padding: 0.74rem;
}

.result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.4rem;
}

.confidence-meter {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: rgba(124, 234, 211, 0.14);
  overflow: hidden;
  margin: 0.28rem 0 0.1rem;
}

.confidence-meter-bar {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #f0a24b 0%, #65e4bd 100%);
}

.summary-audience-field {
  margin-top: 0.7rem;
  margin-bottom: 0.2rem;
}

.severity-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.2rem 0.58rem;
  font-family: Manrope, sans-serif;
  font-size: 0.77rem;
  font-weight: 800;
}

.severity-low {
  background: rgba(27, 106, 73, 0.15);
  color: #155638;
}

.severity-moderate {
  background: rgba(169, 100, 22, 0.2);
  color: #704208;
}

.severity-high {
  background: rgba(177, 46, 64, 0.15);
  color: #861f31;
}

.severity-urgent {
  background: rgba(177, 46, 64, 0.24);
  color: #761627;
}

.tool-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.52rem;
}

.tool-columns {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.tool-columns h4 {
  margin: 0.22rem 0 0.4rem;
}

.tool-columns ul,
.tool-columns ol,
.tool-result ul,
.tool-result ol,
#hub-food-results ul,
#risk-reasons-list,
#actions-list {
  margin: 0;
  padding-left: 1.03rem;
  display: grid;
  gap: 0.32rem;
}

.voice-last-summary {
  margin-top: 0.66rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 234, 211, 0.18);
  background: rgba(124, 234, 211, 0.08);
  color: var(--ink-soft);
  font-size: 0.9rem;
  padding: 0.6rem;
}

.recipe-widget-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 0.9rem;
}

.recipe-tabs-shell {
  margin-top: 0.9rem;
}

.recipe-tabs-nav {
  position: static;
}

.recipe-tool {
  display: grid;
  gap: 0.45rem;
  align-content: start;
  box-shadow: none;
}

.recipe-tool h4 {
  margin-bottom: 0.1rem;
}

.recipe-result {
  min-height: 56px;
  margin-top: 0.42rem;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: rgba(124, 234, 211, 0.06);
  color: var(--ink-soft);
  font-size: 0.88rem;
  padding: 0.58rem;
}

.recipe-result.is-loading {
  opacity: 0.72;
}

.recipe-result .recipe-list {
  margin: 0;
  padding-left: 1.03rem;
  display: grid;
  gap: 0.3rem;
}

.recipe-result .recipe-mini-card {
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: #0f1724;
  padding: 0.45rem;
  margin-bottom: 0.42rem;
}

.recipe-result .recipe-mini-card:last-child {
  margin-bottom: 0;
}

.lesson-card-strong {
  display: grid;
  gap: 0.52rem;
}

.lesson-card-strong h3,
.lesson-card-strong h4 {
  margin: 0;
}

.lesson-card-strong ul {
  margin: 0;
  padding-left: 1.03rem;
  display: grid;
  gap: 0.35rem;
}

.lesson-card-strong li {
  color: var(--ink-soft);
}

.voice-script {
  display: grid;
  gap: 0.4rem;
}

.voice-script p {
  margin: 0;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 234, 211, 0.18);
  background: rgba(124, 234, 211, 0.08);
  color: var(--ink-soft);
  padding: 0.56rem 0.64rem;
}

.voice-script p.spoken-active {
  border-color: rgba(18, 122, 112, 0.44);
  background: rgba(18, 122, 112, 0.14);
  color: var(--primary-strong);
  box-shadow: 0 0 0 3px rgba(18, 122, 112, 0.14);
}

.myth-result-card {
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: linear-gradient(180deg, #101927 0%, #0c141f 100%);
}

.claim-result-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 0.32rem;
}

.tag.claim-badge-myth {
  background: rgba(177, 46, 64, 0.15);
  color: #8e1f31;
}

.tag.claim-badge-depends {
  background: rgba(169, 100, 22, 0.22);
  color: #704208;
}

.tag.claim-badge-fact {
  background: rgba(27, 106, 73, 0.15);
  color: #155638;
}

.next-step-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.8rem;
}

.next-step-grid .card {
  box-shadow: none;
  border: 1px solid var(--line);
  background: #0f1724;
}

.selected-foods {
  display: flex;
  flex-wrap: wrap;
  gap: 0.42rem;
  margin-top: 0.64rem;
}

.selected-food-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.34rem;
  border-radius: 999px;
  border: 1px solid rgba(124, 234, 211, 0.3);
  background: rgba(124, 234, 211, 0.14);
  color: #d9fff3;
  font-size: 0.8rem;
  font-weight: 700;
  padding: 0.24rem 0.54rem;
}

.selected-food-chip button {
  border: 0;
  background: transparent;
  color: var(--primary);
  font-weight: 800;
  line-height: 1;
  padding: 0;
  cursor: pointer;
}

#hub-food-results .card {
  box-shadow: none;
}

.meal-builder-results {
  transition: opacity 0.2s ease;
}

.meal-idea-item {
  list-style: none;
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 234, 211, 0.22);
  background: rgba(124, 234, 211, 0.08);
  padding: 0.55rem 0.65rem;
}

.meal-idea-name {
  display: block;
  margin-bottom: 0.2rem;
  color: var(--primary-strong);
  font-family: Manrope, sans-serif;
}

.auth-shell {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.history-list {
  display: grid;
  gap: 0.58rem;
}

.history-compare-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.72rem;
  margin-top: 0.22rem;
}

.history-item {
  border-radius: var(--radius-xs);
  border: 1px solid var(--line);
  background: #101826;
  padding: 0.65rem 0.72rem;
}

.assessment-history-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.44rem;
}

.assessment-history-meta .small-text {
  margin: 0;
}

.assessment-compare-table td:first-child {
  width: 220px;
  color: #cde8de;
  font-weight: 700;
}

.footer {
  padding: 1.45rem 0 2rem;
  color: var(--ink-soft);
  font-size: 0.9rem;
}

.status-msg {
  margin-top: 0.45rem;
  font-size: 0.9rem;
}

.status-ok {
  color: var(--success);
}

.status-err {
  color: var(--danger);
}

.action-plan-strip {
  margin: 0.7rem 0;
  display: grid;
  gap: 0.5rem;
}

.action-plan-item {
  border-radius: var(--radius-xs);
  border: 1px solid rgba(124, 234, 211, 0.2);
  background: rgba(124, 234, 211, 0.08);
  padding: 0.52rem 0.62rem;
}

.action-plan-item strong {
  color: #cbfff0;
}

.action-plan-item p {
  margin: 0.22rem 0 0;
}

.hide {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

@media (max-width: 1180px) {
  .nav {
    grid-template-columns: auto minmax(0, 1fr) auto;
  }

  .auth-controls {
    grid-column: 3;
  }

  .lang-widget {
    grid-column: 1 / -1;
    justify-self: end;
  }

  .map-shell {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 980px) {
  .grid-3,
  .grid-2,
  .lesson-grid,
  .metric-grid,
  .checkbox-grid,
  .form-grid,
  .next-step-grid,
  .tool-columns,
  .action-tool-grid,
  .tool-tabs-shell,
  .auth-shell,
  .history-compare-grid,
  .hero-split {
    grid-template-columns: 1fr;
  }

  .tool-tabs-nav {
    position: static;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #resource-map {
    height: 430px;
  }
}

@media (max-width: 760px) {
  .container {
    width: min(1160px, calc(100% - 1.2rem));
  }

  .nav {
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .brand {
    justify-self: start;
  }

  .nav-links {
    width: 100%;
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .lang-widget,
  .auth-controls {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .lang-widget input {
    width: auto;
    min-width: 0;
    flex: 1 1 auto;
  }

  .tool-tabs-nav {
    grid-template-columns: 1fr;
  }

  .hero {
    margin-top: 0.95rem;
  }

  .hero-title-row {
    flex-direction: column;
    align-items: flex-start;
  }

  .hero-split {
    padding: 0.92rem;
  }

  .hero h1 {
    max-width: none;
    font-size: clamp(1.72rem, 7vw, 2.45rem);
  }

  .btn {
    min-height: 42px;
  }

  #resource-map {
    height: 370px;
  }
}
