* {
  box-sizing: border-box;
}

:root {
  --green: #004741;
  --green-dark: #003b36;
  --cream: #f0ede4;
  --cream-light: #f7f5ef;
  --black: #000000;
  --white: #ffffff;
  --muted: #607875;
  --border: rgba(0, 71, 65, 0.18);
}

html {
  scroll-behavior: smooth;
}

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

a {
  text-decoration: none;
  color: inherit;
}

.container {
  width: min(1120px, 92%);
  margin: auto;
}


/* =================================
   BACK TO HOME BUTTON (tool pages)
   ================================= */

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin-bottom: 18px;
  padding: 9px 18px 9px 12px;

  background: var(--white);

  border: 1.5px solid rgba(0, 71, 65, 0.22);
  border-radius: 50px;

  color: var(--green);

  font-size: 14px;
  font-weight: 700;

  box-shadow: 0 3px 10px rgba(0, 71, 65, 0.08);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease,
    border-color 0.2s ease;
}

.back-btn img {
  width: 26px;
  height: 26px;

  display: grid;
  place-items: center;

  padding: 4px;

  background: rgba(0, 71, 65, 0.08);

  border-radius: 50%;

  object-fit: contain;

  transition: background 0.2s ease;
}

.back-btn:hover {
  transform: translateY(-2px);

  background: var(--green);

  border-color: var(--green);

  color: var(--white);

  box-shadow: 0 8px 20px rgba(0, 71, 65, 0.22);
}

.back-btn:hover img {
  background: rgba(255, 255, 255, 0.18);
}


/* =================================
   HEADER
   ================================= */

.site-header {
  position: relative;
  z-index: 100;

  background: var(--green);
  color: var(--white);

  border-bottom: 2px solid var(--black);
}

.nav {
  min-height: 76px;

  display: flex;
  align-items: center;
  justify-content: space-between;
}

.brand {
  display: flex;
  align-items: center;
  gap: 9px;

  color: var(--white);

  font-size: 21px;
  font-weight: 800;
  letter-spacing: -0.04em;
}

.brand span:last-child {
  font-weight: 400;
}

.brand-mark {
  width: 34px;
  height: 34px;

  display: grid;
  place-items: center;

  border: 2px solid var(--white);
  border-radius: 9px;

  font-size: 16px;
}

.nav nav {
  display: flex;
  align-items: center;
  gap: 30px;

  font-size: 13px;
  font-weight: 700;
}

.nav nav a {
  position: relative;
  opacity: 0.85;
  transition: 0.2s ease;
}

.nav nav a:hover {
  opacity: 1;
}

.nav nav a::after {
  content: "";

  position: absolute;

  left: 0;
  right: 0;
  bottom: -8px;

  height: 2px;

  background: var(--white);

  transform: scaleX(0);

  transition: 0.2s ease;
}

.nav nav a:hover::after {
  transform: scaleX(1);
}


/* =================================
   HOMEPAGE HERO
   ================================= */

body:has(.site-header) .hero {
  position: relative;

  min-height: 520px;

  padding: 125px 40px 95px;

  display: flex;
  justify-content: center;
  align-items: center;

  text-align: center;

  background: var(--cream-light);

  border-left: 1px solid var(--border);
  border-right: 1px solid var(--border);

  overflow: visible;
}

.hero-badge {
  position: absolute;

  top: -72px;
  left: 50%;

  transform: translateX(-50%);

  width: 145px;
  height: 145px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: linear-gradient(
    to bottom,
    #004741 0%,
    #3F8580 50%,
    #C0C9C4 100%
  );
  color: var(--black);

  font-size: 20px;
  font-weight: 900;

  letter-spacing: 0.08em;

  border: 3px solid var(--cream);

  box-shadow:
    0 8px 0 rgba(0, 0, 0, 0.10);

  z-index: 200;
}

.hero-copy {
  width: 100%;
  max-width: 850px;
}

body:has(.site-header) .eyebrow {
  margin: 0 0 18px;

  font-size: 11px;
  font-weight: 900;

  letter-spacing: 0.32em;

  color: var(--green);
}

body:has(.site-header) .hero h1 {
  margin: 0;

  font-size: clamp(42px, 5.5vw, 68px);

  line-height: 1;

  letter-spacing: -0.055em;

  color: var(--green);

  font-weight: 900;

  white-space: nowrap;
}

body:has(.site-header) .hero-description {
  max-width: 650px;

  margin: 30px auto 0;

  font-size: 18px;

  line-height: 1.6;

  color: var(--muted);
}


/* =================================
   HOMEPAGE SEARCH
   ================================= */

.search {
  display: block;

  width: min(700px, 100%);

  margin: 34px auto 0;

  padding: 18px 24px;

  border: 2px solid var(--green);

  border-radius: 50px;

  background: var(--white);

  color: var(--green);

  font: inherit;
  font-size: 16px;

  outline: none;

  transition: 0.2s ease;
}

.search::placeholder {
  color: #81918e;
}

