/* Same voice and tokens as faces/admin/style.css, which this is copied from — no build step, and
   a shared stylesheet across independently deployable directories is one more thing that could
   drift silently between them. Added on top: `.overdue` for the one thing this face has to make
   impossible to miss, and the restore form's domain/set pickers. */

:root {
  --ground: #fbfaf8;
  --panel: #ffffff;
  --ink: #16150f;
  --quiet: #6a675d;
  --line: #ddd9cf;
  --accent: #4a3f2c;
  --bad: #8a2b1e;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ground: #14130f;
    --panel: #1c1b16;
    --ink: #ece8dd;
    --quiet: #948f82;
    --line: #302e26;
    --accent: #d8cba9;
    --bad: #e0917f;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 3rem 1.25rem 6rem;
  background: var(--ground);
  color: var(--ink);
  font: 16px/1.55 ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
}

main {
  max-width: 34rem;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

h1 {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--quiet);
}

h2 {
  margin: 0;
  font-size: 1.25rem;
  font-weight: 600;
  line-height: 1.2;
  text-wrap: balance;
}

h3 {
  margin: 1rem 0 0;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--quiet);
}

section {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

#screen-app {
  gap: 2.25rem;
}

/* See faces/admin/style.css's identical rule for why this needs `!important`: an author rule
   that sets `display` always beats the UA stylesheet's own `[hidden] { display: none }`, and
   `.panel-error` below is declared later in this file at the same specificity. */
[hidden] {
  display: none !important;
}

p {
  margin: 0;
}

.muted {
  color: var(--quiet);
  font-size: 0.925rem;
}

code {
  font: 0.875em ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 4px;
  padding: 0.05rem 0.3rem;
  word-break: break-all;
}

button {
  font: inherit;
  font-weight: 500;
  padding: 0.6rem 0.9rem;
  color: var(--ground);
  background: var(--accent);
  border: 1px solid var(--accent);
  border-radius: 6px;
  cursor: pointer;
}

button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

button:disabled {
  opacity: 0.55;
  cursor: progress;
}

button.quiet {
  color: var(--quiet);
  background: transparent;
  border-color: var(--line);
}

label {
  font-size: 0.85rem;
  color: var(--quiet);
  margin-top: 0.25rem;
}

input[type='text'],
input[type='password'] {
  font: inherit;
  padding: 0.55rem 0.7rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rows {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.rows li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.6rem 0.75rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.rows .what {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.rows .what span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.row-actions {
  display: flex;
  flex: none;
  gap: 0.4rem;
}

.rows button {
  flex: none;
  padding: 0.3rem 0.55rem;
  font-size: 0.8rem;
}

ul.nested {
  gap: 0;
}

ul.nested li {
  padding: 0.3rem 0;
  background: none;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 0.875rem;
  display: block;
}

ul.nested li:last-child {
  border-bottom: 0;
}

.panel-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

li.card {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  padding: 0.9rem 1rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.card-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
}

.card-header strong {
  font-size: 1rem;
}

/* The one thing this face has to make impossible to miss — age of the newest copy past twice its
   declared cadence, or a drill overdue. Color alone is never the only signal: the word "overdue"
   is always in the text this class wraps. */
.overdue {
  color: var(--bad);
  font-weight: 600;
}

.domain-picker {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  padding: 0.75rem 0.9rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.domain-picker-header {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.domain-picker select {
  font: inherit;
  padding: 0.4rem 0.55rem;
  background: var(--panel);
  color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 6px;
}

.panel-error {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--bad);
  border-radius: 6px;
  color: var(--bad);
  font-size: 0.9rem;
}

.panel-error button {
  flex: none;
}

#message {
  padding: 0.7rem 0.85rem;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--panel);
  font-size: 0.925rem;
}

#message.bad {
  color: var(--bad);
  border-color: var(--bad);
}
