/* nojeff — one stylesheet, dark by default, built from 360 pixels up.
 *
 * House rule 30 asks for dark by default, so there is no light theme to
 * switch between: these are the colours, and a browser asking for light gets
 * a slightly softer black rather than a second design nobody maintains.
 *
 * Nothing is fetched from anywhere: the type is whatever the reader's own
 * system offers. A font service would hand that reader's address to another
 * company before a word appeared, which is exactly what the privacy page
 * promises does not happen.
 */

:root {
  --ink: #f2efe9;
  --ink-dim: #a9a49b;
  --back: #101114;
  --panel: #191b20;
  --panel-edge: #2a2d35;
  --amber: #ffb020;
  --amber-dark: #b87a10;
  --green: #7bc47f;
  --red: #e2725b;
  --measure: 38rem;
  --gap: 1.1rem;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--back);
  color: var(--ink);
  font: 1rem/1.6 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  padding: 0 1rem 5rem;
}

/* --- the frame ------------------------------------------------------- */

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  position: static;
  display: inline-block;
  padding: .5rem;
  background: var(--amber);
  color: #000;
}

.top {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .6rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: 1.4rem 0 1rem;
  border-bottom: 1px solid var(--panel-edge);
}

.wordmark {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: -.02em;
  text-decoration: none;
  color: var(--ink);
}
.wordmark .no { color: var(--amber); }
/* The joke is the whole name, so the strike-through carries it rather than a
 * sentence explaining it. */
.wordmark .struck { text-decoration: line-through; text-decoration-thickness: 2px; }

.top nav { display: flex; gap: 1rem; font-size: .9rem; }
.top nav a, .bottom a { color: var(--ink-dim); }

main {
  max-width: var(--measure);
  margin: 0 auto;
}

.bottom {
  max-width: var(--measure);
  margin: 3rem auto 0;
  padding-top: 1rem;
  border-top: 1px solid var(--panel-edge);
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
  font-size: .85rem;
  color: var(--ink-dim);
}
.version { margin-left: auto; }

