/*
 * Japan Housing Troubleshooter - Stylesheet
 * Based on japan-utility-setup template
 * Brand: #2563EB (blue) + #FFFFFF
 */
*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth}
body{font-family:'Inter','Noto Sans JP',-apple-system,BlinkMacSystemFont,'Segoe UI',Roboto,sans-serif;font-size:16px;line-height:1.7;color:#333;background:#FAFAFA}
a{color:#2563EB;text-decoration:none;transition:color .2s}
a:hover{color:#1D4ED8;text-decoration:underline}
h1,h2,h3,h4,h5,h6{font-family:'Inter','Noto Sans JP',sans-serif;font-weight:700;color:#1a1a1a;line-height:1.3}
img{max-width:100%;height:auto}

/* SIDEBAR */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(0,0,0,.5);z-index:99}
.sidebar-overlay.open{display:block}
.sidebar{width:280px;min-width:280px;background:#1a1a2e;color:#ccc;position:fixed;top:0;left:0;bottom:0;overflow-y:auto;z-index:100;transition:transform .3s ease}
.sidebar-header{padding:24px 20px;background:#2563EB;color:#fff;text-align:center}
.sidebar-header h1{font-size:18px;color:#fff;margin-bottom:4px;line-height:1.3}
.sidebar-header .tagline{font-size:12px;opacity:.85;font-weight:400}
.sidebar-nav{list-style:none;padding:12px 0}
.sidebar-nav li{border-bottom:1px solid rgba(255,255,255,.05)}
.sidebar-nav li a{display:block;padding:12px 20px;color:#ccc;font-size:14px;transition:all .2s}
.sidebar-nav li a:hover,.sidebar-nav li a.active{background:rgba(37,99,235,.15);color:#93B4F8;text-decoration:none}
.sidebar-nav .nav-icon{margin-right:8px}

/* MAIN */
.main-content{margin-left:280px;min-height:100vh}
.top-header{display:flex;align-items:center;padding:12px 24px;background:#fff;border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:50}
.mobile-menu-btn{display:none;background:none;border:none;font-size:24px;cursor:pointer;padding:8px;min-width:44px;min-height:44px}
.breadcrumb{font-size:14px;color:#666}
.hero{background:linear-gradient(135deg,#2563EB 0%,#1D4ED8 100%);color:#fff;padding:48px 32px;text-align:center}
.hero h2{color:#fff;font-size:28px;margin-bottom:12px}
.hero p{font-size:18px;opacity:.9;max-width:600px;margin:0 auto 8px}
.hero .cta-subtitle{font-size:14px;opacity:.7}
.content-area{max-width:800px;margin:0 auto;padding:24px}
.section{margin-bottom:48px;scroll-margin-top:80px}
.section h2{font-size:24px;margin-bottom:16px;padding-bottom:8px;border-bottom:2px solid #2563EB}
.section h3{font-size:18px;margin:24px 0 12px;color:#1e40af}
.section h4{font-size:16px;margin:16px 0 8px}

/* DISCLAIMER */
.disclaimer-banner{background:#FEF3C7;border:2px solid #F59E0B;border-radius:8px;padding:16px;margin-bottom:24px;font-size:14px;line-height:1.6}
.disclaimer-banner strong{color:#92400E}
.disclaimer-inline{background:#FEF3C7;border-left:4px solid #F59E0B;padding:12px;margin:12px 0;font-size:13px;border-radius:0 4px 4px 0}
.disclaimer-sticky{position:fixed;bottom:0;left:280px;right:0;background:#FEF3C7;border-top:2px solid #F59E0B;padding:8px 16px;font-size:12px;text-align:center;z-index:90}

/* MLIT TABLE */
.mlit-table{width:100%;border-collapse:collapse;margin:16px 0;font-size:14px}
.mlit-table th{background:#2563EB;color:#fff;padding:10px 12px;text-align:left}
.mlit-table td{padding:10px 12px;border-bottom:1px solid #e5e7eb}
.mlit-table tr:nth-child(even){background:#F0F4FF}
.mlit-table .tenant{color:#059669;font-weight:600}
.mlit-table .landlord{color:#DC2626;font-weight:600}

/* CHECKER */
.checker-steps{background:#fff;border-radius:12px;padding:24px;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.step-group{margin-bottom:24px;padding-bottom:24px;border-bottom:1px solid #e5e7eb}
.step-group:last-of-type{border-bottom:none}
.radio-group{display:flex;flex-wrap:wrap;gap:12px}
.radio-label{display:flex;align-items:center;gap:8px;padding:12px 16px;border:2px solid #e5e7eb;border-radius:8px;cursor:pointer;min-width:120px;min-height:44px;transition:all .2s}
.radio-label:has(input:checked){border-color:#2563EB;background:#EFF6FF}
.slider-wrap{display:flex;align-items:center;gap:16px}
.slider-wrap input[type=range]{flex:1;height:8px;-webkit-appearance:none;background:#e5e7eb;border-radius:4px;outline:none}
.slider-wrap input[type=range]::-webkit-slider-thumb{-webkit-appearance:none;width:24px;height:24px;background:#2563EB;border-radius:50%;cursor:pointer}
#years-val{font-weight:600;min-width:80px}
.step-hint{font-size:14px;color:#666;margin-bottom:12px}
.charge-items{display:flex;flex-direction:column;gap:8px}
.charge-row{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.check-label{display:flex;align-items:center;gap:8px;min-width:220px;min-height:44px;cursor:pointer}
.amount-input{width:160px;padding:8px 12px;border:2px solid #e5e7eb;border-radius:6px;font-size:14px;min-height:44px}
.amount-input:focus{border-color:#2563EB;outline:none}
.amount-input:disabled{background:#f3f4f6;color:#999}
.btn-primary{display:block;width:100%;padding:14px;background:#2563EB;color:#fff;border:none;border-radius:8px;font-size:16px;font-weight:600;cursor:pointer;min-height:48px;transition:background .2s}
.btn-primary:hover{background:#1D4ED8}
.btn-primary:disabled{background:#93c5fd;cursor:not-allowed}
.btn-secondary{display:inline-block;padding:12px 24px;background:#fff;color:#2563EB;border:2px solid #2563EB;border-radius:8px;font-weight:600;text-align:center;margin-top:12px;min-height:44px;transition:all .2s}
.btn-secondary:hover{background:#EFF6FF;text-decoration:none}

/* RESULTS */
.results-container{margin-top:24px}
.result-row{padding:16px;border-radius:8px;margin-bottom:12px}
.result-row.fair{background:#F0FDF4;border-left:4px solid #22C55E}
.result-row.overcharged{background:#FFF7ED;border-left:4px solid #F97316}
.result-row.landlord{background:#FEF2F2;border-left:4px solid #EF4444}
.result-header{display:flex;align-items:center;gap:12px;flex-wrap:wrap}
.result-label{font-weight:600;flex:1}
.result-amount{font-weight:600}
.verdict-badge{padding:4px 12px;border-radius:20px;font-size:12px;font-weight:700;text-transform:uppercase}
.verdict-badge.fair{background:#22C55E;color:#fff}
.verdict-badge.overcharged{background:#F97316;color:#fff}
.verdict-badge.landlord{background:#EF4444;color:#fff}
.result-detail{font-size:14px;color:#666;margin-top:8px}
.overpay-total{background:#FEF2F2;border:2px solid #EF4444;border-radius:8px;padding:16px;text-align:center;font-size:18px;margin-top:16px}
.all-fair{background:#F0FDF4;border:2px solid #22C55E;border-radius:8px;padding:16px;text-align:center;font-size:16px;margin-top:16px}

/* TEMPLATES */
.template-card{background:#fff;border-radius:12px;padding:20px;margin-bottom:16px;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.template-card h4{margin-bottom:12px}
.template-tabs{display:flex;gap:8px;margin-bottom:12px}
.tab-btn{padding:8px 16px;border:2px solid #e5e7eb;background:#fff;border-radius:6px;cursor:pointer;min-height:44px;transition:all .2s}
.tab-btn.active{border-color:#2563EB;background:#EFF6FF;color:#2563EB;font-weight:600}
.template-text{background:#F9FAFB;border:1px solid #e5e7eb;border-radius:6px;padding:16px;white-space:pre-wrap;font-size:14px;line-height:1.8;max-height:300px;overflow-y:auto}
.btn-copy{padding:10px 20px;background:#2563EB;color:#fff;border:none;border-radius:6px;cursor:pointer;margin-top:12px;min-height:44px;font-weight:600;transition:background .2s}
.btn-copy:hover{background:#1D4ED8}

/* HELP FLOW */
.help-flow{display:flex;flex-direction:column;align-items:center;gap:8px}
.help-step{background:#fff;border-radius:12px;padding:20px;width:100%;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.help-level{display:inline-block;background:#2563EB;color:#fff;padding:4px 12px;border-radius:20px;font-size:12px;font-weight:700;margin-bottom:8px}
.help-phone{font-size:18px}
.help-hours,.help-cost,.help-note{font-size:14px;color:#666}
.help-arrow{font-size:24px;color:#2563EB}

/* CHECKLIST */
.checklist-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(240px,1fr));gap:16px;margin-bottom:16px}
.checklist-card{background:#fff;border-radius:12px;padding:16px;box-shadow:0 2px 8px rgba(0,0,0,.08)}
.checklist-card h4{margin-bottom:8px;color:#1e40af}
.checklist-card ul{list-style:none}
.checklist-card li{padding:6px 0;border-bottom:1px solid #f3f4f6}
.checklist-card label{display:flex;align-items:flex-start;gap:8px;cursor:pointer;min-height:44px;font-size:14px}
.checklist-card input[type=checkbox]{margin-top:4px;min-width:18px;min-height:18px}
.checklist-tips{background:#EFF6FF;border-radius:8px;padding:16px}
.checklist-tips h4{margin-bottom:8px}
.checklist-tips li{margin-bottom:4px;font-size:14px}

/* FAQ */
.faq-item{border-bottom:1px solid #e5e7eb}
.faq-question{display:flex;justify-content:space-between;align-items:center;padding:16px 0;cursor:pointer;min-height:44px}
.faq-question span:first-child{font-weight:600;flex:1}
.faq-question .arrow{transition:transform .3s;font-size:12px;color:#666}
.faq-answer{max-height:0;overflow:hidden;transition:max-height .3s ease}
.faq-item.open .faq-answer{max-height:500px}
.faq-item.open .arrow{transform:rotate(180deg)}
.faq-answer p{padding:0 0 16px;color:#555;line-height:1.7}

/* USEFUL LINKS */
.link-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:12px}
.link-card{display:block;padding:16px;background:#fff;border-radius:8px;border:2px solid #e5e7eb;text-align:center;transition:all .2s;min-height:44px}
.link-card:hover{border-color:#2563EB;text-decoration:none;transform:translateY(-2px);box-shadow:0 4px 12px rgba(0,0,0,.1)}

/* FOOTER */
.site-footer{background:#1a1a2e;color:#ccc;padding:24px;text-align:center;font-size:13px;margin-top:48px}
.site-footer a{color:#93B4F8}

/* MOBILE */
@media(max-width:768px){
  .sidebar{transform:translateX(-100%)}
  .sidebar.open{transform:translateX(0)}
  .main-content{margin-left:0}
  .mobile-menu-btn{display:flex;align-items:center;justify-content:center}
  .hero{padding:32px 16px}
  .hero h2{font-size:22px}
  .content-area{padding:16px}
  .disclaimer-sticky{left:0}
  .radio-group{flex-direction:column}
  .charge-row{flex-direction:column;align-items:flex-start}
  .amount-input{width:100%}
  .result-header{flex-direction:column;align-items:flex-start}
}
@media(max-width:480px){
  .hero h2{font-size:20px}
  .hero p{font-size:15px}
  body{font-size:15px}
  .checklist-grid{grid-template-columns:1fr}
}
