:root {
  --bg: #1a1a1a;            /* charcoal black */
  --card: #2c2c2c;          /* dark card bg */
  --accent: #8a2be2;        /* electric purple */
  --accent-light: #b065f0;  /* lighter purple */
  --text: #e0e0e0;          /* primary text */
  --text-muted: #a0a0a0;    /* secondary text */
  --line: #505050;          /* subtle borders */
  --input-bg: #3c3c3c;      /* input bg */
  --radius-box: 10px;       /* 8-12px corners */
  --radius-icon: 8px;       /* rounded icons */
  --shadow: 0 4px 8px rgba(0,0,0,0.2);
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background-color: var(--bg);
  background-image:
    linear-gradient(45deg, transparent 95%, rgba(255,255,255,0.02) 95%),
    linear-gradient(-45deg, transparent 95%, rgba(255,255,255,0.02) 95%);
  background-size: 20px 20px;
  color: var(--text);
  font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, "SF Pro", sans-serif;
  line-height: 1.55;
  padding: 0 24px 64px;
  max-width: 1080px;
  margin: 0 auto;
}


/* ----- Hero banner ----- */
.hero {
  width: 100%;
  display: block;
  border-radius: 12px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
/* ----- Header styles ----- */
.header {
  padding: 44px 0 26px;
  border-bottom: 1px solid var(--line);
}

.brand-name {
  font-size: clamp(2.2rem, 6vw, 3.4rem);
  font-weight: 800;
  letter-spacing: -0.5px;
  background: linear-gradient(to right, var(--accent), var(--accent-light));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  text-shadow: 0 1px 3px rgba(0,0,0,0.7);
}
.tagline {
  margin-top: 6px;
  font-size: 0.8rem;
  letter-spacing: 0.3em;
  color: var(--text-muted);
  text-transform: uppercase;
  font-weight: 500;
}

/* ----- Welcome section ----- */
.welcome {
  text-align: center;
  padding: 56px 12px 32px;
}
.welcome h1 {
  font-size: clamp(1.7rem, 4.5vw, 2.5rem);
  font-weight: 600;
  margin-bottom: 18px;
  color: #fff;
}
.welcome p {
  max-width: 620px;
  margin: 0 auto;
  color: var(--text-muted);
  font-size: 1.05rem;
}
.sheep-well {
  margin-top: 34px;
  min-height: 40px;
}
.sheep {
  max-width: 220px;
  display: block;
  margin: 0 auto;
  filter: drop-shadow(0 4px 8px rgba(0,0,0,0.4));
  border-radius: 10px;
}

/* ----- Card styles ----- */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 22px;
  margin-top: 24px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 26px 24px;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.card:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 15px rgba(0,0,0,0.25);
  border-color: #606060;
}
.card .icon {
  display: inline-flex;
  justify-content: center;
  align-items: center;
  background: var(--input-bg);
  font-size: 1.6rem;
  width: 55px;
  height: 55px;
  border-radius: var(--radius-icon);
  margin-bottom: 15px;
  overflow: hidden;
}
.card .icon .card-svg {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.card h2 {
  font-size: 1.25rem;
  font-weight: 600;
  margin-bottom: 8px;
  color: #fff;
}
.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
  line-height: 1.5;
}

/* ----- Form styles ----- */
.spec-panel {
  max-width: 720px;
  margin: 30px auto;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 26px;
}
.spec-panel textarea {
  width: 100%;
  min-height: 200px;
  font-family: "SF Mono", "Roboto Mono", monospace;
  font-size: 0.9rem;
  padding: 12px;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-icon);
}
.spec-panel button {
  margin-top: 14px;
  background: var(--accent);
  color: white;
  border: 0;
  border-radius: 99px;
  padding: 12px 30px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  box-shadow: var(--shadow);
}
.spec-panel button:hover {
  background: var(--accent-light);
  transform: translateY(-1px);
}
#report {
  margin-top: 18px;
  white-space: pre-wrap;
  font-family: monospace;
  font-size: 0.9rem;
  background: #1a1a1a;
  color: #d0d0d0;
  padding: 16px;
  border-radius: var(--radius-icon);
}

/* ----- Footer ----- */
.footer {
  margin-top: 60px;
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  border-top: 1px solid var(--line);
  padding-top: 28px;
}

/* Bottom thank-you banner — bounded to fit the footer text width (was 500px,
   still looked too wide vs the page; ~12% narrower keeps it balanced). */
.footer .footer-banner {
  max-width: 440px;
  width: 100%;
  margin: 0 auto 16px;
}

