/* PhotoWorks Online Photo Sharpener
   Load AFTER the site's style.css and media.css.
   The page itself is built on the site's classes (.home-article, .entry-content, .c-list-ordered,
   .c-contents-list, .button-green, .promo …). This file adds only:
   1) .pws-hero / .pws-crumbs — hero tweaks for the tool,
   2) .pwp-*                 — new article blocks, drawn in the site's style,
   3) .pws                   — the tool itself.
   Palette and fonts are the site's own: #00ab47 / #6534ac / #eedd75 / #edd118 / #454543 / #5e5d57,
   BebasNeueBold for display text, RobotoCondensed-Bold / -Regular for UI. */

/* ===================== 1. Hero ===================== */
.home-article.pws-hero { padding-bottom: 70px; } /* top padding stays as in the site CSS (clears the header) */
.pws-hero h2 { margin-bottom: 34px; }
.pws-crumbs { margin: 0 0 26px; text-align: left; font-size: 14px; color: #e5e3d3; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }
.pws-crumbs a { color: #e5e3d3; text-decoration: underline; }
.pws-crumbs a:hover { color: #eedd75; text-decoration: none; }
.pws-crumbs > span[aria-hidden] { margin: 0 6px; }
.pws-hero__note { margin-top: 22px; font-size: 17px; line-height: 1.5; color: #e5e3d3; text-shadow: 0 1px 2px rgba(0, 0, 0, .6); }
.pws-hero__note a { color: #eedd75; }
.pws-hero__note a:hover { color: #fff; }

/* ===================== 2. Article blocks (.entry-content) ===================== */
.entry-content .pwp-answer { margin: 10px 0 45px; padding: 28px 30px 14px; background: #fff; border: 1px solid #dbdbdb; border-left: 10px solid #edd118; }
.entry-content .pwp-answer h3 { padding: 0 0 12px; }

.pwp-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin: 5px 0 35px; }
.entry-content .pwp-card { padding: 24px 26px 8px; background: #fff; border: 1px solid #dbdbdb; }
.entry-content .pwp-card h3 { padding: 0 0 16px; font-size: 22px; }
.entry-content .pwp-card h3::before { content: ''; display: inline-block; width: 12px; height: 12px; margin: 0 10px 2px 0; vertical-align: middle; }
.pwp-card--yes h3::before { background: #00ab47; }
.pwp-card--no h3::before { background: #edd118; }
.entry-content .pwp-card ul.list-marker li { font-size: 18px; line-height: 27px; }
.pwp-b, .entry-content ul.list-marker li b.pwp-b { font-family: 'RobotoCondensed-Bold'; color: #454543; }

.pwp-table-wrap { overflow-x: auto; margin: 10px 0 25px; background: #fff; border: 1px solid #dbdbdb; }
.pwp-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 17px; line-height: 1.45; color: #5e5d57; }
.pwp-table th, .pwp-table td { padding: 13px 16px; border-bottom: 1px solid #e6e6e6; text-align: left; vertical-align: top; }
.pwp-table thead th { background: #3a3728; color: #eedd75; font-family: 'RobotoCondensed-Bold'; font-size: 17px; text-transform: uppercase; letter-spacing: .5px; border-bottom: 0; }
.pwp-table tbody th { width: 24%; font-family: 'RobotoCondensed-Bold'; color: #454543; }
.pwp-table td:last-child { background: #f1f9f4; color: #454543; }
.pwp-table tr:last-child th, .pwp-table tr:last-child td { border-bottom: 0; }

.entry-content p.pwp-center { text-align: center; font-size: 17px; }

.entry-content p.pwp-label {
  display: inline-block; margin: -10px 0 20px; padding: 3px 12px;
  font-family: 'RobotoCondensed-Bold'; font-size: 14px; line-height: 1.5; text-transform: uppercase; letter-spacing: .5px; text-align: left;
}
.entry-content p.pwp-label--online { background: #e3f5ea; color: #00913d; }
.entry-content p.pwp-label--online a { color: #00913d; text-decoration: none; }
.entry-content p.pwp-label--online a:hover { color: #00ab47; }
.entry-content p.pwp-label--desktop { background: #efe7fa; color: #6534ac; }

.pwp-faq { margin: 0 0 20px; border-top: 1px solid #dbdbdb; }
.pwp-faq details { border-bottom: 1px solid #dbdbdb; }
.pwp-faq summary {
  position: relative; padding: 18px 44px 18px 0; cursor: pointer; list-style: none;
  font-family: 'RobotoCondensed-Bold'; font-size: 21px; line-height: 1.3; color: #454543;
}
.pwp-faq summary::-webkit-details-marker { display: none; }
.pwp-faq summary::after { content: '+'; position: absolute; right: 8px; top: 12px; font-size: 32px; line-height: 1; color: #6534ac; }
.pwp-faq details[open] summary::after { content: '\2212'; }
.pwp-faq summary:hover { color: #763dcc; }
.pwp-faq details > div { padding: 0 0 6px; }

.entry-content ul.pwp-related { columns: 2; column-gap: 40px; }
.entry-content ul.pwp-related li { break-inside: avoid; }

@media (max-width: 767px) {
  .home-article.pws-hero { padding-bottom: 50px; }
  .pws-hero h2 { margin-bottom: 24px; font-size: 20px; }
  .pwp-cols { grid-template-columns: 1fr; gap: 16px; }
  .entry-content .pwp-answer { padding: 22px 18px 10px; border-left-width: 6px; }
  .entry-content ul.pwp-related { columns: 1; }
  .pwp-faq summary { font-size: 19px; }
}

/* ===================== 3. The tool (.pws) ===================== */
.pws {
  --pws-green: #00ab47;
  --pws-green-h: #00cc55;
  --pws-green-d: #00913d;
  --pws-purple: #6534ac;
  --pws-purple-h: #763dcc;
  --pws-yellow: #eedd75;
  --pws-yellow-h: #e4d05a;
  --pws-accent: #edd118;
  --pws-ink: #454543;
  --pws-text: #5e5d57;
  --pws-line: #dbdbdb;
  --pws-panel: #f2f2f2;
  --pws-bg: #f6f6f6;
  --pws-brown: #634e2f;
  --pws-display: 'BebasNeueBold', 'Bebas Neue', Impact, sans-serif;
  --pws-bold: 'RobotoCondensed-Bold', 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  --pws-reg: 'RobotoCondensed-Regular', 'Roboto Condensed', 'Arial Narrow', Arial, sans-serif;
  position: relative;
  margin: 0 auto;
  color: var(--pws-text);
  font-family: var(--pws-reg);
  font-size: 16px;
  line-height: 1.45;
  text-align: left;
  text-shadow: none;
  box-sizing: border-box;
}
.pws *, .pws *::before, .pws *::after { box-sizing: border-box; }
.pws [hidden] { display: none !important; }
.pws p { margin: 0; padding: 0; }
.pws b { font-family: var(--pws-bold); }
.pws__ico { width: 18px; height: 18px; flex: none; }

.pws__card { position: relative; padding: 20px; background: #fff; border-radius: 2px; box-shadow: 0 18px 45px rgba(0, 0, 0, .45); }
.pws__stage { position: relative; min-height: 440px; }

/* Empty state */
.pws__drop {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px;
  min-height: 440px; padding: 32px 16px; text-align: center;
  background: var(--pws-bg); border: 2px dashed #cfcfcf; border-radius: 2px;
  transition: border-color .3s, background .3s;
}
.pws--drag .pws__drop, .pws--drag .pws__view { border-color: var(--pws-green); background: #eefaf2; }
.pws__drop-icon { width: 64px; height: 64px; color: var(--pws-green); }
.pws__drop-title { font-family: var(--pws-display); font-size: 42px; line-height: 1.05; letter-spacing: 1px; color: var(--pws-ink); }
.pws__drop-or { color: #8a897f; font-size: 14px; text-transform: uppercase; letter-spacing: .1em; }
.pws__hint { color: var(--pws-text); font-size: 15px; }
.pws__file { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; clip: rect(0 0 0 0); }
.pws__file:focus-visible + .pws__btn { outline: 3px solid var(--pws-purple); outline-offset: 2px; }

/* Buttons & links */
.pws__btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 8px 26px; border: 0; border-radius: 2px; cursor: pointer;
  font-family: var(--pws-bold); font-size: 18px; line-height: 1.2; text-transform: uppercase; text-decoration: none;
  transition: background .3s, color .3s, border-color .3s;
}
.pws .pws__btn--primary { background: var(--pws-green); color: #f7f6f0; }
.pws .pws__btn--primary:hover { background: var(--pws-green-h); color: #f7f6f0; }
.pws label.pws__btn--primary { min-height: 62px; padding: 8px 40px; font-size: 20px; }
.pws .pws__btn--auto { width: 100%; background: var(--pws-yellow); color: #3a3728; }
.pws .pws__btn--auto:hover { background: var(--pws-yellow-h); }
.pws .pws__btn--ghost { background: #fff; color: var(--pws-ink); border: 2px solid #e5e3d3; }
.pws .pws__btn--ghost:hover { border-color: var(--pws-yellow); }
.pws__btn--block { width: 100%; }
.pws__btn:focus-visible, .pws__chip:focus-visible, .pws__link:focus-visible, .pws__handle:focus-visible,
.pws__locked-btn:focus-visible, .pws__presets button:focus-visible, .pws__cta-link:focus-visible, .pws__tune summary:focus-visible {
  outline: 3px solid var(--pws-purple); outline-offset: 2px;
}
.pws__link {
  padding: 0; border: 0; background: none; cursor: pointer;
  color: var(--pws-purple); font: inherit; font-size: 16px; text-decoration: underline; text-underline-offset: 2px;
  transition: color .3s;
}
.pws__link:hover { color: #ae76ff; }

/* Trust row */
.pws .pws__trust {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 24px;
  margin: 14px 0 0; padding: 0; list-style: none; color: var(--pws-text); font-size: 15px;
}
.pws .pws__trust li { display: inline-flex; align-items: center; gap: 7px; list-style: none; }
.pws .pws__trust li::before { content: ''; width: 13px; height: 7px; margin-top: -4px; border: solid var(--pws-green); border-width: 0 0 2px 2px; transform: rotate(-45deg); }

/* Notices */
.pws__notice, .pws__inline-notice {
  position: relative; margin: 0 0 14px; padding: 14px 44px 14px 18px;
  background: #fffbe6; border: 1px solid #efe3a1; border-left: 6px solid var(--pws-accent); border-radius: 2px; font-size: 15px;
}
.pws__inline-notice { margin: 12px 0 0; padding-right: 18px; }
.pws__notice p + p, .pws__inline-notice p + p { margin-top: 4px; }
.pws__notice-title { font-family: var(--pws-bold); font-size: 17px; color: var(--pws-ink); }
.pws__notice-x { position: absolute; top: 10px; right: 10px; padding: 4px; border: 0; background: none; cursor: pointer; color: var(--pws-text); }
.pws__notice a, .pws__inline-notice a { color: var(--pws-purple); }

/* Editor */
.pws__editor { display: grid; grid-template-columns: minmax(0, 1fr) 290px; gap: 20px; align-items: start; }
.pws__view {
  position: relative; display: flex; align-items: center; justify-content: center;
  min-height: 360px; max-height: 580px; padding: 8px; overflow: hidden;
  background: repeating-conic-gradient(#ececec 0 25%, #fff 0 50%) 0 0 / 16px 16px;
  border: 1px solid var(--pws-line); border-radius: 2px;
}
.pws__frame { position: relative; display: inline-block; line-height: 0; --pws-pos: 50%; cursor: ew-resize; touch-action: pan-y; user-select: none; -webkit-user-select: none; }
.pws__canvas { display: block; width: auto; height: auto; max-width: 100%; max-height: 560px; }
.pws__canvas--before { position: absolute; inset: 0; width: 100%; height: 100%; max-height: none; clip-path: inset(0 calc(100% - var(--pws-pos)) 0 0); }
.pws__handle { position: absolute; top: 0; bottom: 0; left: var(--pws-pos); width: 3px; margin-left: -1.5px; background: #fff; box-shadow: 0 0 12px rgba(51, 51, 51, .5); }
.pws__handle span {
  position: absolute; top: 50%; left: 50%; width: 40px; height: 40px; margin: -20px 0 0 -20px;
  background: #fff; border-radius: 50%; box-shadow: 0 0 12px rgba(51, 51, 51, .5);
}
.pws__handle span::before, .pws__handle span::after {
  content: ''; position: absolute; top: 50%; width: 0; height: 0; margin-top: -6px; border: 6px solid transparent;
}
.pws__handle span::before { left: 3px; border-right-color: var(--pws-ink); }
.pws__handle span::after { right: 3px; border-left-color: var(--pws-ink); }
.pws__tag {
  position: absolute; top: 12px; padding: 0 12px; pointer-events: none;
  background: rgba(36, 36, 36, .6); color: #fff; font-family: var(--pws-reg); font-size: 15px; line-height: 32px; letter-spacing: .05em;
}
.pws__tag--before { left: 12px; }
.pws__tag--after { right: 12px; }
.pws__busy {
  position: absolute; top: 14px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; padding: 6px 14px;
  background: rgba(255, 255, 255, .95); border-radius: 2px; box-shadow: 0 2px 8px rgba(0, 0, 0, .2); font-size: 14px; color: var(--pws-ink);
}
.pws__spinner { width: 14px; height: 14px; border: 2px solid var(--pws-line); border-top-color: var(--pws-green); border-radius: 50%; animation: pws-spin .8s linear infinite; }
@keyframes pws-spin { to { transform: rotate(360deg); } }

/* Zoom 100% */
.pws--zoom .pws__view { display: block; padding: 0; overflow: auto; }
.pws--zoom .pws__frame { cursor: auto; touch-action: auto; }
.pws--zoom .pws__canvas { max-width: none; max-height: none; }
.pws--zoom .pws__canvas--before, .pws--zoom .pws__handle, .pws--zoom .pws__tag { display: none; }
.pws--zoom.pws--orig .pws__canvas--before { display: block; clip-path: none; }

.pws__toolbar { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.pws__chip {
  min-height: 36px; padding: 6px 14px; border: 1px solid var(--pws-line); border-radius: 2px;
  background: #fff; color: var(--pws-ink); font-family: var(--pws-bold); font-size: 14px; text-transform: uppercase; letter-spacing: .3px;
  cursor: pointer; user-select: none; transition: border-color .3s, color .3s;
}
.pws__chip:hover { border-color: var(--pws-purple); color: var(--pws-purple); }
.pws__chip[aria-pressed="true"] { background: #f1eafb; border-color: var(--pws-purple); color: var(--pws-purple); }
.pws__status { min-height: 22px; margin-top: 8px; color: var(--pws-text); font-size: 15px; }

/* Panel */
.pws__panel { display: flex; flex-direction: column; gap: 14px; }
.pws__presets { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; border: 0; min-width: 0; }
.pws__presets legend { width: 100%; margin: 0 0 6px; padding: 0; font-family: var(--pws-bold); font-size: 15px; color: var(--pws-ink); text-transform: uppercase; letter-spacing: .3px; }
.pws__presets button {
  flex: 1 1 0; min-height: 38px; padding: 6px 8px; border: 1px solid var(--pws-line); border-radius: 2px;
  background: #fff; color: var(--pws-ink); font-family: var(--pws-reg); font-size: 16px; cursor: pointer; transition: border-color .3s, color .3s;
}
.pws__presets button:hover { border-color: var(--pws-purple); color: var(--pws-purple); }
.pws__presets button[aria-pressed="true"] { background: #f1eafb; border-color: var(--pws-purple); color: var(--pws-purple); font-family: var(--pws-bold); }
.pws__field-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; }
.pws__field label { font-family: var(--pws-bold); font-size: 16px; color: var(--pws-ink); }
.pws__field output { color: var(--pws-text); font-size: 15px; font-variant-numeric: tabular-nums; }
.pws__field input[type="range"] { width: 100%; margin: 6px 0 2px; accent-color: var(--pws-green); cursor: pointer; }
.pws__help { color: var(--pws-text); font-size: 14px; line-height: 1.35; }
.pws__reset { align-self: flex-start; font-size: 15px; }
.pws__export { display: flex; flex-direction: column; gap: 8px; }
.pws__size { color: var(--pws-text); font-size: 14px; }
.pws .pws__fullres { color: var(--pws-purple); font-size: 15px; font-family: var(--pws-bold); transition: color .3s; }
.pws .pws__fullres:hover { color: #ae76ff; }

/* Fine-tune */
.pws__tune { border-top: 1px solid var(--pws-line); padding-top: 12px; }
.pws__tune summary { position: relative; padding-right: 24px; cursor: pointer; list-style: none; font-family: var(--pws-bold); font-size: 16px; color: var(--pws-ink); text-transform: uppercase; letter-spacing: .3px; }
.pws__tune summary::-webkit-details-marker { display: none; }
.pws__tune summary::after { content: '+'; position: absolute; right: 2px; top: -5px; font-size: 26px; color: var(--pws-purple); }
.pws__tune[open] summary::after { content: '\2212'; }
.pws__tune-body { display: flex; flex-direction: column; gap: 12px; margin-top: 12px; }

/* Desktop features — a separate card under the tool */
.pws__locked { margin-top: 20px; padding: 20px 24px 22px; background: #fff; border-radius: 2px; box-shadow: 0 18px 45px rgba(0, 0, 0, .45); }
.pws__locked-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 14px; }
.pws__locked-title { font-family: var(--pws-display); font-size: 30px; line-height: 1.1; letter-spacing: 1px; color: var(--pws-ink); }
.pws__locked-sub { font-size: 16px; color: var(--pws-text); }
.pws .pws__locked ul { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; padding: 0; list-style: none; }
.pws .pws__locked li { margin: 0; padding: 0; list-style: none; background: none; }
.pws__locked-btn {
  display: flex; align-items: center; gap: 12px; width: 100%; height: 100%; padding: 12px 14px;
  border: 1px solid var(--pws-line); border-radius: 2px; background: var(--pws-bg); color: var(--pws-ink); font: inherit; text-align: left; cursor: pointer;
  transition: background .3s, border-color .3s;
}
.pws__locked-btn:hover { background: #fff; border-color: var(--pws-purple); }
.pws__locked-btn:hover b { color: var(--pws-purple-h); }
.pws__locked-btn .pws__ico { width: 20px; height: 20px; color: var(--pws-brown); }
.pws__locked-btn span { display: flex; flex-direction: column; line-height: 1.25; }
.pws__locked-btn b { font-size: 16px; color: var(--pws-ink); transition: color .3s; }
.pws__locked-btn small { color: var(--pws-text); font-size: 14px; }

/* CTA block (notices + dialogs) */
.pws__cta { margin-top: 16px; }
.pws__cta--compact { margin-top: 10px; }
.pws__cta-row { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.pws__cta-text { margin-bottom: 10px !important; }
.pws .pws__cta-link { color: var(--pws-purple); text-decoration: underline; text-underline-offset: 2px; transition: color .3s; }
.pws .pws__cta-link:hover { color: #ae76ff; }
.pws__cta > .pws__cta-link { display: inline-block; margin-top: 12px; }
.pws__cta-trial { margin-top: 10px !important; color: var(--pws-text); font-size: 13px; }

/* Dialog — margin:auto restores centring after the site's global * { margin: 0 } reset */
.pws__dialog { width: calc(100% - 32px); max-width: 520px; margin: auto; padding: 0; border: 0; border-radius: 2px; box-shadow: 0 20px 60px rgba(0, 0, 0, .45); color: var(--pws-text); font-family: var(--pws-reg); }
.pws__dialog[open]:not(:modal) { position: fixed; top: 50%; left: 50%; transform: translate(-50%, -50%); z-index: 1000; }
.pws__dialog::backdrop { background: rgba(26, 26, 26, .7); }
.pws__dialog-box { position: relative; padding: 30px 30px 24px; border-top: 4px solid var(--pws-accent); }
.pws__dialog-x { position: absolute; top: 12px; right: 12px; padding: 6px; border: 0; background: none; cursor: pointer; color: var(--pws-text); }
.pws__dialog-title { position: relative; padding: 0 24px 22px 0 !important; font-family: var(--pws-display); font-size: 36px; line-height: 1.05; letter-spacing: 1px; color: var(--pws-ink); }
.pws__dialog-title::after { content: ''; position: absolute; left: 0; bottom: 10px; width: 30px; height: 2px; background: var(--pws-accent); }
.pws__dialog-text { font-size: 17px; line-height: 1.5; }
.pws__dialog-close { display: block; margin: 18px auto 0; font-size: 16px; }

@media (max-width: 767px) {
  .pws__card { padding: 12px; }
  .pws__stage, .pws__drop { min-height: 340px; }
  .pws__drop-title { font-size: 34px; }
  .pws__view { min-height: 240px; max-height: 62vh; }
  .pws__canvas { max-height: calc(62vh - 16px); }
  .pws__dialog-box { padding: 26px 18px 18px; }
  .pws__dialog-title { font-size: 30px; }
  .pws__locked { margin-top: 14px; padding: 16px 12px; }
  .pws__locked-title { font-size: 26px; }
  .pws .pws__locked ul { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .pws__locked-btn { padding: 10px 8px; gap: 8px; }
  .pws__locked-btn b { font-size: 14px; }
  .pws__locked-btn small { font-size: 12px; }
  /* Phones: photo → controls + download → desktop features */
  .pws__editor:not([hidden]) { display: flex; flex-direction: column; gap: 12px; }
  .pws__main { display: contents; }
  .pws__toolbar, .pws__status, .pws__inline-notice { margin-top: 0; }
  .pws__panel { order: 2; }
}
