/* Архив файлов (П3): ветки и значки в карточке телефона, страница ветки, карточка файла, мастер «Добавить файл».
   Цвета и шрифты — переменные из основной страницы (template.html). */
.fx-mono { font: 500 12px var(--f-mono); color: var(--muted); }
.fx-badge { display: inline-block; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; background: var(--chip); }
.fx-badge.lime { background: var(--lime); color: var(--on-lime); }
.fx-badge.soft { background: color-mix(in srgb, var(--lime) 22%, transparent); color: var(--accent); }
.fx-badge.ok { background: var(--have); color: #fff; }
.fx-badge.okl { background: color-mix(in srgb, var(--have) 16%, transparent); color: var(--have); }
.fx-badge.warn { background: color-mix(in srgb, var(--want) 20%, transparent); color: var(--want); }
.fx-badge.mod { border: 1px dashed var(--mod); color: var(--mod); background: transparent; }
.fx-td { display: block; font-weight: 600; color: var(--want); font-size: 14px; }
.fx-crumbs { font-size: 13px; color: var(--muted); padding-top: 18px; }
.fx-crumbs a { text-decoration: none; }
.fx-crumbs b { color: var(--ink); }
.fx-sec-title { font: 600 11px/1.2 var(--f-body); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

/* ветки в карточке телефона */
.fx-branches { display: grid; gap: 8px; }
.fx-br { display: grid; grid-template-columns: 74px 14px minmax(0, 1fr) auto; gap: 10px; align-items: center; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-decoration: none; color: inherit; }
.fx-br:hover { border-color: var(--lime); }
.fx-br .dot { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--muted); }
.fx-br.first .dot { background: var(--lime); border-color: var(--lime); }
.fx-br.mod { border-style: dashed; border-color: var(--mod); background: transparent; }
.fx-br.mod .dot { border: 2px dashed var(--mod); }
.fx-br.mod b { color: var(--mod); }
.fx-br small { display: block; color: var(--muted); font-size: 12px; }
.fx-br .cnt { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.fx-br .cnt span { background: var(--chip); border-radius: 6px; padding: 2px 7px; font: 500 12px var(--f-mono); white-space: nowrap; }
.fx-br .cnt span.fx-top { background: var(--lime); color: var(--on-lime); }
.fx-br.mod .cnt span { background: transparent; border: 1px dashed var(--mod); color: var(--mod); }
.fx-br .add { font-size: 12px; color: var(--accent); font-weight: 600; white-space: nowrap; }
@media (max-width: 600px) { .fx-br { grid-template-columns: 14px minmax(0, 1fr); } .fx-br .fx-mono { display: none; } .fx-br .cnt { grid-column: 2; justify-content: flex-start; } }
.fx-any { display: grid; gap: 6px; font-size: 14px; }
.fx-any a { display: flex; justify-content: space-between; gap: 10px; color: inherit; text-decoration: none; }
.fx-any a:hover span:first-child { color: var(--accent); }
.fx-any b { font: 600 13px var(--f-mono); }

/* рукописная заметка и кнопка «Добавить файл» */
.fx-add { display: grid; gap: 6px; justify-items: stretch; }
.fx-hand { font: 500 26px/1.05 "Caveat", "Bad Script", "Segoe Print", cursive; color: var(--accent); transform: rotate(-3deg); padding-left: 6px; }
.fx-hand + svg { margin-left: 140px; color: var(--accent); }
.fx-add .btn.primary { padding: 13px; font: 600 18px/1.2 var(--f-display); border-radius: 12px; }
.fx-add .btn.primary small { display: block; font: 400 14px var(--f-body); }
.fx-add .hint { text-align: center; }

/* страница ветки */
.fx-hero { display: flex; gap: 20px; align-items: center; background: var(--tile); color: var(--tile-ink); border-radius: var(--r); padding: 18px 22px; margin-top: 12px; flex-wrap: wrap; }
.fx-hero .big { font: 300 64px/.9 var(--f-display); color: var(--lime); }
.fx-hero h1 { font-size: 30px; }
.fx-hero .sub { color: #a7b0a0; font-size: 14px; margin-top: 4px; }
.fx-hero .sib { margin-left: auto; display: grid; gap: 6px; justify-items: end; font-size: 12px; color: #a7b0a0; }
.fx-hero .sib div { display: flex; gap: 4px; background: var(--tile-2); border-radius: 10px; padding: 3px; flex-wrap: wrap; }
.fx-hero .sib a { padding: 6px 10px; border-radius: 8px; font-size: 13px; color: var(--tile-ink); text-decoration: none; }
.fx-hero .sib a[aria-current="true"] { background: var(--lime); color: var(--on-lime); font-weight: 600; }
.fx-hero .sib a.nos { color: var(--mod); }
.fx-pills { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-block: 14px; }
.fx-pill { padding: 8px 14px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font: 600 15px var(--f-display); }
.fx-pill[aria-pressed="true"] { background: var(--lime); color: var(--on-lime); border-color: var(--lime); }
.fx-pill:disabled { opacity: .45; cursor: default; }
.fx-filt { margin-left: auto; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.fx-filt button { padding: 6px 10px; border-radius: 8px; background: var(--surface); border: 1px solid var(--line); font-size: 13px; }
.fx-filt button[aria-pressed="true"] { background: var(--chip); border-color: var(--chip); color: var(--ink); }
.fx-filt button[aria-pressed="true"]::before { content: "✓ "; }
.fx-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; padding-bottom: 34px; }
@media (max-width: 900px) { .fx-grid { grid-template-columns: minmax(0, 1fr); } .fx-hero .sib { margin-left: 0; justify-items: start; } }
.fx-col { display: grid; gap: 12px; }
.fx-group h2 { font-size: 20px; }
.fx-group .gh { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.fx-group .gh .r { margin-left: auto; font-size: 13px; font-weight: 600; }
.fx-row { display: grid; grid-template-columns: minmax(0, 1fr) 120px 80px 84px; gap: 10px; align-items: center; font-size: 14px; border-top: 1px solid var(--line); padding-top: 8px; }
.fx-row a.t { color: inherit; text-decoration: none; }
.fx-row a.t:hover b { color: var(--accent); }
.fx-row .dl { color: var(--have); font-weight: 600; text-decoration: none; text-align: right; }
.fx-row .pend { color: var(--want); font-size: 12px; font-weight: 600; text-align: right; }
@media (max-width: 600px) { .fx-row { grid-template-columns: minmax(0, 1fr) auto; } .fx-row .fx-mono.d { display: none; } .fx-row .fx-mono.s { grid-column: 1; } }
.fx-group details summary { font-size: 13px; color: var(--muted); cursor: pointer; list-style: none; padding-top: 6px; }
.fx-group details summary::after { content: " ▾"; }
.fx-group details[open] summary::after { content: " ▴"; }
.fx-side { display: grid; gap: 12px; }
.fx-side .box { font-size: 14px; gap: 6px; }
.fx-side .mod { border: 1px dashed var(--mod); border-radius: var(--r); padding: 14px 16px; font-size: 14px; display: grid; gap: 6px; }
.fx-side .mod .fx-sec-title { color: var(--mod); }

/* карточка файла */
.fx-head { display: flex; gap: 20px; align-items: flex-start; flex-wrap: wrap; padding-top: 10px; }
.fx-head .main { flex: 1; min-width: min(100%, 360px); display: grid; gap: 6px; }
.fx-head h1 { font-size: clamp(30px, 4vw, 40px); }
.fx-head .sub { color: var(--muted); }
.fx-get { background: var(--tile); color: var(--tile-ink); border-radius: var(--r); padding: 16px 18px; width: min(100%, 320px); display: grid; gap: 8px; }
.fx-get .btn.primary { padding: 12px; text-align: center; font: 600 18px var(--f-display); text-decoration: none; border-radius: 10px; }
.fx-get .h { font: 400 11px var(--f-mono); color: #a7b0a0; word-break: break-all; cursor: copy; }
.fx-get .n { font-size: 13px; color: #a7b0a0; }
.fx-2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.fx-2b { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; margin-top: 16px; align-items: start; padding-bottom: 34px; }
@media (max-width: 900px) { .fx-2, .fx-2b { grid-template-columns: minmax(0, 1fr); } }
.fx-kv { display: grid; grid-template-columns: 150px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; }
.fx-kv > span:nth-child(odd) { color: var(--muted); }
@media (max-width: 520px) { .fx-kv { grid-template-columns: minmax(0, 1fr); gap: 0; } .fx-kv > span:nth-child(even) { margin-bottom: 6px; } }
.fx-need { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.fx-need a, .fx-need button { border: 1px solid var(--line); background: var(--bg); border-radius: 8px; padding: 3px 9px; font-size: 12px; color: inherit; text-decoration: none; }
.fx-meth { border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; display: grid; gap: 8px; }
.fx-meth.fx-top { border: 2px solid var(--lime); }
.fx-meth .mh { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fx-meth .mh b { font: 600 16px var(--f-display); }
.fx-meth .cond { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-meth .cond span { background: var(--chip); border-radius: 999px; padding: 3px 10px; font-size: 12px; }
.fx-meth .ma { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.fx-meth .ma .btn { padding: 5px 10px; font-size: 12px; }
.fx-meth .ma .me { margin-left: auto; background: var(--have); color: #fff; border-color: var(--have); }
.fx-meth .ma .me[aria-pressed="true"] { background: transparent; color: var(--have); }
.fx-log { display: grid; grid-template-columns: 90px 150px 170px minmax(0, 1fr); gap: 6px 14px; font-size: 14px; align-items: center; }
@media (max-width: 760px) { .fx-log { grid-template-columns: 70px minmax(0, 1fr); } .fx-log .ph, .fx-log .res { grid-column: 2; } }
.fx-log .ok { color: var(--have); font-weight: 600; }
.fx-log .warn { color: var(--want); font-weight: 600; }
.fx-log .bad { color: #c0392b; font-weight: 600; }
.fx-olds { display: flex; gap: 6px; flex-wrap: wrap; }
.fx-olds span { background: var(--bg); border-radius: 6px; padding: 2px 8px; font-size: 12px; color: var(--muted); word-break: break-all; }
.fx-olds span.dead { text-decoration: line-through; }
.fx-state { border-radius: 12px; padding: 10px 14px; font-size: 14px; background: color-mix(in srgb, var(--want) 14%, var(--surface)); border: 1px solid color-mix(in srgb, var(--want) 35%, var(--line)); margin-top: 12px; }
.fx-text { font-size: 14px; line-height: 1.6; white-space: pre-wrap; margin: 0; }
.fx-inline { display: grid; gap: 8px; border-top: 1px solid var(--line); padding-top: 10px; }
.fx-inline .fx-r { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.fx-inline input, .fx-inline select, .fx-inline textarea, .fx-wiz input, .fx-wiz select, .fx-wiz textarea { background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 8px 10px; font-size: 14px; color: var(--ink); min-width: 0; }
.fx-inline label.r, .fx-wiz label.r { display: inline-flex; gap: 6px; align-items: center; font-size: 14px; color: var(--ink); }

/* модерация на карточке файла */
.fx-review { border: 2px solid var(--want); }
.fx-checks { display: grid; gap: 4px; font-size: 14px; }
.fx-checks .y::before { content: "✓ "; color: var(--have); font-weight: 700; }
.fx-checks .n::before { content: "✗ "; color: #c0392b; font-weight: 700; }
.fx-checks .q::before { content: "? "; color: var(--want); font-weight: 700; }
.fx-listing { max-height: 320px; overflow: auto; font: 400 12px/1.6 var(--f-mono); background: var(--bg); border-radius: 8px; padding: 8px 10px; }
.fx-listing div { display: flex; justify-content: space-between; gap: 10px; }
.fx-msgs { display: grid; gap: 6px; }
.fx-msg { border-radius: 10px; padding: 8px 10px; background: var(--bg); font-size: 14px; }
.fx-msg.own { background: color-mix(in srgb, var(--lime) 16%, var(--surface)); }
.fx-msg small { display: block; color: var(--muted); font-size: 12px; }

/* список файлов (поиск, мои файлы) */
.fx-list { display: grid; gap: 8px; }
.fx-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface); text-decoration: none; color: inherit; }
.fx-item:hover { border-color: var(--lime); }
.fx-item small { color: var(--muted); font-size: 12px; }
.fx-search { display: flex; gap: 8px; margin-top: 14px; }
.fx-search input { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 16px; min-width: 0; }

/* перетаскивание файла на страницу */
.fx-drop { position: fixed; inset: 12px; z-index: 60; border: 3px dashed var(--lime); border-radius: 18px; background: color-mix(in srgb, var(--bg) 82%, transparent); display: grid; place-items: center; pointer-events: none; font: 600 26px var(--f-display); text-align: center; padding: 20px; }
.fx-drop small { display: block; font: 400 15px var(--f-body); color: var(--muted); margin-top: 6px; }

/* мастер «Добавить файл» */
.fx-wiz-scrim { position: fixed; inset: 0; background: var(--scrim); z-index: 50; overflow: auto; display: flex; justify-content: center; padding: 20px 10px; }
.fx-wiz { width: min(1200px, 100%); background: var(--bg); border-radius: 18px; padding: 20px clamp(14px, 3vw, 32px) 26px; display: grid; gap: 14px; align-self: flex-start; box-shadow: var(--shadow); }
.fx-wiz .wh { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-wiz .wh h1 { font-size: 30px; }
.fx-steps { display: flex; gap: 6px; margin-left: auto; font-size: 14px; flex-wrap: wrap; }
.fx-steps span { white-space: nowrap; padding: 6px 12px; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); }
.fx-steps span.on { background: var(--lime); color: var(--on-lime); font-weight: 600; border-color: var(--lime); }
.fx-steps span.done { background: var(--chip); border-color: var(--chip); }
.fx-prog { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 8px; }
.fx-prog .t { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; font-size: 14px; }
.fx-prog .t .r { margin-left: auto; color: var(--muted); font-size: 13px; }
.fx-bar { height: 8px; border-radius: 4px; background: var(--chip); overflow: hidden; }
.fx-bar i { display: block; height: 100%; background: var(--lime); transition: width .3s; }
.fx-found { background: var(--tile); color: var(--tile-ink); border-radius: 14px; padding: 12px 18px; display: grid; gap: 4px; }
.fx-found .label { color: #a2d93a; }
.fx-found div.l { font: 400 13px/1.7 var(--f-mono); color: #c9d1c2; word-break: break-word; }
.fx-pick { border: 3px dashed var(--line); border-radius: 18px; padding: 40px 20px; text-align: center; display: grid; gap: 10px; justify-items: center; }
.fx-pick b { font: 600 22px var(--f-display); }
.fx-f3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px 16px; }
.fx-f2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
@media (max-width: 860px) { .fx-f3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .fx-f2 { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 520px) { .fx-f3 { grid-template-columns: minmax(0, 1fr); } }
.fx-wiz label.f { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.fx-wiz .fx-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 12px 16px; display: grid; gap: 8px; font-size: 14px; }
.fx-wiz .fx-card > b { font: 600 16px var(--f-display); }
.fx-wiz .fx-card.hl { border-color: var(--lime); }
.fx-wiz .rows { display: grid; gap: 8px; }
.fx-wiz .rows > div { display: grid; grid-template-columns: 110px minmax(0, 1fr) minmax(0, 1fr) 32px; gap: 6px 10px; align-items: center; }
.fx-wiz .rows.m > div { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 190px 32px; }
@media (max-width: 700px) { .fx-wiz .rows > div, .fx-wiz .rows.m > div { grid-template-columns: minmax(0, 1fr) 32px; } .fx-wiz .rows > div > :not(:last-child) { grid-column: 1; } }
.fx-wiz .rm { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); }
.fx-wiz .addrow { justify-self: start; border: 0; background: none; color: var(--accent); font-weight: 600; padding: 0; }
.fx-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 5px 8px; min-height: 40px; }
.fx-tags span { background: var(--chip); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 13px; color: var(--ink); display: inline-flex; gap: 4px; align-items: center; }
.fx-tags span button { border: 0; background: none; padding: 0 4px; font-size: 15px; line-height: 1; color: var(--muted); }
.fx-tags input { border: 0 !important; padding: 4px !important; flex: 1; min-width: 120px; background: transparent !important; }
.fx-wiz .foot { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.fx-wiz .foot .s { font-size: 13px; color: var(--muted); flex: 1; min-width: 240px; }
.fx-wiz .foot .s b { color: var(--ink); }
.fx-wiz .err { color: #c0392b; font-size: 14px; }
.fx-wiz .fx-done { display: grid; gap: 10px; justify-items: start; padding: 30px 10px; }
.fx-wiz .fx-done h2 { font-size: 28px; }

/* страница телефона: «С чего начать», файлы-инструменты */
.fx-br.nofiles { opacity: .8; }
.fx-start { gap: 8px; font-size: 15px; }
.fx-start a { color: #a2d93a; }
.fx-tools { display: grid; gap: 6px; }
.fx-trow { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; font-size: 14px; padding-top: 6px; border-top: 1px solid var(--line); }
.fx-trow:first-child { border-top: 0; padding-top: 0; }
.fx-trow .t { color: var(--ink); text-decoration: none; min-width: 0; }
.fx-trow .t:hover b { color: var(--accent); }
.fx-trow .fx-mono { font: 500 12px var(--f-mono); color: var(--muted); white-space: nowrap; }
.fx-trow .dl { color: var(--have); font-weight: 600; text-decoration: none; }
.fx-trow .pend { color: var(--muted); font-size: 12px; }
@media (max-width: 520px) { .fx-trow { grid-template-columns: minmax(0, 1fr) auto; } .fx-trow .fx-mono { grid-column: 1; grid-row: 2; } }

.fx-ia { display: block; margin-top: 8px; font-size: 14px; }
