:root {
  color-scheme: light;
  --primary: #4f46e5;
  --primary-dark: #3730a3;
  --primary-light: #eef2ff;
  --secondary: #7c3aed;
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --surface: #ffffff;
  --bg: #f8fafc;
  --text-main: #0f172a;
  --text-muted: #475569;
  --border: #e2e8f0;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text-main);
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 860px;
  margin: 0 auto;
  padding: 20px 24px 80px;
}

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 0;
  margin-bottom: 12px;
}

header.site a.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  color: #1e293b;
  text-decoration: none;
}

header.site a.cta {
  flex: none;
  background: var(--primary-light);
  color: var(--primary);
  border: 1px solid #c7d2fe;
  border-radius: 999px;
  padding: 8px 18px;
  font-size: 13px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.2s ease;
}
header.site a.cta:hover {
  background: #e0e7ff;
  transform: translateY(-1px);
}

nav.crumbs {
  font-size: 13px;
  color: #64748b;
  margin-bottom: 16px;
}
nav.crumbs a {
  color: var(--primary);
  text-decoration: none;
  font-weight: 600;
}

/* Hero Section */
.hero {
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 50%, #7c3aed 100%);
  color: #fff;
  border-radius: 24px;
  padding: 36px 32px;
  margin-bottom: 28px;
  box-shadow: 0 12px 36px rgba(79, 70, 229, 0.22);
  position: relative;
  overflow: hidden;
}

.hero .eyebrow {
  display: inline-block;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(8px);
  padding: 4px 12px;
  border-radius: 999px;
  font-weight: 700;
  margin-bottom: 12px;
}

.hero h1 {
  font-size: 32px;
  line-height: 1.25;
  margin: 0;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.hero p {
  margin: 14px 0 0;
  font-size: 15.5px;
  line-height: 1.65;
  color: #e0e7ff;
}

/* Tags */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}
.tags .tag {
  background: #ffffff;
  border: 1px solid var(--border);
  color: var(--text-muted);
  font-size: 12.5px;
  font-weight: 600;
  padding: 5px 12px;
  border-radius: 8px;
}

/* Article Styling */
article, .blog-content {
  font-size: 15.5px;
  line-height: 1.8;
  color: #334155;
}

article h2, .blog-content h2 {
  font-size: 22px;
  font-weight: 800;
  margin: 40px 0 16px;
  color: #0f172a;
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid #e2e8f0;
  padding-bottom: 8px;
}

article h3, .blog-content h3 {
  font-size: 18px;
  font-weight: 700;
  margin: 28px 0 12px;
  color: #1e1b4b;
}

article h4, .blog-content h4 {
  font-size: 16px;
  font-weight: 700;
  margin: 20px 0 10px;
  color: #1e1b4b;
}

article p, .blog-content p {
  margin: 0 0 16px;
}

article ul, article ol, .blog-content ul, .blog-content ol {
  padding-left: 24px;
  margin: 0 0 20px;
}

article li, .blog-content li {
  margin-bottom: 8px;
}

/* Hook Text & Sentences */
.hook-text, .hook-sentence {
  background: linear-gradient(135deg, #f5f3ff 0%, #ede9fe 100%);
  border-left: 4px solid var(--secondary);
  border-radius: 0 12px 12px 0;
  padding: 14px 18px;
  margin: 20px 0 24px;
  font-size: 16px;
  font-style: italic;
  font-weight: 600;
  color: #4c1d95;
  line-height: 1.6;
}

/* GEO AI Snippet Box */
.geo-box {
  background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
  border: 1px solid #a7f3d0;
  border-left: 5px solid #10b981;
  border-radius: 16px;
  padding: 20px 22px;
  margin: 24px 0;
  color: #065f46;
  font-size: 15px;
  line-height: 1.65;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.08);
}
.geo-box strong {
  color: #047857;
  font-size: 15.5px;
}
.geo-box ul {
  margin: 10px 0 0;
  padding-left: 20px;
}

