:root {
  --page-background: #f9eae3;
  --surface: #ffffff;
  --field-background: #ffffff;
  --text-color: #212529;
  --secondary-text: #464d55;
  --border-color: #808892;
  --link-color: #075c9e;
  --link-hover: #08456e;
  --focus-color: #17629b;
  --button-background: #f3f5f7;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body {
  background-color: var(--page-background);
  color: var(--text-color);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.5;
}
h1 { font-size: 1.85rem; font-weight: 650; }
h2 { font-size: 1.4rem; font-weight: 650; }
h3 { font-size: 1.1rem; font-weight: 650; }
a, a:visited { color: var(--link-color); text-decoration: underline; }
a:hover, a:visited:hover { color: var(--link-hover); }
button, input, select, textarea { font: inherit; }
a, button, input, select, summary { transition: color 120ms, background-color 120ms, border-color 120ms; }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible {
  outline: 3px solid var(--focus-color);
  outline-offset: 3px;
}
label { font-weight: 600; }
.form-text, .status-message, footer { color: var(--secondary-text); }
.form-text { line-height: 1.45; }
.default-btn {
  background-color: var(--button-background);
  color: var(--text-color);
  border: 1px solid var(--border-color);
  border-radius: 4px;
  padding: 0.5rem 0.9rem;
  line-height: 1.5;
}
.default-btn:hover:enabled { background-color: var(--surface); }
.default-btn:disabled { opacity: 0.65; }
.primary-btn { background-color: #125d94; color: #ffffff; border-color: #125d94; min-width: 8rem; }
.primary-btn:hover:enabled { background-color: #08456e; border-color: #08456e; }
.button-row { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.converter-panel { padding: 1.25rem; background-color: var(--surface); border: 1px solid var(--border-color); border-radius: 4px; }
.form-control { background-color: var(--field-background); color: var(--text-color); border-color: var(--border-color); border-radius: 4px; }
.form-control:focus { background-color: var(--field-background); color: var(--text-color); border-color: var(--focus-color); box-shadow: none; }
.form-control[readonly] { background-color: var(--field-background); }
.form-control-file { max-width: 100%; }
.code-area { min-height: 16rem; resize: vertical; font-family: ui-monospace, SFMono-Regular, Consolas, "Liberation Mono", monospace; font-size: 0.9rem; line-height: 1.5; white-space: pre; overflow: auto; }
.row-width { max-width: 10rem; }
fieldset { min-width: 0; }
legend { font-size: 1rem; font-weight: 650; }
summary { cursor: pointer; font-weight: 650; }
.summary-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: 1rem; }
.summary-grid dt { font-size: 0.85rem; font-weight: 600; }
.summary-grid dd { font-size: 1.3rem; margin-bottom: 0; }
.help-section { max-width: 55rem; }
footer { font-size: 0.9rem; }
.alert-danger { background-color: #fce9e9; border-color: #ad3636; color: #7b1b1b; }
.alert-warning { background-color: #fff3cd; border-color: #90700b; color: #604700; }
/* nav bar css start */
.site-header { border-bottom: 1px solid var(--border-color); }
.brand { min-width: 0; }
.brand p { color: var(--secondary-text); font-size: 0.9rem; }
.brand img { flex-shrink: 0; }
/* nav bar css end */
/* transition: all 0.5s ease-in-out; */
/* styled checkbox css start */
.form-check { margin-bottom: 0.55rem; padding-left: 1.6rem; }
input[type="checkbox"] { display: block; width: 1rem; height: 1rem; accent-color: #125d94; }
.form-check-input { margin-left: -1.6rem; margin-top: 0.25rem; }
.form-check-label { font-weight: 400; }
/* styled checkbox css end */
/* dark mode switch css */
/*.tumbler-wrapper {*/
/*  width: 50px;*/
/*  min-width: 50px;*/
/*  height: 30px;*/
/*  background-color: black;*/
/*  border: #1d92b2;*/
/*  border-radius: 30px;*/
/*  justify-content: space-between;*/
/*  align-items: center;*/
/*  padding: 0 6px;*/
/*  cursor: pointer;*/
/*  display: flex;*/
/*}*/
.tumbler-wrapper {
  width: 50px;
  min-width: 50px;
  height: 30px;
  background-color: #39393d;
  border: 1px solid transparent;
  border-radius: 30px;
  justify-content: space-between;
  align-items: center;
  padding: 0 6.5px;
  cursor: pointer;
  display: flex;
  position: relative;
  box-sizing: border-box;
  flex: none;
  appearance: none;
  user-select: none;
  -webkit-user-select: none;
}
.tumbler-wrapper:focus { border-color: var(--link-color); }
.tumbler-wrapper:focus-visible { outline: 2px solid var(--focus-color); outline-offset: 3px; }
.tumbler-wrapper img { width: 15px; height: 15px; display: block; pointer-events: none; }
.tumbler {
  position: absolute;
  top: 50%;
  left: 4px;
  height: 20px;
  width: 20px;
  border-radius: 50%;
  background-color: #ffffff;
  pointer-events: none;
  transform: translate(0, -50%);
}
body.night-mode .tumbler { transform: translate(20px, -50%); }
/* dark mode switch css end*/
/* night mode css start */
body.night-mode {
  color-scheme: dark;
  --page-background: #181b23;
  --surface: #222b36;
  --field-background: #1b222c;
  --text-color: #f3f5f7;
  --secondary-text: #c5ced8;
  --border-color: #75869a;
  --link-color: #8bc6ff;
  --link-hover: #c6e3ff;
  --focus-color: #8bc6ff;
  --button-background: #313c4b;
}
body.night-mode input[type="checkbox"] { accent-color: #8bc6ff; }
@media (max-width: 575px) {
  h1 { font-size: 1.4rem; }
  h2 { font-size: 1.2rem; }
  .brand img { width: 44px; height: 44px; margin-right: 0.5rem !important; }
  .brand p { max-width: 9rem; }
  .converter-panel { padding: 1rem; }
  #themeToggle { margin-left: 0.5rem; }
}
