/* TasklyTools Phase 6 guide hub and long-form content styles.
   Scoped to .tt-new. Loaded only by guide and resource pages. */

.tt-guide-page {
  background: var(--tt-bg);
}

.tt-guide-hero {
  position: relative;
  padding: clamp(1.6rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.4rem);
  background:
    radial-gradient(48rem 22rem at 90% -35%, rgba(23, 92, 211, 0.14), transparent 60%),
    radial-gradient(30rem 18rem at 5% 120%, rgba(214, 0, 110, 0.07), transparent 65%);
}

.tt-guide-hero h1 {
  max-width: 920px;
  margin-bottom: 0.7rem;
}

.tt-guide-hero .tt-lead {
  max-width: 760px;
  margin-bottom: 0;
}

.tt-guide-hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem 0.75rem;
  margin-top: 1rem;
  color: var(--tt-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.tt-guide-hero-meta span {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.tt-guide-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.tt-guide-article,
.tt-guide-sidebar-card,
.tt-guide-hub-card,
.tt-resource-panel {
  min-width: 0;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  background: var(--tt-surface);
  box-shadow: var(--tt-shadow-sm);
}

.tt-guide-article {
  padding: clamp(1.15rem, 3vw, 2rem);
}

.tt-guide-article > p:first-of-type {
  color: var(--tt-body);
  font-size: 1.06rem;
}

.tt-guide-article h2 {
  margin-top: 2.1rem;
  margin-bottom: 0.65rem;
  padding-top: 0.2rem;
  font-size: clamp(1.35rem, 2.6vw, 1.7rem);
}

.tt-guide-article h2:first-of-type {
  margin-top: 0;
}

.tt-guide-article h3 {
  margin-top: 1.45rem;
  margin-bottom: 0.45rem;
}

.tt-guide-article ul,
.tt-guide-article ol {
  margin-bottom: 1.15rem;
}

.tt-guide-article li {
  margin-bottom: 0.45rem;
}

.tt-guide-article strong {
  color: var(--tt-ink);
}

.tt-guide-article code {
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  background: var(--tt-surface-2);
  color: var(--tt-ink);
  font-family: var(--tt-mono);
  font-size: 0.88em;
  overflow-wrap: anywhere;
}

.tt-guide-article hr {
  margin: 2rem 0;
  border: 0;
  border-top: 1px solid var(--tt-border);
}

.tt-guide-callout,
.tt-guide-example,
.tt-guide-formula {
  margin: 1.25rem 0;
  padding: 1rem 1.1rem;
  border-radius: 12px;
}

.tt-guide-callout {
  border: 1px solid #c6daf7;
  border-left: 4px solid var(--tt-primary);
  background: var(--tt-primary-soft);
}

.tt-guide-callout--warning {
  border-color: #f0d49a;
  border-left-color: var(--tt-warning);
  background: var(--tt-warning-soft);
}

.tt-guide-callout p:last-child,
.tt-guide-example p:last-child,
.tt-guide-formula p:last-child {
  margin-bottom: 0;
}

.tt-guide-callout p,
.tt-guide-example p,
.tt-guide-formula p {
  color: inherit;
}

.tt-guide-example {
  border: 1px solid var(--tt-border);
  background: var(--tt-surface-2);
}

.tt-guide-example > strong:first-child,
.tt-guide-formula > strong:first-child {
  display: block;
  margin-bottom: 0.45rem;
  color: var(--tt-ink);
  font-size: 0.8rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.tt-guide-formula {
  border: 1px solid var(--tt-border);
  background: #0c1a2b;
  color: #e8f1ff;
  font-family: var(--tt-mono);
  font-size: 0.9rem;
  line-height: 1.7;
  overflow-wrap: anywhere;
}

.tt-guide-formula strong {
  color: #ffffff;
}

.tt-guide-table-wrap {
  margin: 1.25rem 0;
  overflow-x: auto;
  border: 1px solid var(--tt-border);
  border-radius: 12px;
}

.tt-guide-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.9rem;
}

.tt-guide-table caption {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--tt-border);
  background: var(--tt-surface-2);
  color: var(--tt-muted);
  font-size: 0.8rem;
  text-align: left;
}

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

.tt-guide-table th {
  background: var(--tt-surface-2);
  color: var(--tt-ink);
  font-weight: 700;
}

.tt-guide-table tr:last-child td,
.tt-guide-table tr:last-child th {
  border-bottom: 0;
}

.tt-guide-checklist {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 1.25rem;
  padding: 0;
  list-style: none;
}

.tt-guide-checklist li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--tt-border);
  border-radius: 10px;
  background: var(--tt-surface);
  font-size: 0.92rem;
}

