:root {
  color-scheme: light;
  --brand: #4f46e5;
  --brand-strong: #3730a3;
  --accent: #06b6d4;
  --emerald: #10b981;
  --ink: #0f172a;
  --muted: #64748b;
  --surface: #ffffff;
  --soft: #f8fafc;
  --line: #e2e8f0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--soft);
  color: var(--ink);
}

button,
input,
select,
textarea {
  font: inherit;
}

a,
button {
  transition: color 180ms ease, background-color 180ms ease, border-color 180ms ease, transform 180ms ease, box-shadow 180ms ease;
}

.page-shell {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-main {
  flex: 1;
}

.logo-mark {
  position: relative;
  display: inline-grid;
  height: 2.5rem;
  width: 2.5rem;
  place-items: center;
  overflow: hidden;
  border-radius: 0.875rem;
  background:
    radial-gradient(circle at 72% 28%, rgba(6, 182, 212, 0.95), transparent 34%),
    linear-gradient(135deg, #4f46e5, #0f172a);
  color: white;
  font-weight: 800;
  letter-spacing: 0;
  box-shadow: 0 14px 30px rgba(79, 70, 229, 0.25);
}

.logo-mark::after {
  content: "";
  position: absolute;
  inset: 0.45rem;
  border: 1px solid rgba(255, 255, 255, 0.32);
  border-radius: 0.65rem;
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  border-radius: 999px;
  padding: 0.55rem 0.8rem;
  color: #475569;
  font-size: 0.92rem;
  font-weight: 650;
}

.nav-link:hover,
.nav-link[aria-current="page"] {
  background: rgba(79, 70, 229, 0.09);
  color: var(--brand);
}

.hero-bg {
  position: relative;
  overflow: hidden;
  background-color: #f8fafc;
  background-image:
    linear-gradient(90deg, rgba(248, 250, 252, 0.9) 0%, rgba(248, 250, 252, 0.72) 44%, rgba(248, 250, 252, 0.9) 100%),
    url("/assets/images/shishwalab-hero.png");
  background-position: center;
  background-size: cover;
}

.section-band {
  border-block: 1px solid var(--line);
  background: var(--surface);
}

.surface-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.06);
}

.tool-card {
  position: relative;
  display: flex;
  height: 100%;
  flex-direction: column;
  gap: 1rem;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  padding: 1.25rem;
  box-shadow: 0 16px 35px rgba(15, 23, 42, 0.05);
}

.tool-card:hover {
  transform: translateY(-3px);
  border-color: rgba(79, 70, 229, 0.4);
  box-shadow: 0 22px 45px rgba(15, 23, 42, 0.1);
}

.icon-chip {
  display: inline-grid;
  height: 2.75rem;
  width: 2.75rem;
  place-items: center;
  border-radius: 0.75rem;
  background: rgba(79, 70, 229, 0.1);
  color: var(--brand);
}

.category-card {
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(248, 250, 252, 0.8)),
    var(--surface);
  padding: 1.2rem;
}

.primary-btn,
.secondary-btn,
.ghost-btn {
  display: inline-flex;
  min-height: 2.75rem;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border-radius: 0.5rem;
  padding: 0.75rem 1rem;
  font-weight: 750;
  line-height: 1.1;
}

.primary-btn {
  background: var(--brand);
  color: white;
  box-shadow: 0 14px 24px rgba(79, 70, 229, 0.24);
}

.primary-btn:hover {
  background: var(--brand-strong);
  transform: translateY(-1px);
}

.secondary-btn {
  border: 1px solid rgba(79, 70, 229, 0.28);
  background: rgba(255, 255, 255, 0.84);
  color: var(--brand);
}

.secondary-btn:hover {
  border-color: var(--brand);
  transform: translateY(-1px);
}

.ghost-btn {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.ghost-btn:hover {
  border-color: rgba(79, 70, 229, 0.4);
  color: var(--brand);
}

.search-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 0.5rem);
  display: none;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.14);
}

.search-panel.is-open {
  display: block;
}

.tool-form label {
  display: block;
  color: var(--ink);
  font-size: 0.88rem;
  font-weight: 750;
  margin-bottom: 0.4rem;
}

.tool-form input,
.tool-form select,
.tool-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 0.5rem;
  background: var(--surface);
  color: var(--ink);
  padding: 0.78rem 0.85rem;
  outline: none;
}

.tool-form textarea {
  min-height: 8rem;
  resize: vertical;
}

.tool-form input[type="color"] {
  height: 3.1rem;
  padding: 0.25rem;
  cursor: pointer;
}

.tool-form input[type="color"]::-webkit-color-swatch-wrapper {
  padding: 0;
}

.tool-form input[type="color"]::-webkit-color-swatch {
  border: 0;
  border-radius: 0.35rem;
}