.search:focus {
  box-shadow:
    0 0 0 5px rgba(0, 71, 65, 0.10);
}


/* SEARCH CLEAR X */

.search::-webkit-search-cancel-button {
  -webkit-appearance: none;
  appearance: none;

  width: 22px;
  height: 22px;

  margin-right: 4px;

  cursor: pointer;

  background-color: transparent;

  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 6L18 18M18 6L6 18' stroke='%23004741' stroke-width='2.8' stroke-linecap='round'/%3E%3C/svg%3E");

  background-repeat: no-repeat;
  background-position: center;
  background-size: 18px 18px;
}


/* =================================
   HOMEPAGE SEARCH PILL (reference style)
   ================================= */

.search-pill {
  display: flex;
  align-items: center;
  gap: 8px;

  width: min(760px, 100%);

  margin: 32px auto 0;
  padding: 8px 8px 8px 20px;

  border: 1.5px solid var(--green);
  border-radius: 50px;

  background: var(--white);

  transition: 0.2s ease;
}

.search-pill:focus-within {
  box-shadow:
    0 0 0 5px rgba(0, 71, 65, 0.10);
}

.search-pill-icon {
  flex-shrink: 0;

  display: grid;
  place-items: center;

  color: var(--green);
}

.search-pill-input.search {
  flex: 1;

  width: auto;

  margin: 0;
  padding: 12px 8px;

  border: 0;
  border-radius: 0;

  background: transparent;
}

.search-pill-input.search:focus {
  box-shadow: none;
}

.search-pill-btn {
  flex-shrink: 0;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 13px 30px;

  border: 0;
  border-radius: 50px;

  background: var(--green);
  color: var(--white);

  font: inherit;
  font-size: 15px;
  font-weight: 700;

  cursor: pointer;

  transition: 0.2s ease;
}

.search-pill-btn:hover {
  background: var(--green-dark);
}


/* =================================
   HOMEPAGE CATEGORY CARDS
   ================================= */

.cat-grid {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;

  width: min(980px, 100%);

  margin: 38px auto 0;
}

.cat-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;

  padding: 22px 10px 18px;

  background: var(--cream-light);

  border: 1px solid rgba(0, 71, 65, 0.16);
  border-radius: 16px;

  text-align: center;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.cat-card:hover {
  transform: translateY(-4px);

  background: var(--white);

  border-color: var(--green);

  box-shadow:
    0 14px 30px rgba(0, 71, 65, 0.10);
}

.cat-icon {
  width: 52px;
  height: 52px;

  margin-bottom: 10px;

  display: grid;
  place-items: center;

  border-radius: 14px;

  font-size: 22px;
  font-weight: 900;
}

.cat-icon img {
  width: 28px;
  height: 28px;

  display: block;

  object-fit: contain;
}

