.copy-page { padding-bottom: 64px; }
.copy-heading { display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.copy-page h1 { margin: 8px 0 16px; font-size: clamp(30px, 5vw, 44px); }
.copy-eyebrow { margin-top: 28px; color: #8fcef3; font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.copy-intro { max-width: 780px; color: #aab6ce; line-height: 1.7; }
.copy-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; padding: 24px 0; border-bottom: 1px solid #34435c; }
.copy-filters > div:first-child { flex: 1 1 300px; }
.copy-filters > div:nth-child(2) { flex: 0 1 200px; }
.copy-page label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 8px; }
.copy-page input[type="search"], .copy-page select, .copy-page textarea { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid #475873; border-radius: 8px; background: #182437; color: #ecf2ff; font: inherit; }
.copy-page textarea { line-height: 1.6; resize: vertical; min-height: 170px; }
.copy-page .copy-checkbox { display: flex; align-items: center; gap: 8px; font-weight: 400; min-height: 42px; margin: 0; }
.copy-page button, .copy-toolbar button { border: 0; border-radius: 7px; padding: 12px 17px; background: #74cef7; color: #101b2b; font: inherit; font-weight: 600; cursor: pointer; }
.copy-area-select { min-width: 0; }
.copy-page .copy-area-trigger { display: flex; align-items: center; justify-content: space-between; gap: 14px; width: 100%; padding: 12px; border: 1px solid #475873; border-radius: 8px; background: #182437; color: #ecf2ff; font-weight: 400; text-align: left; }
.copy-area-trigger > span:first-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.copy-page .copy-area-trigger:hover, .copy-page .copy-area-trigger[data-expanded="true"] { border-color: #74cef7; background: #1e3047; }
.copy-area-caret { flex: 0 0 7px; height: 7px; margin: -4px 3px 0 0; border-right: 2px solid #82d5ff; border-bottom: 2px solid #82d5ff; transform: rotate(45deg); }
.copy-area-trigger[data-expanded="true"] .copy-area-caret { transform: translateY(4px) rotate(225deg); }
.copy-area-menu { position: fixed; z-index: 110; display: flex; flex-direction: column; box-sizing: border-box; gap: 8px; padding: 8px; overflow: hidden; border: 1px solid #435a77; border-radius: 12px; background: linear-gradient(160deg, #18263a, #111a28 76%); box-shadow: 0 20px 48px rgba(1, 6, 15, .52), inset 0 1px 0 rgba(255, 255, 255, .035); }
.copy-area-menu[hidden], .copy-area-option[hidden], .copy-area-empty[hidden] { display: none; }
.copy-page .copy-area-search { flex-shrink: 0; padding: 10px 12px; background: #101b2b; font-size: 13px; }
.copy-page .copy-area-search:focus { outline: none; border-color: #74cef7; box-shadow: 0 0 0 1px #74cef7; }
.copy-area-options { min-height: 0; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #475f7b transparent; }
.copy-area-option { position: relative; padding: 10px 36px 10px 12px; border-radius: 7px; color: #dbe7fb; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; cursor: pointer; }
.copy-area-option:hover, .copy-area-option.is-active { background: #263d56; color: #fff; }
.copy-area-option[data-selected="true"] { color: #82d5ff; font-weight: 600; }
.copy-area-option[data-selected="true"]::after { content: ''; position: absolute; right: 14px; top: 15px; width: 5px; height: 9px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg); }
.copy-area-empty { margin: 0; padding: 12px; color: #aab6ce; font-size: 13px; }
.copy-result-count { color: #aab6ce; font-size: 12px; margin: 20px 0 8px; }
.copy-list-item { display: grid; grid-template-columns: minmax(0, 1fr) minmax(120px, 240px); gap: 28px; padding: 22px 0; border-bottom: 1px solid #34435c; color: inherit; text-decoration: none; }
.copy-list-item:hover .copy-list-text { color: #74cef7; text-decoration: underline; }
.copy-list-text { line-height: 1.65; overflow-wrap: anywhere; white-space: pre-line; }
.copy-list-meta { display: flex; gap: 12px; align-items: center; justify-content: end; font-size: 11px; line-height: 1.6; color: #aab6ce; }
.copy-badge { border-radius: 20px; background: #253d54; color: #74cef7; padding: 3px 8px; }
.copy-pagination, .copy-actions { display: flex; align-items: center; gap: 24px; padding-top: 24px; }
.copy-pagination { justify-content: center; }
.copy-edit-page { max-width: 850px; }
.copy-back { display: inline-block; margin-top: 24px; }
.copy-edit-form { margin-top: 32px; }
.copy-help { font-size: 12px; color: #aab6ce; line-height: 1.6; }
.copy-actions .copy-reset { background: transparent; color: #74cef7; margin-left: auto; border: 1px solid #475873; }
.copy-default, .copy-history { margin-top: 32px; padding: 24px; border: 1px solid #34435c; border-radius: 10px; background: #182437; }
.copy-default h2 { margin-top: 0; font-size: 14px; }
.copy-default p, .copy-history article p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.copy-history summary { cursor: pointer; }
.copy-history article { padding-top: 12px; border-bottom: 1px solid #34435c; font-size: 13px; }
.copy-mode-form { margin: 0; }
.copy-menu-control { display: inline-flex; align-items: center; gap: 6px; }
.copy-menu-edit { display: inline-flex; align-items: center; justify-content: center; flex: 0 0 26px; min-height: 30px; box-sizing: border-box; border: 1px dashed #74cef7; border-radius: 4px; background: #263b52; color: #74cef7; font-size: 16px; line-height: 1; text-decoration: none; }
.copy-menu-edit:hover, .copy-menu-edit:focus-visible { background: #324d68; color: #e7f5ff; }
.copy-menu-edit:focus-visible { outline: 2px solid #82d5ff; outline-offset: 3px; }
.copy-mode-switch { display: flex; align-items: center; justify-content: space-between; gap: 20px; width: 100%; border: 0; background: transparent; font-family: inherit; text-align: left; cursor: pointer; }
.copy-mode-switch:hover, .copy-mode-switch:focus-visible { background: #303a4e; color: #f8fbff; }
.copy-mode-indicator { position: relative; flex: 0 0 34px; height: 20px; box-sizing: border-box; border: 1px solid #798aa4; border-radius: 12px; background: #34435c; }
.copy-mode-indicator::after { content: ''; position: absolute; top: 3px; left: 3px; width: 12px; height: 12px; border-radius: 50%; background: #e7f5ff; }
.copy-mode-switch[data-checked="true"] .copy-mode-indicator { border-color: #74cef7; background: #74cef7; }
.copy-mode-switch[data-checked="true"] .copy-mode-indicator::after { transform: translateX(14px); background: #101b2b; }
.copy-toolbar { position: sticky; top: 0; z-index: 100; display: grid; grid-template-columns: repeat(3, minmax(0, 280px)); justify-content: center; gap: 6px 32px; padding: 12px 16px; background: #263b52; border-bottom: 1px solid #3d5976; color: #dbeaff; font-size: 12px; }
.copy-toolbar-option { display: grid; grid-template-rows: subgrid; grid-row: span 2; justify-items: center; max-width: 100%; text-align: center; }
.copy-toolbar-description { line-height: 1.5; }
.copy-toolbar form { display: flex; width: min(100%, 220px); margin: 0; }
.copy-toolbar button, .copy-toolbar .copy-toolbar-browse { display: flex; align-items: center; justify-content: center; box-sizing: border-box; min-height: 36px; max-width: 100%; padding: 8px 12px; border: 1px solid #74cef7; border-radius: 7px; font: inherit; font-weight: 600; line-height: 1.4; text-decoration: none; }
.copy-toolbar button { width: 100%; }
.copy-toolbar .copy-toolbar-browse { width: min(100%, 220px); background: transparent; color: #dbeaff; }
.copy-toolbar .copy-toolbar-browse:hover { background: #324d68; }
.ux-copy-target { outline: 1px dashed currentColor; outline-offset: 2px; cursor: pointer; white-space: pre-line; }
.ux-copy-target::after { content: '✎'; display: inline; color: currentColor; font-size: max(13px, .85em); font-weight: 700; padding-left: 6px; }
.ux-copy-target:hover, .ux-copy-target:focus-visible { background: #263b52; color: #e7f5ff; outline: 2px solid #74cef7; }
.ux-copy-attribute { display: inline-block; padding: 3px 5px; border-radius: 4px; color: #74cef7; background: #263b52; font-size: 12px; text-decoration: none; }
[data-copy-editor] .ux-copy-target, [data-copy-toolbar] .ux-copy-target { background: transparent; color: inherit; outline: none; cursor: inherit; }
[data-copy-editor] .ux-copy-target::after, [data-copy-toolbar] .ux-copy-target::after { content: none; }
@media (max-width: 640px) {
    .copy-heading { align-items: start; flex-direction: column; gap: 4px; }
    .copy-list-item { grid-template-columns: 1fr; gap: 10px; }
    .copy-list-meta { justify-content: start; }
    .copy-actions { flex-wrap: wrap; gap: 18px; }
    .copy-actions .copy-reset { margin-left: 0; }
    .copy-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
    .copy-toolbar-option { display: flex; grid-row: auto; width: 100%; }
    .copy-toolbar-option:last-child { grid-column: 1 / -1; }
    .copy-toolbar-description { display: none; }
    .copy-toolbar form, .copy-toolbar .copy-toolbar-browse { width: 100%; }
    .copy-toolbar button, .copy-toolbar .copy-toolbar-browse { min-height: 44px; }
}

.copy-page a { color: #82d5ff; }
.copy-page :focus-visible, .copy-toolbar :focus-visible { outline: 2px solid #82d5ff; outline-offset: 4px; }

.telegram-copy-page { max-width: 1040px; }
.telegram-copy-page .copy-intro { max-width: 850px; }
.telegram-copy-sections { display: flex; flex-wrap: wrap; gap: 10px; margin: 18px 0 32px; }
.telegram-copy-sections a { padding: 10px 14px; border: 1px solid #34435c; border-radius: 8px; font-size: 13px; text-decoration: none; }
.telegram-copy-sections span { margin-left: 6px; color: #aab6ce; }
.telegram-copy-section { margin-top: 36px; scroll-margin-top: 140px; }
.telegram-copy-section h2 { font-size: 21px; }
.telegram-copy-list { display: grid; gap: 16px; }
.telegram-copy-card { padding: 24px; border: 1px solid #34435c; border-radius: 12px; background: #192231; scroll-margin-top: 140px; min-width: 0; }
.telegram-copy-card:target { border-color: #74cef7; }
.telegram-copy-text { margin: 0 0 22px; color: #e4ebf7; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.telegram-copy-card-footer { display: flex; align-items: flex-start; gap: 20px; padding-top: 16px; border-top: 1px solid #2d3b50; }
.telegram-copy-original { flex: 1; min-width: 0; color: #9dafc9; font-size: 13px; }
.telegram-copy-original summary { cursor: pointer; min-height: 40px; display: list-item; line-height: 40px; }
.telegram-copy-original p { white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.65; }
.telegram-copy-edit { display: inline-flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 16px; box-sizing: border-box; border: 1px solid #475873; border-radius: 7px; font-size: 13px; text-decoration: none; }
.telegram-copy-edit:hover, .telegram-copy-sections a:hover { background: #263b52; border-color: #74cef7; }
@media (max-width: 640px) {
    .telegram-copy-card { padding: 18px; }
    .telegram-copy-section, .telegram-copy-card { scroll-margin-top: 160px; }
    .telegram-copy-card-footer { gap: 12px; }
    .telegram-copy-filters { gap: 12px; }
    .telegram-copy-page h1 { overflow-wrap: anywhere; }
}
