/* Family Task Central — design system */
:root {
  --ink: #14201c;
  --ink-soft: #3a4a44;
  --paper: #f3efe6;
  --paper-2: #e7efe9;
  --leaf: #1f6b57;
  --leaf-deep: #134e41;
  --moss: #3d8f74;
  --sun: #d4a017;
  --sun-soft: #f0d78c;
  --coral: #c45c3e;
  --line: rgba(20, 32, 28, 0.12);
  --shadow: 0 18px 50px rgba(19, 40, 34, 0.14);
  --radius: 18px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Figtree", system-ui, sans-serif;
  --max: 1120px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background:
    radial-gradient(1200px 600px at 10% -10%, rgba(61, 143, 116, 0.22), transparent 60%),
    radial-gradient(900px 500px at 90% 0%, rgba(212, 160, 23, 0.18), transparent 55%),
    linear-gradient(180deg, #f7f4ec 0%, var(--paper-2) 45%, #dfeae3 100%);
  min-height: 100vh;
  line-height: 1.5;
}

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

a {
  color: var(--leaf-deep);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

button,
input,
select,
textarea {
  font: inherit;
}

.container {
  width: min(var(--max), calc(100% - 2.5rem));
  margin-inline: auto;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 40;
  backdrop-filter: blur(14px);
  background: rgba(243, 239, 230, 0.78);
  border-bottom: 1px solid var(--line);
}

.site-header .inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  gap: 1rem;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  color: inherit;
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
}

.brand-mark {
  width: 2.1rem;
  height: 2.1rem;
  border-radius: 0.7rem;
  background:
    linear-gradient(145deg, var(--leaf) 0%, var(--leaf-deep) 70%),
    var(--leaf);
  box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.2);
  position: relative;
}

.brand-mark::after {
  content: "";
  position: absolute;
  inset: 28% 30% 34% 30%;
  border-radius: 2px;
  background: var(--sun-soft);
  transform: rotate(-8deg);
}

.nav-links {
  display: flex;
  gap: 1.25rem;
  align-items: center;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-weight: 560;
  font-size: 0.95rem;
}

.nav-links a:hover {
  color: var(--ink);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: 0;
  border-radius: 999px;
  padding: 0.78rem 1.25rem;
  font-weight: 700;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

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

.btn-primary {
  background: linear-gradient(135deg, var(--leaf) 0%, var(--leaf-deep) 100%);
  color: #f7fff9;
  box-shadow: 0 10px 24px rgba(31, 107, 87, 0.28);
}

.btn-secondary {
  background: rgba(255, 255, 255, 0.66);
  color: var(--ink);
  border: 1px solid var(--line);
}

.btn-sun {
  background: linear-gradient(135deg, #e3b53a, var(--sun));
  color: #2a2208;
  box-shadow: 0 10px 24px rgba(212, 160, 23, 0.28);
}

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

.btn-sm {
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
}

.hero {
  position: relative;
  overflow: hidden;
  padding: clamp(3rem, 8vw, 5.5rem) 0 clamp(3.5rem, 7vw, 5rem);
  min-height: min(92vh, 820px);
  display: flex;
  align-items: center;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(120deg, rgba(243, 239, 230, 0.4), rgba(243, 239, 230, 0.05)),
    url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%231f6b57' fill-opacity='0.045'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
  pointer-events: none;
}

.hero-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.hero-copy h1 {
  font-family: var(--font-display);
  font-weight: 620;
  font-size: clamp(2.6rem, 6vw, 4.4rem);
  line-height: 1.02;
  letter-spacing: -0.035em;
  margin: 0 0 1rem;
}

.hero-copy .lede {
  font-size: 1.12rem;
  color: var(--ink-soft);
  max-width: 34rem;
  margin: 0 0 1.75rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.hero-visual {
  position: relative;
  min-height: 340px;
}

.panel-stack {
  position: relative;
  height: 100%;
}

.glass-panel {
  background: rgba(255, 255, 255, 0.62);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: var(--shadow);
  border-radius: calc(var(--radius) + 4px);
  padding: 1.25rem;
  backdrop-filter: blur(10px);
  animation: riseIn 0.9s ease both;
}

.glass-panel.main {
  transform: rotate(-1.5deg);
}

.glass-panel.float {
  position: absolute;
  right: -4%;
  bottom: -6%;
  width: min(70%, 240px);
  transform: rotate(3deg);
  animation: floatY 5.5s ease-in-out infinite;
}

.kpi {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.85rem;
}

.kpi strong {
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.65rem;
  border-radius: 999px;
  background: rgba(31, 107, 87, 0.1);
  color: var(--leaf-deep);
  font-size: 0.8rem;
  font-weight: 700;
}

.task-row {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-size: 0.92rem;
}

.section {
  padding: clamp(3rem, 7vw, 5rem) 0;
}

.section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  letter-spacing: -0.03em;
  margin: 0 0 0.6rem;
}

.section .sub {
  color: var(--ink-soft);
  max-width: 36rem;
  margin: 0 0 2rem;
}

.feature-rail {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}

.feature {
  padding: 1.4rem 1.3rem 1.5rem;
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.45);
  border: 1px solid var(--line);
  transition: transform 0.25s ease, background 0.25s ease;
}

.feature:hover {
  transform: translateY(-4px);
  background: rgba(255, 255, 255, 0.72);
}

.feature h3 {
  margin: 0 0 0.45rem;
  font-size: 1.15rem;
}

.feature p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.feature .icon {
  width: 2.4rem;
  height: 2.4rem;
  border-radius: 0.8rem;
  display: grid;
  place-items: center;
  margin-bottom: 0.9rem;
  background: linear-gradient(145deg, rgba(31, 107, 87, 0.16), rgba(212, 160, 23, 0.18));
  font-size: 1.1rem;
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2rem;
  align-items: center;
}

.quote-block {
  padding: 1.75rem;
  border-left: 4px solid var(--sun);
  background: rgba(255, 255, 255, 0.5);
  border-radius: 0 var(--radius) var(--radius) 0;
}

.site-footer {
  border-top: 1px solid var(--line);
  padding: 2rem 0 2.5rem;
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.site-footer .inner {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

/* App shell */
.app-shell {
  display: grid;
  grid-template-columns: 250px 1fr;
  min-height: 100vh;
}

.sidebar {
  background: linear-gradient(180deg, #16352d 0%, #0f2420 100%);
  color: #e8f3ee;
  padding: 1.25rem 1rem 2rem;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
}

.sidebar .brand {
  color: #f4fff9;
  margin: 0.25rem 0.4rem 1.5rem;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

.side-nav button {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(232, 243, 238, 0.78);
  text-align: left;
  padding: 0.7rem 0.85rem;
  border-radius: 12px;
  cursor: pointer;
  font-weight: 650;
}

.side-nav button.active,
.side-nav button:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.main-pane {
  padding: 1.25rem 1.4rem 2.5rem;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.topbar h1 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  margin: 0;
  letter-spacing: -0.03em;
}

.points-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  font-weight: 750;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 1rem;
}

.card {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  box-shadow: 0 8px 28px rgba(20, 40, 34, 0.05);
}

.card.span-3 { grid-column: span 3; }
.card.span-4 { grid-column: span 4; }
.card.span-6 { grid-column: span 6; }
.card.span-8 { grid-column: span 8; }
.card.span-12 { grid-column: span 12; }

.card h3 {
  margin: 0 0 0.75rem;
  font-size: 1.05rem;
}

.stat-value {
  font-family: var(--font-display);
  font-size: 2rem;
  letter-spacing: -0.03em;
}

.muted {
  color: var(--ink-soft);
  font-size: 0.92rem;
}

.form-grid {
  display: grid;
  gap: 0.75rem;
}

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

label {
  display: grid;
  gap: 0.35rem;
  font-size: 0.88rem;
  font-weight: 650;
  color: var(--ink-soft);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.85);
  border-radius: 12px;
  padding: 0.7rem 0.8rem;
  color: var(--ink);
}

textarea {
  min-height: 110px;
  resize: vertical;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}

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

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--ink-soft);
}

.badge {
  display: inline-block;
  padding: 0.18rem 0.5rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 750;
  background: rgba(31, 107, 87, 0.12);
  color: var(--leaf-deep);
}

.badge.warn { background: rgba(212, 160, 23, 0.18); color: #7a5a05; }
.badge.danger { background: rgba(196, 92, 62, 0.15); color: var(--coral); }
.badge.ok { background: rgba(31, 107, 87, 0.15); color: var(--leaf-deep); }

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem 1rem;
}

.auth-card {
  width: min(440px, 100%);
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 6px);
  padding: 1.6rem;
  box-shadow: var(--shadow);
}

