@font-face {
  font-family: Inter;
  src: url("inter-cyrillic.woff2") format("woff2");
  font-weight: 400 650;
  font-display: swap;
  unicode-range: U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116;
}
@font-face {
  font-family: Inter;
  src: url("inter-latin.woff2") format("woff2");
  font-weight: 400 650;
  font-display: swap;
  unicode-range: U+0000-00FF,U+2000-206F,U+2190-2199;
}
:root {
  color-scheme: light;
  --ink: #101010;
  --muted: #282828;
  --paper: #fff;
  --soft: #f8f7f4;
  --amber: #f6b945;
  --hover: #efa928;
  --brand: #ea922a;
  --line: #e5e5e5;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--paper); color: var(--ink); font: 400 16px/1.5 Inter, Arial, sans-serif; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 2px solid var(--ink); outline-offset: 4px; }
a:hover { text-decoration: underline; }
button { font: inherit; }
button, summary { cursor: pointer; }
figure, h1, h2, h3, p { margin: 0; }
h1, h2, h3 { font-weight: 650; line-height: 1.04; letter-spacing: -.042em; text-wrap: balance; }
h2 { font-size: clamp(33px, 4.2vw, 48px); }
h3 { font-size: 21px; }
p { color: var(--muted); }
.shell { width: min(1180px, calc(100% - clamp(28px, 7vw, 88px))); margin-inline: auto; }
.topbar, .navigation, .actions, .footer-inner, .footer nav { display: flex; align-items: center; }
.topbar { justify-content: space-between; gap: 18px; min-height: 65px; }
.navigation { gap: clamp(10px, 1.2vw, 18px); font-size: 14px; }
.actions { gap: 10px; }
.brand { font-size: clamp(24px, 3vw, 34px); font-weight: 650; letter-spacing: -.075em; white-space: nowrap; }
.brand b { color: var(--brand); font-weight: inherit; }
.button { display: inline-flex; justify-content: center; align-items: center; gap: 12px; padding: 10px 16px; background: var(--amber); color: var(--ink); font-weight: 600; border: 0; }
.button:hover { background: var(--hover); text-decoration: none; }
.secondary { background: transparent; }
.secondary:hover { background: var(--soft); }
.hero { padding-block: clamp(36px, 5vw, 64px) 32px; text-align: center; }
.eyebrow { font-size: 13px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: var(--ink); }
.hero h1 { margin: 20px auto 15px; font-size: clamp(56px, 5vw, 72px); }
.intro { max-width: 690px; margin-inline: auto; font-size: clamp(18px, 2vw, 21px); }
.hero-button { min-height: 52px; margin-block: 26px 9px; padding-inline: clamp(22px, 5vw, 47px); font-size: 18px; }
.hint { font-size: 13px; }
.mode-controls { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 0 auto clamp(22px, 4vw, 45px); max-width: 1080px; }
.mode-controls button { background: var(--paper); border: 0; border-bottom: 2px solid var(--line); min-height: 46px; padding: 4px 8px; color: var(--ink); }
.mode-controls button:hover { background: var(--soft); }
.mode-controls [aria-pressed="true"] { border-bottom-color: var(--brand); font-weight: 600; }
.cards, .columns { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(14px, 1.8vw, 24px); }
.card { display: flex; flex-direction: column; min-width: 0; }
.card h2 { margin: 13px 0 7px; font-size: clamp(21px, 2.3vw, 26px); text-wrap: initial; }
.card p { flex: 1; margin-bottom: 16px; }
.card a { width: fit-content; font-weight: 600; }

.pair, .gallery-images { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 3px; }
.pair figure, .gallery-images figure { min-width: 0; overflow: hidden; background: var(--soft); }
.pair img, .gallery-images img { display: block; width: 100%; height: 100%; object-fit: cover; }
.card .pair figure { aspect-ratio: 2 / 3; }
.feature, .gallery { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: center; gap: clamp(18px, 4vw, 48px); margin-block: clamp(36px, 6vw, 72px); }
.feature figure { aspect-ratio: 216 / 248; }
.feature p, .gallery p { margin-block: 12px 18px; }
.tool-links { display: flex; flex-wrap: wrap; gap: 8px; }
.tool-links a { padding: 6px 9px; font-size: 15px; }
.gallery { grid-template-columns: 2fr 3fr; padding: clamp(16px, 3vw, 36px); background: var(--soft); }
.gallery-images { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.gallery-images figure { aspect-ratio: 140 / 158; }
.info { padding-block: clamp(32px, 5vw, 64px); }
.info h2 { margin-bottom: 24px; }
.columns p { margin-top: 8px; }
ol.columns { margin: 0; padding-left: 20px; gap: 32px; }
.faq details { padding-block: 12px; }
.faq details p { margin: 8px 0 0 17px; }
.faq details a { text-decoration: underline; }
.faq > .button { margin-top: 25px; }
.footer-inner { justify-content: space-between; flex-wrap: wrap; gap: 15px; padding-block: 22px; }
.footer nav { flex-wrap: wrap; gap: 10px 18px; }

@media (max-width: 1050px) {
  .hero h1 { font-size: 52px; }
}
@media (max-width: 620px) {
  .hero h1 { font-size: clamp(40px, 12.3vw, 48px); }
  .hero h1 br { display: none; }
  .mode-controls, .feature, .gallery { grid-template-columns: minmax(0, 1fr); }
  .mode-controls { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cards, .columns { grid-template-columns: minmax(0, 1fr); }
  .gallery-images { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .actions { gap: 6px; font-size: 13px; }
  .actions .button { padding: 6px 10px; }
  .navigation { font-size: 13px; }
  .feature > div:last-child { grid-row: 1; }
}

.menu-toggle { display: none; }
.languages { position: relative; }
.languages ul { position: absolute; right: 0; z-index: 2; width: max-content; max-height: 60vh; overflow: auto; padding: 8px 14px; margin: 6px 0; list-style: none; background: var(--soft); }
.languages a { display: block; padding-block: 3px; }
.actions { white-space: nowrap; }
.comparison { padding-inline: clamp(16px,4vw,48px); background: var(--soft); }
.comparison-columns { display: grid; grid-template-columns: repeat(auto-fit,minmax(min(100%,240px),1fr)); gap: 24px; }
.comparison-columns p { margin-top: 10px; }
.examples-note { margin-bottom: 12px; }
.pair figure { position: relative; }
.split-source img { max-width: none; width: 200%; }
.split-source figure + figure img { transform: translateX(-50%); }
.pair figcaption { position: absolute; color: var(--ink); background: var(--amber); font-weight: 650; }
.pair figcaption { bottom: 6px; left: 6px; padding: 2px 5px; font-size: 13px; }
.split-source figure:first-child figcaption { color: white; background: var(--ink); }

@media (max-width: 380px) {
  .topbar { column-gap: 6px; }
  .actions .button { padding-inline: 5px; }
}

.showcase-grid { grid-template-columns: repeat(12,minmax(0,1fr)); gap: clamp(14px, 2vw, 24px); }
.showcase-card { grid-column: span 4; background: #f2f1ed; }
.showcase-card:nth-child(4n + 1), .showcase-card:nth-child(4n) { grid-column: span 8; }
.showcase-card .pair { gap: 4px; padding: 8px 8px 0; }
.showcase-card .pair figure { aspect-ratio: auto; height: clamp(156px, 19vw, 258px); }
.showcase-card .pair img { object-position: center; }
.showcase-copy { display: grid; grid-template-columns: minmax(0,1fr) auto; align-content: start; align-items: end; column-gap: 12px; padding: clamp(16px, 2vw, 28px); }
.showcase-copy h2 { grid-column: 1 / -1; margin: 0 0 7px; font-size: clamp(19px, 1.6vw, 23px); font-weight: 600; }
.showcase-copy p { margin: 0; font-size: 14px; line-height: 1.42; }
.showcase-copy a { font-size: 14px; white-space: nowrap; text-underline-offset: 3px; }
.video-highlight { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 20px; padding: 28px 0; }
.video-highlight p { margin-top: 8px; }
@media (max-width: 900px) {
  .showcase-copy { grid-template-columns: minmax(0,1fr); row-gap: 7px; }
  .showcase-copy h2 { margin-bottom: 0; }
}
@media (max-width: 620px) {
  .showcase-grid { grid-template-columns: minmax(0,1fr); }
  .showcase-grid .showcase-card { grid-column: 1; }
  .showcase-card .pair figure { height: clamp(148px, 47vw, 230px); }
  .showcase-copy a { padding-block: 4px; }
}

/* Keep the full source frame visible, including existing before/after labels. */
.showcase-card .pair img { object-fit: contain; }

.showcase-card .pair { background: #efede8; padding: 0; }
.showcase-grid:not(.funnel-grid) .showcase-card:first-child .pair:not(.split-source) { position: relative; grid-template-columns: minmax(0,1fr); }
.showcase-grid:not(.funnel-grid) .showcase-card:first-child .pair:not(.split-source) figure:first-child { position: absolute; z-index: 1; top: 12px; left: 12px; width: 27%; height: 68%; background: var(--paper); }
.showcase-grid:not(.funnel-grid) .showcase-card:first-child .pair:not(.split-source) figure:last-child { width: 71%; margin-left: auto; }

/* Studio: a wide lead and a narrow companion, then the reverse. */
.studio-grid .showcase-card { grid-column: span 4; }
.studio-grid .showcase-card:first-child, .studio-grid .showcase-card:last-child { grid-column: span 8; }
.studio-grid .showcase-copy { padding-block: 17px 21px; }
@media (max-width: 620px) {
  .showcase-grid.studio-grid .showcase-card { grid-column: 1; }
}

:root[data-site-theme="photo505"] .modes [data-examples] .showcase-card { background: #f2f1ed; }
:is(.studio-photos,.showcase-photos) {
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: clamp(4px, .6vw, 8px);
  padding: 15px 0 0;
}
:is(.studio-photos-4,.showcase-photos-4) { grid-template-columns: repeat(4, minmax(0,1fr)); }
:is(.studio-photos,.showcase-photos) img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 4;
  object-fit: cover;
}
@media (max-width: 620px) {
  :is(.studio-photos-4,.showcase-photos-4) {
    grid-template-columns: none;
    grid-auto-flow: column;
    grid-auto-columns: calc((100% - 4px) / 2);
    overflow-x: auto;
    scroll-snap-type: x mandatory;
  }
  :is(.studio-photos-4,.showcase-photos-4) img { scroll-snap-align: start; }
}

.showcase-copy .showcase-action {
  display: inline-flex;
  justify-self: start;
  justify-content: center;
  align-items: center;
  min-height: 40px;
  padding: 7px 13px;
  color: var(--ink);
  background: transparent;
  border: 1px solid #c9c7c1;
  border-radius: 7px;
  font-weight: 500;
}
.showcase-copy .showcase-action:hover {
  background: var(--paper);
  text-decoration: none;
}

.showcase-photos img { min-width: 0; object-fit: contain; }

.feature .tool-links { column-gap: 18px; row-gap: 4px; }
.feature .tool-links a {
  display: inline-flex;
  align-items: center;
  min-height: 32px;
  padding: 3px 0;
  text-decoration: underline;
  text-decoration-color: #9d9788;
  text-underline-offset: 4px;
}
.feature .tool-links a:hover { text-decoration-color: var(--ink); }
@media (width < 768px) {
  .mode-controls {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 4px;
    padding: 4px;
    border-radius: 16px;
    background: #f3f4f6;
  }
  .mode-controls button {
    min-width: 0;
    min-height: 38px;
    padding: 4px 6px;
    border: 1px solid transparent;
    border-radius: 12px;
    background: transparent;
    color: #4b5563;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.2;
  }
  .mode-controls button[aria-pressed="true"] {
    background: #fff;
    color: #111827;
    border-color: #e5e7eb;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    font-weight: 600;
  }
  .mode-controls button:not([aria-pressed="true"]):hover { background: transparent; }
  .mode-controls button:focus-visible { outline-offset: -3px; }
}

.header .mobile-signin { display: none; }
@media (768px <= width <= 1050px) {
  .header .topbar { gap: 8px; }
  .header .navigation { gap: 9px; font-size: 12px; white-space: nowrap; }
  .header .actions { gap: 5px; font-size: 13px; }
  .header .actions .button { padding-inline: 8px; }
}
@media (width < 768px) {
  .header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgb(255 255 255 / .95);
    backdrop-filter: blur(8px);
  }
  .header .topbar { min-height: 80px; gap: 8px; }
  .header .brand { font-size: 24px; letter-spacing: -.05em; }
  .header .actions { margin-left: auto; gap: 9px; font-size: 15px; }
  .header .actions .button { min-height: 42px; padding-inline: 10px; }
  .header .menu-toggle svg { width: 26px; height: 26px; }
  .header .actions .secondary { display: none; }
  .header .menu-toggle {
    display: inline-grid;
    order: 1;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    background: transparent;
    color: var(--ink);
  }
  .header .navigation {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    display: grid;
    gap: 0;
    max-height: calc(100dvh - 80px);
    overflow-y: auto;
    padding: 5px clamp(14px, 3.5vw, 32px) 12px;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    font-size: 16px;
  }
  .showcase-copy h2 { font-size: 22px; }
  .showcase-copy p, .feature .tool-links a { font-size: 16px; }
  .header .navigation a { display: flex; align-items: center; min-height: 40px; }
  .header .menu-toggle[aria-expanded="false"] + .navigation { display: none; }
}

.footer {
  background: #f9fafb;
  border-top: 1px solid #e5e7eb;
}
.footer .footer-inner { padding-block: 28px; }
.footer nav a, .footer-meta a { color: #4b5563; }
.footer a:hover { color: #111827; text-decoration: none; }
.footer-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; width: 100%; }
.footer-meta small { color: #4b5563; font-size: 13px; }
.footer-meta a { font-size: 14px; }

/* Keep compact navigation labels readable across localized tool pages. */
.p505-tool .topbar .actions { flex-shrink: 0; }
.p505-tool .topbar .actions a { white-space: nowrap; }
.p505-tool .topbar .navigation a { overflow-wrap: normal; }

.languages summary {
  display: flex;
  align-items: center;
  gap: .32em;
  list-style: none;
  cursor: pointer;
  white-space: nowrap;
}
.languages summary::-webkit-details-marker { display: none; }
.languages summary::after { content: '▾'; }
.languages[open] summary::after { content: '▴'; }
.languages ul {
  z-index: 5;
  min-width: 168px;
  max-width: calc(100vw - 32px);
  padding: 6px;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / 12%);
}
.languages a {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 6px 10px;
  border-radius: 7px;
}
.languages a:hover, .languages a:focus-visible { background: #f3f4f6; }
.languages a[aria-current] { font-weight: 600; }
.languages a[aria-current]::after { content: '✓' / ''; }

.pricing-page { padding-block: clamp(36px, 6vw, 84px); }
.pricing-page h1 { margin: 0; font-size: clamp(34px, 6vw, 64px); letter-spacing: -.045em; }
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr));
  gap: 16px;
  margin: 32px 0;
}
.pricing-plan {
  display: flex;
  flex-direction: column;
  padding: 24px;
  border: 2px solid #e5e5e0;
  border-radius: 12px;
  background: #fff;
}
.pricing-plan-popular { border-color: #111827; background: #fffbef; }
.pricing-plan-badges { display: flex; align-items: start; gap: 6px; flex-wrap: wrap; min-height: 27px; margin-bottom: 12px; }
.pricing-plan-badges span { border-radius: 6px; font-size: 13px; line-height: 1.2; padding: 6px 7px; }
.pricing-popular { color: #fff; background: #111827; }
.pricing-saving { color: #1b1b1a; background: #f5eccf; }
.pricing-buy { justify-content: center; margin-top: 22px; color: #111; background: #f5b82e; }
.pricing-guarantee { margin: 0; text-align: center; }
.pricing-plan h2 { margin: 0 0 12px; font-size: 22px; }
.pricing-plan p { margin: 7px 0 0; }
.pricing-amount { display: block; font-size: clamp(28px, 4vw, 42px); line-height: 1.15; }
