:root {
  --bg: #f6f7f9; --card: #ffffff; --text: #17191c; --muted: #5d6470; --line: #e2e5ea;
  --accent: #1f6feb; --accent-text: #ffffff; --ok: #1a7f37; --warn: #9a6700; --bad: #cf222e;
  --radius: 14px;
  --accent2: #0fa3a3; --tint: #eaf2ff; --tint-line: #9cc0fb;
  --hero1: #dde9ff; --hero2: #dcf5f1;
  --ok-bg: #dcf3e2; --run-bg: #e1ecff; --bad-bg: #fde3e4; --off-bg: #eceef1;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #0f1115; --card: #171a20; --text: #e8eaee; --muted: #9aa3af; --line: #2a2f38;
          --accent: #4c8dff; --ok: #3fb950; --warn: #d29922; --bad: #f85149;
          --accent2: #2cc7bd; --tint: #16233a; --tint-line: #2f5597;
          --hero1: #142240; --hero2: #10302f;
          --ok-bg: #143322; --run-bg: #152a4d; --bad-bg: #3d1a1d; --off-bg: #23272e; }
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--bg); color: var(--text); font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
header, main, footer { max-width: 760px; margin: 0 auto; padding: 0 16px; }
header { display: flex; align-items: center; justify-content: space-between; padding-top: 20px; }
.logo { font-weight: 700; font-size: 18px; color: var(--text); text-decoration: none; }
.logo { display: inline-flex; align-items: center; }
.logo-icon { width: 30px; height: 30px; flex: none; display: block; margin-inline-end: 9px; }
.logo span { color: var(--accent); }
.lang { position: relative; }
.lang .globe { display: inline-flex; align-items: center; gap: 6px; background: none; border: 1px solid var(--line); color: var(--text);
  border-radius: 8px; padding: 5px 10px; cursor: pointer; font: inherit; font-size: 14px; }
.lang .globe:hover, .lang .globe[aria-expanded=true] { border-color: var(--text); }
.langlist { position: absolute; inset-inline-end: 0; top: calc(100% + 6px); z-index: 40; min-width: 150px; background: var(--card);
  border: 1px solid var(--line); border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: 6px; }
.langlist[hidden] { display: none; }
.langlist button { display: block; width: 100%; text-align: start; background: none; border: 0; border-radius: 6px; padding: 8px 10px;
  color: var(--text); font: inherit; font-size: 15px; cursor: pointer; }
