/* KERTANEXA v15.22 — Public Frontend & Tool UX Polish */
:root {
  --focus-ring: 0 0 0 4px rgba(23, 59, 143, .16);
  --success: #177245;
  --warning: #9a5a00;
}

.skip-link {
  position: fixed;
  z-index: 100;
  top: 10px;
  left: 12px;
  padding: 10px 14px;
  border-radius: 10px;
  background: #fff;
  color: var(--blue);
  font-weight: 800;
  box-shadow: var(--shadow);
  transform: translateY(-160%);
  transition: transform .16s ease;
}
.skip-link:focus { transform: translateY(0); }

:where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(23, 59, 143, .48);
  outline-offset: 3px;
}
.button:focus-visible,
.kx-nav-cta:focus-visible { box-shadow: var(--shadow), var(--focus-ring); }

.kx-nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  padding: 10px;
  border: 1px solid #d6deec;
  border-radius: 13px;
  background: #fff;
  color: var(--blue);
  cursor: pointer;
}
.kx-nav-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  margin: 4px 0;
  border-radius: 99px;
  background: currentColor;
  transition: transform .18s ease, opacity .18s ease;
}
.kx-nav a[aria-current="page"]:not(.kx-nav-cta) { color: var(--ink); }
.kx-nav a[aria-current="page"]:not(.kx-nav-cta)::after {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  margin-top: 3px;
  border-radius: 99px;
  background: var(--blue);
}