.tt-guide-checklist .bi {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--tt-primary);
}

.tt-guide-steps {
  counter-reset: tt-guide-step;
  display: grid;
  gap: 0.7rem;
  margin: 1rem 0 1.3rem;
  padding: 0;
  list-style: none;
}

.tt-guide-steps li {
  position: relative;
  margin: 0;
  padding: 0.75rem 0.8rem 0.75rem 2.55rem;
  border: 1px solid var(--tt-border);
  border-radius: 11px;
  background: var(--tt-surface);
}

.tt-guide-steps li::before {
  counter-increment: tt-guide-step;
  content: counter(tt-guide-step);
  position: absolute;
  left: 0.75rem;
  top: 0.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: var(--tt-primary-soft);
  color: var(--tt-primary);
  font-size: 0.75rem;
  font-weight: 700;
}

.tt-guide-cta,
.tt-resource-cta {
  margin: 1.5rem 0 0;
  padding: 1.2rem;
  border-radius: var(--tt-radius);
  background: linear-gradient(135deg, #0c1a2b 0%, #13315c 100%);
  color: #e8f1ff;
}

.tt-guide-cta h2,
.tt-guide-cta h3,
.tt-resource-cta h2,
.tt-resource-cta h3 {
  margin-top: 0;
  color: #ffffff;
}

.tt-guide-cta p,
.tt-resource-cta p {
  color: #d8e5f7;
}

.tt-guide-cta .tt-btn-secondary,
.tt-resource-cta .tt-btn-secondary {
  border-color: rgba(255, 255, 255, 0.35);
  background: transparent;
  color: #ffffff !important;
}

.tt-guide-cta .tt-btn-secondary:hover,
.tt-resource-cta .tt-btn-secondary:hover {
  border-color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
  color: #ffffff !important;
}

.tt-guide-cta-actions,
.tt-resource-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 0.9rem;
}

.tt-guide-sidebar {
  display: grid;
  gap: 0.9rem;
}

.tt-guide-sidebar-card {
  padding: 1rem;
}

.tt-guide-sidebar-card h2,
.tt-guide-sidebar-card h3 {
  margin-bottom: 0.6rem;
  font-size: 1rem;
}

.tt-guide-toc ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: tt-toc;
}

.tt-guide-toc li {
  margin: 0;
  border-bottom: 1px solid var(--tt-border);
  counter-increment: tt-toc;
}

.tt-guide-toc li:last-child {
  border-bottom: 0;
}

.tt-guide-toc a {
  display: flex;
  gap: 0.45rem;
  padding: 0.52rem 0;
  color: var(--tt-body) !important;
  font-size: 0.87rem;
  line-height: 1.4;
  text-decoration: none;
}

.tt-guide-toc a::before {
  content: counter(tt-toc) ".";
  color: var(--tt-muted);
  font-weight: 700;
}

.tt-guide-toc a:hover {
  color: var(--tt-primary) !important;
  text-decoration: none;
}

.tt-guide-side-cta {
  border-color: #c6daf7;
  background: var(--tt-primary-soft);
}

.tt-guide-side-cta p {
  color: var(--tt-primary-strong);
  font-size: 0.88rem;
}

.tt-guide-side-cta--product {
  border-color: #f2c7dd;
  background: var(--tt-accent-soft);
}

.tt-guide-side-cta--product p {
  color: #7d174c;
}

.tt-guide-side-cta .tt-btn {
  width: 100%;
}

.tt-guide-related {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.7rem;
  margin-top: 1rem;
}

.tt-guide-hub-hero {
  padding: clamp(1.7rem, 4vw, 3.2rem) 0 clamp(1.6rem, 3vw, 2.6rem);
  background:
    radial-gradient(46rem 22rem at 88% -25%, rgba(23, 92, 211, 0.15), transparent 62%),
    radial-gradient(30rem 18rem at 3% 115%, rgba(214, 0, 110, 0.07), transparent 65%);
}

