/* Demoware: unlock screen and demo list. */

:root[data-theme="dark"] {
  --bg: #000000;
  --surface: #111111;
  --text: #EDEDED;
  --text-sub: #8A8A8A;
  --nav-bg: #1C1C1C;
  --nav-pill-active: rgba(255, 255, 255, 0.08);
  --border: #2A2A2A;
  --accent: #7FA37A;
  --accent-text: #0B0F0A;
  --danger: #E07A6F;
}

:root[data-theme="light"] {
  --bg: #ffffff;
  --surface: #F7F7F5;
  --text: #111111;
  --text-sub: #6B6B6B;
  --nav-bg: #F0F0F0;
  --nav-pill-active: rgba(0, 0, 0, 0.06);
  --border: #E2E2E2;
  --accent: #4C7A47;
  --accent-text: #ffffff;
  --danger: #B5463A;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: Arial, Helvetica, sans-serif;
  padding: 24px 32px 60px;
  min-height: 100vh;
}

h1 {
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: 400;
  margin: 0;
}

[hidden] { display: none !important; }

.sub { color: var(--text-sub); font-size: 13px; margin: 0; }

.back-link {
  color: var(--text-sub);
  font-size: 13px;
  text-decoration: none;
}
.back-link:hover { color: var(--text); }

/* ---------- Unlock screen ---------- */
.lock-body { display: flex; flex-direction: column; }

.lock-main {
  flex: 1;
  display: grid;
  place-items: center;
}

.lock-card {
  width: 100%;
  max-width: 320px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.lock-icon { color: var(--accent); }
.lock-card .lock-icon { margin-bottom: 8px; }
.lock-card h1 { font-size: 28px; }
.lock-card .sub { margin-bottom: 12px; }

.lock-card input {
  width: 100%;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: var(--bg);
  border: 0.5px solid var(--border);
  border-radius: 999px;
  padding: 11px 16px;
  text-align: center;
}
.lock-card input:focus { outline: none; border-color: var(--accent); }

.lock-card button {
  width: 100%;
  font: inherit;
  font-size: 14px;
  font-weight: 600;
  border: 0;
  border-radius: 999px;
  padding: 11px 16px;
  background: var(--accent);
  color: var(--accent-text);
  cursor: pointer;
}
.lock-card button:disabled { opacity: 0.7; cursor: default; }

.error { color: var(--danger); font-size: 13px; min-height: 18px; margin: 0; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* ---------- Demo list ---------- */
.index-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 40px;
}

.lock-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 0.5px solid var(--border);
  background: transparent;
  color: var(--text-sub);
  font: inherit;
  font-size: 12px;
  cursor: pointer;
}
.lock-btn:hover { color: var(--text); }
.lock-btn .lock-icon { color: currentColor; }

.index-body h1 { font-size: 32px; margin-bottom: 10px; }
.index-body .sub { margin-bottom: 28px; }

.demo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}

.demo-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 18px;
  min-height: 110px;
  justify-content: space-between;
  border-radius: 16px;
  border: 0.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.demo-card:hover { border-color: var(--accent); transform: translateY(-2px); }

.demo-title { font-family: Georgia, 'Times New Roman', serif; font-size: 17px; line-height: 1.35; }
.demo-file { font-size: 11px; color: var(--text-sub); }

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

@media (max-width: 560px) {
  body { padding: 16px 16px 48px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; }
}
