:root {
  color-scheme: light;
  --ink: #18221f;
  --muted: #60706b;
  --line: #d8e0dc;
  --paper: #fbfcf8;
  --wash: #eef5f2;
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.84);
  --teal: #0f766e;
  --coral: #b7463b;
  --gold: #c39b37;
  --charcoal: #24302d;
  --shadow: 0 24px 70px rgba(24, 34, 31, 0.14);
  --header-height: 72px;
  --content-max: 1200px;
  --page-x: clamp(18px, 5vw, 72px);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  min-height: 100svh;
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}

a {
  color: inherit;
  text-decoration: none;
}

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

.app-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: var(--header-height);
  padding: 14px max(var(--page-x), calc((100vw - var(--content-max)) / 2));
  background: rgba(251, 252, 248, 0.86);
  border-bottom: 1px solid rgba(216, 224, 220, 0.7);
  backdrop-filter: blur(18px);
}

.home-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  color: var(--charcoal);
  font-weight: 800;
}

.home-link span:first-child {
  display: grid;
  place-items: center;
  width: 32px;
  height: 32px;
  color: #fff;
  background: var(--charcoal);
  border-radius: 8px;
  font-size: 1.5rem;
  line-height: 1;
}

.status-row {
  display: flex;
  gap: 10px;
}

.status-box {
  min-width: 92px;
  padding: 9px 12px;
  text-align: center;
  background: var(--panel-glass);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.status-box span {
  display: block;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 800;
}

.status-box strong {
  display: block;
  margin-top: 2px;
  color: var(--charcoal);
  font-size: 1.25rem;
}

.secret-shell {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 420px);
  gap: clamp(24px, 5vw, 72px);
  align-items: center;
  min-height: calc(100svh - var(--header-height));
  padding-block: clamp(34px, 6vw, 78px);
  padding-inline: max(var(--page-x), calc((100vw - var(--content-max)) / 2));
}

.unlock-panel {
  max-width: 720px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--teal);
  font-size: 0.78rem;
  font-weight: 850;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
p,
label {
  overflow-wrap: anywhere;
}

h1,
h2 {
  margin: 0;
  line-height: 1.08;
}

h1 {
  font-size: clamp(3.2rem, 8vw, 5.2rem);
}

h2 {
  font-size: 2rem;
}

.intro {
  max-width: 620px;
  margin: 24px 0 0;
  color: var(--muted);
  font-size: 1.16rem;
  line-height: 1.82;
}

.unlock-form {
  max-width: 560px;
  margin-top: 34px;
}

.unlock-form label {
  display: block;
  margin-bottom: 10px;
  color: var(--charcoal);
  font-weight: 820;
}

.password-row {
  display: flex;
  gap: 10px;
  align-items: stretch;
}

input,
button {
  min-height: 48px;
  border-radius: 8px;
  font: inherit;
}

input {
  width: 100%;
  min-width: 0;
  padding: 0 14px;
  color: var(--ink);
  background: var(--panel);
  border: 1px solid var(--line);
  outline: none;
}

input:focus {
  border-color: rgba(15, 118, 110, 0.72);
  box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

button {
  flex: 0 0 auto;
  padding: 0 20px;
  color: #fff;
  font-weight: 800;
  background: var(--teal);
  border: 1px solid var(--teal);
  cursor: pointer;
  transition:
    transform 160ms ease,
    background 160ms ease;
}

button:hover {
  transform: translateY(-2px);
}

button:disabled {
  cursor: wait;
  opacity: 0.72;
  transform: none;
}

.status {
  min-height: 1.6em;
  margin: 12px 0 0;
  color: var(--coral);
  font-weight: 780;
}

.status.is-working {
  color: var(--gold);
}

.cipher-panel {
  min-height: 330px;
  padding: 24px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.cipher-index {
  display: inline-block;
  margin-bottom: 64px;
  color: var(--coral);
  font-size: 0.82rem;
  font-weight: 850;
}

.cipher-panel p {
  margin: 16px 0 0;
  color: var(--muted);
  line-height: 1.75;
}

@media (max-width: 820px) {
  .secret-shell {
    grid-template-columns: 1fr;
    min-height: auto;
  }

  .cipher-panel {
    min-height: 220px;
  }
}

@media (max-width: 560px) {
  .app-header,
  .password-row {
    align-items: stretch;
    flex-direction: column;
  }

  .status-row {
    width: 100%;
  }

  .status-box {
    flex: 1;
  }

  button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  button {
    transition: none;
  }

  button:hover {
    transform: none;
  }
}
