/* Layout shared by every browser tool: a slim top bar, a work area, a privacy footer.
   Load after brand.css. */

.app-bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap;
  padding: 10px var(--gutter); border-bottom: 1px solid var(--line); background: var(--surface); }
.app-brand { display: inline-flex; align-items: center; gap: 10px; color: var(--fg); text-decoration: none; }
.app-brand img { width: 34px; height: 34px; border-radius: 22%; }
.app-brand strong { font-family: var(--font-display); font-weight: 600; font-size: 1.2rem; }
.app-brand > span { color: var(--muted); font-size: var(--step--1); }
.app-brand .wordmark { font-size: 1.1rem; }
.app-actions { display: flex; gap: 8px; align-items: center; }
.app-actions .btn { padding: 0.45em 0.9em; }

.app-main { width: min(1180px, 100% - 2 * var(--gutter)); margin: 24px auto 48px; }

.drop {
  display: grid; place-items: center; text-align: center; gap: 10px;
  min-height: 240px; padding: 32px 20px;
  border: 2px dashed var(--muted); border-radius: var(--radius-m);
  background: var(--surface);
}
.drop[data-drag="over"] { border-color: var(--primary); background: color-mix(in srgb, var(--primary) 8%, var(--surface)); }
.drop h2 { font-size: var(--step-2); margin: 0; }
.drop p { margin: 0 auto; color: var(--muted); }
.drop .btn-row { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.toolbar { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; justify-content: space-between;
  padding: 12px 0; border-bottom: 1px solid var(--line); margin-bottom: 16px; }

.status { font-size: var(--step--1); color: var(--muted); min-height: 1.4em; }
.status[data-kind="error"] { color: var(--danger); }

.progress { height: 8px; border-radius: 4px; background: var(--line); overflow: hidden; }
.progress > span { display: block; height: 100%; width: 0; background: var(--primary); transition: width 0.2s linear; }

.limit-note { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; justify-content: space-between;
  padding: 12px 16px; border-radius: var(--radius-m); background: var(--highlight); color: var(--highlight-ink);
  border: 1px solid color-mix(in srgb, var(--highlight) 70%, #000); margin: 16px 0; }
.limit-note p { margin: 0; }

.app-foot { width: min(1180px, 100% - 2 * var(--gutter)); margin: 0 auto 32px; padding-top: 16px;
  border-top: 1px solid var(--line); font-size: var(--step--1); color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; justify-content: space-between; }
.app-foot a { color: var(--muted); }

.field { display: grid; gap: 6px; }
.field label { font-weight: 600; font-size: var(--step--1); }
.field input, .field select, .field textarea { font: inherit; padding: 0.55em 0.7em; border: 2px solid var(--line);
  border-radius: var(--radius-s); background: var(--bg); color: var(--fg); min-width: 0; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--primary); outline: none; }
/* Controls without a border to colour (sliders, tick boxes, radio buttons, colour pickers) keep the
   brand's focus ring when reached by keyboard. */
.field input:is([type="range"], [type="checkbox"], [type="radio"], [type="color"]):focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.check { display: inline-flex; gap: 8px; align-items: center; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--primary); }
