/* ============================================================
   GREENIFY - Ortak stil dosyası
   1. Değişkenler ve sıfırlama
   2. Ortak parçalar (buton, çip, panel, toast)
   3. Tanıtım sayfası (index.html)
   4. Uygulama düzeni (app.html)
   5. Uygulama bileşenleri
   6. Duyarlı düzen
   ============================================================ */

/* --- 1. Değişkenler --------------------------------------- */

:root {
  --forest: #0f5e48;
  --forest-dark: #073f32;
  --leaf: #8fbe78;
  --lime: #c8d66a;
  --earth: #8a6b52;
  --clay: #c66b45;
  --cream: #f6f1e7;
  --paper: #fffaf0;
  --ink: #17352b;
  --muted: #6f7a68;
  --line: rgba(15, 94, 72, 0.16);
  --shadow-sm: 0 6px 18px rgba(10, 48, 37, 0.08);
  --shadow: 0 18px 44px rgba(10, 48, 37, 0.12);
  --radius: 18px;
  --radius-lg: 26px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Author display:grid/flex must not override an explicitly hidden UI state. */
[hidden] { display: none !important; }

body {
  margin: 0;
  font-family: "Inter", "Segoe UI", Arial, sans-serif;
  color: var(--ink);
  background: var(--cream);
  -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
  margin: 0;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p {
  margin: 0;
  line-height: 1.6;
}

img {
  max-width: 100%;
  display: block;
}

button,
input,
output {
  font: inherit;
  color: inherit;
}

button {
  cursor: pointer;
}

a {
  color: inherit;
}

ol,
ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

dl,
dd {
  margin: 0;
}

:focus-visible {
  outline: 3px solid var(--leaf);
  outline-offset: 2px;
}

/* --- 2. Ortak parçalar ------------------------------------ */

.muted {
  color: var(--muted);
  font-size: 0.86rem;
}

.kicker {
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--forest);
  margin-bottom: 10px;
}

.primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 22px;
  border: none;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease, transform 0.18s ease;
}

.primary-action:hover {
  background: var(--forest-dark);
  transform: translateY(-1px);
}

.primary-action:disabled {
  background: var(--muted);
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}

.ghost-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 22px;
  border: 1.5px solid var(--forest);
  border-radius: 999px;
  background: transparent;
  color: var(--forest);
  font-weight: 600;
  text-decoration: none;
  transition: background 0.18s ease;
}

.ghost-action:hover {
  background: rgba(15, 94, 72, 0.08);
}

.text-action {
  border: none;
  background: none;
  padding: 0;
  color: var(--forest);
  font-weight: 600;
  font-size: 0.86rem;
}

.text-action:hover {
  text-decoration: underline;
}

.auth-help {
  align-self: flex-start;
}

.chip {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border-radius: 999px;
  background: rgba(15, 94, 72, 0.07);
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 600;
  white-space: nowrap;
}

.chip--points {
  background: var(--lime);
  color: var(--forest-dark);
}

.chip--sdg {
  background: rgba(198, 107, 69, 0.14);
  color: #9a4b2b;
}

.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-sm);
}

.panel > h3 {
  margin-bottom: 14px;
  font-size: 1.05rem;
}

.empty {
  padding: 26px;
  border: 1.5px dashed var(--line);
  border-radius: var(--radius);
  color: var(--muted);
  text-align: center;
}

.toast {
  position: fixed;
  left: 50%;
  bottom: 96px;
  transform: translate(-50%, 20px);
  padding: 12px 22px;
  border-radius: 999px;
  background: var(--forest-dark);
  color: var(--paper);
  font-weight: 600;
  font-size: 0.9rem;
  box-shadow: var(--shadow);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.22s ease, transform 0.22s ease;
  z-index: 60;
}

.toast.is-visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

.toast--warn {
  background: var(--earth);
}

/* --- 3. Tanıtım sayfası ----------------------------------- */

.site-body {
  background:
    radial-gradient(circle at 88% -6%, rgba(200, 214, 106, 0.4), transparent 30rem),
    radial-gradient(circle at 4% 12%, rgba(143, 190, 120, 0.28), transparent 26rem),
    var(--cream);
}

.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 22px 0;
}

.site-brand,
.sidebar-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: var(--forest-dark);
  text-decoration: none;
}

.site-brand img,
.sidebar-brand img {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  object-fit: cover;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 26px;
  font-size: 0.92rem;
  font-weight: 500;
}

.site-nav a:not(.primary-action) {
  text-decoration: none;
  color: var(--muted);
}

.site-nav a:not(.primary-action):hover {
  color: var(--forest);
}

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  align-items: center;
  gap: 50px;
  width: min(1140px, calc(100% - 40px));
  margin: 40px auto 20px;
  padding: 10px 0 40px;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.4rem);
  margin-bottom: 20px;
}

.hero h1 em {
  font-style: normal;
  color: var(--forest);
}

.lede {
  font-size: 1.05rem;
  color: #35513f;
  max-width: 52ch;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin: 30px 0;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 34px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
}

.hero-facts dt {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--forest);
}

.hero-facts dd {
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-visual {
  position: relative;
  display: grid;
  place-items: center;
  padding: 30px;
}

.hero-visual::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 250, 240, 0.95), rgba(200, 214, 106, 0.35));
  box-shadow: var(--shadow);
}

.hero-visual img {
  position: relative;
  width: min(360px, 100%);
  border-radius: 28px;
}

.section {
  width: min(1140px, calc(100% - 40px));
  margin: 0 auto;
  padding: 56px 0;
}

.section > h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 12px;
}

.section-lede {
  color: var(--muted);
  max-width: 60ch;
  margin-bottom: 28px;
}

.step-grid,
.area-grid {
  display: grid;
  gap: 18px;
  margin-top: 28px;
}

.step-grid {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.area-grid {
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
}

.step-grid article,
.area-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 26px;
  box-shadow: var(--shadow-sm);
}

.step-grid h3,
.area-grid h3 {
  margin: 14px 0 8px;
  font-size: 1.05rem;
}

.step-grid p,
.area-grid p {
  color: var(--muted);
  font-size: 0.92rem;
}

