/* tools.html only. Loaded after css/style.css. Does not alter design tokens. */

/* Type scale for this page's components. Replaces thirteen ad hoc sizes
   (0.7 / 0.72 / 0.74 / 0.78 / 0.88 / 0.9 / 0.92 / 0.94 / 0.95 / 1.0 /
   1.02 / 1.05 / 1.1 / 1.15rem) whose steps were too small to read as
   intent. Five steps, ~1.15 apart. */
.catalog-grid,
.gear-list,
.gear-more,
.partner-links,
.sponsor-page,
.sponsor-roster,
.section-sub,
.this-week {
    --fs-label: 0.72rem;
    --fs-sm: 0.84rem;
    --fs-body: 0.96rem;
    --fs-lead: 1.1rem;
    --fs-title: 1.28rem;
}

/* Unboxed sponsor hierarchy -------------------------------------- */
.sponsor-marks {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.75rem;
}
.sponsor-primary-mark,
.sponsor-secondary-marks a {
    display: grid;
    place-items: center;
}
.sponsor-primary-mark {
    gap: 0.7rem;
}
.sponsor-primary-mark .week-code, .sponsor-offer .week-code { margin-left: 0; }
.sponsor-primary-mark img {
    width: min(100%, 18.75rem);
    height: auto;
    max-height: 6.5rem;
    object-fit: contain;
}
.sponsor-rule {
    width: min(100%, 38.75rem);
    border-top: 1px solid var(--line);
}
.sponsor-secondary-marks {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem clamp(1.25rem, 4vw, 3.5rem);
    align-items: center;
    justify-content: center;
}
.sponsor-secondary-marks a {
    padding: 0.5rem 0.75rem;
}
.sponsor-secondary-marks img {
    width: auto;
    height: auto;
    max-width: 11.625rem;
    max-height: 3.625rem;
    object-fit: contain;
    transition: opacity 0.18s ease;
}
.sponsor-secondary-marks a:first-child img {
    max-width: 10.5rem;
}
.sponsor-secondary-marks a:last-child img {
    max-width: 7.625rem;
}
.sponsor-primary-mark:hover img,
.sponsor-primary-mark:focus-visible img,
.sponsor-secondary-marks a:hover img,
.sponsor-secondary-marks a:focus-visible img {
    opacity: 0.78;
}

