

:root {
  font-family: system-ui, Arial, sans-serif;
  line-height: 1.35;
}

body {
  background: #lightyellow;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}


:root{
  --primary: #1e88e5;      /* blue you were using */
  --primary-600: #1565c0;  /* darker hover */
  --ring: rgba(147,197,253,0.6); /* soft blue focus ring */
}

.library-card{
  /* if your <form> is a grid, this makes the card span the full width */
  grid-column: 1 / -1;

  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0;
  background: #fdfdfd;
}

/* optional: tighten inner spacing */
.library-card .row { margin: 8px 0; }

/* Layout improvements for in-depth tutorial */
.modal__dialog {
  display: flex;
  flex-direction: column;
  max-height: 90vh;
}

.modal__toc {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: .5rem 0 1rem;
}
.modal__toc a {
  font-size: .85rem;
  padding: 4px 8px;
  border-radius: 999px;
  background: #f3f4f6;
  color: #111827;
  text-decoration: none;
  border: 1px solid #e5e7eb;
}
.modal__toc a:hover { background: #e5e7eb; }

.modal__body {
  overflow: auto;
  padding-right: .25rem;
  scroll-behavior: smooth;
}
.modal__body section + section { margin-top: 1rem; }
.modal__body h3 { margin: .5rem 0; }

/* “scroll to here” highlight pulse */
@keyframes targetPulse {
  0% { background: #fff; }
  20% { background: #fef3c7; }
  100% { background: #fff; }
}
.target-highlight {
  animation: targetPulse 1200ms ease-out 1;
}

/* bottom checkbox label */
.modal__noshow {
  display: flex; align-items: center; gap: 8px;
  margin-top: .75rem;
  font-size: .9rem;
}


.help-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-left: 6px;
  width: 18px; height: 18px;
  border-radius: 50%;
  background: #2563eb; color: #fff;
  font-size: 0.8rem; font-weight: 700;
  cursor: pointer; user-select: none;
}
.help-icon:hover { background: #1e40af; }



.wrap {
  max-width: 820px;
  margin: 24px auto;
  padding: 20px;
  border: 1px solid #ddd;
  border-radius: 12px;
  background: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.08);
}

h1 {
  margin-top: 0;
  font-size: 1.8rem;
  text-align: center;
}

form {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px 18px;
  align-items: start;
}

label {
  font-weight: 600;
}

.row {
  display: contents;
}

input[type="number"],
input[type="text"] {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid #ccc;
  border-radius: 8px;
  box-sizing: border-box;
}

input[readonly] {
  background: #f7f7f7;
}

.error {
  grid-column: 1 / -1;
  color: #b00020;
  font-size: 0.9rem;
  display: none;
  margin-top: -4px;
}

.note {
  margin-top: 1rem;
  padding: 0.75rem;
  background: #fac907;  /* light yellow */
  border: 1px solid #e6d28a;
  border-radius: 6px;
  font-size: 0.9rem;
  color: #333;
}

#copyStatus { color:#4b5563; font-size:0.9rem; }


.disclaimer-box {
  margin-top: 2rem;
  padding: 0.75rem;
  background: #f9f9f9;
  border: 1px solid #ddd;
  border-radius: 6px;
  font-size: 0.85rem;
  color: #555;
  text-align: center;
}



.section-title {
  grid-column: 1 / -1;
  margin: 12px 0 0;
  font-weight: 700;
  color: #333;
  font-size: 1.1rem;
}

.buttons {
  grid-column: 1 / -1;
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

button {
  padding: 10px 14px;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 1rem;
}

.primary {
  background: #1e88e5;
  color: white;
}

.primary:hover {
  background: #1565c0;
}

.ghost {
  background: #f1f1f1;
}

.ghost:hover {
  background: #e0e0e0;
}

h1 {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
}

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  background: #eef2ff;
  color: #4338ca;
  font-size: 0.8rem;
  border: 1px solid #c7d2fe;
}

.section-title {
  position: relative;
  padding-top: 8px;
  font-weight: 600;
}

.section-title::after {
  content: "";
  display: block;
  height: 3px;
  width: 64px;
  background: linear-gradient(90deg, var(--primary), transparent);
  margin-top: 6px;
  border-radius: 3px;
}

/* Inputs: focus ring + hover effect */
input[type="number"], input[type="text"] {
  transition: border 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

input[type="number"]:focus, input[type="text"]:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
  background: #fbfdff;
}

input[type="number"]:hover, input[type="text"]:hover {
  border-color: #cbd5e1;
}

/* Button polish */
button {
  transition: transform 0.05s ease, box-shadow 0.15s ease, background 0.15s ease;
  box-shadow: 0 2px 10px rgba(0,0,0,0.05);
  border-radius: 6px;
}

button:active {
  transform: translateY(1px);
}

/* Primary button */
.primary {
  background: var(--primary);
  color: #fff;          /* make sure text is white */
  border: none;
}
.primary:hover {
  background: var(--primary-600);
  color: #fff;          /* keep text white on hover */
}

.note-card {
  grid-column: 1 / -1;               
  text-align: center;
  background: #fffdf5;               /* very soft cream */
  border: 1px solid #fcd34d;         /* lighter golden border */
  border-radius: 6px;
  padding: 4px 8px;                  /* slimmer padding */
  margin: 10px 0;                    /* less vertical space */
  font-size: 0.85rem;                /* smaller text */
  font-weight: 400;                  /* normal weight */
  color: #92400e;                    /* warm amber */
  font-style: italic;                /* softer feel */
  box-shadow: 0 2px 4px rgba(0,0,0,0.02);
}





/* Ghost button (secondary style) */
.ghost {
  background: #f3f4f6;
  color: #111827;
}
.ghost:hover {
  background: #e5e7eb;
}

/* Results styling (Option A: enhance existing inputs) */
#TE, #TD, #Q {
  font-size: 1.6rem;       /* bigger text */
  font-weight: 800;        /* bold */
  letter-spacing: 0.3px;
  color: var(--ink);       /* dark gray text */
  background: #f9fafb;     /* light gray background */
  border: 1px solid var(--border);
  border-radius: 8px;
  text-align: right;       /* numbers align right */
  padding-right: 10px;
}

#TE:focus, #TD:focus, #Q:focus {
  outline: none;
  box-shadow: none;        /* no blue glow on results */
  border-color: var(--border);
}

/* Make each row inside a library card a clean 2-column layout */
.library-card{
  grid-column: 1 / -1;            /* span full form width if the form is a grid */
  border: 1px solid var(--border);
  border-radius: 8px;
  padding: 12px 16px;
  margin: 14px 0;
  background: #fdfdfd;
}

.library-card .row{
  display: grid;
  grid-template-columns: 220px 1fr;  /* label | input */
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}

.library-card .row label{
  margin: 0;                         /* prevent strange wrapping */
}

.library-card .row input,
.library-card .row select{
  width: 100%;
}

/* Library cards: clear visual separation */
.library-card{
  grid-column: 1 / -1;                /* span full width if the form is a grid */
  background: #ffffff;                /* solid white so it stands out */
  border: 1px solid #e5e7eb;          /* light gray border */
  border-radius: 12px;                /* rounded corners */
  box-shadow: 0 6px 16px rgba(0,0,0,0.06);  /* soft lift */
  padding: 14px 16px;
  margin: 16px 0 18px;
}

/* tighter spacing inside cards + consistent two-column layout */
.library-card .row{
  display: grid;
  grid-template-columns: 220px 1fr;   /* label | input */
  gap: 12px;
  align-items: center;
  margin: 8px 0;
}
.library-card .row label{ margin: 0; }
.library-card .row input{ width: 100%; }

/* optional: faint tint for the card background if your panel is also white */
.library-card.tinted{
  background: #fbfcff;                /* pale blue tint */
}

/* reduce top margin of the first title in each card */
.library-card .section-title{ margin-top: 0; }


.library-card.model {
  background: #f9fafc;   /* pale gray-blue */
}

.library-card.evap {
  background: #fff;      /* keep plain white */
}

.notice{
  grid-column: 1 / -1;
  margin-top: 8px;
  padding: 10px 12px;
  border-radius: 8px;
  background: #fff7ed;          /* soft amber */
  border: 1px solid #fdba74;
  color: #7c2d12;
  font-size: 0.9rem;
}
.notice.strong{
  background: #fef2f2;          /* soft red */
  border-color: #fca5a5;
  color: #7f1d1d;
}

.modal {
  position: fixed;
  inset: 0;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}
.modal[aria-hidden="false"] { display: flex; }
.modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,0.5);
}
.modal__dialog {
  position: relative;
  background: #fff;
  padding: 1.5rem;
  max-width: 500px;
  width: 90%;
  border-radius: 12px;
  box-shadow: 0 10px 25px rgba(0,0,0,0.3);
  z-index: 1001;
}
.modal__close {
  position: absolute;
  top: 0.5rem;
  right: 0.5rem;
  background: none;
  border: none;
  font-size: 1.2rem;
  cursor: pointer;
}
.modal__list {
  margin: 1rem 0;
  padding-left: 1.2rem;
}

/* Let labels lay out text + icon horizontally */
.row label {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}



/* Slightly larger controls and tighter grid */
input[type="number"], input[type="text"] { padding: 10px 12px; font-size: 1rem; }
button { font-size: 1rem; }

/* Stack to single column on narrow screens */
@media (max-width: 700px) {
  form { grid-template-columns: 1fr; }
  .row { display: block; }
  .row label { display: block; margin-bottom: 6px; }
}