a { color: var(--amber); }
a:hover { color: #ffc75a; }

/* --- the front page --------------------------------------------------- */

.hero { padding: 2.2rem 0 1.2rem; }
.hero h1 {
  font-size: clamp(2rem, 9vw, 3rem);
  line-height: 1.1;
  letter-spacing: -.03em;
  margin: 0 0 .6rem;
}
.lede { color: var(--ink-dim); margin: 0; font-size: 1.05rem; }
.eyebrow {
  margin: 0 0 .2rem;
  color: var(--ink-dim);
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .1em;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  padding: 1.2rem;
  margin: 0 0 var(--gap);
}
.panel.narrow { max-width: 22rem; }
.panel h2 { margin-top: 0; font-size: 1.1rem; }
.panel.bad { border-left: 3px solid var(--red); }
.panel.warn { border-left: 3px solid var(--amber); }
.panel.ask { border-left: 3px solid var(--amber); }

label {
  display: block;
  margin: .9rem 0 .3rem;
  font-size: .85rem;
  color: var(--ink-dim);
}
label.inline {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  margin: .4rem 1rem .4rem 0;
  color: var(--ink);
}

input[type=text], input[type=url], input[type=password], input[type=number],
select {
  width: 100%;
  padding: .75rem;
  font: inherit;
  color: var(--ink);
  background: #0b0c0f;
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
}
input:focus, select:focus, button:focus {
  outline: 2px solid var(--amber);
  outline-offset: 1px;
}

button, .button {
  display: inline-block;
  margin-top: .9rem;
  padding: .75rem 1.1rem;
  font: inherit;
  font-weight: 600;
  color: #14100a;
  background: var(--amber);
  border: 0;
  border-radius: 8px;
  cursor: pointer;
  text-decoration: none;
}
button:hover, .button:hover { background: #ffc75a; color: #14100a; }

.plain {
  display: inline-block;
  margin-top: .9rem;
  margin-left: .8rem;
  font-size: .9rem;
}
.linkish {
  background: none;
  color: var(--ink-dim);
  padding: 0;
  margin: 0;
  font-size: .85rem;
  text-decoration: underline;
}
.linkish:hover { background: none; color: var(--amber); }
.linkish.danger:hover { color: var(--red); }
form.inline { display: inline; }

.hint { color: var(--ink-dim); font-size: .85rem; margin: .6rem 0 0; }

/* --- the answer ------------------------------------------------------- */

.count { color: var(--ink-dim); font-size: .9rem; margin: 1.4rem 0 .6rem; }

.cards { list-style: none; margin: 0; padding: 0; }

.card {
  background: var(--panel);
  border: 1px solid var(--panel-edge);
  border-left: 3px solid var(--panel-edge);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  margin-bottom: var(--gap);
}
.card.geprueft { border-left-color: var(--green); }
.card.eigene_einschaetzung { border-left-color: var(--amber); }
.card.web, .card.ungeprueft { border-left-color: var(--ink-dim); }

.card-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .6rem;
}
.card h3 { margin: 0; font-size: 1.15rem; }
.country { color: var(--ink-dim); font-size: .8rem; white-space: nowrap; }

.comment { margin: .5rem 0; }
.ethics { margin: .6rem 0; font-size: .88rem; color: var(--ink-dim); }
.source { margin-left: .3rem; white-space: nowrap; }
.go { margin: .8rem 0 0; }

.badge {
  display: inline-block;
  padding: .1rem .45rem;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: #14100a;
  background: var(--ink-dim);
  margin-right: .35rem;
}
.badge.geprueft { background: var(--green); }
.badge.eigene_einschaetzung { background: var(--amber); }
.badge.unbekannt, .badge.ungeprueft, .badge.off {
  background: #4a4d55;
  color: var(--ink);
}

.wish { margin: .2rem 0 .4rem; color: var(--ink-dim); }
.tags { margin: .4rem 0; }
.tag {
  display: inline-block;
  padding: .1rem .45rem;
  margin: 0 .3rem .3rem 0;
  border: 1px solid var(--panel-edge);
  border-radius: 999px;
  font-size: .75rem;
  color: var(--ink-dim);
}

.share, .again { margin-top: 1.4rem; }
.share { color: var(--ink-dim); font-size: .85rem; }

/* --- prose pages ------------------------------------------------------ */

.prose h1 { font-size: 2rem; letter-spacing: -.02em; margin: 2rem 0 1rem; }
.prose h2 { font-size: 1.15rem; margin: 2rem 0 .4rem; }
.prose p { margin: 0 0 1rem; }
.plainlist { padding-left: 1.1rem; }
.plainlist li { margin-bottom: .5rem; }

/* --- the notice ------------------------------------------------------- */

.notice {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  background: #05060a;
  border-top: 1px solid var(--panel-edge);
  /* The right padding is the bug button's column: 3rem of button, 1rem of
     margin either side. Nothing measures anything, so this holds at every
     width and with scripting switched off. */
  padding: .9rem 5rem .9rem 1rem;
  padding-bottom: calc(env(safe-area-inset-bottom) + .9rem);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .8rem;
  font-size: .85rem;
}
.notice p { margin: 0; flex: 1 1 16rem; color: var(--ink-dim); }
.notice button { margin: 0; padding: .5rem .9rem; }

/* --- the bug button and its dialog ------------------------------------ */

/* 3rem is 48px, over the house's 44px floor. It stays in the corner whether
 * or not the notice bar is up; the bar keeps a column clear for it with its
 * own padding-right below, which is measured in nothing and therefore cannot
 * be wrong at a width nobody tried. Its own "Ich sehe" button is at the
 * start of that row and never reaches the column. */
.bug {
  position: fixed;
  right: 1rem;
  bottom: calc(env(safe-area-inset-bottom) + 1rem);
  z-index: 20;
  width: 3rem;
  height: 3rem;
  display: grid;
  place-items: center;
  font-size: 1.4rem;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 2px 10px rgba(0, 0, 0, .5);
  text-decoration: none;
}
.bug:hover { background: #9ad89d; }

dialog {
  width: min(34rem, calc(100vw - 1.5rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  border: 1px solid var(--panel-edge);
  border-radius: 12px;
  background: var(--panel);
  color: var(--ink);
}
dialog::backdrop { background: rgba(0, 0, 0, .6); }

.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .9rem 1.1rem;
  border-bottom: 1px solid var(--panel-edge);
}
.dialog-head h2 { margin: 0; font-size: 1.05rem; }
.dialog-head button { font-size: 1rem; }

.dialog-body { padding: 1.1rem; }

.report-form fieldset.kinds {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.2rem;
  border: 0;
  padding: 0;
  margin: 0 0 .6rem;
}
.report-form legend {
  padding: 0;
  font-size: .85rem;
  color: var(--ink-dim);
}
.tick {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.75rem;
  margin: 0;
  color: var(--ink);
  cursor: pointer;
}
.tick input {
  width: 1.15rem;
  height: 1.15rem;
  margin: 0;
  accent-color: var(--amber);
}

.report-form textarea {
  width: 100%;
  padding: .75rem;
  font: inherit;
  color: var(--ink);
  background: #0b0c0f;
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  resize: vertical;
}

.acts {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: .8rem;
}
.acts .plain { margin-left: 0; }

/* --- the admin area --------------------------------------------------- */

body.admin { --measure: 60rem; }

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  max-width: var(--measure);
  margin: 0 auto;
  padding: .8rem 0;
  font-size: .9rem;
  border-bottom: 1px solid var(--panel-edge);
}

.flashes { list-style: none; padding: 0; margin: 1rem 0; }
.flashes li {
  padding: .7rem 1rem;
  border-radius: 8px;
  margin-bottom: .5rem;
  background: var(--panel);
  border-left: 3px solid var(--green);
}
.flashes li.bad { border-left-color: var(--red); }

.stats { list-style: none; padding: 0; display: grid; gap: .4rem; }
.stats strong { color: var(--amber); font-size: 1.2rem; }

table { border-collapse: collapse; width: 100%; font-size: .9rem; }
th, td {
  text-align: left;
  padding: .5rem .6rem;
  border-bottom: 1px solid var(--panel-edge);
  vertical-align: top;
}
th { color: var(--ink-dim); font-weight: 600; }
tr.thin td, tr.off td { color: var(--ink-dim); }

/* A wide table on a narrow screen scrolls inside itself rather than pushing
 * the page sideways. */
.wide { display: block; overflow-x: auto; white-space: nowrap; }
.wide td.tags { white-space: normal; min-width: 12rem; }

.checkgrid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr));
  gap: .2rem;
}
fieldset {
  border: 1px solid var(--panel-edge);
  border-radius: 8px;
  margin: 1rem 0;
}
legend { color: var(--ink-dim); font-size: .85rem; padding: 0 .4rem; }

.release .feature { margin-bottom: 1rem; }
.release h3 { margin: .8rem 0 .3rem; font-size: 1rem; color: var(--ink-dim); }
details { margin: .3rem 0; }
summary { cursor: pointer; }
.when { color: var(--ink-dim); font-size: .8rem; margin-left: .4rem; }

code {
  background: #0b0c0f;
  padding: .1rem .3rem;
  border-radius: 4px;
  font-size: .85em;
}

.ok { color: var(--green); }
.warn { color: var(--amber); }
.bad { color: var(--red); }
.stored { color: var(--ink-dim); font-size: .85rem; margin: .4rem 0 0; }
.row-actions { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; }

/* --- a browser asking for light gets a softer black, not a second design */

@media (prefers-color-scheme: light) {
  :root {
    --back: #17181c;
    --panel: #212329;
  }
}

@media (min-width: 40rem) {
  .hero { padding: 3rem 0 1.6rem; }
}
