:root{--bg:#f4f6f8;--card:#fff;--text:#111827;--muted:#6b7280;--line:#e5e7eb;--primary:#111827;--soft:#eef2ff;--danger:#b91c1c;--success:#047857;--radius:18px}*{box-sizing:border-box}html{font-family:-apple-system,BlinkMacSystemFont,"Segoe UI","PingFang SC","Microsoft YaHei",sans-serif;background:var(--bg);color:var(--text)}body{margin:0;min-height:100vh}a{color:inherit;text-decoration:none}button,input,select,textarea{font:inherit}.topbar{height:64px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;gap:28px;padding:0 max(24px,calc((100vw - 1180px)/2));position:sticky;top:0;z-index:20}.brand{font-weight:800;letter-spacing:.02em}.desktop-nav{display:flex;gap:22px;flex:1}.desktop-nav a{color:#374151}.text-button{border:0;background:none;color:#6b7280;cursor:pointer}.container{max-width:1180px;margin:0 auto;padding:26px 22px 110px}.login-container{display:grid;place-items:center;min-height:100vh;padding:24px}.login-card{width:min(440px,100%);background:#fff;border:1px solid var(--line);border-radius:24px;padding:34px;box-shadow:0 20px 50px rgba(17,24,39,.08);text-align:center}.logo-mark{width:64px;height:64px;border-radius:18px;background:var(--primary);color:#fff;display:grid;place-items:center;margin:0 auto 18px;font-weight:800}.muted{color:var(--muted);line-height:1.7}.eyebrow{text-transform:uppercase;letter-spacing:.12em;font-size:12px;font-weight:700;color:#6366f1;margin:0 0 6px}.hero,.page-head{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;margin-bottom:24px}.hero{background:linear-gradient(135deg,#fff,#eef2ff);border:1px solid #dfe3ff;border-radius:24px;padding:30px}.hero h1,.page-head h1{margin:0;font-size:clamp(26px,4vw,42px);line-height:1.15}.btn{border:1px solid var(--line);background:#fff;border-radius:12px;padding:11px 16px;cursor:pointer;font-weight:700;display:inline-flex;align-items:center;justify-content:center}.btn.primary{background:var(--primary);border-color:var(--primary);color:#fff}.btn.full{width:100%}.btn.large{padding:15px 24px;font-size:16px}.stats-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:24px}.stat-card,.price-card{background:#fff;border:1px solid var(--line);border-radius:16px;padding:20px}.stat-card span,.price-card span{display:block;color:var(--muted);font-size:13px}.stat-card strong{font-size:30px;display:block;margin-top:8px}.card{background:#fff;border:1px solid var(--line);border-radius:var(--radius);padding:22px;margin-bottom:20px}.card.no-pad{padding:0;overflow:hidden}.card h2{margin:0 0 18px;font-size:20px}.section-head{display:flex;justify-content:space-between;align-items:center}.section-head h2{margin:0}.list-cards{display:flex;flex-direction:column}.quote-row{display:flex;justify-content:space-between;align-items:center;gap:20px;padding:17px 20px;border-top:1px solid var(--line)}.quote-row:first-child{border-top:0}.quote-row:hover{background:#fafafa}.quote-row div:first-child{display:flex;flex-direction:column;gap:5px}.quote-row span,.quote-row small{color:var(--muted);font-size:13px}.price{font-weight:800;white-space:nowrap}.empty{padding:36px;text-align:center;color:var(--muted)}.flash{padding:13px 16px;border-radius:12px;margin-bottom:16px;background:#eef2ff}.flash.error{background:#fef2f2;color:var(--danger)}.flash.success{background:#ecfdf5;color:var(--success)}.stack-form{display:flex;flex-direction:column;gap:16px;text-align:left}.quote-form{display:block}.form-section h2{margin-bottom:6px}.hint{margin-top:0;color:var(--muted);font-size:13px;line-height:1.6}.form-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:15px}.align-end{align-items:end}label{display:flex;flex-direction:column;gap:7px;font-size:13px;font-weight:700;color:#374151}input,select,textarea{width:100%;border:1px solid #d1d5db;border-radius:11px;padding:12px 13px;background:#fff;color:#111827;outline:none}input:focus,select:focus,textarea:focus{border-color:#6366f1;box-shadow:0 0 0 3px rgba(99,102,241,.12)}textarea{resize:vertical}.top-gap{margin-top:16px}.cost-table{border:1px solid var(--line);border-radius:14px;overflow:hidden}.cost-head,.cost-line{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:10px;align-items:center;padding:11px 13px;border-top:1px solid var(--line)}.cost-head{border-top:0;background:#f9fafb;color:var(--muted);font-size:12px;font-weight:700}.cost-line span{font-weight:700}.sticky-action{position:sticky;bottom:76px;display:flex;justify-content:flex-end;padding:10px 0;z-index:10}.price-grid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:20px}.price-card strong{display:block;margin-top:9px;font-size:21px}.price-card.featured{background:#111827;color:#fff;border-color:#111827}.price-card.featured span{color:#cbd5e1}.status{padding:7px 11px;border-radius:999px;background:#e5e7eb;font-size:12px;font-weight:700}.status-accepted{background:#d1fae5;color:#065f46}.status-rejected{background:#fee2e2;color:#991b1b}.status-sent{background:#dbeafe;color:#1e40af}.explain-list{border:1px solid var(--line);border-radius:14px;overflow:hidden}.explain-list>div{display:flex;justify-content:space-between;gap:18px;padding:13px 15px;border-top:1px solid var(--line)}.explain-list>div:first-child{border-top:0}.explain-list .subtotal{background:#f9fafb}.explain-list .total{background:#111827;color:#fff}.formula-box,.note-box{margin-top:15px;padding:15px;border-radius:13px;background:#f9fafb;color:#374151;font-size:13px;line-height:1.6}.formula-box p{margin:5px 0}.note-box{background:#fffbeb}.correction-card{border-color:#c7d2fe}.correction-history{margin-top:24px;border-top:1px solid var(--line);padding-top:20px}.correction-history article,.knowledge-list article{padding:16px 0;border-top:1px solid var(--line)}.correction-history article:first-of-type,.knowledge-list article:first-child{border-top:0}.correction-history article>div,.knowledge-title{display:flex;justify-content:space-between;gap:15px}.correction-history span,.knowledge-title span{font-size:12px;background:#eef2ff;color:#4338ca;border-radius:999px;padding:5px 8px}.correction-history p,.knowledge-list p{line-height:1.7}.search-bar{display:flex;gap:10px;margin-bottom:16px}.search-bar input{flex:1}.knowledge-list{padding:0 22px}.meta,small{color:var(--muted);font-size:12px}.mobile-nav{display:none}.mobile-nav a{font-weight:700;font-size:12px}.mobile-nav .primary{background:#111827;color:#fff;border-radius:13px;padding:10px 14px}.mobile-nav span{white-space:nowrap}
@media(max-width:800px){.desktop-nav{display:none}.topbar{padding:0 16px}.container{padding:18px 14px 104px}.hero,.page-head{flex-direction:column}.hero{padding:22px}.stats-grid{grid-template-columns:repeat(2,1fr)}.form-grid{grid-template-columns:1fr}.price-grid{grid-template-columns:1fr 1fr}.quote-row{padding:15px}.mobile-nav{display:flex;position:fixed;left:10px;right:10px;bottom:calc(10px + env(safe-area-inset-bottom));z-index:30;align-items:center;justify-content:space-around;background:rgba(255,255,255,.94);backdrop-filter:blur(14px);border:1px solid var(--line);border-radius:18px;padding:9px;box-shadow:0 12px 35px rgba(17,24,39,.18)}.sticky-action{bottom:83px}.login-card{padding:26px 20px}.cost-head,.cost-line{grid-template-columns:1.1fr .9fr .75fr}.cost-line{padding:10px}.price-card{padding:15px}.price-card strong{font-size:17px}.explain-list>div{font-size:13px}.explain-list strong{white-space:nowrap}}


/* v0.1.1 production process table */
.process-head,.process-line{grid-template-columns:.65fr 1.55fr .82fr 1fr 1fr}
.stage-cell{font-weight:800;display:flex;align-items:center}
.cost-field{gap:5px}
.cost-field>span{display:none}
.meter-summary{display:flex;justify-content:space-between;gap:18px;padding:13px 15px;margin-bottom:12px;border-radius:13px;background:#eef2ff;color:#3730a3}
.meter-summary strong{white-space:nowrap}
@media(max-width:800px){
  .process-table{border:0;overflow:visible;background:transparent}
  .process-head{display:none}
  .process-line{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px;padding:15px;border:1px solid var(--line);border-radius:15px;background:#fff}
  .process-line:last-of-type{margin-bottom:0}
  .stage-cell{grid-column:1/-1;padding-bottom:8px;border-bottom:1px solid var(--line);font-size:17px}
  .process-name-field{grid-column:1/-1}
  .cost-field>span{display:block;font-size:12px;color:var(--muted);font-weight:700}
  .meter-summary{font-size:13px}
}

/* v0.1.2 explicit dropdown + manual input control */
.process-picker{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;width:100%}
.process-option-select{min-width:0;appearance:auto;background-color:#fff}
.process-input-toggle{padding:10px 12px;white-space:nowrap;font-size:13px}
.process-custom-input{grid-column:1/-1;background:#fffdf5;border-color:#f59e0b}
.process-custom-input[hidden]{display:none}
.process-custom-input:focus{border-color:#d97706;box-shadow:0 0 0 3px rgba(245,158,11,.16)}
@media(max-width:800px){
  .process-picker{grid-template-columns:minmax(0,1fr) auto}
  .process-input-toggle{padding:11px 12px}
}


/* v0.1.3 live cost calculation process */
.live-cost-card{border-color:#c7d2fe}
.live-cost-head{gap:20px;align-items:flex-start;margin-bottom:16px}
.live-cost-head h2{margin-bottom:6px}
.live-cost-head .hint{margin-bottom:0;max-width:760px}
.live-cost-total{min-width:230px;padding:14px 16px;border-radius:14px;background:#111827;color:#fff;text-align:right}
.live-cost-total span{display:block;font-size:12px;color:#cbd5e1;margin-bottom:5px}
.live-cost-total strong{display:block;font-size:22px;white-space:nowrap}
.live-cost-warning{margin-bottom:12px;padding:12px 14px;border:1px solid #fcd34d;border-radius:12px;background:#fffbeb;color:#92400e;font-size:13px;line-height:1.6}
.live-cost-warning[hidden]{display:none}
.live-explain-list .order-total{background:#eef2ff;color:#3730a3}
.live-explain-list>div span{line-height:1.55}
.live-explain-list>div strong{white-space:nowrap}
@media(max-width:800px){
  .live-cost-head{flex-direction:column}
  .live-cost-total{width:100%;min-width:0;text-align:left}
  .live-cost-total strong{font-size:20px}
  .live-explain-list>div{align-items:flex-start}
}
