:root {
  --ink:            #0d1f2d;
  --ink-soft:       #2a3f52;
  --ink-muted:      #5b6b7d;
  --ink-faint:      #8a97a5;
  --surface:        #ffffff;
  --surface-warm:   #fdfbf5;
  --surface-cream:  #faf6eb;
  --bg:             #f4ede0;
  --bg-deep:        #ebe0ce;
  --accent:         #0d5f4f;
  --accent-dark:    #084232;
  --accent-light:   #1a7a67;
  --accent-tint:    #dcece6;
  --gold:           #b8935a;
  --gold-dark:      #8a6b3c;
  --gold-light:     #d4b47f;
  --gold-tint:      #f5ebd8;
  --err:            #b8392f;
  --good:           #1f7a4c;
  --font-display:   "Georgia", "Times New Roman", "Palatino Linotype", serif;
  --font-body:      -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
                    "Arial", sans-serif;
  --font-guj:       "Shruti", "Nirmala UI", "Noto Sans Gujarati", sans-serif;
  --font-mono:      "SF Mono", "Monaco", "Menlo", "Consolas", monospace;
  --shadow-sm:      0 1px 2px rgba(13, 31, 45, 0.04);
  --shadow-md:      0 4px 14px rgba(13, 31, 45, 0.08), 0 1px 3px rgba(13, 31, 45, 0.06);
  --shadow-lg:      0 12px 32px rgba(13, 31, 45, 0.10), 0 3px 8px rgba(13, 31, 45, 0.05);
  --shadow-glow:    0 0 0 3px rgba(13, 95, 79, 0.12);
  --ease-out:       cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in:        cubic-bezier(0.4, 0, 1, 1);
  --ease-bounce:    cubic-bezier(0.34, 1.56, 0.64, 1);
  --r-xs:  4px;
  --r-sm:  6px;
  --r-md:  10px;
  --r-lg:  16px;
  --r-xl:  24px;
}
* { box-sizing: border-box; }
*::selection { background: var(--gold-tint); color: var(--ink); }
html, body {
  margin: 0; padding: 0;
  font-family: var(--font-body);
  background: var(--bg);
  background-image:
    radial-gradient(ellipse 1200px 600px at 50% -200px, rgba(13, 95, 79, 0.08), transparent 60%),
    radial-gradient(ellipse 900px 600px at 100% 100%, rgba(184, 147, 90, 0.06), transparent 60%);
  background-attachment: fixed;
  color: var(--ink);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}
