:root {
  color-scheme: light;
  --bg: #f3f4f6;
  --card-bg: #ffffff;
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --text: #1f2937;
  --muted: #6b7280;
  --border: #e5e7eb;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Inter', 'Segoe UI', system-ui, -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
}

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

body.home {
  background: radial-gradient(circle at top right, rgba(37, 99, 235, 0.12), transparent 55%), var(--bg);
}

a {
  color: var(--primary);
  text-decoration: none;
}

a:hover,
a:focus {
  text-decoration: underline;
  color: var(--primary-dark);
}

.page-wrapper {
  max-width: 960px;
  margin: 0 auto;
  padding: 3rem 1.5rem 4rem;
}

.home .page-wrapper {
  max-width: 1100px;
  padding-top: 4rem;
}

.page-header {
  margin-bottom: 2.5rem;
}

.page-header nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-weight: 600;
}

.page-title {
  margin: 1rem 0 0;
}

.page-title h1 {
  font-size: clamp(2.1rem, 5vw, 2.8rem);
  margin: 0 0 0.75rem;
}

.page-title p {
  margin: 0;
  color: var(--muted);
  max-width: 58ch;
}

article {
  background: var(--card-bg);
  border-radius: 20px;
  padding: clamp(1.75rem, 4vw, 2.5rem);
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.08);
  border: 1px solid var(--border);
}

.home .page-wrapper article {
  background: transparent;
  box-shadow: none;
  border: none;
  padding: 0;
}

.content section + section {
  margin-top: 2.5rem;
  border-top: 1px solid var(--border);
  padding-top: 2.5rem;
}

.content h2 {
  font-size: clamp(1.5rem, 3vw, 1.85rem);
  margin: 0 0 1rem;
}

.content h3 {
  font-size: clamp(1.2rem, 2.5vw, 1.4rem);
  margin: 2rem 0 0.75rem;
}

.content h4 {
  font-size: 1.1rem;
  margin: 1.5rem 0 0.5rem;
}

.content p {
  margin: 0 0 1rem;
}

.content ul,
.content ol {
  margin: 0 0 1.5rem 1.5rem;
  padding: 0;
}

.content li + li {
  margin-top: 0.6rem;
}

.content strong {
  color: var(--primary-dark);
}

.content code {
  font-family: 'Fira Code', 'SFMono-Regular', Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  background: rgba(37, 99, 235, 0.08);
  padding: 0.1rem 0.4rem;
  border-radius: 6px;
  font-size: 0.95em;
}

.content pre {
  overflow-x: auto;
  background: #0f172a;
  color: #f8fafc;
  padding: 1.25rem;
  border-radius: 14px;
  font-size: 0.9rem;
  line-height: 1.6;
  margin: 0 0 1.5rem;
}

.content pre code {
  background: transparent;
  padding: 0;
  color: inherit;
}

.content img {
  display: block;
  max-width: 100%;
  margin: 2.5rem auto;
  border-radius: 18px;
  box-shadow: 0 12px 25px rgba(15, 23, 42, 0.12);
}

.content figure {
  margin: 2.5rem auto;
  text-align: center;
}

.content figure figcaption {
  margin-top: 0.75rem;
  color: var(--muted);
  font-size: 0.95rem;
}

.callout {
  background: rgba(37, 99, 235, 0.08);
  border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem;
  border-radius: 12px;
  margin: 1.5rem 0;
}

footer {
  margin-top: 3rem;
  text-align: center;
  color: var(--muted);
  font-size: 0.95rem;
}

footer a {
  font-weight: 600;
}

@media (max-width: 640px) {
  .page-wrapper {
    padding: 2.5rem 1.25rem 3rem;
  }

  article {
    padding: 1.75rem;
  }
}

.home-hero {
  text-align: center;
  margin-bottom: 3rem;
}

.home-hero h1 {
  font-size: clamp(2.4rem, 5vw, 3rem);
  margin-bottom: 1rem;
}

.home-hero p {
  margin: 0 auto;
  max-width: 60ch;
  color: var(--muted);
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.75rem;
  margin-bottom: 3rem;
}

.guide-card {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
  display: flex;
  flex-direction: column;
  gap: 1rem;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.guide-card:hover,
.guide-card:focus-within {
  transform: translateY(-6px);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.12);
}

.guide-icon {
  width: 56px;
  height: 56px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  background: rgba(37, 99, 235, 0.1);
  color: var(--primary);
}

.guide-card h3 {
  margin: 0;
  font-size: 1.3rem;
}

.guide-card p {
  margin: 0;
  color: var(--muted);
  flex: 1;
}

.guide-card a {
  align-self: flex-start;
  font-weight: 600;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: 0.65rem 1.4rem;
  transition: background 0.2s ease;
}

.guide-card a:hover,
.guide-card a:focus {
  text-decoration: none;
  background: var(--primary-dark);
}

.quick-tips {
  background: var(--card-bg);
  border-radius: 18px;
  padding: 2.5rem;
  border: 1px solid var(--border);
  box-shadow: 0 18px 35px rgba(15, 23, 42, 0.08);
}

.quick-tips h2 {
  margin-top: 0;
  margin-bottom: 1.5rem;
  font-size: 1.8rem;
}

.quick-tips ul {
  columns: 2;
  column-gap: 2.5rem;
  margin: 0;
  padding-left: 1rem;
}

.quick-tips li {
  break-inside: avoid;
  margin-bottom: 1rem;
}

@media (max-width: 720px) {
  .quick-tips ul {
    columns: 1;
  }
}