/* ----- Status indicator ----- */
.status {
  position: fixed;
  top: 15px;
  right: 15px;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #4caf50;
  box-shadow: 0 0 10px #4caf50;
}

/* ===== Accounts / People / Inventory (milestone: accounts) ===== */
.topnav { display:flex; flex-wrap:wrap; gap:4px 6px; align-items:center; padding:14px 0; border-bottom:1px solid var(--line); margin-bottom:8px; }
.topnav a { color:var(--text-muted); text-decoration:none; padding:6px 12px; border-radius:99px; font-size:0.92rem; }
.topnav a:hover { color:#fff; background:var(--card); }
.topnav a.on { color:#fff; background:var(--accent); }
.topnav a.brand { font-weight:800; color:var(--accent-light); font-size:1.05rem; padding-left:0; }
.topnav .sp { flex:1; }
.kl-page { padding-top:18px; }
.kl-page h1 { color:#fff; font-size:1.7rem; margin-bottom:6px; }
.kl-page .sub { color:var(--text-muted); margin-bottom:18px; }
.panel { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-box); padding:20px; margin:16px 0; box-shadow:var(--shadow); }
.panel h2 { color:#fff; font-size:1.1rem; margin-bottom:12px; }
.auth-box { max-width:420px; margin:30px auto; }
.auth-box img.sheep { display:block; max-width:140px; margin:0 auto 10px; border-radius:10px; }
.kl-page label { display:block; font-size:0.82rem; color:var(--text-muted); margin:10px 0 4px; font-weight:500; }
.kl-page input, .kl-page select, .kl-page textarea { width:100%; background:var(--input-bg); color:var(--text); border:1px solid var(--line);
  border-radius:var(--radius-icon); padding:9px 11px; font-size:0.95rem; font-family:inherit; }
.kl-page input:focus, .kl-page select:focus, .kl-page textarea:focus { outline:none; border-color:var(--accent); }
.kl-page textarea { min-height:70px; resize:vertical; }
.row { display:flex; gap:12px; flex-wrap:wrap; }
.row > * { flex:1 1 140px; min-width:0; }
.btn { background:var(--accent); color:#fff; border:0; border-radius:99px; padding:9px 22px; font-size:0.95rem; font-weight:600; cursor:pointer; margin-top:14px; transition:all .2s; }
.btn:hover { background:var(--accent-light); }
.btn.ghost { background:transparent; border:1px solid var(--line); color:var(--text); }
.btn.ghost:hover { border-color:var(--accent-light); }
.btn.danger { background:#7a2430; }
.btn.danger:hover { background:#a03040; }
.btn.sm { padding:3px 11px; font-size:0.8rem; margin:0 2px; }
.msg { margin-top:10px; font-size:0.9rem; min-height:1em; }
.msg.err { color:#e57373; } .msg.ok { color:#81c784; }
.stats { display:grid; grid-template-columns:repeat(auto-fit,minmax(130px,1fr)); gap:12px; margin:14px 0; }
.stat { background:var(--card); border:1px solid var(--line); border-radius:var(--radius-box); padding:14px; text-align:center; }
.stat b { display:block; font-size:1.6rem; color:var(--accent-light); } .stat span { font-size:0.8rem; color:var(--text-muted); }
.tabs { display:flex; gap:8px; margin:14px 0; }
.tabs button { background:var(--card); color:var(--text-muted); border:1px solid var(--line); border-radius:99px; padding:7px 20px; cursor:pointer; font-size:0.95rem; }
.tabs button.on { background:var(--accent); color:#fff; border-color:var(--accent); }
.tbl-wrap { overflow-x:auto; }
table.kl { width:100%; border-collapse:collapse; font-size:0.9rem; }
table.kl th { text-align:left; color:var(--text-muted); font-weight:500; padding:8px 10px; border-bottom:1px solid var(--line); white-space:nowrap; }
table.kl td { padding:9px 10px; border-bottom:1px solid #353535; vertical-align:top; }
table.kl tr:hover td { background:#303030; }
.pill { display:inline-block; background:var(--input-bg); border:1px solid var(--line); border-radius:99px; padding:1px 10px; font-size:0.78rem; margin:2px 3px 2px 0; white-space:nowrap; }
.pill.low { border-color:#d9a441; color:#e8c069; }
.muted { color:var(--text-muted); } .hidden { display:none !important; }
.cols { display:grid; grid-template-columns:minmax(220px,300px) 1fr; gap:18px; }
@media (max-width:760px) { .cols { grid-template-columns:1fr; } }
.list-item { padding:10px 12px; border:1px solid var(--line); border-radius:var(--radius-icon); margin:6px 0; cursor:pointer; background:var(--input-bg); }
.list-item:hover, .list-item.on { border-color:var(--accent); }
.avatar { width:84px; height:84px; border-radius:50%; object-fit:cover; background:var(--input-bg); border:2px solid var(--accent); }

/* ===== Mascot / status images ===== */
.mascot-img {
  max-width: 100%;
  height: auto;
  display: block;
  border-radius: var(--radius-box);
  box-shadow: var(--shadow);
}
/* Large hero illustration — bounded responsive container.
   Preserves aspect ratio (height auto), never overflows, and stays centered
   instead of dominating the full body width on desktop. */
.mascot-banner {
  max-width: 780px;
  width: 100%;
  height: auto;
  display: block;
  margin: 20px auto;
  border-radius: var(--radius-box);
  box-shadow: 0 6px 14px rgba(0,0,0,0.35);
}
.mascot-sign {
  max-width: 260px;
  height: auto;
  display: block;
  margin: 0 auto;
}

/* ===== Construction notice ===== */
.notice-construction {
  background: linear-gradient(135deg, #3d2b00, #5a3f00);
  border: 1px solid #ffb300;
  border-radius: var(--radius-box);
  padding: 16px 20px;
  margin: 18px 0;
  color: #ffd54f;
  display: flex;
  align-items: center;
  gap: 16px;
  font-size: 0.95rem;
}
.notice-construction img.notice-img {
  width: 56px;
  height: 56px;
  object-fit: cover;
  border-radius: 8px;
  flex-shrink: 0;
}
.notice-construction .notice-text {
  flex: 1;
}
.notice-construction .notice-text strong {
  color: #fff;
}
.notice-construction .notice-close {
  background: transparent;
  border: 1px solid #ffb300;
  color: #ffd54f;
  border-radius: 50%;
  width: 28px;
  height: 28px;
  cursor: pointer;
  font-size: 1rem;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s;
}
.notice-construction .notice-close:hover {
  background: #ffb300;
  color: #1a1a1a;
}

/* ===== Newsletter / early-access ===== */
.newsletter {
  max-width: 620px;
  margin: 46px auto 10px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 26px 28px;
  box-shadow: var(--shadow);
  text-align: left;
}
.newsletter h2, .newsletter h3 {
  color: #fff;
  font-size: 1.25rem;
  margin-bottom: 8px;
}
.newsletter p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 14px;
}
.nl-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.nl-row input[type=email] {
  flex: 1 1 220px;
  min-width: 0;
  background: var(--input-bg);
  color: var(--text);
  border: 1px solid var(--line);
  border-radius: var(--radius-icon);
  padding: 11px 13px;
  font-size: 0.95rem;
}
.nl-row input[type=email]:focus { outline: none; border-color: var(--accent); }
.nl-row .btn { margin-top: 0; }
.nl-consent {
  display: block;
  margin: 12px 0 6px;
  color: var(--text-muted);
  font-size: 0.88rem;
  line-height: 1.5;
}
.nl-consent input { margin-right: 8px; vertical-align: -2px; }
.nl-privacy { font-size: 0.78rem; margin-top: 4px; }
.nl-privacy a { color: var(--accent-light); }
.newsletter .msg { margin-top: 8px; }
.nl-foot { max-width: 460px; margin: 26px auto; padding: 20px 24px; text-align: center; }
.nl-foot h3 { font-size: 1.05rem; }
.nl-foot form { text-align: left; }
.nl-foot .btn { display: inline-block; }

/* ===== Status page ===== */
.status-section {
  text-align: center;
  padding: 20px 0;
}
.status-section h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 600;
  margin-bottom: 10px;
  color: #fff;
}
.status-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 14px;
  margin: 30px 0;
  text-align: left;
}
.status-item {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-box);
  padding: 18px;
  box-shadow: var(--shadow);
}
.status-item h3 {
  font-size: 1.05rem;
  margin-bottom: 8px;
  color: #fff;
}
.status-item .tag {
  display: inline-block;
  font-size: 0.75rem;
  padding: 2px 10px;
  border-radius: 99px;
  font-weight: 600;
  text-transform: uppercase;
}
.tag-done { background: #1b5e20; color: #a5d6a7; }
.tag-wip  { background: #5a3f00; color: #ffd54f; }
.tag-next { background: #4a148c; color: #ce93d8; }
.tag-soon { background: #1a237e; color: #90caf9; }
