/* ============================================================
   Photo Date Changer — Mailchimp-inspired brand styles
   Display serif (Fraunces) + clean sans (Inter), Cavendish
   yellow accents, warm peppercorn ink, generous whitespace.
   ============================================================ */
:root {
  --bg: #ffffff;
  --cream: #fff7e0;
  --cream-deep: #ffefc2;
  --yellow: #ffe01b;
  --yellow-deep: #f4d000;
  --ink: #241c15;
  --ink-2: #5c5349;
  --teal: #007c89;
  --teal-dark: #016570;
  --line: #ece6da;
  --surface: #ffffff;
  --warn-bg: #fff1d6;
  --warn-ink: #8a5a00;
  --radius: 16px;
  --shadow: 0 2px 4px rgba(36,28,21,.04), 0 10px 30px rgba(36,28,21,.07);
  --shadow-hard: 4px 4px 0 var(--ink);
  --maxw: 1120px;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: "Fraunces", Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--sans);
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.12; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(2.1rem, 5vw, 3.4rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin: 0 0 .5em; }
h3 { font-size: 1.25rem; }

.container { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
.narrow { max-width: 660px; }
.section { padding: 56px 24px; }
.muted { color: var(--ink-2); }

/* ---- header ---- */
.site-header { background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 50; }
.header-inner { display: flex; align-items: center; justify-content: space-between; height: 70px; }
.brand { font-family: var(--serif); font-weight: 700; font-size: 1.3rem; color: var(--ink); display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.brand:hover { text-decoration: none; }
.main-nav { display: flex; align-items: center; gap: 18px; white-space: nowrap; }

/* header search — one clean pill with the icon inside the border */
.nav-search { display: flex; align-items: center; flex: 1 1 180px; max-width: 300px; margin: 0 20px;
  background: #fff; border: 1.5px solid var(--line); border-radius: 999px; overflow: hidden; }
.nav-search:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,124,137,.12); }
.nav-search input { flex: 1; min-width: 0; border: 0; background: transparent; padding: 8px 4px 8px 16px;
  font: inherit; font-size: .9rem; -webkit-appearance: none; appearance: none; }
.nav-search input:focus { outline: none; }
.nav-search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.nav-search button { border: 0; background: transparent; padding: 6px 12px 6px 8px; cursor: pointer;
  font-size: 1rem; line-height: 1; color: var(--ink-2); }
.nav-search button:hover { color: var(--teal); }
@media (max-width: 760px) { .nav-search { display: none; } }
.main-nav > a:not(.btn) { color: var(--ink); font-weight: 500; font-size: .96rem; }
.main-nav > a:not(.btn):hover { color: var(--teal); text-decoration: none; }
/* header "buy me a coffee" — the nav is already full, so it's the cup alone.
   The title attribute and the footer/About links carry the label. */
.nav-coffee { gap: 6px; white-space: nowrap; padding: 8px 12px; font-size: 1rem; }
.nav-coffee span { display: none; }
.inline-form { display: inline; margin: 0; }
.link-btn { background: none; border: 0; color: var(--ink); font: inherit; cursor: pointer; padding: 0; }
.link-btn:hover { color: var(--teal); }

/* dropdown */
.dropdown { position: relative; }
.dropdown-toggle { background: none; border: 0; font: inherit; font-weight: 500; font-size: .96rem; cursor: pointer; color: var(--ink); }
.dropdown-menu {
  position: absolute; top: 100%; right: 0; left: auto; background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px 24px;
  /* Masonry-pack the category groups into columns so the menu stays short and
     never runs off the bottom/right of the window. */
  column-count: 3; column-gap: 26px; width: 720px; max-width: 94vw;
  max-height: 80vh; overflow-y: auto;
  /* Hidden via visibility (not display) so we can keep it open for a grace
     period after the cursor leaves — no more vanishing mid-reach. top:100%
     means it touches the button, so there's no gap to cross. */
  visibility: hidden; opacity: 0;
  transition: opacity .15s ease .25s, visibility 0s linear .4s;
}
.dropdown:hover .dropdown-menu, .dropdown:focus-within .dropdown-menu {
  visibility: visible; opacity: 1;
  transition: opacity .12s ease 0s, visibility 0s linear 0s;
}
.dropdown-group { break-inside: avoid; margin-bottom: 16px; }
.dropdown-group-title { display: block; font-size: .7rem; text-transform: uppercase; letter-spacing: .07em; color: var(--ink-2); margin-bottom: 8px; font-weight: 700; }
.dropdown-group a { display: block; color: var(--ink); padding: 5px 0; font-size: .92rem; white-space: nowrap; }
.dropdown-group a:hover { color: var(--teal); text-decoration: none; }

/* ---- buttons ---- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--ink); color: #fff; border: 2px solid var(--ink); border-radius: 10px;
  padding: 11px 20px; font-family: var(--sans); font-weight: 600; font-size: .98rem; cursor: pointer;
  text-align: center; transition: transform .12s ease, box-shadow .12s ease, background .12s;
}
.btn:hover { color: #fff; text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-hard); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; box-shadow: none; }
.btn-large { padding: 16px 30px; font-size: 1.08rem; }
.btn-small { padding: 8px 16px; font-size: .9rem; }
.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--cream); color: var(--ink); }
.btn-yellow { background: var(--yellow); border-color: var(--ink); color: var(--ink); }
.btn-yellow:hover { background: var(--yellow-deep); color: var(--ink); }

/* ---- hero ---- */
.hero { background: var(--cream); border-bottom: 3px solid var(--ink); padding: 80px 24px 70px; }
.hero .container { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.hero-copy h1 { letter-spacing: -.02em; }
.hero-copy .lede { margin-left: 0; }
.lede { font-size: 1.28rem; color: var(--ink-2); max-width: 640px; margin: 0 0 30px; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }
.trust-badges { margin-top: 26px; color: var(--ink-2); font-size: .94rem; }
.hero-art { display: flex; justify-content: center; }
.hero-card {
  background: #fff; border: 3px solid var(--ink); border-radius: 22px; box-shadow: 10px 10px 0 var(--ink);
  padding: 26px; width: 100%; max-width: 360px; transform: rotate(-2deg);
}
.hero-card .hc-photo { background: linear-gradient(135deg, #ffe9a8, #ffd06b); border-radius: 12px; height: 150px; display: flex; align-items: center; justify-content: center; font-size: 3.4rem; }
.hero-card .hc-row { display: flex; justify-content: space-between; align-items: center; margin-top: 16px; font-size: .9rem; }
.hero-card .hc-old { color: #b42318; text-decoration: line-through; }
.hero-card .hc-new { color: var(--teal); font-weight: 700; }
.hero-card .hc-tag { display: inline-block; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px; padding: 3px 12px; font-size: .78rem; font-weight: 700; margin-top: 14px; }

/* ---- section intro ---- */
.section-head { text-align: center; max-width: 640px; margin: 0 auto 36px; }
.section-head .lede { margin: 0 auto; }
.eyebrow { display: inline-block; font-family: var(--sans); font-weight: 700; font-size: .78rem; letter-spacing: .09em; text-transform: uppercase; color: var(--teal); margin-bottom: 10px; }

/* ---- tool grid ---- */
.tool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 18px; margin: 22px 0 8px; }
.tool-card {
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 24px; display: flex; flex-direction: column; gap: 7px; color: var(--ink);
  transition: transform .14s, box-shadow .14s;
}
.tool-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hard); text-decoration: none; }
.tool-icon { font-size: 1.9rem; }
.tool-name { font-family: var(--serif); font-weight: 600; font-size: 1.18rem; }
.tool-tagline { color: var(--ink-2); font-size: .92rem; line-height: 1.5; }
.tool-card.compact { padding: 18px; border-width: 1.5px; }
.tool-card.compact:hover { box-shadow: var(--shadow); }

/* ---- project cards (About page) ----
   Wide two-up cards: icon on the left, one-line pitch, then feature pills —
   so nothing has to be read as a wall of text in a narrow column. */
.page-head { max-width: 72ch; margin-bottom: 8px; }
.page-head .lede { margin: 0; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 20px; margin: 26px 0 8px; }
.proj-card {
  display: grid; grid-template-columns: auto 1fr; gap: 18px; align-items: start;
  background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius);
  padding: 24px 26px; color: var(--ink);
  transition: transform .14s, box-shadow .14s, background .14s;
}
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-hard); text-decoration: none; }
.proj-icon {
  display: flex; align-items: center; justify-content: center; width: 54px; height: 54px;
  background: var(--cream); border: 2px solid var(--ink); border-radius: 14px; font-size: 1.6rem;
}
.proj-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.proj-name { font-family: var(--serif); font-weight: 600; font-size: 1.3rem; line-height: 1.2; }
.proj-host { font-size: .82rem; color: var(--teal); font-weight: 600; }
.proj-badge {
  border-radius: 999px; padding: 2px 10px; font-size: .68rem; font-weight: 700;
  text-transform: uppercase; letter-spacing: .06em; border: 1.5px solid var(--ink);
}
.proj-badge.free { background: var(--yellow); color: var(--ink); }
.proj-badge.paid { background: var(--surface); color: var(--ink-2); border-color: var(--line); }
.proj-desc { color: var(--ink-2); font-size: .96rem; line-height: 1.55; margin: 0 0 12px; }
.proj-tags { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.proj-tags li {
  background: var(--cream); border: 1px solid var(--line); border-radius: 999px;
  padding: 3px 11px; font-size: .78rem; font-weight: 600; color: var(--ink-2);
}
.proj-card:hover .proj-icon { background: var(--yellow); }
@media (max-width: 520px) {
  .proj-card { grid-template-columns: 1fr; gap: 14px; padding: 22px; }
}
.cat-title { margin-top: 38px; color: var(--ink); font-family: var(--serif); font-size: 1.45rem; }

/* ---- bands / features ---- */
.band { background: var(--ink); color: #fff; padding: 64px 24px; margin-top: 60px; }
.band h2, .band h3 { color: #fff; }
.band .section-head { margin-bottom: 40px; }
.feature-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 30px; }
.feature { text-align: left; }
.feature-icon { display: inline-flex; width: 56px; height: 56px; align-items: center; justify-content: center; font-size: 1.7rem; background: var(--yellow); border-radius: 14px; margin-bottom: 14px; }
.feature h3 { margin: 0 0 6px; }
.feature p { color: #d9d2c8; margin: 0; }

/* ---- popular searches (SEO internal links) ---- */
.searches { background: var(--cream); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 56px 24px; }
.search-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 20px; }
.search-chips a {
  display: inline-block; background: #fff; border: 1.5px solid var(--ink); border-radius: 999px;
  padding: 8px 16px; font-size: .92rem; color: var(--ink); font-weight: 500;
}
.search-chips a:hover { background: var(--yellow); text-decoration: none; }

/* ---- CTA band ---- */
.cta-band { background: var(--yellow); border-top: 3px solid var(--ink); border-bottom: 3px solid var(--ink); padding: 64px 24px; text-align: center; }
.cta-band h2 { margin-bottom: 18px; }

/* ---- tool page layout ---- */
.tool-layout { display: grid; grid-template-columns: 1fr 300px; gap: 44px; padding: 40px 24px 70px; }
.breadcrumb { color: var(--ink-2); font-size: .86rem; margin-bottom: 18px; }
.breadcrumb a { color: var(--ink-2); }
.tool-header h1 { font-size: clamp(1.9rem, 4vw, 2.7rem); margin: 0 0 10px; }
.tool-header .tool-icon { font-size: 1em; }
.tool-sidebar { display: flex; flex-direction: column; gap: 20px; }
.sidebar-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 22px; }
.sidebar-card h3 { margin-top: 0; }
.sidebar-card.highlight { background: var(--cream); }
.sidebar-links { list-style: none; margin: 10px 0 0; padding: 0; }
.sidebar-links li { margin: 8px 0; }
.prose { max-width: 72ch; margin-top: 36px; font-size: 1.05rem; }
.prose h2 { margin-top: 40px; }
.prose h3 { margin-top: 26px; font-size: 1.18rem; }
.prose p { margin: 0 0 1.1em; }

/* ---- forms / cards ---- */
.card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.form label { display: block; margin-bottom: 16px; font-weight: 600; font-size: .94rem; }
.form input[type=text], .form input[type=email], .form input[type=password] {
  display: block; width: 100%; margin-top: 7px; padding: 12px 14px; border: 1.5px solid var(--line);
  border-radius: 10px; font-size: 1rem; font-weight: 400; font-family: var(--sans); background: #fff;
}
.form input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,124,137,.15); }
.form .checkbox-row { display: flex; align-items: center; gap: 8px; font-weight: 400; }
.form .helptext, .form ul { color: var(--ink-2); font-size: .84rem; font-weight: 400; }
.form button { margin-top: 8px; }

