:root {
  --pj-red: #c4382f;
  --pj-red-deep: #8f241f;
  --pj-amber: #f5c361;
  --pj-amber-soft: #fff2d6;
  --pj-teal: #1781a1;
  --pj-teal-deep: #0f566b;
  --pj-ink: #1f2937;
  --pj-muted: #64748b;
  --pj-cream: #fffaf0;
  --pj-card: rgba(255, 255, 255, 0.88);
  --pj-border: rgba(191, 173, 131, 0.35);
}

body.tool-page {
  font-family: "Trebuchet MS", "Gill Sans", "Segoe UI", sans-serif;
  color: var(--pj-ink);
  background:
    radial-gradient(circle at top left, rgba(245, 195, 97, 0.18), transparent 30%),
    radial-gradient(circle at top right, rgba(23, 129, 161, 0.12), transparent 28%),
    linear-gradient(180deg, #fffef9 0%, #fff7e9 44%, #ffffff 100%);
}

.tool-page-shell {
  position: relative;
  overflow-x: hidden;
}

.tool-page-shell::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: min(30rem, 55vw);
  height: 24rem;
  background: radial-gradient(circle, rgba(245, 195, 97, 0.22), rgba(245, 195, 97, 0));
  pointer-events: none;
}

.tool-page-shell::after {
  content: "";
  position: absolute;
  top: 5rem;
  right: -6rem;
  width: 18rem;
  height: 18rem;
  border-radius: 9999px;
  background:
    repeating-conic-gradient(from 0deg,
      rgba(196, 56, 47, 0.10) 0deg 12deg,
      rgba(196, 56, 47, 0.02) 12deg 24deg);
  opacity: 0.8;
  pointer-events: none;
}

.tool-header {
  background: rgba(255, 250, 240, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(191, 173, 131, 0.35);
  box-shadow: 0 10px 28px rgba(31, 41, 55, 0.05);
}

.tool-shell {
  position: relative;
  z-index: 1;
}

.tool-sidebar {
  background:
    linear-gradient(180deg, rgba(255, 250, 240, 0.97), rgba(255, 255, 255, 0.95));
  border-right: 1px solid rgba(191, 173, 131, 0.3);
  box-shadow: 18px 0 48px rgba(143, 36, 31, 0.05);
}

.tool-sidebar-header {
  border-bottom: 1px solid rgba(191, 173, 131, 0.28);
}

.tool-sidebar-card {
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid rgba(191, 173, 131, 0.28);
  box-shadow: 0 14px 36px rgba(15, 86, 107, 0.06);
}

.tool-nav-link {
  color: #475569;
  border: 1px solid transparent;
  transition: transform 160ms ease, background-color 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tool-nav-link:hover {
  color: var(--pj-red-deep);
  background: rgba(255, 242, 214, 0.75);
  border-color: rgba(245, 195, 97, 0.32);
  transform: translateX(2px);
}

.tool-nav-icon {
  background: rgba(255, 255, 255, 0.68);
  border: 1px solid rgba(191, 173, 131, 0.18);
}

.tool-main {
  position: relative;
  z-index: 1;
}

.tool-hero {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(245, 195, 97, 0.35);
  background:
    radial-gradient(circle at 18% 18%, rgba(245, 195, 97, 0.34), transparent 26%),
    radial-gradient(circle at 82% 12%, rgba(23, 129, 161, 0.12), transparent 24%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.93), rgba(255, 246, 224, 0.96));
  box-shadow: 0 24px 70px rgba(143, 36, 31, 0.08);
}

body.tool-page .tool-hero {
  border-width: 2px;
}

.tool-hero::after {
  content: "";
  position: absolute;
  bottom: -4rem;
  right: -2rem;
  width: 12rem;
  height: 12rem;
  border-radius: 9999px;
  background:
    repeating-conic-gradient(from 0deg,
      rgba(245, 195, 97, 0.18) 0deg 12deg,
      rgba(245, 195, 97, 0.04) 12deg 24deg);
}

.tool-panel {
  border: 1px solid rgba(191, 173, 131, 0.3);
  background: var(--pj-card);
  box-shadow: 0 20px 55px rgba(15, 86, 107, 0.06);
}

body.tool-page .tool-panel {
  border-width: 2px;
}

.tool-panel-header {
  border-bottom: 1px solid rgba(191, 173, 131, 0.2);
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.92), rgba(255, 255, 255, 0.85));
}

.tool-subhead {
  color: var(--pj-red-deep);
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tool-input,
.tool-select,
.tool-button {
  border: 1px solid rgba(191, 173, 131, 0.35);
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 8px 20px rgba(31, 41, 55, 0.04);
}

.tool-input:focus,
.tool-select:focus,
.tool-button:focus {
  outline: none;
  border-color: rgba(23, 129, 161, 0.5);
  box-shadow: 0 0 0 3px rgba(23, 129, 161, 0.12);
}

.tool-button {
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tool-button:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 129, 161, 0.35);
}

body.tool-page .tool-button {
  background: linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 242, 214, 0.92));
  color: var(--pj-red-deep);
  font-weight: 700;
}

body.tool-page .tool-button:hover {
  background: linear-gradient(180deg, rgba(255, 247, 233, 1), rgba(245, 195, 97, 0.22));
}

body.tool-page .tool-panel-header {
  background:
    radial-gradient(circle at top left, rgba(245, 195, 97, 0.18), transparent 30%),
    linear-gradient(180deg, rgba(255, 250, 240, 0.98), rgba(255, 255, 255, 0.9));
}

body.tool-page .tool-muted-card {
  background:
    radial-gradient(circle at top left, rgba(245, 195, 97, 0.14), transparent 28%),
    rgba(255, 250, 240, 0.84);
}

.tool-table thead {
  background: rgba(255, 247, 233, 0.95);
}

.tool-table thead th {
  color: #7c2d12;
}

.tool-table tbody tr:hover {
  background: rgba(255, 250, 240, 0.9);
}

.tool-muted-card {
  border: 1px solid rgba(191, 173, 131, 0.28);
  background: rgba(255, 250, 240, 0.78);
}

.tool-link-button {
  border: 1px solid rgba(191, 173, 131, 0.35);
  background: rgba(255, 255, 255, 0.88);
  transition: transform 160ms ease, border-color 160ms ease, color 160ms ease;
}

.tool-link-button:hover {
  transform: translateY(-1px);
  border-color: rgba(23, 129, 161, 0.35);
  color: var(--pj-teal-deep);
}
