:root { --bg: #fafaf7; --fg: #1d2420; --muted: #5d6a62; --accent: #2f6b4f; --border: #cfd6d1; --err: #a12f2f; --ok: #2f6b4f; }
@media (prefers-color-scheme: dark) {
  :root { --bg: #151a17; --fg: #e8ece9; --muted: #9aa8a0; --accent: #6fbf95; --border: #34403a; --err: #e07a7a; --ok: #6fbf95; }
}
body { font-family: system-ui, sans-serif; background: var(--bg); color: var(--fg); max-width: 36rem; margin: 4rem auto; padding: 0 1rem; line-height: 1.5; }
h1 { margin-bottom: .25rem; }
.muted { color: var(--muted); }
form { display: flex; gap: .5rem; margin: 1.5rem 0 1rem; flex-wrap: wrap; }
input[type=text], button { font: inherit; padding: .55rem .7rem; border: 1px solid var(--border); border-radius: 6px; background: transparent; color: inherit; }
input[type=text] { flex: 1 1 14rem; }
button { background: var(--accent); color: #fff; border-color: var(--accent); cursor: pointer; }
button:disabled { opacity: .6; cursor: wait; }
a { color: var(--accent); }
#msg { padding: .75rem 1rem; border-radius: 6px; border: 1px solid var(--border); }
#msg[hidden] { display: none; }
#msg.error { border-color: var(--err); color: var(--err); }
#msg.ok { border-color: var(--ok); color: var(--ok); }
ul.errors { margin: .5rem 0 0; padding-left: 1.2rem; }
#msg.loading::before { content: ""; display: inline-block; width: .9em; height: .9em; margin-right: .6em; vertical-align: -.1em;
  border: 2px solid var(--border); border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { #msg.loading::before { animation-duration: 3s; } }

/* landing page: three modes */
body.landing { max-width: 64rem; }
.modes { display: grid; grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr)); gap: 1rem; margin-top: 1.5rem; align-items: stretch; }
.mode { display: flex; flex-direction: column; gap: .5rem; padding: 1rem 1.1rem 1.1rem; border: 1px solid var(--border); border-radius: 10px; background: color-mix(in srgb, var(--fg) 3%, transparent); }
.mode h2 { margin: 0; font-size: 1.15rem; display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.mode p { margin: 0; }
.mode form { margin: .5rem 0 0; }
.small { font-size: .85rem; }
.mode.unavailable { opacity: .65; border-style: dashed; background: transparent; }
.mode.unavailable h2 { color: var(--muted); }
.mode.unavailable button { margin-top: auto; align-self: flex-start; background: transparent; color: var(--muted); border-color: var(--border); cursor: not-allowed; }
.mode.unavailable button:disabled { opacity: 1; cursor: not-allowed; }
.mode .badge { font-size: .7rem; font-weight: 600; padding: .1rem .5rem; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }

/* progress circle with an estimate (js/progress.js) */
.progress { display: flex; align-items: center; gap: 1rem; color: var(--fg); }
.progresscircle { width: 5rem; height: 5rem; flex: 0 0 auto; }
.progresscircle .ptrack { stroke: var(--border); opacity: .6; }
.progresscircle .parc { stroke: var(--accent); }
.progresscircle .ppct { fill: var(--fg); font: 700 17px system-ui, sans-serif; }
.progresstext { min-width: 0; }
.progresstext .ptitle { font-weight: 700; font-size: 1.15rem; }
.progresstext .pstage { margin-top: .15rem; }
.progresstext .peta { margin-top: .15rem; color: var(--muted); font-size: .9rem; }
#msg.loading::before, .status.loading::before { display: none; }
