/*
Theme Name: Service Workbench
Description: A lightweight publishing theme for practical job trackers, calculators and templates.
Version: 1.1.0
Requires at least: 6.6
Requires PHP: 7.4
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Text Domain: service-workbench
*/

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; }
img { height: auto; max-width: 100%; }
:where(a, button, input, select, textarea):focus-visible { outline: 3px solid #176454; outline-offset: 4px; }
:where(h1, h2, h3) { text-wrap: balance; }
:where(p, li, a, code, td) { overflow-wrap: anywhere; }

.wb-header { border-bottom: 1px solid #dce4dc; }
.wb-header-inner { min-height: 4.75rem; align-items: center; padding-block: .85rem; }
.wb-header .wp-block-site-title a, .wb-footer .wp-block-site-title a { text-decoration: none; }
.wb-header .wp-block-site-title a:hover, .wb-footer .wp-block-site-title a:hover { text-decoration: underline; }
.wb-header .wp-block-site-logo img { width: auto; max-height: 2.5rem; }
.wb-header :where(.wp-block-navigation-item__content) { font-size: .95rem; }

.wb-hero { padding-block: clamp(3.25rem, 8vw, 7rem); background: #e9f0e8; }
.wb-hero-grid { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem, 7vw, 6rem); align-items: center; }
.wb-hero-grid > :where(*) { min-width: 0; margin-block: 0 !important; }
.wb-hero h1 { max-width: 13ch; font-size: clamp(2.75rem, 5.7vw, 5rem); letter-spacing: -.07em; }
.wb-hero p { max-width: 38ch; }
.wb-preview { border: 1px solid #bacdbe; border-radius: 1.1rem; background: #fffdf8; box-shadow: 0 14px 32px #14322112; padding: clamp(1rem, 3vw, 1.8rem); font-size: .91rem; }
.wb-preview-title { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .45rem 1rem; align-items: baseline; margin-bottom: 1rem; }
.wb-preview-title strong { color: #17352b; font-size: 1.04rem; }
.wb-preview-title span { color: #4b5d54; font-size: .81rem; }
.wb-preview table { width: 100%; border-collapse: collapse; }
.wb-preview th, .wb-preview td { border-bottom: 1px solid #e3e9e2; padding: .55rem .35rem; text-align: left; }
.wb-preview thead th { color: #455b4f; font-size: .79rem; }
.wb-preview tbody th { font-weight: 600; }
.wb-preview tr:last-child > * { border-bottom: 0; }
.wb-preview tr > :not(:first-child) { text-align: right; white-space: nowrap; }
.wb-preview figcaption { border-top: 1px solid #dce4dc; padding-top: .8rem; margin-top: .6rem; color: #44574e; font-size: .82rem; }

.wb-section { padding-block: clamp(2.8rem, 6vw, 5.5rem); }
.wb-section h2 { margin-top: 0; }
.wb-resource-grid .wp-block-post { display: flex; }
.wb-card { width: 100%; padding: clamp(1.05rem, 2vw, 1.5rem); background: #fffdf8; border: 1px solid #d9e2d9; border-radius: .95rem; }
.wb-card .wp-block-post-featured-image { margin-bottom: .85rem; }
.wb-card .wp-block-post-featured-image img { border-radius: .45rem; }
.wb-card .wp-block-post-title { margin-top: 0; }
.wb-card .wp-block-post-title a { color: #193b30; text-decoration: none; }
.wb-card .wp-block-post-title a:hover { text-decoration: underline; }
.wb-card .wp-block-post-excerpt { color: #455950; line-height: 1.55; }
.wb-card .wp-block-post-excerpt__excerpt { margin: 0; }
.wb-meta { color: #455950; font-size: .9rem; }
.wb-article-head h1 { margin-bottom: .4rem; }
.wb-entry { padding-block: clamp(2.5rem, 5vw, 4.8rem); }
.wb-entry :where(.wp-block-table) { overflow-x: auto; }
.wb-entry :where(.wp-block-table th, .wp-block-table td) { padding: .6rem; }
.wb-entry :where(.wp-block-image figcaption) { color: #455950; }
.wb-entry :where(.wp-block-post-content h2, .wp-block-post-content h3) { scroll-margin-top: 1rem; }
.wb-entry .wp-block-post-content > :where(h2, h3) { margin-top: 1.65em; }
.wb-download { border: 1px solid #bdcfc0; border-radius: .8rem; padding: 1.2rem; background: #e9f0e8; }
.wb-download .wp-block-file__button { min-height: 44px; display: inline-flex; align-items: center; }
.wb-entry :where(input[type="search"]), .wb-section :where(input[type="search"]) { min-width: 0; }

.wb-footer { padding-block: 1.7rem; background: #e9f0e8; border-top: 1px solid #dce4dc; }
.wb-footer-inner { row-gap: 1rem; }
.wb-footer .wp-block-navigation { font-size: .91rem; }
.wb-ad-inline { margin-block: 2.25rem; text-align: center; }
.wb-ad-inline:not(:empty) .adsbygoogle { min-block-size: 250px; }
.wb-ad-rail { margin-block: 2rem; }
.wb-ad-rail .adsbygoogle { min-block-size: 250px; }

.wb-calculator { border: 1px solid #bdcfc0; border-radius: .9rem; padding: clamp(1rem, 3vw, 1.6rem); background: #fffdf8; }
.wb-calculator fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
.wb-calculator legend { font-weight: 700; margin-bottom: .8rem; }
.wb-calculator-grid, .wb-results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin: 0; }
.wb-calculator label { display: grid; align-content: start; gap: .3rem; color: #17352b; font-weight: 600; }
.wb-calculator input { min-height: 44px; min-width: 0; width: 100%; border: 1px solid #819589; border-radius: .38rem; padding: .46rem .65rem; color: #17352b; background: #fff; font: inherit; }
.wb-calculator button { margin-top: 1rem; min-height: 44px; padding: .55rem 1rem; color: #fff; background: #1e5142; border: 0; border-radius: .42rem; font: inherit; font-weight: 650; cursor: pointer; }
.wb-calculator button:hover { background: #14392e; }
.wb-calculator-output:not(:empty) { margin-top: 1rem; padding-top: 1rem; border-top: 1px solid #dce4dc; }
.wb-results dt { color: #455950; font-size: .88rem; }
.wb-results dd { color: #17352b; font-weight: 700; margin: 0; }
.wb-calculator [hidden] { display: none !important; }
body.rtl .wb-preview tr > :not(:first-child) { text-align: left; }

@media (max-width: 740px) {
  .wb-hero-grid { grid-template-columns: minmax(0, 1fr); gap: 1.8rem; }
  .wb-resource-grid .wp-block-post-template.is-layout-grid { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
  .wb-calculator-grid, .wb-results { grid-template-columns: 1fr; }
  .wb-preview th, .wb-preview td { padding-inline: .25rem; }
  .wb-preview tr > :not(:first-child) { white-space: normal; }
}

.wp-site-blocks > header,
.wp-site-blocks > main,
.wp-site-blocks > footer { margin-block-start: 0; }
.wb-preview { margin-inline: 0; }
.wb-section .wp-block-search { max-width: 32rem; }

.wb-entry .wp-block-table { max-width: 100%; overscroll-behavior-inline: contain; }
.wb-entry .wp-block-table table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.wb-entry .wp-block-table thead { background: #e9f0e8; }
.wb-entry .wp-block-table :is(th,td) { text-align: start; vertical-align: top; border: 1px solid #cbd9ce; }
.wb-entry .wp-block-post-content a[href$=".xlsx"] { display: inline-block; background: #1e5142; color: #fff; border-radius: .45rem; padding: .7rem 1rem; font-weight: 650; }
.wb-entry .wp-block-image img { display: block; max-width: 100%; height: auto; }
.wb-collection-links { display: flex; flex-wrap: wrap; gap: .5rem; padding: 0; list-style: none; }
.wb-collection-links a { display: inline-block; padding: .45rem .85rem; border: 1px solid #a5baaa; border-radius: .45rem; text-decoration: none; }
.wb-collection-links a:hover { background: #e9f0e8; }
@media (max-width: 480px) {
  .wb-entry .wp-block-table :is(th,td) { padding: .45rem .35rem; font-size: .92rem; }
  .wb-header .wp-block-site-title { min-width: 0; overflow-wrap: anywhere; }
}
