/* ==========================================================================
   Design System & Tokens (style.css)
   ========================================================================== */

:root {
    --primary: #00a968;       /* Trusting emerald green */
    --primary-light: #f0fbf7; /* Very soft green */
    --primary-hover: #009358;
    --accent: #ff8500;        /* Warm conversion orange */
    --accent-hover: #e07500;
    --accent-light: #fff5e6;
    
    /* Neutral colors */
    --text-dark: #2c3e50;
    --text-muted: #5a6c7d;
    --bg-light: #f8fafc;
    --border-color: #e2e8f0;
    --white: #ffffff;
    
    /* Box styles */
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.02);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.08);
    --shadow-cta: 0 8px 24px rgba(255, 133, 0, 0.35);
    
    /* Typography */
    --font-primary: 'Noto Sans JP', sans-serif;
    --font-display: 'Outfit', 'Noto Sans JP', sans-serif;
    
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 18px;
}

/* ==========================================================================
   Base Styles
   ========================================================================== */

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.85;
    letter-spacing: 0.02em;
    padding-bottom: 120px; /* Space for fixed bottom CTA */
}

/* Base link reset */
a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.25s ease;
}

a:hover {
    color: var(--primary-hover);
}

/* ==========================================================================
   Header Design
   ========================================================================== */

.site-header {
    background-color: var(--white);
    border-bottom: 2px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--shadow-sm);
}

.header-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
}

.logo-badge {
    background-color: var(--primary);
    color: var(--white);
    font-size: 9px;
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 10px;
    letter-spacing: 0.05em;
}

.logo-text {
    font-size: 18px;
    font-weight: 900;
    color: var(--text-dark);
    letter-spacing: -0.01em;
}

/* ==========================================================================
   Container & Layout
   ========================================================================== */

.main-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 16px;
}

/* Breadcrumbs */
.breadcrumb {
    padding: 12px 4px;
    font-size: 12px;
    color: var(--text-muted);
    overflow-x: auto;
    white-space: nowrap;
}

.breadcrumb ol {
    list-style: none;
    display: flex;
    gap: 8px;
}

.breadcrumb li + li::before {
    content: ">";
    margin-right: 8px;
    color: var(--border-color);
}

.breadcrumb a {
    color: var(--text-muted);
}

.breadcrumb a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Article Content Styles
   ========================================================================== */

.article-content {
    background-color: var(--white);
    padding: 24px 20px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 30px;
}

.article-header {
    margin-bottom: 16px;
}

.category-tag {
    display: inline-block;
    background-color: var(--primary-light);
    color: var(--primary);
    font-size: 12px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: var(--radius-sm);
    margin-bottom: 10px;
}

.entry-title {
    font-size: 22px;
    line-height: 1.45;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 12px;
}

.entry-meta {
    font-size: 12px;
    color: var(--text-muted);
    display: flex;
    gap: 16px;
}

/* Image Wrappers */
.featured-image-wrapper {
    margin: 0 -20px 24px;
}

.featured-image {
    width: 100%;
    height: auto;
    display: block;
}

