/* Google Fonts Setup */
@import url('https://fonts.googleapis.com/css2?family=Noto+Sans+JP:wght@400;700&family=Noto+Serif+JP:wght@600;800&family=Lora:ital,wght@0,600;1,500&display=swap');

:root {
  /* Color Palette - 2010s Classic Reference Style */
  --bg-primary: #fcfcfc; /* Crisp off-white */
  --bg-secondary: #f3f4f6; /* Classic light gray sidebar/background */
  --bg-card: #ffffff;
  
  --accent-primary: #1e40af; /* Solid royal blue */
  --accent-secondary: #0f766e;
  
  --text-primary: #111827; /* Near black */
  --text-secondary: #374151; /* Dark gray */
  --text-muted: #6b7280;
  
  --border-color: #d1d5db; /* Solid gray border */
  --header-bg: #ffffff;
  --header-border: #1e40af; /* Strong solid accent border under header */
  
  /* Fonts */
  --font-sans: -apple-system, BlinkMacSystemFont, "Helvetica Neue", "Segoe UI", "Noto Sans JP", sans-serif;
  --font-display: 'Lora', 'Noto Serif JP', Georgia, "Hiragino Mincho ProN", serif;
  
  /* Widths */
  --max-width: 1050px;
  --header-height: 60px;
}

/* Reset & Base Styles */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
  line-height: 1.65;
  overflow-x: hidden;
}

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

a:hover {
  text-decoration: underline;
  color: #1d4ed8;
}

/* Base Layout */
.site-wrapper {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Header & Navigation (Classic Flat Bar) */
header.site-header {
  position: sticky;
  top: 0;
  height: var(--header-height);
  background: var(--header-bg);
  border-bottom: 3px solid var(--header-border); /* Solid blue line instead of thin gray border */
  z-index: 100;
  display: flex;
  align-items: center;
}

.nav-container {
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.logo a {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.3rem;
  color: var(--text-primary);
}

.logo a:hover {
  text-decoration: none;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1rem;
}

.nav-item a {
  color: var(--text-secondary);
  font-weight: bold;
  padding: 0.4rem 0.6rem;
  border-radius: 3px;
  font-size: 0.9rem;
}

.nav-item a:hover {
  color: var(--accent-primary);
  background: var(--bg-secondary);
  text-decoration: none;
}

.nav-item.active a {
  color: #ffffff;
  background: var(--accent-primary);
  text-decoration: none;
}

/* Main Content Area */
main {
  flex: 1;
  width: 100%;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 2rem 1.5rem;
}

/* Hero Section (Home Page) - Classic Jumbotron style */
.hero {
  text-align: center;
  padding: 3.5rem 1.5rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  margin-bottom: 2.5rem;
}

.hero-badge {
  display: inline-block;
  padding: 0.2rem 0.6rem;
  background: #ffffff;
  border: 1px solid var(--border-color);
  color: var(--text-secondary);
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 1rem;
}

.hero h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 2.3rem;
  line-height: 1.3;
  margin-bottom: 1.25rem;
  color: var(--text-primary);
}

.hero p {
  font-size: 1.05rem;
  color: var(--text-secondary);
  max-width: 680px;
  margin: 0 auto 2rem auto;
}

.hero-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1.5rem;
  border-radius: 4px;
  background: var(--accent-primary);
  color: #fff;
  font-weight: bold;
  font-size: 0.95rem;
  border: 1px solid #1d4ed8;
  transition: var(--transition-smooth);
}

.hero-cta:hover {
  background: #1d4ed8;
  color: #fff;
  text-decoration: none;
}

/* Process Roadmap */
.roadmap-title {
  text-align: center;
  margin-bottom: 2rem;
}

.roadmap-title h2 {
  font-family: var(--font-display);
  font-size: 1.75rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.roadmap-title p {
  color: var(--text-secondary);
  font-size: 0.95rem;
}

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

.card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.5rem;
  position: relative;
  height: 100%;
}

.card:hover {
  border-color: #9ca3af;
}