/* Takeaway Card */
.takeaway-box {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-left: 5px solid var(--primary);
  border-radius: 16px;
  padding: 20px 22px;
  margin: 24px 0;
}
.takeaway-box h4 {
  margin: 0 0 10px;
  color: #1e1b4b;
  font-size: 16px;
  font-weight: 700;
}

/* Infographic Stat Cards Grid */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin: 24px 0;
}

.stat-card {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 16px;
  text-align: center;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.04);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.stat-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(15, 23, 42, 0.08);
}
.stat-card h4 {
  margin: 0 0 6px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card p, .stat-card span, .stat-card .val, .stat-card .stat-value {
  font-size: 26px;
  font-weight: 800;
  color: var(--primary);
  margin: 0 0 4px;
  line-height: 1.1;
  display: block;
}
.stat-card .lbl, .stat-card .stat-label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.stat-card .sub, .stat-card small {
  font-size: 11.5px;
  color: #94a3b8;
  margin-top: 6px;
  display: block;
}

/* Interactive Calculator & Filter Widget */
.interactive-widget, .widget-container, #interactive-yks-tool {
  background: #ffffff;
  border: 2px solid #e0e7ff;
  border-radius: 20px;
  padding: 24px;
  margin: 32px 0;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}
.interactive-widget .widget-header {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 16px;
}
.interactive-widget h3.widget-title, .widget-container h4 {
  font-size: 17px;
  font-weight: 800;
  margin: 0 0 4px;
  color: #1e1b4b;
}
.interactive-widget .widget-desc, .widget-container p {
  font-size: 13.5px;
  color: #64748b;
  margin: 0 0 16px;
}

.input-group, .widget-container, .widget-content {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

.input-group input, .input-group select,
.widget-container input, .widget-container select,
.widget-content input, .widget-content select,
.interactive-widget input, .interactive-widget select {
  padding: 11px 16px;
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-size: 14.5px;
  background: #f8fafc;
  color: #0f172a;
  outline: none;
  font-family: inherit;
  transition: all 0.2s ease;
  flex: 1 1 160px;
}
.input-group input:focus, .input-group select:focus,
.widget-container input:focus, .widget-container select:focus {
  border-color: var(--primary);
  background: #ffffff;
  box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.12);
}

.btn-calc, .widget-container button, .btn-primary {
  background: var(--primary);
  color: #ffffff;
  border: none;
  border-radius: 12px;
  padding: 11px 22px;
  font-weight: 700;
  font-size: 14.5px;
  cursor: pointer;
  font-family: inherit;
  transition: all 0.2s ease;
  white-space: nowrap;
}
.btn-calc:hover, .widget-container button:hover, .btn-primary:hover {
  background: var(--primary-dark);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(79, 70, 229, 0.25);
}

.result-box, .widget-result {
  width: 100%;
  margin-top: 14px;
  padding: 14px 16px;
  background: #f1f5f9;
  border-radius: 12px;
  font-size: 14px;
  line-height: 1.6;
  color: #1e293b;
  display: none;
}
.result-box.active, .result-box:not(:empty), .widget-result:not(:empty) {
  display: block;
}

/* Rich Data Tables */
.table-wrap, .table-container, .table-responsive {
  width: 100%;
  overflow-x: auto;
  margin: 24px 0;
  border-radius: 16px;
  border: 1px solid var(--border);
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.03);
}

table.data-table, table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
  font-size: 14px;
  background: #ffffff;
}

table.data-table th, table th {
  background: #f8fafc;
  color: #475569;
  font-weight: 700;
  padding: 13px 16px;
  border-bottom: 1.5px solid var(--border);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  white-space: nowrap;
}

table.data-table td, table td {
  padding: 13px 16px;
  border-bottom: 1px solid #f1f5f9;
  color: #334155;
  vertical-align: middle;
}

table.data-table tr:last-child td, table tr:last-child td {
  border-bottom: none;
}

table.data-table tr:hover, table tr:hover {
  background: #f8fafc;
}