.hero-highlights {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
  margin-top: 28px;
  color: #63708a;
  font-size: .88rem;
}
.hero-highlights span { display: inline-flex; align-items: center; gap: 6px; }
.hero-highlights span::before {
  content: "✓";
  display: inline-grid;
  place-items: center;
  width: 21px;
  height: 21px;
  border-radius: 50%;
  background: #eaf5ef;
  color: var(--success);
  font-size: .72rem;
  font-weight: 900;
}
.hero-highlights strong { color: #34425e; }

.tool-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
}
.tool-flow li {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid #dfe5ef;
  border-radius: 15px;
  background: rgba(255,255,255,.78);
  color: #52617c;
  font-size: .82rem;
}
.tool-flow li span {
  display: grid;
  place-items: center;
  flex: 0 0 27px;
  width: 27px;
  height: 27px;
  border-radius: 50%;
  background: var(--blue-light);
  color: var(--blue);
  font-weight: 900;
}
.tool-flow li strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.workspace {
  position: relative;
  overflow: hidden;
}
.workspace::before {
  content: "";
  position: absolute;
  inset: 0 0 auto;
  height: 4px;
  background: linear-gradient(90deg, var(--blue), #6d49b8);
}
.drop-zone {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  border-width: 1.5px;
  background: linear-gradient(145deg, #fbfcff, #f4f7ff);
}
.drop-zone::before {
  content: "↑";
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-bottom: 13px;
  border-radius: 16px;
  background: #e8efff;
  color: var(--blue);
  font-size: 1.45rem;
  font-weight: 850;
  box-shadow: inset 0 0 0 1px rgba(23,59,143,.08);
  transition: transform .18s ease, background .18s ease;
}
.drop-zone::after {
  content: "";
  position: absolute;
  z-index: -1;
  right: -54px;
  bottom: -74px;
  width: 170px;
  height: 170px;
  border-radius: 50%;
  background: rgba(23,59,143,.045);
}
.drop-zone:hover::before,
.drop-zone.dragover::before { transform: translateY(-3px); background: #dce7ff; }
.drop-zone.has-files { border-style: solid; border-color: #9fb7e8; background: #f7faff; }
.drop-zone.has-files::before { content: "✓"; background: #e6f6ec; color: var(--success); }

.file-list:empty { display: none; }
.file-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 15px;
  background: #fbfcff;
}
.file-item > span:first-child,
.file-item > span:last-child { min-width: auto; overflow: visible; white-space: normal; }
.file-item-icon {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--blue-light);
  color: var(--blue);
  font-size: .64rem;
  font-weight: 900;
  letter-spacing: -.02em;
}
.file-item-copy { display: grid; align-content: center; min-width: 0; }
.file-item-copy strong { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: #243553; }
.file-item-copy small { color: #7a8598; font-size: .75rem; }
.file-item-size { align-self: center; color: var(--muted); font-size: .82rem; }

.tool-status {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  margin-top: 16px;
  padding: 13px 15px;
  border: 1px solid #cfdaeb;
  border-radius: 15px;
  background: #f7f9fd;
}
.tool-status[hidden] { display: none; }
.tool-status-indicator {
  width: 13px;
  height: 13px;
  border: 3px solid #9cabc3;
  border-radius: 50%;
}
.tool-status strong { color: #2b3c5d; }
.tool-status p { margin: 2px 0 0; color: #6a768c; font-size: .82rem; }
.tool-status[data-state="ready"] { border-color: #b8cae9; background: #f3f7ff; }
.tool-status[data-state="ready"] .tool-status-indicator { border-color: var(--blue); background: var(--blue); }
.tool-status[data-state="attention"] { border-color: #ead3a2; background: #fffaf0; }
.tool-status[data-state="attention"] .tool-status-indicator { border-color: #c47700; background: #c47700; }
.tool-status[data-state="processing"] { border-color: #b8cae9; background: #f3f7ff; }
.tool-status[data-state="processing"] .tool-status-indicator {
  border-color: #c1cee4;
  border-top-color: var(--blue);
  animation: kx-spin .8s linear infinite;
}
.tool-status[data-state="success"] { border-color: #b8dfc2; background: #f0fff4; }
.tool-status[data-state="success"] .tool-status-indicator { border-color: var(--success); background: var(--success); }
.tool-status[data-state="error"] { border-color: #f2b8b5; background: #fff1f0; }
.tool-status[data-state="error"] .tool-status-indicator { border-color: var(--danger); background: var(--danger); }
@keyframes kx-spin { to { transform: rotate(360deg); } }

.plan-limit-note {
  padding: 11px 13px;
  border-radius: 13px;
  background: #f7f9fd;
  text-align: left;
}

.kx-pricing-guide {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 0 auto 28px;
}
.kx-pricing-guide > div {
  padding: 17px 18px;
  border: 1px solid #dfe5ef;
  border-radius: 17px;
  background: #fff;
}
.kx-pricing-guide span {
  display: block;
  color: var(--blue);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .09em;
  text-transform: uppercase;
}
.kx-pricing-guide strong { display: block; margin-top: 5px; color: #243553; }
.kx-pricing-guide p { margin: 4px 0 0; color: #6b768a; font-size: .83rem; line-height: 1.5; }
.kx-price-card-action .button { width: 100%; }

.footer-wrap-polished {
  position: relative;
  display: grid;
  grid-template-columns: minmax(240px, 1.25fr) minmax(320px, .75fr);
  gap: 38px;
  padding-bottom: 38px;
}
.footer-brand img { width: 170px; }
.footer-brand p { max-width: 440px; margin-top: 12px; line-height: 1.7; }
.footer-links { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px; }
.footer-links > div { display: grid; align-content: start; gap: 7px; }
.footer-links strong { color: var(--ink); margin-bottom: 3px; }
.footer-links a { color: #667085; }
.footer-links a:hover { color: var(--blue); }
.footer-copyright {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  padding-top: 17px;
  border-top: 1px solid #e6eaf1;
}

@media (max-width: 780px) {
  .site-header { overflow: visible; }
  .kx-nav-wrap { position: relative; }
  .kx-nav-toggle { display: block; margin-left: auto; }
  .kx-nav {
    position: absolute;
    z-index: 30;
    top: calc(100% + 10px);
    right: 0;
    left: 0;
    display: none;
    align-items: stretch;
    gap: 4px;
    margin: 0;
    padding: 10px;
    border: 1px solid #dce3ef;
    border-radius: 18px;
    background: rgba(255,255,255,.98);
    box-shadow: 0 22px 55px rgba(20,33,61,.16);
  }
  .site-header.is-menu-open .kx-nav { display: grid; }
  .site-header.is-menu-open .kx-nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
  .site-header.is-menu-open .kx-nav-toggle span:nth-child(2) { opacity: 0; }
  .site-header.is-menu-open .kx-nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }
  .kx-nav a,
  .kx-link-button {
    display: block;
    width: 100%;
    padding: 11px 12px;
    border-radius: 11px;
    text-align: left;
  }
  .kx-nav a:hover,
  .kx-link-button:hover { background: #f1f5fc; }
  .kx-nav a[aria-current="page"]::after { display: none !important; }
  .kx-nav-cta { text-align: center !important; }
  .kx-nav form { width: 100%; }
  .tool-flow { grid-template-columns: 1fr; }
  .tool-flow li { padding: 10px 12px; }
  .tool-flow li strong { white-space: normal; }
  .kx-pricing-guide { grid-template-columns: 1fr; }
  .footer-wrap-polished { grid-template-columns: 1fr; }
}

@media (max-width: 520px) {
  .brand img { width: 150px; }
  .hero-highlights { display: grid; gap: 9px; }
  .tool-page { padding-top: 38px; }
  .tool-heading-visual { gap: 15px; }
  .tool-flow { margin-bottom: 13px; }
  .drop-zone { min-height: 210px; padding: 24px 16px; }
  .file-item { grid-template-columns: auto minmax(0, 1fr); }
  .file-item-size { grid-column: 2; justify-self: start; margin-top: -7px; }
  .tool-status { align-items: start; }
  .conversion-result { padding: 15px; }
  .footer-links { grid-template-columns: 1fr 1fr; gap: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

/* v15.22 compatibility overrides for existing tool and account styles */
.merge-file-item { display: flex; }
@media (max-width: 780px) {
  .kx-nav a:first-child { display: block; }
}
.file-item-name {
  min-width: 0;
  overflow: hidden;
  color: #243553;
  font-weight: 680;
  text-overflow: ellipsis;
  white-space: nowrap;
}