.step-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: var(--forest);
  color: var(--paper);
  font-weight: 800;
}

.area-grid article > span {
  font-size: 1.7rem;
}

.sdg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 18px;
  margin-top: 28px;
}

.sdg-card {
  border-radius: var(--radius-lg);
  padding: 30px;
  color: var(--paper);
  box-shadow: var(--shadow);
}

.sdg-card--12 {
  background: linear-gradient(140deg, var(--earth), #a9865f);
}

.sdg-card--13 {
  background: linear-gradient(140deg, var(--forest), #147a5c);
}

.sdg-code {
  display: inline-block;
  padding: 5px 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.sdg-card h3 {
  margin: 16px 0 10px;
  font-size: 1.3rem;
}

.sdg-card p {
  font-size: 0.94rem;
  opacity: 0.92;
}

.sdg-link {
  display: inline-block;
  margin-top: 16px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  color: var(--paper);
  font-size: 0.86rem;
  font-weight: 600;
  text-decoration: none;
  transition: background 0.16s ease;
}

.sdg-link:hover {
  background: rgba(255, 255, 255, 0.34);
}

.cookbook > div {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 40px;
  box-shadow: var(--shadow-sm);
  max-width: 68ch;
}

.cookbook p {
  color: var(--muted);
  margin-bottom: 24px;
}

.cookbook h2 {
  font-size: clamp(1.6rem, 3vw, 2.1rem);
  margin-bottom: 14px;
}

.site-footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 34px;
  width: min(1140px, calc(100% - 40px));
  margin: 30px auto 0;
  padding: 36px 0 50px;
  border-top: 1px solid var(--line);
}

.site-footer p {
  color: var(--muted);
  font-size: 0.9rem;
  max-width: 46ch;
  margin-top: 6px;
}

.site-footer dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(140px, auto));
  gap: 16px 34px;
}

.site-footer dt {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.site-footer dd {
  font-weight: 600;
  font-size: 0.92rem;
}

/* --- 4. Uygulama düzeni ----------------------------------- */

.app-body {
  background: var(--cream);
}

.layout {
  display: grid;
  grid-template-columns: 244px 1fr;
  min-height: 100vh;
}

.sidebar {
  display: flex;
  flex-direction: column;
  gap: 26px;
  padding: 26px 20px;
  background: var(--forest-dark);
  color: var(--paper);
  position: sticky;
  top: 0;
  height: 100vh;
}

.sidebar-brand {
  color: var(--paper);
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.sidebar-nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  width: 100%;
  padding: 12px 14px;
  border: none;
  border-radius: 14px;
  background: transparent;
  color: rgba(255, 250, 240, 0.72);
  font-weight: 600;
  font-size: 0.94rem;
  text-align: left;
  transition: background 0.16s ease, color 0.16s ease;
}

.sidebar-nav button:hover {
  background: rgba(255, 255, 255, 0.08);
  color: var(--paper);
}

.sidebar-nav button.is-active {
  background: var(--leaf);
  color: var(--forest-dark);
}

.nav-icon {
  font-size: 1.05rem;
}

.sidebar-foot {
  margin-top: auto;
  padding-top: 18px;
  border-top: 1px solid rgba(255, 255, 255, 0.14);
}

.sidebar-foot .muted {
  color: var(--lime);
  font-weight: 700;
  letter-spacing: 0.08em;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.sidebar-foot p {
  font-size: 0.82rem;
  opacity: 0.7;
  margin-top: 6px;
}

.content {
  padding: 30px clamp(20px, 4vw, 44px) 60px;
  max-height: 100vh;
  overflow-y: auto;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 26px;
}

.topbar h1 {
  font-size: 1.7rem;
}

.topbar-stats {
  display: flex;
  gap: 10px;
}

.pill {
  display: flex;
  align-items: baseline;
  gap: 6px;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
}

.pill strong {
  font-size: 1.15rem;
}

.pill small {
  font-size: 0.72rem;
  opacity: 0.8;
}

.pill--streak {
  background: var(--clay);
}

.view {
  display: none;
  flex-direction: column;
  gap: 18px;
  animation: rise 0.22s ease;
}

.view.is-active {
  display: flex;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
}

.view-title h2 {
  font-size: 1.5rem;
  margin: 4px 0 6px;
}

.section-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 8px;
}

.section-heading h3 {
  font-size: 1.1rem;
}

/* --- 5. Uygulama bileşenleri ------------------------------ */

.level-card {
  background: linear-gradient(135deg, var(--forest), #14795b);
  color: var(--paper);
  border-radius: var(--radius-lg);
  padding: 24px;
  box-shadow: var(--shadow);
}

.level-card-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.level-card .muted,
.level-card .text-action {
  color: rgba(255, 250, 240, 0.78);
}

.level-card h3 {
  font-size: 1.4rem;
  margin-top: 4px;
}

.level-bar {
  height: 10px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.22);
  overflow: hidden;
}

.level-bar span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--lime);
  transition: width 0.4s ease;
}

.level-card p {
  margin-top: 12px;
  font-size: 0.86rem;
}

.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 14px;
}

.stat-grid article {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.stat-grid span {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-bottom: 6px;
}

.stat-grid strong {
  font-size: 1.5rem;
  color: var(--forest-dark);
}

.panel-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 14px;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.panel-head h3 {
  font-size: 1.02rem;
  margin-top: 4px;
  max-width: 22ch;
}

.progress-ring {
  display: grid;
  place-items: center;
  width: 78px;
  height: 78px;
  flex-shrink: 0;
  border-radius: 50%;
  background: conic-gradient(
    var(--forest) calc(var(--value) * 1%),
    rgba(15, 94, 72, 0.12) 0
  );
}

.progress-ring span {
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--paper);
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--forest-dark);
}

.week-chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 8px;
  height: 104px;
}

.week-chart .bar {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.week-chart .bar > span {
  width: 100%;
  min-height: 4px;
  border-radius: 8px 8px 4px 4px;
  background: var(--leaf);
  transition: height 0.3s ease;
}

.week-chart .bar.is-today > span {
  background: var(--forest);
}

.week-chart small {
  font-size: 0.68rem;
  color: var(--muted);
}

.learning-card .tag {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--lime);
  color: var(--forest-dark);
  font-size: 0.7rem;
  font-weight: 700;
}