/* Partners with no mark on file -- same list, plain links. */
.partner-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 1.75rem;
    margin: 1.25rem 0 0;
    padding: 0;
    list-style: none;
}
.partner-links a {
    color: var(--gold-light);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-body);
    letter-spacing: 0.02em;
    text-decoration: none;
}
.partner-links a:hover,
.partner-links a:focus-visible {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.partner-links .partner-code {
    margin-left: 0.5rem;
    color: var(--gold);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    white-space: nowrap;
}

/* ---------------------------------------------------------------
   Product cards -- Always Carrying and the catalog sections
   Source photos arrive at mixed sizes and aspect ratios (portrait
   256x500 through landscape 800x600) and on two grounds: white studio
   shots and the near-black renders DJI and Milwaukee ship. They are
   pre-normalized to 800x600 by scripts/normalize-product-images.sh,
   product fitted -- never cropped -- to a common box on one #181818
   plate, so the thumb only presents them at a fixed ratio and the grid
   reads as one set. It must not crop: object-fit is contain, not cover,
   and the thumb background must stay in step with PLATE in that script.
   --------------------------------------------------------------- */
.catalog-card {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: linear-gradient(180deg, var(--surface-raised), var(--charcoal));
    transition: border-color 0.18s ease, transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
}
.catalog-card:hover {
    border-color: var(--line-strong);
    transform: translateY(-2px);
}
.catalog-thumb {
    display: block;
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border-bottom: 1px solid var(--line);
    background: #181818;
}
.catalog-thumb img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.catalog-card > div {
    display: flex;
    flex: 1;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    padding: 0.95rem 1rem 1.05rem;
}
.catalog-card h3 {
    margin: 0;
    color: var(--gold-light);
    font-size: var(--fs-title);
    line-height: 1.25;
}
.catalog-card .brand-line,
.gear-row .brand-line {
    margin: 0;
    color: var(--gold);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}
.catalog-card p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-body);
}
.neil-take {
    margin: 0;
    padding: 0.7rem 0.85rem;
    border-left: 1px solid var(--gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    background: rgba(201, 162, 39, 0.09);
    color: var(--text);
    font-size: var(--fs-sm);
}
.catalog-card a:not(.btn) {
    margin-top: auto;
    padding-top: 0.35rem;
    color: var(--gold-light);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}
.catalog-card a:not(.btn)::after {
    display: inline-block;
    margin-left: 0.4em;
    transition: transform 0.18s cubic-bezier(0.22, 1, 0.36, 1);
    content: "\2192";
}
.catalog-card a:not(.btn):hover::after {
    transform: translateX(3px);
}
.catalog-card a:not(.btn):hover,
.catalog-card a:not(.btn):focus-visible {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 0.75rem;
}

/* "More gear" -- link-only products ------------------------------ */
.gear-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.5rem;
    margin: 0;
    padding: 0;
    list-style: none;
}
.gear-row {
    display: grid;
    grid-template-columns: 1fr auto;
    align-items: start;
    gap: 0.25rem 1rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: var(--surface-raised);
}
.gear-row h3 {
    margin: 0.15rem 0 0.3rem;
    color: var(--gold-light);
    font-size: var(--fs-title);
}
.gear-row p {
    margin: 0;
    color: var(--text-muted);
    font-size: var(--fs-sm);
}
.gear-row a {
    padding-top: 0.15rem;
    color: var(--gold-light);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
    white-space: nowrap;
}
.gear-row a:hover,
.gear-row a:focus-visible {
    color: var(--gold);
    text-decoration: underline;
    text-underline-offset: 4px;
}
.section-sub {
    margin: 0.35rem 0 0;
    max-width: 68ch;
    color: var(--text-muted);
    font-size: var(--fs-body);
}

/* Browser surfaces ----------------------------------------------- */
::selection {
    background: rgba(201, 162, 39, 0.28);
    color: var(--text);
}
:focus-visible {
    outline: 2px solid var(--gold);
    outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
    .catalog-card,
    .catalog-card a:not(.btn)::after {
        transition: none;
    }
    .catalog-card:hover {
        transform: none;
    }
}

/* "Also in the shop" -- the link-only items, folded into The Rest Of The Shop
   rather than carrying a section of their own. */
.gear-more {
    margin-top: clamp(2rem, 4vw, 3rem);
    padding-top: clamp(1.5rem, 3vw, 2.25rem);
    border-top: 1px solid var(--line);
}
.gear-more-title {
    margin: 0;
    color: var(--text);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-title, 1.28rem);
    font-weight: 500;
    letter-spacing: 0.01em;
}
.gear-more .section-sub {
    margin-bottom: 1.25rem;
}

/* Page rhythm -----------------------------------------------------
   The site-wide section padding (3.75-6.5rem) is tuned for pages that
   run a few blocks of copy. This page is a dense catalog, and at that
   scale the gutters read as gaps in the page rather than separation
   between sections. */
.tools-page section {
    padding: clamp(2.25rem, 4vw, 3.5rem) 0;
}
.tools-page .section-header {
    margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem);
}
.tools-page .gear-more {
    margin-top: clamp(1.5rem, 3vw, 2.25rem);
    padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
}

/* Affiliate disclosure -- the last thing on the page, not the first. */
.affiliate-notice {
    padding-top: clamp(1.25rem, 2.5vw, 1.75rem);
    border-top: 1px solid var(--line);
    background: var(--black);
}
.affiliate-notice p {
    margin: 0;
    max-width: 78ch;
    color: var(--text-muted);
    font-size: var(--fs-sm, 0.84rem);
}

