@layer base, components, utilities;
@layer components {
.ptero-methods {
 --methods-bg: var(--site-color-alternate);
 --methods-surface: var(--site-color-paper);
 --methods-border: var(--site-color-line);
 --methods-ink: var(--site-color-ink);
 --methods-body: var(--site-color-muted);
 --methods-muted: var(--site-color-methods-muted);
 padding: var(--site-space-96) var(--site-space-24);
 background: var(--methods-bg);
 color: var(--methods-ink);
 font-family: var(--type-font-text);
}
.ptero-methods *, .ptero-methods *::after { box-sizing: border-box; }
.ptero-methods-inner { container: methods / inline-size; max-width: 1200px; margin: 0 auto; }
.ptero-methods-intro { text-align: center; }
.ptero-methods h2 { scroll-margin-top: 120px; margin: 0; color: var(--methods-ink); font-family: var(--type-font-text); font-size: var(--type-heading-1-size); font-weight: var(--type-heading-1-weight); line-height: var(--type-heading-1-line); letter-spacing: var(--type-heading-1-track); }
.ptero-methods-intro > p { margin: var(--site-space-16) 0 0; color: var(--methods-body); font: var(--type-weight-regular) var(--type-body-size)/var(--type-line-body) var(--type-font-text); }
.ptero-methods .ptero-methods-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: var(--site-space-32); margin: var(--site-space-40) 0 0; padding: 0; list-style: none; }
.ptero-methods .ptero-methods-list li { container: method-card / inline-size; min-width: 0; margin: 0; padding: 0; list-style: none; }
.ptero-methods-card { min-width: 0; }
.ptero-methods-media { display: flex; align-items: center; justify-content: center; width: 100%; aspect-ratio: 1920 / 989; margin-bottom: var(--site-space-24); overflow: hidden; border: 1px solid var(--methods-border); border-radius: var(--radius-card); box-shadow: none; background: var(--methods-surface); }
.ptero-methods .ptero-methods-media img { display: block; width: 100%; height: auto; max-height: 100%; object-fit: contain; }
.ptero-methods-copy { min-width: 0; }
.ptero-methods h3 { max-width: 100%; white-space: normal; overflow-wrap: break-word; margin: 0; color: var(--methods-ink); font: var(--type-heading-4-weight) var(--type-heading-4-size)/var(--type-heading-4-line) var(--type-font-text); letter-spacing: var(--type-heading-4-track); }
.ptero-methods-copy > p { max-width: 100%; white-space: normal; overflow-wrap: break-word; margin: 0; color: var(--methods-body); font: var(--type-weight-regular) var(--type-body-size)/var(--type-line-body) var(--type-font-text); }
/* HOME-REFINE-01: weight and arrow mark the section action; Stego is an underlined prose link. */
.ptero-methods .ptero-methods-explore { display: inline-flex; align-items: center; gap: var(--site-space-4); border-radius: var(--radius-button); color: var(--site-color-accent-text); font-weight: var(--type-weight-semibold); text-decoration: none; white-space: nowrap; }
.ptero-methods .ptero-methods-explore svg { flex: none; }
.ptero-methods .ptero-methods-explore:hover { color: var(--site-color-accent-text-hover); text-decoration: none; }
/* Scenario Testing links Stego like its card on the Ptero page: a corner
   arrow with a "Built in Stego" tip, not a link inside the sentence. */
.ptero-methods-copy:has(> .ptero-methods-jump) { position: relative; }
.ptero-methods-copy:has(> .ptero-methods-jump) > h3 { padding-right: var(--site-space-40); }
.ptero-methods .ptero-methods-jump {
 position: absolute; top: calc((var(--type-heading-4-size) * var(--type-heading-4-line) - 32px) / 2); right: calc(-1 * var(--site-space-6));
 display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--radius-control);
 color: var(--methods-body); text-decoration: none; transition: background-color 100ms ease-out, color 100ms ease-out;
}
.ptero-methods-jump svg { width: 20px; height: 20px; }
.ptero-methods .ptero-methods-jump:is(:hover, :focus-visible) { background: var(--site-color-line); color: var(--methods-ink); }
.ptero-methods-jump-tip {
 position: absolute; top: calc(100% + var(--site-space-6)); right: 0; padding: var(--site-space-4) var(--site-space-8);
 border-radius: var(--site-radius-small); background: var(--methods-ink); color: var(--site-color-paper);
 font-size: var(--type-caption-size); font-weight: var(--type-weight-medium); line-height: var(--type-line-body);
 white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity 100ms ease-out;
}
.ptero-methods-jump:is(:hover, :focus-visible) .ptero-methods-jump-tip { opacity: 1; }

.ptero-methods a:focus-visible { outline: var(--site-focus-ring); outline-offset: var(--site-space-2); }

.ptero-methods a.ptero-methods-image { display: flex; position: relative; border-radius: var(--radius-card); color: var(--methods-ink); cursor: zoom-in; text-decoration: none; white-space: normal; }
:where(.ptero-methods-tag) { display: inline-block; margin-left: var(--site-space-8); padding: var(--site-space-4) var(--site-space-8); border: 0; border-radius: var(--site-radius-small); background: var(--site-color-accent-soft); color: var(--site-color-accent-text-hover); -webkit-text-fill-color: currentColor; font: var(--type-weight-semibold) var(--type-caption-size)/var(--type-line-body) var(--type-font-text); letter-spacing: 0; white-space: nowrap; vertical-align: middle; }
/* Only section spacing follows the viewport; inner layouts follow their boxes. */
@media (max-width: 899px) {
 .ptero-methods { padding: var(--site-space-64) var(--site-space-16); }
}
@container methods (max-width: 899px) {
 .ptero-methods .ptero-methods-list { grid-template-columns: minmax(0, 1fr); gap: var(--site-space-56); margin-top: var(--site-space-40); }
}
/* A query cannot restyle its own container: li owns containment, and this
   inner wrapper owns the media/copy grid. Narrow cards stay stacked. */
@container method-card (min-width: 568px) {
 .ptero-methods-card { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 3fr); gap: var(--site-space-24); align-items: start; }
 .ptero-methods-media { margin-bottom: 0; }
}
@media (prefers-reduced-motion: reduce) { .ptero-methods-jump, .ptero-methods-jump-tip { transition: none; } }
}
@layer utilities {
  /* SITE-LAYOUT-04: card title to description is 16px, outranking the shared 20px heading rhythm. */
  .ptero-methods .ptero-methods-list .ptero-methods-copy > h3 { margin-bottom: var(--site-space-16); }
}