.cat-blue { background: #e3edff; color: #2b5fd9; }
.cat-red { background: #ffe4e4; color: #d93b3b; }
.cat-green { background: #d9f5e3; color: #1d9e57; }
.cat-purple { background: #ece4ff; color: #7b4fd9; }
.cat-amber { background: #fff1cf; color: #d99a17; }
.cat-grey { background: #e9ecef; color: #5b6b7a; }

.cat-card b {
  font-size: 14.5px;
  letter-spacing: -0.01em;
  color: var(--green);
}

.cat-card span:last-child {
  font-size: 12.5px;
  color: var(--muted);
}


/* =================================
   POPULAR TOOLS
   ================================= */

.popular-section {
  padding-top: 50px;
}

.popular-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;

  margin-bottom: 22px;
}

.popular-head h2 {
  font-size: 28px;
}

.view-all-btn {
  flex-shrink: 0;

  display: inline-flex;
  align-items: center;
  gap: 8px;

  padding: 10px 22px;

  border: 1.5px solid var(--green);
  border-radius: 50px;

  background: transparent;
  color: var(--green);

  font-size: 14px;
  font-weight: 700;

  transition: 0.2s ease;
}

.view-all-btn:hover {
  background: var(--green);
  color: var(--white);
}

.popular-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}

.popular-card {
  display: flex;
  align-items: center;
  gap: 14px;

  padding: 20px;

  background: var(--cream-light);

  border: 1px solid rgba(0, 71, 65, 0.16);
  border-radius: 16px;

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    border-color 0.2s ease,
    background 0.2s ease;
}

.popular-card:hover {
  transform: translateY(-4px);

  background: var(--white);

  border-color: var(--green);

  box-shadow:
    0 14px 30px rgba(0, 71, 65, 0.10);
}

.popular-icon {
  width: 52px;
  height: 52px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  border-radius: 14px;

  font-size: 24px;
  font-weight: 900;
}

.popular-red { background: #ffe4e4; color: #d93b3b; }
.popular-blue { background: #e3edff; color: #2b5fd9; }
.popular-green { background: #d9f5e3; color: #1d9e57; }

.popular-text {
  flex: 1;
  min-width: 0;
}

.popular-text b {
  display: block;

  margin-bottom: 4px;

  font-size: 15.5px;
  color: var(--green);
}

.popular-text span {
  display: block;

  font-size: 13px;
  color: var(--muted);
}

.popular-arrow {
  width: 36px;
  height: 36px;

  flex-shrink: 0;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: rgba(0, 71, 65, 0.08);
  color: var(--green);

  font-size: 16px;
  font-weight: 700;

  transition: 0.2s ease;
}

.popular-card:hover .popular-arrow {
  background: var(--green);
  color: var(--white);
}

.search-note {
  margin: 0 0 18px;

  font-size: 14px;
  color: var(--muted);
}

/* Search results inside hero white box */
#search-results {
  margin-top: 28px;
  padding-top: 24px;

  border-top: 1px solid rgba(0, 71, 65, 0.12);
}

#search-results .tool-grid {
  margin-bottom: 10px;
}


/* =================================
   HOMEPAGE SECTIONS
   ================================= */

[hidden] {
  display: none !important;
}

.tools-section {
  padding: 65px 0 8px;
}

.section-heading {
  display: flex;
  align-items: center;
  gap: 22px;

  margin-bottom: 25px;
}

.section-heading > div {
  flex-shrink: 0;
}

.section-label {
  margin: 0 0 5px;

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.25em;

  color: var(--muted);
}

.tools-section h2 {
  margin: 0;

  font-size: 34px;

  line-height: 0.95;

  letter-spacing: -0.055em;

  color: var(--green);

  font-weight: 900;
}

.section-line {
  width: 100%;
  height: 1px;

  background: rgba(0, 71, 65, 0.20);
}


/* =================================
   TOOL GRID
   ================================= */

.tool-grid {
  display: grid;

  grid-template-columns: repeat(4, 1fr);

  gap: 15px;
}


/* =================================
   TOOL CARD
   ================================= */

.tool-card {
  position: relative;

  display: block;

  min-height: 170px;

  padding: 23px;

  background: var(--cream-light);

  border: 1px solid rgba(0, 71, 65, 0.18);

  border-radius: 17px;

  overflow: hidden;

  transition:
    transform 0.22s ease,
    background 0.22s ease,
    border-color 0.22s ease,
    box-shadow 0.22s ease;
}

.tool-card::before {
  content: "";

  position: absolute;

  top: 0;
  left: 0;

  width: 100%;
  height: 4px;

  background: var(--green);

  transform: scaleX(0);

  transform-origin: left;

  transition: 0.22s ease;
}

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

.tool-card:hover {
  transform: translateY(-5px);

  background: var(--white);

  border-color: var(--green);

  box-shadow:
    0 18px 40px rgba(0, 71, 65, 0.10);
}

.tool-icon {
  width: 45px;
  height: 45px;

  margin-bottom: 22px;

  display: grid;
  place-items: center;

  border-radius: 12px;

  background: var(--green);
  color: var(--white);

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.04em;
}

.tool-card b {
  display: block;

  margin-bottom: 7px;

  font-size: 17px;

  letter-spacing: -0.02em;

  color: var(--green);
}

.tool-card span {
  display: block;

  max-width: 215px;

  color: var(--muted);

  font-size: 13px;

  line-height: 1.5;
}

.tool-card strong {
  position: absolute;

  right: 18px;
  bottom: 18px;

  width: 33px;
  height: 33px;

  display: grid;
  place-items: center;

  border-radius: 50%;

  background: rgba(0, 71, 65, 0.08);

  color: var(--green);

  font-size: 17px;

  transition: 0.2s ease;
}

.tool-card:hover strong {
  background: var(--green);

  color: var(--white);

  transform: translateX(3px);
}


/* =================================
   TOOL PAGES
   ================================= */

/*
   Tool pages do NOT have .site-header.
   Therefore their .hero is completely
   separated from the homepage hero.
*/

body:not(:has(.site-header)) .hero {
  position: static;

  min-height: auto;

  padding: 0 0 55px;

  display: block;

  text-align: center;

  background: transparent;

  border: 0;

  overflow: visible;
}

body:not(:has(.site-header)) .hero-copy {
  width: 100%;

  max-width: none;
}


/* TOOL PAGE LABEL */

body:not(:has(.site-header)) .eyebrow {
  margin: 0 0 12px;

  color: var(--green);

  font-size: 10px;
  font-weight: 900;

  letter-spacing: 0.28em;

  line-height: 1.2;
}


/* TOOL PAGE HEADING */

body:not(:has(.site-header)) .hero h1 {
  margin: 0 0 18px;

  font-size: clamp(42px, 6vw, 68px);

  line-height: 1.02;

  letter-spacing: -0.04em;

  color: var(--green);

  font-weight: 900;

  white-space: normal;

  text-align: center;
}


/* TOOL PAGE DESCRIPTION */

body:not(:has(.site-header)) .hero p:not(.eyebrow) {
  max-width: 850px;

  margin: 0 auto 28px;

  font-size: 18px;

  line-height: 1.6;

  color: var(--muted);

  text-align: center;
}


/* NO HOMEPAGE BLACK CIRCLE */

body:not(:has(.site-header)) .hero-badge {
  display: none;
}


/* =================================
   TOOL PAGE CARD
   ================================= */

body:not(:has(.site-header)) .tool-card {
  background: var(--cream-light);

  border: 1px solid var(--border);

  border-radius: 18px;

  box-shadow:
    0 8px 25px rgba(0, 71, 65, 0.04);
}


/* =================================
   FILE UPLOAD
   ================================= */

body:not(:has(.site-header))
.tool-card
input[type="file"] {
  width: 100%;

  padding: 25px;

  border: 2px dashed rgba(0, 71, 65, 0.28);

  border-radius: 16px;

  background: rgba(255, 255, 255, 0.55);

  color: var(--muted);

  font: inherit;

  font-size: 14px;

  cursor: pointer;

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

body:not(:has(.site-header))
.tool-card
input[type="file"]:hover {
  border-color: var(--green);

  background: var(--white);

  box-shadow:
    0 8px 22px rgba(0, 71, 65, 0.06);
}

body:not(:has(.site-header))
.tool-card
input[type="file"]::file-selector-button {
  margin-right: 14px;

  padding: 11px 18px;

  border: 0;

  border-radius: 10px;

  background: var(--green);

  color: var(--white);

  font: inherit;

  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  transition:
    background 0.18s ease,
    transform 0.18s ease;
}

body:not(:has(.site-header))
.tool-card
input[type="file"]::file-selector-button:hover {
  background: var(--green-dark);

  transform: translateY(-1px);
}


/* =================================
   TOOL PAGE BUTTON
   ================================= */

body:not(:has(.site-header)) .tool-card button {
  margin-top: 16px;

  min-width: 110px;
}


/* =================================
   TOOL HEADER
   ================================= */

.tool-header {
  margin-bottom: 25px;
}

.tool-header h1 {
  font-size: clamp(42px, 6vw, 68px);

  line-height: 1.02;

  margin: 12px 0 18px;

  letter-spacing: -0.04em;

  color: var(--green);
}

.tool-header p {
  margin: 0;

  font-size: 18px;

  color: var(--muted);
}


/* =================================
   FORM
   ================================= */

.form-group {
  margin-bottom: 18px;
}

.form-group label {
  display: block;

  margin-bottom: 8px;

  font-size: 14px;
  font-weight: 700;

  color: var(--green);
}

.form-group input,
.form-group select,
.form-group textarea {
  width: 100%;

  padding: 12px 14px;

  border: 1px solid rgba(0, 71, 65, 0.25);

  border-radius: 10px;

  font: inherit;
  font-size: 16px;

  background: var(--white);

  color: var(--green);

  outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  border-color: var(--green);

  box-shadow:
    0 0 0 3px rgba(0, 71, 65, 0.08);
}


/* =================================
   BUTTON
   ================================= */

.tool-card button {
  background: var(--green);

  color: var(--white);

  font-size: 14px;
  font-weight: 700;

  padding: 12px 18px;

  border-radius: 10px;

  cursor: pointer;

  border: 0;

  transition: 0.18s ease;
}

.tool-card button:hover {
  background: var(--green-dark);

  transform: translateY(-1px);
}

.tool-card button:disabled {
  opacity: 0.55;

  cursor: not-allowed;

  transform: none;
}


/* =================================
   AGE CALCULATOR
   ================================= */

.age-calculator-card {
  max-width: 850px;
}

.date-section {
  margin-bottom: 22px;
}

.date-section > label {
  display: block;

  margin-bottom: 9px;

  font-size: 14px;
  font-weight: 700;

  color: var(--green);
}

.date-selects {
  display: grid;

  grid-template-columns: 1fr 1.5fr 1fr;

  gap: 10px;
}

.date-selects select {
  width: 100%;

  padding: 13px 14px;

  border: 1px solid rgba(0, 71, 65, 0.25);

  border-radius: 10px;

  background: var(--white);

  color: var(--green);

  font: inherit;

  font-size: 15px;

  cursor: pointer;

  outline: none;
}

.date-selects select:focus {
  border-color: var(--green);

  box-shadow:
    0 0 0 3px rgba(0, 71, 65, 0.08);
}

.age-result {
  display: flex;

  gap: 14px;

  flex-wrap: wrap;
}

.age-number {
  flex: 1;

  min-width: 110px;

  padding: 20px 14px;

  border-radius: 12px;

  background: var(--white);

  text-align: center;

  border: 1px solid var(--border);
}

.age-number span {
  display: block;

  font-size: 34px;
  font-weight: 750;

  line-height: 1.1;

  color: var(--green);
}

.age-number small {
  display: block;

  margin-top: 7px;

  font-size: 14px;

  color: var(--muted);
}

.result-box {
  margin-top: 25px;

  padding: 24px;

  border: 1px solid var(--border);

  border-radius: 14px;

  background: var(--cream-light);
}

.result-box h2 {
  margin-top: 0;
  margin-bottom: 20px;

  color: var(--green);
}

.result-box p {
  margin-bottom: 0;

  color: var(--muted);

  line-height: 1.6;
}


/* =================================
   ERROR
   ================================= */

.error-message {
  margin-top: 15px;

  padding: 12px 14px;

  border-radius: 10px;

  background: #f4d9d5;

  color: #76251d;

  font-size: 14px;
}


/* =================================
   TOOL PAGES — center card + title/subtitle
   (fixes left-aligned tool box; home button untouched)
   Tool pages use <main class="container hero">,
   homepage uses <section class="hero"> — so main.hero
   only matches tool pages.
   ================================= */
main.hero > h1,
main.hero > p {
  text-align: center;
}

/* Home button stays left even though parent is centered */
body:not(:has(.site-header)) .hero .back-btn {
  display: flex;
  width: fit-content;
  margin: 0 auto 18px 0;
  text-align: left;
}

.hero .tool-card,
.hero .color-card,
.hero .contrast-card,
.hero .imgpick-card,
.hero .palgen-card,
.hero .grad-card,
.hero .age-calculator-card,
.hero .bg-card {
  margin-left: auto;
  margin-right: auto;
}


/* =================================
   FOOTER
   ================================= */

footer {
  margin-top: 60px;

  padding: 20px 0 16px;

  background: var(--green);

  color: var(--white);

  border-top: 3px solid var(--black);
}

.footer-inner {
  min-height: 0;

  display: flex;

  align-items: center;

  justify-content: space-between;

  gap: 8px 20px;
}

.footer-brand {
  font-size: 16px;

  font-weight: 900;

  letter-spacing: -0.03em;
}

.footer-credit {
  font-size: 13px;

  opacity: 0.95;
}

.heart {
  color: #ff5964;

  font-size: 18px;

  margin: 0 3px;
}

.footer-mark {
  width: 36px;
  height: 36px;

  display: grid;
  place-items: center;

  flex-shrink: 0;

  border: 1px solid rgba(255, 255, 255, 0.65);

  border-radius: 50%;

  font-size: 9px;

  font-weight: 900;
  letter-spacing: 0.08em;
}


/* =================================
   FOOTER TRUST LINKS
   ================================= */

.footer-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 18px;

  width: 100%;
  margin-top: 10px;
  padding-top: 10px;

  border-top: 1px solid rgba(255, 255, 255, 0.22);

  font-size: 13px;
}

.footer-links a {
  color: rgba(255, 255, 255, 0.92);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.footer-links a:hover {
  color: var(--white);
}

.footer-copy {
  width: 100%;
  margin-top: 6px;

  text-align: center;

  font-size: 12px;
  opacity: 0.8;
}

.footer-inner {
  flex-wrap: wrap;
}


/* =================================
   STATIC TRUST PAGES
   ================================= */

.static-page {
  max-width: 780px;
  margin: 40px auto 0;
  padding: 36px 38px;

  background: var(--white);

  border: 1px solid var(--border);
  border-radius: 18px;

  box-shadow: 0 8px 24px rgba(0, 71, 65, 0.06);

  text-align: left;
  line-height: 1.8;
}

.static-page h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 4vw, 38px);
  letter-spacing: -0.03em;
  color: var(--green);
}

.static-page .updated {
  margin: 0 0 20px;
  font-size: 13.5px;
  color: var(--muted);
}

.static-page h2 {
  margin: 26px 0 10px;
  font-size: 20px;
  color: var(--green);
}

.static-page p,
.static-page li {
  font-size: 15.5px;
  color: #33413f;
}

.static-page ul,
.static-page ol {
  padding-left: 24px;
}

.static-page li {
  margin-bottom: 8px;
}

.static-page a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

@media (max-width: 600px) {
  .static-page {
    padding: 26px 22px;
  }
}


/* =================================
   TABLET
   ================================= */

@media (max-width: 900px) {

  .tool-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .nav nav {
    gap: 18px;
  }

  .cat-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .popular-grid {
    grid-template-columns: 1fr;
  }

}


/* =================================
   MOBILE
   ================================= */

@media (max-width: 600px) {

  .container {
    width: 90%;
  }

  .nav {
    min-height: 68px;
  }

  .brand {
    font-size: 17px;
  }

  .brand-mark {
    width: 30px;
    height: 30px;
  }

  .nav nav {
    display: none;
  }


  /* HOMEPAGE */

  body:has(.site-header) .hero {
    min-height: 500px;

    padding: 125px 15px 70px;
  }

  body:has(.site-header) .hero-badge {
    width: 110px;
    height: 110px;

    top: -55px;

    font-size: 16px;
  }

  body:has(.site-header) .hero h1 {
    font-size: 54px;
  }

  body:has(.site-header) .hero-description {
    font-size: 16px;
  }

  .search {
    padding: 16px 19px;
  }

  .search-pill {
    flex-wrap: wrap;

    padding: 10px;

    border-radius: 22px;
  }

  .search-pill-btn {
    width: 100%;
    justify-content: center;
  }

  .cat-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .popular-head {
    flex-direction: column;
    align-items: flex-start;
  }

  .tools-section {
    padding-top: 48px;
  }

  .tool-grid {
    grid-template-columns: 1fr;
  }

  .section-heading {
    gap: 14px;
  }

  .tools-section h2 {
    font-size: 28px;
  }

  .tool-card {
    min-height: 150px;
  }


  /* TOOL PAGES */

  body:not(:has(.site-header)) .hero {
    padding: 0 0 45px;
  }

  body:not(:has(.site-header)) .back-link {
    margin-top: 20px;

    margin-bottom: 20px;

    padding: 10px 16px 10px 13px;

    font-size: 13px;
  }

  body:not(:has(.site-header)) .hero h1 {
    font-size: 42px;

    line-height: 1.02;

    white-space: normal;

    text-align: center;
  }

  body:not(:has(.site-header)) .hero p:not(.eyebrow) {
    font-size: 16px;

    text-align: center;
  }

  body:not(:has(.site-header))
  .tool-card
  input[type="file"] {
    padding: 20px;
  }

  .date-selects {
    grid-template-columns: 1fr;
  }

  .age-result {
    flex-direction: column;
  }

  .age-number {
    min-width: 100%;
  }

  .result-box {
    padding: 18px;
  }

  .footer-inner {
    flex-direction: column;

    text-align: center;
  }

}


/* =================================
   SMALL MOBILE
   ================================= */

@media (max-width: 400px) {

  body:has(.site-header) .hero h1 {
    font-size: 45px;
  }

  body:has(.site-header) .hero-badge {
    width: 100px;
    height: 100px;

    top: -50px;
  }

  .footer-mark {
    display: none;
  }

}
/* =================================
   TOOL PAGE FINAL POLISH
   ================================= */

/* Proper top spacing for all tool pages */
body:not(:has(.site-header)) .hero {
  padding-top: 42px;
  padding-bottom: 65px;
}

/* Modern Home button */
body:not(:has(.site-header)) .back-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;

  margin-top: 0;
  margin-bottom: 22px;

  padding: 11px 17px 11px 14px;

  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 12px;

  background:
    linear-gradient(
      135deg,
      rgba(0, 71, 65, 0.96),
      rgba(0, 59, 54, 0.92)
    );

  color: #ffffff;

  font-size: 14px;
  font-weight: 700;

  box-shadow:
    0 8px 22px rgba(0, 71, 65, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.18);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    background 0.2s ease;
}

body:not(:has(.site-header)) .back-link:hover {
  transform: translateX(-3px) translateY(-1px);

  background:
    linear-gradient(
      135deg,
      #00544d,
      #003b36
    );

  box-shadow:
    0 12px 28px rgba(0, 71, 65, 0.25),
    inset 0 1px 0 rgba(255, 255, 255, 0.22);
}

body:not(:has(.site-header)) .back-link:active {
  transform: translateX(-1px) scale(0.98);
}


/* =================================
   TOOL PAGE GLASS CARD
   ================================= */

body:not(:has(.site-header)) .tool-card {
  background:
    linear-gradient(
      135deg,
      rgba(255, 255, 255, 0.62),
      rgba(247, 245, 239, 0.42)
    );

  border: 1px solid rgba(255, 255, 255, 0.75);

  box-shadow:
    0 18px 45px rgba(0, 71, 65, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.75);

  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}


/* =================================
   GLASS WIDTH / HEIGHT INPUTS
   ================================= */

body:not(:has(.site-header))
.tool-card input:not([type="file"]),
body:not(:has(.site-header))
.tool-card select,
body:not(:has(.site-header))
.tool-card textarea {
  appearance: none;
  -webkit-appearance: none;

  width: 100%;

  padding: 13px 15px;

  border: 1px solid rgba(0, 71, 65, 0.18);

  border-radius: 12px;

  background:
    rgba(255, 255, 255, 0.58);

  color: var(--green);

  font: inherit;
  font-size: 15px;

  outline: none;

  box-shadow:
    inset 0 1px 2px rgba(255, 255, 255, 0.7),
    0 4px 14px rgba(0, 71, 65, 0.04);

  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease,
    transform 0.2s ease;
}

body:not(:has(.site-header))
.tool-card input:not([type="file"]):hover,
body:not(:has(.site-header))
.tool-card select:hover,
body:not(:has(.site-header))
.tool-card textarea:hover {
  background: rgba(255, 255, 255, 0.78);

  border-color: rgba(0, 71, 65, 0.30);
}

body:not(:has(.site-header))
.tool-card input:not([type="file"]):focus,
body:not(:has(.site-header))
.tool-card select:focus,
body:not(:has(.site-header))
.tool-card textarea:focus {
  background: rgba(255, 255, 255, 0.88);

  border-color: var(--green);

  box-shadow:
    0 0 0 4px rgba(0, 71, 65, 0.08),
    0 8px 22px rgba(0, 71, 65, 0.08);
}


/* =================================
   WIDTH / HEIGHT GROUP
   ================================= */

body:not(:has(.site-header))
.tool-card .form-group {
  margin-bottom: 18px;
}

body:not(:has(.site-header))
.tool-card .form-group label {
  margin-bottom: 8px;

  color: var(--green);

  font-size: 13px;
  font-weight: 800;
}


/* =================================
   GLASS FILE UPLOAD
   ================================= */

body:not(:has(.site-header))
.tool-card input[type="file"] {
  width: 100%;

  padding: 24px;

  border: 2px dashed rgba(0, 71, 65, 0.24);

  border-radius: 16px;

  background:
    rgba(255, 255, 255, 0.45);

  color: var(--muted);

  font: inherit;
  font-size: 14px;

  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);

  transition:
    border-color 0.2s ease,
    background 0.2s ease,
    box-shadow 0.2s ease;
}

body:not(:has(.site-header))
.tool-card input[type="file"]:hover {
  border-color: var(--green);

  background:
    rgba(255, 255, 255, 0.70);

  box-shadow:
    0 10px 28px rgba(0, 71, 65, 0.07);
}

body:not(:has(.site-header))
.tool-card input[type="file"]::file-selector-button {
  margin-right: 14px;

  padding: 11px 18px;

  border: 0;

  border-radius: 10px;

  background: var(--green);

  color: var(--white);

  font: inherit;
  font-size: 14px;
  font-weight: 700;

  cursor: pointer;

  box-shadow:
    0 5px 14px rgba(0, 71, 65, 0.18);

  transition:
    transform 0.18s ease,
    background 0.18s ease;
}

body:not(:has(.site-header))
.tool-card input[type="file"]::file-selector-button:hover {
  background: var(--green-dark);

  transform: translateY(-1px);
}


/* =================================
   TOOL BUTTON
   ================================= */

body:not(:has(.site-header)) .tool-card button {
  margin-top: 16px;

  min-width: 115px;

  padding: 12px 20px;

  border: 0;

  border-radius: 11px;

  background: var(--green);

  color: var(--white);

  font-size: 14px;
  font-weight: 800;

  box-shadow:
    0 7px 18px rgba(0, 71, 65, 0.18);

  transition:
    transform 0.18s ease,
    box-shadow 0.18s ease,
    background 0.18s ease;
}

body:not(:has(.site-header)) .tool-card button:hover {
  background: var(--green-dark);

  transform: translateY(-2px);

  box-shadow:
    0 11px 24px rgba(0, 71, 65, 0.24);
}


/* =================================
   MOBILE
   ================================= */

@media (max-width: 600px) {

  body:not(:has(.site-header)) .hero {
    padding-top: 28px;
    padding-bottom: 45px;
  }

  body:not(:has(.site-header)) .back-link {
    margin-bottom: 18px;

    padding: 10px 15px 10px 13px;
  }

  body:not(:has(.site-header)) .tool-card {
    padding: 18px;
  }

  body:not(:has(.site-header))
  .tool-card input[type="file"] {
    padding: 19px;
  }

}

/* =================================
   HOMEPAGE FINAL FIX
   ================================= */

/* Keep homepage title on ONE line */
body:has(.site-header) .hero h1 {
  width: 100%;
  max-width: none;

  font-size: clamp(38px, 4.8vw, 62px);

  line-height: 1;

  white-space: nowrap;

  letter-spacing: -0.055em;
}


/* Keep description centered */
body:has(.site-header) .hero-description {
  margin-left: auto;
  margin-right: auto;
}


/* =================================
   SEO CONTENT SECTIONS (tool pages)
   ================================= */

.seo-content {
  max-width: 760px;
  margin: 34px auto 0;
  padding: 30px 30px 26px;
  text-align: left;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 16px;
  box-shadow: 0 8px 24px rgba(0, 71, 65, 0.06);
}

.seo-content h2 {
  margin: 28px 0 12px;
  font-size: 22px;
  line-height: 1.3;
  letter-spacing: -0.02em;
  color: var(--green);
}

.seo-content h2:first-child {
  margin-top: 0;
}

.seo-content h3 {
  margin: 18px 0 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--green-dark);
}

/* Tool-internal titles demoted from h2 for SEO hierarchy (same look) */
.emi-result-title,
.gst-result-title {
  margin: 0 0 16px;
  font-size: 21px;
  font-weight: 800;
  color: var(--green);
}

.percentage-result-title {
  margin: 0 0 14px;
  font-size: 18px;
  font-weight: 800;
  color: var(--green);
}

.seo-content p {
  margin: 0 0 14px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #33413f;
}

.seo-content ol,
.seo-content ul {
  margin: 0 0 16px;
  padding-left: 24px;
  font-size: 15.5px;
  line-height: 1.75;
  color: #33413f;
}

.seo-content li {
  margin-bottom: 8px;
}

.seo-content li::marker {
  color: var(--green);
  font-weight: 700;
}

.related-tools {
  max-width: 760px;
  margin: 22px auto 0;
  padding: 24px 30px;
  text-align: left;
  background: var(--cream-light);
  border: 1px solid var(--border);
  border-radius: 16px;
}

.related-tools h2 {
  margin: 0 0 12px;
  font-size: 19px;
  color: var(--green);
}

.related-tools ul {
  margin: 0;
  padding-left: 22px;
  font-size: 15.5px;
  line-height: 2;
}

.related-tools a {
  color: var(--green);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.related-tools a:hover {
  color: var(--green-dark);
}

@media (max-width: 600px) {
  .seo-content,
  .related-tools {
    padding-left: 20px;
    padding-right: 20px;
  }

  .seo-content h2 {
    font-size: 19px;
  }
}



/* =================================
   MOBILE
   ================================= */

@media (max-width: 600px) {

  body:has(.site-header) .hero {
    min-height: 500px;

    padding-top: 155px;
  }

  body:has(.site-header) .hero-badge {
    top: 12px;

    width: 105px;
    height: 105px;

    font-size: 15px;
  }

  body:has(.site-header) .hero h1 {
    font-size: 44px;

    white-space: normal;
  }

}

/* =================================
   TOOL TITLE/SUBTITLE — force center (last rule wins)
   ================================= */
body:not(:has(.site-header)) main.container.hero > h1,
body:not(:has(.site-header)) main.container.hero > p {
  text-align: center !important;
}

/* =================================
   CONVERT STATUS (compress pages) - wrap long lines
   ================================= */
pre#status {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  word-break: break-word;
  font-family: inherit;
}
pre#status > div {
  white-space: normal;
}