.body-image-wrapper {
    margin: 20px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.body-image {
    width: 100%;
    height: auto;
    display: block;
    transition: transform 0.4s ease;
}

/* Typography elements */
.article-body p, 
.lead-section p {
    font-size: 16px;
    margin-bottom: 1.6em;
    color: var(--text-dark);
}

/* Highlight elements */
.mk {
    background: linear-gradient(transparent 65%, #fff2a3 65%);
    font-weight: 700;
    padding: 0 2px;
}

.js-marker {
    background: linear-gradient(transparent 60%, #fff2a3 60%);
    background-size: 0% 100%;
    background-repeat: no-repeat;
    background-position: left bottom;
    transition: background-size 0.8s cubic-bezier(0.25, 1, 0.5, 1);
    font-weight: 700;
    padding: 0 2px;
    display: inline;
}

.js-marker.animate-highlight {
    background-size: 100% 100%;
}

/* Headings in Body */
.article-body h2 {
    font-size: 19px;
    font-weight: 800;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 40px 0 20px;
    padding: 12px 16px;
    border-left: 6px solid var(--primary);
    background: linear-gradient(to right, var(--primary-light), transparent);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}

.article-body h3 {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.4;
    color: var(--text-dark);
    margin: 30px 0 16px;
    border-bottom: 2px solid var(--primary);
    padding-bottom: 6px;
    display: inline-block;
}

/* Bullet list design */
.article-body ul,
.lead-section ul {
    list-style: none;
    margin-bottom: 1.8em;
    padding-left: 4px;
}

.article-body ul li,
.lead-section ul li {
    position: relative;
    padding-left: 24px;
    margin-bottom: 0.6em;
    font-size: 15px;
}

.article-body ul li::before,
.lead-section ul li::before {
    content: "✓";
    position: absolute;
    left: 4px;
    top: 1px;
    color: var(--primary);
    font-weight: 900;
    font-size: 14px;
}

/* ==========================================================================
   Premium Box & Layout Blocks
   ========================================================================== */

/* Summary box (green theme) */
.summary-box {
    background-color: var(--primary-light);
    border-left: 4px solid var(--primary);
    padding: 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 24px 0;
}

.summary-box ul {
    margin-bottom: 0 !important;
}

.summary-box ul li {
    font-weight: 500;
    color: #0b784a;
    font-size: 15px;
}

.summary-box ul li::before {
    color: var(--primary) !important;
}

/* Note box (warm orange/amber theme) */
.note {
    background-color: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 24px 0;
    font-size: 14px;
    color: #78350f;
}

.note p {
    margin-bottom: 0 !important;
    font-size: 14.5px !important;
    line-height: 1.7;
}

/* Balloon box (testimonial style) */
.balloon {
    background-color: #f0f7ff;
    border-left: 4px solid #3b82f6;
    padding: 16px 20px;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: 24px 0;
    font-size: 15px;
    font-weight: 500;
    color: #1e3a8a;
    position: relative;
}

.balloon::after {
    content: "";
    position: absolute;
    left: -12px;
    top: 20px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent #f0f7ff transparent transparent;
}

/* ==========================================================================
   Spec Table Responsive Design
   ========================================================================== */

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 24px 0;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.spec-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14.5px;
    text-align: left;
    min-width: 450px;
}

.spec-table th, 
.spec-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
}

.spec-table th {
    background-color: var(--bg-light);
    font-weight: 700;
    color: var(--text-dark);
    width: 40%;
}

.spec-table td {
    background-color: var(--white);
    color: var(--text-dark);
}

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

/* ==========================================================================
   Flow Steps List Timeline
   ========================================================================== */

.flow-list {
    list-style: none !important;
    padding-left: 0 !important;
    margin: 24px 0 28px !important;
    position: relative;
}

.flow-list::before {
    content: "";
    position: absolute;
    left: 20px;
    top: 20px;
    bottom: 20px;
    width: 2px;
    background-color: var(--border-color);
    z-index: 1;
}

.flow-list li {
    position: relative;
    padding-left: 56px !important;
    margin-bottom: 20px !important;
    min-height: 40px;
}

.flow-list li::before {
    display: none !important; /* Hide standard check icon */
}

.flow-num {
    position: absolute;
    left: 0;
    top: 0;
    width: 40px;
    height: 40px;
    background-color: var(--primary);
    color: var(--white);
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0, 169, 104, 0.25);
    z-index: 2;
}

.flow-content {
    background-color: var(--bg-light);
    padding: 10px 16px;
    border-radius: var(--radius-sm);
    font-size: 15px;
    border: 1px solid var(--border-color);
}

.flow-content strong {
    font-weight: 700;
    color: var(--text-dark);
}

/* ==========================================================================
   CTA Area (Conversion Cards)
   ========================================================================== */

.cta-area {
    background: linear-gradient(135deg, var(--white) 0%, var(--primary-light) 100%);
    border: 2px dashed var(--primary);
    border-radius: var(--radius-lg);
    padding: 24px 20px;
    margin: 32px 0;
    text-align: center;
    box-shadow: var(--shadow-md);
}

.cta-area p {
    font-size: 14.5px;
    font-weight: 700;
    color: var(--primary-hover);
    line-height: 1.6;
    margin-bottom: 16px;
    text-align: left;
}

/* Standard Button */
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, #ff5d00 100%);
    color: var(--white);
    font-size: 18px;
    font-weight: 800;
    padding: 14px 28px;
    border-radius: 50px;
    width: 100%;
    max-width: 320px;
    box-shadow: var(--shadow-cta);
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    position: relative;
    overflow: hidden;
}

