/* Plain style of the internal application, on the variables of the public site (site/tokens.css).
   Fonts as on the public site: self-hosted, SIL Open Font License 1.1, see ../fonts/OFL-*.txt */
@font-face { font-family: 'Newsreader'; font-style: normal; font-weight: 200 800; font-display: swap; src: url(../fonts/newsreader.woff2) format('woff2'); }
@font-face { font-family: 'Newsreader'; font-style: italic; font-weight: 200 800; font-display: swap; src: url(../fonts/newsreader-italic.woff2) format('woff2'); }
@font-face { font-family: 'Schibsted Grotesk'; font-style: normal; font-weight: 400 900; font-display: swap; src: url(../fonts/schibsted-grotesk.woff2) format('woff2'); }

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--kreide);
  color: var(--umbra);
  font: 400 18px/1.55 var(--antiqua);
}

:root { --column: max(var(--measure), 40rem); }

/* One column, wide enough for an agenda line on the desktop. Long words and addresses break
   instead of running over the edge. */
main { max-width: var(--column); margin: 0 auto; padding: 24px var(--gutter) 64px; overflow-wrap: break-word; }

h1, h2, h3 { font-family: var(--grotesk); font-weight: 600; line-height: 1.2; }
h1 { font-size: clamp(26px, 6vw, 34px); margin: 0.4em 0 0.5em; }
h2 { font-size: 22px; margin: 1.8em 0 0.5em; }
h3 { font-size: 17px; margin: 0 0 0.3em; }

a { color: inherit; text-underline-offset: 0.15em; }
a:hover { color: var(--sepia-600); }
:focus-visible { outline: 2px solid currentColor; outline-offset: 3px; }

del { color: var(--sepia-600); }

/* The menu: links and the logout button, each at least 44 px high to tap. */
.menu { border-bottom: 1px solid var(--sepia-200); font-family: var(--grotesk); font-size: 15px; }
.menu ul { display: flex; flex-wrap: wrap; max-width: var(--column); margin: 0 auto; padding: 0 calc(var(--gutter) - 9px); list-style: none; }
.menu a, .menu button {
  display: inline-flex; align-items: center; min-height: 44px; padding: 0 9px;
  border: 0; background: none; color: inherit; font: inherit; text-decoration: none; cursor: pointer;
}
.menu form { margin: 0; }
.menu a:hover, .menu button:hover { color: var(--sepia-600); text-decoration: underline; }
.menu a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; }

.messages { margin: 0 0 24px; padding: 0; list-style: none; }
.messages li, .notice { margin: 0 0 8px; padding: 8px 12px; border-left: 3px solid var(--umbra); background: rgba(46, 42, 40, 0.05); }

.back { margin: 0; font-family: var(--grotesk); font-size: 15px; }
.back a { display: inline-flex; align-items: center; min-height: 44px; }

/* Rows between hairlines, each a link of at least 44 px. */
.rows { margin: 0 0 1em; padding: 0; list-style: none; border-bottom: 1px solid var(--sepia-200); }
.rows li { border-top: 1px solid var(--sepia-200); }
.row { display: block; min-height: 44px; padding: 12px 0; text-decoration: none; }
/* A row that is a link says so with a quiet arrow at the first line; the text keeps clear of it. */
a.row { position: relative; padding-right: 32px; }
a.row::after { content: "→"; content: "→" / ""; position: absolute; top: 12px; right: 4px; color: var(--sepia-600); font-family: var(--grotesk); line-height: 1.55; }
a.row:hover { color: inherit; background: rgba(46, 42, 40, 0.05); }
.lead { display: block; font-weight: 500; }
.meta { display: block; color: var(--sepia-600); font-size: 16px; }
.tags { display: block; margin-top: 4px; }
.tag {
  display: inline-block; margin: 0 6px 4px 0; padding: 0 8px; border: 1px solid var(--sepia-600); border-radius: 3px;
  color: var(--sepia-600); font-family: var(--grotesk); font-size: 13px; line-height: 1.6;
}
.facts { margin: 0 0 12px; }

/* The agenda: the number hangs in its own column, so a title that wraps stays under itself.
   Sub-items are set in a little; the indent stays small for the phone. */
.agenda .top { display: grid; grid-template-columns: 2.6rem minmax(0, 1fr); column-gap: 4px; }
.agenda .nr, h1 .nr { font-family: var(--grotesk); font-weight: 600; font-size: 15px; line-height: 1.8; }
h1 .nr { display: block; font-size: 16px; color: var(--sepia-600); }
.agenda .private { color: var(--sepia-600); }
.agenda .private .lead { font-style: italic; font-weight: 400; }
.agenda .level-2 .row { padding-left: 12px; }
.agenda .level-3 .row { padding-left: 24px; }
.agenda .level-4 .row { padding-left: 36px; }

/* A second, quieter way on under a button: a plain link, as tall as a button to touch. */
.more { margin-top: -8px; }
.more a { display: inline-flex; align-items: center; min-height: 44px; }

.result { font-weight: 500; }
.votes { display: flex; flex-wrap: wrap; gap: 4px 28px; margin: 0 0 1em; }
.votes dt { color: var(--sepia-600); font-family: var(--grotesk); font-size: 14px; }
.votes dd { margin: 0; font-family: var(--grotesk); font-size: 24px; font-weight: 600; }

/* Buttons and forms. Fields are 18 px so that the iPhone does not zoom in. */
.button {
  display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px;
  border: 1px solid var(--umbra); border-radius: 3px; background: none; color: var(--umbra);
  font: 600 16px var(--grotesk); text-decoration: none; cursor: pointer;
}
.button:hover { color: var(--umbra); background: rgba(46, 42, 40, 0.08); }
.button.primary { background: var(--umbra); color: var(--kreide); }
.button.primary:hover { background: var(--sepia-600); color: var(--kreide); }

.field { margin: 0 0 20px; }
.field label { display: block; margin-bottom: 4px; font: 600 15px var(--grotesk); }
.field .hint, .field .errors { margin: 0 0 6px; font: 400 15px/1.4 var(--grotesk); }
.field .hint { color: var(--sepia-600); }
.field .errors, .errorlist { color: var(--tiefe-krapplack); font-weight: 600; }
.field input, .field select, .field textarea {
  display: block; width: 100%; min-height: 44px; padding: 8px 12px;
  border: 1px solid var(--sepia-600); border-radius: 3px; background: #fff; color: var(--umbra); font: 400 18px/1.4 var(--antiqua);
}
.field.invalid input, .field.invalid select, .field.invalid textarea { border: 2px solid var(--tiefe-krapplack); }
.errorlist { margin: 0 0 12px; padding: 0; list-style: none; }

/* The page of the import: one block for each run. */
.run { padding: 12px 0; border-top: 1px solid var(--sepia-200); }
.run .meta { margin: 0 0 6px; }
.run p { margin: 0 0 6px; font-size: 16px; }
.warnings { margin: 0; padding-left: 1.2em; font-size: 16px; }
