
html
{ height: 100%;
  width: 100%;
  word-wrap: break-word;   
  overflow-wrap: break-word;
}

*
{ margin: 0;
  padding: 0;}

body
{ font: normal 1em verdana, arial, sans-serif;
  background: #F6F4F0 url(image/pattern.png);
  color: #47433F;
  overflow: auto;
  word-wrap: break-word;   
  overflow-wrap: break-word;
}

  p {
    margin: 0 0 0 0;       
    line-height: 1.7em;       
    word-wrap: break-word;    
    overflow-wrap: break-word;
    hyphens: auto;      
  }

img
{ border: 0;}

h1, h2, h3, h4, h5, h6 
{ color: #362C20;
  padding: 0 0 5px 0;}

h1, h4
{ font: normal 175% "lucida sans unicode", arial;
  margin: 0 0 15px 0;
  padding: 15px 20px 5px 0;}

h2, h5
{ color: #362C20;
  padding: 10px 0 15px 0;
  font: normal 120% arial;}

h3, h6
{ color: #888;
  font: italic 95% arial;
  padding: 0 0 15px 0;}

h4, h6
{ color: #B60000;}

h5
{ color: #362C20;}

a, a:hover
{ outline: none;
  text-decoration: underline;
  color: DarkCyan;}

a:hover
{ text-decoration: none;}

.left
{ float: left;
  width: auto;
  margin-right: 10px;}

.right
{ float: right; 
  width: auto;
  margin-left: 10px;}

.center
{ display: block;
  text-align: center;
  margin: 20px auto;}

blockquote
{ margin: 20px 0; 
  padding: 10px 20px 0 20px;
  border: 1px solid #E5E5DB;
  background: #FFF;}

ul
{ margin: 12px 0 12px 17px;}

ul li
{ list-style-type: circle;
  margin: 0 0 6px 0; 
  padding: 0 0 4px 5px;}

ol
{ margin: 8px 0 22px 25px;}

ol li
{ margin: 0 0 11px 0;}

#main, #logo, #menubar, #site_content, #footer
{ margin-left: auto; 
  margin-right: auto;}

#header
{ background: url(image/back_blue.png) repeat-x;
  height: 185px;
  position: relative;
  z-index: 2;
}

/* #logo
{ width: 875px;
  position: relative;
  height: 193px;
  background: url(image/green_logo.png) no-repeat;} */


#logo {
  width: 875px;
  height: 187px;
  position: relative;
  background: none; /* 将图像移动到伪元素，避免影响文字 */
}

/* 仅对背景图应用左右黑色渐变，不影响内部文字 */
#logo::before {
  content: "";
  position: absolute;
  top: 0; left: 0; right: 0; bottom: 0;
  background: url(image/green_logo.png) no-repeat center;
  background-size: contain;
  /* 使用 mask 只裁剪背景图层 */
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-image: linear-gradient(to right, transparent 0%, black 15%, black 85%, transparent 100%);
  mask-repeat: no-repeat;
  mask-size: 100% 100%;
  pointer-events: none;
  z-index: 0;
}

#logo #logo_text 
{ position: absolute; 
  top: 10px;
  left: 0;
  z-index: 1; /* 确保文字在伪元素之上 */}

#logo h1
{ font: normal 300% 'century gothic', arial, sans-serif;
  border-bottom: 0;
  text-transform: none;
  margin: 0;
  padding: 45px 0 0 0;
  background: transparent;
  color: #FFF;}

#menubar
{ width: 875px;
  height: 41px;
  padding: 0 0 0 4px;
  position: absolute;
  bottom: 0;} 

ul#menu
{ float: right;
  height: 40px;
  background: url(image/menu_blue.png) repeat-x;
  width: auto;}

ul#menu li
{ float: left;
  margin: 6px 0 0 0;
  padding: 0 0 0 0;
  list-style: none;
  width: auto;}

ul#menu li a
{ font: normal 100% 'lucida sans unicode', arialserif;
  display: block; 
  float: left; 
  height: 12px;
  padding: 2px 16px 8px 16px;
  text-align: center;
  background: transparent;
  color: #FFF;
  text-transform: uppercase;
  border-left: 1px solid #DCE31D;
  border-right: 1px solid #7E8204;
  text-decoration: none;
  width: auto;} 

ul#menu li a.first
{ border-left: 0;}

ul#menu li a.last
{ border-right: 0;}

ul#menu li a:hover, ul#menu li.tab_selected a, ul#menu li.tab_selected a:hover
{ color: #111;}

#site_content
{ width: 877px;
  overflow: hidden;
  margin: 20px auto} 

.sidebar
{ float: right;
  width: 190px;
  padding: 0 15px 20px 15px;}

.sidebar h2
{ padding: 0 0 5px 0;}

.sidebar ul
{ width: 190px; 
  padding: 4px 0 0 0; 
  margin: 4px 0 30px 0;}

.sidebar li
{ list-style: none; 
  padding: 0 0 7px 0; }

.sidebar li a, .sidebar li a:hover
{ padding: 0 0 0 25px;
  display: block;
  background: transparent url(image/link.png) no-repeat left center;} 

.sidebar li a.selected
{ color: #444;} 

#content
{ text-align: left;
  width: 847px;
  padding: 0;}

#footer
{ width: 100%;
  font-family: sans-serif;
  font-size: 90%;
  height: 33px;
  padding: 24px 0 5px 0;
  text-align: center; 
  background: #635B53 url(image/footer_blue.png) repeat-x;
  color: #A8AA94;
  text-transform: uppercase;
  letter-spacing: 0.1em;}

#footer a, #footer a:hover
{ background: transparent;
  color: #A8AA94;
  text-decoration: none;}

#footer a:hover
{ background: transparent;
  color: #FFF;}

.yellow
{ color: #F7C015;}

.blue
{ color: #05A4D1;}

.orange
{ color: #FF7A0F;}

.red
{ color: #C80500;}

.purple
{ color: #EB0FFF;}

.green
{ color: #A4AA04;}

.form_settings
{ margin: 15px 0 0 0;}

.form_settings p
{ padding: 0 0 4px 0;}

.form_settings span
{ float: left; 
  width: 200px; 
  text-align: left;}
  
.form_settings input, .form_settings textarea
{ padding: 2px; 
  width: 299px; 
  font: 100% arial; 
  border: 1px solid #E5E5DB; 
  background: #FFF; 
  color: #47433F;}
  
.form_settings .submit
{ font: 100% arial; 
  border: 1px solid; 
  width: 99px; 
  margin: 0 0 0 206px; 
  height: 26px;
  padding: 2px 0 3px 0;
  cursor: pointer; 
  background: #63574B; 
  color: #FFF;}

.form_settings textarea, .form_settings select
{ font: 100% arial; 
  width: 299px;}

.form_settings select
{ width: 304px;}

.form_settings .checkbox
{ margin: 4px 0; 
  padding: 0; 
  width: 14px;
  border: 0;
  background: none;}

.separator
{ width: 100%;
  height: 0;
  border-top: 1px solid #D9D5CF;
  border-bottom: 1px solid #FFF;
  margin: 0 0 20px 0;}
  
table
{ margin: 10px 0 30px 0;}

table tr th, table tr td
{ background: #63574B;
  color: #FFF;
  padding: 7px 4px;}
  
table tr td
{ background: #C8BFB0;
  color: #47433F;
  border-top: 1px solid #EDEBE5;}





body {
  font-family: Arial, sans-serif;
  line-height: 1.6;
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #333;
}

.container {
    width: 80%;
    margin: auto;
    overflow: hidden;
    padding: 20px;
}

header {
    background: #35424a;
    color: #ffffff;
    padding: 20px 0;
    text-align: center;
    margin-bottom: 20px;
}



.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: bold;
}

select, input[type="number"] {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.parameter-group {
    margin-bottom: 20px;
    padding: 15px;
    border: 1px solid #eee;
    border-radius: 4px;
}

button {
    background: #35424a;
    color: #fff;
    border: none;
    padding: 10px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background: #e8491d;
}



pre {
    white-space: pre-wrap;
    word-wrap: break-word;
}

.form-check-input{
    border-color: Grey;
}
.form-check-input:checked {
    background-color: CadetBlue;
    border-color: PowderBlue;
}
.form-check-input:checked:focus {
    background-color: CadetBlue;
    border-color: Grey;
    box-shadow: 0 0 0 0.25rem Gainsboro;
}
.form-check-input:focus {
    background-color: CadetBlue;
    border-color: Grey;
    box-shadow: 0 0 0 0.25rem Gainsboro;
}
.form-control {
    border-color: Grey;
}
.form-control:focus{
    border-color: Grey;
    box-shadow: 0 0 0 0.25rem Gainsboro;
}
.btn-primary {
    background-color: DarkCyan !important;
    border-color: DarkCyan !important;
}
.btn-primary:hover, .btn-primary:active, .btn-primary:visited {
    background-color: Teal !important;
    border-color: Teal !important;
}
.submit_loading {
    position:fixed;
    width:100%;
    height:100%;
    top:0;
    left:0;
    background-color:#000;
    text-align:center;
    opacity:0.6;
    z-index: 9999;
}
.loading_show {
    margin-top:15%;
}
.loading_context {
    color:#fff;
}

/* Estimator page overrides to avoid conflicts */
#content .result-container pre,
#content .error-container pre {
  white-space: pre-wrap;
  word-break: normal;
  overflow-wrap: anywhere;
  margin: 0;
  line-height: 1.4;
  font-family: inherit;
}
#content .result-container,
#content .error-container {
  display: block;
  width: 80%;
  box-sizing: border-box;
}

/* Mobile responsive styles for the entire site */
@media (max-width: 992px) {
  #logo, #menubar, #site_content {
    width: 100%;
  }
  #content {
    width: auto;
  }
  ul#menu {
    float: none;
    width: 100%;
  }
  ul#menu li {
    float: none;
    display: block;
  }
}

@media (max-width: 576px) {
  #logo h1 {
    font-size: 150%;
  }
  h1 { font-size: 150%; }
  h2 { font-size: 120%; }
  #footer {
    font-size: 80%;
    padding: 16px 0 4px 0;
  }
}

/* Safe mobile overrides: keep header/menu as-is, reorder content and sidebar, add left padding */
@media (max-width: 992px) {
  #site_content {
    display: flex;
    flex-direction: column-reverse;
  }
  #content {
    width: 100% !important;
    float: none;
  }
}


#content, .sidebar, p, li, td, th, .form_settings, pre {
  max-width: 100%; /* 确保元素不超出容器 */
}

/* Mobile overflow fixes: prevent horizontal scroll and right-side whitespace */


@media (max-width: 992px) {
  /* Also neutralize hard-coded container widths on tablets */
  #site_content { width: 100% !important; }
}

/* Estimator page containers: ensure right padding and no clipping */
#content .calc-container,
#content .calculator {
  padding-right: 16px;
  box-sizing: border-box;
}








@media (max-width: 768px) {
  #header {
    height: auto; 
    padding-bottom: 10px; 
    background-size: cover; 
  }
  
  #logo {
    height: auto; 
    min-height: 120px; 
    background-size: contain; 
  }
  
  #menubar {
    position: relative; 
    width: 100%;
    margin-top: 10px; 
    padding: 0; 
  }
  
  ul#menu {
    width: 100%; 
    float: none; 
    text-align: center; 
  }
  
  ul#menu li a {
    height: auto;
    padding: 10px 12px;
    border-left: 0;
    border-right: 0;
    border-top: 1px solid #DCE31D;
  }
  ul#menu li a.first {
    border-top: 0;
  }


  #site_content {
    margin: 10px auto;
    word-wrap: break-word;   
    overflow-wrap: break-word;
  }
  #content {
    width: 100%;
    padding: 0 0 10px 10px;
    word-wrap: break-word;   
    overflow-wrap: break-word;
  }


  
  p, li, td, th, .form_settings span, .form_settings input, .form_settings textarea {
    word-wrap: break-word; 
  }
  
  pre {
    white-space: pre-wrap; 
    word-wrap: break-word;
  }
}


@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  /* Override desktop fixed widths */
  #site_content, #logo, #menubar, #content, .sidebar { width: 100% !important; max-width: 100% !important; }
  /* Ensure flex children and blocks cannot exceed viewport */
  #site_content > * { max-width: 100%; }
  /* Make images and pre blocks responsive */
  img, #content pre { max-width: 100%; box-sizing: border-box; }
}

@media (max-width: 768px) {
  html, body { overflow-x: hidden; }
  /* ensure no hard widths remain */
  #site_content, #logo, #content { width: 100% !important; max-width: 100% !important; }
  /* 允许 menubar 自定义宽度和右边距 */
  #menubar { width: 50% !important; margin-right: 1px !important; }
  /* padding to avoid text touching screen edge */
  #content { padding-left: 12px; padding-right: 12px; }
}

@media (max-width: 768px) {
  /* Disable gradient mask on mobile: show full logo image */
  #logo::before {
    -webkit-mask-image: none;
    mask-image: none;
  }
}

@media (max-width: 768px) {
  #logo #logo_text { top: 0px; }
}