.tt-guide-hub-hero h1 {
  max-width: 880px;
}

.tt-guide-hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-top: 1.1rem;
}

.tt-guide-hub-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.9rem;
}

.tt-guide-hub-card {
  display: flex;
  flex-direction: column;
  gap: 0.55rem;
  padding: 1.1rem;
  color: inherit !important;
  text-decoration: none !important;
  transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.tt-guide-hub-card:hover {
  transform: translateY(-2px);
  border-color: var(--tt-primary);
  box-shadow: var(--tt-shadow);
  text-decoration: none !important;
}

.tt-guide-hub-card-top {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.tt-guide-hub-card h2,
.tt-guide-hub-card h3 {
  margin: 0;
  font-size: 1.08rem;
  line-height: 1.3;
}

.tt-guide-hub-card p {
  margin: 0;
  color: var(--tt-muted);
  font-size: 0.9rem;
}

.tt-guide-hub-card-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-top: auto;
  padding-top: 0.4rem;
  color: var(--tt-primary);
  font-size: 0.84rem;
  font-weight: 700;
}

.tt-guide-feature {
  display: grid;
  gap: 1rem;
  padding: 1.2rem;
  border: 1px solid #c6daf7;
  border-radius: var(--tt-radius);
  background: linear-gradient(135deg, var(--tt-primary-soft) 0%, #f7fbff 100%);
}

.tt-guide-feature h2 {
  margin-bottom: 0.35rem;
}

.tt-guide-feature p {
  margin-bottom: 0;
  color: var(--tt-primary-strong);
}

.tt-guide-resource-band {
  padding: 1.3rem;
  border: 1px solid var(--tt-border);
  border-radius: var(--tt-radius);
  background: var(--tt-surface);
  box-shadow: var(--tt-shadow-sm);
}

.tt-guide-resource-band h2 {
  margin-bottom: 0.4rem;
}

.tt-resource-hero {
  padding: clamp(1.7rem, 4vw, 3rem) 0 clamp(1.5rem, 3vw, 2.4rem);
  background:
    radial-gradient(48rem 22rem at 88% -30%, rgba(8, 116, 67, 0.13), transparent 62%),
    radial-gradient(30rem 18rem at 4% 118%, rgba(23, 92, 211, 0.08), transparent 65%);
}

.tt-resource-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}

.tt-resource-panel {
  padding: 1.15rem;
}

.tt-resource-panel h2,
.tt-resource-panel h3 {
  margin-top: 0;
}

.tt-resource-preview {
  padding: 1rem;
  border: 1px solid var(--tt-border);
  border-radius: 12px;
  background: var(--tt-surface-2);
}

.tt-resource-preview h3 {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin-bottom: 0.55rem;
  font-size: 0.98rem;
}

.tt-resource-preview ul {
  margin: 0;
  padding: 0;
  list-style: none;
}

.tt-resource-preview li {
  display: flex;
  align-items: flex-start;
  gap: 0.5rem;
  margin: 0;
  padding: 0.38rem 0;
  border-bottom: 1px solid var(--tt-border);
  font-size: 0.88rem;
}

.tt-resource-preview li:last-child {
  border-bottom: 0;
}

.tt-resource-preview .bi {
  flex: 0 0 auto;
  margin-top: 0.12rem;
  color: var(--tt-success);
}

.tt-resource-facts {
  display: grid;
  gap: 0.55rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}

.tt-resource-facts li {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  margin: 0;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--tt-border);
  border-radius: 10px;
  background: var(--tt-surface-2);
  font-size: 0.9rem;
}

.tt-resource-facts .bi {
  flex: 0 0 auto;
  margin-top: 0.1rem;
  color: var(--tt-primary);
}

.tt-resource-note {
  margin-top: 1rem;
  color: var(--tt-muted);
  font-size: 0.84rem;
}

@media (min-width: 560px) {
  .tt-guide-related {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tt-guide-hub-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 820px) {
  .tt-guide-layout {
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 1.4rem;
  }

  .tt-guide-sidebar {
    position: sticky;
    top: calc(var(--header-h, 80px) + 1rem);
  }

  .tt-guide-related {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .tt-guide-feature {
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
  }

  .tt-resource-grid {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.85fr);
    gap: 1.3rem;
  }
}

@media (min-width: 1000px) {
  .tt-guide-hub-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}
