/* Shared section layout for the long public pages (Qamar, 1406, ghazals, spokes). */

.ed { padding-bottom: 2.5rem; }

.ed-hero {
  padding: clamp(1.6rem, 4vw, 2.6rem) 0 0.4rem;
}
.ed-hero h1 {
  font-size: clamp(1.65rem, 4.2vw, 2.45rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.4;
  max-width: 18em;
}
.ed-hero .ed-lead,
.ed-kicker {
  margin-top: 0.75rem;
  max-width: 62ch;
  color: var(--muted);
  font-size: 1.02rem;
  line-height: 1.9;
}
.ed-kicker a { color: var(--accent-2); font-weight: 600; text-decoration: none; }
.ed-kicker a:hover { text-decoration: underline; }

.ed-block { padding: clamp(1.15rem, 3vw, 2rem) 0; }
.ed-block h2 {
  font-size: clamp(1.25rem, 3vw, 1.6rem);
  font-weight: 800;
  margin-bottom: 0.85rem;
}
.ed-block h3 { font-size: 1.05rem; font-weight: 700; margin-bottom: 0.35rem; }

.ed-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 1.15rem 1.25rem 1.2rem;
  box-shadow: var(--shadow-soft);
}
.ed-panel p { line-height: 1.95; }
.ed-panel p + p { margin-top: 0.75rem; }

.ed-live {
  border-color: color-mix(in srgb, var(--accent-2) 42%, var(--border));
  background:
    linear-gradient(145deg, color-mix(in srgb, var(--accent) 12%, var(--surface)), var(--surface));
  font-size: 1.05rem;
  line-height: 1.9;
}
.ed-stamp { margin-top: 0.55rem; color: var(--muted-2); font-size: 0.85rem; }

.ed-grid {
  display: grid;
  gap: 0.85rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.ed-card {
  background: var(--surface);
  border: 1px solid color-mix(in srgb, var(--accent) 16%, var(--border));
  border-radius: 18px;
  padding: 1rem 1.1rem 1.05rem;
  position: relative;
  overflow: hidden;
}
.ed-card::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  top: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  opacity: 0.8;
}
.ed-card p { color: var(--muted); line-height: 1.85; font-size: 0.95rem; }

.ed-table-wrap { overflow-x: auto; }
.ed-table { width: 100%; border-collapse: collapse; margin-top: 0.4rem; }
.ed-table th,
.ed-table td {
  text-align: right;
  padding: 0.65rem 0.7rem;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.ed-table th { color: var(--muted); font-weight: 600; font-size: 0.85rem; }
.ed-table .is-past { color: var(--muted-2); }
.ed-table .is-next {
  background: color-mix(in srgb, var(--warn) 14%, transparent);
  color: var(--text);
}

.ed-fold {
  margin-top: 0.75rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 0.85rem 1rem;
}
.ed-fold summary { cursor: pointer; font-weight: 700; }
.ed-fold[open] { border-color: color-mix(in srgb, var(--accent-2) 45%, var(--border)); }

.ed-verse { text-align: center; }
.ed-verse p {
  font-size: 1.12rem;
  line-height: 2.15;
  margin: 0.15rem 0;
}
.ed-words { display: grid; gap: 0.6rem; }
.ed-words li {
  list-style: none;
  background: var(--surface-2);
  border-radius: 12px;
  padding: 0.65rem 0.8rem;
  line-height: 1.7;
}
.ed-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.7rem;
}
.ed-nav a,
.ed-links a {
  display: inline-flex;
  align-items: center;
  padding: 0.7rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  font-weight: 600;
}
.ed-nav a:hover,
.ed-links a:hover { border-color: var(--accent-2); }

.ed-try .tool-trial__form {
  display: grid;
  gap: 0.85rem;
}
.ed-calc { display: flex; flex-wrap: wrap; gap: 0.7rem; align-items: end; }
.ed-calc input {
  font: inherit;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 0.7rem 0.85rem;
  min-width: 8rem;
}
.ed-out { margin-top: 0.8rem; font-weight: 700; min-height: 1.4em; }

@media (max-width: 640px) {
  .ed-table th, .ed-table td { white-space: normal; }
  .ed-panel, .ed-card { padding: 0.95rem 0.9rem; }
}