.learning-card h4 {
  margin: 14px 0 8px;
  font-size: 1.05rem;
}

.learning-card p {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Filtreler */

.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.filter-chips {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: thin;
}

.filter-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--paper);
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.16s ease;
}

.filter-chip:hover {
  border-color: var(--forest);
  color: var(--forest);
}

.filter-chip.is-selected {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

.filter-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.segment-control {
  display: inline-flex;
  padding: 4px;
  border-radius: 999px;
  background: rgba(15, 94, 72, 0.08);
}

.segment-control button {
  padding: 9px 18px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.86rem;
  font-weight: 600;
  transition: all 0.16s ease;
}

.segment-control button.is-selected {
  background: var(--paper);
  color: var(--forest-dark);
  box-shadow: var(--shadow-sm);
}

.switch {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.86rem;
  color: var(--muted);
  cursor: pointer;
}

.switch input {
  width: 18px;
  height: 18px;
  accent-color: var(--forest);
  cursor: pointer;
}

/* Görev kartları */

.task-group + .task-group {
  margin-top: 26px;
}

.group-heading {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-bottom: 12px;
}

.group-heading h4 {
  font-size: 1rem;
}

.group-heading span {
  font-size: 0.78rem;
  color: var(--muted);
}

.task-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.task-card {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 16px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, opacity 0.16s ease;
}

.task-card:hover {
  border-color: var(--leaf);
}

.task-card.is-done {
  opacity: 0.62;
  background: rgba(143, 190, 120, 0.12);
}

.task-card.is-done h4 {
  text-decoration: line-through;
  text-decoration-color: var(--muted);
}

.task-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 14px;
  background: rgba(15, 94, 72, 0.08);
  font-size: 1.25rem;
}

.task-body h4 {
  font-size: 0.98rem;
  margin-bottom: 4px;
}

.task-body p {
  font-size: 0.85rem;
  color: var(--muted);
  margin-bottom: 8px;
}

.task-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.task-toggle {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  flex-shrink: 0;
  border: 1.5px solid var(--forest);
  border-radius: 50%;
  background: transparent;
  color: var(--forest);
  font-size: 1.15rem;
  font-weight: 700;
  transition: all 0.16s ease;
}

.task-toggle:hover {
  background: var(--forest);
  color: var(--paper);
}

.task-card.is-done .task-toggle {
  background: var(--forest);
  border-color: var(--forest);
  color: var(--paper);
}

/* Rozetler */

.badge-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
}

.badge-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 22px 18px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  opacity: 0.66;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.badge-card.is-earned {
  opacity: 1;
  border-color: var(--leaf);
  background: linear-gradient(160deg, var(--paper), rgba(200, 214, 106, 0.24));
}

.badge-card.is-earned:hover {
  transform: translateY(-3px);
}

.badge-symbol {
  font-size: 2rem;
  filter: grayscale(1);
}

.badge-card.is-earned .badge-symbol {
  filter: none;
}

.badge-card h4 {
  margin: 10px 0 6px;
  font-size: 0.96rem;
}

.badge-card p {
  font-size: 0.8rem;
  color: var(--muted);
  min-height: 2.6em;
}

.badge-progress {
  height: 6px;
  margin: 12px 0 6px;
  border-radius: 999px;
  background: rgba(15, 94, 72, 0.12);
  overflow: hidden;
}

.badge-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--forest);
  transition: width 0.35s ease;
}

.badge-card small {
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
}

.level-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 12px 16px;
  border-radius: 12px;
  color: var(--muted);
  border: 1px solid transparent;
}

.level-list li.is-reached {
  color: var(--ink);
  background: rgba(143, 190, 120, 0.14);
}

.level-list li.is-current {
  border-color: var(--forest);
  background: rgba(15, 94, 72, 0.1);
}

.level-list span {
  font-size: 0.82rem;
}

/* BMSKA modülleri */

.module-tabs {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
}

.module-tab {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 14px 18px;
  border: 1.5px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  text-align: left;
  transition: border-color 0.16s ease, background 0.16s ease;
}