/* =================================
   FILE META (original size + suggested target)
   ================================= */
.file-meta {
  margin-top: 8px;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--green);
}
.file-meta .suggest-btn {
  border: 1px solid rgba(0, 71, 65, 0.3);
  border-radius: 50px;
  background: #fff;
  color: var(--green);
  font: inherit;
  font-size: 12.5px;
  font-weight: 700;
  padding: 4px 12px;
  margin-left: 8px;
  cursor: pointer;
}

/* =================================
   MERGE PDF — file queue GRID (square cards, horizontal)
   ================================= */
.merge-file-list {
  margin-top: 14px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

.merge-file-empty {
  grid-column: 1 / -1;
  padding: 16px;
  border: 1.5px dashed rgba(0, 71, 65, 0.30);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.45);
  color: var(--muted);
  font-size: 14px;
  text-align: center;
}

.merge-file-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  padding: 30px 10px 12px;
  aspect-ratio: 1 / 1;
  border: 1px solid rgba(0, 71, 65, 0.18);
  border-radius: 16px;
  background: var(--cream-light);
  cursor: grab;
  overflow: hidden;
  user-select: none;
  -webkit-user-select: none;
  touch-action: pan-y;
  transition: border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.merge-file-item:hover {
  border-color: var(--green);
  background: var(--white);
  transform: translateY(-3px);
  box-shadow: 0 12px 26px rgba(0, 71, 65, 0.10);
}

