/*
 * Colours, type and the app's frame: the screens and the tab bar at the bottom.
 * Colours are the Kistra family's (STYLE-GUIDE section 3); light or dark is set by appearance.js on <html>.
 */

:root {
  --bg: #ffffff;
  --bg2: #f5f6f8;
  --bg3: #eceef2;
  --line: #e3e5ea;
  --line2: #d3d6dd;
  --text: #1d1f23;
  --text2: #6b7079;
  --text3: #9aa0a9;
  --danger: #c8372d;
  --ok: #138a5a;
  --warn-bg: #fff4e0;
  --accent: #0a64d8;
  --accent-dark: #0850b0;
  --accent-soft: #e7f0fd;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --mono: ui-monospace, Menlo, Consolas, monospace;
  --tab-height: 56px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #1c1d20;
  --bg2: #232428;
  --bg3: #2c2e33;
  --line: #34363c;
  --line2: #43464d;
  --text: #ececef;
  --text2: #a2a6ae;
  --text3: #757a83;
  --danger: #e5675e;
  --ok: #3cc47c;
  --warn-bg: #3a2f17;
  --accent: #4a9cf5;
  --accent-dark: #8cc0fa;
  --accent-soft: #1e2a3d;
  color-scheme: dark;
}

* {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  background: var(--bg);
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.4;
  -webkit-tap-highlight-color: transparent;
}

body.covered {
  overflow: hidden;
}

button,
input,
select {
  font: inherit;
  color: inherit;
}

.app {
  min-height: 100vh;
}

.screens {
  padding: calc(env(safe-area-inset-top) + 8px) 14px calc(var(--tab-height) + env(safe-area-inset-bottom) + 24px);
  max-width: 640px;
  margin: 0 auto;
}

.screen-title {
  font-size: 26px;
  font-weight: 700;
  margin: 4px 0 10px;
}

.tab-bar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  height: calc(var(--tab-height) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom);
  background: var(--bg2);
  border-top: 0.5px solid var(--line2);
  z-index: 10;
}

.tab {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2px;
  border: 0;
  background: none;
  color: var(--text2);
  font-size: 11px;
  font-weight: 500;
}

.tab.on {
  color: var(--accent);
}

.tab-icon {
  width: 24px;
  height: 24px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.problem {
  padding: 40px 20px;
}

[hidden] {
  display: none !important;
}