.module-tab strong {
  font-size: 0.76rem;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.module-tab span {
  font-size: 1rem;
  font-weight: 700;
  color: var(--forest-dark);
}

.module-tab:hover {
  border-color: var(--forest);
}

.module-tab.is-selected {
  border-color: var(--forest);
  background: rgba(15, 94, 72, 0.08);
}

.module-tab.is-selected strong {
  color: var(--forest);
}

.module-hero {
  padding: 30px;
  border-radius: var(--radius-lg);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.module-hero--12 {
  background: linear-gradient(140deg, var(--earth), #a9865f);
}

.module-hero--13 {
  background: linear-gradient(140deg, var(--forest), #147a5c);
}

.module-hero h2 {
  font-size: 1.6rem;
  margin: 14px 0 6px;
}

.module-tagline {
  font-size: 1rem;
  font-weight: 600;
  opacity: 0.9;
  margin-bottom: 14px;
}

.module-hero p:last-child {
  font-size: 0.94rem;
  opacity: 0.92;
  max-width: 68ch;
}

.target-list {
  display: grid;
  gap: 10px;
  margin-bottom: 14px;
}

.target-list li {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 12px;
  background: rgba(15, 94, 72, 0.06);
  font-size: 0.92rem;
  line-height: 1.55;
}

.target-code {
  flex-shrink: 0;
  padding: 3px 10px;
  border-radius: 999px;
  background: var(--forest);
  color: var(--paper);
  font-size: 0.72rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.lesson-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 14px;
}

.lesson-card {
  display: flex;
  flex-direction: column;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.lesson-card.is-read {
  background: rgba(143, 190, 120, 0.12);
  border-color: rgba(143, 190, 120, 0.5);
}

.lesson-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

.lesson-head h4 {
  font-size: 1.02rem;
}

.lesson-card p {
  font-size: 0.9rem;
  color: var(--muted);
  margin-bottom: 12px;
}

.lesson-takeaway {
  padding: 10px 14px;
  border-left: 3px solid var(--leaf);
  border-radius: 0 10px 10px 0;
  background: rgba(200, 214, 106, 0.2);
  color: var(--forest-dark) !important;
  font-weight: 600;
  font-size: 0.88rem !important;
}

.lesson-card > button {
  margin-top: auto;
  align-self: flex-start;
}

.lesson-card > button:disabled {
  cursor: default;
  opacity: 0.65;
}

.module-scale {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.module-scale .muted {
  display: block;
  margin-bottom: 12px;
}

/* Atık ayrıştırma oyunu */

.game-start .recipe-items {
  margin-bottom: 16px;
}

.game-start .muted {
  display: block;
  margin-bottom: 18px;
}

.game-hud {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  margin-bottom: 14px;
}

.game-hud-item {
  display: flex;
  flex-direction: column;
  min-width: 62px;
}

.game-hud-item span {
  font-size: 0.7rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
}

.game-hud-item strong {
  font-size: 1.15rem;
  color: var(--forest-dark);
  font-variant-numeric: tabular-nums;
}

.game-streak {
  margin-left: auto;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(15, 94, 72, 0.08);
  color: var(--muted);
  font-size: 0.8rem;
  font-weight: 700;
}

.game-streak.is-hot {
  background: var(--clay);
  color: var(--paper);
}

.game-stage {
  display: grid;
  place-items: center;
  gap: 12px;
  min-height: 200px;
  padding: 26px 20px;
  border-radius: var(--radius-lg);
  background: linear-gradient(160deg, rgba(200, 214, 106, 0.28), rgba(255, 250, 240, 0.9));
  border: 1px solid var(--line);
  margin-bottom: 14px;
}

.game-item {
  display: grid;
  place-items: center;
  gap: 8px;
  animation: pop 0.25s ease;
}

@keyframes pop {
  from {
    opacity: 0;
    transform: scale(0.82);
  }
}

.game-item-icon {
  font-size: 3.6rem;
  line-height: 1;
}

.game-item-name {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--forest-dark);
  text-align: center;
}

.game-feedback {
  min-height: 2.8em;
  max-width: 46ch;
  text-align: center;
  font-size: 0.88rem;
  font-weight: 600;
  color: transparent;
}

.game-feedback.is-good {
  color: var(--forest);
}

.game-feedback.is-bad {
  color: #9a4b2b;
}

.bin-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

.bin {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 8px;
  border: 2px solid var(--line);
  border-radius: var(--radius);
  background: var(--paper);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.14s ease, transform 0.14s ease, background 0.14s ease;
}

.bin:hover {
  border-color: var(--forest);
  transform: translateY(-2px);
}

.bin.is-correct {
  border-color: var(--forest);
  background: rgba(143, 190, 120, 0.32);
}

.bin-icon {
  font-size: 1.7rem;
}

.bin-label {
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--forest-dark);
  text-align: center;
  line-height: 1.25;
}

.game-result h3 {
  font-size: 1.5rem;
  margin-bottom: 16px;
}

.game-result .score-compare {
  margin-bottom: 14px;
}

.game-result .muted {
  display: block;
  margin-bottom: 18px;
}

@media (max-width: 560px) {
  .bin-row {
    grid-template-columns: repeat(2, 1fr);
  }

  .game-item-icon {
    font-size: 3rem;
  }
}

/* Tarifler */

.cookbook-intro h3 {
  font-size: 1.25rem;
  margin-bottom: 10px;
}

.cookbook-intro p {
  color: var(--muted);
  font-size: 0.94rem;
  margin-bottom: 14px;
  max-width: 68ch;
}

.recipe-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.recipe-card {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: border-color 0.16s ease, transform 0.16s ease;
}

.recipe-card:hover {
  border-color: var(--leaf);
  transform: translateY(-2px);
}

.recipe-visual {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  flex-shrink: 0;
  border-radius: 18px;
  background: rgba(198, 107, 69, 0.13);
  font-size: 1.7rem;
}

.recipe-body {
  min-width: 0;
}

.recipe-course {
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  font-weight: 600;
  margin-bottom: 4px;
}

.recipe-card h4 {
  font-size: 1.05rem;
  margin-bottom: 10px;
}

.recipe-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 12px;
}

/* Tarif detay penceresi */

.recipe-dialog {
  width: min(680px, calc(100% - 32px));
  max-height: 86vh;
  padding: 0;
  border: none;
  border-radius: var(--radius-lg);
  background: var(--paper);
  color: var(--ink);
  box-shadow: var(--shadow);
  overflow: visible;
}

.recipe-dialog::backdrop {
  background: rgba(7, 63, 50, 0.5);
  backdrop-filter: blur(2px);
}

#recipeDetail {
  max-height: 86vh;
  overflow-y: auto;
  padding: 30px;
}

.dialog-close {
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border: none;
  border-radius: 50%;
  background: rgba(15, 94, 72, 0.1);
  color: var(--forest-dark);
  font-size: 1.3rem;
  line-height: 1;
  z-index: 2;
}

.dialog-close:hover {
  background: var(--forest);
  color: var(--paper);
}

.recipe-detail-head {
  display: flex;
  align-items: flex-start;
  gap: 16px;
  padding-right: 40px;
  padding-bottom: 20px;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--line);
}

.recipe-detail-icon {
  display: grid;
  place-items: center;
  width: 62px;
  height: 62px;
  flex-shrink: 0;
  border-radius: 20px;
  background: rgba(198, 107, 69, 0.13);
  font-size: 1.9rem;
}

.recipe-detail-head h3 {
  font-size: 1.4rem;
  margin: 4px 0 10px;
}

.recipe-block {
  margin-bottom: 22px;
}

.recipe-block h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--forest);
  margin-bottom: 10px;
}

.recipe-items li,
.recipe-steps li {
  font-size: 0.94rem;
  line-height: 1.6;
  margin-bottom: 8px;
}

.recipe-items li {
  padding-left: 20px;
  position: relative;
}

.recipe-items li::before {
  content: "";
  position: absolute;
  left: 4px;
  top: 0.62em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--leaf);
}

.recipe-steps {
  counter-reset: step;
}

