/* Copyright (c) 2026 TOBEST. All rights reserved. */
:root { color-scheme: light dark; font-family: "Segoe UI", system-ui, sans-serif; color: #202c3d; background: #f4f6f9; }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; }
header { padding: 26px 36px; display: flex; align-items: center; justify-content: space-between; }
.brand { font-size: 21px; font-weight: 700; letter-spacing: -.5px; }
main { width: min(600px, 100%); margin: auto; padding: 40px 24px 64px; }
.mark { background: #e0eafa; width: 56px; height: 56px; border-radius: 16px; display: grid; place-items: center; color: #265bb5; font-size: 30px; margin-bottom: 30px; }
.eyebrow { color: #54709b; font-size: 11px; font-weight: 700; letter-spacing: 1.4px; }
h1 { font-size: clamp(27px, 6vw, 35px); margin: 12px 0; letter-spacing: -1px; line-height: 1.3; }
.intro, .privacy { color: #576575; line-height: 1.65; }
section { background: #fff; padding: 26px; border: 1px solid #e1e6ed; border-radius: 18px; margin: 32px 0 22px; box-shadow: 0 6px 24px #253d6405; }
#status { margin: 0 0 22px; min-height: 48px; line-height: 1.6; }
label { display: block; margin-bottom: 8px; font-size: 14px; }
input, select { width: 100%; padding: 11px; margin-bottom: 20px; border: 1px solid #abb9cc; border-radius: 9px; font: inherit; color: inherit; background: transparent; }
#destination { margin-bottom: 20px; line-height: 1.6; }
#incoming { margin: 0 0 18px; overflow-wrap: anywhere; font-weight: 600; line-height: 1.6; }
.note { margin: 0 0 20px; color: #576575; font-size: 13px; line-height: 1.6; }
#destination-name, #saved-location { overflow-wrap: anywhere; font-weight: 600; }
progress { accent-color: #356ac0; height: 7px; width: 100%; display: block; margin: 0 0 24px; }
.actions { display: flex; flex-wrap: wrap; gap: 10px; }
button { font: inherit; font-size: 14px; font-weight: 600; border: 1px solid #dce2eb; background: #fff; color: inherit; padding: 11px 18px; border-radius: 9px; cursor: pointer; }
button.primary { background: #2f63b6; border-color: #2f63b6; color: #fff; }
button:disabled { opacity: .45; cursor: default; }
button:focus-visible, input:focus-visible, select:focus-visible { outline: 3px solid #6f9de0; outline-offset: 3px; }
.privacy { font-size: 13px; }
.report { font-size: 12px; margin-bottom: 12px; }
#group-note { font-weight: 600; }
footer { text-align: center; color: #6a7788; font-size: 12px; padding: 24px; }
a { color: #2f63b6; }
.brand, header a.brand { color: inherit; text-decoration: none; }
.doc { width: min(760px, 100%); }
.doc ul { padding-left: 20px; line-height: 1.7; }
.doc p { line-height: 1.7; }
.doc h2 { font-size: 18px; margin: 0 0 12px; }
.doc table { width: 100%; border-collapse: collapse; font-size: 14px; line-height: 1.55; }
.doc th, .doc td { text-align: left; vertical-align: top; padding: 8px; border-bottom: 1px solid #e1e6ed; }
.doc code { font-size: 13px; }
footer a { color: inherit; }
/* Verification and specification pages (verify.html, spec.html). Classes only: CSP style-src 'self'. */
.doc code { overflow-wrap: anywhere; }
.doc a:focus-visible, footer a:focus-visible { outline: 3px solid #6f9de0; outline-offset: 3px; border-radius: 4px; }
.doc h3 { font-size: 15px; margin: 22px 0 8px; }
.doc .scroll { overflow-x: auto; }
.doc .meta { color: #576575; font-size: 13px; line-height: 1.6; }
.doc .toc { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0; padding: 0; list-style: none; font-size: 14px; line-height: 1.7; }
.doc .points { list-style: none; padding: 0; margin: 0; }
.doc .points li { position: relative; padding: 2px 0 2px 26px; line-height: 1.65; }
.doc .points li::before { content: "✓"; position: absolute; left: 0; top: 2px; width: 18px; height: 18px; border-radius: 50%; background: #e0f5e8; color: #1a7f43;
  font-size: 12px; font-weight: 700; line-height: 18px; text-align: center; }
.doc .points.limits li::before { content: "!"; background: #fff6dd; color: #6b4a00; }
.doc .points.donts { margin-top: 8px; }
.doc .points.donts li::before { content: "✕"; background: #fde8e6; color: #b42318; }
.doc pre { margin: 12px 0; padding: 14px 16px; background: #f1f4f9; border: 1px solid #e1e6ed; border-radius: 12px; overflow-x: auto;
  font: 13px/1.6 ui-monospace, "Cascadia Mono", Consolas, monospace; white-space: pre-wrap; overflow-wrap: anywhere; }
.doc pre code { font: inherit; }
.doc .label { margin: 16px 0 0; font-size: 12px; font-weight: 700; letter-spacing: .4px; color: #54709b; }
.doc .callout { margin: 14px 0 0; padding: 12px 14px; background: #fff6dd; border: 1px solid #efd88c; border-radius: 12px; color: #6b4a00; font-size: 14px; line-height: 1.65; }
.doc .callout p { margin: 0; }
.doc table.hosts td:first-child { width: 30%; }
.doc table.hosts td:first-child code { overflow-wrap: normal; }
.doc ol li, .doc ul li { margin-bottom: 4px; }
@media (max-width: 600px) {
  .doc table.hosts thead { display: none; }
  .doc table.hosts, .doc table.hosts tbody, .doc table.hosts tr, .doc table.hosts td { display: block; width: auto; }
  .doc table.hosts td:first-child { width: auto; }
  .doc table.hosts tr { padding: 10px 0; border-bottom: 1px solid #e1e6ed; }
  .doc table.hosts td { border: 0; padding: 3px 8px; }
  .doc table.hosts td::before { content: attr(data-label); display: block; font-size: 11px; font-weight: 700; letter-spacing: .3px; color: #54709b; }
  .doc table.hosts td:first-child::before { content: none; }
  .doc table.hosts td:first-child code { font-size: 14px; font-weight: 700; }
}
.doc th { font-size: 12px; letter-spacing: .3px; color: #54709b; }
@media (max-width: 450px) { header { padding: 20px; } main { padding-top: 24px; } section { padding: 22px; } }
@media (prefers-color-scheme: dark) {
  :root { color: #e1e9f4; background: #17202c; }
  section, button { background: #202c3c; border-color: #34445a; }
  .intro, .privacy, .note { color: #a8b7cc; }
  .eyebrow { color: #9db9e2; }
  .mark { background: #263d5d; color: #b5d1fa; }
  a { color: #9db9e2; }
  .doc th, .doc td { border-color: #34445a; }
  .doc table.hosts tr { border-color: #34445a; }
  .doc table.hosts td::before { color: #9db9e2; }
  .doc .meta { color: #a8b7cc; }
  .doc th, .doc .label { color: #9db9e2; }
  .doc .points li::before { background: #173a29; color: #7fd9a3; }
  .doc .points.limits li::before { background: #3b3115; color: #f1d98a; }
  .doc .points.donts li::before { background: #3d1d1b; color: #f3a59c; }
  .doc pre { background: #1a2432; border-color: #34445a; }
  .doc .callout { background: #3b3115; border-color: #6b5a22; color: #f1d98a; }
}

/* Receive page (index.html): one centered card for every state. Scoped to body.rx so the static
   pages (home, privacy, install) keep their look. Styles are classes only (CSP style-src 'self'). */
.rx {
  --card: #fff; --line: #e1e6ed; --text: #202c3d; --muted: #576575; --accent: #2f63b6; --soft: #f1f4f9; --track: #e1e8f2;
  --info-bg: #e0eafa; --info: #265bb5; --ok-bg: #e0f5e8; --ok: #1a7f43; --warn-bg: #fff6dd; --warn-line: #efd88c; --warn: #6b4a00;
  --err-bg: #fde8e6; --err: #b42318; --neutral-bg: #eaeef4; --neutral: #4b5a6e;
  color: var(--text);
}
.rx [hidden] { display: none !important; }
.rx header { padding: 18px 24px; }
.rx .brand { display: inline-flex; align-items: center; gap: 10px; font-size: 18px; }
.rx .logo { width: 28px; height: 28px; flex: none; }
.rx #language { padding: 7px 14px; font-size: 13px; border-radius: 999px; }
.rx-main { width: min(440px, 100%); margin: auto; padding: 12px 16px 36px; }
.rx .card { word-break: keep-all; overflow-wrap: anywhere; display: flex; flex-direction: column; gap: 14px; margin: 0 0 16px; padding: 32px 28px 24px; text-align: center;
  background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: 0 10px 34px #253d6412; }
.rx .badge { width: 64px; height: 64px; border-radius: 50%; margin: 0 auto 2px; display: grid; place-items: center; }
.rx .badge .ic { display: none; width: 30px; height: 30px; }
.rx .badge[data-icon="download"] .ic-download, .rx .badge[data-icon="check"] .ic-check, .rx .badge[data-icon="alert"] .ic-alert,
.rx .badge[data-icon="clock"] .ic-clock, .rx .badge[data-icon="monitor"] .ic-monitor, .rx .badge[data-icon="ban"] .ic-ban,
.rx .badge[data-icon="users"] .ic-users, .rx .badge[data-icon="x"] .ic-x { display: block; }
.rx .badge[data-tone="info"] { background: var(--info-bg); color: var(--info); }
.rx .badge[data-tone="success"] { background: var(--ok-bg); color: var(--ok); }
.rx .badge[data-tone="warn"] { background: var(--warn-bg); color: var(--warn); }
.rx .badge[data-tone="error"] { background: var(--err-bg); color: var(--err); }
.rx .badge[data-tone="neutral"] { background: var(--neutral-bg); color: var(--neutral); }
.rx h1 { margin: 0; font-size: 22px; line-height: 1.35; letter-spacing: -.3px; overflow-wrap: anywhere; }
.rx h1:focus { outline: none; }
.rx #status { margin: 0; min-height: 0; font-size: 15px; line-height: 1.65; color: var(--muted); overflow-wrap: anywhere; }
.rx #status[data-tone] { padding: 0; }
.rx #status[data-tone="warn"] { padding: 12px 14px; text-align: left; background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: 12px; color: var(--warn); font-size: 14px; }
.rx .chip, .rx #incoming { display: flex; align-items: center; gap: 12px; margin: 0; padding: 12px 14px; text-align: left; background: var(--soft);
  border: 1px solid var(--line); border-radius: 12px; font-weight: 400; }
.rx #incoming { margin: 0; }
.rx .chip-icon { width: 30px; height: 30px; flex: none; color: var(--accent); }
.rx .chip[data-kind="file"] .chip-folder, .rx .chip[data-kind="folder"] .chip-file { display: none; }
.rx .chip-text { display: flex; flex-direction: column; gap: 2px; flex: 1; min-width: 0; }
.rx .chip-label { font-size: 12px; color: var(--muted); }
.rx .chip-name { font-size: 15px; font-weight: 600; line-height: 1.4; overflow-wrap: anywhere; }
.rx .chip-size { flex: none; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rx .pill { align-self: center; margin: 0; padding: 5px 12px; border-radius: 999px; background: var(--info-bg); color: var(--info); font-size: 13px; font-weight: 600; }
.rx .progress-block { text-align: left; }
.rx .steps { display: flex; gap: 6px; list-style: none; margin: 0 0 14px; padding: 0; }
.rx .steps li { flex: 1; display: flex; align-items: flex-start; gap: 6px; font-size: 12px; line-height: 1.4; color: var(--muted); }
.rx .steps .dot { width: 10px; height: 10px; margin-top: 3px; flex: none; border-radius: 50%; border: 2px solid var(--track); }
.rx .steps li[data-state="active"] { color: var(--text); font-weight: 600; }
.rx .steps li[data-state="active"] .dot { background: var(--accent); border-color: var(--accent); }
.rx .steps li[data-state="done"] .dot { background: var(--ok); border-color: var(--ok); }
.rx progress { display: block; width: 100%; height: 8px; margin: 0; border: 0; border-radius: 999px; overflow: hidden;
  -webkit-appearance: none; appearance: none; background: var(--track); }
.rx progress::-webkit-progress-bar { background: var(--track); border-radius: 999px; }
.rx progress::-webkit-progress-value { background: var(--accent); border-radius: 999px; }
.rx progress::-moz-progress-bar { background: var(--accent); border-radius: 999px; }
.rx .meter { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; margin: 12px 0 0; }
.rx .pct { font-size: 26px; font-weight: 700; letter-spacing: -.5px; font-variant-numeric: tabular-nums; }
.rx .bytes { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.rx .where { margin: 0; font-size: 13px; color: var(--muted); overflow-wrap: anywhere; font-weight: 400; }
.rx .closing { margin: 0; padding: 12px 14px; border-radius: 12px; background: var(--ok-bg); color: var(--ok); font-size: 14px; font-weight: 600; line-height: 1.6; }
.rx .hint { margin: 0; font-size: 14px; line-height: 1.6; color: var(--muted); }
.rx .callout { margin: 0; padding: 12px 14px; text-align: left; background: var(--warn-bg); border: 1px solid var(--warn-line);
  border-radius: 12px; color: var(--warn); font-size: 13px; line-height: 1.6; }
.rx .destination { display: flex; flex-direction: column; gap: 10px; margin: 0; text-align: left; font-size: 14px; line-height: 1.6; }
.rx .destination p { margin: 0; color: var(--muted); }
.rx .destination #destination-name { color: var(--text); font-weight: 600; padding: 10px 12px; background: var(--soft); border: 1px solid var(--line); border-radius: 10px; }
.rx .actions { display: flex; flex-direction: column; gap: 10px; margin: 4px 0 0; }
.rx .actions button, .rx #start { width: 100%; padding: 13px 18px; font-size: 15px; border-radius: 12px; border-color: var(--line);
  background: transparent; color: var(--text); }
.rx .actions button.primary, .rx #start.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.rx button.primary:not(:disabled):hover { filter: brightness(1.08); }
.rx button:focus-visible, .rx a:focus-visible { outline: 3px solid #6f9de0; outline-offset: 3px; }
.rx .trust { display: flex; align-items: flex-start; justify-content: center; gap: 8px; margin: 6px 0 0; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: 12.5px; line-height: 1.55; color: var(--muted); text-align: left; }
.rx .trust svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.rx .report, .rx #app-notice { margin: 0 0 8px; text-align: center; font-size: 12px; }
@media (max-width: 450px) {
  .rx header { padding: 14px 16px; }
  .rx-main { padding: 4px 12px 28px; }
  .rx .card { padding: 28px 20px 20px; }
}
@media (prefers-reduced-motion: no-preference) {
  .rx progress::-webkit-progress-value { transition: width .2s linear; }
}
@media (forced-colors: active) {
  .rx .badge, .rx .chip, .rx .closing, .rx .callout, .rx #status[data-tone] { border: 1px solid CanvasText; }
  .rx .steps .dot { border-color: CanvasText; }
  .rx .steps li[data-state="active"] .dot, .rx .steps li[data-state="done"] .dot { background: Highlight; }
}
@media (prefers-color-scheme: dark) {
  .rx { --card: #202c3c; --line: #34445a; --text: #e1e9f4; --muted: #a8b7cc; --accent: #5b8fdc; --soft: #1a2432; --track: #34445a;
    --info-bg: #263d5d; --info: #b5d1fa; --ok-bg: #173a29; --ok: #7fd9a3; --warn-bg: #3b3115; --warn-line: #6b5a22; --warn: #f1d98a;
    --err-bg: #4a1f1c; --err: #ff9d94; --neutral-bg: #2b394d; --neutral: #b9c6d9; }
  .rx .actions button.primary, .rx #start.primary { background: #2f63b6; border-color: #2f63b6; }
  .rx .actions button, .rx #start { background: transparent; }
  .rx .actions button.primary, .rx #start.primary { color: #fff; }
}

@media (forced-colors: active) {
  .doc pre, .doc .callout { border: 1px solid CanvasText; }
  .doc .points li::before { border: 1px solid CanvasText; background: Canvas; color: CanvasText; }
}
