/* DuceOne: Klein blue, mint for state, Familjen Grotesk.
   Mint marks what is on now, what is active and what is done. It never
   colours single words in running text. Two themes, switchable: blue and white. */

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/familjen-grotesk-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Familjen Grotesk';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('fonts/familjen-grotesk-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* The four looks' fonts, loaded only when their look is on. All under the SIL Open Font License (fonts/OFL-*.txt). */

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/manrope-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/manrope-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/archivo-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/archivo-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/sora-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Sora';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/sora-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Fraunces';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/fraunces-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-ext-wght-normal.woff2') format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF,
    U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('fonts/inter-latin-wght-normal.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F,
    U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- the two themes */

:root {
  --sans: 'Familjen Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --serif: var(--sans);
  /* Headlines and the name: the same as the text, except in a look with its own display face. */
  --display: var(--sans);
  --klein: #002fa7;
  --mark: #8ff0c4;
  --mark-ink: #002fa7;
}

html[data-theme='blau'] {
  color-scheme: dark;
  --bg: #002fa7;
  --fg: #ffffff;
  --mute: #c3cff5;
  --rule: #3358c4;
  --card: #1a45b8;
  --edge: #6c88dc;
  --head: #ffffff;
  --now: #8ff0c4;
  --focus: #ffffff;
  --act-bg: #8ff0c4;
  --act-fg: #002fa7;
  --solid-bg: #ffffff;
  --solid-fg: #002fa7;
  --chip-edge: transparent;
  --count-bg: transparent;
  --count-fg: #8ff0c4;
  --bar-done: #ffffff;
  --line-c: #ffffff;
  --fab-bg: #ffffff;
  --fab-fg: #002fa7;
  --nav-bg: #002fa7;
  --nav-rule: #3358c4;
  --nav-on-bg: #1a45b8;
  --nav-on-fg: #8ff0c4;
  --switch-bg: #1a45b8;

  /* the Content area keeps its own stylesheet; these are its colours here */
  --paper: #002fa7;
  --surface: #1a45b8;
  --soft: #2550c4;
  --ink: #ffffff;
  --muted: #c3cff5;
  --line: #4a6bd0;
  --accent: #8ff0c4;
  --accent-ink: #002fa7;
  --accent-soft: #2a56c9;
  --warn: #ffe08a;
  --warn-soft: #2550c4;
  --ok: #8ff0c4;
}

html[data-theme='weiss'],
.d-sheet {
  color-scheme: light;
  --bg: #ffffff;
  --fg: #0b1030;
  --mute: #5a5f73;
  --rule: #e2e5f0;
  --card: #eef2fc;
  --edge: #9aa6d6;
  --head: #002fa7;
  --now: #002fa7;
  --focus: #002fa7;
  --act-bg: #002fa7;
  --act-fg: #ffffff;
  --solid-bg: #002fa7;
  --solid-fg: #ffffff;
  --chip-edge: #002fa7;
  --count-bg: #8ff0c4;
  --count-fg: #0b1030;
  --bar-done: #9aa6d6;
  --line-c: #002fa7;
  --fab-bg: #8ff0c4;
  --fab-fg: #002fa7;
  --nav-bg: #eef2fc;
  --nav-rule: #002fa7;
  --nav-on-bg: #8ff0c4;
  --nav-on-fg: #0b1030;
  --switch-bg: #dbe2f6;
}

html[data-theme='weiss'] {
  --paper: #ffffff;
  --surface: #f5f7fc;
  --soft: #eef2fc;
  --ink: #0b1030;
  --muted: #5a5f73;
  --line: #d3d9ee;
  --accent: #002fa7;
  --accent-ink: #ffffff;
  --accent-soft: #e3e9fb;
  --warn: #8a5a00;
  --warn-soft: #f7ecd2;
  --ok: #1f6b4f;
}

/* ---------- four more looks for the apps of the other partners (also offered here).
   Each colours its sheets too, so a dialog never falls back to blue. */

html[data-theme='lotse'],
html[data-theme='lotse'] .d-sheet {
  color-scheme: light;
  --sans: 'Manrope', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --bg: #f2f2f0;
  --fg: #141414;
  --mute: #5c5c5c;
  --rule: #e2e2de;
  --card: #ffffff;
  --edge: #bdbdb8;
  --head: #141414;
  --now: #c2410c;
  --focus: #c2410c;
  --act-bg: #c2410c;
  --act-fg: #ffffff;
  --solid-bg: #141414;
  --solid-fg: #ffffff;
  --chip-edge: #141414;
  --count-bg: #ffe4d6;
  --count-fg: #9a3412;
  --bar-done: #bdbdb8;
  --line-c: #c2410c;
  --fab-bg: #c2410c;
  --fab-fg: #ffffff;
  --nav-bg: #ffffff;
  --nav-rule: #e2e2de;
  --nav-on-bg: #ffe4d6;
  --nav-on-fg: #141414;
  --switch-bg: #e6e6e2;
  --mark: #ff5a1f;
  --mark-ink: #141414;
  --logo-accent: #ff5a1f;
  --paper: #f2f2f0;
  --surface: #ffffff;
  --soft: #ecece8;
  --ink: #141414;
  --muted: #5c5c5c;
  --line: #dadad5;
  --accent: #c2410c;
  --accent-ink: #ffffff;
  --accent-soft: #ffe4d6;
  --warn-soft: #f7ecd2;
  --warn: #8a5a00;
  --ok: #1f6b4f;
}

html[data-theme='tagwerk'],
html[data-theme='tagwerk'] .d-sheet {
  color-scheme: dark;
  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --bg: #17171a;
  --fg: #f3f1ea;
  --mute: #a8a49a;
  --rule: #2e2e33;
  --card: #232327;
  --edge: #4a4a52;
  --head: #f3f1ea;
  --now: #f5b700;
  --focus: #f5b700;
  --act-bg: #f5b700;
  --act-fg: #17171a;
  --solid-bg: #f3f1ea;
  --solid-fg: #17171a;
  --chip-edge: transparent;
  --count-bg: transparent;
  --count-fg: #f5b700;
  --bar-done: #f3f1ea;
  --line-c: #f5b700;
  --fab-bg: #f5b700;
  --fab-fg: #17171a;
  --nav-bg: #17171a;
  --nav-rule: #2e2e33;
  --nav-on-bg: #232327;
  --nav-on-fg: #f5b700;
  --switch-bg: #232327;
  --mark: #f5b700;
  --mark-ink: #17171a;
  --logo-accent: #f5b700;
  --paper: #17171a;
  --surface: #232327;
  --soft: #2a2a2f;
  --ink: #f3f1ea;
  --muted: #a8a49a;
  --line: #3a3a40;
  --accent: #f5b700;
  --accent-ink: #17171a;
  --accent-soft: #3a3220;
  --warn-soft: #2a2a2f;
  --warn: #ffe08a;
  --ok: #f5b700;
}

html[data-theme='kern'],
html[data-theme='kern'] .d-sheet {
  color-scheme: light;
  --sans: 'Sora', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --bg: #f6f3f7;
  --fg: #3a1e46;
  --mute: #6b5d70;
  --rule: #e4dce8;
  --card: #ffffff;
  --edge: #c9b9d1;
  --head: #3a1e46;
  --now: #3a1e46;
  --focus: #3a1e46;
  --act-bg: #3a1e46;
  --act-fg: #ffffff;
  --solid-bg: #3a1e46;
  --solid-fg: #ffffff;
  --chip-edge: #3a1e46;
  --count-bg: #ffe1dd;
  --count-fg: #3a1e46;
  --bar-done: #c9b9d1;
  --line-c: #3a1e46;
  --fab-bg: #ff7a6b;
  --fab-fg: #3a1e46;
  --nav-bg: #ffffff;
  --nav-rule: #e4dce8;
  --nav-on-bg: #ffe1dd;
  --nav-on-fg: #3a1e46;
  --switch-bg: #ece4ef;
  --mark: #ff7a6b;
  --mark-ink: #3a1e46;
  --logo-accent: #ff7a6b;
  --paper: #f6f3f7;
  --surface: #ffffff;
  --soft: #efe9f1;
  --ink: #3a1e46;
  --muted: #6b5d70;
  --line: #ddd2e2;
  --accent: #3a1e46;
  --accent-ink: #ffffff;
  --accent-soft: #ece4ef;
  --warn-soft: #f7ecd2;
  --warn: #8a5a00;
  --ok: #1f6b4f;
}

html[data-theme='ruhepol'],
html[data-theme='ruhepol'] .d-sheet {
  color-scheme: light;
  --sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --display: 'Fraunces', Georgia, serif;
  --bg: #e7ede3;
  --fg: #26301f;
  --mute: #55604f;
  --rule: #d2dbcc;
  --card: #f7f9f5;
  --edge: #a9b7a2;
  --head: #26301f;
  --now: #3e5a36;
  --focus: #3e5a36;
  --act-bg: #3e5a36;
  --act-fg: #ffffff;
  --solid-bg: #3e5a36;
  --solid-fg: #ffffff;
  --chip-edge: #3e5a36;
  --count-bg: #d9cdb4;
  --count-fg: #26301f;
  --bar-done: #a9b7a2;
  --line-c: #3e5a36;
  --fab-bg: #3e5a36;
  --fab-fg: #ffffff;
  --nav-bg: #f7f9f5;
  --nav-rule: #d2dbcc;
  --nav-on-bg: #d9e4d3;
  --nav-on-fg: #26301f;
  --switch-bg: #dae3d5;
  --mark: #d9cdb4;
  --mark-ink: #26301f;
  --logo-accent: #3e5a36;
  --paper: #e7ede3;
  --surface: #f7f9f5;
  --soft: #dfe7da;
  --ink: #26301f;
  --muted: #55604f;
  --line: #cbd5c5;
  --accent: #3e5a36;
  --accent-ink: #ffffff;
  --accent-soft: #d9e4d3;
  --warn-soft: #efe6cf;
  --warn: #7a5200;
  --ok: #3e5a36;
}

body {
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

.d-app :focus-visible,
.d-sheet :focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

/* ---------- frame: phone first */

.d-app {
  min-height: 100dvh;
}

.d-main {
  box-sizing: border-box;
  max-width: 640px;
  margin: 0 auto;
  padding: calc(env(safe-area-inset-top) + 28px) 24px calc(env(safe-area-inset-bottom) + 124px);
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.d-wait {
  padding: 40vh 24px 0;
  text-align: center;
  color: var(--mute);
  font-size: 17px;
}

.d-word {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.31em;
  font: 700 30px/1 var(--display);
  letter-spacing: -0.02em;
  color: var(--head);
}

/* The mark next to the name, in the proportions of the logo files. */
.d-mark {
  flex: none;
  width: 1.374em;
  height: 0.884em;
}

.d-nav {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 5;
  box-sizing: border-box;
  padding: 8px 8px calc(env(safe-area-inset-bottom) + 10px);
  background: var(--bg);
  border-top: 2px solid var(--nav-rule);
}

.d-nav .d-word,
.d-nav-foot {
  display: none;
}

.d-nav-items {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.d-nav-item {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  min-height: 52px;
  border: 0;
  background: none;
  color: var(--mute);
  font: 500 13px/1 var(--sans);
  cursor: pointer;
}

.d-nav-item.on {
  color: var(--now);
  font-weight: 700;
}

.d-badge {
  position: absolute;
  top: 0;
  left: calc(50% + 6px);
  box-sizing: border-box;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 10px;
  background: var(--mark);
  color: var(--mark-ink);
  font: 700 13px/20px var(--sans);
  text-align: center;
}

.d-nav-item .live-dot {
  position: absolute;
  top: 4px;
  left: calc(50% + 10px);
  margin: 0;
}

.d-fab {
  position: fixed;
  right: 20px;
  bottom: calc(env(safe-area-inset-bottom) + 98px);
  z-index: 6;
  width: 60px;
  height: 60px;
  border: 0;
  border-radius: 20px;
  background: var(--fab-bg);
  color: var(--fab-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
  box-shadow: 0 6px 18px rgba(0, 10, 60, 0.28);
}

.toast {
  bottom: calc(env(safe-area-inset-bottom) + 100px);
  font-weight: 600;
}

/* ---------- buttons */

.b-act,
.b-solid,
.b-ghost,
.b-text {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid transparent;
  border-radius: 14px;
  font: 700 17px/1.1 var(--sans);
  cursor: pointer;
}

.b-act {
  background: var(--act-bg);
  color: var(--act-fg);
}

.b-solid {
  background: var(--solid-bg);
  color: var(--solid-fg);
}

.b-solid.on {
  outline: 3px solid var(--mark);
  outline-offset: 2px;
}

.b-ghost {
  background: transparent;
  color: var(--head);
  border-color: currentColor;
  font-weight: 600;
}

/* A rimmed button that is switched on, like the chosen part of a switch. */
.b-ghost.on {
  border-color: transparent;
  background: var(--solid-bg);
  color: var(--solid-fg);
}

/* The quiet alternative: a small button with a rim. Nothing to tap is ever an underlined word. */
.b-text {
  min-height: 44px;
  padding: 0 16px;
  background: none;
  border-color: var(--edge);
  color: var(--head);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
}

.big {
  min-height: 62px;
  padding: 0 26px;
  border-radius: 18px;
  font-size: 21px;
}

.small {
  flex: none;
  min-height: 44px;
  padding: 0 12px;
  border-radius: 12px;
  font-size: 15px;
}

.wide {
  width: 100%;
}

.grow {
  flex: 1;
}

.d-app button:disabled,
.d-sheet button:disabled {
  opacity: 0.6;
  cursor: default;
}

.working {
  animation: blink 1.2s infinite;
}

/* ---------- heads, lists, cards */

.d-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 44px;
}

.d-head h1 {
  flex: 1;
  margin: 0;
  font: 700 34px/1.05 var(--display);
  letter-spacing: -0.02em;
  color: var(--head);
}

.d-more {
  flex: none;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  border: 0;
  background: none;
  color: var(--head);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.d-count {
  flex: none;
  margin: 0;
  padding: 5px 12px;
  border-radius: 9px;
  background: var(--count-bg);
  color: var(--count-fg);
  font: 700 16px/1.2 var(--sans);
}

.d-sub,
.d-hint {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--mute);
}

.d-hint.strong {
  color: var(--head);
  font-weight: 600;
}

.d-hint.hidden {
  display: none;
}

.center {
  text-align: center;
}

.d-now {
  margin: 0;
  font: 700 16px/1.2 var(--sans);
  color: var(--now);
}

.d-stack {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-row {
  display: flex;
  align-items: flex-end;
  gap: 10px;
}

.d-row.wrap {
  flex-wrap: wrap;
}

.d-row > .d-field {
  flex: 1 1 140px;
}

.d-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.d-list > li {
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--rule);
}

.d-list.plain > li,
.d-list.cards > li,
.d-list.boxed > li {
  border: 0;
}

.d-list.cards,
.d-list.boxed {
  gap: 6px;
}

.d-item {
  flex: 1;
  min-width: 0;
  min-height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.cards .d-item,
.boxed .d-item {
  padding: 10px 14px;
  border-radius: 14px;
}

.cards .d-item {
  background: var(--card);
}

.boxed .d-item {
  border: 1.5px solid var(--rule);
}

.plain .d-item {
  padding: 6px 0;
}

.d-item-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-item-title {
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  overflow-wrap: anywhere;
}

.d-item-step {
  font-size: 16px;
  line-height: 1.25;
  font-weight: 500;
}

.d-item-meta {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}

.d-num {
  flex: none;
  min-width: 1ch;
  font-size: 16px;
  font-weight: 700;
  color: var(--mute);
}

.d-day.today li:first-child .d-num {
  color: var(--now);
}

.d-card {
  padding: 18px;
  border-radius: 20px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-card > h2:not([class]) {
  margin: 0;
  font: 600 16px/1.2 var(--sans);
  color: var(--mute);
}

.d-card-title,
.d-clarify-title {
  margin: 0;
  font: 700 22px/1.15 var(--display);
  letter-spacing: -0.01em;
  color: var(--head);
  overflow-wrap: anywhere;
}

.d-card-line {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
}

.d-card-line .d-card-title {
  font-size: 19px;
}

.d-figure {
  margin: 0;
  font: 700 56px/0.95 var(--display);
  letter-spacing: -0.03em;
}

.d-figure.mark {
  color: var(--now);
}

.d-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.d-empty {
  padding: 28px 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-empty h2 {
  margin: 0;
  font: 700 28px/1.1 var(--display);
  letter-spacing: -0.015em;
  color: var(--head);
}

.d-empty p {
  margin: 0;
  max-width: 40ch;
  font-size: 17px;
  color: var(--mute);
}

.d-day {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.d-day-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
}

.d-day-head h2 {
  margin: 0;
  font: 700 17px/1.2 var(--sans);
  color: var(--head);
}

.d-day.today .d-day-head h2 {
  color: var(--now);
}

.d-day-head p {
  margin: 0;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}

.d-more-list summary {
  min-height: 44px;
  display: flex;
  align-items: center;
  font-weight: 600;
  color: var(--mute);
  cursor: pointer;
}

/* ---------- Heute */

.d-overview {
  display: none;
}

.d-focus {
  min-height: calc(100dvh - 204px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.d-focus-head {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-focus-top {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 44px;
}

.d-bars {
  flex: 1;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  gap: 6px;
}

.d-bars span {
  height: 6px;
  border-radius: 3px;
  background: var(--rule);
}

.d-bars .done {
  background: var(--bar-done);
}

.d-bars .now {
  background: var(--now);
}

.d-date {
  margin: 0;
  font-size: 16px;
  font-weight: 500;
  color: var(--mute);
}

.d-focus-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: flex-start;
  gap: 16px;
}

.d-task {
  margin: 0;
  font: 700 clamp(38px, 11.5vw, 50px) / 1.03 var(--display);
  letter-spacing: -0.025em;
  color: var(--head);
  overflow-wrap: anywhere;
  hyphens: auto;
  text-wrap: balance;
}

.d-meta,
.d-note {
  margin: 0;
  font-size: 17px;
  font-weight: 500;
  color: var(--mute);
}

.d-note {
  white-space: pre-line;
}

.d-actions {
  align-self: stretch;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 8px;
}

.d-actions .b-act {
  flex: 1;
}

.d-focus-foot {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  color: var(--mute);
}

.d-focus-foot p {
  margin: 0 0 4px;
}

.d-hintline {
  min-height: 44px;
  box-sizing: border-box;
  padding: 10px 16px;
  border: 2px solid var(--edge);
  border-radius: 14px;
  background: none;
  color: var(--head);
  font: 600 16px/1.25 var(--sans);
  text-align: left;
  cursor: pointer;
}

/* ---------- Eingang */

.d-clarify {
  gap: 16px;
}

.d-clarify-head {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
}

.d-group {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-label {
  margin: 0;
  font: 600 14px/1.2 var(--sans);
  color: var(--mute);
}

.d-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.d-chip {
  height: 44px;
  padding: 0 14px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: transparent;
  color: var(--head);
  font: 600 16px/1 var(--sans);
  cursor: pointer;
}

.d-row > .d-chip {
  height: 48px;
}

.d-chip.on {
  border-color: var(--chip-edge);
  background: var(--mark);
  color: var(--mark-ink);
  font-weight: 700;
}

.d-pots {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.d-pots button {
  min-height: 52px;
  padding: 0 8px;
}

/* ---------- forms */

.d-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-field {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font: 600 14px/1.2 var(--sans);
  color: var(--mute);
}

.d-input {
  box-sizing: border-box;
  width: 100%;
  min-height: 48px;
  margin: 0;
  padding: 11px 14px;
  border: 2px solid var(--edge);
  border-radius: 14px;
  background-color: transparent;
  color: var(--fg);
  font: 500 17px/1.3 var(--sans);
}

/* iPhone gives date and time fields a width of their own that runs over what sits beside them. */
input.d-input[type='date'],
input.d-input[type='time'] {
  -webkit-appearance: none;
  appearance: none;
  min-width: 0;
  display: block;
  text-align: left;
}

input.d-input::-webkit-date-and-time-value {
  text-align: left;
}

/* Lists to choose from carry the same arrow in every look, drawn in the text colour, clear of the border. */
select.d-input {
  -webkit-appearance: none;
  appearance: none;
  padding-right: 42px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: calc(100% - 23px) 52%, calc(100% - 17px) 52%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  text-overflow: ellipsis;
}

textarea.d-input {
  display: block;
  resize: vertical;
}

.d-input::placeholder {
  color: var(--mute);
  opacity: 1;
}

.d-input:focus {
  border-color: var(--focus);
}

/* The field while the app listens: the state colour shows that the microphone is on. */
.d-input.hearing {
  border-color: var(--now);
}

.d-input.hearing::placeholder {
  color: var(--fg);
}

.d-alert {
  margin: 0;
  padding: 10px 14px;
  border-radius: 12px;
  background: var(--card);
  font-weight: 600;
}

.d-switch {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 4px;
  padding: 4px;
  border-radius: 14px;
  background: var(--switch-bg);
}

.d-switch button {
  height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--head);
  font: 600 16px/1 var(--sans);
  cursor: pointer;
}

.d-switch button.on {
  background: var(--solid-bg);
  color: var(--solid-fg);
  font-weight: 700;
}

/* ---------- settings: the second sign-in step */

.d-security {
  align-items: flex-start;
}

.d-steps-text {
  margin: 0;
  padding-left: 1.2em;
  display: grid;
  gap: 4px;
  font-size: 16px;
  font-weight: 500;
  color: var(--fg);
}

.d-qr {
  padding: 8px;
  border: 2px solid var(--edge);
  border-radius: 12px;
  background: #ffffff;
}

.d-codes {
  align-self: stretch;
  margin: 0;
  padding: 14px 18px;
  border-radius: 12px;
  background: var(--card);
  color: var(--fg);
  font: 15px/1.7 ui-monospace, SFMono-Regular, Menlo, monospace;
  columns: 2;
  column-gap: 32px;
}

.d-security code {
  font: 600 15px ui-monospace, SFMono-Regular, Menlo, monospace;
  color: var(--fg);
  overflow-wrap: anywhere;
}

/* ---------- sheets */

.d-sheet {
  box-sizing: border-box;
  width: 100%;
  max-width: min(560px, 100%);
  max-height: 92dvh;
  margin: auto auto 0;
  padding: 18px 24px calc(env(safe-area-inset-bottom) + 26px);
  border: 0;
  border-radius: 28px 28px 0 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  overflow: auto;
}

.d-sheet::backdrop {
  background: rgba(0, 12, 60, 0.6);
}

/* The other looks dim the page in their own ink, not in DuceOne's blue. */
html[data-theme='lotse'] .d-sheet::backdrop {
  background: rgba(20, 20, 20, 0.5);
}

html[data-theme='tagwerk'] .d-sheet::backdrop {
  background: rgba(0, 0, 0, 0.65);
}

html[data-theme='kern'] .d-sheet::backdrop {
  background: rgba(42, 22, 51, 0.5);
}

html[data-theme='ruhepol'] .d-sheet::backdrop {
  background: rgba(38, 48, 31, 0.45);
}

.d-sheet-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}

.d-sheet-head h2 {
  margin: 0;
  font: 700 26px/1.1 var(--display);
  letter-spacing: -0.015em;
  color: var(--head);
}

.d-sheet-head > .b-text {
  flex: none;
}

/* A sheet named after a long task: smaller, at most three lines, so the choices stay in view. */
.d-sheet-head h2.long {
  font-size: 20px;
  line-height: 1.2;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.d-sheet-head:has(h2.long) {
  align-items: flex-start;
}

/* ---------- Erfolge and review */

.d-hero {
  display: flex;
  align-items: flex-end;
  gap: 14px;
}

.d-hero-num {
  margin: 0;
  font: 700 136px/0.8 var(--display);
  letter-spacing: -0.04em;
  color: var(--now);
}

.d-hero-text {
  margin: 0 0 2px;
  font: 700 26px/1.05 var(--display);
  letter-spacing: -0.015em;
}

.d-chart {
  display: block;
  width: 100%;
  max-width: 440px;
  height: auto;
}

.d-chart .area {
  fill: var(--card);
}

.d-chart .base {
  stroke: var(--edge);
  stroke-width: 2;
  stroke-linecap: round;
}

.d-chart .line {
  fill: none;
  stroke: var(--line-c);
  stroke-width: 3;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.d-chart .dot {
  fill: var(--bg);
  stroke: var(--line-c);
  stroke-width: 2;
}

.d-chart .dot.last {
  fill: var(--mark);
  stroke-width: 2.5;
}

.d-chart .tick {
  font: 500 14px var(--sans);
  fill: var(--mute);
}

.d-chart .tick.today {
  font-weight: 700;
  fill: var(--fg);
}

.d-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}

.d-steps li {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 12px;
  padding: 12px 0;
  border-bottom: 1px solid var(--rule);
}

.d-steps li.now {
  margin: 0 -14px;
  padding: 12px 14px;
  border: 0;
  border-radius: 16px;
  background: var(--card);
}

.d-step-mark {
  flex: none;
  box-sizing: border-box;
  width: 26px;
  height: 26px;
  border: 2px solid var(--edge);
  border-radius: 50%;
  display: grid;
  place-items: center;
}

.d-steps li.done .d-step-mark {
  border-color: var(--mark);
  background: var(--mark);
  color: var(--mark-ink);
}

.d-steps .d-item-text {
  flex: 1 1 150px;
}

.d-steps li.now .d-step-mark {
  border-width: 2.5px;
  border-color: var(--now);
}

/* ---------- check-ins */

.d-scale {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
}

.d-scale .d-chip {
  height: 52px;
  padding: 0;
  font-size: 19px;
}

.d-scale-ends {
  display: flex;
  justify-content: space-between;
  font-size: 14px;
  font-weight: 500;
  color: var(--mute);
}

.d-strain {
  max-width: 34ch;
  margin: 8px 0 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--fg);
}

.d-list.d-feel > li {
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 12px 0;
}

.d-feel-head {
  font-size: 16px;
  font-weight: 700;
}

.d-meters {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 20px;
}

.d-meter {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 15px;
  font-weight: 500;
}

.d-meter-bars {
  display: inline-grid;
  grid-auto-flow: column;
  gap: 3px;
}

.d-meter-bars span {
  width: 14px;
  height: 8px;
  border-radius: 2px;
  background: var(--rule);
}

.d-meter-bars span.on {
  background: var(--fg);
}

/* ---------- sign-in */

.d-app.signin {
  display: grid;
  place-items: center;
  padding: 24px;
}

.d-signin {
  width: 100%;
  max-width: 380px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.d-signin h1 {
  margin: 12px 0 0;
  font: 700 40px/1 var(--display);
  letter-spacing: -0.025em;
  color: var(--head);
}

/* ---------- the Content area inside the shell */

.area-content .d-head {
  flex-wrap: wrap;
}

.d-main > .view {
  max-width: none;
  margin: 0;
  padding: 0;
}

/* ---------- the day: its rail, its steps, its rhythm */

.d-focus-top .d-date {
  flex: 1;
}

.d-rail {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  font: 500 14px/1.2 var(--sans);
  color: var(--mute);
}

.d-rail li {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.d-rail .bar {
  height: 6px;
  border-radius: 3px;
  background: var(--rule);
}

.d-rail li.done {
  color: var(--fg);
}

.d-rail li.done .bar {
  background: var(--bar-done);
}

.d-rail li.now {
  color: var(--now);
  font-weight: 700;
}

.d-rail li.now .bar {
  background: var(--now);
}

.d-daysteps {
  align-self: stretch;
  list-style: none;
  margin: 0;
  padding: 4px 18px;
  border-radius: 20px;
  background: var(--card);
  display: flex;
  flex-direction: column;
}

.d-daysteps li {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule);
}

.d-daysteps li:last-child {
  border-bottom: 0;
}

.d-daysteps .d-item-title {
  flex: 1;
}

.d-daysteps li:first-child .d-num {
  color: var(--now);
}

.d-rhythm {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-rhythm-days {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  font: 500 13px/1.2 var(--sans);
  color: var(--mute);
  text-align: center;
}

.d-rhythm-days > div {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.d-rhythm-days span {
  height: 8px;
  border-radius: 4px;
  background: var(--rule);
}

.d-card .d-rhythm-days span {
  background: var(--edge);
}

.d-rhythm-days span.on {
  background: var(--bar-done);
}

.d-rhythm-days .today {
  color: var(--fg);
  font-weight: 700;
}

.d-rhythm-days .today span.on {
  background: var(--now);
}

.d-task.mark {
  color: var(--now);
}

.d-lead {
  margin: 0;
  font: 600 22px/1.25 var(--display);
}

/* ---------- the guided start and close: one thing at a time */

.d-flow {
  max-width: 560px;
  min-height: 100dvh;
  padding-bottom: calc(env(safe-area-inset-bottom) + 34px);
  gap: 20px;
}

.d-flow-head {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.d-flow-title {
  flex: 1;
  margin: 0;
  font: 700 16px/1.2 var(--sans);
}

.d-flow-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 18px;
}

.d-flow-h {
  margin: 0;
  font: 700 clamp(32px, 9vw, 40px) / 1.05 var(--display);
  letter-spacing: -0.02em;
  color: var(--head);
}

.d-picks {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-pick {
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 2px solid var(--rule);
  border-radius: 16px;
  background: transparent;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.d-pick.on {
  border-color: var(--now);
  background: var(--card);
}

.d-pick-mark {
  flex: none;
  box-sizing: border-box;
  width: 30px;
  height: 30px;
  border: 2px solid var(--edge);
  border-radius: 50%;
  display: grid;
  place-items: center;
  font: 700 16px/1 var(--sans);
}

.d-pick.on .d-pick-mark {
  border-color: var(--mark);
  background: var(--mark);
  color: var(--mark-ink);
}

.d-list > li.d-line {
  padding: 12px 0;
}

.d-row.spread {
  justify-content: space-between;
}

.b-text.center {
  align-self: center;
}

/* ---------- the settings page */

.d-set {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-set > h2 {
  margin: 0;
  font: 700 14px/1.2 var(--sans);
  color: var(--now);
}

.d-set-body {
  padding: 16px;
  border-radius: 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 14px;
}

.d-set-body > .b-ghost {
  align-self: flex-start;
  text-decoration: none;
}

.d-set-body .d-switch,
.d-set-body .d-alert,
.d-set-body .d-codes {
  background: var(--bg);
}

.d-switch.n3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Five lists share the width of a phone: shorter words, the same switch. */
.d-switch.n5 {
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 2px;
}

.d-switch.n5 button {
  padding: 0;
  font-size: 14px;
}

.d-switch button {
  position: relative;
}

/* In the corner of its tab, so it takes no width from the word. */
.d-dot {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--mark);
}

.d-switch button.on .d-dot {
  background: currentColor;
}

.d-row.start {
  align-items: flex-start;
}

.d-set-body .d-field > .b-solid {
  align-self: flex-start;
}

.d-steps {
  margin: 0;
  padding-left: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 16px;
  font-weight: 500;
}

/* ---------- help */

.d-head-slot {
  flex: none;
  display: flex;
}

.d-guide {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
}

/* ---------- what was understood from the day's close */

.d-heard {
  padding: 12px 14px;
  border-radius: 12px;
  background: var(--card);
}

.d-heard > summary {
  cursor: pointer;
  font: 600 14px/1.2 var(--sans);
  color: var(--mute);
}

.d-heard > p {
  margin: 10px 0 0;
  font-size: 16px;
}

/* ---------- the third form: a whole row or tile that leads somewhere, marked with an arrow */

.d-go {
  width: 100%;
  min-height: 60px;
  box-sizing: border-box;
  padding: 12px 16px 12px 18px;
  border: 0;
  border-radius: 18px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
}

.d-go-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-go-title {
  font: 600 18px/1.25 var(--sans);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.d-go-meta {
  font: 500 14px/1.2 var(--sans);
  color: var(--mute);
}

/* Some things show only where there is room for them, others only where the bar has none. */
.wide-only {
  display: none;
}

/* The day's proposal lists its tasks; they are not for tapping there. */
.d-pick.still {
  cursor: default;
}

/* The exchange behind the plus: it scrolls inside its sheet. */
.d-chat.in-sheet {
  max-height: 46dvh;
  overflow-y: auto;
  margin-bottom: 14px;
  padding-bottom: 0;
}

.d-chat.in-sheet:empty {
  display: none;
}

/* Posts and knowledge put their pages straight into the page's column. */
.d-content {
  display: contents;
}

textarea.d-post-text {
  min-height: 220px;
  resize: none;
  overflow: hidden;
  line-height: 1.45;
}

.d-script {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.d-go.working {
  opacity: 0.6;
}

/* Every list is a column of such rows. */
.d-rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-go .d-num {
  align-self: flex-start;
  padding-top: 2px;
}

/* Inside a card the row needs a ground of its own. */
.d-card .d-go {
  background: var(--bg);
}

div.d-go {
  cursor: default;
}

.d-step.done .d-step-mark {
  border-color: var(--mark);
  background: var(--mark);
  color: var(--mark-ink);
}

.d-step.now .d-step-mark {
  border-width: 2.5px;
  border-color: var(--now);
}

/* A long text may take the lines it needs. */
.d-go.wrap .d-go-title {
  white-space: normal;
}

/* Name on the left, where things stand on the right. */
.d-go.side > .d-go-title {
  flex: 1;
  min-width: 0;
}

.d-go.side > .d-go-meta {
  flex: none;
  max-width: 58%;
  font-size: 15px;
  text-align: right;
}

.d-stack.tight {
  gap: 8px;
}

/* Two alternatives side by side, never more. */
.d-pairrow {
  align-self: stretch;
  display: flex;
  gap: 10px;
}

.d-pairrow > * {
  flex: 1 1 0;
  min-width: 0;
}

.d-pairrow:empty {
  display: none;
}

/* Taking back what the assistant just changed: under its answer, on its side of the talk. */
.d-undo {
  display: flex;
  justify-content: flex-start;
}

/* Two side by side have half the width each: the word has to fit on one line. */
.d-pairrow > .big {
  padding: 0 10px;
  font-size: 18px;
}

.d-go > .d-icon,
.d-tile-head > .d-icon {
  flex: none;
  color: var(--mute);
}

.d-tile {
  border: 0;
  color: var(--fg);
  font: inherit;
  text-align: left;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-tile-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font: 600 16px/1.2 var(--sans);
  color: var(--mute);
}

.d-tile-hint {
  font: 500 14px/1.2 var(--sans);
  color: var(--mute);
}

/* The other ways, folded away behind a rimmed button while a proposal is on the table. */
.d-other {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-other > summary {
  list-style: none;
  min-height: 56px;
  box-sizing: border-box;
  padding: 0 16px;
  border: 2px solid var(--edge);
  border-radius: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  font: 600 18px/1.2 var(--sans);
  color: var(--head);
  cursor: pointer;
}

.d-other > summary::-webkit-details-marker {
  display: none;
}

.d-other[open] > summary {
  margin-bottom: 12px;
}

/* ---------- what the assistant says inside a screen */

.d-says,
.d-offer {
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.d-says p,
.d-offer p {
  margin: 0;
  font: 500 17px/1.35 var(--sans);
}

.d-says .d-says-label,
.d-offer .d-says-label {
  font: 700 14px/1.2 var(--sans);
  color: var(--now);
}

.d-offer {
  gap: 10px;
}

.d-offer ul {
  margin: 0;
  padding-left: 20px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font: 500 16px/1.35 var(--sans);
}

/* ---------- the conversation with the assistant */

.d-chat {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding-bottom: 8px;
}

.d-chat-h {
  margin: 8px 0 0;
  font: 700 30px/1.1 var(--display);
  letter-spacing: -0.02em;
  color: var(--head);
}

.d-bub {
  margin: 0;
  max-width: 88%;
  padding: 12px 16px;
  font: 500 17px/1.4 var(--sans);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.d-bub.me {
  align-self: flex-end;
  border-radius: 20px 20px 6px 20px;
  background: var(--solid-bg);
  color: var(--solid-fg);
  font-weight: 600;
}

.d-bub.it {
  align-self: flex-start;
  border-radius: 20px 20px 20px 6px;
  background: var(--card);
}

.d-bub.wait {
  color: var(--mute);
}

/* Something was stored: a state, so it carries the state colour. */
.d-bub.note {
  align-self: stretch;
  max-width: none;
  padding: 0 4px;
  font: 600 15px/1.35 var(--sans);
  color: var(--now);
}

/* The field stays in reach above the bar while the talk scrolls behind it. */
.d-ask {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom) + 88px);
  z-index: 2;
  display: flex;
  align-items: flex-end;
  gap: 10px;
  padding: 10px 0 6px;
  background: var(--bg);
  /* Nothing of the talk shows through between the field and the bar below it. */
  box-shadow: 0 48px 0 var(--bg);
}

.d-ask textarea {
  flex: 1;
  min-height: 52px;
  max-height: 160px;
  box-sizing: border-box;
  padding: 13px 18px;
  border-radius: 26px;
  resize: none;
}

.d-send {
  flex: none;
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--act-bg);
  color: var(--act-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
}

.d-ask.hidden {
  display: none;
}

.d-speak {
  flex: none;
  width: 52px;
  height: 52px;
  box-sizing: border-box;
  border: 2px solid var(--edge);
  border-radius: 50%;
  background: none;
  color: var(--head);
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* The conversation aloud takes the place of the field: what the app is doing, and two buttons. */
.d-voice:empty {
  display: none;
}

.d-voice {
  position: sticky;
  bottom: calc(env(safe-area-inset-bottom) + 88px);
  z-index: 2;
  background: var(--bg);
  box-shadow: 0 48px 0 var(--bg);
  padding: 10px 0 6px;
}

.d-voicebar {
  padding: 16px 18px;
  border-radius: 20px;
  background: var(--card);
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.d-voicebar.type {
  margin-bottom: 4px;
}

.d-voice-state {
  margin: 0;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 18px/1.3 var(--sans);
}

/* The state colour shows that it is the app's turn or his: lit while it listens. */
.d-voice-dot {
  flex: none;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--edge);
}

.d-voicebar.listen .d-voice-dot {
  background: var(--now);
}

.d-voice-heard {
  margin: 0;
  font: 500 17px/1.35 var(--sans);
  color: var(--mute);
}

.d-voicebar .d-row > * {
  flex: 1;
}

/* ---------- settings: what the assistant may see */

.d-may {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 4px 0;
}

.d-may-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-may-name {
  font: 600 17px/1.2 var(--sans);
}

.d-may-hint,
.d-may-fixed {
  font: 500 14px/1.2 var(--sans);
  color: var(--mute);
}

.d-may .d-switch {
  flex: none;
  width: 132px;
}

.d-may .d-switch button {
  height: 38px;
}

/* ---------- capturing sits in the middle of the bar on a phone */

.d-nav-capture {
  justify-self: center;
  align-self: center;
  width: 58px;
  height: 50px;
  border: 0;
  border-radius: 17px;
  background: var(--fab-bg);
  color: var(--fab-fg);
  display: grid;
  place-items: center;
  cursor: pointer;
}

/* ---------- wide screens: the navigation becomes a side column */

@media (min-width: 700px) {
  .d-sheet {
    margin: auto;
    border-radius: 28px;
  }
}

@media (min-width: 900px) {
  .d-app:not(.signin) {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr);
    align-items: start;
  }

  .d-nav {
    position: sticky;
    top: 0;
    height: 100dvh;
    padding: 36px 20px 28px;
    border-top: 0;
    border-right: 2px solid var(--rule);
    background: var(--nav-bg);
    display: flex;
    flex-direction: column;
    gap: 28px;
  }

  html[data-theme='weiss'] .d-nav {
    border-right-color: transparent;
  }

  .d-nav .d-word {
    display: flex;
    margin-left: 12px;
  }

  .d-nav-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
  }

  .d-nav-item {
    flex-direction: row;
    justify-content: flex-start;
    gap: 12px;
    min-height: 46px;
    padding: 0 12px;
    border-radius: 12px;
    color: var(--fg);
    font-size: 18px;
  }

  .d-nav-item.on {
    background: var(--nav-on-bg);
    color: var(--nav-on-fg);
  }

  .d-badge,
  .d-nav-item .live-dot {
    position: static;
    margin-left: auto;
  }

  .d-nav-foot {
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-top: auto;
  }

  .d-fab,
  .d-more,
  .d-nav-capture,
  .d-focus .d-rhythm {
    display: none;
  }

  .d-app.flow {
    display: block;
  }

  .d-nav-foot {
    gap: 8px;
  }

  .d-nav-item.wide-only {
    display: flex;
  }

  .narrow-only {
    display: none;
  }

  .toast {
    bottom: 28px;
  }

  .d-main {
    max-width: 760px;
    padding: 44px 48px 64px;
  }

  .area-heute .d-main,
  .area-content .d-main {
    max-width: 1180px;
  }

  .d-heute-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(300px, 380px);
    gap: 48px;
    align-items: start;
  }

  .d-focus {
    min-height: calc(100dvh - 108px);
  }

  .d-overview {
    display: flex;
    flex-direction: column;
    gap: 16px;
  }

  .d-focus-foot {
    padding-right: 0;
  }

  .d-focus-foot .d-hintline:not(.keep) {
    display: none;
  }

  .d-task {
    max-width: 14em;
    font-size: clamp(48px, 5.2vw, 76px);
    line-height: 1;
  }

}

@media (prefers-reduced-motion: reduce) {
  .working {
    animation: none;
  }
}

/* ---------- the plus: one conversation, the symbol at its head is the switch */

.d-sheet [hidden] {
  display: none;
}
.d-line-head {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.d-line-words {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.d-sheet-head .d-line-words h2 {
  font-size: 22px;
}
.d-line-sub {
  margin: 0;
  font: 500 15px/1.3 var(--sans);
  color: var(--mute);
}
.d-ear {
  box-sizing: border-box;
  width: 62px;
  height: 54px;
  flex-shrink: 0;
  padding: 0;
  border: 2px solid var(--edge);
  border-radius: 18px;
  background: transparent;
  color: var(--head);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}
.d-ear.on {
  border-color: var(--solid-bg);
  background: var(--solid-bg);
  color: var(--solid-fg);
}
/* The strokes in the listening symbol: their own name, so the day's progress bars do not lay them out. */
.d-ear .d-ear-bars,
.d-ear.on .d-icon {
  display: none;
}
.d-ear.on .d-ear-bars {
  display: flex;
}
.d-ear-bars {
  height: 30px;
  align-items: center;
  justify-content: center;
  gap: 4px;
}
.d-ear-bars > span {
  flex: none;
  width: 5px;
  height: 18%;
  min-height: 5px;
  border-radius: 3px;
  /* The colour of the tile's own writing, so the strokes stand out in every look. */
  background: currentColor;
  transition: height 80ms linear;
}
.d-did {
  align-self: stretch;
  box-sizing: border-box;
  min-height: 48px;
  padding: 2px 4px 2px 14px;
  border: 2px solid var(--rule);
  border-radius: 16px;
  display: flex;
  align-items: center;
  gap: 10px;
  font: 600 16px/1.25 var(--sans);
}
.d-did > span {
  flex-grow: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}
.d-did .d-icon {
  flex-shrink: 0;
  color: var(--head);
}
.d-did-back {
  min-height: 44px;
  flex-shrink: 0;
  padding: 0 12px;
  border: 0;
  background: none;
  color: var(--head);
  font: 700 15px/1 var(--sans);
  cursor: pointer;
}

/* ---------- the look, chosen in the settings: one row per look, its app icon on the left */

.d-looks {
  margin: 0;
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.d-look {
  width: 100%;
  min-height: 64px;
  box-sizing: border-box;
  padding: 10px 16px 10px 10px;
  border: 2px solid transparent;
  border-radius: 18px;
  background: var(--card);
  color: var(--fg);
  font: inherit;
  text-align: left;
  display: flex;
  align-items: center;
  gap: 14px;
  cursor: pointer;
}

.d-look.on {
  border-color: var(--now);
}

.d-look-tile {
  flex: none;
  width: 44px;
  height: 44px;
  border-radius: 11px;
  box-sizing: border-box;
  object-fit: cover;
}

.d-look-tile.blau {
  background: #002fa7;
  border: 1px solid rgba(255, 255, 255, 0.45);
}

.d-look-tile.weiss {
  background: #ffffff;
  border: 1px solid #c8cde0;
}

.d-look-tile.auto {
  background: linear-gradient(135deg, #ffffff 50%, #002fa7 50%);
  border: 1px solid #c8cde0;
}

/* The tile in front of a voice: play, or stop while its sample runs. */
.d-voice-tile {
  border: 2px solid var(--edge);
  color: var(--head);
  display: flex;
  align-items: center;
  justify-content: center;
}

.d-voice-tile .d-icon {
  fill: currentColor;
}

.d-voice-tile.playing {
  border-color: var(--solid-bg);
  background: var(--solid-bg);
  color: var(--solid-fg);
}

.d-look-text {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.d-look-name {
  font: 600 18px/1.25 var(--sans);
}

.d-look-note {
  font: 500 14px/1.3 var(--sans);
  color: var(--mute);
}

/* The other looks' marks are square; the loop is wide. */
.d-mark.square {
  width: 1em;
  height: 1em;
}
