/* =============================================
   Home — Calculator Index Page Styles
   Shell (header, footer, page heading, base reset)
   is provided by <calc-shell> web component.
   ============================================= */

/* --- DESIGN TOKENS (needed by light DOM content slotted into calc-shell) --- */
:root {
  --bg: #f4f6f9;
  --card-bg: #ffffff;
  --text: #1a1d23;
  --text-muted: #6b7280;
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --border: #e5e7eb;
  --accent-green: #059669;
  --accent-red: #dc2626;
  --accent-amber: #d97706;
  --radius: 10px;
  --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.06);
  --shadow-lg: 0 4px 14px rgba(0, 0, 0, 0.10);
}

.calc-shell-content {
  max-width: 1060px;
}

/* ===================== HERO ===================== */

.home-hero {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 2rem 1.75rem;
  margin-bottom: 1.75rem;
  text-align: center;
}

.hero-intro {
  max-width: 640px;
  margin: 0 auto 1.25rem;
  font-size: 1.05rem;
  line-height: 1.6;
  color: var(--text-muted);
}

.home-search {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 560px;
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: 50px;
  background: #fff;
  overflow: hidden;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.home-search:focus-within {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.search-icon {
  padding: 0 0 0 1rem;
  font-size: 1rem;
  color: var(--text-muted);
  user-select: none;
}

.home-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.8rem 1rem;
  font-size: 1rem;
  font-family: inherit;
  color: var(--text);
  background: transparent;
  min-width: 0;
}

.home-search input::placeholder {
  color: #9ca3af;
}

.search-hint {
  margin: 0.85rem auto 0;
  font-size: 0.85rem;
  color: var(--accent-red);
}

/* ===================== TILE GRID ===================== */

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
  gap: 1.25rem;
  margin-bottom: 1.75rem;
}

.tile {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  transition: box-shadow 0.15s, transform 0.15s;
}

.tile:hover {
  box-shadow: var(--shadow-lg);
}

.tile-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.55rem;
  user-select: none;
}

.icon-financial {
  background: #dbeafe;
  color: var(--primary);
}

.icon-fitness {
  background: #d1fae5;
  color: var(--accent-green);
}

.icon-math {
  background: #fef3c7;
  color: var(--accent-amber);
}

.icon-other {
  background: #ede9fe;
  color: #7c3aed;
}

.tile-title {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem;
}

.tile-title a {
  color: inherit;
  text-decoration: none;
}

.tile-title a:hover {
  color: var(--primary);
}

.badge-soon {
  display: inline-block;
  font-size: 0.65rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  color: var(--accent-amber);
  background: #fef3c7;
  border-radius: 4px;
  padding: 0.12rem 0.35rem;
  vertical-align: middle;
  white-space: nowrap;
}

.tile-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  flex: 1;
}

.tile-links a {
  color: var(--primary);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 500;
}

.tile-links a:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.tile-links .coming {
  color: var(--text-muted);
  font-size: 0.92rem;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.tile-more {
  display: inline-block;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--primary);
  text-decoration: none;
  margin-top: 0.35rem;
}

.tile-more:hover {
  color: var(--primary-hover);
  text-decoration: underline;
}

.tile-more.disabled {
  color: var(--text-muted);
  cursor: default;
  text-decoration: none;
  font-weight: 500;
  opacity: 0.8;
}

/* ===================== ABOUT ===================== */

.about {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin-bottom: 1.75rem;
}

.about h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.about p {
  font-size: 0.98rem;
  line-height: 1.7;
  color: var(--text);
  margin-bottom: 0.9rem;
}

.about p:last-child {
  margin-bottom: 0;
}

/* ===================== FAQ ===================== */

.faq {
  background: var(--card-bg);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
}

.faq h2 {
  font-size: 1.3rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1rem;
}

.faq-item {
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-bottom: 0.75rem;
  overflow: hidden;
}

.faq-item:last-child {
  margin-bottom: 0;
}

.faq-item summary {
  cursor: pointer;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  padding: 0.9rem 1rem;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  font-size: 1.1rem;
  font-weight: 700;
  color: var(--text-muted);
  transition: transform 0.2s;
}

.faq-item[open] summary {
  background: #f9fafb;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item summary:hover {
  background: #f9fafb;
}

.faq-item p {
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
  padding: 0 1rem 0.9rem;
  margin: 0;
}

/* ===================== RESPONSIVE ===================== */

@media (max-width: 768px) {
  .tile-grid {
    grid-template-columns: 1fr;
  }

  .home-hero {
    padding: 1.5rem 1.25rem;
  }

  .about,
  .faq {
    padding: 1.25rem;
  }
}