.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px;
}
.app-header {
  background: linear-gradient(180deg, var(--accent-dark) 0%, var(--accent) 100%);
  color: var(--surface-warm);
  border-bottom: 3px solid var(--gold);
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 4px 20px rgba(8, 66, 50, 0.2);
}
.app-header::before {
  content: "";
  position: absolute;
  left: 0; right: 0; top: 0; bottom: 0;
  background-image:
    repeating-linear-gradient(45deg,
      transparent 0, transparent 20px,
      rgba(255,255,255,0.015) 20px, rgba(255,255,255,0.015) 21px);
  pointer-events: none;
}
.app-header .wrap {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 20px 24px;
  gap: 16px;
  flex-wrap: wrap;
  position: relative;
}
.brand { display: flex; gap: 18px; align-items: center; }
.logo {
  font-size: 30px;
  width: 56px; height: 56px;
  display: flex; align-items: center; justify-content: center;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.02));
  border: 1px solid rgba(212, 180, 127, 0.35);
  border-radius: var(--r-md);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1);
}
.brand h1 {
  margin: 0;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 1.1;
  color: var(--surface-warm);
}
.brand .sub {
  margin: 4px 0 0;
  color: var(--gold-light);
  font-size: 13px;
  letter-spacing: 0.02em;
  font-style: italic;
}
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; }
.toolbar .btn {
  background: rgba(255,255,255,0.08);
  border-color: rgba(212, 180, 127, 0.4);
  color: var(--surface-warm);
  backdrop-filter: blur(8px);
}
.toolbar .btn:hover {
  background: rgba(255,255,255,0.15);
  border-color: var(--gold-light);
  color: var(--gold-light);
  transform: translateY(-1px);
}
.app-main { padding: 32px 0 80px; }
.steps {
  display: flex;
  gap: 6px;
  margin: 8px 0 28px;
  overflow-x: auto;
  padding: 4px 0 10px;
  scrollbar-width: thin;
  counter-reset: step;
}
.steps::-webkit-scrollbar { height: 6px; }
.steps::-webkit-scrollbar-thumb { background: var(--bg-deep); border-radius: 3px; }
.step-pill {
  flex: 0 0 auto;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  border: 1px solid var(--bg-deep);
  background: var(--surface-warm);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: 500;
  color: var(--ink-muted);
  cursor: pointer;
  transition: all 0.25s var(--ease-out);
  white-space: nowrap;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  counter-increment: step;
}
.step-pill::before {
  content: counter(step);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px; height: 22px;
  border-radius: 50%;
  background: var(--bg-deep);
  color: var(--ink-muted);
  font-size: 11px;
  font-weight: 700;
  font-family: var(--font-mono);
  transition: all 0.25s var(--ease-out);
}
.step-pill:hover {
  border-color: var(--accent-light);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.step-pill:hover::before { background: var(--accent-tint); color: var(--accent); }
.step-pill.active {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  color: var(--surface-warm);
  border-color: var(--accent-dark);
  box-shadow: 0 4px 12px rgba(13, 95, 79, 0.25);
  transform: translateY(-1px);
}
.step-pill.active::before {
  background: var(--gold);
  color: var(--accent-dark);
}
.step-pill.visited:not(.active) {
  background: var(--accent-tint);
  color: var(--accent-dark);
  border-color: var(--accent-light);
}
.step-pill.visited:not(.active)::before {
  content: "✓";
  background: var(--accent);
  color: var(--surface-warm);
  font-size: 12px;
}
.step {
  display: none;
  background: var(--surface);
  border: 1px solid var(--bg-deep);
  border-radius: var(--r-lg);
  padding: 36px 40px 32px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-md);
  position: relative;
  animation: stepIn 0.4s var(--ease-out);
}
.step.active { display: block; }
@keyframes stepIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.step::before {
  content: "";
  position: absolute;
  top: 0; left: 40px; right: 40px;
  height: 3px;
  background: linear-gradient(90deg, transparent, var(--gold-light) 20%, var(--gold) 50%, var(--gold-light) 80%, transparent);
  opacity: 0.7;
  border-radius: 999px;
  transform: translateY(-1px);
}
.step h2 {
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 26px;
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -0.01em;
  line-height: 1.2;
}
.step h2::first-letter {
  color: var(--accent);
  font-size: 1.15em;
}
.step .hint {
  margin: 0 0 24px;
  color: var(--ink-muted);
  font-size: 14px;
  font-style: italic;
  padding-bottom: 16px;
  border-bottom: 1px dashed var(--bg-deep);
}
.field-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 18px 24px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.field.full { grid-column: 1 / -1; }
.field label {
  font-size: 12px;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.field input[type="text"],
.field textarea,
.field select {
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  padding: 11px 14px;
  border: 1.5px solid var(--bg-deep);
  border-radius: var(--r-sm);
  background: var(--surface-warm);
  color: var(--ink);
  transition: all 0.2s var(--ease-out);
  width: 100%;
  line-height: 1.4;
}
.field input[type="text"]:hover,
.field textarea:hover,
.field select:hover {
  border-color: var(--ink-faint);
}
.field input[type="text"]:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  background: var(--surface);
  box-shadow: var(--shadow-glow);
}
.field textarea {
  min-height: 110px;
  resize: vertical;
  line-height: 1.6;
}
.field select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%235b6b7d' d='M6 8L0 0h12z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.year-tabs {
  display: flex;
  gap: 0;
  margin: 20px 0 24px;
  border-bottom: 2px solid var(--bg-deep);
  overflow-x: auto;
}
.year-tab {
  padding: 12px 24px;
  border: none;
  background: transparent;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  color: var(--ink-muted);
  cursor: pointer;
  font-weight: 500;
  font-size: 14px;
  font-family: var(--font-body);
  white-space: nowrap;
  transition: all 0.2s var(--ease-out);
  position: relative;
}
.year-tab:hover {
  color: var(--accent);
  background: var(--accent-tint);
}
.year-tab.active {
  color: var(--accent-dark);
  border-bottom-color: var(--gold);
  font-weight: 700;
  background: linear-gradient(180deg, transparent 0%, var(--gold-tint) 100%);
}
.year-tab.active::before {
  content: "";
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--gold);
  border-radius: 999px;
}
.section-head {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  color: var(--accent-dark);
  margin: 28px 0 12px;
  padding-top: 20px;
  border-top: 1px solid var(--bg-deep);
  display: flex;
  align-items: center;
  gap: 10px;
  letter-spacing: 0.01em;
}
.section-head::before {
  content: "";
  display: inline-block;
  width: 4px; height: 18px;
  background: var(--gold);
  border-radius: 2px;
}
.section-head:first-child { border-top: none; padding-top: 0; }
.btn {
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  padding: 9px 18px;
  border-radius: var(--r-sm);
  border: 1.5px solid var(--bg-deep);
  background: var(--surface);
  color: var(--ink-soft);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  display: inline-flex;
  align-items: center;
  gap: 8px;
  letter-spacing: 0.01em;
}
.btn:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: translateY(-1px);
  box-shadow: var(--shadow-sm);
}
.btn:active { transform: translateY(0); }
.btn.primary {
  background: linear-gradient(180deg, var(--accent-light), var(--accent));
  border-color: var(--accent-dark);
  color: var(--surface-warm);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(13, 95, 79, 0.2);
}
.btn.primary:hover {
  background: linear-gradient(180deg, var(--accent), var(--accent-dark));
  color: var(--gold-light);
  box-shadow: 0 6px 20px rgba(13, 95, 79, 0.35);
  transform: translateY(-2px);
}
.btn.ghost { background: transparent; }
.btn.big {
  padding: 16px 36px;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.btn:disabled {
  opacity: 0.55;
  cursor: not-allowed;
  transform: none !important;
}
.list-block {
  margin: 18px 0 30px;
  border: 1px solid var(--bg-deep);
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-warm);
  box-shadow: var(--shadow-sm);
  transition: box-shadow 0.2s var(--ease-out);
}
.list-block:hover { box-shadow: var(--shadow-md); }
.list-header {
  background: linear-gradient(180deg, var(--surface) 0%, var(--surface-warm) 100%);
  padding: 12px 16px;
  border-bottom: 1.5px solid var(--bg-deep);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-weight: 600;
  font-size: 14px;
  color: var(--ink-soft);
  font-family: var(--font-display);
}
.list-header .btn-add {
  font-size: 12px;
  padding: 5px 12px;
  background: var(--accent-tint);
  border-color: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}
