:root {
  --bg: #f6f7f9;
  --surface: #ffffff;
  --surface2: #f0f2f6;
  --border: #e2e5eb;
  --text: #1a1f2b;
  --muted: #5c6578;
  --accent: #2563eb;
  --accent2: #3b82f6;
  --green: #059669;
  --blue: #2563eb;
  --radius: 12px;
  --font: 'SF Pro Text', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  min-height: 100vh;
}

.bg-grid {
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(rgba(16, 24, 40, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(16, 24, 40, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  z-index: 0;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem 1.25rem 4rem;
}

header {
  margin-bottom: 2.5rem;
}

.badge {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  background: #fff;
  border: 1px solid var(--border);
  padding: 0.35rem 0.65rem;
  border-radius: 999px;
  margin-bottom: 0.75rem;
}

.status-banner {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  align-items: baseline;
  margin-bottom: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(61, 214, 140, 0.35);
  background: rgba(61, 214, 140, 0.08);
  font-size: 0.88rem;
}

.status-banner strong {
  color: var(--green);
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.status-banner span {
  color: var(--muted);
}

.share-bar {
  margin-top: 1rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  border: 1px solid rgba(91, 156, 245, 0.35);
  background: rgba(91, 156, 245, 0.08);
  font-size: 0.85rem;
  color: var(--muted);
  line-height: 1.45;
}

.share-bar strong {
  color: var(--text);
}

.share-bar a {
  color: var(--blue);
  word-break: break-all;
}

.share-bar .share-copy {
  margin-left: 0.5rem;
  vertical-align: middle;
}

.share-bar code {
  font-size: 0.78rem;
}

.howto-list {
  margin: 0;
  padding-left: 1.25rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.howto-list li {
  margin-bottom: 0.45rem;
  color: var(--text);
}

h1 {
  font-size: clamp(1.75rem, 4vw, 2.35rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  margin-bottom: 0.35rem;
}

.subtitle {
  color: var(--muted);
  font-size: 1rem;
  max-width: 36rem;
}

.section-hint {
  color: var(--muted);
  font-size: 0.88rem;
  margin: -0.5rem 0 1rem;
}

nav.toc a.muted-link {
  opacity: 0.55;
}

.pipeline-track {
  list-style: none;
  display: grid;
  gap: 0.65rem;
  margin: 0 0 1rem;
}

.pipeline-track li {
  display: flex;
  gap: 0.85rem;
  align-items: flex-start;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1rem;
}

.pipe-num {
  flex-shrink: 0;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 6px;
  background: var(--accent);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pipe-note {
  display: block;
  font-size: 0.78rem;
  color: var(--muted);
  margin-top: 0.15rem;
}

.pipeline-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
}

.btn {
  display: inline-block;
  text-decoration: none;
  color: var(--text);
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 0.5rem 0.9rem;
  font-size: 0.85rem;
}

.btn:hover {
  border-color: var(--accent);
}

.tech-section {
  margin-top: 1rem;
}

.tech-section summary {
  cursor: pointer;
  color: var(--muted);
  font-size: 0.85rem;
  margin-bottom: 0.75rem;
}

.tech-links {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.tech-links a {
  color: var(--blue);
  font-size: 0.85rem;
  text-decoration: none;
}

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

nav.toc {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 1.25rem;
}

nav.toc a {
  font-size: 0.8rem;
  color: var(--muted);
  text-decoration: none;
  padding: 0.35rem 0.7rem;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  transition: color 0.15s, border-color 0.15s;
}

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

section {
  margin-bottom: 2.75rem;
}

h2 {
  font-size: 1.15rem;
  font-weight: 600;
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

h2 .line {
  flex: 1;
  height: 1px;
  background: var(--border);
}

.quick-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 0.85rem;
}

.quick-card {
  display: block;
  text-decoration: none;
  color: inherit;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem 1.15rem;
  transition: transform 0.15s, border-color 0.15s, box-shadow 0.15s;
}

.quick-card:hover {
  transform: translateY(-2px);
  border-color: #c8ceda;
  box-shadow: 0 4px 14px rgba(16, 24, 40, 0.08);
}

.quick-card.primary {
  border-color: var(--border);
  background: var(--surface);
}

.quick-card .icon {
  font-size: 1.5rem;
  margin-bottom: 0.5rem;
}

.quick-card h3 {
  font-size: 0.95rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.quick-card p {
  font-size: 0.78rem;
  color: var(--muted);
}

.quick-card .arrow {
  margin-top: 0.6rem;
  font-size: 0.75rem;
  color: var(--accent2);
}

.procedure-list {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.proc-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

.proc-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  padding: 1.15rem 1.25rem;
  cursor: pointer;
  user-select: none;
}

.proc-header:hover {
  background: var(--surface2);
}

.step-num {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: 8px;
  background: var(--accent);
  color: #fff;
  font-size: 0.85rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.proc-header h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}

.proc-header p {
  font-size: 0.85rem;
  color: var(--muted);
}

.chevron {
  margin-left: auto;
  color: var(--muted);
  transition: transform 0.2s;
  font-size: 0.9rem;
}

.proc-card.open .chevron {
  transform: rotate(180deg);
}

.proc-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
}

.proc-card.open .proc-body {
  display: block;
}

.proc-body h4 {
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--muted);
  margin: 1rem 0 0.5rem;
}

.proc-body h4:first-child {
  margin-top: 1rem;
}

.link-list {
  list-style: none;
}

.link-list li {
  margin-bottom: 0.35rem;
}

.link-list a {
  color: var(--blue);
  text-decoration: none;
  font-size: 0.88rem;
}

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

.link-list .local,
.link-list .placeholder {
  font-size: 0.85rem;
  color: var(--muted);
  font-family: ui-monospace, monospace;
}

.link-list .note {
  font-size: 0.75rem;
  color: var(--muted);
  margin-left: 0.25rem;
}

.checklist {
  list-style: none;
}

.checklist li {
  font-size: 0.85rem;
  color: var(--muted);
  padding: 0.3rem 0 0.3rem 1.35rem;
  position: relative;
}

.checklist li::before {
  content: '○';
  position: absolute;
  left: 0;
  color: var(--green);
  font-size: 0.7rem;
}

.strategy-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 0.85rem;
}

.strategy-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.1rem;
}

.strategy-card .tier {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--accent2);
  margin-bottom: 0.35rem;
}

.strategy-card h3 {
  font-size: 0.88rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--muted);
}

.strategy-card p {
  font-size: 0.82rem;
  color: var(--text);
  margin-bottom: 0.5rem;
}

.strategy-card .meta {
  font-size: 0.75rem;
  color: var(--muted);
  border-top: 1px solid var(--border);
  padding-top: 0.5rem;
  margin-top: 0.5rem;
}

.col-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
}

.col-table th,
.col-table td {
  text-align: left;
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
}

.col-table th {
  color: var(--muted);
  font-weight: 500;
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.col-table td:first-child {
  font-family: ui-monospace, monospace;
  color: var(--accent2);
  white-space: nowrap;
}

.col-table-wrap {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
}

footer {
  margin-top: 3rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
  font-size: 0.78rem;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 600px) {
  .proc-header {
    flex-wrap: wrap;
  }

  .chevron {
    margin-left: 2.5rem;
  }
}