.recipe-steps li {
  padding-left: 34px;
  position: relative;
  counter-increment: step;
}

.recipe-steps li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0.1em;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--forest);
  color: var(--paper);
  font-size: 0.76rem;
  font-weight: 700;
}

.recipe-why {
  padding: 20px;
  border-radius: var(--radius);
  background: rgba(143, 190, 120, 0.16);
  border: 1px solid rgba(143, 190, 120, 0.5);
  margin-bottom: 16px;
}

.recipe-why h4 {
  font-size: 0.95rem;
  margin-bottom: 8px;
  color: var(--forest-dark);
}

.recipe-why p {
  font-size: 0.92rem;
  color: #35513f;
}

/* Ölçek ek bileşenleri */

.notice {
  padding: 14px 18px;
  border: 1px solid rgba(198, 107, 69, 0.35);
  border-left: 4px solid var(--clay);
  border-radius: 12px;
  background: rgba(198, 107, 69, 0.08);
  font-size: 0.88rem;
  color: #6d3b23;
}

.notice code {
  padding: 1px 6px;
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.7);
  font-size: 0.85em;
}

.status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.test-card > .chip {
  margin-bottom: 12px;
}

.test-actions {
  display: flex;
  gap: 10px;
}

.test-actions .primary-action {
  flex: 1;
}

.scale-option {
  display: flex;
  align-items: center;
  gap: 12px;
}

.scale-number {
  display: grid;
  place-items: center;
  width: 26px;
  height: 26px;
  flex-shrink: 0;
  border-radius: 50%;
  background: rgba(15, 94, 72, 0.1);
  font-size: 0.78rem;
  font-weight: 700;
}

.scale-option.is-selected .scale-number {
  background: rgba(255, 255, 255, 0.24);
}

.table-scroll {
  overflow-x: auto;
  margin-top: 18px;
}

.dimension-table {
  width: 100%;
  min-width: 460px;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.dimension-table th,
.dimension-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid var(--line);
}

.dimension-table thead th {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  font-weight: 700;
}

.dimension-table tbody th {
  font-weight: 600;
}

.dimension-table tbody th .chip {
  margin-left: 8px;
}

.dimension-table td {
  font-variant-numeric: tabular-nums;
  color: var(--muted);
  font-weight: 600;
}

.dimension-table tbody tr:last-child th,
.dimension-table tbody tr:last-child td {
  border-bottom: none;
}

.is-positive {
  color: var(--forest);
}

.score-compare strong.is-positive {
  color: var(--forest);
}

/* Profil */

.profile-hero {
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 22px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

.profile-hero img {
  width: 72px;
  height: 72px;
  border-radius: 22px;
  object-fit: cover;
}

.name-field {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 6px;
}

.name-field input {
  display: block;
  margin-top: 4px;
  padding: 8px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--cream);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  width: min(280px, 100%);
}

.slider-row {
  display: grid;
  gap: 10px;
}

.slider-row > span {
  font-weight: 600;
  font-size: 0.94rem;
}

.slider-row input {
  width: 100%;
  accent-color: var(--forest);
}

.slider-row output {
  font-size: 0.84rem;
  color: var(--muted);
  font-weight: 600;
}

.profile-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
}

.profile-stats div {
  padding: 14px 16px;
  border-radius: 14px;
  background: rgba(15, 94, 72, 0.06);
}

.profile-stats span {
  display: block;
  font-size: 0.76rem;
  color: var(--muted);
  margin-bottom: 4px;
}

.profile-stats strong {
  font-size: 1.2rem;
  color: var(--forest-dark);
}

.danger-panel {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-color: rgba(198, 107, 69, 0.4);
}

.danger-panel h3 {
  margin-bottom: 4px;
  font-size: 1rem;
}

.danger-panel .ghost-action {
  border-color: var(--clay);
  color: var(--clay);
}

.danger-panel .ghost-action:hover {
  background: rgba(198, 107, 69, 0.1);
}

/* --- 6. Duyarlı düzen ------------------------------------- */

@media (max-width: 900px) {
  .hero {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .hero-visual {
    order: -1;
    padding: 0;
  }

  .hero-visual img {
    width: min(220px, 60%);
  }

  .site-nav a:not(.primary-action) {
    display: none;
  }
}

/* Yan menü telefonda alt menüye dönüşür */
@media (max-width: 760px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    top: auto;
    height: auto;
    flex-direction: row;
    gap: 0;
    padding: 8px;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -8px 30px rgba(10, 48, 37, 0.24);
    z-index: 50;
  }

  .sidebar-brand,
  .sidebar-foot {
    display: none;
  }

  /* Sekme sayısı arttı: alt menü yatay kaydırılır */
  .sidebar-nav {
    flex-direction: row;
    width: 100%;
    overflow-x: auto;
    scrollbar-width: none;
  }

  .sidebar-nav::-webkit-scrollbar {
    display: none;
  }

  .sidebar-nav button {
    flex: 0 0 auto;
    min-width: 62px;
    flex-direction: column;
    gap: 3px;
    padding: 8px 6px;
    border-radius: 12px;
    text-align: center;
  }

  .nav-label {
    font-size: 0.66rem;
    font-weight: 600;
  }

  .content {
    max-height: none;
    overflow: visible;
    padding: 22px 18px 110px;
  }

  .topbar h1 {
    font-size: 1.35rem;
  }

  .task-card {
    grid-template-columns: auto 1fr;
    grid-template-areas:
      "icon body"
      "action action";
  }

  .task-icon {
    grid-area: icon;
  }

  .task-body {
    grid-area: body;
  }

  .task-toggle {
    grid-area: action;
    width: 100%;
    border-radius: 12px;
    height: 38px;
  }

  .toast {
    bottom: 104px;
    width: max-content;
    max-width: calc(100% - 36px);
    text-align: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

/* --- Yaşayan GREENIFY dünyası ----------------------------- */

.living-world {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(280px, 0.85fr) minmax(360px, 1.15fr);
  min-height: 510px;
  margin: 22px 0;
  overflow: hidden;
  border: 1px solid rgba(200, 214, 106, 0.22);
  border-radius: 30px;
  background:
    radial-gradient(circle at 78% 18%, rgba(200, 214, 106, 0.18), transparent 34%),
    linear-gradient(145deg, #062f27 0%, #0b4f3d 52%, #123f33 100%);
  color: var(--paper);
  box-shadow: 0 28px 70px rgba(7, 63, 50, 0.2);
}

.living-world::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  opacity: calc(0.16 + (1 - var(--world-smog)) * 0.38);
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.035) 1px, transparent 1px);
  background-size: 38px 38px;
  mask-image: linear-gradient(90deg, black, transparent 85%);
}

