/* Shared styles for UnfollowLens guide pages (/guide/*).
   Design tokens mirror the main app and about/terms pages. */

:root {
  --bg: #fdfcfa;
  --bg-alt: #f5f3ef;
  --text: #1a1a1a;
  --text-secondary: #666666;
  --text-muted: #999999;
  --accent: #e63946;
  --border: #e8e6e1;
  --border-dark: #d4d1ca;
  --card-shadow: 0 2px 40px rgba(0, 0, 0, 0.06);
  --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 16px;
  -webkit-font-smoothing: antialiased;
}

.container {
  max-width: 800px;
  margin: 0 auto;
  padding: 0 24px;
}

.header {
  padding: 56px 0 32px;
  text-align: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 500;
  transition: var(--transition);
  margin-bottom: 24px;
}

.back-link:hover {
  color: var(--accent);
}

.page-title {
  font-family: 'DM Sans', 'Noto Sans KR', sans-serif;
  font-size: clamp(1.6rem, 5vw, 2.2rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 12px;
  line-height: 1.3;
}

.page-title .dot {
  color: var(--accent);
}

.page-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  max-width: 620px;
  margin: 0 auto;
}

.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 36px 40px;
  box-shadow: var(--card-shadow);
  margin-bottom: 24px;
}

/* Table of contents */
.toc {
  background: var(--bg-alt);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 20px 24px;
  margin-bottom: 32px;
}

.toc__label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-bottom: 12px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.toc li {
  margin-bottom: 8px;
}

.toc li:last-child {
  margin-bottom: 0;
}

.toc a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.92rem;
  transition: var(--transition);
}

.toc a:hover {
  color: var(--accent);
}

/* Article body */
.article h2 {
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 48px;
  margin-bottom: 16px;
  scroll-margin-top: 24px;
}

.article h2:first-child {
  margin-top: 0;
}

.article h3 {
  font-size: 1.08rem;
  font-weight: 600;
  color: var(--text);
  margin-top: 32px;
  margin-bottom: 12px;
}

.article p {
  color: var(--text-secondary);
  margin-bottom: 16px;
  line-height: 1.85;
}

.article ul,
.article ol {
  padding-left: 22px;
  margin-bottom: 18px;
}

.article li {
  color: var(--text-secondary);
  margin-bottom: 8px;
  line-height: 1.8;
}

.article strong {
  color: var(--text);
  font-weight: 600;
}

.article a {
  color: var(--accent);
  text-decoration: none;
}

.article a:hover {
  text-decoration: underline;
}

.article hr {
  border: none;
  border-top: 1px solid var(--border);
  margin: 40px 0;
}

/* Callout (blockquote) */
.callout {
  background: var(--bg-alt);
  border-left: 3px solid var(--accent);
  border-radius: 12px;
  padding: 16px 22px;
  margin: 24px 0;
}

.callout p {
  margin-bottom: 0;
  color: var(--text);
}

/* Internal cross-link callout */
.callout--link {
  border-left-color: var(--border-dark);
}

.callout--link a {
  font-weight: 500;
}

/* Figures / screenshots */
figure {
  margin: 24px 0;
}

figure img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-alt);
}

figure.img-narrow img {
  max-width: 360px;
  margin: 0 auto;
}

figcaption {
  text-align: center;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-top: 10px;
}

/* Tables */
.table-wrap {
  overflow-x: auto;
  margin: 24px 0;
}

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

th,
td {
  text-align: left;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border);
}

th {
  background: var(--bg-alt);
  color: var(--text);
  font-weight: 600;
}

td {
  color: var(--text-secondary);
}

td strong {
  color: var(--text);
}

/* CTA */
.cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 8px;
  padding: 14px 28px;
  background: var(--accent);
  color: white;
  border-radius: 10px;
  font-weight: 600;
  text-decoration: none;
  transition: var(--transition);
}

.cta:hover {
  transform: translateY(-2px);
  text-decoration: none;
}

.byline {
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  font-size: 0.82rem;
  color: var(--text-muted);
}

/* Footer (shared with about/terms) */
.footer {
  text-align: center;
  padding: 40px 20px;
  color: var(--text-muted);
  font-size: 0.85rem;
}

.footer-links {
  display: flex;
  justify-content: center;
  gap: 24px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.footer-links a {
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.85rem;
  transition: var(--transition);
}

.footer-links a:hover {
  color: var(--accent);
}

@media (max-width: 640px) {
  .container {
    padding: 0 16px;
  }
  .header {
    padding: 36px 0 20px;
  }
  .card {
    padding: 24px 20px;
  }
  .article h2 {
    font-size: 1.2rem;
    margin-top: 36px;
  }
  .footer-links {
    gap: 16px;
  }
}

@media (max-width: 400px) {
  .card {
    padding: 20px 16px;
  }
  .article h2 {
    font-size: 1.1rem;
  }
}