.langlist button:hover { background: var(--tint); }
.langlist button.on { font-weight: 700; color: var(--accent); }
h1 { font-size: clamp(26px, 5vw, 38px); line-height: 1.15; margin: 40px 0 10px; }
.lead { color: var(--muted); font-size: 18px; margin: 0 0 28px; }
.motto { color: var(--accent); font-size: 19px; font-weight: 600; margin: 36px 0 0; }
.motto + h1 { margin-top: 6px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; margin-bottom: 20px; }
.drop { border: 2px dashed var(--line); border-radius: var(--radius); padding: 40px 16px; text-align: center; cursor: pointer; transition: border-color .15s; }
.drop.over, .drop:hover { border-color: var(--accent); }
.drop strong { display: block; font-size: 18px; margin-bottom: 6px; }
.drop small { color: var(--muted); }
input[type=text], input[type=email] { width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--text); font: inherit; }
label { display: block; font-size: 14px; color: var(--muted); margin: 16px 0 6px; }
.btn { display: inline-block; background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px; padding: 12px 20px; font: inherit; font-weight: 600; cursor: pointer; text-decoration: none; }
.btn[disabled] { opacity: .5; cursor: default; }
.bar { height: 10px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 14px 0 6px; }
.bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.muted { color: var(--muted); font-size: 14px; }
.status { font-size: 20px; font-weight: 600; margin: 0 0 6px; }
.status.ok { color: var(--ok); } .status.warn { color: var(--warn); } .status.bad { color: var(--bad); }
video { width: 100%; border-radius: 10px; background: #000; margin-top: 14px; }
.steps { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 14px; margin: 8px 0 30px; }
.steps div { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.steps b { display: block; margin-bottom: 4px; }
.steps span { color: var(--muted); font-size: 14px; }
.spin { display: inline-block; width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: s 1s linear infinite; vertical-align: -3px; margin-inline-end: 8px; }
@keyframes s { to { transform: rotate(360deg); } }
footer { color: var(--muted); font-size: 13px; padding-top: 20px; padding-bottom: 40px; }
footer a { color: var(--muted); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
td, th { border-bottom: 1px solid var(--line); padding: 8px 6px; text-align: start; vertical-align: top; }
.hidden { display: none !important; }
.pickers { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; margin-top: 16px; }
.btn.ghost { background: transparent; color: var(--text); border: 1px solid var(--line); font-weight: 500; }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.note { background: var(--card); border: 1px solid var(--warn); border-radius: var(--radius); padding: 12px 16px; color: var(--warn); }
.explorer { padding: 0; overflow: hidden; }
.ex-panes { display: grid; grid-template-columns: 200px 1fr; min-height: 220px; }
.ex-tree { border-right: 1px solid var(--line); padding: 8px 0; overflow: auto; max-height: 520px; font-size: 14px; }
.ex-tree a { display: block; padding: 5px 8px; color: var(--text); text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ex-tree a.on, .ex-tree a:hover { background: var(--bg); color: var(--accent); }
.ex-list { min-width: 0; overflow: auto; max-height: 560px; }
.ex-crumb { padding: 10px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ex-crumb a { color: var(--accent); text-decoration: none; }
.ex-row { display: grid; grid-template-columns: 26px minmax(0, 1fr) 84px 190px 96px; gap: 8px; align-items: center; padding: 8px 14px; border-bottom: 1px solid var(--line); font-size: 14px; }
.ex-row > span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ex-row.dir { cursor: pointer; }
.ex-row.dir:hover { background: var(--bg); }
.ex-row.skip { color: var(--muted); }
.ex-head { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding-top: 6px; padding-bottom: 6px; }
.st.ok { color: var(--ok); } .st.bad { color: var(--bad); } .st.warn { color: var(--warn); } .st.muted { color: var(--muted); }
.st .spin { width: 12px; height: 12px; margin-inline-end: 6px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); cursor: pointer; font: inherit; text-decoration: none; }
.ex-preview { border-top: 1px solid var(--line); padding: 16px; }
.ex-pvhead { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.ex-pvhead .btn { padding: 6px 12px; }
@media (max-width: 640px) {
  .ex-panes { grid-template-columns: 1fr; }
  .ex-tree { border-right: 0; border-bottom: 1px solid var(--line); max-height: 160px; }
  .ex-row { grid-template-columns: 22px minmax(0, 1fr) 70px; }
  .ex-row > span:nth-child(4) { grid-column: 2 / 4; font-size: 13px; }
  .ex-row > span:nth-child(5) { grid-column: 2 / 4; }
  .ex-head { display: none; }
}
.meter { display: flex; justify-content: space-between; align-items: baseline; margin-top: 16px; font-size: 14px; }
.meter b { font-variant-numeric: tabular-nums; }
#up .bar, #rp .bar { margin-top: 6px; }
.bar i.rp { background: var(--ok); }
#uptext, #rptext { font-variant-numeric: tabular-nums; }
.ex-row { grid-template-columns: 26px minmax(0, 1fr) 84px minmax(190px, 280px) 80px; }
.st small { display: block; color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; margin-top: 2px; }
.btn.danger { background: transparent; color: var(--bad); border: 1px solid var(--bad); font-weight: 600; }
.jobhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.jobhead h2 { margin: 0 0 2px; font-size: 20px; overflow-wrap: anywhere; }
.jobhead p { margin: 0 0 12px; }
.picked { margin: 14px 0 0; font-size: 14px; }
#older { margin: 16px 0; border-top: 1px solid var(--line); }
.flow { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; padding: 0; margin: 0 0 20px; counter-reset: none; }
.flow li { display: flex; gap: 10px; align-items: flex-start; padding: 12px; border-radius: var(--radius); background: var(--card); border: 1px solid var(--line); color: var(--muted); }
.flow li i { flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-style: normal; font-weight: 700; border: 2px solid var(--line); }
.flow li b { display: block; color: inherit; font-size: 15px; }
.flow li span { font-size: 13px; }
.flow li.on { color: var(--text); border-color: var(--accent); }
.flow li.on i { border-color: var(--accent); color: var(--accent); }
.flow li.done { color: var(--text); }
.flow li.done i { background: var(--ok); border-color: var(--ok); color: #fff; font-size: 0; }
.flow li.done i::after { content: '✓'; font-size: 15px; }
.flow li.bad { border-color: var(--bad); }
.flow li.bad i { border-color: var(--bad); color: var(--bad); }
.refbox { margin-top: 14px; }
.refbox summary { cursor: pointer; color: var(--accent); font-size: 14px; }
.refbox input { margin-top: 8px; }
#recent h2 { margin: 0 0 12px; font-size: 20px; }
.copy { background: none; border: 1px solid transparent; border-radius: 6px; padding: 4px 6px; color: var(--muted); cursor: pointer; line-height: 0; }
.copy:hover { border-color: var(--line); color: var(--accent); }
.copy.done { color: var(--ok); }
.copy.del:hover { border-color: var(--bad); color: var(--bad); }
#recent td:nth-last-child(-n+2), #recent th:nth-last-child(-n+2) { text-align: center; }

/* ---- colour ---- */
body { background: linear-gradient(160deg, var(--hero1) 0, var(--hero2) 340px, var(--bg) 620px) no-repeat, var(--bg); }
h1 { background: linear-gradient(90deg, var(--text) 0, var(--accent) 140%); -webkit-background-clip: text; background-clip: text; color: transparent; }
.logo span { background: linear-gradient(90deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.card { box-shadow: 0 6px 24px rgba(31, 111, 235, .07); }
.drop { background: var(--tint); border: 2px dashed var(--accent); transition: border-color .15s, background .15s; }
.drop.over, .drop:hover, .drop.has { border-style: solid; border-color: var(--accent); background: var(--run-bg); }
.upicon { display: inline-grid; place-items: center; width: 54px; height: 54px; border-radius: 50%; margin-bottom: 12px;
  color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 6px 16px rgba(31, 111, 235, .3); }
.btn:not(.ghost):not(.danger) { background: linear-gradient(135deg, var(--accent), var(--accent2)); }
.btn:not(.ghost):not(.danger):hover { filter: brightness(1.07); }
.bar i { background: linear-gradient(90deg, var(--accent), var(--accent2)); }
.bar i.rp { background: linear-gradient(90deg, var(--accent2), var(--ok)); }
.flow li.on { background: var(--tint); }
.flow li.on i { background: var(--accent); color: #fff; }
.flow li.done { border-color: var(--ok); }
.flow li.bad { background: var(--bad-bg); }
.pill { display: inline-block; padding: 2px 10px; border-radius: 99px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.pill.ok { background: var(--ok-bg); color: var(--ok); }
.pill.run { background: var(--run-bg); color: var(--accent); }
.pill.bad { background: var(--bad-bg); color: var(--bad); }
.pill.off { background: var(--off-bg); color: var(--muted); }
#recent td { vertical-align: middle; }
.again.expert { border-color: var(--warn); }
.btn.disabled { opacity: .6; pointer-events: none; }
#dl .actions { margin-top: 14px; }
.again select { padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: var(--card); color: var(--text); font: inherit; margin-bottom: 10px; }
label.check { display: flex; gap: 8px; align-items: flex-start; color: var(--text); margin: 0 0 10px; }
label.check input { margin-top: 3px; }
.again input[type=text] { margin-bottom: 10px; }
.guide h2 { margin: 0 0 8px; font-size: 18px; }
.guide ul { margin: 0; padding-inline-start: 20px; }
.guide li { margin: 4px 0; }
.guide .btn { margin: 4px 0 8px; }
.sep { border: 0; border-top: 1px solid var(--line); margin: 36px 0 8px; }
ul.guides { list-style: none; padding: 0; } ul.guides li { padding: 8px 0; border-bottom: 1px solid var(--line); }
ul.guides li:last-child { border-bottom: 0; }
th { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.scroll { overflow-x: auto; }
@media (max-width: 640px) { .flow { grid-template-columns: 1fr; } .flow li span { display: none; } }
.frames { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-top: 10px; }
.frames figure { margin: 0; }
.frames img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 8px; background: #000; display: block; }
.frames figcaption { font-size: 12px; color: var(--muted); text-align: center; margin-top: 4px; font-variant-numeric: tabular-nums; }
.again { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; margin: 16px 0; background: var(--bg); }
.again p { margin: 6px 0 10px; }
@media (max-width: 640px) { .frames { grid-template-columns: repeat(2, 1fr); } }
.inline { display: flex; gap: 8px; }
.inline input { flex: 1; min-width: 0; }

.agree { margin: 12px 0 0; font-size: 13px; }
.agree a { color: inherit; }

/* information pages: only the chosen language */
html[data-show=tr] [data-lang]:not([data-lang=tr]), html[data-show=en] [data-lang]:not([data-lang=en]),
html[data-show=ar] [data-lang]:not([data-lang=ar]), html[data-show=de] [data-lang]:not([data-lang=de]),
html[data-show=es] [data-lang]:not([data-lang=es]) { display: none !important; }


/* the top bar, the same on every page */
header.topbar { flex-wrap: wrap; gap: 10px 18px; }
.menu { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; margin-inline-end: auto; margin-inline-start: 14px; font-size: 15px; }
.menu a { color: var(--muted); text-decoration: none; }
.menu a:hover, .menu a[aria-current] { color: var(--text); }
.menu a.go { color: #fff; background: var(--accent); border-radius: 8px; padding: 5px 12px; font-weight: 600; }
.menu a.go[aria-current] { color: #fff; }
.menu a.mine { color: var(--text); border: 1px solid var(--line); border-radius: 999px; padding: 3px 11px; font-size: 14px; }
.menu a.mine.busy::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--accent);
  margin-right: 7px; vertical-align: 1px; animation: blink 1.2s infinite; }
@keyframes blink { 50% { opacity: .25; } }
@media (max-width: 640px) {
  header.topbar .menu { order: 3; flex-basis: 100%; margin-inline-start: 0; }
}

/* the uploads at the bottom of the screen */
.dock { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; background: var(--card, #fff); border-top: 1px solid var(--line, #dbe3ee);
  box-shadow: 0 -6px 24px rgba(15, 30, 60, .08); padding: 10px 16px; }
.dockin { max-width: 700px; margin: 0 auto; display: grid; gap: 8px; }
.drow .dtop { display: flex; gap: 10px; align-items: baseline; font-size: 14px; }
.drow .dname { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted, #667); }
.drow .bar { margin: 4px 0 2px; }
.drow p { margin: 0; font-size: 13px; }
.drow.ok .bar i { background: var(--ok, #1a7f37); }
.drow.ok .dpct { color: var(--ok, #1a7f37); }
body.docked { padding-bottom: 150px; }
.again.sample { border-color: var(--accent); }

/* "My files" in the top bar; the note under the upload box */
.menu a.mine { display: inline-flex; align-items: center; gap: 6px; }
.menu a.mine .count { background: var(--accent); color: var(--accent-text); border-radius: 99px; font-size: 12px; padding: 0 7px; line-height: 18px; }
.menu a.mine.on { border-color: var(--accent); }
.menu a.mine.ready::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--ok); }
.upnote { background: var(--tint); border: 1px solid var(--tint-line); border-radius: 10px; padding: 10px 14px; margin: 12px 0 0; font-size: 15px; }

#recent { margin-top: 28px; }
.back { margin: 24px 0 10px; }

/* the recycle bin */
.menu { display: flex; gap: 8px; align-items: center; }
.menu a.bin { color: var(--muted); }
.menu a.bin .count { background: var(--muted); }
#bin { margin-top: 28px; }
.binhead { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.btn.small { padding: 6px 12px; font-size: 14px; }
#inBin { margin-top: 24px; display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.toast { position: fixed; left: 50%; transform: translateX(-50%); bottom: 24px; z-index: 30; background: var(--text); color: var(--bg);
  border-radius: 10px; padding: 10px 16px; box-shadow: 0 6px 24px rgba(0, 0, 0, .2); display: flex; gap: 14px; align-items: center; max-width: calc(100% - 32px); }
.toast button.link { background: none; border: 0; color: var(--tint-line); font-weight: 600; cursor: pointer; padding: 0; }
body.docked .toast { bottom: 170px; }
#recentRows tr.latest td { background: var(--tint); }
.tag { display: inline-block; background: var(--accent); color: var(--accent-text); border-radius: 99px; font-size: 11px; font-weight: 600;
  padding: 1px 8px; margin-left: 6px; vertical-align: middle; white-space: nowrap; }

/* the sample video question: a pop-up over the page */
.overlay { position: fixed; inset: 0; z-index: 40; background: rgba(10, 20, 40, .45); display: flex; align-items: center;
  justify-content: center; padding: 16px; }
.again.sample.modal { position: relative; background: var(--card); max-width: 560px; width: 100%; margin: 0; padding: 26px 24px 22px;
  border-radius: var(--radius); box-shadow: 0 20px 60px rgba(0, 0, 0, .25); }
.modal .x { position: absolute; top: 8px; right: 10px; background: none; border: 0; font-size: 26px; line-height: 1; color: var(--muted); cursor: pointer; }
.modal .x:hover { color: var(--text); }
.modal b#smpHead { font-size: 18px; display: block; margin-bottom: 6px; padding-right: 24px; }
body.modal-open { overflow: hidden; }

.why { margin: .6rem 0 0; text-align: center; font-size: .92rem; }

/* the home page's first screen: two big choices (side by side, one under the other on a phone) */
.choices { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin: 26px 0 30px; }
.choice { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--card); border: 2px solid var(--line);
  border-radius: var(--radius); padding: 26px 24px; color: var(--text); text-decoration: none; transition: border-color .15s, transform .15s; }
.choice:hover, .choice:focus-visible { border-color: var(--accent); transform: translateY(-2px); }
.choice b { font-size: 21px; line-height: 1.25; }
.choice span:not(.btn):not(.chicon):not(.chicons) { color: var(--muted); font-size: 16px; flex: 1; }
.choice .btn { margin-top: 8px; }
.chicon { display: inline-flex; width: 56px; height: 56px; border-radius: 14px; align-items: center; justify-content: center;
  background: var(--tint); color: var(--accent); margin-bottom: 4px; }
#chCard .chicon { color: var(--accent2); }
.chicons { display: flex; gap: 10px; }
#chBack { margin: 24px 0 0; }
@media (max-width: 640px) { .choices { grid-template-columns: 1fr; } .choice { padding: 22px 18px; } }

/* Arabic: right to left, a font with Arabic letters first */
html[dir=rtl] body { font-family: "Segoe UI", Tahoma, "Noto Sans Arabic", system-ui, sans-serif; }
html[dir=rtl] .logo { direction: ltr; }