.tool-form input:focus,
.tool-form select:focus,
.tool-form textarea:focus {
  border-color: rgba(79, 70, 229, 0.75);
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.1);
}

.tool-form .emi-number-input {
  width: 9.5rem;
  flex-shrink: 0;
}

.tool-form .emi-range {
  width: 100%;
  height: 0.55rem;
  margin-top: 0.35rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.28), rgba(6, 182, 212, 0.35));
  accent-color: var(--brand);
  cursor: pointer;
}

.tool-form .emi-range:focus {
  box-shadow: 0 0 0 4px rgba(79, 70, 229, 0.12);
}

.emi-recommend {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  border: 1px solid rgba(148, 163, 184, 0.45);
  border-radius: 999px;
  background: #f8fafc;
  color: #334155;
  padding: 0.85rem 1.1rem;
  font-size: 0.95rem;
  font-weight: 650;
  line-height: 1.45;
}

.emi-recommend--save {
  border-color: rgba(16, 185, 129, 0.35);
  background: #ecfdf5;
  color: #065f46;
}

.emi-recommend--note {
  border-color: rgba(245, 158, 11, 0.4);
  background: #fffbeb;
  color: #92400e;
}

.emi-recommend-icon {
  display: inline-grid;
  place-items: center;
  width: 1.35rem;
  height: 1.35rem;
  flex-shrink: 0;
  margin-top: 0.1rem;
  border-radius: 999px;
  background: #64748b;
  color: #fff;
  font-size: 0.75rem;
  font-weight: 800;
  line-height: 1;
}

.emi-recommend--save .emi-recommend-icon {
  background: #059669;
}

.emi-recommend--note .emi-recommend-icon {
  background: #d97706;
}

.emi-schedule-card {
  border: 1px solid var(--line);
  border-radius: 0.85rem;
  background: #fff;
  padding: 1rem;
}

.emi-schedule-card--reducing {
  border-color: rgba(16, 185, 129, 0.35);
  box-shadow: inset 0 0 0 1px rgba(16, 185, 129, 0.08);
}

.emi-schedule-card--flat {
  border-color: rgba(245, 158, 11, 0.4);
  box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.08);
}

.emi-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 0.4rem;
  padding: 0.35rem 0.65rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
}

.emi-badge--recommended {
  background: #059669;
}

.emi-badge--flat {
  background: #d97706;
}

.emi-schedule-scroll {
  max-height: 27.5rem;
  overflow-x: hidden;
  overflow-y: auto;
  border: 1px solid var(--line);
  border-radius: 0.65rem;
  background: #fff;
}

.emi-schedule-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}

.emi-schedule-table th,
.emi-schedule-table td {
  padding: 0.55rem 0.4rem;
  text-align: right;
  white-space: nowrap;
  border-bottom: 1px solid #e2e8f0;
  vertical-align: middle;
}

.emi-schedule-table th:first-child,
.emi-schedule-table td:first-child {
  text-align: left;
  padding-left: 0.55rem;
}

.emi-schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: #f8fafc;
  color: #475569;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.emi-schedule-table tbody td.emi-col {
  color: #4f46e5;
  font-weight: 750;
}

.emi-schedule-table tbody tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 640px) {
  .emi-recommend {
    border-radius: 0.85rem;
  }
}

.form-help {
  color: var(--muted);
  font-size: 0.82rem;
}

.result-panel {
  border: 1px solid rgba(6, 182, 212, 0.24);
  border-radius: 0.5rem;
  background: rgba(6, 182, 212, 0.06);
  padding: 1rem;
  min-width: 0;
}

.emi-fit-value {
  display: block;
  width: 100%;
  overflow: hidden;
  white-space: nowrap;
  font-weight: 900;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.emi-fit-value--xl {
  font-size: clamp(1.25rem, 4vw, 1.875rem);
}

.emi-fit-value--lg {
  font-size: clamp(1rem, 3.2vw, 1.25rem);
}

.meter {
  overflow: hidden;
  height: 0.7rem;
  border-radius: 999px;
  background: #e2e8f0;
}

.meter > span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: #ef4444;
  transition: width 180ms ease, background-color 180ms ease;
}

.faq-item {
  border-bottom: 1px solid var(--line);
  padding: 1.1rem 0;
}

.faq-item:last-child {
  border-bottom: 0;
}

.footer-link {
  color: #475569;
}

.footer-link:hover {
  color: var(--brand);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

@media (max-width: 520px) {
  .primary-btn,
  .secondary-btn,
  .ghost-btn {
    width: 100%;
  }

  .tool-card {
    padding: 1rem;
  }
}

.ad-slot {
  width: 100%;
  margin: 0.75rem auto;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 0;
  border-radius: 0.5rem;
  background: transparent;
  contain: layout;
}

.ad-slot--inline {
  max-height: 90px;
}