/* CursorBrain op je telefoon, in de stijl van Slimmer Werken: de kleuren uit de style guide op een
   donkere inkt-achtergrond, Inter Tight voor alles en per kop één accentwoord in Instrument Serif
   Italic. Vlakke velden en haarlijnen, geen verlopen. Dezelfde maten als de app op de computer. */

@font-face {
  font-family: 'Inter Tight';
  src: url('fonts/inter-tight-latin-wght.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Instrument Serif';
  src: url('fonts/instrument-serif-italic-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --violet: #5b3df5;
  --lila: #ece8ff;
  --ink: #17123a;
  --lichtlila: #c8bcff;
  --bg: #110d2c;
  --panel: #17123a;
  --raised: #201a4b;
  --line: rgba(200, 188, 255, 0.13);
  --line-2: rgba(200, 188, 255, 0.24);
  --text: #ffffff;
  --soft: #e3defa;
  --muted: #a8a0d6;
  --faint: #8880b8;
  --accent-soft: rgba(91, 61, 245, 0.26);
  --ok: #7fdc9c;
  --warn: #ffd166;
  --bad: #ff9a94;
  --sans: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;
}

* {
  box-sizing: border-box;
}

[hidden] {
  display: none !important;
}

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

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overscroll-behavior-y: none;
}

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

button {
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

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

.screen {
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  padding: calc(env(safe-area-inset-top) + 8px) 20px calc(env(safe-area-inset-bottom) + 18px);
}

/* ---------- bovenkant ---------- */

.top {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
}

.grow {
  flex: 1;
}

.brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.brand .dot {
  fill: var(--lichtlila);
  stroke: none;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 30px;
  padding: 0 12px;
  border-radius: 99px;
  border: 1px solid var(--line-2);
  font-size: 14px;
  color: var(--soft);
  white-space: nowrap;
}

.pill .led {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--faint);
}

.pill.ok .led {
  background: var(--ok);
}

.pill.warn .led {
  background: var(--warn);
}

.pill.bad .led {
  background: var(--bad);
}

.iconbtn {
  width: 44px;
  height: 44px;
  margin-right: -10px;
  display: grid;
  place-items: center;
  border-radius: 12px;
  color: var(--muted);
}

/* ---------- koppen ---------- */

h1 {
  margin: 0;
  font-size: 31px;
  line-height: 1.12;
  font-weight: 650;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

/* Het accentwoord in een kop: het logo komt terug zonder het logo te herhalen. */
.accent {
  font-family: var(--serif);
  font-style: italic;
  font-weight: 400;
  color: var(--lichtlila);
  letter-spacing: 0;
  font-size: 1.12em;
  line-height: 0.9;
}

/* ---------- opnemen ---------- */

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 26px 0 18px;
}

.rec {
  position: relative;
  width: 148px;
  height: 148px;
  margin-top: 40px;
  border-radius: 50%;
  background: var(--violet);
  color: #fff;
  display: grid;
  place-items: center;
  transition:
    background-color 0.18s,
    color 0.18s;
}

.rec:active {
  transform: scale(0.97);
}

.rec .ring {
  position: absolute;
  inset: -14px;
  border-radius: 50%;
  border: 1.5px solid var(--line-2);
  pointer-events: none;
  transition: transform 0.13s linear;
}

.rec .glyph {
  grid-area: 1 / 1;
  display: grid;
  place-items: center;
  transition:
    opacity 0.15s,
    transform 0.15s;
}

.rec .stop {
  opacity: 0;
  transform: scale(0.6);
}

.rec .stop path {
  fill: currentColor;
}

.rec.starting {
  opacity: 0.7;
}

.rec.on {
  background: var(--lila);
  color: var(--ink);
}

.rec.on .ring {
  border-color: var(--lichtlila);
}

.rec.on .mic {
  opacity: 0;
  transform: scale(0.6);
}

.rec.on .stop {
  opacity: 1;
  transform: none;
}

.hint {
  margin: 30px 0 0;
  min-height: 1.5em;
  max-width: 32ch;
  color: var(--soft);
  font-variant-numeric: tabular-nums;
}

.textlink {
  padding: 10px 8px;
  color: var(--lichtlila);
  font-size: 15px;
  text-decoration: underline;
  text-decoration-color: var(--line-2);
  text-underline-offset: 3px;
}

/* ---------- de lijst ---------- */

.list {
  margin-top: 8px;
}

.list h2 {
  margin: 14px 2px 10px;
  font-size: 14px;
  font-weight: 500;
  color: var(--faint);
}

.item {
  margin-bottom: 10px;
  padding: 14px 16px 4px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 14px;
}

.item .when {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 10px;
  font-size: 14px;
  color: var(--muted);
}

.chip {
  margin-left: auto;
  padding: 2px 10px;
  border-radius: 99px;
  background: var(--accent-soft);
  color: var(--lila);
  font-size: 14px;
}

.item.leeg .chip {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--muted);
}