.cta-button:hover,
.cta-button:active {
    background: linear-gradient(135deg, var(--accent-hover) 0%, #e05200 100%);
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(255, 133, 0, 0.45);
    color: var(--white);
}

.cta-button::after {
    content: "❯";
    margin-left: 10px;
    font-size: 14px;
    transition: transform 0.25s ease;
}

.cta-button:hover::after {
    transform: translateX(4px);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
    background-color: #1e293b;
    color: #94a3b8;
    padding: 40px 16px 50px;
    text-align: center;
    border-top: 4px solid var(--primary);
}

.footer-container {
    max-width: 680px;
    margin: 0 auto;
}

.footer-logo {
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    margin-bottom: 12px;
}

.footer-desc {
    font-size: 12px;
    line-height: 1.7;
    margin-bottom: 24px;
}

.footer-copy {
    font-size: 11px;
}

/* ==========================================================================
   Fixed Sticky Bottom CTA
   ========================================================================== */

.sticky-cta-container {
    position: fixed;
    bottom: 0;
    left: 50%;
    transform: translate(-50%, 100%); /* Start hidden below screen */
    width: 100%;
    max-width: 680px;
    background-color: rgba(255, 255, 255, 0.96);
    box-shadow: 0 -6px 20px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 12px 16px 24px; /* extra bottom padding for mobile safe area */
    border-radius: var(--radius-md) var(--radius-md) 0 0;
    border-top: 3px solid var(--primary);
    z-index: 999;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
}

/* Visible active class */
.sticky-cta-container.active {
    transform: translate(-50%, 0);
}

.sticky-cta-wrap {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.sticky-cta-text {
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-hover);
    margin: 0;
    text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
    letter-spacing: 0.05em;
    animation: textPulse 2s infinite ease-in-out;
}

.sticky-cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--accent) 0%, #ff5d00 100%);
    color: var(--white);
    font-size: 16px;
    font-weight: 800;
    padding: 12px 24px;
    border-radius: 50px;
    width: 100%;
    box-shadow: var(--shadow-cta);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.sticky-cta-button::after {
    content: "❯";
    margin-left: 8px;
    font-size: 12px;
}

/* Pulse animation inside button */
.cta-pulse {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.15);
    transform: translate(-50%, -50%) scale(0);
    border-radius: 50%;
    animation: buttonPulse 2.5s infinite ease-out;
}

/* Keyframes */
@keyframes textPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.03); }
}

@keyframes buttonPulse {
    0% { transform: translate(-50%, -50%) scale(0.8); opacity: 0.8; }
    50% { opacity: 0.4; }
    100% { transform: translate(-50%, -50%) scale(1.4); opacity: 0; }
}

/* ==========================================================================
   Media Queries & Responsive Scaling
   ========================================================================== */

@media (max-width: 480px) {
    html {
        font-size: 15px;
    }
    
    .article-content {
        padding: 20px 14px;
        border-radius: 0; /* Flush on sides on small mobile */
        box-shadow: none;
    }
    
    .featured-image-wrapper {
        margin: 0 -14px 20px;
    }
    
    .entry-title {
        font-size: 1.35rem;
    }
    
    .site-header {
        border-bottom-width: 1px;
    }
    
    .header-logo .logo-text {
        font-size: 16px;
    }
    
    .flow-list li {
        padding-left: 48px !important;
    }
    
    .flow-num {
        width: 34px;
        height: 34px;
        font-size: 16px;
    }
    
    .flow-list::before {
        left: 17px;
    }
    
    .cta-button {
        font-size: 16px;
        padding: 12px 20px;
    }
    
    .sticky-cta-button {
        font-size: 15px;
        padding: 10px 20px;
    }
}

@media (min-width: 681px) {
    /* PC reading enhancement slightly wider borders */
    body {
        background-color: #f1f5f9;
        padding-top: 20px;
    }
    
    .main-container {
        padding: 0;
    }
    
    .site-header .header-container {
        padding: 16px 0;
    }
}

/* ==========================================================================
   Related Articles Box
   ========================================================================== */

.related-box {
    margin: 48px 0 24px;
    padding: 20px 16px;
    background-color: var(--white);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.related-title {
    font-size: 16px;
    font-weight: 800;
    color: var(--text-dark);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.related-title::before {
    content: "";
    display: inline-block;
    width: 4px;
    height: 16px;
    background-color: var(--primary);
    border-radius: 2px;
}

.related-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px;
    background-color: var(--bg-light);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.25, 0.8, 0.25, 1);
    cursor: pointer;
}

.related-card:hover,
.related-card:active {
    border-color: var(--primary);
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 169, 104, 0.08);
}

.related-thumb-wrapper {
    width: 90px;
    height: 68px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.related-thumb {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.related-info {
    flex-grow: 1;
}

.related-card-title {
    font-size: 13.5px;
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.4;
    margin-bottom: 4px;
}

.related-card-desc {
    font-size: 11px;
    color: var(--text-muted);
}