/* This Week's Build -------------------------------------------- */
.this-week .section-header {
    border-left: 3px solid var(--gold);
    padding-left: 0.9rem;
}
.week-list {
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}
.week-row {
    border-color: rgba(201, 162, 39, 0.35);
}
.week-code {
    margin-left: 0.5rem;
    padding: 0.1rem 0.4rem;
    border: 1px solid rgba(201, 162, 39, 0.5);
    border-radius: 3px;
    color: var(--gold);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    vertical-align: middle;
}
.week-watch {
    display: inline-block;
    margin-top: 1rem;
    color: var(--gold-light);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-label, 0.72rem);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-decoration: none;
    text-transform: uppercase;
}
.week-watch:hover,
.week-watch:focus-visible {
    color: var(--white);
    text-decoration: underline;
}

/* Archive and sponsor pages -------------------------------------- */
.archive-list { grid-template-columns: repeat(auto-fit, minmax(min(100%, 22.5rem), 1fr)); }
.sponsor-page section { padding: clamp(2.25rem, 4vw, 3.5rem) 0; }
.sponsor-page .section-header { margin-bottom: clamp(1.25rem, 2.5vw, 1.75rem); }
.sponsor-page .section-title { font-size: clamp(2.25rem, 4vw, 3.5rem); }
.sponsor-hero-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(18rem, 27.5rem);
    gap: 2.5rem;
    align-items: center;
}

/* Eastonmade has no product photo, so its hero runs a single column
   rather than repeating the wordmark in the media slot. */
.sponsor-hero-grid.solo {
    grid-template-columns: minmax(0, 1fr);
}
.sponsor-hero-grid.solo .sponsor-copy {
    max-width: 46rem;
}
.sponsor-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.1rem;
}
.sponsor-hero .eyebrow {
    margin: 0;
    color: var(--gold-light);
    font-size: var(--fs-sm, 0.84rem);
    font-weight: 700;
}
.sponsor-logo {
    width: auto;
    height: auto;
    max-width: min(100%, 21.25rem);
    max-height: 7.75rem;
    object-fit: contain;
}
.sponsor-logo.logo-wide { max-height: 6.5rem; }
.sponsor-hero h1 {
    max-width: none;
    font-size: clamp(2.3rem, 4vw, 3.25rem);
    line-height: 1;
}
.sponsor-hero .sponsor-lead {
    margin: 0;
    max-width: 54ch;
    color: var(--text-muted);
    font-size: var(--fs-lead);
    font-weight: 400;
}
.sponsor-offer {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
}
.sponsor-offer strong {
    color: var(--gold-light);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-title);
    letter-spacing: 0.06em;
    text-transform: uppercase;
}
.sponsor-media {
    aspect-ratio: 4 / 3;
    margin: 0;
    overflow: hidden;
    border: 1px solid var(--line);
    border-radius: var(--radius);
    background: #181818;
}
.sponsor-media img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}
.sponsor-media.cover img {
    object-fit: cover;
}
.sponsor-logo-panel {
    display: grid;
    place-items: center;
    padding: 2rem;
}
.sponsor-logo-panel img {
    width: auto;
    height: auto;
    max-width: 78%;
    max-height: 7.5rem;
    opacity: 0.9;
}
.featured-list {
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 26.25rem), 1fr));
}
.featured-row { align-items: center; }
.featured-copy {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}
.featured-row .featured-title {
    color: var(--text);
    font-size: var(--fs-body);
}
.featured-row .featured-date { color: var(--text-dim); }
.sponsor-page .sponsor-disclosure {
    padding: clamp(1.75rem, 3vw, 2.5rem) 0;
}
@media (max-width: 860px) {
    .sponsor-hero-grid {
        grid-template-columns: 1fr;
    }
    .sponsor-media {
        width: min(100%, 34rem);
    }
}
@media (max-width: 540px) {
    .sponsor-hero-grid {
        gap: 1.75rem;
    }
    .sponsor-hero h1 {
        font-size: clamp(2.2rem, 11vw, 3.25rem);
    }
    .featured-row {
        gap: 0.5rem 1rem;
    }
}

/* The video's own title, under the section heading in the weekly block. */
.week-video-title {
    margin: 0.35rem 0 0;
    color: var(--white);
    font-family: "Oswald", Impact, sans-serif;
    font-size: var(--fs-lead, 1.1rem);
    font-weight: 500;
    letter-spacing: 0.02em;
}