/* Badges */
.badge {
  display: inline-block;
  padding: 4px 9px;
  border-radius: 6px;
  font-weight: 700;
  font-size: 12.5px;
}
.badge-success { background: #dcfce7; color: #15803d; }
.badge-info { background: #e0e7ff; color: #4338ca; }
.badge-warning { background: #fef3c7; color: #b45309; }
.badge-danger { background: #fee2e2; color: #b91c1c; }

/* Progress Bars */
.progress-group {
  margin: 16px 0;
}
.progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text-muted);
  margin-bottom: 6px;
}
.progress-track {
  width: 100%;
  height: 10px;
  background: #e2e8f0;
  border-radius: 999px;
  overflow: hidden;
}
.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #4f46e5 0%, #7c3aed 100%);
  border-radius: 999px;
  transition: width 1s ease-in-out;
}

/* Accordion FAQ (S.S.S.) Section */
.faq-sec {
  margin: 40px 0 24px;
}
.faq-sec h2, .faq-sec h3 {
  border-bottom: none;
  margin-bottom: 16px;
}

details {
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 14px;
  padding: 14px 18px;
  margin-bottom: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 1px 4px rgba(15, 23, 42, 0.02);
}
details[open] {
  border-color: #c7d2fe;
  box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

summary {
  font-weight: 700;
  font-size: 15px;
  color: #1e1b4b;
  cursor: pointer;
  outline: none;
  user-select: none;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}
summary::-webkit-details-marker {
  display: none;
}
summary::after {
  content: "＋";
  font-size: 18px;
  color: var(--primary);
  font-weight: 700;
  transition: transform 0.2s ease;
}
details[open] summary::after {
  content: "−";
}

details p, details .faq-content, details .sss-content {
  margin: 12px 0 4px;
  font-size: 14.5px;
  line-height: 1.65;
  color: #475569;
}

/* CTA Box */
.cta-box {
  margin-top: 40px;
  border-radius: 24px;
  padding: 32px 28px;
  background: linear-gradient(135deg, #3730a3 0%, #4f46e5 60%, #7c3aed 100%);
  color: #fff;
  text-align: center;
  box-shadow: 0 12px 32px rgba(79, 70, 229, 0.25);
}
.cta-box h3 {
  color: #ffffff;
  font-size: 22px;
  margin: 0 0 10px;
}
.cta-box p.lead {
  font-weight: 800;
  font-size: 20px;
  margin: 0 0 8px;
  color: #ffffff;
}
.cta-box p, .cta-box p.sub {
  font-size: 14.5px;
  color: #e0e7ff;
  margin: 0 0 20px;
  line-height: 1.6;
}
.cta-box a.btn, .cta-box a.cta-button {
  display: inline-block;
  background: #ffffff;
  color: var(--primary);
  border-radius: 14px;
  padding: 13px 32px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.cta-box a.btn:hover, .cta-box a.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
  background: #f8fafc;
}

/* Post list on Index */
.post-list {
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 24px;
}
.post-list a.item {
  display: block;
  background: #ffffff;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 20px 22px;
  text-decoration: none;
  color: inherit;
  box-shadow: 0 2px 6px rgba(15, 23, 42, 0.03);
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}
.post-list a.item:hover {
  transform: translateY(-2px);
  border-color: #c7d2fe;
  box-shadow: 0 8px 24px rgba(79, 70, 229, 0.08);
}
.post-list .item .k {
  font-size: 12px;
  font-weight: 700;
  color: var(--primary);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.post-list .item h2 {
  font-size: 18px;
  margin: 6px 0 8px;
  color: #0f172a;
  font-weight: 800;
}
.post-list .item p {
  font-size: 14px;
  color: #64748b;
  margin: 0;
  line-height: 1.6;
}

footer.disclaimer {
  margin-top: 48px;
  padding-top: 20px;
  border-top: 1px solid #e2e8f0;
  font-size: 12px;
  line-height: 1.7;
  color: #94a3b8;
  text-align: center;
}
footer.disclaimer a {
  color: var(--primary);
  font-weight: 600;
}

@media (max-width: 640px) {
  .hero { padding: 24px 20px; }
  .hero h1 { font-size: 24px; }
  .stat-grid { grid-template-columns: 1fr 1fr; }
  .interactive-widget, .widget-container, #interactive-yks-tool { padding: 18px; }
}