/* ---- alerts ---- */
.alert { padding: 13px 17px; border-radius: 12px; margin: 16px 0; border: 1.5px solid transparent; }
.alert-warning { background: var(--warn-bg); color: var(--warn-ink); border-color: #f3d99a; }
.alert-success, .alert-info { background: #e3f5ef; color: #016570; border-color: #b8e6dc; }
.alert-error { background: #fdecea; color: #b42318; border-color: #f5c6c0; }

/* ============================================================
   PDC interactive tool widget
   ============================================================ */
.pdc-card { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px; margin: 10px 0 14px; }
.pdc-drop { border: 2.5px dashed #c9bfa8; border-radius: var(--radius); background: var(--cream); padding: 40px 22px; text-align: center; cursor: pointer; transition: border-color .14s, background .14s; }
.pdc-drop:hover, .pdc-drop.drag { border-color: var(--ink); background: var(--cream-deep); }
.pdc-drop-icon { font-size: 2.4rem; display: block; }
.pdc-drop-inner p { margin: 8px 0 0; }
.pdc-drop-hint { font-size: .86rem; }
.pdc-file-input { display: none; }
.pdc-source-note { background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; margin-top: 16px; font-size: .92rem; }

.pdc-options { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 18px; margin-top: 22px; }
.pdc-opt { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .92rem; }
.pdc-opt-checkbox { flex-direction: row; align-items: center; gap: 9px; font-weight: 500; }
.pdc-opt-help { font-weight: 400; font-size: .82rem; }
.pdc-input { padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font-size: .96rem; font-weight: 400; background: #fff; font-family: var(--sans); }
.pdc-input:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,124,137,.15); }
.pdc-opt-checkbox .pdc-input { width: auto; }

.pdc-list { margin-top: 22px; }
.pdc-list-head { font-weight: 700; font-size: .92rem; color: var(--ink-2); margin-bottom: 10px; }
.pdc-row { display: flex; align-items: center; gap: 13px; padding: 10px; border: 1.5px solid var(--line); border-radius: 12px; margin-bottom: 9px; }
.pdc-thumb { width: 48px; height: 48px; border-radius: 9px; background: var(--cream); display: flex; align-items: center; justify-content: center; overflow: hidden; flex: 0 0 auto; font-size: 1.4rem; }
.pdc-thumb img { width: 100%; height: 100%; object-fit: cover; }
.pdc-row-name { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.pdc-row-title { font-weight: 600; font-size: .94rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pdc-row-remove { background: none; border: 0; color: var(--ink-2); cursor: pointer; font-size: 1.1rem; padding: 4px 9px; }
.pdc-row-remove:hover { color: #b42318; }

.pdc-actions { display: flex; gap: 13px; margin-top: 22px; }
.pdc-progress { margin-top: 22px; }
.pdc-progress.hidden { display: none; }
.pdc-bar { height: 10px; background: var(--cream-deep); border: 1.5px solid var(--ink); border-radius: 999px; overflow: hidden; }
.pdc-bar-fill { height: 100%; width: 0; background: var(--yellow); transition: width .15s; }
.pdc-progress-label { display: block; font-size: .84rem; color: var(--ink-2); margin-top: 8px; }

.pdc-results { margin-top: 22px; }
.pdc-results-summary { text-align: center; padding: 24px; background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius); }
.pdc-success { font-weight: 700; font-size: 1.05rem; margin: 0 0 14px; }
.pdc-result-list { display: flex; flex-wrap: wrap; gap: 9px; justify-content: center; margin-top: 16px; }
.pdc-result-dl { background: #fff; border: 1.5px solid var(--ink); border-radius: 9px; padding: 7px 13px; font-size: .86rem; cursor: pointer; color: var(--ink); }
.pdc-result-dl:hover { background: var(--yellow); }

.pdc-inspect-item { background: var(--cream); border: 1.5px solid var(--line); border-radius: 12px; padding: 16px 18px; margin-bottom: 13px; }
.pdc-inspect-item h4 { margin: 0 0 10px; font-size: 1.05rem; }
.pdc-meta { width: 100%; border-collapse: collapse; font-size: .9rem; background: #fff; border-radius: 8px; }
.pdc-meta th { text-align: left; color: var(--ink-2); font-weight: 600; padding: 5px 14px 5px 10px; white-space: nowrap; vertical-align: top; }
.pdc-meta td { padding: 5px 10px; word-break: break-word; }
.pdc-meta tr:nth-child(even) { background: var(--cream); }
.pdc-report-scroll { overflow-x: auto; border: 1.5px solid var(--line); border-radius: 10px; margin-top: 8px; }
.pdc-report-table { border-collapse: collapse; font-size: .82rem; white-space: nowrap; background: #fff; }
.pdc-report-table th, .pdc-report-table td { padding: 6px 12px; border-bottom: 1px solid var(--line); text-align: left; }
.pdc-report-table th { background: var(--cream); position: sticky; top: 0; font-weight: 700; }
.pdc-report-table tbody tr:nth-child(even) { background: var(--cream); }
.pdc-gif-preview { max-width: 100%; border: 2px solid var(--ink); border-radius: 10px; display: block; }

/* interactive crop box */
.pdc-crop { margin-top: 18px; }
.pdc-crop-wrap { position: relative; display: inline-block; max-width: 100%; line-height: 0; overflow: hidden; user-select: none; touch-action: none; border-radius: 8px; }
.pdc-crop-img { display: block; max-width: 100%; max-height: 60vh; height: auto; }
.pdc-crop-box { position: absolute; box-sizing: border-box; border: 2px solid #fff; box-shadow: 0 0 0 9999px rgba(0,0,0,.45); cursor: move; }
.pdc-crop-h { position: absolute; width: 16px; height: 16px; background: #fff; border: 2px solid var(--ink); border-radius: 50%; }
.pdc-crop-h-nw { left: -9px; top: -9px; cursor: nwse-resize; }
.pdc-crop-h-ne { right: -9px; top: -9px; cursor: nesw-resize; }
.pdc-crop-h-sw { left: -9px; bottom: -9px; cursor: nesw-resize; }
.pdc-crop-h-se { right: -9px; bottom: -9px; cursor: nwse-resize; }

/* live before/after preview */
.pdc-preview { margin-top: 18px; }
.pdc-preview.hidden { display: none; }
.pdc-prev-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.pdc-prev-grid figure { margin: 0; text-align: center; }
.pdc-prev-grid img { width: 100%; border: 2px solid var(--ink); border-radius: 10px; display: block; }
.pdc-prev-grid figcaption { font-size: .78rem; color: var(--ink-2); font-weight: 700; margin-top: 6px; text-transform: uppercase; letter-spacing: .05em; }
@media (max-width: 560px) { .pdc-prev-grid { grid-template-columns: 1fr; } }

/* QR reader output */
.pdc-qr-file { margin-bottom: 14px; }
.pdc-qr-file h4 { margin: 0 0 6px; }
.pdc-qr-result { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.pdc-qr-result > a { flex-basis: 100%; word-break: break-all; font-weight: 600; }
.pdc-qr-value { flex: 1; min-width: 180px; font-family: var(--sans); font-size: .9rem; }
.pdc-qr-copy { flex: 0 0 auto; }

/* OCR output */
.pdc-ocr-file { margin-bottom: 14px; }
.pdc-ocr-file h4 { margin: 0 0 6px; }
.pdc-ocr-text { width: 100%; font-family: var(--sans); font-size: .9rem; line-height: 1.5; padding: 10px 12px; border: 1.5px solid var(--line); border-radius: 10px; resize: vertical; background: #fff; }
.pdc-ocr-text:focus { outline: none; border-color: var(--teal); }

/* palette extractor */
.pdc-pal-file { margin-bottom: 18px; }
.pdc-pal-file h4 { margin: 0 0 6px; }
.pdc-pal-row { display: flex; flex-wrap: wrap; border: 2px solid var(--ink); border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.pdc-pal-swatch { flex: 1 1 92px; min-height: 96px; border: 0; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-family: var(--sans); font-weight: 600; font-size: .84rem; padding: 10px; transition: filter .12s; }
.pdc-pal-swatch:hover { filter: brightness(1.06); }
.pdc-pal-pct { font-weight: 400; font-size: .76rem; opacity: .85; }
.pdc-pal-hexes { display: block; font-size: .82rem; color: var(--ink-2); word-break: break-word; }

/* color analyzer swatches */
.pdc-colors-file { margin-bottom: 18px; }
.pdc-colors-file h4 { margin: 0 0 4px; }
.pdc-swatch-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(96px, 1fr)); gap: 10px; margin-top: 10px; }
.pdc-swatch { display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: .76rem; }
.pdc-swatch-chip { width: 100%; height: 52px; border-radius: 8px; border: 1.5px solid var(--ink); }
.pdc-swatch-hex { font-family: var(--sans); font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.pdc-clean { background: #e3f5ef; border: 1.5px solid #b8e6dc; border-radius: 12px; padding: 14px 16px; margin: 0; }
.pdc-gps-warn { background: var(--warn-bg); color: var(--warn-ink); border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; }
.pdc-gps-warn a { color: var(--warn-ink); font-weight: 700; text-decoration: underline; }

/* ============================================================
   Workflows
   ============================================================ */
/* builder meta */
.wf-meta { display: grid; grid-template-columns: 2fr 2fr 1.4fr; gap: 18px; margin-bottom: 22px; }
.wf-field { display: flex; flex-direction: column; gap: 6px; font-weight: 600; font-size: .9rem; }
.wf-field input, .wf-field select { padding: 11px 13px; border: 1.5px solid var(--line); border-radius: 10px; font: inherit; font-weight: 400; }
.wf-field input:focus, .wf-field select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(0,124,137,.15); }
.wf-anon-note { grid-column: 1 / -1; margin: 0; }

/* builder layout */
.wf-layout { display: grid; grid-template-columns: 240px 1fr; gap: 22px; align-items: start; }
.wf-palette { position: sticky; top: 158px; }  /* clears the sticky header + save bar */
.wf-palette h3 { margin: 0 0 12px; font-size: 1rem; }
.wf-add-btn { display: block; width: 100%; text-align: left; background: var(--cream); border: 1.5px solid var(--ink); border-radius: 10px; padding: 9px 13px; margin-bottom: 9px; font: inherit; font-weight: 500; cursor: pointer; }
.wf-add-btn:hover { background: var(--yellow); }

.wf-steps { display: flex; flex-direction: column; gap: 14px; min-height: 80px; }
.wf-empty { border: 2px dashed var(--line); border-radius: var(--radius); padding: 28px; text-align: center; }
.wf-step { background: var(--surface); border: 2px solid var(--ink); border-radius: var(--radius); padding: 16px 18px; }
.wf-step-head { display: flex; align-items: center; gap: 12px; }
.wf-step-num { display: inline-flex; width: 28px; height: 28px; align-items: center; justify-content: center; background: var(--yellow); border: 1.5px solid var(--ink); border-radius: 50%; font-weight: 700; font-size: .9rem; flex: 0 0 auto; }
.wf-step-title { font-family: var(--serif); font-weight: 600; font-size: 1.1rem; flex: 1; }
.wf-step-ctrls { display: flex; gap: 4px; }
.wf-icon-btn { background: none; border: 1.5px solid var(--line); border-radius: 8px; width: 30px; height: 30px; cursor: pointer; font-size: .9rem; }
.wf-icon-btn:hover { border-color: var(--ink); background: var(--cream); }
.wf-icon-btn.wf-del:hover { border-color: #b42318; color: #b42318; }
.wf-step-opts { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--line); }

/* pinned under the site header so saving is always one click away */
.wf-savebar { display: flex; align-items: center; gap: 16px; margin: 0 0 18px; padding: 10px 0; position: sticky; top: 70px; z-index: 40; background: var(--bg); border-bottom: 1px solid var(--line); }
.wf-status { font-size: .9rem; }

/* per-option "ask on run" toggle in the builder */
.wf-opt-field { display: flex; flex-direction: column; gap: 6px; }
.wf-opt-field .pdc-input:disabled { background: #f4f1ea; color: var(--ink-2); cursor: not-allowed; }
.wf-ask { display: inline-flex; align-items: center; gap: 6px; font-size: .78rem; color: var(--ink-2); font-weight: 500; cursor: pointer; }
.wf-ask input { margin: 0; }
.wf-ask.on { color: var(--teal); font-weight: 700; }

/* runtime input form on the run page */
.wf-run-inputs { background: var(--cream); border: 2px solid var(--ink); border-radius: var(--radius); padding: 18px 20px; margin-top: 18px; display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 14px; }
.wf-run-inputs h3 { margin: 0; grid-column: 1 / -1; }
.wf-run-inputs > p { margin: -6px 0 4px; grid-column: 1 / -1; }
.wf-runtime-note { margin: -10px 0 22px; }
.wf-ask-tag { color: var(--teal); font-style: normal; font-weight: 600; }

/* detail page chain */
.wf-chain { list-style: none; counter-reset: none; padding: 0; margin: 0 0 26px; display: flex; flex-direction: column; gap: 0; }
.wf-chain-step { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1.5px solid var(--line); border-radius: 12px; padding: 12px 16px; position: relative; }
.wf-chain-step:not(:last-child) { margin-bottom: 22px; }
.wf-chain-step:not(:last-child)::after { content: "↓"; position: absolute; left: 28px; bottom: -20px; color: var(--ink-2); font-weight: 700; }
.wf-chain-title { font-weight: 600; }
.wf-chain-opts { font-size: .85rem; }
.wf-share { font-size: .82rem; margin-top: 8px; background: var(--cream); }

@media (max-width: 760px) {
  .wf-meta { grid-template-columns: 1fr; }
  .wf-layout { grid-template-columns: 1fr; }
  .wf-palette { position: static; }
}

/* ---- footer ---- */
.site-footer { background: var(--ink); color: #d9d2c8; margin-top: 0; padding: 56px 24px 40px; }
.site-footer a { color: #d9d2c8; }
.site-footer a:hover { color: var(--yellow); }
.footer-inner { display: flex; justify-content: space-between; gap: 40px; flex-wrap: wrap; }
.site-footer strong { color: #fff; font-family: var(--serif); font-size: 1.15rem; }
.footer-inner .muted { color: #b3a99c; max-width: 440px; font-size: .94rem; }
.footer-cols { display: flex; gap: 60px; flex-wrap: wrap; }
.footer-links { display: flex; flex-direction: column; gap: 9px; }
.footer-links .col-title { color: #fff; font-weight: 700; font-size: .8rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 4px; }

/* ---- responsive ---- */
@media (max-width: 880px) {
  .hero .container { grid-template-columns: 1fr; }
  .hero-art { display: none; }
  .tool-layout { grid-template-columns: 1fr; }
  .tool-sidebar { flex-direction: row; flex-wrap: wrap; }
  .sidebar-card { flex: 1 1 240px; }
  .dropdown-menu { column-count: 1; width: 260px; }
  .main-nav { gap: 14px; }
}
/* The nav is dense (tools, workflows, guides, about, auth, coffee). Shed the
   least-essential bits as it tightens rather than letting the header overflow. */
@media (max-width: 1024px) {
  .nav-search { display: none; }
  .main-nav { gap: 12px; }
  .main-nav > a:not(.btn), .dropdown-toggle { font-size: .88rem; }
  .nav-alltools { display: none; }  /* the Tools ▾ menu already lists them */
}
@media (max-width: 760px) {
  .main-nav > a:not(.btn) { display: none; }  /* Tools ▾ + the footer cover these */
}
@media (max-width: 560px) {
  body { font-size: 16px; }
  .brand { font-size: 1.08rem; }
  .nav-coffee { display: none; }    /* still in the footer and on /about */
}

/* ---- Admin dashboard (read-only insight tables) ---------------------------- */
.admin-table { width: 100%; border-collapse: collapse; margin: 12px 0 28px; font-size: .92rem; }
.admin-table th, .admin-table td { text-align: left; padding: 8px 12px; border-bottom: 1px solid var(--line); }
.admin-table th { font-size: .74rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }
.admin-table tbody tr:hover { background: var(--cream); }
.admin-tag { display: inline-block; background: var(--yellow); border: 1px solid var(--ink); border-radius: 999px; padding: 1px 8px; margin-left: 6px; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
