/* Source Sans Pro, the typeface of morethanmonkeys.co.uk, hosted here (see fonts/NOTICE.txt) so
   visiting the site sends nothing to Google. Latin subset: other characters fall back. */
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/fonts/source-sans-pro-400.woff2") format("woff2");
}
@font-face {
  font-family: "Source Sans Pro";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/fonts/source-sans-pro-700.woff2") format("woff2");
}

/* The palette of morethanmonkeys.co.uk: slate (#3e4351 and the darker #282b34) with green (#78d64b).
   Dark is the default, as on that site; visitors who ask for light get its light grey (#f3f3f3).
   Text pairs are kept above 4.5:1 contrast, and tests/test_styles.py checks every one. */
:root {
  --bg: #3e4351;
  --surface: #282b34;
  --field: #32363f;
  --text: #e8eaee;
  --muted: #b0b6c1;
  --border: rgba(255, 255, 255, 0.2);
  --ring: rgba(255, 255, 255, 0.5);
  --accent: #78d64b;
  --accent-hover: #8fe064;
  --on-accent: #282b34;
  --link: #78d64b;
  --focus: #78d64b;
  --danger: #ffa59d;
  --danger-bg: #4b2826;
  --radius: 6px;
  --font: "Source Sans Pro", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color-scheme: dark;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f3f3f3;
    --surface: #ffffff;
    --field: #ffffff;
    --text: #282b34;
    --muted: #566070;
    --border: #cdd1d9;
    --ring: rgba(40, 43, 52, 0.45);
    --accent-hover: #69c13d;
    --link: #2a7a17;
    --focus: #1f6f0e;
    --danger: #b3261e;
    --danger-bg: #fdecea;
    color-scheme: light;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  letter-spacing: 0.02em;
}

.wrap {
  width: min(100%, 760px);
  margin-inline: auto;
  padding-inline: 16px;
}

.site-header {
  padding-block: 32px 8px;
}
.site-header h1 {
  margin: 0 0 4px;
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0;
}
.site-header .brand {
  display: flex;
  align-items: center;
  gap: 12px;
}
.brand img {
  flex: none;
  width: 40px;
  height: 40px;
}
.site-header p {
  margin: 0;
  color: var(--muted);
}

.muted {
  color: var(--muted);
}

.skip-link {
  position: absolute;
  left: -999px;
}
.skip-link:focus {
  left: 16px;
  top: 8px;
  background: var(--surface);
  padding: 8px 12px;
  border-radius: var(--radius);
}

/* The tool picker takes its look from the navigation on morethanmonkeys.co.uk: small, bold,
   letter-spaced capitals in an outlined box, the current one filled with the accent. */
#tool-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-block: 20px;
}
#tool-picker button {
  font: 700 0.8125rem/1.2 var(--font);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text);
  background: transparent;
  border: 0;
  box-shadow: inset 0 0 0 1px var(--ring);
  border-radius: var(--radius);
  padding: 11px 14px;
  cursor: pointer;
}
#tool-picker button:hover {
  box-shadow: inset 0 0 0 2px var(--text);
}
#tool-picker button[aria-current="true"] {
  background: var(--accent);
  box-shadow: none;
  color: var(--on-accent);
}

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px;
}
.panel h2 {
  margin: 0 0 4px;
  font-size: 1.5rem;
  line-height: 1.25;
}
.panel:focus {
  outline: none;
}

.dropzone {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 32px 16px;
  margin-top: 16px;
  text-align: center;
  border: 2px dashed var(--ring);
  border-radius: var(--radius);
  cursor: pointer;
}
.dropzone:hover,
.dropzone.is-dragging,
.dropzone:focus-within {
  border-color: var(--accent);
}
.dropzone input {
  /* Visually hidden but still focusable, so the zone works with a keyboard. */
  position: absolute;
  width: 1px;
  height: 1px;
  opacity: 0;
}
.dropzone-title {
  font-weight: 700;
}

.file-list {
  list-style: none;
  margin: 12px 0 0;
  padding: 0;
}
.file-list li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.file-list li + li {
  margin-top: 6px;
}
.file-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.file-actions {
  display: flex;
  flex-shrink: 0;
  gap: 12px;
}
.link-button {
  font: inherit;
  letter-spacing: inherit;
  color: var(--link);
  background: none;
  border: 0;
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 0.15em;
}
.link-button:disabled {
  opacity: 0.35;
  cursor: default;
}

.options {
  margin: 20px 0 0;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.options legend {
  padding-inline: 6px;
  font-weight: 700;
}
.field + .field {
  margin-top: 16px;
}
.field label {
  display: block;
  font-weight: 700;
}
.field-check label {
  display: inline;
  font-weight: 400;
}
.field input:not([type="checkbox"]),
.field select {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 9px 12px;
  font: inherit;
  letter-spacing: inherit;
  color: var(--text);
  background: var(--field);
  border: 1px solid var(--ring);
  border-radius: var(--radius);
}
.field .hint {
  display: block;
  margin-top: 2px;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Buttons are the green of morethanmonkeys.co.uk with bold, letter-spaced capitals. The text is the
   dark slate, not white, because white on this green is about 1.9:1 and unreadable in sunlight. */
.button {
  display: inline-block;
  margin-top: 20px;
  padding: 13px 28px;
  font: 700 0.9375rem/1.2 var(--font);
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  cursor: pointer;
  text-decoration: none;
}
.button:hover {
  background: var(--accent-hover);
}
.button:disabled {
  opacity: 0.6;
  cursor: progress;
}

:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.notice {
  margin: 12px 0 0;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--muted);
}
progress {
  display: block;
  width: 100%;
  margin-top: 12px;
  accent-color: var(--accent);
}
#delete-now {
  margin-left: 16px;
}
.status {
  min-height: 1.5em;
  margin: 12px 0 0;
  color: var(--muted);
}
.error {
  margin: 12px 0 0;
  padding: 10px 14px;
  color: var(--danger);
  background: var(--danger-bg);
  border-radius: var(--radius);
}
.result {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}
.result h3 {
  margin: 0;
}

/* The footer links echo the site's navigation: small capitals, widely spaced. */
.site-footer {
  padding-block: 32px;
  font-size: 0.8125rem;
}
.site-footer nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
}
.site-footer a,
.site-footer .link-button {
  color: var(--muted);
  font-size: inherit;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
}
.site-footer a:hover,
.site-footer .link-button:hover {
  color: var(--text);
  text-decoration: underline;
  text-underline-offset: 0.3em;
}

/* Adverts. The slot stays hidden until ads.js has an ad to put in it, reserves room so the page
   doesn't jump when the ad arrives, and disappears again if Google has nothing to show. Each is
   labelled, and kept well away from the Download button. */
.ad-slot {
  min-height: 120px;
  margin-block: 24px;
  text-align: center;
}
.ad-slot[data-slot="bottom"] {
  margin-top: 32px;
}
.ad-slot:has(ins[data-ad-status="unfilled"]) {
  display: none;
}
.ad-slot ins {
  display: block;
}
.ad-label {
  display: block;
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.75rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

/* The privacy policy. */
.site-header a,
.prose a {
  color: var(--link);
  text-underline-offset: 0.15em;
}
.prose {
  padding-bottom: 8px;
}
.prose h2 {
  margin: 36px 0 8px;
  font-size: 1.375rem;
  line-height: 1.3;
}
.prose p,
.prose ul {
  margin: 0 0 12px;
}
.prose ul {
  padding-left: 20px;
}
.prose li {
  margin-bottom: 6px;
}

[hidden] {
  display: none !important;
}