.item h3 {
  margin: 10px 0 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.item h3 + .text {
  margin-top: 4px;
}

.item.mislukt .chip,
.item.wacht .chip {
  background: none;
  border: 1px solid var(--line-2);
  color: var(--soft);
}

.item .text {
  margin: 8px 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  -webkit-user-select: text;
  user-select: text;
}

.item .text.dim {
  color: var(--muted);
}

.item .where {
  margin: 8px 0 0;
  font-size: 14.5px;
  color: var(--muted);
}

.item .where b {
  font-weight: 550;
  color: var(--lichtlila);
}

.todo {
  list-style: none;
  margin: 12px 0 0;
  padding: 12px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 8px;
  font-size: 15px;
}

.todo li {
  display: grid;
  grid-template-columns: 16px 1fr auto;
  gap: 10px;
  align-items: start;
}

.todo li::before {
  content: '';
  width: 14px;
  height: 14px;
  margin-top: 4px;
  border-radius: 50%;
  border: 1.5px solid var(--lichtlila);
}

.todo .due {
  font-size: 14px;
  color: var(--muted);
  white-space: nowrap;
}

.tools {
  display: flex;
  justify-content: flex-end;
  gap: 4px;
  margin-top: 2px;
}

.tools .textlink {
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
}

.empty {
  display: grid;
  gap: 4px;
  padding: 18px;
  border: 1px dashed var(--line-2);
  border-radius: 14px;
  font-size: 15px;
  color: var(--muted);
}

.empty b {
  font-weight: 550;
  color: var(--soft);
}

.banner {
  display: grid;
  gap: 10px;
  margin-top: 8px;
  padding: 12px 14px;
  background: var(--raised);
  border: 1px solid var(--line-2);
  border-radius: 14px;
  font-size: 15px;
  color: var(--soft);
}

.banner .row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 10px;
}

.banner b {
  font-weight: 600;
  color: var(--text);
}

.banner .small {
  font-size: 14px;
}

/* ---------- knoppen ---------- */

.btn {
  height: 44px;
  padding: 0 16px;
  border-radius: 12px;
  background: var(--raised);
  border: 1px solid var(--line-2);
  font-size: 15.5px;
  font-weight: 550;
}

.btn.primary {
  background: var(--violet);
  border-color: var(--violet);
  color: #fff;
}

.btn.big {
  width: 100%;
  height: 54px;
  border-radius: 14px;
  font-size: 17px;
}

.btn.danger {
  color: var(--bad);
}

.btn:disabled {
  opacity: 0.6;
}

/* ---------- uitleg en koppelen ---------- */

.story {
  display: grid;
  gap: 20px;
  padding-top: 30px;
}

.lead {
  margin: 0;
  font-size: 17px;
  color: var(--soft);
}

.small {
  margin: 0;
  font-size: 14.5px;
  color: var(--muted);
}

.small a {
  color: var(--lichtlila);
}

.warn {
  margin: 0;
  color: var(--warn);
}

.steps {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: stap;
  display: grid;
  gap: 16px;
}

.steps li {
  counter-increment: stap;
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 14px;
  color: var(--muted);
}

.steps li::before {
  content: counter(stap);
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--lichtlila);
  display: grid;
  place-items: center;
  font-size: 14px;
  font-weight: 600;
}

.steps b,
.vault b {
  font-weight: 550;
  color: var(--text);
}

.inline-icon {
  display: inline-grid;
  vertical-align: -4px;
  color: var(--lichtlila);
}

.vault {
  padding: 2px 0 2px 14px;
  border-left: 2px solid var(--lichtlila);
  font-size: 15px;
  color: var(--muted);
}

.vault b {
  display: block;
}

