/* ProjectCalcWorks: a quieter, task-first interface with all unique routes intact. */
:root {
  --pcw-polish-ink: #142b3d;
  --pcw-polish-line: #d9e4eb;
  --pcw-polish-focus: #f08a42;
}

body { text-rendering: optimizeLegibility; }
main.wrap { padding-top: clamp(20px, 2.8vw, 36px); }
.site-header { border-bottom: 1px solid #e2e8ed; box-shadow: 0 5px 26px rgb(18 45 67 / 5%); }
.site-header .nav { min-height: 72px; }
.primary-nav a { border-radius: 11px; }
.primary-nav .nav-search { border: 1px solid #dce7ed; background: #f6fafc; }

/* Hero: keep the search experience in the foreground and remove duplicated proof. */
main .pcw-home-v31 {
  min-height: 0;
  border-radius: 26px;
  box-shadow: 0 25px 65px rgb(16 36 51 / 17%);
}
.pcw-home-v31 .pcw-hero-shade {
  background: linear-gradient(100deg, rgb(6 23 36 / 96%) 0%, rgb(8 29 43 / 93%) 48%, rgb(11 33 49 / 56%) 100%);
}
.pcw-home-v31 .pcw-hero-copy {
  width: min(900px, 79%);
  padding: clamp(30px, 4vw, 54px);
}
main .pcw-home-v31 h1 {
  max-width: 760px;
  margin: .22em 0 .2em;
  font-size: clamp(2.65rem, 4.5vw, 4.75rem);
  line-height: 1.01;
  letter-spacing: -.053em;
}
.pcw-home-v31 .v3-lead { max-width: 650px; font-size: 1.04rem; line-height: 1.58; }
.pcw-home-v31 .pcw-finder { margin-top: 19px; }
main .pcw-hero-trust { display: none; } /* The same promises are available in the page content. */
.pcw-home-v31 .project-search input {
  min-height: 58px;
  border: 2px solid transparent;
  box-shadow: 0 12px 28px rgb(0 0 0 / 14%);
}
.pcw-home-v31 .project-search input:focus-visible {
  border-color: #f6a86b;
  outline: 3px solid rgb(255 190 134 / 28%);
  outline-offset: 2px;
}

/* Explicit dark-on-light text throughout the hero finder. */
.pcw-home-v31 .finder-results .resource-card {
  min-height: 182px;
  padding: 16px;
  color: var(--pcw-polish-ink);
  background: #fff;
  border-color: #d6e1e9;
  box-shadow: 0 10px 28px rgb(0 0 0 / 12%);
}
.pcw-home-v31 .resource-card .resource-meta .badge {
  color: #32566e;
  background: #edf5f9;
  border: 1px solid #d9e8f0;
}
.pcw-home-v31 .resource-card .resource-main,
.pcw-home-v31 .resource-card .resource-main strong { color: #172f42; }
.pcw-home-v31 .resource-card .resource-main > span { color: #526879; }
.pcw-home-v31 .resource-card .resource-main small { color: #175c86; }
.pcw-home-v31 .resource-card .resource-save { color: #3d566b; background: #f8fafc; }
.pcw-home-v31 .resource-card:focus-within {
  outline: 3px solid var(--pcw-polish-focus);
  outline-offset: 2px;
}
.pcw-home-v31 .v3-quick-links { gap: 7px; margin-top: 14px; }
.pcw-home-v31 .v3-quick-links a { padding: 7px 11px; font-size: .78rem; }

/* More usable card widths, regular rhythm, and clear section labels. */
.v31-popular, .pcw-project-browse { margin-block: clamp(35px, 4.5vw, 62px); }
.v3-heading-row { margin-bottom: 20px; }
.v3-heading-row h2 { max-width: 720px; line-height: 1.16; }
.v3-heading-row > a { white-space: nowrap; }
main .v31-tool-grid, main .pcw-project-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.v31-tool-grid > a { border-radius: 19px; border-color: var(--pcw-polish-line); }
.v31-tool-grid img { aspect-ratio: 2.8 / 1; }
.v31-tool-grid div { padding: 18px 19px 20px; }
.v31-tool-grid strong { color: #173348; font-size: 1.05rem; }
.v31-tool-grid small { color: #566d7c; font-size: .88rem; }
.pcw-project-grid > a { min-height: 205px; padding: 21px; border-radius: 19px; }
.pcw-project-grid strong { font-size: 1.18rem; letter-spacing: -.02em; }
.pcw-project-grid small { font-size: .91rem; }
.home-jump-nav { scroll-padding-inline: 12px; border-radius: 14px; }
.home-section-surface { border-radius: 22px; }
.link-grid a, .resource-card, .category-card { border-color: var(--pcw-polish-line); }
.link-grid a { min-height: 145px; }
.link-grid a strong { color: #193b51; line-height: 1.35; }
.link-grid a span { color: #576e7f; }

/* The material directory keeps all links, but no longer stacks twelve isolated promos. */
.pcw-directory-groups { margin: 36px 0; border: 1px solid #d4e1e9; border-radius: 19px; background: #fff; }
.pcw-directory-groups > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 70px;
  padding: 17px 22px;
  color: #17384e;
  font-size: 1.06rem;
  font-weight: 850;
  cursor: pointer;
  list-style: none;
}
.pcw-directory-groups > summary::-webkit-details-marker { display: none; }
.pcw-directory-groups > summary::after {
  content: '+';
  order: 3;
  color: #245a7d;
  font-size: 1.65rem;
  font-weight: 400;
}
.pcw-directory-groups[open] > summary::after { content: '−'; }
.pcw-directory-groups > summary small { margin-left: auto; color: #637789; font-size: .78rem; font-weight: 550; }
.pcw-directory-groups-inner {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  padding: 0 20px 20px;
  border-top: 1px solid #e8eff3;
}
.pcw-directory-groups-inner > .hub-section { min-width: 0; margin: 18px 0 0; }
.pcw-directory-extras { margin-block: 48px; }
.pcw-directory-extras > h2 { margin: 7px 0; }
.pcw-directory-extras > p { max-width: 810px; }
.pcw-directory-planner-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 19px;
}
.pcw-directory-planner-grid > .content-card {
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 19px;
  border-radius: 17px;
  box-shadow: 0 6px 20px rgb(18 45 67 / 4%);
}
.pcw-directory-planner-grid h2 { margin: 0 0 10px; font-size: 1.08rem; line-height: 1.3; }
.pcw-directory-planner-grid p { margin: 0; color: #566d7c; font-size: .91rem; line-height: 1.55; }
.pcw-directory-planner-grid a { font-weight: 800; }

/* The article finder previously sat flush against its bordered card. */
[data-article-finder] {
  padding: clamp(20px, 3vw, 30px);
  border-radius: 18px;
  margin-block: 26px 38px;
}
[data-article-finder] label { color: #17384e; }
[data-article-finder] > .muted { max-width: 740px; line-height: 1.56; }
[data-article-finder] input { max-width: 880px; box-shadow: 0 4px 16px rgb(18 45 67 / 4%); }
[data-article-finder] [data-article-count] { margin-bottom: 0; }

/* Long tools and guides must remain readable; avoid UI clipping. */
.content-card, .panel, .result { border-radius: 18px; }
.prose, .content-card { overflow-wrap: anywhere; }
:where(a, button, input, select, textarea, summary):focus-visible {
  outline: 3px solid var(--pcw-polish-focus);
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .pcw-home-v31 .pcw-hero-copy { width: min(100%, 900px); padding-right: clamp(28px, 4vw, 54px); }
  .pcw-home-v31 .pcw-hero-shade { background: linear-gradient(100deg, rgb(6 23 36 / 97%), rgb(8 29 43 / 78%)); }
}
@media (max-width: 820px) {
  .pcw-home-v31 .pcw-hero-copy { padding: 30px 25px; }
  main .pcw-home-v31 h1 { font-size: clamp(2.35rem, 7.2vw, 3.9rem); }
  .pcw-home-v31 .finder-results { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  main .v31-tool-grid, main .pcw-project-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pcw-directory-groups-inner, .pcw-directory-planner-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 580px) {
  main.wrap { padding-top: 18px; }
  main .pcw-home-v31 { border-radius: 20px; }
  .pcw-home-v31 .pcw-hero-copy { padding: 27px 18px 25px; }
  main .pcw-home-v31 h1 { font-size: clamp(2.25rem, 10.3vw, 3.15rem); letter-spacing: -.047em; }
  .pcw-home-v31 .v3-lead { font-size: .96rem; }
  .pcw-home-v31 .finder-results { grid-template-columns: 1fr; }
  .pcw-home-v31 .finder-results .resource-card { min-height: 0; }
  main .v31-tool-grid, main .pcw-project-grid { grid-template-columns: 1fr; }
  .v31-tool-grid img { aspect-ratio: 3.5 / 1; }
  .pcw-project-grid > a { min-height: 165px; }
  .v3-heading-row > a { white-space: normal; }
  .link-grid a { min-height: 0; }
  .pcw-directory-groups > summary { align-items: flex-start; flex-wrap: wrap; padding: 17px; }
  .pcw-directory-groups > summary small { order: 4; margin: 0; flex-basis: 100%; }
  .pcw-directory-groups-inner, .pcw-directory-planner-grid { grid-template-columns: 1fr; }
  .pcw-directory-groups-inner { padding: 0 15px 15px; }
}
@media (prefers-reduced-motion: reduce) {
  .v31-tool-grid > a, .pcw-project-grid > a { transition: none; }
}

/* Cost directory: direct users to one task before showing another long catalog. */
.pcw-cost-popular-note {
  max-width: 950px;
  margin: 5px 0 22px;
  padding: 12px 17px;
  border-left: 3px solid #e59659;
  border-radius: 0 12px 12px 0;
  background: #f8fbfd;
  color: #526b7b;
  font-size: .92rem;
  line-height: 1.55;
}
.pcw-cost-popular-note strong { color: #23495f; }
.pcw-cost-shortcuts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 20px 0 28px;
}
.pcw-cost-shortcuts a {
  display: flex;
  min-width: 0;
  flex-direction: column;
  gap: 7px;
  padding: 19px 21px;
  border: 1px solid #d6e5ed;
  border-radius: 17px;
  background: #fff;
  color: #18384b;
  text-decoration: none;
  box-shadow: 0 9px 24px rgb(19 52 72 / 5%);
  transition: border-color .16s ease, transform .16s ease;
}
.pcw-cost-shortcuts a::before {
  content: '↗';
  align-self: flex-end;
  height: 10px;
  color: #c2662e;
  font-size: 1.3rem;
  line-height: .6;
}
.pcw-cost-shortcuts a:hover { border-color: #e99b65; transform: translateY(-2px); }
.pcw-cost-shortcuts strong { font-size: 1rem; line-height: 1.3; }
.pcw-cost-shortcuts span { color: #587185; font-size: .84rem; line-height: 1.4; }
#pcw-cost-finder, #pcw-quick-estimate, #pcw-cost-planning { scroll-margin-top: 104px; }
.pcw-cost-catalog { margin: 34px 0; border: 1px solid #d8e5ec; border-radius: 19px; background: #fff; }
.pcw-cost-catalog > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  min-height: 91px;
  padding: 20px 24px;
  color: #18384b;
  list-style: none;
  cursor: pointer;
}
.pcw-cost-catalog > summary::-webkit-details-marker { display: none; }
.pcw-cost-catalog > summary > span:first-child { display: grid; gap: 6px; }
.pcw-cost-catalog > summary strong { font-size: 1.1rem; }
.pcw-cost-catalog > summary small { color: #60778a; font-size: .84rem; }
.pcw-cost-expand { color: #bc6a38; font-size: 1.75rem; font-weight: 450; }
.pcw-cost-catalog[open] .pcw-cost-expand { transform: rotate(45deg); }
.pcw-cost-catalog-inner { padding: 0 21px 23px; border-top: 1px solid #e9f0f4; }
.pcw-cost-catalog-inner .link-grid { margin-top: 20px; }
.pcw-cost-catalog-inner .link-grid a { min-height: 0; }
@media (max-width: 760px) {
  .pcw-cost-shortcuts { grid-template-columns: 1fr; gap: 9px; }
  .pcw-cost-shortcuts a { padding: 15px 17px; }
  .pcw-cost-shortcuts a::before { display: none; }
  .pcw-cost-catalog > summary { padding: 18px; }
  .pcw-cost-catalog-inner { padding: 0 14px 17px; }
}
@media (prefers-reduced-motion: reduce) {
  .pcw-cost-shortcuts a { transition: none; }
}