.merge-file-item.dragging {
  opacity: 0.55;
  cursor: grabbing;
  transform: scale(1.03);
}

.merge-file-item.drag-over {
  border-color: var(--green);
  border-style: dashed;
  background: rgba(0, 71, 65, 0.06);
}

.merge-file-item.drag-below {
  box-shadow: inset 0 -4px 0 var(--green), 0 12px 26px rgba(0, 71, 65, 0.10);
}

.merge-file-item.drag-right {
  box-shadow: inset -4px 0 0 var(--green), 0 12px 26px rgba(0, 71, 65, 0.10);
}

.merge-file-num {
  position: absolute;
  top: 8px;
  left: 8px;
  min-width: 26px;
  height: 26px;
  padding: 0 6px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: var(--white);
  font-size: 13px;
  font-weight: 800;
  flex-shrink: 0;
}

.merge-file-icon {
  display: grid;
  place-items: center;
  flex-shrink: 0;
  margin-bottom: 2px;
}

.merge-file-icon svg {
  width: 44px;
  height: 44px;
}

.merge-file-meta {
  width: 100%;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
}

.merge-file-name {
  width: 100%;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.merge-file-size {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.merge-file-actions {
  position: absolute;
  top: 6px;
  right: 6px;
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
}

body:not(:has(.site-header)) .tool-card .merge-remove-btn {
  margin-top: 0;
  min-width: 0;
  width: 26px;
  height: 26px;
  padding: 0;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 800;
  line-height: 1;
  box-shadow: none;
  display: grid;
  place-items: center;
}

.merge-file-actions .merge-remove-btn {
  background: rgba(225, 29, 72, 0.10);
  color: #e11d48;
}

.merge-file-actions .merge-remove-btn:hover {
  background: #e11d48;
  color: #fff;
  transform: none;
}

@media (max-width: 600px) {
  .merge-file-list {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
  .merge-file-item {
    padding: 28px 6px 10px;
    border-radius: 14px;
  }
  .merge-file-icon svg {
    width: 36px;
    height: 36px;
  }
  .merge-file-name {
    font-size: 11.5px;
  }
  .merge-file-size {
    font-size: 11px;
  }
}