.world-copy {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 24px;
  padding: clamp(28px, 4vw, 52px);
}

.world-copy .kicker {
  color: var(--lime);
}

.world-copy h2 {
  margin: 10px 0 8px;
  max-width: 480px;
  font-size: clamp(1.7rem, 3vw, 2.65rem);
}

.world-copy > div > p:last-child {
  max-width: 540px;
  color: rgba(255, 250, 240, 0.72);
}

.world-stage {
  display: inline-flex;
  padding: 5px 10px;
  border: 1px solid rgba(200, 214, 106, 0.34);
  border-radius: 999px;
  background: rgba(200, 214, 106, 0.1);
  color: var(--lime);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.world-progress-block {
  display: grid;
  gap: 10px;
}

.world-progress-head,
.world-metrics {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 14px;
}

.world-progress-head strong {
  color: var(--lime);
  font-size: 1.45rem;
}

.world-progress-head span,
.world-metrics {
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.75rem;
}

.world-progress-track {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.world-progress-track span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--leaf), var(--lime));
  box-shadow: 0 0 20px rgba(200, 214, 106, 0.45);
  transition: width 0.6s ease;
}

.world-instruction {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin: 0;
  padding: 12px 14px;
  border: 1px solid rgba(200, 214, 106, 0.16);
  border-radius: 14px;
  background: rgba(200, 214, 106, 0.07);
  color: rgba(255, 250, 240, 0.7);
  font-size: 0.76rem;
  line-height: 1.55;
}

.world-instruction > span:first-child {
  flex: 0 0 auto;
  color: var(--lime);
  text-shadow: 0 0 14px rgba(200, 214, 106, 0.65);
}

.world-instruction strong {
  color: var(--cream);
}

.world-categories {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.world-category {
  display: grid;
  grid-template-columns: 26px minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.045);
}

.world-category > span {
  font-size: 1rem;
}

.world-category strong,
.world-category small {
  display: block;
  color: rgba(255, 250, 240, 0.82);
  font-size: 0.65rem;
}

.world-category small {
  color: var(--lime);
  font-weight: 800;
}

.world-category i {
  display: block;
  height: 3px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.1);
}

.world-category b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--leaf);
}

.world-scene {
  position: relative;
  display: grid;
  min-height: 510px;
  place-items: center;
  perspective: 1000px;
  background: radial-gradient(circle at center, rgba(200, 214, 106, 0.1), transparent 62%);
}

.world-scene::after {
  content: "";
  position: absolute;
  width: 68%;
  height: 14%;
  bottom: 10%;
  border-radius: 50%;
  background: rgba(0, 0, 0, 0.34);
  filter: blur(24px);
  transform: rotate(-2deg);
}

.world-scene img {
  position: relative;
  z-index: 3;
  width: min(96%, 650px);
  filter:
    grayscale(var(--world-gray))
    saturate(var(--world-saturation))
    brightness(var(--world-light))
    drop-shadow(0 30px 28px rgba(0, 0, 0, 0.28));
  transform-style: preserve-3d;
  transition: filter 0.8s ease, transform 0.22s ease-out;
  will-change: transform, filter;
}

.world-smog {
  position: absolute;
  inset: 13% 8% auto;
  z-index: 4;
  height: 42%;
  opacity: var(--world-smog);
  pointer-events: none;
  transition: opacity 0.8s ease;
}

.world-smog i {
  position: absolute;
  width: 190px;
  height: 70px;
  border-radius: 50%;
  background: rgba(103, 108, 99, 0.6);
  filter: blur(18px);
  animation: world-drift 9s ease-in-out infinite alternate;
}

.world-smog i:nth-child(1) { left: 4%; top: 18%; }
.world-smog i:nth-child(2) { right: 6%; top: 5%; animation-delay: -3s; }
.world-smog i:nth-child(3) { left: 36%; bottom: 2%; animation-delay: -6s; }

.world-orbit {
  position: absolute;
  z-index: 1;
  width: 66%;
  aspect-ratio: 1;
  border: 1px solid rgba(200, 214, 106, 0.13);
  border-radius: 50%;
  transform: rotateX(66deg) rotateZ(-18deg);
}

.world-orbit--two {
  width: 84%;
  border-color: rgba(255, 255, 255, 0.06);
  transform: rotateX(66deg) rotateZ(22deg);
}

.world-float {
  position: absolute;
  z-index: 5;
  color: var(--lime);
  text-shadow: 0 0 16px rgba(200, 214, 106, 0.7);
  animation: world-float 4s ease-in-out infinite;
}

.world-float--leaf { left: 14%; top: 24%; font-size: 0.75rem; }
.world-float--spark { right: 13%; top: 31%; animation-delay: -2s; }

@keyframes world-drift {
  to { transform: translate3d(34px, 10px, 0) scale(1.08); }
}

@keyframes world-float {
  50% { transform: translateY(-12px) scale(1.15); opacity: 0.6; }
}

/* --- Son alışkanlık değerlendirmesi ----------------------- */

.followup-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, rgba(143, 190, 120, 0.14), var(--paper));
}

.followup-panel h3 {
  margin: 10px 0 5px;
}

.post-habits-dialog {
  width: min(940px, calc(100% - 30px));
  max-height: 90vh;
  padding: 0;
  overflow: auto;
  border: 0;
  border-radius: 26px;
  background: var(--paper);
  color: var(--ink);
  box-shadow: 0 30px 90px rgba(7, 63, 50, 0.28);
}

.post-habits-dialog::backdrop {
  background: rgba(7, 28, 23, 0.7);
  backdrop-filter: blur(8px);
}