.list-header .btn-add:hover {
  background: var(--accent);
  color: var(--surface-warm);
}
.list-rows { padding: 12px 14px; }
.list-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 14px;
  align-items: start;
  padding: 12px 4px;
  border-bottom: 1px dashed var(--bg-deep);
  transition: background 0.2s var(--ease-out);
  border-radius: var(--r-sm);
}
.list-row:last-child { border-bottom: none; }
.list-row:hover { background: rgba(184, 147, 90, 0.04); }
.list-row-fields {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 10px 12px;
}
.list-row-fields .field label {
  font-size: 10px;
  letter-spacing: 0.08em;
  color: var(--ink-muted);
}
.list-row-fields .field input,
.list-row-fields .field textarea {
  font-size: 13px;
  padding: 7px 10px;
}
.row-del {
  background: transparent;
  border: 1px solid transparent;
  color: var(--ink-faint);
  font-size: 16px;
  cursor: pointer;
  padding: 6px 10px;
  border-radius: var(--r-sm);
  transition: all 0.2s var(--ease-out);
}
.row-del:hover {
  background: #fde8ea;
  border-color: var(--err);
  color: var(--err);
}
.doc-toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  margin: 0 0 16px;
  padding: 12px 16px;
  background: var(--surface-cream);
  border-radius: var(--r-md);
  border: 1px dashed var(--gold-light);
}
.doc-category {
  font-family: var(--font-display);
  margin: 24px 0 10px;
  font-size: 13px;
  font-weight: 700;
  color: var(--accent-dark);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  padding-bottom: 4px;
  border-bottom: 1px solid var(--gold-light);
  display: inline-block;
  padding-right: 20px;
}
.doc-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 10px;
  margin-bottom: 8px;
}
.doc-item {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  border: 1.5px solid var(--bg-deep);
  border-radius: var(--r-sm);
  background: var(--surface);
  cursor: pointer;
  transition: all 0.2s var(--ease-out);
  position: relative;
}
.doc-item::before {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: transparent;
  border-radius: 3px 0 0 3px;
  transition: background 0.2s var(--ease-out);
}
.doc-item:hover {
  border-color: var(--accent-light);
  transform: translateX(2px);
  box-shadow: var(--shadow-sm);
}
.doc-item:hover::before { background: var(--gold); }
.doc-item input {
  margin-top: 3px;
  accent-color: var(--accent);
  width: 17px; height: 17px;
  cursor: pointer;
}
.doc-item-title {
  font-weight: 600;
  font-size: 14px;
  color: var(--ink);
}
.doc-item-desc {
  font-size: 12px;
  color: var(--ink-muted);
  margin-top: 3px;
  line-height: 1.4;
}
.doc-item.checked {
  background: linear-gradient(135deg, var(--accent-tint) 0%, var(--surface) 60%);
  border-color: var(--accent);
  box-shadow: var(--shadow-sm);
}
.doc-item.checked::before { background: var(--accent); }
.step-nav {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  margin-top: 24px;
  padding: 16px 4px;
}
.step-label {
  font-family: var(--font-display);
  font-size: 14px;
  color: var(--ink-muted);
  font-style: italic;
  text-align: center;
  flex: 1;
}
.summary-grid {
  display: grid;
  gap: 0;
  background: var(--surface-warm);
  border: 1px solid var(--bg-deep);
  border-radius: var(--r-md);
  overflow: hidden;
}
.summary-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 18px;
  font-size: 14px;
  border-bottom: 1px dashed var(--bg-deep);
  transition: background 0.15s var(--ease-out);
}
.summary-row:last-child { border-bottom: none; }
.summary-row:hover { background: var(--gold-tint); }
.summary-row span {
  color: var(--ink-muted);
  font-size: 13px;
  letter-spacing: 0.02em;
}
.summary-row strong {
  color: var(--accent-dark);
  font-family: var(--font-display);
  font-weight: 600;
  text-align: right;
  max-width: 65%;
}
.big-action {
  margin-top: 32px;
  padding: 36px;
  background: linear-gradient(135deg, var(--accent-dark) 0%, var(--accent) 50%, var(--accent-light) 100%);
  background-size: 200% 200%;
  animation: gradientShift 8s ease infinite;
  border-radius: var(--r-lg);
  text-align: center;
  position: relative;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(13, 95, 79, 0.2);
}
@keyframes gradientShift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}
.big-action::before,
.big-action::after {
  content: "";
  position: absolute;
  width: 240px;
  height: 240px;
  border-radius: 50%;
  opacity: 0.12;
  pointer-events: none;
}
.big-action::before {
  top: -100px; right: -60px;
  background: radial-gradient(circle, var(--gold), transparent 70%);
}
.big-action::after {
  bottom: -100px; left: -60px;
  background: radial-gradient(circle, var(--gold-light), transparent 70%);
}
.big-action .btn.primary {
  background: linear-gradient(180deg, var(--gold) 0%, var(--gold-dark) 100%);
  border-color: var(--gold-dark);
  color: var(--accent-dark);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.04em;
  padding: 18px 42px;
  box-shadow: 0 6px 24px rgba(184, 147, 90, 0.35), inset 0 1px 0 rgba(255,255,255,0.25);
  position: relative;
  z-index: 1;
}
.big-action .btn.primary:hover {
  background: linear-gradient(180deg, var(--gold-light) 0%, var(--gold) 100%);
  color: var(--accent-dark);
  transform: translateY(-2px);
  box-shadow: 0 10px 30px rgba(184, 147, 90, 0.5), inset 0 1px 0 rgba(255,255,255,0.4);
}
.small-note {
  font-size: 13px;
  color: var(--gold-tint);
  margin: 16px 0 0;
  font-style: italic;
  position: relative;
  z-index: 1;
}
.gen-status {
  margin-top: 20px;
  font-size: 14px;
  color: var(--surface-warm);
  position: relative;
  z-index: 1;
  line-height: 1.6;
}
.gen-status strong { color: var(--gold-light); font-family: var(--font-display); font-size: 20px; }
.gen-status small { color: var(--gold-tint); display: block; margin-top: 4px; }
.app-footer {
  margin-top: 48px;
  padding: 28px 0 40px;
  color: var(--ink-muted);
  font-size: 13px;
  text-align: center;
  position: relative;
}
.app-footer::before {
  content: "❋";
  display: block;
  font-size: 18px;
  color: var(--gold);
  margin-bottom: 12px;
}
.toast {
  position: fixed;
  bottom: 36px;
  left: 50%;
  transform: translate(-50%, 120px);
  background: linear-gradient(180deg, var(--ink), var(--ink-soft));
  color: var(--surface-warm);
  padding: 14px 24px;
  border-radius: var(--r-md);
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 12px 40px rgba(0,0,0,0.25), 0 2px 8px rgba(0,0,0,0.15);
  opacity: 0;
  transition: all 0.4s var(--ease-bounce);
  pointer-events: none;
  z-index: 1000;
  border: 1px solid rgba(212, 180, 127, 0.3);
  letter-spacing: 0.02em;
}
.toast.show { transform: translate(-50%, 0); opacity: 1; }
.toast.error {
  background: linear-gradient(180deg, #a12e25, var(--err));
  border-color: rgba(255,255,255,0.15);
}
.toast.success {
  background: linear-gradient(180deg, var(--accent-dark), var(--good));
  border-color: var(--gold-light);
}
@media (max-width: 760px) {
  .wrap { padding: 0 16px; }
  .app-header .wrap {
    flex-direction: column;
    align-items: stretch;
    padding: 16px;
  }
  .brand { justify-content: center; }
  .brand h1 { font-size: 22px; text-align: center; }
  .brand .sub { text-align: center; }
  .toolbar { justify-content: center; }
  .step { padding: 24px 20px; }
  .step::before { left: 20px; right: 20px; }
  .step h2 { font-size: 22px; }
  .field-grid { grid-template-columns: 1fr; gap: 14px; }
  .list-row { grid-template-columns: 1fr; }
  .row-del { justify-self: end; }
  .step-nav { flex-direction: row; gap: 8px; flex-wrap: wrap; }
  .step-label { width: 100%; order: -1; margin-bottom: 6px; }
  .big-action { padding: 24px 16px; }
  .big-action .btn.primary { width: 100%; padding: 14px 20px; font-size: 15px; }
}
@media print {
  .app-header, .steps, .step-nav, .app-footer, .toolbar { display: none; }
  .step { box-shadow: none; border: none; }
}
.badge-auto{background:var(--accent,#0b6b63);color:#fff;font-size:11px;letter-spacing:.08em;
  padding:2px 8px;border-radius:10px;font-weight:700}
.list-block.derived{opacity:.95}
.derived-preview{padding:0 14px 14px}
.mini-table{width:100%;border-collapse:collapse;font-size:12.5px}
.mini-table th,.mini-table td{border:1px solid #d8cfc0;padding:5px 7px;text-align:left}
.mini-table th{background:#f0e9dd}
input.computed,textarea.computed{background:#f3efe6;font-weight:600;color:#3a3227}
.verify-panel{background:#fffaf0;border:1px solid #ddd2bd;border-radius:10px;padding:14px 16px;margin-bottom:14px}
.verify-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(210px,1fr));gap:10px 18px}
.verify-grid>div{display:flex;justify-content:space-between;gap:10px;border-bottom:1px dotted #ddd2bd;padding:4px 0}
.verify-grid>div span{color:#6b6055;font-size:13px}
.verify-grid>div b{font-weight:700}
.verify-grid>div.big{grid-column:1/-1;background:#0b6b63;color:#fff;border-radius:8px;padding:8px 12px;border:none}
.verify-grid>div.big span{color:#cfe9e6}
.verify-grid>div.big b{font-size:20px}
.grade.good{color:#12734a}
.grade.satisfactory{color:#9a6a10}
.grade.not-satisfactory{color:#a52222}
.verify-panel .warn{color:#a52222;font-weight:600;margin:10px 0 0}
.import-strip{display:flex;flex-wrap:wrap;align-items:center;gap:10px;margin-bottom:14px}
.import-strip .hint{margin:0;flex:1 1 240px}
.override-box{background:#f7f3ea;border:1px dashed #ccc0aa;border-radius:10px;padding:12px 14px;margin-bottom:16px}
.check-inline{display:flex;align-items:center;gap:8px;font-weight:600;margin-bottom:10px}
.check-inline input{width:auto}
.override-fields select:disabled,.override-fields input:disabled{opacity:.5}
.lh-preview{display:flex;gap:18px;flex-wrap:wrap;margin:10px 0 18px}
.lh-preview figure{margin:0;border:1px solid #ddd2bd;border-radius:8px;padding:8px;background:#fff;max-width:340px}
.lh-preview figcaption{font-size:12px;letter-spacing:.06em;text-transform:uppercase;color:#6b6055;margin-bottom:6px}
.lh-preview img{max-width:100%;display:block;margin-bottom:8px}
.doc-cat h3{font-size:15px;margin:16px 0 6px;color:#0b6b63}
.perdoc-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(320px,1fr));gap:10px 16px}
.perdoc-grid label{font-size:12.5px}
.step{display:none;margin-bottom:20px;scroll-margin-top:110px}
.step.active{display:block;animation:stepIn .22s ease-out}
@keyframes stepIn{from{opacity:0;transform:translateY(8px)}to{opacity:1;transform:none}}
.steps{position:sticky;top:0;z-index:40;display:flex;flex-wrap:wrap;gap:6px;
  background:#fffdf8;padding:10px 0 8px;border-bottom:1px solid #e3d9c8;overflow:visible}
.step-pill{flex:0 0 auto;cursor:pointer;white-space:nowrap}
.step-pill.visited{opacity:1}
.wiz-progress{position:sticky;top:52px;z-index:39;height:7px;background:#e9e0d0;
  border-radius:6px;overflow:hidden;margin:0 0 18px}
#wiz-progress-fill{height:100%;width:0;border-radius:6px;
  background:linear-gradient(90deg,#0b6b63,#17a394);transition:width .28s ease}
.wiz-bar{position:sticky;bottom:0;z-index:50;display:flex;align-items:center;
  gap:12px;flex-wrap:wrap;margin-top:26px;padding:12px 0;background:#fffdf8;
  border-top:2px solid #e3d9c8;box-shadow:0 -8px 20px rgba(0,0,0,.07)}
.wiz-bar .spacer{flex:1 1 auto}
.wiz-bar .step-label{display:inline-block;flex:0 1 auto;margin:0;text-align:left}
.wiz-hint{font-size:12.5px;color:#6b6055}
.btn.generate{background:linear-gradient(180deg,#ffa62b 0%,#e2670a 100%);
  border-color:#b7530a;color:#fff;font-weight:700;font-size:15px;padding:12px 26px;
  letter-spacing:.02em;box-shadow:0 5px 16px rgba(226,103,10,.38)}
.btn.generate:hover{background:linear-gradient(180deg,#ffb547 0%,#f4780f 100%);
  color:#fff;border-color:#a8490a;box-shadow:0 8px 22px rgba(226,103,10,.5)}
.btn.generate:disabled{background:#d9cbb8;border-color:#c9b9a3;color:#7a6f60;box-shadow:none}
.btn.generate.busy{animation:genPulse 1.1s ease-in-out infinite}
@keyframes genPulse{0%,100%{box-shadow:0 5px 16px rgba(226,103,10,.38)}50%{box-shadow:0 5px 26px rgba(226,103,10,.75)}}
.btn.nav{min-width:120px;justify-content:center}
#step-summary{border-top:3px solid #0b6b63;padding-top:26px}
.year-add{display:flex;flex-wrap:wrap;align-items:flex-end;gap:12px;margin-bottom:12px}
.year-add .field{margin:0;min-width:180px}
.year-add .hint{flex:1 1 260px;margin:0}
.period-preview{flex:0 1 auto;background:#eef7f5;border:1px solid #bcdcd6;border-radius:8px;
  padding:7px 12px;font-size:13px;color:#0b6b63;line-height:1.35}
.year-chip-bar{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:18px}
.year-chip{display:inline-flex;align-items:center;gap:6px;background:#0b6b63;color:#fff;
  border-radius:14px;padding:3px 6px 3px 12px;font-weight:600;font-size:13px}
.year-chip a{color:#fff;text-decoration:none}
.year-chip button{background:rgba(255,255,255,.2);color:#fff;border:none;border-radius:50%;
  width:18px;height:18px;line-height:1;cursor:pointer;font-size:11px;padding:0}
.year-chip button:hover{background:#a52222}
@media (max-width:720px){
  .wiz-bar{gap:8px;padding:10px 0}
  .wiz-bar .btn.nav{min-width:0;flex:1 1 40%}
  .wiz-bar .btn.generate{flex:1 1 100%;justify-content:center}
  .wiz-bar .step-label,.wiz-hint{flex:1 1 100%;text-align:center}
}
@media print{.wiz-bar,.wiz-progress{display:none}.step{display:block !important}}
details.year-block{border:1px solid #ddd2bd;border-radius:10px;margin-bottom:14px;background:#fffdf8}
details.year-block>summary{cursor:pointer;padding:12px 16px;font-family:var(--font-display,Georgia,serif);
  font-size:17px;font-weight:700;color:#0b6b63;display:flex;align-items:center;gap:12px;list-style:none}
details.year-block>summary::-webkit-details-marker{display:none}
details.year-block>summary::before{content:"▸";font-size:13px;color:#9b8f7d}
details.year-block[open]>summary::before{content:"▾"}
details.year-block[open]>summary{border-bottom:1px solid #e3d9c8}
.yb-meta{font-size:12.5px;font-weight:500;color:#6b6055;font-family:inherit}
.year-body{padding:14px 16px 18px}
.btn.danger{color:#a52222;border-color:#e0b4b4}
.btn.danger:hover{background:#fdeeee}
.lh-preview .lh-text {
  border: 1px solid var(--line, #d8dee9);
  border-radius: 6px;
  padding: 8px 10px;
  background: #fff;
  font-size: 12px;
  line-height: 1.5;
  text-align: center;
  max-width: 260px;
}
.perdoc-fonts {
  display: flex;
  gap: 6px;
  margin-top: 6px;
  flex-wrap: wrap;
}
.perdoc-fonts select {
  flex: 1 1 45%;
  min-width: 120px;
  font-size: 12px;
  padding: 4px 6px;
}
.perdoc-fonts input[type="number"] {
  flex: 0 0 68px;
  font-size: 12px;
  padding: 4px 6px;
}
@media print { .perdoc-fonts { display: none; } }
.toolbar a.btn { text-decoration: none; }
.workload-head-selector{overflow:visible}
.workload-head-hint{padding:0 14px;margin:10px 0 8px;line-height:1.5}
.workload-head-body{padding:10px 14px 14px}
.workload-head-options{display:flex;flex-wrap:wrap;gap:8px;margin-bottom:12px}
.head-option{display:inline-flex;align-items:center;gap:6px;border:1px solid #ddd2bd;border-radius:18px;background:#fff;padding:7px 11px;font-size:12.5px;cursor:pointer;transition:.18s ease}
.head-option input{width:auto;margin:0;accent-color:var(--accent)}
.head-option.active{border-color:var(--accent);background:#e8f5f2;color:var(--accent-dark);font-weight:600}
.workload-custom-add{display:grid;grid-template-columns:1fr auto;gap:8px;margin:4px 0 12px}
.workload-custom-add input{margin:0}
.workload-in-use{display:flex;align-items:center;gap:10px;flex-wrap:wrap;border-top:1px dashed #ddd2bd;padding-top:10px;font-size:11px;letter-spacing:.04em;color:var(--ink-muted)}
.workload-chips{display:flex;gap:7px;flex-wrap:wrap}
.workload-chip{display:inline-flex;align-items:center;gap:6px;background:#e8f5f2;border:1px solid var(--accent);border-radius:16px;padding:5px 8px 5px 10px;color:var(--accent-dark);font-size:12px;font-weight:600;letter-spacing:0}
.workload-chip button{border:0;background:#cfe9e4;color:var(--accent-dark);border-radius:50%;width:18px;height:18px;line-height:16px;padding:0;cursor:pointer}
.workload-stage-hint{padding:0 14px;margin:10px 0 0}
.workload-row-fields{grid-template-columns:repeat(auto-fit,minmax(145px,1fr))}
.year-iqac-box{border:1px solid #ddd2bd;border-radius:10px;background:#fffaf0;padding:12px 14px;margin:0 0 16px}
.iqac-mode-options{display:flex;flex-wrap:wrap;gap:10px;margin:10px 0 12px}
.iqac-mode-card{display:flex;align-items:center;gap:8px;flex:1 1 300px;border:1px solid #ddd2bd;border-radius:10px;background:#fff;padding:10px 12px;font-weight:600;cursor:pointer}
.iqac-mode-card input{width:auto;margin:0;accent-color:var(--accent)}
.iqac-mode-card.active{border-color:var(--accent);background:#e8f5f2;color:var(--accent-dark)}
.year-iqac-content>.list-block{margin:10px 0 0}
@media(max-width:720px){.workload-custom-add{grid-template-columns:1fr}.workload-custom-add .btn{width:100%;justify-content:center}}


/* ===== BUILD STAMP (lets a user confirm which version is running) ===== */
.build-stamp{
  margin:4px 0 0;
  font-size:11px;
  letter-spacing:.04em;
  text-transform:uppercase;
  opacity:.72;
}

/* ===================================================================
   v1.7.0 — Add API Years step, per-year API pages, bottom-bar buttons
   =================================================================== */

/* --- highlighted bilingual notice on the Add API Years step --- */
.api-notice{
  margin:0 0 18px;
  padding:14px 18px;
  border-left:5px solid #b8912f;
  border-radius:8px;
  background:linear-gradient(90deg,#fdf6e3,#fbfcfd);
  box-shadow:0 1px 3px rgba(16,40,64,.07);
}
.api-notice p{margin:0 0 6px;font-size:14.5px;line-height:1.55}
.api-notice p:last-child{margin-bottom:0}
.api-notice .gu{color:#4a3c14}

/* --- period editor table --- */
.period-table{
  width:100%;
  border-collapse:collapse;
  margin-top:14px;
  font-size:14px;
}
.period-table th,
.period-table td{
  border:1px solid #dde5ec;
  padding:9px 10px;
  text-align:left;
  vertical-align:middle;
}
.period-table thead th{
  background:#eef3f8;
  font-size:12.5px;
  letter-spacing:.03em;
  text-transform:uppercase;
  color:#3c556e;
}
.period-table tbody tr:nth-child(even){background:#fafcfd}
.period-table .pt-num{width:38px;text-align:center;font-weight:700;color:#5b7188}
.period-table .pt-name small{color:#67788c}
.period-table .pt-dur{white-space:nowrap;color:#3c556e}
.period-table input[type="date"]{width:100%}

.year-add{display:flex;flex-wrap:wrap;gap:10px;align-items:center;margin:6px 0 4px}
.year-add .hint{margin:0}

/* --- one page per API year --- */
.api-year-head{
  margin:0 0 16px;
  padding-bottom:12px;
  border-bottom:2px solid #e3e9f0;
}
.api-year-head h2{margin:0 0 2px}
.api-year-head .ay-gu{
  font-size:.62em;
  font-weight:600;
  color:#5b7188;
  margin-left:10px;
}
.api-year-head .ay-period{
  margin:0 0 6px;
  font-size:17px;
  font-weight:700;
  color:#12457f;
  letter-spacing:.01em;
}
.api-year-head .ay-dur{font-weight:500;color:#67788c;font-size:14px}

/* API year pills stand out slightly in the step bar */
.step-pill.api-pill{border-color:#c9dcea}
.step-pill.api-pill.active{background:#12457f}

/* --- repeated Load / Save / Save As in the bottom bar --- */
.wiz-bar .bar-sep{
  width:1px;
  align-self:stretch;
  margin:6px 4px;
  background:#d8e1ea;
}
.wiz-bar .btn.small{padding:6px 11px;font-size:13px}
