/* Friendly Maintenance. Change the colors here (light, then dark). */
:root {
  --bg: #fdf8f1;
  --text: #2b2420;
  --muted: #6c625a;
  --card: #ffffff;
  --line: #eadfd2;
  --accent: #2f7d5b;
  --accent-text: #ffffff;
  --box: #e0a96d;
  --box-side: #c98d4f;
  --box-top: #ecc08f;
  --tape: #f3d9b4;
  --face: #3b2a20;
  --cheek: #f08c78;
  --hat: #f2b51d;
  --hat-dark: #d39a0b;
  --metal: #8d99a6;
  --gear: #c7d3cf;
  --shadow: #eadfd2;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1b1815;
    --text: #f3ece4;
    --muted: #b3a89d;
    --card: #25211d;
    --line: #3a332c;
    --accent: #5cc493;
    --accent-text: #10241a;
    --gear: #3f4a47;
    --shadow: #2a2520;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 17px/1.6 ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 6px; }

.wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: min(640px, 100% - 40px);
  margin: 0 auto;
  padding: 48px 0 24px;
  text-align: center;
}

.illustration { width: min(320px, 80vw); height: auto; margin-bottom: 24px; overflow: visible; }
.shadow { fill: var(--shadow); }
.box-front { fill: var(--box); }
.box-side { fill: var(--box-side); }
.box-top { fill: var(--box-top); }
.tape { fill: var(--tape); }
.eye { fill: var(--face); }
.smile { stroke: var(--face); }
.cheek { fill: var(--cheek); opacity: 0.6; }
.hat { fill: var(--hat); }
.hat-brim { fill: var(--hat-dark); }
.hat-stripe { fill: #fff; opacity: 0.45; }
.wrench { fill: var(--metal); }
.gear path { fill: var(--gear); }
.gear-hole { fill: var(--bg); }

.gear-big { transform-origin: 262px 113px; animation: spin 8s linear infinite; }
.gear-small { transform-origin: 232px 193px; animation: spin 5.3s linear infinite reverse; }
.box { transform-origin: 125px 228px; animation: bob 3s ease-in-out infinite; }

h1 { margin: 0 0 12px; font-size: clamp(2.1rem, 6vw, 3rem); line-height: 1.1; letter-spacing: -0.025em; }
.lead { margin: 0 0 28px; color: var(--muted); font-size: 1.08rem; }

.status {
  display: flex;
  gap: 14px;
  width: 100%;
  margin-bottom: 24px;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--card);
  text-align: left;
}
.status > svg { flex: none; width: 22px; height: 22px; margin-top: 2px; color: var(--accent); }
.status h2 { margin: 0 0 6px; font-size: 1rem; }
.status dl { display: grid; gap: 2px; margin: 0 0 8px; }
.status dl div { display: flex; flex-wrap: wrap; gap: 0 8px; }
.status dt { color: var(--muted); }
.status dt::after { content: ":"; }
.status dd { margin: 0; font-weight: 600; }
.status p { margin: 0; color: var(--muted); font-size: 0.95rem; }

.refresh {
  display: inline-flex; align-items: center; gap: 8px;
  min-height: 48px; padding: 0 22px;
  border: 0; border-radius: 999px;
  background: var(--accent);
  color: var(--accent-text);
  font: inherit; font-weight: 700;
  cursor: pointer;
}
.refresh svg { width: 18px; height: 18px; transition: transform 0.4s; }
.refresh:hover svg { transform: rotate(180deg); }

.foot { padding: 24px 20px 32px; text-align: center; color: var(--muted); font-size: 0.88rem; }
.foot p { margin: 0; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes bob { 50% { transform: translateY(-6px) rotate(-1deg); } }

@media (prefers-reduced-motion: reduce) {
  .gear-big, .gear-small, .box { animation: none; }
  .refresh svg { transition: none; }
}