.card-num {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: bold;
  color: #e5e7eb;
  position: absolute;
  top: 0.75rem;
  right: 1rem;
}

.card h3 {
  font-size: 1.15rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  font-family: var(--font-display);
  font-weight: bold;
}

.card p {
  color: var(--text-secondary);
  font-size: 0.9rem;
  margin-bottom: 1rem;
}

.card-link {
  font-size: 0.85rem;
  font-weight: bold;
  color: var(--accent-primary);
}

.card-link:hover {
  text-decoration: underline;
}

/* Standard Content Template Layout */
.content-layout {
  display: grid;
  grid-template-columns: 1fr 240px;
  gap: 2rem;
}

@media (max-width: 900px) {
  .content-layout {
    grid-template-columns: 1fr;
  }
}

.article-container {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 2rem;
}

/* Article Header */
.article-header {
  margin-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 1rem;
}

.article-category {
  color: var(--accent-secondary);
  font-size: 0.8rem;
  font-weight: bold;
  margin-bottom: 0.4rem;
  display: block;
}

.article-title {
  font-size: 1.8rem;
  font-weight: 800;
  line-height: 1.35;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.article-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Markdown Rendering Elements Styles */
.article-body h2 {
  font-size: 1.4rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  color: var(--text-primary);
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.25rem;
  font-family: var(--font-display);
}

.article-body h3 {
  font-size: 1.15rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  font-family: var(--font-display);
}

.article-body p {
  margin-bottom: 1rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
}

.article-body strong {
  color: var(--text-primary);
}

.article-body ul, .article-body ol {
  margin-bottom: 1rem;
  padding-left: 1.5rem;
  color: var(--text-secondary);
}

.article-body li {
  margin-bottom: 0.25rem;
  font-size: 0.95rem;
}

.article-body blockquote {
  border-left: 3px solid var(--border-color);
  background: var(--bg-secondary);
  padding: 0.75rem 1rem;
  margin: 1rem 0;
  border-radius: 4px;
}

.article-body blockquote p {
  margin: 0;
  font-style: italic;
  color: var(--text-secondary);
}

.article-body code {
  font-family: monospace;
  background: var(--bg-secondary);
  padding: 0.15rem 0.3rem;
  border-radius: 3px;
  font-size: 0.85em;
  color: #991b1b;
  border: 1px solid var(--border-color);
}

.article-body pre {
  background: #1f2937;
  padding: 0.75rem;
  border-radius: 4px;
  overflow-x: auto;
  margin-bottom: 1rem;
}

.article-body pre code {
  background: transparent;
  padding: 0;
  color: #f3f4f6;
  font-size: 0.85rem;
  border: none;
}

.article-body table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: 1.5rem;
  font-size: 0.9rem;
}

.article-body th, .article-body td {
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--border-color);
  text-align: left;
}

.article-body th {
  background: var(--bg-secondary);
  font-weight: bold;
  color: var(--text-primary);
}

.article-body tr:hover td {
  background: #fdfdfd;
}

.article-body img {
  max-width: 100%;
  border-radius: 4px;
  margin: 1.25rem 0;
  border: 1px solid var(--border-color);
}

/* Sidebar & Table of Contents */
.sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.widget {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1rem;
}

.widget-title {
  font-family: var(--font-display);
  font-size: 0.95rem;
  font-weight: bold;
  margin-bottom: 0.5rem;
  padding-bottom: 0.25rem;
  border-bottom: 1px solid var(--border-color);
  color: var(--text-primary);
}

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

.toc-container ul ul {
  padding-left: 0.75rem;
  margin-top: 0.2rem;
}

.toc-container li {
  margin-bottom: 0.3rem;
}

.toc-container a {
  font-size: 0.8rem;
  color: var(--text-secondary);
}

.toc-container a:hover {
  text-decoration: underline;
  color: var(--accent-primary);
}

.section-links {
  list-style: none;
}

.section-links li {
  margin-bottom: 0.4rem;
}

.section-links a {
  display: block;
  color: var(--text-secondary);
  font-size: 0.85rem;
}

