/* ==========================================================================
   Theme
   ========================================================================== */

:root {
  --brand: #5b4dff;
  --brand-dark: #4636e6;
  /* gradient stops are dark enough for white text (WCAG 4.5:1) and as gradient text on white */
  --brand-2: #a21caf;
  --brand-gradient: linear-gradient(135deg, var(--brand) 0%, #7c3aed 55%, var(--brand-2) 100%);
  --ink: #111827;
  --ink-soft: #4b5563;
  --surface: #ffffff;
  --page: #f6f6fb;
  --line: rgba(17, 24, 39, .08);
  --radius: 1.25rem;
  --shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 8px 24px -12px rgba(17, 24, 39, .12);
  --shadow-lg: 0 2px 4px rgba(17, 24, 39, .04), 0 24px 48px -20px rgba(55, 48, 163, .35);

  /* default accent; each category overrides it (see .cat-*) */
  --accent: var(--brand);
  --accent-soft: rgba(91, 77, 255, .1);

  /* Bootstrap overrides */
  --bs-primary: var(--brand);
  --bs-primary-rgb: 91, 77, 255;
  --bs-link-color: var(--brand);
  --bs-link-color-rgb: 91, 77, 255;
  --bs-link-hover-color: var(--brand-dark);
  --bs-link-hover-color-rgb: 70, 54, 230;
  --bs-body-font-family: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bs-body-color: var(--ink);
  --bs-body-bg: var(--page);
  --bs-secondary-color: var(--ink-soft);
  --bs-border-color: rgba(17, 24, 39, .12);
  --bs-border-radius: .75rem;
  --bs-focus-ring-color: rgba(91, 77, 255, .25);
}

/* category accents */
/* category accents: each passes 4.5:1 as text on white, on the page background and on its own tint */
.cat-finance { --accent: #047857; --accent-soft: rgba(4, 120, 87, .12); }
.cat-developer { --accent: #0369a1; --accent-soft: rgba(3, 105, 161, .12); }
.cat-image { --accent: #be185d; --accent-soft: rgba(190, 24, 93, .1); }
.cat-domain { --accent: #0f766e; --accent-soft: rgba(15, 118, 110, .12); }
.cat-pdf { --accent: #b91c1c; --accent-soft: rgba(185, 28, 28, .1); }
.cat-base64 { --accent: #7c3aed; --accent-soft: rgba(124, 58, 237, .11); }

body {
  font-size: .95rem;
  -webkit-font-smoothing: antialiased;
}

::selection {
  background: rgba(91, 77, 255, .2);
}

.text-gradient {
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-title {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  margin-bottom: 1rem;
}

/* ==========================================================================
   Header
   ========================================================================== */

.site-header {
  background: rgba(255, 255, 255, .82);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--line);
}

.site-header .navbar {
  padding-top: .7rem;
  padding-bottom: .7rem;
}

/* logo: public/images/logo.svg (logo-light.svg in the footer) */
.brand {
  display: inline-flex;
  align-items: center;
  padding: 0;
}

.brand-logo {
  display: block;
  height: 2.1rem;
  width: auto;
}

.site-header .nav-link {
  font-weight: 500;
  color: var(--ink-soft);
  border-radius: 999px;
  padding: .45rem .9rem !important;
  transition: background-color .15s ease, color .15s ease;
}

.site-header .nav-link:hover,
.site-header .nav-link:focus {
  color: var(--ink);
  background: rgba(17, 24, 39, .05);
}

.site-header .nav-link.active {
  color: var(--brand);
  background: rgba(91, 77, 255, .1);
}

.dropdown-menu {
  --bs-dropdown-link-active-bg: var(--brand);
  border: 1px solid var(--line);
  border-radius: 1rem;
  padding: .45rem;
  min-width: 14rem;
}

.dropdown-item {
  border-radius: .6rem;
  padding: .5rem .75rem;
  font-weight: 500;
}

.dropdown-item i {
  color: var(--brand);
}

.dropdown-item.active i,
.dropdown-item:active i {
  color: inherit;
}

/* ==========================================================================
   Shared building blocks
   ========================================================================== */

.tool-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: .9rem;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: 1.35rem;
}

.tool-icon-sm {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .7rem;
  font-size: 1.05rem;
}

.tool-icon-lg {
  width: 4.25rem;
  height: 4.25rem;
  border-radius: 1.25rem;
  font-size: 2rem;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.card {
  --bs-card-border-color: var(--line);
  --bs-card-border-radius: var(--radius);
  --bs-card-inner-border-radius: calc(var(--radius) - 1px);
  --bs-card-cap-bg: transparent;
  background: var(--surface);
}

.card.shadow-sm {
  box-shadow: var(--shadow) !important;
}

.card-body {
  padding: 1.5rem;
}

.card-header {
  padding: 1rem 1.5rem;
  border-bottom-color: var(--line);
}

.form-label {
  font-weight: 600;
  font-size: .9rem;
}

.form-control,
.form-select {
  border-radius: .75rem;
  padding: .6rem .85rem;
  border-color: rgba(17, 24, 39, .14);
  background-color: #fbfbfe;
}

.form-control-sm,
.form-select-sm {
  padding: .35rem .6rem;
  border-radius: .6rem;
}

.form-control:focus,
.form-select:focus {
  border-color: rgba(91, 77, 255, .6);
  box-shadow: 0 0 0 .25rem rgba(91, 77, 255, .15);
  background-color: #fff;
}

.form-control[type="file"] {
  padding: .45rem;
}

.form-control::file-selector-button {
  border: 0;
  border-radius: .55rem;
  margin: -.05rem .75rem -.05rem 0;
  padding: .4rem .9rem;
  background: var(--accent-soft);
  color: var(--brand);
  font-weight: 600;
}

.form-check-input:checked {
  background-color: var(--brand);
  border-color: var(--brand);
}

.form-check-input:focus {
  border-color: rgba(91, 77, 255, .6);
  box-shadow: 0 0 0 .25rem rgba(91, 77, 255, .15);
}

textarea.font-monospace {
  font-size: .85rem;
  line-height: 1.5;
}

.btn {
  --bs-btn-border-radius: .75rem;
  --bs-btn-font-weight: 600;
  --bs-btn-padding-y: .6rem;
  --bs-btn-padding-x: 1.1rem;
}

.btn-sm {
  --bs-btn-padding-y: .3rem;
  --bs-btn-padding-x: .7rem;
  --bs-btn-border-radius: .55rem;
}

.btn-primary {
  --bs-btn-bg: var(--brand);
  --bs-btn-border-color: transparent;
  --bs-btn-hover-bg: var(--brand-dark);
  --bs-btn-hover-border-color: transparent;
  --bs-btn-active-bg: var(--brand-dark);
  --bs-btn-active-border-color: transparent;
  --bs-btn-focus-shadow-rgb: 91, 77, 255;
  background-image: var(--brand-gradient);
  box-shadow: 0 8px 20px -10px rgba(91, 77, 255, .9);
  transition: transform .15s ease, box-shadow .15s ease, filter .15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 12px 24px -10px rgba(91, 77, 255, .9);
}

.btn-outline-primary {
  --bs-btn-color: var(--brand);
  --bs-btn-border-color: rgba(91, 77, 255, .4);
  --bs-btn-hover-bg: var(--brand);
  --bs-btn-hover-border-color: var(--brand);
  --bs-btn-active-bg: var(--brand-dark);
}

.btn-success {
  --bs-btn-bg: #047857;
  --bs-btn-border-color: #047857;
  --bs-btn-hover-bg: #065f46;
  --bs-btn-hover-border-color: #065f46;
  --bs-btn-active-bg: #064e3b;
  --bs-btn-active-border-color: #064e3b;
  box-shadow: 0 8px 20px -10px rgba(16, 185, 129, .9);
}

.nav-tabs {
  --bs-nav-tabs-link-active-color: var(--brand);
  --bs-nav-link-color: var(--ink-soft);
  --bs-nav-link-hover-color: var(--ink);
}

.nav-tabs .nav-link {
  font-weight: 600;
}

.nav-tabs .nav-link.active {
  border-bottom-color: var(--surface);
  box-shadow: inset 0 3px 0 var(--brand);
}

.table {
  --bs-table-bg: transparent;
}

.breadcrumb {
  --bs-breadcrumb-divider-color: var(--ink-soft);
  --bs-breadcrumb-item-active-color: var(--ink-soft);
  font-size: .85rem;
  margin-bottom: 1.25rem;
}

.breadcrumb a {
  text-decoration: none;
  font-weight: 500;
}

/* ==========================================================================
   Home page
   ========================================================================== */

.home-hero {
  position: relative;
  overflow: hidden;
  padding: 5rem 0 4.5rem;
  background:
    radial-gradient(40rem 22rem at 85% 10%, rgba(217, 70, 239, .18), transparent 70%),
    radial-gradient(36rem 24rem at 10% 0%, rgba(91, 77, 255, .2), transparent 70%),
    radial-gradient(30rem 20rem at 60% 100%, rgba(14, 165, 233, .12), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

/* faint dotted grid behind the hero */
.home-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(17, 24, 39, .09) 1px, transparent 1px);
  background-size: 22px 22px;
  mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  -webkit-mask-image: linear-gradient(to bottom, #000 30%, transparent 90%);
  pointer-events: none;
}

.hero-pill {
  display: inline-flex;
  align-items: center;
  padding: .35rem .85rem;
  border-radius: 999px;
  background: rgba(91, 77, 255, .1);
  color: var(--brand);
  font-weight: 600;
  font-size: .82rem;
}

.hero-title {
  margin: 1.1rem 0 1rem;
  font-size: clamp(2.4rem, 5.5vw, 4rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -.045em;
}

.hero-lead {
  max-width: 36rem;
  font-size: 1.15rem;
  color: var(--ink-soft);
  margin-bottom: 0;
}

.hero-category {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .5rem .6rem .5rem .9rem;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform .15s ease, border-color .15s ease;
}

.hero-category i {
  color: var(--accent);
}

.hero-category:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  color: var(--ink);
}

.hero-category-count {
  display: inline-grid;
  place-items: center;
  min-width: 1.5rem;
  height: 1.5rem;
  padding: 0 .4rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .75rem;
}

.hero-showcase {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1rem;
  transform: rotate(-3deg);
}

.showcase-tile {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: 1rem;
  border-radius: 1.1rem;
  background: rgba(255, 255, 255, .9);
  border: 1px solid var(--line);
  box-shadow: var(--shadow-lg);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  animation: float 6s ease-in-out infinite;
  animation-delay: calc(var(--i) * -1s);
}

.showcase-tile:nth-child(even) {
  margin-top: 1.5rem;
  margin-bottom: -1.5rem;
}

.showcase-tile:hover {
  color: var(--accent);
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-8px); }
}

@media (prefers-reduced-motion: reduce) {
  .showcase-tile { animation: none; }
}

.feature {
  display: flex;
  gap: 1rem;
  height: 100%;
  padding: 1.25rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.feature p {
  color: var(--ink-soft);
  font-size: .9rem;
}

.feature-icon {
  display: inline-grid;
  place-items: center;
  flex-shrink: 0;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: .8rem;
  background: var(--brand-gradient);
  color: #fff;
}

.category-section {
  scroll-margin-top: 6rem;
  margin-bottom: 3.5rem;
}

.tool-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  color: var(--ink);
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

/* accent bar that grows in on hover */
.tool-card::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 3px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .25s ease;
}

.tool-card:hover {
  transform: translateY(-4px);
  border-color: transparent;
  box-shadow: var(--shadow-lg);
  color: var(--ink);
}

.tool-card:hover::after {
  transform: scaleX(1);
}

.tool-card-title {
  margin: 1rem 0 .35rem;
  font-size: 1.05rem;
  font-weight: 700;
}

.tool-card-text {
  flex-grow: 1;
  margin-bottom: 1rem;
  color: var(--ink-soft);
  font-size: .9rem;
}

.tool-card-cta {
  color: var(--accent);
  font-weight: 600;
  font-size: .88rem;
}

.tool-card-cta i {
  display: inline-block;
  transition: transform .2s ease;
}

.tool-card:hover .tool-card-cta i {
  transform: translateX(4px);
}

/* ==========================================================================
   Tool pages
   ========================================================================== */

.tool-hero {
  padding: 2rem 0 2.5rem;
  background:
    radial-gradient(30rem 14rem at 0% 0%, var(--accent-soft), transparent 70%),
    radial-gradient(26rem 14rem at 100% 100%, rgba(217, 70, 239, .08), transparent 70%),
    var(--surface);
  border-bottom: 1px solid var(--line);
}

.tool-hero-body {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.category-chip {
  display: inline-block;
  padding: .15rem .6rem;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent);
  font-size: .75rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
}

.tool-title {
  margin: .35rem 0 .3rem;
  font-size: clamp(1.7rem, 3.5vw, 2.4rem);
  font-weight: 800;
  letter-spacing: -.035em;
}

.tool-lead {
  max-width: 44rem;
  margin-bottom: 0;
  color: var(--ink-soft);
  font-size: 1.05rem;
}

@media (max-width: 575.98px) {
  .tool-hero-body { align-items: flex-start; }
  .tool-icon-lg { width: 3.25rem; height: 3.25rem; font-size: 1.5rem; border-radius: 1rem; }
}

/* "How to" panel beside each tool's form */
.howto {
  height: 100%;
  padding: 1.5rem;
  border-radius: var(--radius);
  background: linear-gradient(180deg, rgba(91, 77, 255, .05), rgba(91, 77, 255, 0)), var(--surface);
  border: 1px dashed rgba(91, 77, 255, .25);
}

.howto h2 {
  font-weight: 700;
  margin-bottom: 1rem;
}

.howto ol {
  list-style: none;
  counter-reset: step;
  padding-left: 0;
  margin-bottom: 1rem;
}

.howto ol li {
  counter-increment: step;
  position: relative;
  padding-left: 2.4rem;
  margin-bottom: .75rem;
  min-height: 1.7rem;
  line-height: 1.7rem;
}

.howto ol li::before {
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.7rem;
  height: 1.7rem;
  border-radius: 50%;
  background: var(--brand-gradient);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  line-height: 1.7rem;
  text-align: center;
}

.howto ul {
  padding-left: 1.1rem;
  margin-bottom: 0;
}

.howto ul li {
  margin-bottom: .35rem;
}

/* FAQ accordion (plain <details>, no JavaScript) */
.faq-list {
  display: grid;
  gap: .75rem;
}

.faq-item {
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  transition: box-shadow .15s ease, border-color .15s ease;
}

.faq-item[open] {
  border-color: rgba(91, 77, 255, .3);
  box-shadow: var(--shadow);
}

.faq-item summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1rem 1.25rem;
  font-weight: 600;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item summary::after {
  content: "+";
  flex-shrink: 0;
  display: inline-grid;
  place-items: center;
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 50%;
  background: rgba(91, 77, 255, .1);
  color: var(--brand);
  font-size: 1.1rem;
  font-weight: 700;
  transition: transform .2s ease;
}

.faq-item[open] summary::after {
  transform: rotate(45deg);
}

.faq-item p {
  margin: 0;
  padding: 0 1.25rem 1.1rem;
  color: var(--ink-soft);
}

.related-tool {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .85rem 1rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
  color: var(--ink);
  font-weight: 600;
  text-decoration: none;
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}

.related-tool > .bi-chevron-right {
  color: var(--ink-soft);
  transition: transform .15s ease;
}

.related-tool:hover {
  transform: translateY(-2px);
  border-color: var(--accent);
  box-shadow: var(--shadow);
  color: var(--ink);
}

.related-tool:hover > .bi-chevron-right {
  transform: translateX(3px);
  color: var(--accent);
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer {
  background: #0d1022;
  background-image: radial-gradient(40rem 18rem at 100% 0%, rgba(91, 77, 255, .22), transparent 70%);
  color: #e5e7eb;
}

.footer-muted {
  color: #9ca3af;
}

.footer-heading {
  margin-bottom: .9rem;
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.site-footer ul li {
  margin-bottom: .45rem;
}

.site-footer ul a {
  color: #9ca3af;
  text-decoration: none;
  font-size: .9rem;
  transition: color .15s ease;
}

.site-footer ul a:hover {
  color: #fff;
}

.footer-rule {
  margin: 2.5rem 0 1.5rem;
  border-color: rgba(255, 255, 255, .12);
  opacity: 1;
}

/* ==========================================================================
   Error page
   ========================================================================== */

.error-panel {
  max-width: 34rem;
  padding: 3rem 2rem;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.error-code {
  margin-bottom: 0;
  font-size: 4.5rem;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -.05em;
  background: var(--brand-gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.error-stack {
  max-height: 20rem;
  overflow: auto;
  padding: 1rem;
  border-radius: .75rem;
  background: #0d1022;
  color: #e5e7eb;
  font-size: .75rem;
}

/* ==========================================================================
   Tool-specific
   ========================================================================== */

/* EMI calculator: highlighted result card */
.card.emi-result {
  border: 0;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-lg) !important;
}

.emi-result-label {
  color: rgba(255, 255, 255, .92);
}

.emi-result-value {
  letter-spacing: -.04em;
}

.emi-stat {
  padding: .85rem .5rem;
  border-radius: 1rem;
  /* a dark wash (not a light one) so white text keeps its contrast */
  background: rgba(0, 0, 0, .18);
}

/* Highlighted headline result (domain age / expiry) */
.card.result-highlight {
  border: 0;
  background: var(--brand-gradient);
  color: #fff;
  box-shadow: var(--shadow-lg) !important;
}

.card.result-highlight.expiry-soon {
  background: linear-gradient(135deg, #92400e, #9a3412);
}

.card.result-highlight.expiry-expired {
  background: linear-gradient(135deg, #b91c1c, #7f1d1d);
}

.result-highlight-label {
  color: rgba(255, 255, 255, .92);
}

.result-highlight-value {
  letter-spacing: -.04em;
}

.result-chip {
  align-self: center;
  padding: .4rem .9rem;
  border-radius: 999px;
  background: rgba(0, 0, 0, .18);
  font-size: .85rem;
  font-weight: 600;
}

.domain-details th {
  width: 9.5rem;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .85rem;
}

/* DNS lookup table */
.dns-type {
  display: inline-block;
  min-width: 3.4rem;
  padding: .2rem .55rem;
  border-radius: .5rem;
  background: rgba(15, 118, 110, .12);
  color: #0f766e;
  font-weight: 700;
  font-size: .8rem;
  text-align: center;
}

.dns-value code {
  color: var(--ink);
  word-break: break-all;
}

.dns-table th:first-child,
.dns-table td:first-child {
  width: 5.5rem;
  padding-left: 1.25rem;
}

/* empty record types: a neutral badge instead of fading the row (fading broke contrast) */
.dns-empty .dns-type {
  background: #f1f5f9;
  color: #475569;
}

/* Percentage calculator: each form reads as a sentence ("What is [15] % of [200] ?") */
.percent-card {
  scroll-margin-top: 6rem;
}

.percent-sentence {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
}

.percent-word {
  font-weight: 600;
  color: var(--ink-soft);
}

.percent-input {
  width: auto;
  flex: 1 1 7.5rem;
  min-width: 7.5rem;
}

.percent-dir {
  width: auto;
}

.percent-answer {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  background: var(--brand-gradient);
  color: #fff;
}

.percent-answer-value {
  font-size: 1.75rem;
  font-weight: 800;
  letter-spacing: -.03em;
}

.percent-steps code {
  color: #fff;
  background: rgba(0, 0, 0, .18);
  padding: .1rem .4rem;
  border-radius: .4rem;
  white-space: normal;
}

/* JWT decoder */
.jwt-status {
  padding: 1rem 1.25rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: var(--surface);
  font-weight: 600;
}

.jwt-valid { border-color: rgba(4, 120, 87, .35); background: rgba(4, 120, 87, .08); color: #065f46; }
.jwt-expired { border-color: rgba(185, 28, 28, .35); background: rgba(185, 28, 28, .07); color: #991b1b; }
.jwt-future { border-color: rgba(180, 83, 9, .35); background: rgba(180, 83, 9, .07); color: #92400e; }

.jwt-status .small {
  font-weight: 400;
  color: var(--ink-soft);
}

.jwt-json {
  font-size: .85rem;
  white-space: pre-wrap;
  word-break: break-all;
  color: var(--ink);
}

/* Unix timestamp: current time strip */
.now-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem 1.5rem;
  padding: .85rem 1.25rem;
  border-radius: 1rem;
  background: var(--surface);
  border: 1px solid var(--line);
}

.now-strip code {
  font-size: 1rem;
  color: var(--ink);
}

/* QR code generator */
.qr-types {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}

.qr-section {
  margin-bottom: 1rem;
  padding: 1rem;
  border-radius: 1rem;
  border: 1px solid var(--line);
  background: #fbfbfe;
}

.qr-section-title {
  margin-bottom: .6rem;
  font-size: .95rem;
  font-weight: 700;
}

.qr-section-title i {
  color: var(--brand);
}

.qr-image {
  max-width: 100%;
  height: auto;
  border-radius: .75rem;
  border: 1px solid var(--line);
}

/* What's my IP */
.ip-value {
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  letter-spacing: -.02em;
  word-break: break-all;
}

/* EMI calculator schedule */
.schedule-table {
  max-height: 28rem;
  overflow-y: auto;
}

/* JSON viewer tree */
.json-output {
  max-height: 32rem;
  overflow: auto;
}

.json-tree {
  list-style: none;
  margin: 0;
  padding-left: 1.25rem;
}

.json-tree.json-root {
  padding-left: 0;
}

.json-tree summary {
  cursor: pointer;
}

.json-leaf {
  padding-left: 1rem;
}

.json-key { color: #7c3aed; }
.json-string { color: #047857; }
.json-number { color: #2563eb; }
.json-boolean { color: #b45309; }
.json-null { color: var(--ink-soft); font-style: italic; }

/* show the closing bracket inline only when the node is collapsed */
details[open] > summary .json-closed { display: none; }
details > .json-bracket { padding-left: 1rem; }

/* image tools: checkerboard behind the preview so transparency is visible */
.image-preview {
  max-height: 24rem;
  background: repeating-conic-gradient(#e9ecef 0% 25%, #fff 0% 50%) 50% / 20px 20px;
}

.image-thumb {
  max-width: 8rem;
  max-height: 8rem;
}

/* Base64 to PDF preview */
.pdf-preview {
  display: block;
  width: 100%;
  height: 40rem;
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
}
