:root {
  --brand-ink: #142643;
  --brand-muted: #4f6078;
  --brand-paper: #f6f8fb;
  --brand-surface: #fff;
  --brand-soft: #eef2f9;
  --brand-line: #cdd7e4;
  --brand-action: #214a98;
  --brand-hover: #183979;
  --brand-focus: #2459bb;
  --brand-silver: #dbe6f7;
  --font-manrope: system-ui, -apple-system, BlinkMacSystemFont, "PingFang SC";
}
[hidden] { display: none !important; }
.header-inner { max-width: 1240px; padding-inline: 24px; }
.header-actions a { color: var(--ink); text-decoration: none; }
.header-actions a:hover { text-decoration: underline; }
.language { color: var(--forest); background: white; border: 1px solid var(--line); border-radius: 8px; min-height: 38px; padding: 0 12px; }
.tool-hero { background: #ecf1f8; }
.tool { width: min(100%, 1040px); padding: 14px; }
.effects { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 12px; }
.effect-card { grid-column: span 3; display: grid; align-content: start; }
.effect-card:nth-child(n + 5) { grid-column: span 4; }
.effect { grid-column: auto; display: grid; padding: 0; text-align: left; overflow: hidden; border: 1px solid var(--line); border-radius: 9px; color: var(--ink); background: white; transition: transform .16s, box-shadow .16s, border-color .16s; }
.effect-page { display: block; padding: 5px 12px 8px; margin-top: -3px; font-size: .82rem; font-weight: 640; color: var(--forest); text-decoration: none; }
.effect-page:hover { text-decoration: underline; }
.effect:is(:hover,:focus-visible) { transform: translateY(-2px); border-color: var(--forest); box-shadow: 0 5px 14px #214a9833; }
.effect:active { transform: none; }
.effect-art { display: block; position: relative; height: clamp(90px, 15vw, 162px); overflow: hidden; background: var(--soft); }
.effect-art :is(img,canvas) { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.effect-art canvas[hidden] { display: none; }
.effect-name { padding: 8px 12px; font-weight: 690; }
.tool-heading { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; padding: 0 2px 12px; border-bottom: 1px solid var(--line); margin-bottom: 12px; }
.tool-heading h2 { margin: 0; font-size: 1.18rem; }
.wizard-steps { margin: 0 0 0 auto; padding: 0; display: flex; list-style: none; gap: 8px; color: var(--muted); font-size: .88rem; }
.wizard-steps li { padding: 3px 8px; border-radius: 6px; }
.wizard-steps li[aria-current] { background: var(--soft); color: var(--forest); font-weight: 700; }
.drop-zone #pick { margin-top: 14px; }
.drop-zone h3 { margin-bottom: 4px; }
.preview { display: grid; place-items: center; min-height: 100px; padding: 14px; background: #eef2f6; border-radius: 8px; }
#preview { display: block; width: auto; height: auto; max-width: 100%; max-height: min(52vh, 560px); background: repeating-conic-gradient(#fff 0 25%, #e0e5ea 0 50%) 0 0 / 18px 18px; }
#preview[data-brush] { cursor: crosshair; touch-action: none; }
#preview:focus-visible { outline: 3px solid var(--focus); }
.parameters { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px; margin: 14px 0 4px; }
.parameters label { display: grid; gap: 3px; min-width: 0; }
.parameters label > span { display: flex; justify-content: space-between; }
.parameters input { width: 100%; accent-color: var(--forest); }
output, #dimensions { font-variant-numeric: tabular-nums; color: var(--muted); }
.toolbar { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding-top: 12px; }
.toolbar .primary { margin-left: auto; }
.toolbar [aria-pressed=true] { background: var(--soft); color: var(--forest); box-shadow: inset 0 0 0 1px var(--forest); }
.compact { padding: 6px 12px; min-height: 35px; font-size: .9rem; }
.secondary:disabled { opacity: .55; cursor: default; }
#dimensions { margin-right: auto; }
select { min-height: 38px; padding: 0 8px; border: 1px solid var(--line); border-radius: 7px; background: white; color: var(--ink); }
#brush-hint, .status { font-size: .875rem; }
.status { margin: 0 0 9px; }
.status[data-error] { color: #a42319; }
.reading { padding-bottom: 45px; }
.reading > section { padding: 42px 0 0; border: 0; }
.article-reading { max-width: 860px; margin: 0 auto; padding-inline: 24px; }
.article-section { padding-top: 30px; }
.article-section h2 { font-size: 1.5rem; margin-bottom: 8px; }
.article-section p { color: var(--muted); margin-top: 8px; line-height: 1.65; }
.article-section h3 { font-size: 1.05rem; margin-top: 16px; }
.article-section ul, .article-section ol { margin: 10px 0 0 20px; color: var(--muted); line-height: 1.65; }
.article-section li { margin-top: 7px; }
.article-section a { color: var(--forest); text-decoration: underline; }
.drop-title { font-weight: 600; }
.instructions { display: grid; grid-template-columns: repeat(3,1fr); gap: 20px; margin-top: 18px; }
.instructions > div { border-top: 1px solid var(--line); padding-top: 10px; }
.instructions h3 { margin-bottom: 3px; }
/* Footer */
.site-footer { border-top: 1px solid var(--line); background: #f0f4f9; }
.footer-inner { max-width: 1240px; margin: auto; padding: 44px 24px 30px; display: grid; grid-template-columns: 1.7fr repeat(3, 1fr); gap: 28px; }
.footer-brand p { max-width: 290px; margin-top: 12px; font-size: .92rem; }
.footer-nav { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.footer-nav h2 { margin: 0 0 6px; font-size: .78rem; font-weight: 760; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
.footer-nav a { color: var(--ink); font-size: .93rem; text-decoration: none; }
.footer-nav a:hover { color: var(--forest); text-decoration: underline; }
.footer-bottom { max-width: 1240px; margin: auto; padding: 15px 24px 22px; border-top: 1px solid var(--line); display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; font-size: .84rem; color: var(--muted); }
.footer-bottom p { font-size: inherit; color: inherit; }

/* Information pages */
.doc-page { width: min(100%, 780px); margin: auto; padding: clamp(36px, 6vw, 72px) 24px 90px; }
.doc-page h1 { font-size: clamp(2rem, 4vw, 2.9rem); font-weight: 780; line-height: 1.1; margin-bottom: 14px; }
.doc-page .lead { font-size: 1.12rem; }
.doc-page .meta { margin-top: 10px; font-size: .87rem; }
.doc-page section { margin-top: 32px; padding-top: 20px; border-top: 1px solid var(--line); }
.doc-page section h2 { font-size: 1.25rem; margin-bottom: 7px; }
.doc-page ul, .doc-page ol { margin-top: 8px; padding-left: 21px; color: var(--muted); }
.doc-page li + li { margin-top: 6px; }
.doc-page table { width: 100%; border-collapse: collapse; margin-top: 12px; font-size: .92rem; }
.doc-page th, .doc-page td { text-align: left; padding: 8px 10px; border: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.doc-page th { color: var(--ink); background: var(--soft); }
.doc-page .email { font-size: 1.1rem; font-weight: 700; }
.doc-page .note { margin-top: 26px; padding: 14px 16px; background: var(--soft); border-radius: 8px; font-size: .92rem; }
@media (max-width: 680px) {
  .header-inner { min-height: 62px; padding-inline: 13px; gap: 8px; }
  .header-actions { gap: 9px; font-size: .85rem; }
  .header-actions a[href="#tool"] { display: none; }
  .tool-hero { padding-inline: 10px; }
  .tool { padding: 8px; }
  .effects { gap: 8px; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .effect-card, .effect-card:nth-child(n + 5) { grid-column: span 1; }
  .effect-card:last-child { grid-column: 1 / -1; }
  .effect { grid-column: auto; }
  .instructions { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: repeat(2, minmax(0,1fr)); padding: 32px 16px 22px; gap: 24px 16px; }
  .footer-brand { grid-column: 1 / -1; }
  .footer-bottom { padding-inline: 16px; }
  .tool-heading { gap: 7px; }
  .wizard-steps { gap: 2px; margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) { .effect { transform: none !important; transition: none; } }