.section-links a:hover {
  text-decoration: underline;
}

.section-links .active a {
  color: var(--accent-primary);
  font-weight: bold;
}

/* List Layout (Category Page) */
.list-container {
  max-width: 750px;
  margin: 0 auto;
}

.list-header {
  margin-bottom: 2rem;
  text-align: center;
}

.list-header h1 {
  font-family: var(--font-display);
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  line-height: 1.3;
}

.list-intro {
  text-align: left;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  max-width: 680px;
  margin: 1rem auto 0 auto;
}

.list-intro p {
  margin-bottom: 0.75rem;
}

.list-intro ul {
  margin-bottom: 0.75rem;
  padding-left: 1.25rem;
}

.list-intro li {
  margin-bottom: 0.2rem;
}

.article-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 1.5rem;
}

.list-card {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.list-card:hover {
  border-color: #9ca3af;
}

.list-card h2 {
  font-size: 1.2rem;
  font-weight: bold;
  font-family: var(--font-display);
}

.list-card h2 a {
  color: var(--text-primary);
}

.list-card h2 a:hover {
  text-decoration: underline;
}

.list-card-summary {
  color: var(--text-secondary);
  font-size: 0.9rem;
}

.list-card-meta {
  font-size: 0.75rem;
  color: var(--text-muted);
}

/* Footer */
footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-color);
  padding: 2rem 0;
  margin-top: 3rem;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.footer-container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.footer-logo {
  font-family: var(--font-display);
  font-weight: bold;
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
  display: inline-block;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .hero h1 {
    font-size: 1.75rem;
  }
}

/* Premium Workflow Flowchart Component */
.workflow-container {
  display: flex;
  align-items: stretch;
  justify-content: space-between;
  gap: 0.5rem;
  margin: 2rem 0;
  padding: 1rem;
  background: var(--bg-secondary);
  border: 1px solid var(--border-color);
  border-radius: 6px;
}

.workflow-step {
  flex: 1;
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 1.25rem 0.75rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.workflow-step .step-num {
  width: 30px;
  height: 30px;
  background: var(--accent-primary);
  color: #ffffff;
  font-weight: bold;
  font-size: 0.9rem;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 0.75rem;
}

.workflow-step h4 {
  font-family: var(--font-sans);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
}

.workflow-step p {
  font-size: 0.8rem;
  color: var(--text-secondary);
  line-height: 1.4;
  margin: 0;
}

.workflow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
  font-weight: bold;
  user-select: none;
}

@media (max-width: 768px) {
  .workflow-container {
    flex-direction: column;
    gap: 1rem;
  }
  
  .workflow-arrow {
    transform: rotate(90deg);
    margin: -0.25rem 0;
  }
}

/* Homepage Welcome Banner for Beginners */
.welcome-banner {
  background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  padding: 1.5rem;
  margin-bottom: 2.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  box-shadow: 0 1px 3px rgba(0,0,0,0.05);
}

.welcome-banner-text h2 {
  font-size: 1.25rem;
  font-weight: bold;
  color: #1e40af;
  margin-bottom: 0.5rem;
  font-family: var(--font-sans);
}

.welcome-banner-text p {
  font-size: 0.9rem;
  color: #1e3a8a;
  margin: 0;
  line-height: 1.55;
}

.welcome-btn {
  background: #1e40af;
  color: #ffffff;
  padding: 0.65rem 1.5rem;
  border-radius: 4px;
  font-weight: bold;
  font-size: 0.9rem;
  white-space: nowrap;
  text-decoration: none;
  display: inline-block;
  border: 1px solid #1d4ed8;
  transition: background 0.2s ease;
}

.welcome-btn:hover {
  background: #1d4ed8;
  color: #ffffff;
  text-decoration: none;
}

@media (max-width: 768px) {
  .welcome-banner {
    flex-direction: column;
    align-items: stretch;
    text-align: center;
    gap: 1rem;
  }
  
  .welcome-btn {
    align-self: center;
  }
}