.auth-card h1 {
  font-family: var(--font-display);
  margin: 0 0 0.35rem;
  font-size: 1.85rem;
}

.tabs {
  display: flex;
  gap: 0.4rem;
  margin: 1rem 0 1.2rem;
}

.tabs button {
  flex: 1;
  border: 1px solid var(--line);
  background: transparent;
  border-radius: 999px;
  padding: 0.55rem;
  cursor: pointer;
  font-weight: 700;
}

.tabs button.active {
  background: var(--leaf);
  border-color: var(--leaf);
  color: white;
}

.toast {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  background: var(--ink);
  color: #f5f8f6;
  padding: 0.8rem 1rem;
  border-radius: 12px;
  z-index: 99;
  opacity: 0;
  transform: translateY(8px);
  transition: 0.25s ease;
  pointer-events: none;
}

.toast.show {
  opacity: 1;
  transform: translateY(0);
}

.mobile-nav-toggle {
  display: none;
  border: 0;
  background: rgba(255, 255, 255, 0.15);
  color: white;
  border-radius: 10px;
  padding: 0.45rem 0.7rem;
  cursor: pointer;
}

.empty {
  padding: 1.25rem;
  text-align: center;
  color: var(--ink-soft);
  border: 1px dashed var(--line);
  border-radius: 14px;
}

.game-board {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.game-board .problem {
  font-family: var(--font-display);
  font-size: 1.8rem;
}

.choice-grid {
  display: grid;
  gap: 0.5rem;
}

.choice-grid button {
  text-align: left;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.8);
  border-radius: 12px;
  padding: 0.75rem 0.9rem;
  cursor: pointer;
}

.choice-grid button:hover {
  border-color: var(--leaf);
}

@keyframes riseIn {
  from { opacity: 0; transform: translateY(16px) rotate(-1.5deg); }
  to { opacity: 1; transform: translateY(0) rotate(-1.5deg); }
}

@keyframes floatY {
  0%, 100% { transform: translateY(0) rotate(3deg); }
  50% { transform: translateY(-10px) rotate(3deg); }
}

@media (max-width: 920px) {
  .hero-grid,
  .feature-rail,
  .split,
  .form-grid.two {
    grid-template-columns: 1fr;
  }

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

  .sidebar {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 84vw);
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 50;
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .mobile-nav-toggle {
    display: inline-flex;
  }

  .card.span-3,
  .card.span-4,
  .card.span-6,
  .card.span-8,
  .card.span-12 {
    grid-column: span 12;
  }

  .nav-links .hide-sm {
    display: none;
  }
}