.post-habits-dialog .dialog-close {
  position: sticky;
  z-index: 4;
  top: 18px;
  float: right;
  margin: 18px 18px -58px 0;
}

.post-habits-heading {
  padding: 38px 48px 18px;
  background: linear-gradient(135deg, rgba(143, 190, 120, 0.18), transparent);
}

.post-habits-heading h2 {
  margin-bottom: 8px;
}

.post-habits-dialog .habit-form {
  padding: 12px 48px 44px;
}

@media (max-width: 900px) {
  .living-world {
    grid-template-columns: 1fr;
  }

  .world-scene {
    min-height: 420px;
    order: -1;
  }
}

@media (max-width: 640px) {
  .living-world {
    border-radius: 22px;
  }

  .world-scene {
    min-height: 330px;
  }

  .world-copy {
    padding: 26px 20px 30px;
  }

  .world-categories {
    grid-template-columns: 1fr;
  }

  .followup-panel {
    align-items: stretch;
    flex-direction: column;
  }

  .post-habits-heading {
    padding: 34px 22px 16px;
  }

  .post-habits-dialog .habit-form {
    padding: 8px 22px 30px;
  }
}

/* ============================================================
   7. Araştırmaya katılım ve onboarding
   ============================================================ */

.onboarding-body {
  min-height: 100vh;
  background:
    radial-gradient(circle at 8% 12%, rgba(200, 214, 106, 0.24), transparent 30%),
    radial-gradient(circle at 94% 86%, rgba(143, 190, 120, 0.2), transparent 34%),
    var(--cream);
}

.onboarding-header {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto;
  min-height: 84px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.onboarding-header-actions {
  display: flex;
  align-items: center;
  gap: 18px;
}

.onboarding-header-actions button.text-action {
  appearance: none;
  border: 0;
  background: transparent;
  font: inherit;
  cursor: pointer;
}

.onboarding-layout {
  width: min(1180px, calc(100% - 40px));
  margin: 0 auto 64px;
  display: grid;
  grid-template-columns: 320px minmax(0, 1fr);
  gap: 28px;
  align-items: start;
}

.onboarding-aside {
  position: sticky;
  top: 24px;
  padding: 32px;
  border-radius: var(--radius-lg);
  background: var(--forest-dark);
  color: var(--paper);
  box-shadow: var(--shadow);
}

.onboarding-aside .kicker {
  color: var(--lime);
}

.onboarding-aside h1 {
  margin-bottom: 16px;
  font-size: clamp(2rem, 4vw, 2.8rem);
}

.onboarding-aside > p:not(.kicker) {
  color: rgba(255, 250, 240, 0.76);
  font-size: 0.92rem;
}

.onboarding-steps {
  margin-top: 30px;
  display: grid;
  gap: 8px;
}

.onboarding-steps li {
  display: grid;
  grid-template-columns: 30px 1fr;
  gap: 10px;
  align-items: center;
  padding: 10px;
  border-radius: 12px;
  color: rgba(255, 250, 240, 0.58);
  font-size: 0.82rem;
  transition: background 0.18s ease, color 0.18s ease;
}

.onboarding-steps li > span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 250, 240, 0.24);
  font-size: 0.72rem;
}

.onboarding-steps li.is-active {
  background: rgba(255, 250, 240, 0.1);
  color: var(--paper);
}

.onboarding-steps li.is-active > span {
  background: var(--lime);
  border-color: var(--lime);
  color: var(--forest-dark);
}

.onboarding-steps li.is-complete {
  color: rgba(255, 250, 240, 0.86);
}

.onboarding-steps li.is-complete > span {
  background: var(--leaf);
  border-color: var(--leaf);
  color: transparent;
  position: relative;
}

.onboarding-steps li.is-complete > span::after {
  content: "✓";
  position: absolute;
  color: var(--forest-dark);
  font-weight: 800;
}

.connection-card {
  margin-top: 28px;
  padding: 13px;
  display: grid;
  grid-template-columns: 12px 1fr;
  gap: 10px;
  align-items: start;
  border-radius: 12px;
  background: rgba(255, 250, 240, 0.08);
}

.connection-dot {
  width: 10px;
  height: 10px;
  margin-top: 4px;
  border-radius: 50%;
  background: var(--leaf);
  box-shadow: 0 0 0 4px rgba(143, 190, 120, 0.14);
}

.connection-card.is-local .connection-dot {
  background: #f1b36b;
  box-shadow: 0 0 0 4px rgba(241, 179, 107, 0.14);
}

.connection-card strong,
.connection-card small {
  display: block;
}

.connection-card strong {
  font-size: 0.8rem;
}

.connection-card small {
  margin-top: 4px;
  color: rgba(255, 250, 240, 0.62);
  font-size: 0.7rem;
  line-height: 1.45;
}

.onboarding-card {
  position: relative;
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: var(--paper);
  box-shadow: var(--shadow);
}

.onboarding-progress {
  height: 5px;
  background: rgba(15, 94, 72, 0.08);
}

.onboarding-progress span {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--forest), var(--leaf));
  transition: width 0.25s ease;
}

.onboarding-step {
  padding: clamp(24px, 5vw, 48px);
}

.onboarding-step[hidden] {
  display: none !important;
}

.step-copy {
  max-width: 690px;
  margin-bottom: 28px;
}

.step-eyebrow {
  display: block;
  margin-bottom: 8px;
  color: var(--forest);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-copy h2 {
  margin-bottom: 10px;
  font-size: clamp(1.65rem, 4vw, 2.35rem);
}

.step-copy p {
  color: var(--muted);
  font-size: 0.93rem;
}

.consent-summary {
  display: grid;
  gap: 10px;
}

.consent-summary article {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #fffdf7;
}

.consent-summary article > span {
  font-size: 1.2rem;
}

.consent-summary h3 {
  margin-bottom: 3px;
  font-size: 0.9rem;
}

.consent-summary p {
  color: var(--muted);
  font-size: 0.8rem;
}

.consent-checks {
  margin-top: 22px;
  display: grid;
  gap: 10px;
}

.check-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  line-height: 1.5;
  font-size: 0.86rem;
  cursor: pointer;
}

