.invert-page { color: #203346; font-size: 16px; font-weight: 400; line-height: 1.8; letter-spacing: 0; }
.invert-page *, .invert-page *::before, .invert-page *::after { box-sizing: border-box; letter-spacing: 0; }
.invert-page [hidden] { display: none !important; }
.invert-page h1 { font-size: 34px; line-height: 1.35; margin: 8px 0 16px; }
.invert-page h2 { font-size: 23px; line-height: 1.5; margin: 0 0 14px; }
.invert-page h3 { font-size: 18px; margin: 0 0 10px; line-height: 1.5; }
.invert-page p { font-size: 16px; line-height: 1.8; color: #566b7d; margin: 0 0 18px; }
.invert-page a { color: #087c71; }
.invert-page .eyebrow { color: #087f75; font-size: 14px; font-weight: 700; margin: 0; }
.invert-heading { margin-bottom: 24px; }
.invert-page .invert-editor { border: 1px solid #cfdde5; border-radius: 8px; padding: 22px; margin: 0 0 28px; background: #fff; }
.invert-page .invert-section { border-top: 1px solid #d8e3e9; padding: 28px 0; margin: 0; }
.invert-section h2:not(:first-child) { margin-top: 26px; }
.editor-heading, .preview-heading { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; }
.editor-heading h2, .preview-heading h3 { margin: 0; }
.file-actions { display: flex; gap: 8px; }
.invert-page button { background: #fff; color: #365366; border: 1px solid #bfceda; border-radius: 6px; min-height: 44px; width: auto; height: auto; padding: 9px 13px; margin: 0; font: inherit; font-size: 14px; font-weight: 700; line-height: 1.5; text-transform: none; box-shadow: none; white-space: normal; }
.invert-page button:hover { background: #f0f8f6; border-color: #087f75; color: #066e64; }
.invert-page button:disabled { opacity: .5; cursor: default; }
.invert-page button[aria-pressed="true"] { background: #e8f5f1; border-color: #087f75; color: #087268; }
.invert-page .primary { background: #087f75; border-color: #087f75; color: #fff; }
.invert-page .primary:hover { background: #06675f; color: #fff; }
.invert-page i { margin-right: 6px; }
.invert-page .icon-button { width: 44px; padding: 8px; }
.icon-button i { margin: 0; }
.invert-page :is(button,input,select,summary,a):focus-visible { outline: 3px solid #42a391; outline-offset: 3px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.invert-page .dropzone { width: 100%; min-height: 118px; border: 2px dashed #b6ced1; background: #f8fbfb; display: flex; align-items: center; justify-content: center; flex-direction: column; padding: 18px; }
.dropzone > i { font-size: 26px; color: #62838b; margin: 0 0 8px; }
.dropzone strong { font-size: 16px; }
.dropzone span { font-size: 13px; color: #607a89; margin-top: 4px; font-weight: 400; }
.invert-page .dropzone.is-dragging { background: #eaf6f1; border-color: #087f75; }
.invert-page .input-support, .invert-page .privacy-note, .invert-page .help-note { font-size: 13px; margin: 10px 0; line-height: 1.7; }
.invert-page .privacy-note { color: #0c7669; margin-bottom: 18px; }
.file-meta { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); margin: 16px 0 20px; border-top: 1px solid #dce5ea; }
.file-meta div { padding: 10px 6px; border-bottom: 1px solid #dce5ea; min-width: 0; }
.file-meta .file-name { grid-column: 1 / -1; }
.file-meta dt { font-size: 12px; color: #637989; }
.file-meta dd { margin: 3px 0 0; font-size: 14px; font-weight: 700; overflow-wrap: anywhere; }
.invert-page fieldset { margin: 0; padding: 18px 0; border: 0; border-top: 1px solid #d8e3e9; min-width: 0; }
.invert-page legend { padding: 0 10px 0 0; font-size: 16px; font-weight: 700; color: #2c475a; }
.invert-page label { display: block; font-size: 14px; font-weight: 700; color: #354e60; margin: 0 0 8px; }
.effect-modes { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; margin-bottom: 18px; }
.effect-modes button { width: 100%; }
.range-label { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 6px; }
.range-label label { margin: 0; }
.range-label output { color: #0b7168; font-weight: 700; font-size: 14px; white-space: nowrap; }
.invert-page input[type="range"] { appearance: auto; width: 100%; height: 32px; margin: 0; padding: 0; border: 0; accent-color: #087f75; background: transparent; cursor: pointer; }
.strength-presets { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 6px; margin-top: 8px; }
.strength-presets button { padding: 6px; min-height: 36px; font-size: 12px; }
.channel-controls { display: flex; flex-wrap: wrap; gap: 10px 18px; margin: 0 0 18px; }
.channel-controls label { display: flex; align-items: center; gap: 7px; font-size: 14px; margin: 0; min-height: 44px; }
.channel-controls input { appearance: auto; width: 18px; height: 18px; margin: 0; accent-color: #087f75; }
.channel-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px; }
.channel-dot.red { background: #c64b56; }.channel-dot.green { background: #278c52; }.channel-dot.blue { background: #5279b5; }
.empty-preview { height: 170px; border-top: 1px solid #dce5ea; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; color: #81909b; font-size: 14px; }
.empty-preview i { font-size: 28px; }
.preview-heading { margin-top: 12px; }
.view-modes { display: flex; flex-wrap: wrap; gap: 6px; }
.view-modes button { padding: 8px 10px; font-size: 12px; }
.preview-stage { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; position: relative; }
.preview-stage figure { min-width: 0; margin: 0; }
.preview-stage figcaption { font-size: 13px; font-weight: 700; padding: 6px 0; color: #4f6477; }
#resultCaption { color: #a44053; }
.canvas-shell { height: 280px; display: grid; place-items: center; overflow: hidden; border: 1px solid #d2dfe6; border-radius: 6px; background-color: #fff; background-image: repeating-conic-gradient(#e4e9ec 0% 25%,#fff 0% 50%); background-size: 20px 20px; }
.canvas-shell canvas { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.preview-stage[data-view="original"], .preview-stage[data-view="result"] { grid-template-columns: 1fr; }
.preview-stage[data-view="original"] #resultFigure, .preview-stage[data-view="result"] #originalFigure { display: none; }
.preview-stage[data-view="original"] .canvas-shell, .preview-stage[data-view="result"] .canvas-shell { height: 380px; }
.preview-stage[data-view="wipe"] { display: block; height: 380px; touch-action: pan-y; }
.preview-stage[data-view="wipe"] figure { position: absolute; inset: 0; }
.preview-stage[data-view="wipe"] figcaption { display: none; }
.preview-stage[data-view="wipe"] .canvas-shell { width: 100%; height: 100%; border-radius: 0; }
.preview-stage[data-view="wipe"] #originalFigure { z-index: 2; clip-path: inset(0 calc(100% - var(--split)) 0 0); }
#comparisonDivider { position: absolute; left: var(--split); top: 0; bottom: 0; width: 2px; background: #fff; box-shadow: 0 0 0 1px #354e60; z-index: 3; pointer-events: none; }
.compare-controls { margin-top: 14px; }
.export-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; align-items: start; }
.invert-page select { width: 100%; min-width: 0; height: 46px; padding: 8px 12px; background: #fff; border: 1px solid #bdced9; border-radius: 6px; color: #294558; font: inherit; font-size: 14px; }
.background-controls { display: grid; grid-template-columns: minmax(0,1fr) 100px; gap: 16px; margin-top: 16px; }
.invert-page input[type="color"] { appearance: auto; width: 100%; height: 46px; padding: 3px; background: #fff; border: 1px solid #bdced9; border-radius: 6px; }
.editor-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid #d8e3e9; padding-top: 16px; }
.editor-actions .primary { margin-left: auto; }
.invert-page .editor-status { font-size: 14px; margin: 12px 0 0; min-height: 25px; }
.invert-page .editor-status.is-error { color: #ac3446; }
.saved-file { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 8px; font-size: 13px; }
.guide-grid, .related-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.guide-grid > div, .related-grid > a { min-width: 0; border: 1px solid #d1dfe7; border-radius: 6px; padding: 16px; margin: 0; height: auto; }
.guide-grid p { font-size: 15px; margin: 0; }
.related-grid a { display: flex; flex-direction: column; text-decoration: none; color: #345264; }
.related-grid a:hover { border-color: #087f75; background: #f6faf9; }
.related-grid strong { font-size: 16px; }
.related-grid span { font-size: 14px; color: #647b8e; margin-top: 5px; }
.format-guide { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 16px; margin: 18px 0; }
.format-guide div { min-width: 0; border-left: 3px solid #c1d7d8; padding-left: 14px; }
.format-guide p { font-size: 15px; margin: 0; }
.invert-page code { color: #246b61; background: #f1f7f4; white-space: normal; overflow-wrap: anywhere; padding: 2px 4px; font-size: 15px; }
.rgb-examples { display: grid; gap: 12px; margin: 18px 0; font-size: 14px; }
.rgb-examples > div { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.color-block { width: 24px; height: 24px; flex: 0 0 24px; border: 1px solid #bbcad3; border-radius: 4px; }
.invert-faq details { margin: 12px 0 0; padding: 14px 16px; border: 1px solid #d1dfe7; border-radius: 6px; }
.invert-faq summary { cursor: pointer; font-size: 16px; font-weight: 700; line-height: 1.6; color: #29495d; }
.invert-faq p { font-size: 15px; margin: 12px 0 0; }
@media (max-width: 760px) {
  .modern-subpage #content.invert-page { padding: 18px 15px; }
  .modern-sidebar-toggle { position: static !important; inset: auto !important; transform: none !important; margin-bottom: 14px; }
  .invert-page h1 { font-size: 28px; }
  .invert-page h2 { font-size: 21px; }
  .invert-page .invert-editor { padding: 15px; }
  .invert-page .invert-section { padding: 24px 0; }
  .effect-modes { gap: 5px; }
  .effect-modes button { font-size: 13px; padding: 8px 5px; }
  .file-meta { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .file-meta div:nth-child(2) { grid-column: 1 / -1; }
  .guide-grid, .related-grid, .format-guide, .export-grid { grid-template-columns: 1fr; }
  .preview-stage { grid-template-columns: 1fr; }
  .canvas-shell { height: 230px; }
  .preview-stage[data-view="original"] .canvas-shell, .preview-stage[data-view="result"] .canvas-shell, .preview-stage[data-view="wipe"] { height: 280px; }
  .editor-actions { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .editor-actions button { padding: 10px 6px; font-size: 13px; }
  .editor-actions .primary { grid-column: 1 / -1; margin: 0; }
  .view-modes { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); width: 100%; }
  .strength-presets button { min-height: 44px; }
}
