@font-face{font-family:'Harmony';src:url('../font/HarmonyOS_Sans_SC_Medium.subset.woff2') format('woff2');font-display:swap}
*{box-sizing:border-box;margin:0;padding:0}
html{font-size:16px;-webkit-text-size-adjust:100%}
body{font-family:Harmony,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,"Helvetica Neue",Arial,"Noto Sans",sans-serif,"Apple Color Emoji","Segoe UI Emoji";line-height:1.6;color:#2a2a3a;background:#f6f7f9}
a{color:#2563eb;text-decoration:none}a:hover{text-decoration:underline}
img{max-width:100%;height:auto;display:block}
table{border-collapse:collapse;width:100%}
th,td{padding:10px 12px;text-align:left;border:1px solid #e5e7eb}
th{background:#f3f4f6;font-weight:600}
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 20px;border-radius:8px;border:1px solid transparent;font-size:15px;cursor:pointer;transition:.2s;font-family:inherit}
.btn-primary{background:#2563eb;color:#fff}
.btn-primary:hover{background:#1d4ed8}
.btn-success{background:#10b981;color:#fff}
.btn-success:hover{background:#059669}
.btn-outline{background:#fff;color:#374151;border-color:#d1d5db}
.btn-outline:hover{background:#f9fafb}
.input{width:100%;padding:10px 14px;border:1px solid #d1d5db;border-radius:8px;font-size:15px;font-family:inherit;transition:.2s;background:#fff}
.input:focus{outline:none;border-color:#2563eb;box-shadow:0 0 0 3px rgba(37,99,235,.15)}
select.input{padding-right:36px;-webkit-appearance:none;appearance:none;background:#fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236b7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E") no-repeat right 12px center}
label{display:block;margin-bottom:6px;font-weight:600;font-size:14px;color:#374151}
.container{max-width:1200px;margin:0 auto;padding:0 16px}
.card{background:#fff;border-radius:12px;box-shadow:0 1px 3px rgba(0,0,0,.06),0 1px 2px rgba(0,0,0,.04);padding:20px;margin-bottom:20px}
.section-title{font-size:20px;font-weight:700;margin-bottom:16px;color:#111827;display:flex;align-items:center;gap:8px}
.section-title::before{content:"";display:inline-block;width:4px;height:20px;background:#2563eb;border-radius:2px}
.badge{display:inline-block;padding:3px 10px;border-radius:999px;font-size:12px;font-weight:600}
.badge-blue{background:#eff6ff;color:#1e40af}
.badge-green{background:#ecfdf5;color:#065f46}
.badge-orange{background:#fff7ed;color:#9a3412}
/* header */
.site-header{background:#fff;border-bottom:1px solid #e5e7eb;position:sticky;top:0;z-index:50}
.site-header .container{display:flex;align-items:center;justify-content:space-between;height:60px}
.logo{font-size:20px;font-weight:800;color:#111827;letter-spacing:-.5px}
.logo span{color:#2563eb}
.nav{display:flex;gap:22px;list-style:none}
.nav a{font-size:15px;color:#4b5563;font-weight:500}
.nav a:hover{color:#2563eb;text-decoration:none}
.nav a.active{color:#2563eb;font-weight:700}
.mobile-toggle{display:none;background:none;border:none;font-size:24px;cursor:pointer}
/* hero */
.hero{background:linear-gradient(135deg,#eff6ff 0%,#f6f7f9 100%);padding:32px 0 24px}
.hero h1{font-size:28px;font-weight:800;color:#111827;margin-bottom:8px;letter-spacing:-.5px}
.hero .lead{color:#4b5563;font-size:16px}
/* grid */
.grid{display:grid;gap:20px}
.grid-2{grid-template-columns:repeat(2,1fr)}
.grid-3{grid-template-columns:repeat(3,1fr)}
.grid-4{grid-template-columns:repeat(4,1fr)}
@media(max-width:1024px){.grid-4{grid-template-columns:repeat(2,1fr)}}
@media(max-width:768px){.grid-2,.grid-3,.grid-4{grid-template-columns:1fr}}
/* tabs */
.tabs{display:flex;gap:6px;margin-bottom:16px;flex-wrap:wrap}
.tab{padding:8px 16px;border-radius:8px;border:1px solid #e5e7eb;background:#fff;cursor:pointer;font-size:14px;font-weight:500;color:#4b5563;transition:.2s}
.tab.active{background:#2563eb;color:#fff;border-color:#2563eb}
/* tool */
.tool-form .form-row{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-bottom:16px}
.tool-form .form-row.full{grid-template-columns:1fr}
.tool-form .field{display:flex;flex-direction:column}
.tool-form .suffix{display:flex;gap:8px;align-items:center}
.tool-form .suffix .input{flex:1}
.tool-form .suffix .unit{white-space:nowrap;color:#6b7280;font-size:14px}
@media(max-width:768px){.tool-form .form-row{grid-template-columns:1fr}}
/* calc layout */
.calc-grid{display:grid;grid-template-columns:1fr;gap:20px}
.tables-grid{display:grid;grid-template-columns:1fr;gap:20px}
#resultArea{display:grid;gap:20px;margin-top:20px}
#resultArea.hidden{display:none}
@media(min-width:900px){
  .calc-grid{grid-template-columns:340px 1fr 1fr;align-items:start}
  .calc-grid .tool-form .form-row{grid-template-columns:1fr;gap:12px;margin-bottom:12px}
  .calc-grid .tool-form .field{flex-direction:row;align-items:stretch;border:1px solid #d1d5db;border-radius:8px;overflow:hidden;background:#fff}
  .calc-grid .tool-form .field>label{background:#f3f4f6;display:flex;align-items:center;margin:0;align-self:stretch;padding:0 10px;font-size:13px;color:#374151;white-space:nowrap;border-right:1px solid #e5e7eb;flex-shrink:0;min-width:86px}
  .calc-grid .tool-form .field .suffix{flex:1;gap:4px;padding-right:8px}
  .calc-grid .tool-form .field .suffix .input{border:none;border-radius:0;padding:10px 8px}
  .calc-grid .tool-form .field .suffix .input:focus{box-shadow:none}
  .calc-grid .tool-form .field .suffix select.input{padding-right:26px;background-position:right 8px center}
  .result-cards{margin-top:0}
  .tables-grid{grid-template-columns:1fr 1fr}
  .tables-grid .table-wrap table{min-width:520px}
}
/* table toolbar */
.tbl-bar{background:#16a34a;color:#fff;display:flex;align-items:center;justify-content:space-between;padding:8px 14px;border-radius:8px 8px 0 0;flex-wrap:wrap;gap:8px}
.tbl-bar+.table-wrap{border-radius:0 0 8px 8px}
.tbl-title{font-weight:700;font-size:15px;white-space:nowrap}
.tbl-btns{display:flex;gap:6px;flex-wrap:wrap}
.btn-sm{padding:5px 10px;font-size:13px;border-radius:6px}
.tbl-btns .btn{background:#fff;color:#16a34a;border:none;font-weight:500}
.tbl-btns .btn:hover{background:#f0fdf4}
/* row-style result panel */
.result-card.rp{background:#fff;border:1px solid #e5e7eb;border-radius:10px;padding:14px}
.rp-title{background:#dcfce7;color:#15803d;font-weight:700;text-align:center;padding:8px 12px;border-radius:6px;margin-bottom:12px;font-size:15px}
.rp-row{display:flex;justify-content:space-between;align-items:center;background:#f3f4f6;border:1px solid #e5e7eb;border-radius:6px;padding:9px 14px;margin-bottom:8px;font-size:14px}
.rp-row:last-child{margin-bottom:0}
.rp-row .lab{color:#374151}
.rp-row .val{font-weight:700;color:#111827;display:flex;gap:6px;align-items:baseline}
.rp-row .val .unit{color:#6b7280;font-weight:400;font-size:13px}
/* result */
.result-cards{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;margin-top:16px}
.result-card{background:#f8fafc;border:1px solid #e5e7eb;border-radius:10px;padding:16px}
.result-card h3{font-size:15px;color:#6b7280;margin-bottom:10px;font-weight:600}
.result-card .big{font-size:28px;font-weight:800;color:#111827;line-height:1.2}
.result-card .big.red{color:#dc2626}
.result-card .sub{font-size:13px;color:#6b7280;margin-top:4px}
.compare-bar{display:flex;height:8px;border-radius:4px;overflow:hidden;margin-top:8px;background:#e5e7eb}
.compare-bar span{display:block;height:100%}
/* table */
.table-wrap{overflow-x:auto;border:1px solid #e5e7eb;border-radius:8px}
.table-wrap table{min-width:640px;font-size:14px}
.table-wrap th{background:#f8fafc}
.table-wrap tr:nth-child(even){background:#f9fafb}
/* footer */
.site-footer{background:#111827;color:#d1d5db;padding:32px 0 20px;font-size:14px}
.site-footer a{color:#9ca3af}
.site-footer .container{display:flex;justify-content:space-between;align-items:flex-start;flex-wrap:wrap;gap:20px}
.site-footer .copy{color:#6b7280;margin-top:12px;font-size:13px}
.site-footer .friend-links{display:block;border-top:1px solid #374151;margin-top:24px;padding-top:18px}
.friend-links h3{color:#e5e7eb;font-size:14px;font-weight:600;margin:0 0 10px}
.fl-list{display:flex;flex-wrap:wrap;gap:8px 18px}
.fl-list a{color:#9ca3af;font-size:13px}
.fl-list a:hover{color:#fff}
@media(max-width:768px){
  .nav{display:none;flex-direction:column;position:absolute;top:60px;left:0;right:0;background:#fff;border-bottom:1px solid #e5e7eb;padding:12px 16px;gap:12px}
  .nav.open{display:flex}
  .mobile-toggle{display:block}
  .result-cards{grid-template-columns:1fr}
}
/* util */
.text-center{text-align:center}
.text-right{text-align:right}
.mt-1{margin-top:8px}.mt-2{margin-top:16px}.mt-3{margin-top:24px}
.mb-1{margin-bottom:8px}.mb-2{margin-bottom:16px}.mb-3{margin-bottom:24px}
.hidden{display:none!important}
.flex{display:flex;gap:12px;flex-wrap:wrap}
.justify-end{justify-content:flex-end}
.small{font-size:13px;color:#6b7280}
.number{font-variant-numeric:tabular-nums}
.article p,.article li{color:#374151;font-size:15px;margin-bottom:12px}
.article h2{font-size:20px;color:#111827;margin:24px 0 12px}
.article h3{font-size:17px;color:#111827;margin:20px 0 10px}
.article ul{padding-left:22px}
.article ol{padding-left:22px}