.check-row input {
  width: 18px;
  height: 18px;
  margin: 2px 0 0;
  flex-shrink: 0;
  accent-color: var(--forest);
}

.check-row--boxed,
.check-row--compact {
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fffdf7;
}

.check-row--compact:has(input:checked),
.check-row--boxed:has(input:checked) {
  border-color: var(--forest);
  background: rgba(143, 190, 120, 0.12);
}

.form-note {
  margin-top: 14px;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.55;
}

.auth-tabs {
  display: inline-flex;
  padding: 4px;
  margin-bottom: 24px;
  border-radius: 999px;
  background: rgba(15, 94, 72, 0.08);
}

.auth-tabs button {
  padding: 9px 16px;
  border: none;
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
}

.auth-tabs button.is-selected {
  background: var(--paper);
  color: var(--forest);
  box-shadow: var(--shadow-sm);
}

.form-stack,
.habit-form {
  display: grid;
  gap: 18px;
}

.form-stack > label,
.form-grid > label {
  display: grid;
  gap: 7px;
  color: #35513f;
  font-size: 0.8rem;
  font-weight: 700;
}

.form-stack input,
.form-grid input,
.form-stack select,
.form-grid select {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid rgba(15, 94, 72, 0.24);
  border-radius: 11px;
  background: #fffdf8;
  font: inherit;
  font-weight: 500;
}

.form-stack input:focus,
.form-grid input:focus,
.form-stack select:focus,
.form-grid select:focus {
  border-color: var(--forest);
  outline: 3px solid rgba(143, 190, 120, 0.28);
}

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

.choice-fieldset,
.habit-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
}

.choice-fieldset legend,
.habit-form legend {
  padding: 0 8px;
  color: var(--forest-dark);
  font-size: 0.9rem;
  font-weight: 800;
}

.choice-fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
}

.choice-fieldset legend {
  width: 100%;
  margin-bottom: 10px;
}

.choice-fieldset label {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 0.88rem;
  cursor: pointer;
}

.choice-fieldset input {
  accent-color: var(--forest);
}

.habit-form fieldset {
  padding-top: 22px;
}

.option-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 9px;
  margin-top: 12px;
}

.optional {
  color: var(--muted);
  font-weight: 500;
}

.step-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}

.step-actions--end {
  justify-content: flex-end;
}

.form-message {
  margin: 0 clamp(24px, 5vw, 48px) clamp(24px, 5vw, 48px);
  padding: 13px 16px;
  border-radius: 12px;
  font-size: 0.84rem;
  line-height: 1.5;
}

.form-message[hidden] {
  display: none;
}

.form-message--error {
  border: 1px solid rgba(198, 107, 69, 0.35);
  background: rgba(198, 107, 69, 0.1);
  color: #74391f;
}

.form-message--good {
  border: 1px solid rgba(15, 94, 72, 0.25);
  background: rgba(143, 190, 120, 0.14);
  color: var(--forest-dark);
}

.form-message--info {
  border: 1px solid rgba(15, 94, 72, 0.25);
  background: rgba(143, 190, 120, 0.14);
  color: var(--forest-dark);
}

.scale-source {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 14px;
  color: var(--muted);
  font-size: 0.76rem;
}

.onboarding-scale-card {
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: #fffdf7;
}

.onboarding-scale-card h3 {
  min-height: 86px;
  margin: 14px 0 22px;
  font-size: clamp(1.1rem, 2.6vw, 1.45rem);
  line-height: 1.45;
}

.scale-endpoints {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  color: var(--muted);
  font-size: 0.72rem;
}

.onboarding-scale-options {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  margin-top: 10px;
}

.onboarding-scale-options button {
  min-height: 66px;
  padding: 9px 5px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 3px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--paper);
}

.onboarding-scale-options button:hover,
.onboarding-scale-options button.is-selected {
  border-color: var(--forest);
  background: var(--forest);
  color: var(--paper);
}

.onboarding-scale-options strong {
  font-size: 1.1rem;
}

.onboarding-scale-options span {
  font-size: 0.58rem;
  line-height: 1.25;
}

.notice--source {
  border-color: rgba(15, 94, 72, 0.24);
  border-left-color: var(--forest);
  background: rgba(143, 190, 120, 0.1);
  color: var(--forest-dark);
}

@media (max-width: 900px) {
  .onboarding-layout {
    grid-template-columns: 1fr;
  }

  .onboarding-aside {
    position: static;
  }

  .onboarding-aside > p:not(.kicker),
  .connection-card {
    max-width: 640px;
  }

  .onboarding-steps {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .onboarding-steps li {
    grid-template-columns: 1fr;
    justify-items: center;
    text-align: center;
  }
}

@media (max-width: 640px) {
  .onboarding-header-actions {
    gap: 10px;
  }

  .onboarding-header-actions .text-action {
    font-size: 0.78rem;
  }
  .onboarding-header,
  .onboarding-layout {
    width: min(100% - 24px, 1180px);
  }

  .onboarding-header {
    min-height: 70px;
  }

  .onboarding-aside {
    padding: 24px;
  }

  .onboarding-steps {
    grid-template-columns: 1fr;
  }

  .onboarding-steps li {
    display: none;
  }

  .onboarding-steps li.is-active {
    display: grid;
    grid-template-columns: 30px 1fr;
    justify-items: start;
    text-align: left;
  }

  .form-grid,
  .option-grid {
    grid-template-columns: 1fr;
  }

  .step-actions {
    flex-direction: column-reverse;
  }

  .step-actions > * {
    width: 100%;
  }

  .scale-endpoints {
    font-size: 0.64rem;
  }

  .onboarding-scale-card {
    padding: 18px;
  }
}
/* Always-visible persistence feedback, including offline and retry states. */
.sync-status { display:flex; align-items:center; justify-content:space-between; gap:12px; padding:10px 14px; margin:0 0 18px; border-radius:12px; background:#e8f2ec; color:#275d47; font-size:.78rem; }
.sync-status[data-state="warning"] { background:#fff0d7; color:#754714; }
.sync-status[data-state="pending"] { background:#edf0f4; color:#445066; }