.done {
  display: flex;
  align-items: center;
  gap: 10px;
  margin: 0;
  font-weight: 600;
  color: var(--lichtlila);
}

/* De schakelaar uit het logo, aan. */
.switch {
  position: relative;
  width: 34px;
  height: 20px;
  border-radius: 99px;
  background: var(--lichtlila);
}

.switch::after {
  content: '';
  position: absolute;
  top: 3px;
  right: 3px;
  width: 14px;
  height: 14px;
  border-radius: 50%;
  background: var(--ink);
}

/* ---------- uitschuifblad ---------- */

.sheet {
  position: fixed;
  inset: 0;
  z-index: 10;
  display: flex;
  align-items: flex-end;
  background: rgba(8, 6, 24, 0.68);
}

.panel {
  width: 100%;
  max-width: 520px;
  max-height: 90vh;
  max-height: 90dvh;
  margin: 0 auto;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 8px 20px calc(env(safe-area-inset-bottom) + 20px);
  background: var(--panel);
  border-top: 1px solid var(--line-2);
  border-radius: 20px 20px 0 0;
}

.panel-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  font-size: 17px;
}

textarea,
input {
  width: 100%;
  padding: 12px 14px;
  background: var(--bg);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  /* 16 px of groter: anders zoomt een iPhone in zodra je in het veld tikt. */
  font-size: 16px;
}

textarea {
  resize: vertical;
}

input {
  height: 48px;
  min-width: 0;
}

select {
  height: 44px;
  max-width: 46vw;
  padding: 0 12px;
  background: var(--raised);
  border: 1px solid var(--line-2);
  border-radius: 12px;
  font-size: 16px;
}

.panel-body {
  display: grid;
  gap: 14px;
}

/* ---------- instellingen ---------- */

.set {
  display: grid;
  gap: 12px;
  padding-top: 6px;
}

.set + .set {
  margin-top: 8px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}

.set h2 {
  margin: 0;
  font-size: 17px;
  font-weight: 650;
  letter-spacing: -0.01em;
}

.line {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.line.wide {
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
}

.line.wide select {
  max-width: none;
}

.line > div {
  min-width: 0;
  display: grid;
  gap: 2px;
}

.line b {
  font-weight: 550;
}

.line small {
  font-size: 14px;
  line-height: 1.4;
  color: var(--muted);
}

.line .btn,
.line select {
  flex: none;
}

/* ---------- koppelen in de app ---------- */

.scan {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  border-radius: 14px;
  background: #000;
}

.or {
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

.inline {
  display: flex;
  gap: 10px;
}

.inline .btn {
  flex: none;
  height: 48px;
}

/* ---------- voortgang ---------- */

.bar {
  display: block;
  height: 6px;
  border-radius: 99px;
  background: var(--line-2);
  overflow: hidden;
}

.bar span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--lichtlila);
  transition: width 0.3s linear;
}

.facts {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 16px;
  margin: 0;
  font-size: 15px;
}

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

.facts dd {
  margin: 0;
  text-align: right;
}

.version {
  margin: 0;
  text-align: center;
  font-size: 14px;
  color: var(--faint);
}

.version a {
  color: inherit;
}

/* ---------- onderkant: "door slimmer werken" met de schakelaar op de i ---------- */

.by {
  margin-top: auto;
  padding-top: 28px;
  text-align: center;
  font-size: 14px;
  color: var(--muted);
}

.sw {
  display: inline-flex;
  align-items: baseline;
  gap: 0.2em;
  line-height: 1;
  white-space: nowrap;
  color: #fff;
}

.sw .s {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.22em;
  color: var(--lichtlila);
}

.sw .i {
  position: relative;
}

.sw .i::before {
  content: '';
  position: absolute;
  left: 0.04em;
  top: 0.1em;
  width: 0.46em;
  height: 0.22em;
  border-radius: 99px;
  background: var(--lichtlila);
}

.sw .i::after {
  content: '';
  position: absolute;
  left: 0.3em;
  top: 0.14em;
  width: 0.14em;
  height: 0.14em;
  border-radius: 50%;
  background: var(--ink);
}

.sw .w {
  font-weight: 600;
  letter-spacing: -0.035em;
}

@media (prefers-reduced-motion: reduce) {
  .rec,
  .rec .ring,
  .rec .glyph {
    transition: none;
  }
}
